@aws-sdk/client-marketplace-agreement 3.901.0 → 3.907.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist-cjs/index.js +620 -770
  2. package/package.json +6 -6
package/dist-cjs/index.js CHANGED
@@ -1,800 +1,650 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- AcceptedTerm: () => AcceptedTerm,
25
- AccessDeniedException: () => AccessDeniedException,
26
- AgreementStatus: () => AgreementStatus,
27
- DescribeAgreementCommand: () => DescribeAgreementCommand,
28
- GetAgreementTermsCommand: () => GetAgreementTermsCommand,
29
- InternalServerException: () => InternalServerException,
30
- MarketplaceAgreement: () => MarketplaceAgreement,
31
- MarketplaceAgreementClient: () => MarketplaceAgreementClient,
32
- MarketplaceAgreementServiceException: () => MarketplaceAgreementServiceException,
33
- ResourceNotFoundException: () => ResourceNotFoundException,
34
- ResourceType: () => ResourceType,
35
- SearchAgreementsCommand: () => SearchAgreementsCommand,
36
- SortOrder: () => SortOrder,
37
- ThrottlingException: () => ThrottlingException,
38
- ValidationException: () => ValidationException,
39
- ValidationExceptionReason: () => ValidationExceptionReason,
40
- __Client: () => import_smithy_client.Client,
41
- paginateGetAgreementTerms: () => paginateGetAgreementTerms,
42
- paginateSearchAgreements: () => paginateSearchAgreements
43
- });
44
- module.exports = __toCommonJS(index_exports);
45
-
46
- // src/MarketplaceAgreementClient.ts
47
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
48
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
49
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
50
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
51
- var import_config_resolver = require("@smithy/config-resolver");
52
- var import_core = require("@smithy/core");
53
- var import_middleware_content_length = require("@smithy/middleware-content-length");
54
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
55
- var import_middleware_retry = require("@smithy/middleware-retry");
56
-
57
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
58
-
59
- // src/endpoint/EndpointParameters.ts
60
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
61
- return Object.assign(options, {
62
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
63
- useFipsEndpoint: options.useFipsEndpoint ?? false,
64
- defaultSigningName: "aws-marketplace"
65
- });
66
- }, "resolveClientEndpointParameters");
67
- var commonParams = {
68
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
69
- Endpoint: { type: "builtInParams", name: "endpoint" },
70
- Region: { type: "builtInParams", name: "region" },
71
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
19
+
20
+ const resolveClientEndpointParameters = (options) => {
21
+ return Object.assign(options, {
22
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
23
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
24
+ defaultSigningName: "aws-marketplace",
25
+ });
26
+ };
27
+ const commonParams = {
28
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
29
+ Endpoint: { type: "builtInParams", name: "endpoint" },
30
+ Region: { type: "builtInParams", name: "region" },
31
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
72
32
  };
73
33
 
74
- // src/MarketplaceAgreementClient.ts
75
- var import_runtimeConfig = require("././runtimeConfig");
34
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
37
+ let _credentials = runtimeConfig.credentials;
38
+ return {
39
+ setHttpAuthScheme(httpAuthScheme) {
40
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
41
+ if (index === -1) {
42
+ _httpAuthSchemes.push(httpAuthScheme);
43
+ }
44
+ else {
45
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
46
+ }
47
+ },
48
+ httpAuthSchemes() {
49
+ return _httpAuthSchemes;
50
+ },
51
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
52
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
53
+ },
54
+ httpAuthSchemeProvider() {
55
+ return _httpAuthSchemeProvider;
56
+ },
57
+ setCredentials(credentials) {
58
+ _credentials = credentials;
59
+ },
60
+ credentials() {
61
+ return _credentials;
62
+ },
63
+ };
64
+ };
65
+ const resolveHttpAuthRuntimeConfig = (config) => {
66
+ return {
67
+ httpAuthSchemes: config.httpAuthSchemes(),
68
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
69
+ credentials: config.credentials(),
70
+ };
71
+ };
76
72
 
77
- // src/runtimeExtensions.ts
78
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
79
- var import_protocol_http = require("@smithy/protocol-http");
80
- var import_smithy_client = require("@smithy/smithy-client");
73
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
74
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
75
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
76
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
77
+ };
81
78
 
82
- // src/auth/httpAuthExtensionConfiguration.ts
83
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
84
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
85
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
86
- let _credentials = runtimeConfig.credentials;
87
- return {
88
- setHttpAuthScheme(httpAuthScheme) {
89
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
90
- if (index === -1) {
91
- _httpAuthSchemes.push(httpAuthScheme);
92
- } else {
93
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
94
- }
95
- },
96
- httpAuthSchemes() {
97
- return _httpAuthSchemes;
98
- },
99
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
100
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
101
- },
102
- httpAuthSchemeProvider() {
103
- return _httpAuthSchemeProvider;
104
- },
105
- setCredentials(credentials) {
106
- _credentials = credentials;
107
- },
108
- credentials() {
109
- return _credentials;
79
+ class MarketplaceAgreementClient extends smithyClient.Client {
80
+ config;
81
+ constructor(...[configuration]) {
82
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
83
+ super(_config_0);
84
+ this.initConfig = _config_0;
85
+ const _config_1 = resolveClientEndpointParameters(_config_0);
86
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
87
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
88
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
89
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
90
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
91
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
92
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
93
+ this.config = _config_8;
94
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
95
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
96
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
97
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
98
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
99
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
100
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
101
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultMarketplaceAgreementHttpAuthSchemeParametersProvider,
102
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
103
+ "aws.auth#sigv4": config.credentials,
104
+ }),
105
+ }));
106
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
107
+ }
108
+ destroy() {
109
+ super.destroy();
110
110
  }
111
- };
112
- }, "getHttpAuthExtensionConfiguration");
113
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
114
- return {
115
- httpAuthSchemes: config.httpAuthSchemes(),
116
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
117
- credentials: config.credentials()
118
- };
119
- }, "resolveHttpAuthRuntimeConfig");
111
+ }
120
112
 
121
- // src/runtimeExtensions.ts
122
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
123
- const extensionConfiguration = Object.assign(
124
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
125
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
126
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
127
- getHttpAuthExtensionConfiguration(runtimeConfig)
128
- );
129
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
130
- return Object.assign(
131
- runtimeConfig,
132
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
133
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
134
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
135
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
136
- );
137
- }, "resolveRuntimeExtensions");
113
+ class MarketplaceAgreementServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, MarketplaceAgreementServiceException.prototype);
117
+ }
118
+ }
138
119
 
