File Explorer

/var/runtime/node_modules/@aws-sdk/client-cloudhsm/dist-cjs

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

2 dirs
3 files
index.js43.9 KB · 1151 lines
"use strict";var __defProp = Object.defineProperty;var __getOwnPropDesc = Object.getOwnPropertyDescriptor;var __getOwnPropNames = Object.getOwnPropertyNames;var __hasOwnProp = Object.prototype.hasOwnProperty;var __name = (target, value) => __defProp(target, "name", { value, configurable: true });var __export = (target, all) => {  for (var name in all)    __defProp(target, name, { get: all[name], enumerable: true });};var __copyProps = (to, from, except, desc) => {  if (from && typeof from === "object" || typeof from === "function") {    for (let key of __getOwnPropNames(from))      if (!__hasOwnProp.call(to, key) && key !== except)        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });  }  return to;};var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.tsvar index_exports = {};__export(index_exports, {  AddTagsToResourceCommand: () => AddTagsToResourceCommand,  ClientVersion: () => ClientVersion,  CloudHSM: () => CloudHSM,  CloudHSMClient: () => CloudHSMClient,  CloudHSMServiceException: () => CloudHSMServiceException,  CloudHsmInternalException: () => CloudHsmInternalException,  CloudHsmObjectState: () => CloudHsmObjectState,  CloudHsmServiceException: () => CloudHsmServiceException,  CreateHapgCommand: () => CreateHapgCommand,  CreateHsmCommand: () => CreateHsmCommand,  CreateLunaClientCommand: () => CreateLunaClientCommand,  DeleteHapgCommand: () => DeleteHapgCommand,  DeleteHsmCommand: () => DeleteHsmCommand,  DeleteLunaClientCommand: () => DeleteLunaClientCommand,  DescribeHapgCommand: () => DescribeHapgCommand,  DescribeHsmCommand: () => DescribeHsmCommand,  DescribeLunaClientCommand: () => DescribeLunaClientCommand,  GetConfigCommand: () => GetConfigCommand,  HsmStatus: () => HsmStatus,  InvalidRequestException: () => InvalidRequestException,  ListAvailableZonesCommand: () => ListAvailableZonesCommand,  ListHapgsCommand: () => ListHapgsCommand,  ListHsmsCommand: () => ListHsmsCommand,  ListLunaClientsCommand: () => ListLunaClientsCommand,  ListTagsForResourceCommand: () => ListTagsForResourceCommand,  ModifyHapgCommand: () => ModifyHapgCommand,  ModifyHsmCommand: () => ModifyHsmCommand,  ModifyLunaClientCommand: () => ModifyLunaClientCommand,  RemoveTagsFromResourceCommand: () => RemoveTagsFromResourceCommand,  SubscriptionType: () => SubscriptionType,  __Client: () => import_smithy_client.Client});module.exports = __toCommonJS(index_exports); // src/CloudHSMClient.tsvar import_middleware_host_header = require("@aws-sdk/middleware-host-header");var import_middleware_logger = require("@aws-sdk/middleware-logger");var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");var import_config_resolver = require("@smithy/config-resolver");var import_core = require("@smithy/core");var import_middleware_content_length = require("@smithy/middleware-content-length");var import_middleware_endpoint = require("@smithy/middleware-endpoint");var import_middleware_retry = require("@smithy/middleware-retry"); var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider"); // src/endpoint/EndpointParameters.tsvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {  return Object.assign(options, {    useDualstackEndpoint: options.useDualstackEndpoint ?? false,    useFipsEndpoint: options.useFipsEndpoint ?? false,    defaultSigningName: "cloudhsm"  });}, "resolveClientEndpointParameters");var commonParams = {  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },  Endpoint: { type: "builtInParams", name: "endpoint" },  Region: { type: "builtInParams", name: "region" },  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }}; // src/CloudHSMClient.tsvar import_runtimeConfig = require("././runtimeConfig"); // src/runtimeExtensions.tsvar import_region_config_resolver = require("@aws-sdk/region-config-resolver");var import_protocol_http = require("@smithy/protocol-http");var import_smithy_client = require("@smithy/smithy-client"); // src/auth/httpAuthExtensionConfiguration.tsvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;  let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;  let _credentials = runtimeConfig.credentials;  return {    setHttpAuthScheme(httpAuthScheme) {      const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);      if (index === -1) {        _httpAuthSchemes.push(httpAuthScheme);      } else {        _httpAuthSchemes.splice(index, 1, httpAuthScheme);      }    },    httpAuthSchemes() {      return _httpAuthSchemes;    },    setHttpAuthSchemeProvider(httpAuthSchemeProvider) {      _httpAuthSchemeProvider = httpAuthSchemeProvider;    },    httpAuthSchemeProvider() {      return _httpAuthSchemeProvider;    },    setCredentials(credentials) {      _credentials = credentials;    },    credentials() {      return _credentials;    }  };}, "getHttpAuthExtensionConfiguration");var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {  return {    httpAuthSchemes: config.httpAuthSchemes(),    httpAuthSchemeProvider: config.httpAuthSchemeProvider(),    credentials: config.credentials()  };}, "resolveHttpAuthRuntimeConfig"); // src/runtimeExtensions.tsvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {  const extensionConfiguration = Object.assign(    (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),    (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),    (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),    getHttpAuthExtensionConfiguration(runtimeConfig)  );  extensions.forEach((extension) => extension.configure(extensionConfiguration));  return Object.assign(    runtimeConfig,    (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),    (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),    (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),    resolveHttpAuthRuntimeConfig(extensionConfiguration)  );}, "resolveRuntimeExtensions"); // src/CloudHSMClient.tsvar CloudHSMClient = class extends import_smithy_client.Client {  static {    __name(this, "CloudHSMClient");  }  /**   * The resolved configuration of CloudHSMClient class. This is resolved and normalized from the {@link CloudHSMClientConfig | constructor configuration interface}.   */  config;  constructor(...[configuration]) {    const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});    super(_config_0);    this.initConfig = _config_0;    const _config_1 = resolveClientEndpointParameters(_config_0);    const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);    const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);    const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);    const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);    const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);    const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);    const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);    this.config = _config_8;    this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));    this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));    this.middlewareStack.use(      (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {        httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultCloudHSMHttpAuthSchemeParametersProvider,        identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({          "aws.auth#sigv4": config.credentials        }), "identityProviderConfigProvider")      })    );    this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));  }  /**   * Destroy underlying resources, like sockets. It's usually not necessary to do this.   * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.   * Otherwise, sockets might stay open for quite a long time before the server terminates them.   */  destroy() {    super.destroy();  }}; // src/CloudHSM.ts  // src/commands/AddTagsToResourceCommand.ts var import_middleware_serde = require("@smithy/middleware-serde");  // src/protocols/Aws_json1_1.tsvar import_core2 = require("@aws-sdk/core");   // src/models/CloudHSMServiceException.ts var CloudHSMServiceException = class _CloudHSMServiceException extends import_smithy_client.ServiceException {  static {    __name(this, "CloudHSMServiceException");  }  /**   * @internal   */  constructor(options) {    super(options);    Object.setPrototypeOf(this, _CloudHSMServiceException.prototype);  }}; // src/models/models_0.tsvar CloudHsmInternalException = class _CloudHsmInternalException extends CloudHSMServiceException {  static {    __name(this, "CloudHsmInternalException");  }  name = "CloudHsmInternalException";  $fault = "server";  /**   * <p>Indicates if the action can be retried.</p>   * @public   */  retryable;  /**   * @internal   */  constructor(opts) {    super({      name: "CloudHsmInternalException",      $fault: "server",      ...opts    });    Object.setPrototypeOf(this, _CloudHsmInternalException.prototype);    this.retryable = opts.retryable;  }};var CloudHsmServiceException = class _CloudHsmServiceException extends CloudHSMServiceException {  static {    __name(this, "CloudHsmServiceException");  }  name = "CloudHsmServiceException";  $fault = "client";  /**   * <p>Indicates if the action can be retried.</p>   * @public   */  retryable;  /**   * @internal   */  constructor(opts) {    super({      name: "CloudHsmServiceException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _CloudHsmServiceException.prototype);    this.retryable = opts.retryable;  }};var InvalidRequestException = class _InvalidRequestException extends CloudHSMServiceException {  static {    __name(this, "InvalidRequestException");  }  name = "InvalidRequestException";  $fault = "client";  /**   * <p>Indicates if the action can be retried.</p>   * @public   */  retryable;  /**   * @internal   */  constructor(opts) {    super({      name: "InvalidRequestException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _InvalidRequestException.prototype);    this.retryable = opts.retryable;  }};var ClientVersion = {  FIVE_ONE: "5.1",  FIVE_THREE: "5.3"};var SubscriptionType = {  PRODUCTION: "PRODUCTION"};var CloudHsmObjectState = {  DEGRADED: "DEGRADED",  READY: "READY",  UPDATING: "UPDATING"};var HsmStatus = {  DEGRADED: "DEGRADED",  PENDING: "PENDING",  RUNNING: "RUNNING",  SUSPENDED: "SUSPENDED",  TERMINATED: "TERMINATED",  TERMINATING: "TERMINATING",  UPDATING: "UPDATING"}; // src/protocols/Aws_json1_1.tsvar se_AddTagsToResourceCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("AddTagsToResource");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_AddTagsToResourceCommand");var se_CreateHapgCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("CreateHapg");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_CreateHapgCommand");var se_CreateHsmCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("CreateHsm");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_CreateHsmCommand");var se_CreateLunaClientCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("CreateLunaClient");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_CreateLunaClientCommand");var se_DeleteHapgCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("DeleteHapg");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_DeleteHapgCommand");var se_DeleteHsmCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("DeleteHsm");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_DeleteHsmCommand");var se_DeleteLunaClientCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("DeleteLunaClient");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_DeleteLunaClientCommand");var se_DescribeHapgCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("DescribeHapg");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_DescribeHapgCommand");var se_DescribeHsmCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("DescribeHsm");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_DescribeHsmCommand");var se_DescribeLunaClientCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("DescribeLunaClient");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_DescribeLunaClientCommand");var se_GetConfigCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("GetConfig");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_GetConfigCommand");var se_ListAvailableZonesCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("ListAvailableZones");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_ListAvailableZonesCommand");var se_ListHapgsCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("ListHapgs");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_ListHapgsCommand");var se_ListHsmsCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("ListHsms");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_ListHsmsCommand");var se_ListLunaClientsCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("ListLunaClients");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_ListLunaClientsCommand");var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("ListTagsForResource");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_ListTagsForResourceCommand");var se_ModifyHapgCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("ModifyHapg");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_ModifyHapgCommand");var se_ModifyHsmCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("ModifyHsm");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_ModifyHsmCommand");var se_ModifyLunaClientCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("ModifyLunaClient");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_ModifyLunaClientCommand");var se_RemoveTagsFromResourceCommand = /* @__PURE__ */ __name(async (input, context) => {  const headers = sharedHeaders("RemoveTagsFromResource");  let body;  body = JSON.stringify((0, import_smithy_client._json)(input));  return buildHttpRpcRequest(context, headers, "/", void 0, body);}, "se_RemoveTagsFromResourceCommand");var de_AddTagsToResourceCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_AddTagsToResourceCommand");var de_CreateHapgCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_CreateHapgCommand");var de_CreateHsmCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_CreateHsmCommand");var de_CreateLunaClientCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_CreateLunaClientCommand");var de_DeleteHapgCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_DeleteHapgCommand");var de_DeleteHsmCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_DeleteHsmCommand");var de_DeleteLunaClientCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_DeleteLunaClientCommand");var de_DescribeHapgCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_DescribeHapgCommand");var de_DescribeHsmCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_DescribeHsmCommand");var de_DescribeLunaClientCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_DescribeLunaClientCommand");var de_GetConfigCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_GetConfigCommand");var de_ListAvailableZonesCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_ListAvailableZonesCommand");var de_ListHapgsCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_ListHapgsCommand");var de_ListHsmsCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_ListHsmsCommand");var de_ListLunaClientsCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_ListLunaClientsCommand");var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_ListTagsForResourceCommand");var de_ModifyHapgCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_ModifyHapgCommand");var de_ModifyHsmCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_ModifyHsmCommand");var de_ModifyLunaClientCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_ModifyLunaClientCommand");var de_RemoveTagsFromResourceCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode >= 300) {    return de_CommandError(output, context);  }  const data = await (0, import_core2.parseJsonBody)(output.body, context);  let contents = {};  contents = (0, import_smithy_client._json)(data);  const response = {    $metadata: deserializeMetadata(output),    ...contents  };  return response;}, "de_RemoveTagsFromResourceCommand");var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {  const parsedOutput = {    ...output,    body: await (0, import_core2.parseJsonErrorBody)(output.body, context)  };  const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);  switch (errorCode) {    case "CloudHsmInternalException":    case "com.amazonaws.cloudhsm#CloudHsmInternalException":      throw await de_CloudHsmInternalExceptionRes(parsedOutput, context);    case "CloudHsmServiceException":    case "com.amazonaws.cloudhsm#CloudHsmServiceException":      throw await de_CloudHsmServiceExceptionRes(parsedOutput, context);    case "InvalidRequestException":    case "com.amazonaws.cloudhsm#InvalidRequestException":      throw await de_InvalidRequestExceptionRes(parsedOutput, context);    default:      const parsedBody = parsedOutput.body;      return throwDefaultError({        output,        parsedBody,        errorCode      });  }}, "de_CommandError");var de_CloudHsmInternalExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const body = parsedOutput.body;  const deserialized = (0, import_smithy_client._json)(body);  const exception = new CloudHsmInternalException({    $metadata: deserializeMetadata(parsedOutput),    ...deserialized  });  return (0, import_smithy_client.decorateServiceException)(exception, body);}, "de_CloudHsmInternalExceptionRes");var de_CloudHsmServiceExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const body = parsedOutput.body;  const deserialized = (0, import_smithy_client._json)(body);  const exception = new CloudHsmServiceException({    $metadata: deserializeMetadata(parsedOutput),    ...deserialized  });  return (0, import_smithy_client.decorateServiceException)(exception, body);}, "de_CloudHsmServiceExceptionRes");var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const body = parsedOutput.body;  const deserialized = (0, import_smithy_client._json)(body);  const exception = new InvalidRequestException({    $metadata: deserializeMetadata(parsedOutput),    ...deserialized  });  return (0, import_smithy_client.decorateServiceException)(exception, body);}, "de_InvalidRequestExceptionRes");var deserializeMetadata = /* @__PURE__ */ __name((output) => ({  httpStatusCode: output.statusCode,  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],  extendedRequestId: output.headers["x-amz-id-2"],  cfId: output.headers["x-amz-cf-id"]}), "deserializeMetadata");var throwDefaultError = (0, import_smithy_client.withBaseException)(CloudHSMServiceException);var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();  const contents = {    protocol,    hostname,    port,    method: "POST",    path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,    headers  };  if (resolvedHostname !== void 0) {    contents.hostname = resolvedHostname;  }  if (body !== void 0) {    contents.body = body;  }  return new import_protocol_http.HttpRequest(contents);}, "buildHttpRpcRequest");function sharedHeaders(operation) {  return {    "content-type": "application/x-amz-json-1.1",    "x-amz-target": `CloudHsmFrontendService.${operation}`  };}__name(sharedHeaders, "sharedHeaders"); // src/commands/AddTagsToResourceCommand.tsvar AddTagsToResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "AddTagsToResource", {}).n("CloudHSMClient", "AddTagsToResourceCommand").f(void 0, void 0).ser(se_AddTagsToResourceCommand).de(de_AddTagsToResourceCommand).build() {  static {    __name(this, "AddTagsToResourceCommand");  }}; // src/commands/CreateHapgCommand.ts   var CreateHapgCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "CreateHapg", {}).n("CloudHSMClient", "CreateHapgCommand").f(void 0, void 0).ser(se_CreateHapgCommand).de(de_CreateHapgCommand).build() {  static {    __name(this, "CreateHapgCommand");  }}; // src/commands/CreateHsmCommand.ts   var CreateHsmCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "CreateHsm", {}).n("CloudHSMClient", "CreateHsmCommand").f(void 0, void 0).ser(se_CreateHsmCommand).de(de_CreateHsmCommand).build() {  static {    __name(this, "CreateHsmCommand");  }}; // src/commands/CreateLunaClientCommand.ts   var CreateLunaClientCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "CreateLunaClient", {}).n("CloudHSMClient", "CreateLunaClientCommand").f(void 0, void 0).ser(se_CreateLunaClientCommand).de(de_CreateLunaClientCommand).build() {  static {    __name(this, "CreateLunaClientCommand");  }}; // src/commands/DeleteHapgCommand.ts   var DeleteHapgCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "DeleteHapg", {}).n("CloudHSMClient", "DeleteHapgCommand").f(void 0, void 0).ser(se_DeleteHapgCommand).de(de_DeleteHapgCommand).build() {  static {    __name(this, "DeleteHapgCommand");  }}; // src/commands/DeleteHsmCommand.ts   var DeleteHsmCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "DeleteHsm", {}).n("CloudHSMClient", "DeleteHsmCommand").f(void 0, void 0).ser(se_DeleteHsmCommand).de(de_DeleteHsmCommand).build() {  static {    __name(this, "DeleteHsmCommand");  }}; // src/commands/DeleteLunaClientCommand.ts   var DeleteLunaClientCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "DeleteLunaClient", {}).n("CloudHSMClient", "DeleteLunaClientCommand").f(void 0, void 0).ser(se_DeleteLunaClientCommand).de(de_DeleteLunaClientCommand).build() {  static {    __name(this, "DeleteLunaClientCommand");  }}; // src/commands/DescribeHapgCommand.ts   var DescribeHapgCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "DescribeHapg", {}).n("CloudHSMClient", "DescribeHapgCommand").f(void 0, void 0).ser(se_DescribeHapgCommand).de(de_DescribeHapgCommand).build() {  static {    __name(this, "DescribeHapgCommand");  }}; // src/commands/DescribeHsmCommand.ts   var DescribeHsmCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "DescribeHsm", {}).n("CloudHSMClient", "DescribeHsmCommand").f(void 0, void 0).ser(se_DescribeHsmCommand).de(de_DescribeHsmCommand).build() {  static {    __name(this, "DescribeHsmCommand");  }}; // src/commands/DescribeLunaClientCommand.ts   var DescribeLunaClientCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "DescribeLunaClient", {}).n("CloudHSMClient", "DescribeLunaClientCommand").f(void 0, void 0).ser(se_DescribeLunaClientCommand).de(de_DescribeLunaClientCommand).build() {  static {    __name(this, "DescribeLunaClientCommand");  }}; // src/commands/GetConfigCommand.ts   var GetConfigCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "GetConfig", {}).n("CloudHSMClient", "GetConfigCommand").f(void 0, void 0).ser(se_GetConfigCommand).de(de_GetConfigCommand).build() {  static {    __name(this, "GetConfigCommand");  }}; // src/commands/ListAvailableZonesCommand.ts   var ListAvailableZonesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "ListAvailableZones", {}).n("CloudHSMClient", "ListAvailableZonesCommand").f(void 0, void 0).ser(se_ListAvailableZonesCommand).de(de_ListAvailableZonesCommand).build() {  static {    __name(this, "ListAvailableZonesCommand");  }}; // src/commands/ListHapgsCommand.ts   var ListHapgsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "ListHapgs", {}).n("CloudHSMClient", "ListHapgsCommand").f(void 0, void 0).ser(se_ListHapgsCommand).de(de_ListHapgsCommand).build() {  static {    __name(this, "ListHapgsCommand");  }}; // src/commands/ListHsmsCommand.ts   var ListHsmsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "ListHsms", {}).n("CloudHSMClient", "ListHsmsCommand").f(void 0, void 0).ser(se_ListHsmsCommand).de(de_ListHsmsCommand).build() {  static {    __name(this, "ListHsmsCommand");  }}; // src/commands/ListLunaClientsCommand.ts   var ListLunaClientsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "ListLunaClients", {}).n("CloudHSMClient", "ListLunaClientsCommand").f(void 0, void 0).ser(se_ListLunaClientsCommand).de(de_ListLunaClientsCommand).build() {  static {    __name(this, "ListLunaClientsCommand");  }}; // src/commands/ListTagsForResourceCommand.ts   var ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "ListTagsForResource", {}).n("CloudHSMClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {  static {    __name(this, "ListTagsForResourceCommand");  }}; // src/commands/ModifyHapgCommand.ts   var ModifyHapgCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "ModifyHapg", {}).n("CloudHSMClient", "ModifyHapgCommand").f(void 0, void 0).ser(se_ModifyHapgCommand).de(de_ModifyHapgCommand).build() {  static {    __name(this, "ModifyHapgCommand");  }}; // src/commands/ModifyHsmCommand.ts   var ModifyHsmCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "ModifyHsm", {}).n("CloudHSMClient", "ModifyHsmCommand").f(void 0, void 0).ser(se_ModifyHsmCommand).de(de_ModifyHsmCommand).build() {  static {    __name(this, "ModifyHsmCommand");  }}; // src/commands/ModifyLunaClientCommand.ts   var ModifyLunaClientCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "ModifyLunaClient", {}).n("CloudHSMClient", "ModifyLunaClientCommand").f(void 0, void 0).ser(se_ModifyLunaClientCommand).de(de_ModifyLunaClientCommand).build() {  static {    __name(this, "ModifyLunaClientCommand");  }}; // src/commands/RemoveTagsFromResourceCommand.ts   var RemoveTagsFromResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {  return [    (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),    (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())  ];}).s("CloudHsmFrontendService", "RemoveTagsFromResource", {}).n("CloudHSMClient", "RemoveTagsFromResourceCommand").f(void 0, void 0).ser(se_RemoveTagsFromResourceCommand).de(de_RemoveTagsFromResourceCommand).build() {  static {    __name(this, "RemoveTagsFromResourceCommand");  }}; // src/CloudHSM.tsvar commands = {  AddTagsToResourceCommand,  CreateHapgCommand,  CreateHsmCommand,  CreateLunaClientCommand,  DeleteHapgCommand,  DeleteHsmCommand,  DeleteLunaClientCommand,  DescribeHapgCommand,  DescribeHsmCommand,  DescribeLunaClientCommand,  GetConfigCommand,  ListAvailableZonesCommand,  ListHapgsCommand,  ListHsmsCommand,  ListLunaClientsCommand,  ListTagsForResourceCommand,  ModifyHapgCommand,  ModifyHsmCommand,  ModifyLunaClientCommand,  RemoveTagsFromResourceCommand};var CloudHSM = class extends CloudHSMClient {  static {    __name(this, "CloudHSM");  }};(0, import_smithy_client.createAggregatedClient)(commands, CloudHSM);// Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = {  CloudHSMServiceException,  __Client,  CloudHSMClient,  CloudHSM,  $Command,  AddTagsToResourceCommand,  CreateHapgCommand,  CreateHsmCommand,  CreateLunaClientCommand,  DeleteHapgCommand,  DeleteHsmCommand,  DeleteLunaClientCommand,  DescribeHapgCommand,  DescribeHsmCommand,  DescribeLunaClientCommand,  GetConfigCommand,  ListAvailableZonesCommand,  ListHapgsCommand,  ListHsmsCommand,  ListLunaClientsCommand,  ListTagsForResourceCommand,  ModifyHapgCommand,  ModifyHsmCommand,  ModifyLunaClientCommand,  RemoveTagsFromResourceCommand,  CloudHsmInternalException,  CloudHsmServiceException,  InvalidRequestException,  ClientVersion,  SubscriptionType,  CloudHsmObjectState,  HsmStatus});