File Explorer

/var/runtime/node_modules/@aws-sdk/client-savingsplans/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.js39.3 KB · 1000 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, {  CreateSavingsPlanCommand: () => CreateSavingsPlanCommand,  CurrencyCode: () => CurrencyCode,  DeleteQueuedSavingsPlanCommand: () => DeleteQueuedSavingsPlanCommand,  DescribeSavingsPlanRatesCommand: () => DescribeSavingsPlanRatesCommand,  DescribeSavingsPlansCommand: () => DescribeSavingsPlansCommand,  DescribeSavingsPlansOfferingRatesCommand: () => DescribeSavingsPlansOfferingRatesCommand,  DescribeSavingsPlansOfferingsCommand: () => DescribeSavingsPlansOfferingsCommand,  InternalServerException: () => InternalServerException,  ListTagsForResourceCommand: () => ListTagsForResourceCommand,  ResourceNotFoundException: () => ResourceNotFoundException,  ReturnSavingsPlanCommand: () => ReturnSavingsPlanCommand,  SavingsPlanOfferingFilterAttribute: () => SavingsPlanOfferingFilterAttribute,  SavingsPlanOfferingPropertyKey: () => SavingsPlanOfferingPropertyKey,  SavingsPlanPaymentOption: () => SavingsPlanPaymentOption,  SavingsPlanProductType: () => SavingsPlanProductType,  SavingsPlanRateFilterAttribute: () => SavingsPlanRateFilterAttribute,  SavingsPlanRateFilterName: () => SavingsPlanRateFilterName,  SavingsPlanRatePropertyKey: () => SavingsPlanRatePropertyKey,  SavingsPlanRateServiceCode: () => SavingsPlanRateServiceCode,  SavingsPlanRateUnit: () => SavingsPlanRateUnit,  SavingsPlanState: () => SavingsPlanState,  SavingsPlanType: () => SavingsPlanType,  SavingsPlansFilterName: () => SavingsPlansFilterName,  Savingsplans: () => Savingsplans,  SavingsplansClient: () => SavingsplansClient,  SavingsplansServiceException: () => SavingsplansServiceException,  ServiceQuotaExceededException: () => ServiceQuotaExceededException,  TagResourceCommand: () => TagResourceCommand,  UntagResourceCommand: () => UntagResourceCommand,  ValidationException: () => ValidationException,  __Client: () => import_smithy_client.Client});module.exports = __toCommonJS(index_exports); // src/SavingsplansClient.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: "savingsplans"  });}, "resolveClientEndpointParameters");var commonParams = {  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },  Endpoint: { type: "builtInParams", name: "endpoint" },  Region: { type: "builtInParams", name: "region" },  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }}; // src/SavingsplansClient.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/SavingsplansClient.tsvar SavingsplansClient = class extends import_smithy_client.Client {  static {    __name(this, "SavingsplansClient");  }  /**   * The resolved configuration of SavingsplansClient class. This is resolved and normalized from the {@link SavingsplansClientConfig | 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.defaultSavingsplansHttpAuthSchemeParametersProvider,        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/Savingsplans.ts  // src/commands/CreateSavingsPlanCommand.ts var import_middleware_serde = require("@smithy/middleware-serde");  // src/protocols/Aws_restJson1.tsvar import_core2 = require("@aws-sdk/core");  var import_uuid = require("uuid"); // src/models/SavingsplansServiceException.ts var SavingsplansServiceException = class _SavingsplansServiceException extends import_smithy_client.ServiceException {  static {    __name(this, "SavingsplansServiceException");  }  /**   * @internal   */  constructor(options) {    super(options);    Object.setPrototypeOf(this, _SavingsplansServiceException.prototype);  }}; // src/models/models_0.tsvar InternalServerException = class _InternalServerException extends SavingsplansServiceException {  static {    __name(this, "InternalServerException");  }  name = "InternalServerException";  $fault = "server";  /**   * @internal   */  constructor(opts) {    super({      name: "InternalServerException",      $fault: "server",      ...opts    });    Object.setPrototypeOf(this, _InternalServerException.prototype);  }};var ResourceNotFoundException = class _ResourceNotFoundException extends SavingsplansServiceException {  static {    __name(this, "ResourceNotFoundException");  }  name = "ResourceNotFoundException";  $fault = "client";  /**   * @internal   */  constructor(opts) {    super({      name: "ResourceNotFoundException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);  }};var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends SavingsplansServiceException {  static {    __name(this, "ServiceQuotaExceededException");  }  name = "ServiceQuotaExceededException";  $fault = "client";  /**   * @internal   */  constructor(opts) {    super({      name: "ServiceQuotaExceededException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);  }};var ValidationException = class _ValidationException extends SavingsplansServiceException {  static {    __name(this, "ValidationException");  }  name = "ValidationException";  $fault = "client";  /**   * @internal   */  constructor(opts) {    super({      name: "ValidationException",      $fault: "client",      ...opts    });    Object.setPrototypeOf(this, _ValidationException.prototype);  }};var SavingsPlanRateFilterName = {  INSTANCE_TYPE: "instanceType",  OPERATION: "operation",  PRODUCT_DESCRIPTION: "productDescription",  PRODUCT_TYPE: "productType",  REGION: "region",  SERVICE_CODE: "serviceCode",  TENANCY: "tenancy",  USAGE_TYPE: "usageType"};var CurrencyCode = {  CNY: "CNY",  USD: "USD"};var SavingsPlanProductType = {  EC2: "EC2",  FARGATE: "Fargate",  LAMBDA: "Lambda",  SAGEMAKER: "SageMaker"};var SavingsPlanRatePropertyKey = {  INSTANCE_FAMILY: "instanceFamily",  INSTANCE_TYPE: "instanceType",  PRODUCT_DESCRIPTION: "productDescription",  REGION: "region",  TENANCY: "tenancy"};var SavingsPlanRateServiceCode = {  EC2: "AmazonEC2",  FARGATE: "AmazonECS",  FARGATE_EKS: "AmazonEKS",  LAMBDA: "AWSLambda",  SAGEMAKER: "AmazonSageMaker"};var SavingsPlanRateUnit = {  HOURS: "Hrs",  LAMBDA_GB_SECOND: "Lambda-GB-Second",  REQUEST: "Request"};var SavingsPlansFilterName = {  COMMITMENT: "commitment",  EC2_INSTANCE_FAMILY: "ec2-instance-family",  END: "end",  PAYMENT_OPTION: "payment-option",  REGION: "region",  SAVINGS_PLAN_TYPE: "savings-plan-type",  START: "start",  TERM: "term",  UPFRONT: "upfront"};var SavingsPlanState = {  ACTIVE: "active",  PAYMENT_FAILED: "payment-failed",  PAYMENT_PENDING: "payment-pending",  PENDING_RETURN: "pending-return",  QUEUED: "queued",  QUEUED_DELETED: "queued-deleted",  RETIRED: "retired",  RETURNED: "returned"};var SavingsPlanPaymentOption = {  ALL_UPFRONT: "All Upfront",  NO_UPFRONT: "No Upfront",  PARTIAL_UPFRONT: "Partial Upfront"};var SavingsPlanType = {  COMPUTE: "Compute",  EC2_INSTANCE: "EC2Instance",  SAGEMAKER: "SageMaker"};var SavingsPlanRateFilterAttribute = {  INSTANCE_FAMILY: "instanceFamily",  INSTANCE_TYPE: "instanceType",  PRODUCT_DESCRIPTION: "productDescription",  PRODUCT_ID: "productId",  REGION: "region",  TENANCY: "tenancy"};var SavingsPlanOfferingFilterAttribute = {  instanceFamily: "instanceFamily",  region: "region"};var SavingsPlanOfferingPropertyKey = {  INSTANCE_FAMILY: "instanceFamily",  REGION: "region"}; // src/protocols/Aws_restJson1.tsvar se_CreateSavingsPlanCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/CreateSavingsPlan");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],      commitment: [],      purchaseTime: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "purchaseTime"),      savingsPlanOfferingId: [],      tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tags"),      upfrontPaymentAmount: []    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_CreateSavingsPlanCommand");var se_DeleteQueuedSavingsPlanCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/DeleteQueuedSavingsPlan");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      savingsPlanId: []    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_DeleteQueuedSavingsPlanCommand");var se_DescribeSavingsPlanRatesCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/DescribeSavingsPlanRates");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      filters: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "filters"),      maxResults: [],      nextToken: [],      savingsPlanId: []    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_DescribeSavingsPlanRatesCommand");var se_DescribeSavingsPlansCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/DescribeSavingsPlans");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      filters: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "filters"),      maxResults: [],      nextToken: [],      savingsPlanArns: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "savingsPlanArns"),      savingsPlanIds: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "savingsPlanIds"),      states: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "states")    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_DescribeSavingsPlansCommand");var se_DescribeSavingsPlansOfferingRatesCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/DescribeSavingsPlansOfferingRates");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      filters: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "filters"),      maxResults: [],      nextToken: [],      operations: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "operations"),      products: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "products"),      savingsPlanOfferingIds: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "savingsPlanOfferingIds"),      savingsPlanPaymentOptions: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "savingsPlanPaymentOptions"),      savingsPlanTypes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "savingsPlanTypes"),      serviceCodes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "serviceCodes"),      usageTypes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "usageTypes")    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_DescribeSavingsPlansOfferingRatesCommand");var se_DescribeSavingsPlansOfferingsCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/DescribeSavingsPlansOfferings");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      currencies: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "currencies"),      descriptions: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "descriptions"),      durations: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "durations"),      filters: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "filters"),      maxResults: [],      nextToken: [],      offeringIds: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "offeringIds"),      operations: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "operations"),      paymentOptions: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "paymentOptions"),      planTypes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "planTypes"),      productType: [],      serviceCodes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "serviceCodes"),      usageTypes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "usageTypes")    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_DescribeSavingsPlansOfferingsCommand");var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/ListTagsForResource");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      resourceArn: []    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_ListTagsForResourceCommand");var se_ReturnSavingsPlanCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/ReturnSavingsPlan");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],      savingsPlanId: []    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_ReturnSavingsPlanCommand");var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/TagResource");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      resourceArn: [],      tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tags")    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_TagResourceCommand");var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {  const b = (0, import_core.requestBuilder)(input, context);  const headers = {    "content-type": "application/json"  };  b.bp("/UntagResource");  let body;  body = JSON.stringify(    (0, import_smithy_client.take)(input, {      resourceArn: [],      tagKeys: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tagKeys")    })  );  b.m("POST").h(headers).b(body);  return b.build();}, "se_UntagResourceCommand");var de_CreateSavingsPlanCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    savingsPlanId: import_smithy_client.expectString  });  Object.assign(contents, doc);  return contents;}, "de_CreateSavingsPlanCommand");var de_DeleteQueuedSavingsPlanCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  await (0, import_smithy_client.collectBody)(output.body, context);  return contents;}, "de_DeleteQueuedSavingsPlanCommand");var de_DescribeSavingsPlanRatesCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    nextToken: import_smithy_client.expectString,    savingsPlanId: import_smithy_client.expectString,    searchResults: import_smithy_client._json  });  Object.assign(contents, doc);  return contents;}, "de_DescribeSavingsPlanRatesCommand");var de_DescribeSavingsPlansCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    nextToken: import_smithy_client.expectString,    savingsPlans: import_smithy_client._json  });  Object.assign(contents, doc);  return contents;}, "de_DescribeSavingsPlansCommand");var de_DescribeSavingsPlansOfferingRatesCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    nextToken: import_smithy_client.expectString,    searchResults: import_smithy_client._json  });  Object.assign(contents, doc);  return contents;}, "de_DescribeSavingsPlansOfferingRatesCommand");var de_DescribeSavingsPlansOfferingsCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    nextToken: import_smithy_client.expectString,    searchResults: import_smithy_client._json  });  Object.assign(contents, doc);  return contents;}, "de_DescribeSavingsPlansOfferingsCommand");var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    tags: import_smithy_client._json  });  Object.assign(contents, doc);  return contents;}, "de_ListTagsForResourceCommand");var de_ReturnSavingsPlanCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");  const doc = (0, import_smithy_client.take)(data, {    savingsPlanId: import_smithy_client.expectString  });  Object.assign(contents, doc);  return contents;}, "de_ReturnSavingsPlanCommand");var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  await (0, import_smithy_client.collectBody)(output.body, context);  return contents;}, "de_TagResourceCommand");var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {  if (output.statusCode !== 200 && output.statusCode >= 300) {    return de_CommandError(output, context);  }  const contents = (0, import_smithy_client.map)({    $metadata: deserializeMetadata(output)  });  await (0, import_smithy_client.collectBody)(output.body, context);  return contents;}, "de_UntagResourceCommand");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 "InternalServerException":    case "com.amazonaws.savingsplans#InternalServerException":      throw await de_InternalServerExceptionRes(parsedOutput, context);    case "ResourceNotFoundException":    case "com.amazonaws.savingsplans#ResourceNotFoundException":      throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);    case "ServiceQuotaExceededException":    case "com.amazonaws.savingsplans#ServiceQuotaExceededException":      throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);    case "ValidationException":    case "com.amazonaws.savingsplans#ValidationException":      throw await de_ValidationExceptionRes(parsedOutput, context);    default:      const parsedBody = parsedOutput.body;      return throwDefaultError({        output,        parsedBody,        errorCode      });  }}, "de_CommandError");var throwDefaultError = (0, import_smithy_client.withBaseException)(SavingsplansServiceException);var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new InternalServerException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_InternalServerExceptionRes");var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ResourceNotFoundException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ResourceNotFoundExceptionRes");var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ServiceQuotaExceededException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ServiceQuotaExceededExceptionRes");var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {  const contents = (0, import_smithy_client.map)({});  const data = parsedOutput.body;  const doc = (0, import_smithy_client.take)(data, {    message: import_smithy_client.expectString  });  Object.assign(contents, doc);  const exception = new ValidationException({    $metadata: deserializeMetadata(parsedOutput),    ...contents  });  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);}, "de_ValidationExceptionRes");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"); // src/commands/CreateSavingsPlanCommand.tsvar CreateSavingsPlanCommand = 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("AWSSavingsPlan", "CreateSavingsPlan", {}).n("SavingsplansClient", "CreateSavingsPlanCommand").f(void 0, void 0).ser(se_CreateSavingsPlanCommand).de(de_CreateSavingsPlanCommand).build() {  static {    __name(this, "CreateSavingsPlanCommand");  }}; // src/commands/DeleteQueuedSavingsPlanCommand.ts   var DeleteQueuedSavingsPlanCommand = 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("AWSSavingsPlan", "DeleteQueuedSavingsPlan", {}).n("SavingsplansClient", "DeleteQueuedSavingsPlanCommand").f(void 0, void 0).ser(se_DeleteQueuedSavingsPlanCommand).de(de_DeleteQueuedSavingsPlanCommand).build() {  static {    __name(this, "DeleteQueuedSavingsPlanCommand");  }}; // src/commands/DescribeSavingsPlanRatesCommand.ts   var DescribeSavingsPlanRatesCommand = 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("AWSSavingsPlan", "DescribeSavingsPlanRates", {}).n("SavingsplansClient", "DescribeSavingsPlanRatesCommand").f(void 0, void 0).ser(se_DescribeSavingsPlanRatesCommand).de(de_DescribeSavingsPlanRatesCommand).build() {  static {    __name(this, "DescribeSavingsPlanRatesCommand");  }}; // src/commands/DescribeSavingsPlansCommand.ts   var DescribeSavingsPlansCommand = 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("AWSSavingsPlan", "DescribeSavingsPlans", {}).n("SavingsplansClient", "DescribeSavingsPlansCommand").f(void 0, void 0).ser(se_DescribeSavingsPlansCommand).de(de_DescribeSavingsPlansCommand).build() {  static {    __name(this, "DescribeSavingsPlansCommand");  }}; // src/commands/DescribeSavingsPlansOfferingRatesCommand.ts   var DescribeSavingsPlansOfferingRatesCommand = 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("AWSSavingsPlan", "DescribeSavingsPlansOfferingRates", {}).n("SavingsplansClient", "DescribeSavingsPlansOfferingRatesCommand").f(void 0, void 0).ser(se_DescribeSavingsPlansOfferingRatesCommand).de(de_DescribeSavingsPlansOfferingRatesCommand).build() {  static {    __name(this, "DescribeSavingsPlansOfferingRatesCommand");  }}; // src/commands/DescribeSavingsPlansOfferingsCommand.ts   var DescribeSavingsPlansOfferingsCommand = 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("AWSSavingsPlan", "DescribeSavingsPlansOfferings", {}).n("SavingsplansClient", "DescribeSavingsPlansOfferingsCommand").f(void 0, void 0).ser(se_DescribeSavingsPlansOfferingsCommand).de(de_DescribeSavingsPlansOfferingsCommand).build() {  static {    __name(this, "DescribeSavingsPlansOfferingsCommand");  }}; // 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("AWSSavingsPlan", "ListTagsForResource", {}).n("SavingsplansClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {  static {    __name(this, "ListTagsForResourceCommand");  }}; // src/commands/ReturnSavingsPlanCommand.ts   var ReturnSavingsPlanCommand = 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("AWSSavingsPlan", "ReturnSavingsPlan", {}).n("SavingsplansClient", "ReturnSavingsPlanCommand").f(void 0, void 0).ser(se_ReturnSavingsPlanCommand).de(de_ReturnSavingsPlanCommand).build() {  static {    __name(this, "ReturnSavingsPlanCommand");  }}; // src/commands/TagResourceCommand.ts   var TagResourceCommand = 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("AWSSavingsPlan", "TagResource", {}).n("SavingsplansClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {  static {    __name(this, "TagResourceCommand");  }}; // src/commands/UntagResourceCommand.ts   var UntagResourceCommand = 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("AWSSavingsPlan", "UntagResource", {}).n("SavingsplansClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {  static {    __name(this, "UntagResourceCommand");  }}; // src/Savingsplans.tsvar commands = {  CreateSavingsPlanCommand,  DeleteQueuedSavingsPlanCommand,  DescribeSavingsPlanRatesCommand,  DescribeSavingsPlansCommand,  DescribeSavingsPlansOfferingRatesCommand,  DescribeSavingsPlansOfferingsCommand,  ListTagsForResourceCommand,  ReturnSavingsPlanCommand,  TagResourceCommand,  UntagResourceCommand};var Savingsplans = class extends SavingsplansClient {  static {    __name(this, "Savingsplans");  }};(0, import_smithy_client.createAggregatedClient)(commands, Savingsplans);// Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = {  SavingsplansServiceException,  __Client,  SavingsplansClient,  Savingsplans,  $Command,  CreateSavingsPlanCommand,  DeleteQueuedSavingsPlanCommand,  DescribeSavingsPlanRatesCommand,  DescribeSavingsPlansCommand,  DescribeSavingsPlansOfferingRatesCommand,  DescribeSavingsPlansOfferingsCommand,  ListTagsForResourceCommand,  ReturnSavingsPlanCommand,  TagResourceCommand,  UntagResourceCommand,  InternalServerException,  ResourceNotFoundException,  ServiceQuotaExceededException,  ValidationException,  SavingsPlanRateFilterName,  CurrencyCode,  SavingsPlanProductType,  SavingsPlanRatePropertyKey,  SavingsPlanRateServiceCode,  SavingsPlanRateUnit,  SavingsPlansFilterName,  SavingsPlanState,  SavingsPlanPaymentOption,  SavingsPlanType,  SavingsPlanRateFilterAttribute,  SavingsPlanOfferingFilterAttribute,  SavingsPlanOfferingPropertyKey});