139
- // src/MarketplaceAgreementClient.ts
140
- var MarketplaceAgreementClient = class extends import_smithy_client.Client {
141
- static {
142
- __name(this, "MarketplaceAgreementClient");
143
- }
144
- /**
145
- * The resolved configuration of MarketplaceAgreementClient class. This is resolved and normalized from the {@link MarketplaceAgreementClientConfig | constructor configuration interface}.
146
- */
147
- config;
148
- constructor(...[configuration]) {
149
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
150
- super(_config_0);
151
- this.initConfig = _config_0;
152
- const _config_1 = resolveClientEndpointParameters(_config_0);
153
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
154
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
155
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
156
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
157
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
158
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
159
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
160
- this.config = _config_8;
161
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
162
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
163
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
164
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
165
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
166
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
167
- this.middlewareStack.use(
168
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
169
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultMarketplaceAgreementHttpAuthSchemeParametersProvider,
170
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
171
- "aws.auth#sigv4": config.credentials
172
- }), "identityProviderConfigProvider")
173
- })
174
- );
175
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
176
- }
177
- /**
178
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
179
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
180
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
181
- */
182
- destroy() {
183
- super.destroy();
184
- }
120
+ exports.AcceptedTerm = void 0;
121
+ (function (AcceptedTerm) {
122
+ AcceptedTerm.visit = (value, visitor) => {
123
+ if (value.legalTerm !== undefined)
124
+ return visitor.legalTerm(value.legalTerm);
125
+ if (value.supportTerm !== undefined)
126
+ return visitor.supportTerm(value.supportTerm);
127
+ if (value.renewalTerm !== undefined)
128
+ return visitor.renewalTerm(value.renewalTerm);
129
+ if (value.usageBasedPricingTerm !== undefined)
130
+ return visitor.usageBasedPricingTerm(value.usageBasedPricingTerm);
131
+ if (value.configurableUpfrontPricingTerm !== undefined)
132
+ return visitor.configurableUpfrontPricingTerm(value.configurableUpfrontPricingTerm);
133
+ if (value.byolPricingTerm !== undefined)
134
+ return visitor.byolPricingTerm(value.byolPricingTerm);
135
+ if (value.recurringPaymentTerm !== undefined)
136
+ return visitor.recurringPaymentTerm(value.recurringPaymentTerm);
137
+ if (value.validityTerm !== undefined)
138
+ return visitor.validityTerm(value.validityTerm);
139
+ if (value.paymentScheduleTerm !== undefined)
140
+ return visitor.paymentScheduleTerm(value.paymentScheduleTerm);
141
+ if (value.freeTrialPricingTerm !== undefined)
142
+ return visitor.freeTrialPricingTerm(value.freeTrialPricingTerm);
143
+ if (value.fixedUpfrontPricingTerm !== undefined)
144
+ return visitor.fixedUpfrontPricingTerm(value.fixedUpfrontPricingTerm);
145
+ return visitor._(value.$unknown[0], value.$unknown[1]);
146
+ };
147
+ })(exports.AcceptedTerm || (exports.AcceptedTerm = {}));
148
+ class AccessDeniedException extends MarketplaceAgreementServiceException {
149
+ name = "AccessDeniedException";
150
+ $fault = "client";
151
+ requestId;
152
+ constructor(opts) {
153
+ super({
154
+ name: "AccessDeniedException",
155
+ $fault: "client",
156
+ ...opts,
157
+ });
158
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
159
+ this.requestId = opts.requestId;
160
+ }
161
+ }
162
+ const AgreementStatus = {
163
+ ACTIVE: "ACTIVE",
164
+ ARCHIVED: "ARCHIVED",
165
+ CANCELLED: "CANCELLED",
166
+ EXPIRED: "EXPIRED",
167
+ RENEWED: "RENEWED",
168
+ REPLACED: "REPLACED",
169
+ ROLLED_BACK: "ROLLED_BACK",
170
+ SUPERSEDED: "SUPERSEDED",
171
+ TERMINATED: "TERMINATED",
185
172
  };
186
-
187
- // src/MarketplaceAgreement.ts
188
-
189
-
190
- // src/commands/DescribeAgreementCommand.ts
191
-
192
- var import_middleware_serde = require("@smithy/middleware-serde");
193
-
194
-
195
- // src/protocols/Aws_json1_0.ts
196
- var import_core2 = require("@aws-sdk/core");
197
-
198
-
199
-
200
- // src/models/MarketplaceAgreementServiceException.ts
201
-
202
- var MarketplaceAgreementServiceException = class _MarketplaceAgreementServiceException extends import_smithy_client.ServiceException {
203
- static {
204
- __name(this, "MarketplaceAgreementServiceException");
205
- }
206
- /**
207
- * @internal
208
- */
209
- constructor(options) {
210
- super(options);
211
- Object.setPrototypeOf(this, _MarketplaceAgreementServiceException.prototype);
212
- }
173
+ class InternalServerException extends MarketplaceAgreementServiceException {
174
+ name = "InternalServerException";
175
+ $fault = "server";
176
+ requestId;
177
+ constructor(opts) {
178
+ super({
179
+ name: "InternalServerException",
180
+ $fault: "server",
181
+ ...opts,
182
+ });
183
+ Object.setPrototypeOf(this, InternalServerException.prototype);
184
+ this.requestId = opts.requestId;
185
+ }
186
+ }
187
+ const ResourceType = {
188
+ AGREEMENT: "Agreement",
189
+ };
190
+ class ResourceNotFoundException extends MarketplaceAgreementServiceException {
191
+ name = "ResourceNotFoundException";
192
+ $fault = "client";
193
+ requestId;
194
+ resourceId;
195
+ resourceType;
196
+ constructor(opts) {
197
+ super({
198
+ name: "ResourceNotFoundException",
199
+ $fault: "client",
200
+ ...opts,
201
+ });
202
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
203
+ this.requestId = opts.requestId;
204
+ this.resourceId = opts.resourceId;
205
+ this.resourceType = opts.resourceType;
206
+ }
207
+ }
208
+ class ThrottlingException extends MarketplaceAgreementServiceException {
209
+ name = "ThrottlingException";
210
+ $fault = "client";
211
+ requestId;
212
+ constructor(opts) {
213
+ super({
214
+ name: "ThrottlingException",
215
+ $fault: "client",
216
+ ...opts,
217
+ });
218
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
219
+ this.requestId = opts.requestId;
220
+ }
221
+ }
222
+ const ValidationExceptionReason = {
223
+ INVALID_AGREEMENT_ID: "INVALID_AGREEMENT_ID",
224
+ INVALID_CATALOG: "INVALID_CATALOG",
225
+ INVALID_FILTER_NAME: "INVALID_FILTER_NAME",
226
+ INVALID_FILTER_VALUES: "INVALID_FILTER_VALUES",
227
+ INVALID_MAX_RESULTS: "INVALID_MAX_RESULTS",
228
+ INVALID_NEXT_TOKEN: "INVALID_NEXT_TOKEN",
229
+ INVALID_SORT_BY: "INVALID_SORT_BY",
230
+ INVALID_SORT_ORDER: "INVALID_SORT_ORDER",
231
+ MISSING_AGREEMENT_ID: "MISSING_AGREEMENT_ID",
232
+ OTHER: "OTHER",
233
+ UNSUPPORTED_FILTERS: "UNSUPPORTED_FILTERS",
234
+ };
235
+ class ValidationException extends MarketplaceAgreementServiceException {
236
+ name = "ValidationException";
237
+ $fault = "client";
238
+ requestId;
239
+ reason;
240
+ fields;
241
+ constructor(opts) {
242
+ super({
243
+ name: "ValidationException",
244
+ $fault: "client",
245
+ ...opts,
246
+ });
247
+ Object.setPrototypeOf(this, ValidationException.prototype);
248
+ this.requestId = opts.requestId;
249
+ this.reason = opts.reason;
250
+ this.fields = opts.fields;
251
+ }
252
+ }
253
+ const SortOrder = {
254
+ ASCENDING: "ASCENDING",
255
+ DESCENDING: "DESCENDING",
213
256
  };
214
257
 
215
- // src/models/models_0.ts
216
- var AcceptedTerm;
217
- ((AcceptedTerm3) => {
218
- AcceptedTerm3.visit = /* @__PURE__ */ __name((value, visitor) => {
219
- if (value.legalTerm !== void 0) return visitor.legalTerm(value.legalTerm);
220
- if (value.supportTerm !== void 0) return visitor.supportTerm(value.supportTerm);
221
- if (value.renewalTerm !== void 0) return visitor.renewalTerm(value.renewalTerm);
222
- if (value.usageBasedPricingTerm !== void 0) return visitor.usageBasedPricingTerm(value.usageBasedPricingTerm);
223
- if (value.configurableUpfrontPricingTerm !== void 0)
224
- return visitor.configurableUpfrontPricingTerm(value.configurableUpfrontPricingTerm);
225
- if (value.byolPricingTerm !== void 0) return visitor.byolPricingTerm(value.byolPricingTerm);
226
- if (value.recurringPaymentTerm !== void 0) return visitor.recurringPaymentTerm(value.recurringPaymentTerm);
227
- if (value.validityTerm !== void 0) return visitor.validityTerm(value.validityTerm);
228
- if (value.paymentScheduleTerm !== void 0) return visitor.paymentScheduleTerm(value.paymentScheduleTerm);
229
- if (value.freeTrialPricingTerm !== void 0) return visitor.freeTrialPricingTerm(value.freeTrialPricingTerm);
230
- if (value.fixedUpfrontPricingTerm !== void 0)
231
- return visitor.fixedUpfrontPricingTerm(value.fixedUpfrontPricingTerm);
232
- return visitor._(value.$unknown[0], value.$unknown[1]);
233
- }, "visit");
234
- })(AcceptedTerm || (AcceptedTerm = {}));
235
- var AccessDeniedException = class _AccessDeniedException extends MarketplaceAgreementServiceException {
236
- static {
237
- __name(this, "AccessDeniedException");
238
- }
239
- name = "AccessDeniedException";
240
- $fault = "client";
241
- /**
242
- * <p>The unique identifier for the error.</p>
243
- * @public
244
- */
245
- requestId;
246
- /**
247
- * @internal
248
- */
249
- constructor(opts) {
250
- super({
251
- name: "AccessDeniedException",
252
- $fault: "client",
253
- ...opts
258
+ const se_DescribeAgreementCommand = async (input, context) => {
259
+ const headers = sharedHeaders("DescribeAgreement");
260
+ let body;
261
+ body = JSON.stringify(smithyClient._json(input));
262
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
263
+ };
264
+ const se_GetAgreementTermsCommand = async (input, context) => {
265
+ const headers = sharedHeaders("GetAgreementTerms");
266
+ let body;
267
+ body = JSON.stringify(smithyClient._json(input));
268
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
269
+ };
270
+ const se_SearchAgreementsCommand = async (input, context) => {
271
+ const headers = sharedHeaders("SearchAgreements");
272
+ let body;
273
+ body = JSON.stringify(smithyClient._json(input));
274
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
275
+ };
276
+ const de_DescribeAgreementCommand = async (output, context) => {
277
+ if (output.statusCode >= 300) {
278
+ return de_CommandError(output, context);
279
+ }
280
+ const data = await core$1.parseJsonBody(output.body, context);
281
+ let contents = {};
282
+ contents = de_DescribeAgreementOutput(data);
283
+ const response = {
284
+ $metadata: deserializeMetadata(output),
285
+ ...contents,
286
+ };
287
+ return response;
288
+ };
289
+ const de_GetAgreementTermsCommand = async (output, context) => {
290
+ if (output.statusCode >= 300) {
291
+ return de_CommandError(output, context);
292
+ }
293
+ const data = await core$1.parseJsonBody(output.body, context);
294
+ let contents = {};
295
+ contents = de_GetAgreementTermsOutput(data);
296
+ const response = {
297
+ $metadata: deserializeMetadata(output),
298
+ ...contents,
299
+ };
300
+ return response;
301
+ };
302
+ const de_SearchAgreementsCommand = async (output, context) => {
303
+ if (output.statusCode >= 300) {
304
+ return de_CommandError(output, context);
305
+ }
306
+ const data = await core$1.parseJsonBody(output.body, context);
307
+ let contents = {};
308
+ contents = de_SearchAgreementsOutput(data);
309
+ const response = {
310
+ $metadata: deserializeMetadata(output),
311
+ ...contents,
312
+ };
313
+ return response;
314
+ };
315
+ const de_CommandError = async (output, context) => {
316
+ const parsedOutput = {
317
+ ...output,
318
+ body: await core$1.parseJsonErrorBody(output.body, context),
319
+ };
320
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
321
+ switch (errorCode) {
322
+ case "AccessDeniedException":
323
+ case "com.amazonaws.marketplaceagreement#AccessDeniedException":
324
+ throw await de_AccessDeniedExceptionRes(parsedOutput);
325
+ case "InternalServerException":
326
+ case "com.amazonaws.marketplaceagreement#InternalServerException":
327
+ throw await de_InternalServerExceptionRes(parsedOutput);
328
+ case "ResourceNotFoundException":
329
+ case "com.amazonaws.marketplaceagreement#ResourceNotFoundException":
330
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
331
+ case "ThrottlingException":
332
+ case "com.amazonaws.marketplaceagreement#ThrottlingException":
333
+ throw await de_ThrottlingExceptionRes(parsedOutput);
334
+ case "ValidationException":
335
+ case "com.amazonaws.marketplaceagreement#ValidationException":
336
+ throw await de_ValidationExceptionRes(parsedOutput);
337
+ default:
338
+ const parsedBody = parsedOutput.body;
339
+ return throwDefaultError({
340
+ output,
341
+ parsedBody,
342
+ errorCode,
343
+ });
344
+ }
345
+ };
346
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
347
+ const body = parsedOutput.body;
348
+ const deserialized = smithyClient._json(body);
349
+ const exception = new AccessDeniedException({
350
+ $metadata: deserializeMetadata(parsedOutput),
351
+ ...deserialized,
352
+ });
353
+ return smithyClient.decorateServiceException(exception, body);
354
+ };
355
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
356
+ const body = parsedOutput.body;
357
+ const deserialized = smithyClient._json(body);
358
+ const exception = new InternalServerException({
359
+ $metadata: deserializeMetadata(parsedOutput),
360
+ ...deserialized,
361
+ });
362
+ return smithyClient.decorateServiceException(exception, body);
363
+ };
364
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
365
+ const body = parsedOutput.body;
366
+ const deserialized = smithyClient._json(body);
367
+ const exception = new ResourceNotFoundException({
368
+ $metadata: deserializeMetadata(parsedOutput),
369
+ ...deserialized,
370
+ });
371
+ return smithyClient.decorateServiceException(exception, body);
372
+ };
373
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
374
+ const body = parsedOutput.body;
375
+ const deserialized = smithyClient._json(body);
376
+ const exception = new ThrottlingException({
377
+ $metadata: deserializeMetadata(parsedOutput),
378
+ ...deserialized,
379
+ });
380
+ return smithyClient.decorateServiceException(exception, body);
381
+ };
382
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
383
+ const body = parsedOutput.body;
384
+ const deserialized = smithyClient._json(body);
385
+ const exception = new ValidationException({
386
+ $metadata: deserializeMetadata(parsedOutput),
387
+ ...deserialized,
388
+ });
389
+ return smithyClient.decorateServiceException(exception, body);
390
+ };
391
+ const de_AcceptedTerm = (output, context) => {
392
+ if (output.byolPricingTerm != null) {
393
+ return {
394
+ byolPricingTerm: smithyClient._json(output.byolPricingTerm),
395
+ };
396
+ }
397
+ if (output.configurableUpfrontPricingTerm != null) {
398
+ return {
399
+ configurableUpfrontPricingTerm: smithyClient._json(output.configurableUpfrontPricingTerm),
400
+ };
401
+ }
402
+ if (output.fixedUpfrontPricingTerm != null) {
403
+ return {
404
+ fixedUpfrontPricingTerm: smithyClient._json(output.fixedUpfrontPricingTerm),
405
+ };
406
+ }
407
+ if (output.freeTrialPricingTerm != null) {
408
+ return {
409
+ freeTrialPricingTerm: smithyClient._json(output.freeTrialPricingTerm),
410
+ };
411
+ }
412
+ if (output.legalTerm != null) {
413
+ return {
414
+ legalTerm: smithyClient._json(output.legalTerm),
415
+ };
416
+ }
417
+ if (output.paymentScheduleTerm != null) {
418
+ return {
419
+ paymentScheduleTerm: de_PaymentScheduleTerm(output.paymentScheduleTerm),
420
+ };
421
+ }
422
+ if (output.recurringPaymentTerm != null) {
423
+ return {
424
+ recurringPaymentTerm: smithyClient._json(output.recurringPaymentTerm),
425
+ };
426
+ }
427
+ if (output.renewalTerm != null) {
428
+ return {
429
+ renewalTerm: smithyClient._json(output.renewalTerm),
430
+ };
431
+ }
432
+ if (output.supportTerm != null) {
433
+ return {
434
+ supportTerm: smithyClient._json(output.supportTerm),
435
+ };
436
+ }
437
+ if (output.usageBasedPricingTerm != null) {
438
+ return {
439
+ usageBasedPricingTerm: smithyClient._json(output.usageBasedPricingTerm),
440
+ };
441
+ }
442
+ if (output.validityTerm != null) {
443
+ return {
444
+ validityTerm: de_ValidityTerm(output.validityTerm),
445
+ };
446
+ }
447
+ return { $unknown: Object.entries(output)[0] };
448
+ };
449
+ const de_AcceptedTermList = (output, context) => {
450
+ const retVal = (output || [])
451
+ .filter((e) => e != null)
452
+ .map((entry) => {
453
+ return de_AcceptedTerm(core$1.awsExpectUnion(entry));
254
454
  });
255
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
256
- this.requestId = opts.requestId;
257
- }
258
- };
259
- var AgreementStatus = {
260
- ACTIVE: "ACTIVE",
261
- ARCHIVED: "ARCHIVED",
262
- CANCELLED: "CANCELLED",
263
- EXPIRED: "EXPIRED",
264
- RENEWED: "RENEWED",
265
- REPLACED: "REPLACED",
266
- ROLLED_BACK: "ROLLED_BACK",
267
- SUPERSEDED: "SUPERSEDED",
268
- TERMINATED: "TERMINATED"
269
- };
270
- var InternalServerException = class _InternalServerException extends MarketplaceAgreementServiceException {
271
- static {
272
- __name(this, "InternalServerException");
273
- }
274
- name = "InternalServerException";
275
- $fault = "server";
276
- /**
277
- * <p>The unique identifier for the error.</p>
278
- * @public
279
- */
280
- requestId;
281
- /**
282
- * @internal
283
- */
284
- constructor(opts) {
285
- super({
286
- name: "InternalServerException",
287
- $fault: "server",
288
- ...opts
455
+ return retVal;
456
+ };
457
+ const de_AgreementViewSummary = (output, context) => {
458
+ return smithyClient.take(output, {
459
+ acceptanceTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
460
+ acceptor: smithyClient._json,
461
+ agreementId: smithyClient.expectString,
462
+ agreementType: smithyClient.expectString,
463
+ endTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
464
+ proposalSummary: smithyClient._json,
465
+ proposer: smithyClient._json,
466
+ startTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
467
+ status: smithyClient.expectString,
289
468
  });
290
- Object.setPrototypeOf(this, _InternalServerException.prototype);
291
- this.requestId = opts.requestId;
292
- }
293
- };
294
- var ResourceType = {
295
- AGREEMENT: "Agreement"
296
- };
297
- var ResourceNotFoundException = class _ResourceNotFoundException extends MarketplaceAgreementServiceException {
298
- static {
299
- __name(this, "ResourceNotFoundException");
300
- }
301
- name = "ResourceNotFoundException";
302
- $fault = "client";
303
- /**
304
- * <p>The unique identifier for the error.</p>
305
- * @public
306
- */
307
- requestId;
308
- /**
309
- * <p>The unique identifier for the resource.</p>
310
- * @public
311
- */
312
- resourceId;
313
- /**
314
- * <p>The type of resource.</p>
315
- * @public
316
- */
317
- resourceType;
318
- /**
319
- * @internal
320
- */
321
- constructor(opts) {
322
- super({
323
- name: "ResourceNotFoundException",
324
- $fault: "client",
325
- ...opts
469
+ };
470
+ const de_AgreementViewSummaryList = (output, context) => {
471
+ const retVal = (output || [])
472
+ .filter((e) => e != null)
473
+ .map((entry) => {
474
+ return de_AgreementViewSummary(entry);
326
475
  });
327
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
328
- this.requestId = opts.requestId;
329
- this.resourceId = opts.resourceId;
330
- this.resourceType = opts.resourceType;
331
- }
332
- };
333
- var ThrottlingException = class _ThrottlingException extends MarketplaceAgreementServiceException {
334
- static {
335
- __name(this, "ThrottlingException");
336
- }
337
- name = "ThrottlingException";
338
- $fault = "client";
339
- /**
340
- * <p>The unique identifier for the error.</p>
341
- * @public
342
- */
343
- requestId;
344
- /**
345
- * @internal
346
- */
347
- constructor(opts) {
348
- super({
349
- name: "ThrottlingException",
350
- $fault: "client",
351
- ...opts
476
+ return retVal;
477
+ };
478
+ const de_DescribeAgreementOutput = (output, context) => {
479
+ return smithyClient.take(output, {
480
+ acceptanceTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
481
+ acceptor: smithyClient._json,
482
+ agreementId: smithyClient.expectString,
483
+ agreementType: smithyClient.expectString,
484
+ endTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
485
+ estimatedCharges: smithyClient._json,
486
+ proposalSummary: smithyClient._json,
487
+ proposer: smithyClient._json,
488
+ startTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
489
+ status: smithyClient.expectString,
352
490
  });
353
- Object.setPrototypeOf(this, _ThrottlingException.prototype);
354
- this.requestId = opts.requestId;
355
- }
356
- };
357
- var ValidationExceptionReason = {
358
- INVALID_AGREEMENT_ID: "INVALID_AGREEMENT_ID",
359
- INVALID_CATALOG: "INVALID_CATALOG",
360
- INVALID_FILTER_NAME: "INVALID_FILTER_NAME",
361
- INVALID_FILTER_VALUES: "INVALID_FILTER_VALUES",
362
- INVALID_MAX_RESULTS: "INVALID_MAX_RESULTS",
363
- INVALID_NEXT_TOKEN: "INVALID_NEXT_TOKEN",
364
- INVALID_SORT_BY: "INVALID_SORT_BY",
365
- INVALID_SORT_ORDER: "INVALID_SORT_ORDER",
366
- MISSING_AGREEMENT_ID: "MISSING_AGREEMENT_ID",
367
- OTHER: "OTHER",
368
- UNSUPPORTED_FILTERS: "UNSUPPORTED_FILTERS"
369
- };
370
- var ValidationException = class _ValidationException extends MarketplaceAgreementServiceException {
371
- static {
372
- __name(this, "ValidationException");
373
- }
374
- name = "ValidationException";
375
- $fault = "client";
376
- /**
377
- * <p>The unique identifier associated with the error.</p>
378
- * @public
379
- */
380
- requestId;
381
- /**
382
- * <p>The reason associated with the error.</p>
383
- * @public
384
- */
385
- reason;
386
- /**
387
- * <p>The fields associated with the error.</p>
388
- * @public
389
- */
390
- fields;
391
- /**
392
- * @internal
393
- */
394
- constructor(opts) {
395
- super({
396
- name: "ValidationException",
397
- $fault: "client",
398
- ...opts
491
+ };
492
+ const de_GetAgreementTermsOutput = (output, context) => {
493
+ return smithyClient.take(output, {
494
+ acceptedTerms: (_) => de_AcceptedTermList(_),
495
+ nextToken: smithyClient.expectString,
399
496
  });
400
- Object.setPrototypeOf(this, _ValidationException.prototype);
401
- this.requestId = opts.requestId;
402
- this.reason = opts.reason;
403
- this.fields = opts.fields;
404
- }
405
497
  };
406
- var SortOrder = {
407
- ASCENDING: "ASCENDING",
408
- DESCENDING: "DESCENDING"
498
+ const de_PaymentScheduleTerm = (output, context) => {
499
+ return smithyClient.take(output, {
500
+ currencyCode: smithyClient.expectString,
501
+ schedule: (_) => de_ScheduleList(_),
502
+ type: smithyClient.expectString,
503
+ });
409
504
  };
410
-
411
- // src/protocols/Aws_json1_0.ts
412
- var se_DescribeAgreementCommand = /* @__PURE__ */ __name(async (input, context) => {
413
- const headers = sharedHeaders("DescribeAgreement");
414
- let body;
415
- body = JSON.stringify((0, import_smithy_client._json)(input));
416
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
417
- }, "se_DescribeAgreementCommand");
418
- var se_GetAgreementTermsCommand = /* @__PURE__ */ __name(async (input, context) => {
419
- const headers = sharedHeaders("GetAgreementTerms");
420
- let body;
421
- body = JSON.stringify((0, import_smithy_client._json)(input));
422
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
423
- }, "se_GetAgreementTermsCommand");
424
- var se_SearchAgreementsCommand = /* @__PURE__ */ __name(async (input, context) => {
425
- const headers = sharedHeaders("SearchAgreements");
426
- let body;
427
- body = JSON.stringify((0, import_smithy_client._json)(input));
428
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
429
- }, "se_SearchAgreementsCommand");
430
- var de_DescribeAgreementCommand = /* @__PURE__ */ __name(async (output, context) => {
431
- if (output.statusCode >= 300) {
432
- return de_CommandError(output, context);
433
- }
434
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
435
- let contents = {};
436
- contents = de_DescribeAgreementOutput(data, context);
437
- const response = {
438
- $metadata: deserializeMetadata(output),
439
- ...contents
440
- };
441
- return response;
442
- }, "de_DescribeAgreementCommand");
443
- var de_GetAgreementTermsCommand = /* @__PURE__ */ __name(async (output, context) => {
444
- if (output.statusCode >= 300) {
445
- return de_CommandError(output, context);
446
- }
447
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
448
- let contents = {};
449
- contents = de_GetAgreementTermsOutput(data, context);
450
- const response = {
451
- $metadata: deserializeMetadata(output),
452
- ...contents
453
- };
454
- return response;
455
- }, "de_GetAgreementTermsCommand");
456
- var de_SearchAgreementsCommand = /* @__PURE__ */ __name(async (output, context) => {
457
- if (output.statusCode >= 300) {
458
- return de_CommandError(output, context);
459
- }
460
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
461
- let contents = {};
462
- contents = de_SearchAgreementsOutput(data, context);
463
- const response = {
464
- $metadata: deserializeMetadata(output),
465
- ...contents
466
- };
467
- return response;
468
- }, "de_SearchAgreementsCommand");
469
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
470
- const parsedOutput = {
471
- ...output,
472
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
473
- };
474
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
475
- switch (errorCode) {
476
- case "AccessDeniedException":
477
- case "com.amazonaws.marketplaceagreement#AccessDeniedException":
478
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
479
- case "InternalServerException":
480
- case "com.amazonaws.marketplaceagreement#InternalServerException":
481
- throw await de_InternalServerExceptionRes(parsedOutput, context);
482
- case "ResourceNotFoundException":
483
- case "com.amazonaws.marketplaceagreement#ResourceNotFoundException":
484
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
485
- case "ThrottlingException":
486
- case "com.amazonaws.marketplaceagreement#ThrottlingException":
487
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
488
- case "ValidationException":
489
- case "com.amazonaws.marketplaceagreement#ValidationException":
490
- throw await de_ValidationExceptionRes(parsedOutput, context);
491
- default:
492
- const parsedBody = parsedOutput.body;
493
- return throwDefaultError({
494
- output,
495
- parsedBody,
496
- errorCode
497
- });
498
- }
499
- }, "de_CommandError");
500
- var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
501
- const body = parsedOutput.body;
502
- const deserialized = (0, import_smithy_client._json)(body);
503
- const exception = new AccessDeniedException({
504
- $metadata: deserializeMetadata(parsedOutput),
505
- ...deserialized
506
- });
507
- return (0, import_smithy_client.decorateServiceException)(exception, body);
508
- }, "de_AccessDeniedExceptionRes");
509
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
510
- const body = parsedOutput.body;
511
- const deserialized = (0, import_smithy_client._json)(body);
512
- const exception = new InternalServerException({
513
- $metadata: deserializeMetadata(parsedOutput),
514
- ...deserialized
515
- });
516
- return (0, import_smithy_client.decorateServiceException)(exception, body);
517
- }, "de_InternalServerExceptionRes");
518
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
519
- const body = parsedOutput.body;
520
- const deserialized = (0, import_smithy_client._json)(body);
521
- const exception = new ResourceNotFoundException({
522
- $metadata: deserializeMetadata(parsedOutput),
523
- ...deserialized
524
- });
525
- return (0, import_smithy_client.decorateServiceException)(exception, body);
526
- }, "de_ResourceNotFoundExceptionRes");
527
- var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
528
- const body = parsedOutput.body;
529
- const deserialized = (0, import_smithy_client._json)(body);
530
- const exception = new ThrottlingException({
531
- $metadata: deserializeMetadata(parsedOutput),
532
- ...deserialized
533
- });
534
- return (0, import_smithy_client.decorateServiceException)(exception, body);
535
- }, "de_ThrottlingExceptionRes");
536
- var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
537
- const body = parsedOutput.body;
538
- const deserialized = (0, import_smithy_client._json)(body);
539
- const exception = new ValidationException({
540
- $metadata: deserializeMetadata(parsedOutput),
541
- ...deserialized
542
- });
543
- return (0, import_smithy_client.decorateServiceException)(exception, body);
544
- }, "de_ValidationExceptionRes");
545
- var de_AcceptedTerm = /* @__PURE__ */ __name((output, context) => {
546
- if (output.byolPricingTerm != null) {
547
- return {
548
- byolPricingTerm: (0, import_smithy_client._json)(output.byolPricingTerm)
549
- };
550
- }
551
- if (output.configurableUpfrontPricingTerm != null) {
552
- return {
553
- configurableUpfrontPricingTerm: (0, import_smithy_client._json)(output.configurableUpfrontPricingTerm)
554
- };
555
- }
556
- if (output.fixedUpfrontPricingTerm != null) {
557
- return {
558
- fixedUpfrontPricingTerm: (0, import_smithy_client._json)(output.fixedUpfrontPricingTerm)
559
- };
560
- }
561
- if (output.freeTrialPricingTerm != null) {
562
- return {
563
- freeTrialPricingTerm: (0, import_smithy_client._json)(output.freeTrialPricingTerm)
564
- };
565
- }
566
- if (output.legalTerm != null) {
567
- return {
568
- legalTerm: (0, import_smithy_client._json)(output.legalTerm)
569
- };
570
- }
571
- if (output.paymentScheduleTerm != null) {
572
- return {
573
- paymentScheduleTerm: de_PaymentScheduleTerm(output.paymentScheduleTerm, context)
574
- };
575
- }
576
- if (output.recurringPaymentTerm != null) {
577
- return {
578
- recurringPaymentTerm: (0, import_smithy_client._json)(output.recurringPaymentTerm)
579
- };
580
- }
581
- if (output.renewalTerm != null) {
582
- return {
583
- renewalTerm: (0, import_smithy_client._json)(output.renewalTerm)
584
- };
585
- }
586
- if (output.supportTerm != null) {
587
- return {
588
- supportTerm: (0, import_smithy_client._json)(output.supportTerm)
589
- };
590
- }
591
- if (output.usageBasedPricingTerm != null) {
592
- return {
593
- usageBasedPricingTerm: (0, import_smithy_client._json)(output.usageBasedPricingTerm)
505
+ const de_ScheduleItem = (output, context) => {
506
+ return smithyClient.take(output, {
507
+ chargeAmount: smithyClient.expectString,
508
+ chargeDate: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
509
+ });
510
+ };
511
+ const de_ScheduleList = (output, context) => {
512
+ const retVal = (output || [])
513
+ .filter((e) => e != null)
514
+ .map((entry) => {
515
+ return de_ScheduleItem(entry);
516
+ });
517
+ return retVal;
518
+ };
519
+ const de_SearchAgreementsOutput = (output, context) => {
520
+ return smithyClient.take(output, {
521
+ agreementViewSummaries: (_) => de_AgreementViewSummaryList(_),
522
+ nextToken: smithyClient.expectString,
523
+ });
524
+ };
525
+ const de_ValidityTerm = (output, context) => {
526
+ return smithyClient.take(output, {
527
+ agreementDuration: smithyClient.expectString,
528
+ agreementEndDate: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
529
+ agreementStartDate: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
530
+ type: smithyClient.expectString,
531
+ });
532
+ };
533
+ const deserializeMetadata = (output) => ({
534
+ httpStatusCode: output.statusCode,
535
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
536
+ extendedRequestId: output.headers["x-amz-id-2"],
537
+ cfId: output.headers["x-amz-cf-id"],
538
+ });
539
+ const throwDefaultError = smithyClient.withBaseException(MarketplaceAgreementServiceException);
540
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
541
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
542
+ const contents = {
543
+ protocol,
544
+ hostname,
545
+ port,
546
+ method: "POST",
547
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
548
+ headers,
594
549
  };
595
- }
596
- if (output.validityTerm != null) {
550
+ if (body !== undefined) {
551
+ contents.body = body;
552
+ }
553
+ return new protocolHttp.HttpRequest(contents);
554
+ };
555
+ function sharedHeaders(operation) {
597
556
  return {
598
- validityTerm: de_ValidityTerm(output.validityTerm, context)
557
+ "content-type": "application/x-amz-json-1.0",
558
+ "x-amz-target": `AWSMPCommerceService_v20200301.${operation}`,
599
559
  };
600
- }
601
- return { $unknown: Object.entries(output)[0] };
602
- }, "de_AcceptedTerm");
603
- var de_AcceptedTermList = /* @__PURE__ */ __name((output, context) => {
604
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
605
- return de_AcceptedTerm((0, import_core2.awsExpectUnion)(entry), context);
606
- });
607
- return retVal;
608
- }, "de_AcceptedTermList");
609
- var de_AgreementViewSummary = /* @__PURE__ */ __name((output, context) => {
610
- return (0, import_smithy_client.take)(output, {
611
- acceptanceTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "acceptanceTime"),
612
- acceptor: import_smithy_client._json,
613
- agreementId: import_smithy_client.expectString,
614
- agreementType: import_smithy_client.expectString,
615
- endTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "endTime"),
616
- proposalSummary: import_smithy_client._json,
617
- proposer: import_smithy_client._json,
618
- startTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startTime"),
619
- status: import_smithy_client.expectString
620
- });
621
- }, "de_AgreementViewSummary");
622
- var de_AgreementViewSummaryList = /* @__PURE__ */ __name((output, context) => {
623
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
624
- return de_AgreementViewSummary(entry, context);
625
- });
626
- return retVal;
627
- }, "de_AgreementViewSummaryList");
628
- var de_DescribeAgreementOutput = /* @__PURE__ */ __name((output, context) => {
629
- return (0, import_smithy_client.take)(output, {
630
- acceptanceTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "acceptanceTime"),
631
- acceptor: import_smithy_client._json,
632
- agreementId: import_smithy_client.expectString,
633
- agreementType: import_smithy_client.expectString,
634
- endTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "endTime"),
635
- estimatedCharges: import_smithy_client._json,
636
- proposalSummary: import_smithy_client._json,
637
- proposer: import_smithy_client._json,
638
- startTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startTime"),
639
- status: import_smithy_client.expectString
640
- });
641
- }, "de_DescribeAgreementOutput");
642
- var de_GetAgreementTermsOutput = /* @__PURE__ */ __name((output, context) => {
643
- return (0, import_smithy_client.take)(output, {
644
- acceptedTerms: /* @__PURE__ */ __name((_) => de_AcceptedTermList(_, context), "acceptedTerms"),
645
- nextToken: import_smithy_client.expectString
646
- });
647
- }, "de_GetAgreementTermsOutput");
648
- var de_PaymentScheduleTerm = /* @__PURE__ */ __name((output, context) => {
649
- return (0, import_smithy_client.take)(output, {
650
- currencyCode: import_smithy_client.expectString,
651
- schedule: /* @__PURE__ */ __name((_) => de_ScheduleList(_, context), "schedule"),
652
- type: import_smithy_client.expectString
653
- });
654
- }, "de_PaymentScheduleTerm");
655
- var de_ScheduleItem = /* @__PURE__ */ __name((output, context) => {
656
- return (0, import_smithy_client.take)(output, {
657
- chargeAmount: import_smithy_client.expectString,
658
- chargeDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "chargeDate")
659
- });
660
- }, "de_ScheduleItem");
661
- var de_ScheduleList = /* @__PURE__ */ __name((output, context) => {
662
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
663
- return de_ScheduleItem(entry, context);
664
- });
665
- return retVal;
666
- }, "de_ScheduleList");
667
- var de_SearchAgreementsOutput = /* @__PURE__ */ __name((output, context) => {
668
- return (0, import_smithy_client.take)(output, {
669
- agreementViewSummaries: /* @__PURE__ */ __name((_) => de_AgreementViewSummaryList(_, context), "agreementViewSummaries"),
670
- nextToken: import_smithy_client.expectString
671
- });
672
- }, "de_SearchAgreementsOutput");
673
- var de_ValidityTerm = /* @__PURE__ */ __name((output, context) => {
674
- return (0, import_smithy_client.take)(output, {
675
- agreementDuration: import_smithy_client.expectString,
676
- agreementEndDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "agreementEndDate"),
677
- agreementStartDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "agreementStartDate"),
678
- type: import_smithy_client.expectString
679
- });
680
- }, "de_ValidityTerm");
681
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
682
- httpStatusCode: output.statusCode,
683
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
684
- extendedRequestId: output.headers["x-amz-id-2"],
685
- cfId: output.headers["x-amz-cf-id"]
686
- }), "deserializeMetadata");
687
- var throwDefaultError = (0, import_smithy_client.withBaseException)(MarketplaceAgreementServiceException);
688
- var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
689
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
690
- const contents = {
691
- protocol,
692
- hostname,
693
- port,
694
- method: "POST",
695
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
696
- headers
697
- };
698
- if (resolvedHostname !== void 0) {
699
- contents.hostname = resolvedHostname;
700
- }
701
- if (body !== void 0) {
702
- contents.body = body;
703
- }
704
- return new import_protocol_http.HttpRequest(contents);
705
- }, "buildHttpRpcRequest");
706
- function sharedHeaders(operation) {
707
- return {
708
- "content-type": "application/x-amz-json-1.0",
709
- "x-amz-target": `AWSMPCommerceService_v20200301.${operation}`
710
- };
711
560
  }
712
- __name(sharedHeaders, "sharedHeaders");
713
561
 
714
- // src/commands/DescribeAgreementCommand.ts
715
- var DescribeAgreementCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
716
- return [
717
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
718
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
719
- ];
720
- }).s("AWSMPCommerceService_v20200301", "DescribeAgreement", {}).n("MarketplaceAgreementClient", "DescribeAgreementCommand").f(void 0, void 0).ser(se_DescribeAgreementCommand).de(de_DescribeAgreementCommand).build() {
721
- static {
722
- __name(this, "DescribeAgreementCommand");
723
- }
724
- };
725
-
726
- // src/commands/GetAgreementTermsCommand.ts
727
-
728
-
729
-
730
- var GetAgreementTermsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
731
- return [
732
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
733
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
734
- ];
735
- }).s("AWSMPCommerceService_v20200301", "GetAgreementTerms", {}).n("MarketplaceAgreementClient", "GetAgreementTermsCommand").f(void 0, void 0).ser(se_GetAgreementTermsCommand).de(de_GetAgreementTermsCommand).build() {
736
- static {
737
- __name(this, "GetAgreementTermsCommand");
738
- }
739
- };
740
-
741
- // src/commands/SearchAgreementsCommand.ts
562
+ class DescribeAgreementCommand extends smithyClient.Command
563
+ .classBuilder()
564
+ .ep(commonParams)
565
+ .m(function (Command, cs, config, o) {
566
+ return [
567
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
568
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
569
+ ];
570
+ })
571
+ .s("AWSMPCommerceService_v20200301", "DescribeAgreement", {})
572
+ .n("MarketplaceAgreementClient", "DescribeAgreementCommand")
573
+ .f(void 0, void 0)
574
+ .ser(se_DescribeAgreementCommand)
575
+ .de(de_DescribeAgreementCommand)
576
+ .build() {
577
+ }
742
578
 
579
+ class GetAgreementTermsCommand extends smithyClient.Command
580
+ .classBuilder()
581
+ .ep(commonParams)
582
+ .m(function (Command, cs, config, o) {
583
+ return [
584
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
585
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
586
+ ];
587
+ })
588
+ .s("AWSMPCommerceService_v20200301", "GetAgreementTerms", {})
589
+ .n("MarketplaceAgreementClient", "GetAgreementTermsCommand")
590
+ .f(void 0, void 0)
591
+ .ser(se_GetAgreementTermsCommand)
592
+ .de(de_GetAgreementTermsCommand)
593
+ .build() {
594
+ }
743
595
 
596
+ class SearchAgreementsCommand extends smithyClient.Command
597
+ .classBuilder()
598
+ .ep(commonParams)
599
+ .m(function (Command, cs, config, o) {
600
+ return [
601
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
602
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
603
+ ];
604
+ })
605
+ .s("AWSMPCommerceService_v20200301", "SearchAgreements", {})
606
+ .n("MarketplaceAgreementClient", "SearchAgreementsCommand")
607
+ .f(void 0, void 0)
608
+ .ser(se_SearchAgreementsCommand)
609
+ .de(de_SearchAgreementsCommand)
610
+ .build() {
611
+ }
744
612
 
745
- var SearchAgreementsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
746
- return [
747
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
748
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
749
- ];
750
- }).s("AWSMPCommerceService_v20200301", "SearchAgreements", {}).n("MarketplaceAgreementClient", "SearchAgreementsCommand").f(void 0, void 0).ser(se_SearchAgreementsCommand).de(de_SearchAgreementsCommand).build() {
751
- static {
752
- __name(this, "SearchAgreementsCommand");
753
- }
613
+ const commands = {
614
+ DescribeAgreementCommand,
615
+ GetAgreementTermsCommand,
616
+ SearchAgreementsCommand,
754
617
  };
618
+ class MarketplaceAgreement extends MarketplaceAgreementClient {
619
+ }
620
+ smithyClient.createAggregatedClient(commands, MarketplaceAgreement);
755
621
 
756
- // src/MarketplaceAgreement.ts
757
- var commands = {
758
- DescribeAgreementCommand,
759
- GetAgreementTermsCommand,
760
- SearchAgreementsCommand
761
- };
762
- var MarketplaceAgreement = class extends MarketplaceAgreementClient {
763
- static {
764
- __name(this, "MarketplaceAgreement");
765
- }
766
- };
767
- (0, import_smithy_client.createAggregatedClient)(commands, MarketplaceAgreement);
768
-
769
- // src/pagination/GetAgreementTermsPaginator.ts
770
-
771
- var paginateGetAgreementTerms = (0, import_core.createPaginator)(MarketplaceAgreementClient, GetAgreementTermsCommand, "nextToken", "nextToken", "maxResults");
772
-
773
- // src/pagination/SearchAgreementsPaginator.ts
622
+ const paginateGetAgreementTerms = core.createPaginator(MarketplaceAgreementClient, GetAgreementTermsCommand, "nextToken", "nextToken", "maxResults");
774
623
 
775
- var paginateSearchAgreements = (0, import_core.createPaginator)(MarketplaceAgreementClient, SearchAgreementsCommand, "nextToken", "nextToken", "maxResults");
776
- // Annotate the CommonJS export names for ESM import in node:
624
+ const paginateSearchAgreements = core.createPaginator(MarketplaceAgreementClient, SearchAgreementsCommand, "nextToken", "nextToken", "maxResults");
777
625
 
778
- 0 && (module.exports = {
779
- MarketplaceAgreementServiceException,
780
- __Client,
781
- MarketplaceAgreementClient,
782
- MarketplaceAgreement,
783
- $Command,
784
- DescribeAgreementCommand,
785
- GetAgreementTermsCommand,
786
- SearchAgreementsCommand,
787
- paginateGetAgreementTerms,
788
- paginateSearchAgreements,
789
- AcceptedTerm,
790
- AccessDeniedException,
791
- AgreementStatus,
792
- InternalServerException,
793
- ResourceType,
794
- ResourceNotFoundException,
795
- ThrottlingException,
796
- ValidationExceptionReason,
797
- ValidationException,
798
- SortOrder
626
+ Object.defineProperty(exports, "$Command", {
627
+ enumerable: true,
628
+ get: function () { return smithyClient.Command; }
799
629
  });
800
-
630
+ Object.defineProperty(exports, "__Client", {
631
+ enumerable: true,
632
+ get: function () { return smithyClient.Client; }
633
+ });
634
+ exports.AccessDeniedException = AccessDeniedException;
635
+ exports.AgreementStatus = AgreementStatus;
636
+ exports.DescribeAgreementCommand = DescribeAgreementCommand;
637
+ exports.GetAgreementTermsCommand = GetAgreementTermsCommand;
638
+ exports.InternalServerException = InternalServerException;
639
+ exports.MarketplaceAgreement = MarketplaceAgreement;
640
+ exports.MarketplaceAgreementClient = MarketplaceAgreementClient;
641
+ exports.MarketplaceAgreementServiceException = MarketplaceAgreementServiceException;
642
+ exports.ResourceNotFoundException = ResourceNotFoundException;
643
+ exports.ResourceType = ResourceType;
644
+ exports.SearchAgreementsCommand = SearchAgreementsCommand;
645
+ exports.SortOrder = SortOrder;
646
+ exports.ThrottlingException = ThrottlingException;
647
+ exports.ValidationException = ValidationException;
648
+ exports.ValidationExceptionReason = ValidationExceptionReason;
649
+ exports.paginateGetAgreementTerms = paginateGetAgreementTerms;
650
+ exports.paginateSearchAgreements = paginateSearchAgreements;