@aws-sdk/client-artifact 3.899.0 → 3.906.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 +813 -1011
  2. package/package.json +37 -37
package/dist-cjs/index.js CHANGED
@@ -1,1057 +1,859 @@
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 });
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: "artifact",
25
+ });
10
26
  };
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;
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" },
18
32
  };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- AcceptanceType: () => AcceptanceType,
25
- AccessDeniedException: () => AccessDeniedException,
26
- AgreementType: () => AgreementType,
27
- Artifact: () => Artifact,
28
- ArtifactClient: () => ArtifactClient,
29
- ArtifactServiceException: () => ArtifactServiceException,
30
- ConflictException: () => ConflictException,
31
- CustomerAgreementState: () => CustomerAgreementState,
32
- GetAccountSettingsCommand: () => GetAccountSettingsCommand,
33
- GetReportCommand: () => GetReportCommand,
34
- GetReportMetadataCommand: () => GetReportMetadataCommand,
35
- GetTermForReportCommand: () => GetTermForReportCommand,
36
- InternalServerException: () => InternalServerException,
37
- ListCustomerAgreementsCommand: () => ListCustomerAgreementsCommand,
38
- ListReportsCommand: () => ListReportsCommand,
39
- NotificationSubscriptionStatus: () => NotificationSubscriptionStatus,
40
- PublishedState: () => PublishedState,
41
- PutAccountSettingsCommand: () => PutAccountSettingsCommand,
42
- ResourceNotFoundException: () => ResourceNotFoundException,
43
- ServiceQuotaExceededException: () => ServiceQuotaExceededException,
44
- ThrottlingException: () => ThrottlingException,
45
- UploadState: () => UploadState,
46
- ValidationException: () => ValidationException,
47
- ValidationExceptionReason: () => ValidationExceptionReason,
48
- __Client: () => import_smithy_client.Client,
49
- paginateListCustomerAgreements: () => paginateListCustomerAgreements,
50
- paginateListReports: () => paginateListReports
51
- });
52
- module.exports = __toCommonJS(index_exports);
53
-
54
- // src/ArtifactClient.ts
55
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
56
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
57
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
58
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
59
- var import_config_resolver = require("@smithy/config-resolver");
60
- var import_core = require("@smithy/core");
61
- var import_middleware_content_length = require("@smithy/middleware-content-length");
62
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
63
- var import_middleware_retry = require("@smithy/middleware-retry");
64
33
 
65
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
66
-
67
- // src/endpoint/EndpointParameters.ts
68
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
69
- return Object.assign(options, {
70
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
71
- useFipsEndpoint: options.useFipsEndpoint ?? false,
72
- defaultSigningName: "artifact"
73
- });
74
- }, "resolveClientEndpointParameters");
75
- var commonParams = {
76
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
77
- Endpoint: { type: "builtInParams", name: "endpoint" },
78
- Region: { type: "builtInParams", name: "region" },
79
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
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
+ };
80
71
  };
81
72
 
82
- // src/ArtifactClient.ts
83
- var import_runtimeConfig = require("././runtimeConfig");
84
-
85
- // src/runtimeExtensions.ts
86
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
87
- var import_protocol_http = require("@smithy/protocol-http");
88
- 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
+ };
89
78
 
90
- // src/auth/httpAuthExtensionConfiguration.ts
91
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
92
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
93
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
94
- let _credentials = runtimeConfig.credentials;
95
- return {
96
- setHttpAuthScheme(httpAuthScheme) {
97
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
98
- if (index === -1) {
99
- _httpAuthSchemes.push(httpAuthScheme);
100
- } else {
101
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
102
- }
103
- },
104
- httpAuthSchemes() {
105
- return _httpAuthSchemes;
106
- },
107
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
108
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
109
- },
110
- httpAuthSchemeProvider() {
111
- return _httpAuthSchemeProvider;
112
- },
113
- setCredentials(credentials) {
114
- _credentials = credentials;
115
- },
116
- credentials() {
117
- return _credentials;
79
+ class ArtifactClient 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.defaultArtifactHttpAuthSchemeParametersProvider,
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();
118
110
  }
119
- };
120
- }, "getHttpAuthExtensionConfiguration");
121
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
122
- return {
123
- httpAuthSchemes: config.httpAuthSchemes(),
124
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
125
- credentials: config.credentials()
126
- };
127
- }, "resolveHttpAuthRuntimeConfig");
111
+ }
128
112
 
129
- // src/runtimeExtensions.ts
130
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
131
- const extensionConfiguration = Object.assign(
132
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
133
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
134
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
135
- getHttpAuthExtensionConfiguration(runtimeConfig)
136
- );
137
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
138
- return Object.assign(
139
- runtimeConfig,
140
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
141
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
142
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
143
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
144
- );
145
- }, "resolveRuntimeExtensions");
113
+ class ArtifactServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, ArtifactServiceException.prototype);
117
+ }
118
+ }
146
119
 
147
- // src/ArtifactClient.ts
148
- var ArtifactClient = class extends import_smithy_client.Client {
149
- static {
150
- __name(this, "ArtifactClient");
151
- }
152
- /**
153
- * The resolved configuration of ArtifactClient class. This is resolved and normalized from the {@link ArtifactClientConfig | constructor configuration interface}.
154
- */
155
- config;
156
- constructor(...[configuration]) {
157
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
158
- super(_config_0);
159
- this.initConfig = _config_0;
160
- const _config_1 = resolveClientEndpointParameters(_config_0);
161
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
162
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
163
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
164
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
165
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
166
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
167
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
168
- this.config = _config_8;
169
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
170
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
171
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
172
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
173
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
174
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
175
- this.middlewareStack.use(
176
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
177
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultArtifactHttpAuthSchemeParametersProvider,
178
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
179
- "aws.auth#sigv4": config.credentials
180
- }), "identityProviderConfigProvider")
181
- })
182
- );
183
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
184
- }
185
- /**
186
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
187
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
188
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
189
- */
190
- destroy() {
191
- super.destroy();
192
- }
120
+ const AcceptanceType = {
121
+ EXPLICIT: "EXPLICIT",
122
+ PASSTHROUGH: "PASSTHROUGH",
193
123
  };
194
-
195
- // src/Artifact.ts
196
-
197
-
198
- // src/commands/GetAccountSettingsCommand.ts
199
-
200
- var import_middleware_serde = require("@smithy/middleware-serde");
201
-
202
-
203
- // src/protocols/Aws_restJson1.ts
204
- var import_core2 = require("@aws-sdk/core");
205
-
206
-
207
-
208
- // src/models/ArtifactServiceException.ts
209
-
210
- var ArtifactServiceException = class _ArtifactServiceException extends import_smithy_client.ServiceException {
211
- static {
212
- __name(this, "ArtifactServiceException");
213
- }
214
- /**
215
- * @internal
216
- */
217
- constructor(options) {
218
- super(options);
219
- Object.setPrototypeOf(this, _ArtifactServiceException.prototype);
220
- }
124
+ class AccessDeniedException extends ArtifactServiceException {
125
+ name = "AccessDeniedException";
126
+ $fault = "client";
127
+ constructor(opts) {
128
+ super({
129
+ name: "AccessDeniedException",
130
+ $fault: "client",
131
+ ...opts,
132
+ });
133
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
134
+ }
135
+ }
136
+ const NotificationSubscriptionStatus = {
137
+ NOT_SUBSCRIBED: "NOT_SUBSCRIBED",
138
+ SUBSCRIBED: "SUBSCRIBED",
139
+ };
140
+ class ConflictException extends ArtifactServiceException {
141
+ name = "ConflictException";
142
+ $fault = "client";
143
+ resourceId;
144
+ resourceType;
145
+ constructor(opts) {
146
+ super({
147
+ name: "ConflictException",
148
+ $fault: "client",
149
+ ...opts,
150
+ });
151
+ Object.setPrototypeOf(this, ConflictException.prototype);
152
+ this.resourceId = opts.resourceId;
153
+ this.resourceType = opts.resourceType;
154
+ }
155
+ }
156
+ class InternalServerException extends ArtifactServiceException {
157
+ name = "InternalServerException";
158
+ $fault = "server";
159
+ $retryable = {};
160
+ retryAfterSeconds;
161
+ constructor(opts) {
162
+ super({
163
+ name: "InternalServerException",
164
+ $fault: "server",
165
+ ...opts,
166
+ });
167
+ Object.setPrototypeOf(this, InternalServerException.prototype);
168
+ this.retryAfterSeconds = opts.retryAfterSeconds;
169
+ }
170
+ }
171
+ class ResourceNotFoundException extends ArtifactServiceException {
172
+ name = "ResourceNotFoundException";
173
+ $fault = "client";
174
+ resourceId;
175
+ resourceType;
176
+ constructor(opts) {
177
+ super({
178
+ name: "ResourceNotFoundException",
179
+ $fault: "client",
180
+ ...opts,
181
+ });
182
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
183
+ this.resourceId = opts.resourceId;
184
+ this.resourceType = opts.resourceType;
185
+ }
186
+ }
187
+ class ServiceQuotaExceededException extends ArtifactServiceException {
188
+ name = "ServiceQuotaExceededException";
189
+ $fault = "client";
190
+ resourceId;
191
+ resourceType;
192
+ serviceCode;
193
+ quotaCode;
194
+ constructor(opts) {
195
+ super({
196
+ name: "ServiceQuotaExceededException",
197
+ $fault: "client",
198
+ ...opts,
199
+ });
200
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
201
+ this.resourceId = opts.resourceId;
202
+ this.resourceType = opts.resourceType;
203
+ this.serviceCode = opts.serviceCode;
204
+ this.quotaCode = opts.quotaCode;
205
+ }
206
+ }
207
+ class ThrottlingException extends ArtifactServiceException {
208
+ name = "ThrottlingException";
209
+ $fault = "client";
210
+ $retryable = {
211
+ throttling: true,
212
+ };
213
+ serviceCode;
214
+ quotaCode;
215
+ retryAfterSeconds;
216
+ constructor(opts) {
217
+ super({
218
+ name: "ThrottlingException",
219
+ $fault: "client",
220
+ ...opts,
221
+ });
222
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
223
+ this.serviceCode = opts.serviceCode;
224
+ this.quotaCode = opts.quotaCode;
225
+ this.retryAfterSeconds = opts.retryAfterSeconds;
226
+ }
227
+ }
228
+ const ValidationExceptionReason = {
229
+ CANNOT_PARSE: "cannotParse",
230
+ FIELD_VALIDATION_FAILED: "fieldValidationFailed",
231
+ INVALID_TOKEN: "invalidToken",
232
+ OTHER: "other",
233
+ UNKNOWN_OPERATION: "unknownOperation",
234
+ };
235
+ class ValidationException extends ArtifactServiceException {
236
+ name = "ValidationException";
237
+ $fault = "client";
238
+ reason;
239
+ fieldList;
240
+ constructor(opts) {
241
+ super({
242
+ name: "ValidationException",
243
+ $fault: "client",
244
+ ...opts,
245
+ });
246
+ Object.setPrototypeOf(this, ValidationException.prototype);
247
+ this.reason = opts.reason;
248
+ this.fieldList = opts.fieldList;
249
+ }
250
+ }
251
+ const AgreementType = {
252
+ CUSTOM: "CUSTOM",
253
+ DEFAULT: "DEFAULT",
254
+ MODIFIED: "MODIFIED",
255
+ };
256
+ const CustomerAgreementState = {
257
+ ACTIVE: "ACTIVE",
258
+ AWS_TERMINATED: "AWS_TERMINATED",
259
+ CUSTOMER_TERMINATED: "CUSTOMER_TERMINATED",
260
+ };
261
+ const PublishedState = {
262
+ PUBLISHED: "PUBLISHED",
263
+ UNPUBLISHED: "UNPUBLISHED",
264
+ };
265
+ const UploadState = {
266
+ COMPLETE: "COMPLETE",
267
+ FAILED: "FAILED",
268
+ FAULT: "FAULT",
269
+ PROCESSING: "PROCESSING",
221
270
  };
222
271
 
223
- // src/models/models_0.ts
224
- var AcceptanceType = {
225
- /**
226
- * Require explicit click-through acceptance of the
227
- * Term associated with this Report.
228
- */
229
- EXPLICIT: "EXPLICIT",
230
- /**
231
- * Do not require explicit click-through acceptance
232
- * of the Term associated with this Report
233
- */
234
- PASSTHROUGH: "PASSTHROUGH"
272
+ const se_GetAccountSettingsCommand = async (input, context) => {
273
+ const b = core.requestBuilder(input, context);
274
+ const headers = {};
275
+ b.bp("/v1/account-settings/get");
276
+ let body;
277
+ b.m("GET").h(headers).b(body);
278
+ return b.build();
235
279
  };
236
- var AccessDeniedException = class _AccessDeniedException extends ArtifactServiceException {
237
- static {
238
- __name(this, "AccessDeniedException");
239
- }
240
- name = "AccessDeniedException";
241
- $fault = "client";
242
- /**
243
- * @internal
244
- */
245
- constructor(opts) {
246
- super({
247
- name: "AccessDeniedException",
248
- $fault: "client",
249
- ...opts
280
+ const se_GetReportCommand = async (input, context) => {
281
+ const b = core.requestBuilder(input, context);
282
+ const headers = {};
283
+ b.bp("/v1/report/get");
284
+ const query = smithyClient.map({
285
+ [_rI]: [, smithyClient.expectNonNull(input[_rI], `reportId`)],
286
+ [_rV]: [() => input.reportVersion !== void 0, () => input[_rV].toString()],
287
+ [_tT]: [, smithyClient.expectNonNull(input[_tT], `termToken`)],
250
288
  });
251
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
252
- }
289
+ let body;
290
+ b.m("GET").h(headers).q(query).b(body);
291
+ return b.build();
253
292
  };
254
- var NotificationSubscriptionStatus = {
255
- NOT_SUBSCRIBED: "NOT_SUBSCRIBED",
256
- SUBSCRIBED: "SUBSCRIBED"
293
+ const se_GetReportMetadataCommand = async (input, context) => {
294
+ const b = core.requestBuilder(input, context);
295
+ const headers = {};
296
+ b.bp("/v1/report/getMetadata");
297
+ const query = smithyClient.map({
298
+ [_rI]: [, smithyClient.expectNonNull(input[_rI], `reportId`)],
299
+ [_rV]: [() => input.reportVersion !== void 0, () => input[_rV].toString()],
300
+ });
301
+ let body;
302
+ b.m("GET").h(headers).q(query).b(body);
303
+ return b.build();
257
304
  };
258
- var ConflictException = class _ConflictException extends ArtifactServiceException {
259
- static {
260
- __name(this, "ConflictException");
261
- }
262
- name = "ConflictException";
263
- $fault = "client";
264
- /**
265
- * <p>Identifier of the affected resource.</p>
266
- * @public
267
- */
268
- resourceId;
269
- /**
270
- * <p>Type of the affected resource.</p>
271
- * @public
272
- */
273
- resourceType;
274
- /**
275
- * @internal
276
- */
277
- constructor(opts) {
278
- super({
279
- name: "ConflictException",
280
- $fault: "client",
281
- ...opts
305
+ const se_GetTermForReportCommand = async (input, context) => {
306
+ const b = core.requestBuilder(input, context);
307
+ const headers = {};
308
+ b.bp("/v1/report/getTermForReport");
309
+ const query = smithyClient.map({
310
+ [_rI]: [, smithyClient.expectNonNull(input[_rI], `reportId`)],
311
+ [_rV]: [() => input.reportVersion !== void 0, () => input[_rV].toString()],
282
312
  });
283
- Object.setPrototypeOf(this, _ConflictException.prototype);
284
- this.resourceId = opts.resourceId;
285
- this.resourceType = opts.resourceType;
286
- }
313
+ let body;
314
+ b.m("GET").h(headers).q(query).b(body);
315
+ return b.build();
287
316
  };
288
- var InternalServerException = class _InternalServerException extends ArtifactServiceException {
289
- static {
290
- __name(this, "InternalServerException");
291
- }
292
- name = "InternalServerException";
293
- $fault = "server";
294
- $retryable = {};
295
- /**
296
- * <p>Number of seconds in which the caller can retry the request.</p>
297
- * @public
298
- */
299
- retryAfterSeconds;
300
- /**
301
- * @internal
302
- */
303
- constructor(opts) {
304
- super({
305
- name: "InternalServerException",
306
- $fault: "server",
307
- ...opts
317
+ const se_ListCustomerAgreementsCommand = async (input, context) => {
318
+ const b = core.requestBuilder(input, context);
319
+ const headers = {};
320
+ b.bp("/v1/customer-agreement/list");
321
+ const query = smithyClient.map({
322
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
323
+ [_nT]: [, input[_nT]],
308
324
  });
309
- Object.setPrototypeOf(this, _InternalServerException.prototype);
310
- this.retryAfterSeconds = opts.retryAfterSeconds;
311
- }
325
+ let body;
326
+ b.m("GET").h(headers).q(query).b(body);
327
+ return b.build();
312
328
  };
313
- var ResourceNotFoundException = class _ResourceNotFoundException extends ArtifactServiceException {
314
- static {
315
- __name(this, "ResourceNotFoundException");
316
- }
317
- name = "ResourceNotFoundException";
318
- $fault = "client";
319
- /**
320
- * <p>Identifier of the affected resource.</p>
321
- * @public
322
- */
323
- resourceId;
324
- /**
325
- * <p>Type of the affected resource.</p>
326
- * @public
327
- */
328
- resourceType;
329
- /**
330
- * @internal
331
- */
332
- constructor(opts) {
333
- super({
334
- name: "ResourceNotFoundException",
335
- $fault: "client",
336
- ...opts
329
+ const se_ListReportsCommand = async (input, context) => {
330
+ const b = core.requestBuilder(input, context);
331
+ const headers = {};
332
+ b.bp("/v1/report/list");
333
+ const query = smithyClient.map({
334
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
335
+ [_nT]: [, input[_nT]],
337
336
  });
338
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
339
- this.resourceId = opts.resourceId;
340
- this.resourceType = opts.resourceType;
341
- }
337
+ let body;
338
+ b.m("GET").h(headers).q(query).b(body);
339
+ return b.build();
340
+ };
341
+ const se_PutAccountSettingsCommand = async (input, context) => {
342
+ const b = core.requestBuilder(input, context);
343
+ const headers = {
344
+ "content-type": "application/json",
345
+ };
346
+ b.bp("/v1/account-settings/put");
347
+ let body;
348
+ body = JSON.stringify(smithyClient.take(input, {
349
+ notificationSubscriptionStatus: [],
350
+ }));
351
+ b.m("PUT").h(headers).b(body);
352
+ return b.build();
342
353
  };
343
- var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends ArtifactServiceException {
344
- static {
345
- __name(this, "ServiceQuotaExceededException");
346
- }
347
- name = "ServiceQuotaExceededException";
348
- $fault = "client";
349
- /**
350
- * <p>Identifier of the affected resource.</p>
351
- * @public
352
- */
353
- resourceId;
354
- /**
355
- * <p>Type of the affected resource.</p>
356
- * @public
357
- */
358
- resourceType;
359
- /**
360
- * <p>Code for the affected service.</p>
361
- * @public
362
- */
363
- serviceCode;
364
- /**
365
- * <p>Code for the affected quota.</p>
366
- * @public
367
- */
368
- quotaCode;
369
- /**
370
- * @internal
371
- */
372
- constructor(opts) {
373
- super({
374
- name: "ServiceQuotaExceededException",
375
- $fault: "client",
376
- ...opts
354
+ const de_GetAccountSettingsCommand = async (output, context) => {
355
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
356
+ return de_CommandError(output, context);
357
+ }
358
+ const contents = smithyClient.map({
359
+ $metadata: deserializeMetadata(output),
377
360
  });
378
- Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
379
- this.resourceId = opts.resourceId;
380
- this.resourceType = opts.resourceType;
381
- this.serviceCode = opts.serviceCode;
382
- this.quotaCode = opts.quotaCode;
383
- }
361
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
362
+ const doc = smithyClient.take(data, {
363
+ accountSettings: smithyClient._json,
364
+ });
365
+ Object.assign(contents, doc);
366
+ return contents;
384
367
  };
385
- var ThrottlingException = class _ThrottlingException extends ArtifactServiceException {
386
- static {
387
- __name(this, "ThrottlingException");
388
- }
389
- name = "ThrottlingException";
390
- $fault = "client";
391
- $retryable = {
392
- throttling: true
393
- };
394
- /**
395
- * <p>Code for the affected service.</p>
396
- * @public
397
- */
398
- serviceCode;
399
- /**
400
- * <p>Code for the affected quota.</p>
401
- * @public
402
- */
403
- quotaCode;
404
- /**
405
- * <p>Number of seconds in which the caller can retry the request.</p>
406
- * @public
407
- */
408
- retryAfterSeconds;
409
- /**
410
- * @internal
411
- */
412
- constructor(opts) {
413
- super({
414
- name: "ThrottlingException",
415
- $fault: "client",
416
- ...opts
368
+ const de_GetReportCommand = async (output, context) => {
369
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
370
+ return de_CommandError(output, context);
371
+ }
372
+ const contents = smithyClient.map({
373
+ $metadata: deserializeMetadata(output),
417
374
  });
418
- Object.setPrototypeOf(this, _ThrottlingException.prototype);
419
- this.serviceCode = opts.serviceCode;
420
- this.quotaCode = opts.quotaCode;
421
- this.retryAfterSeconds = opts.retryAfterSeconds;
422
- }
375
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
376
+ const doc = smithyClient.take(data, {
377
+ documentPresignedUrl: smithyClient.expectString,
378
+ });
379
+ Object.assign(contents, doc);
380
+ return contents;
423
381
  };
424
- var ValidationExceptionReason = {
425
- CANNOT_PARSE: "cannotParse",
426
- FIELD_VALIDATION_FAILED: "fieldValidationFailed",
427
- INVALID_TOKEN: "invalidToken",
428
- OTHER: "other",
429
- UNKNOWN_OPERATION: "unknownOperation"
382
+ const de_GetReportMetadataCommand = async (output, context) => {
383
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
384
+ return de_CommandError(output, context);
385
+ }
386
+ const contents = smithyClient.map({
387
+ $metadata: deserializeMetadata(output),
388
+ });
389
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
390
+ const doc = smithyClient.take(data, {
391
+ reportDetails: (_) => de_ReportDetail(_),
392
+ });
393
+ Object.assign(contents, doc);
394
+ return contents;
430
395
  };
431
- var ValidationException = class _ValidationException extends ArtifactServiceException {
432
- static {
433
- __name(this, "ValidationException");
434
- }
435
- name = "ValidationException";
436
- $fault = "client";
437
- /**
438
- * <p>Reason the request failed validation.</p>
439
- * @public
440
- */
441
- reason;
442
- /**
443
- * <p>The field that caused the error, if applicable.</p>
444
- * @public
445
- */
446
- fieldList;
447
- /**
448
- * @internal
449
- */
450
- constructor(opts) {
451
- super({
452
- name: "ValidationException",
453
- $fault: "client",
454
- ...opts
396
+ const de_GetTermForReportCommand = async (output, context) => {
397
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
398
+ return de_CommandError(output, context);
399
+ }
400
+ const contents = smithyClient.map({
401
+ $metadata: deserializeMetadata(output),
455
402
  });
456
- Object.setPrototypeOf(this, _ValidationException.prototype);
457
- this.reason = opts.reason;
458
- this.fieldList = opts.fieldList;
459
- }
403
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
404
+ const doc = smithyClient.take(data, {
405
+ documentPresignedUrl: smithyClient.expectString,
406
+ termToken: smithyClient.expectString,
407
+ });
408
+ Object.assign(contents, doc);
409
+ return contents;
460
410
  };
461
- var AgreementType = {
462
- CUSTOM: "CUSTOM",
463
- DEFAULT: "DEFAULT",
464
- MODIFIED: "MODIFIED"
411
+ const de_ListCustomerAgreementsCommand = async (output, context) => {
412
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
413
+ return de_CommandError(output, context);
414
+ }
415
+ const contents = smithyClient.map({
416
+ $metadata: deserializeMetadata(output),
417
+ });
418
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
419
+ const doc = smithyClient.take(data, {
420
+ customerAgreements: (_) => de_CustomerAgreementList(_),
421
+ nextToken: smithyClient.expectString,
422
+ });
423
+ Object.assign(contents, doc);
424
+ return contents;
465
425
  };
466
- var CustomerAgreementState = {
467
- ACTIVE: "ACTIVE",
468
- AWS_TERMINATED: "AWS_TERMINATED",
469
- CUSTOMER_TERMINATED: "CUSTOMER_TERMINATED"
426
+ const de_ListReportsCommand = async (output, context) => {
427
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
428
+ return de_CommandError(output, context);
429
+ }
430
+ const contents = smithyClient.map({
431
+ $metadata: deserializeMetadata(output),
432
+ });
433
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
434
+ const doc = smithyClient.take(data, {
435
+ nextToken: smithyClient.expectString,
436
+ reports: (_) => de_ReportsList(_),
437
+ });
438
+ Object.assign(contents, doc);
439
+ return contents;
470
440
  };
471
- var PublishedState = {
472
- PUBLISHED: "PUBLISHED",
473
- UNPUBLISHED: "UNPUBLISHED"
441
+ const de_PutAccountSettingsCommand = async (output, context) => {
442
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
443
+ return de_CommandError(output, context);
444
+ }
445
+ const contents = smithyClient.map({
446
+ $metadata: deserializeMetadata(output),
447
+ });
448
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
449
+ const doc = smithyClient.take(data, {
450
+ accountSettings: smithyClient._json,
451
+ });
452
+ Object.assign(contents, doc);
453
+ return contents;
474
454
  };
475
- var UploadState = {
476
- COMPLETE: "COMPLETE",
477
- FAILED: "FAILED",
478
- FAULT: "FAULT",
479
- PROCESSING: "PROCESSING"
455
+ const de_CommandError = async (output, context) => {
456
+ const parsedOutput = {
457
+ ...output,
458
+ body: await core$1.parseJsonErrorBody(output.body, context),
459
+ };
460
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
461
+ switch (errorCode) {
462
+ case "AccessDeniedException":
463
+ case "com.amazonaws.artifact#AccessDeniedException":
464
+ throw await de_AccessDeniedExceptionRes(parsedOutput);
465
+ case "ConflictException":
466
+ case "com.amazonaws.artifact#ConflictException":
467
+ throw await de_ConflictExceptionRes(parsedOutput);
468
+ case "InternalServerException":
469
+ case "com.amazonaws.artifact#InternalServerException":
470
+ throw await de_InternalServerExceptionRes(parsedOutput);
471
+ case "ResourceNotFoundException":
472
+ case "com.amazonaws.artifact#ResourceNotFoundException":
473
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
474
+ case "ServiceQuotaExceededException":
475
+ case "com.amazonaws.artifact#ServiceQuotaExceededException":
476
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput);
477
+ case "ThrottlingException":
478
+ case "com.amazonaws.artifact#ThrottlingException":
479
+ throw await de_ThrottlingExceptionRes(parsedOutput);
480
+ case "ValidationException":
481
+ case "com.amazonaws.artifact#ValidationException":
482
+ throw await de_ValidationExceptionRes(parsedOutput);
483
+ default:
484
+ const parsedBody = parsedOutput.body;
485
+ return throwDefaultError({
486
+ output,
487
+ parsedBody,
488
+ errorCode,
489
+ });
490
+ }
480
491
  };
481
-
482
- // src/protocols/Aws_restJson1.ts
483
- var se_GetAccountSettingsCommand = /* @__PURE__ */ __name(async (input, context) => {
484
- const b = (0, import_core.requestBuilder)(input, context);
485
- const headers = {};
486
- b.bp("/v1/account-settings/get");
487
- let body;
488
- b.m("GET").h(headers).b(body);
489
- return b.build();
490
- }, "se_GetAccountSettingsCommand");
491
- var se_GetReportCommand = /* @__PURE__ */ __name(async (input, context) => {
492
- const b = (0, import_core.requestBuilder)(input, context);
493
- const headers = {};
494
- b.bp("/v1/report/get");
495
- const query = (0, import_smithy_client.map)({
496
- [_rI]: [, (0, import_smithy_client.expectNonNull)(input[_rI], `reportId`)],
497
- [_rV]: [() => input.reportVersion !== void 0, () => input[_rV].toString()],
498
- [_tT]: [, (0, import_smithy_client.expectNonNull)(input[_tT], `termToken`)]
499
- });
500
- let body;
501
- b.m("GET").h(headers).q(query).b(body);
502
- return b.build();
503
- }, "se_GetReportCommand");
504
- var se_GetReportMetadataCommand = /* @__PURE__ */ __name(async (input, context) => {
505
- const b = (0, import_core.requestBuilder)(input, context);
506
- const headers = {};
507
- b.bp("/v1/report/getMetadata");
508
- const query = (0, import_smithy_client.map)({
509
- [_rI]: [, (0, import_smithy_client.expectNonNull)(input[_rI], `reportId`)],
510
- [_rV]: [() => input.reportVersion !== void 0, () => input[_rV].toString()]
511
- });
512
- let body;
513
- b.m("GET").h(headers).q(query).b(body);
514
- return b.build();
515
- }, "se_GetReportMetadataCommand");
516
- var se_GetTermForReportCommand = /* @__PURE__ */ __name(async (input, context) => {
517
- const b = (0, import_core.requestBuilder)(input, context);
518
- const headers = {};
519
- b.bp("/v1/report/getTermForReport");
520
- const query = (0, import_smithy_client.map)({
521
- [_rI]: [, (0, import_smithy_client.expectNonNull)(input[_rI], `reportId`)],
522
- [_rV]: [() => input.reportVersion !== void 0, () => input[_rV].toString()]
523
- });
524
- let body;
525
- b.m("GET").h(headers).q(query).b(body);
526
- return b.build();
527
- }, "se_GetTermForReportCommand");
528
- var se_ListCustomerAgreementsCommand = /* @__PURE__ */ __name(async (input, context) => {
529
- const b = (0, import_core.requestBuilder)(input, context);
530
- const headers = {};
531
- b.bp("/v1/customer-agreement/list");
532
- const query = (0, import_smithy_client.map)({
533
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
534
- [_nT]: [, input[_nT]]
535
- });
536
- let body;
537
- b.m("GET").h(headers).q(query).b(body);
538
- return b.build();
539
- }, "se_ListCustomerAgreementsCommand");
540
- var se_ListReportsCommand = /* @__PURE__ */ __name(async (input, context) => {
541
- const b = (0, import_core.requestBuilder)(input, context);
542
- const headers = {};
543
- b.bp("/v1/report/list");
544
- const query = (0, import_smithy_client.map)({
545
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
546
- [_nT]: [, input[_nT]]
547
- });
548
- let body;
549
- b.m("GET").h(headers).q(query).b(body);
550
- return b.build();
551
- }, "se_ListReportsCommand");
552
- var se_PutAccountSettingsCommand = /* @__PURE__ */ __name(async (input, context) => {
553
- const b = (0, import_core.requestBuilder)(input, context);
554
- const headers = {
555
- "content-type": "application/json"
556
- };
557
- b.bp("/v1/account-settings/put");
558
- let body;
559
- body = JSON.stringify(
560
- (0, import_smithy_client.take)(input, {
561
- notificationSubscriptionStatus: []
562
- })
563
- );
564
- b.m("PUT").h(headers).b(body);
565
- return b.build();
566
- }, "se_PutAccountSettingsCommand");
567
- var de_GetAccountSettingsCommand = /* @__PURE__ */ __name(async (output, context) => {
568
- if (output.statusCode !== 200 && output.statusCode >= 300) {
569
- return de_CommandError(output, context);
570
- }
571
- const contents = (0, import_smithy_client.map)({
572
- $metadata: deserializeMetadata(output)
573
- });
574
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
575
- const doc = (0, import_smithy_client.take)(data, {
576
- accountSettings: import_smithy_client._json
577
- });
578
- Object.assign(contents, doc);
579
- return contents;
580
- }, "de_GetAccountSettingsCommand");
581
- var de_GetReportCommand = /* @__PURE__ */ __name(async (output, context) => {
582
- if (output.statusCode !== 200 && output.statusCode >= 300) {
583
- return de_CommandError(output, context);
584
- }
585
- const contents = (0, import_smithy_client.map)({
586
- $metadata: deserializeMetadata(output)
587
- });
588
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
589
- const doc = (0, import_smithy_client.take)(data, {
590
- documentPresignedUrl: import_smithy_client.expectString
591
- });
592
- Object.assign(contents, doc);
593
- return contents;
594
- }, "de_GetReportCommand");
595
- var de_GetReportMetadataCommand = /* @__PURE__ */ __name(async (output, context) => {
596
- if (output.statusCode !== 200 && output.statusCode >= 300) {
597
- return de_CommandError(output, context);
598
- }
599
- const contents = (0, import_smithy_client.map)({
600
- $metadata: deserializeMetadata(output)
601
- });
602
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
603
- const doc = (0, import_smithy_client.take)(data, {
604
- reportDetails: /* @__PURE__ */ __name((_) => de_ReportDetail(_, context), "reportDetails")
605
- });
606
- Object.assign(contents, doc);
607
- return contents;
608
- }, "de_GetReportMetadataCommand");
609
- var de_GetTermForReportCommand = /* @__PURE__ */ __name(async (output, context) => {
610
- if (output.statusCode !== 200 && output.statusCode >= 300) {
611
- return de_CommandError(output, context);
612
- }
613
- const contents = (0, import_smithy_client.map)({
614
- $metadata: deserializeMetadata(output)
615
- });
616
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
617
- const doc = (0, import_smithy_client.take)(data, {
618
- documentPresignedUrl: import_smithy_client.expectString,
619
- termToken: import_smithy_client.expectString
620
- });
621
- Object.assign(contents, doc);
622
- return contents;
623
- }, "de_GetTermForReportCommand");
624
- var de_ListCustomerAgreementsCommand = /* @__PURE__ */ __name(async (output, context) => {
625
- if (output.statusCode !== 200 && output.statusCode >= 300) {
626
- return de_CommandError(output, context);
627
- }
628
- const contents = (0, import_smithy_client.map)({
629
- $metadata: deserializeMetadata(output)
630
- });
631
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
632
- const doc = (0, import_smithy_client.take)(data, {
633
- customerAgreements: /* @__PURE__ */ __name((_) => de_CustomerAgreementList(_, context), "customerAgreements"),
634
- nextToken: import_smithy_client.expectString
635
- });
636
- Object.assign(contents, doc);
637
- return contents;
638
- }, "de_ListCustomerAgreementsCommand");
639
- var de_ListReportsCommand = /* @__PURE__ */ __name(async (output, context) => {
640
- if (output.statusCode !== 200 && output.statusCode >= 300) {
641
- return de_CommandError(output, context);
642
- }
643
- const contents = (0, import_smithy_client.map)({
644
- $metadata: deserializeMetadata(output)
645
- });
646
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
647
- const doc = (0, import_smithy_client.take)(data, {
648
- nextToken: import_smithy_client.expectString,
649
- reports: /* @__PURE__ */ __name((_) => de_ReportsList(_, context), "reports")
650
- });
651
- Object.assign(contents, doc);
652
- return contents;
653
- }, "de_ListReportsCommand");
654
- var de_PutAccountSettingsCommand = /* @__PURE__ */ __name(async (output, context) => {
655
- if (output.statusCode !== 200 && output.statusCode >= 300) {
656
- return de_CommandError(output, context);
657
- }
658
- const contents = (0, import_smithy_client.map)({
659
- $metadata: deserializeMetadata(output)
660
- });
661
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
662
- const doc = (0, import_smithy_client.take)(data, {
663
- accountSettings: import_smithy_client._json
664
- });
665
- Object.assign(contents, doc);
666
- return contents;
667
- }, "de_PutAccountSettingsCommand");
668
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
669
- const parsedOutput = {
670
- ...output,
671
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
672
- };
673
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
674
- switch (errorCode) {
675
- case "AccessDeniedException":
676
- case "com.amazonaws.artifact#AccessDeniedException":
677
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
678
- case "ConflictException":
679
- case "com.amazonaws.artifact#ConflictException":
680
- throw await de_ConflictExceptionRes(parsedOutput, context);
681
- case "InternalServerException":
682
- case "com.amazonaws.artifact#InternalServerException":
683
- throw await de_InternalServerExceptionRes(parsedOutput, context);
684
- case "ResourceNotFoundException":
685
- case "com.amazonaws.artifact#ResourceNotFoundException":
686
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
687
- case "ServiceQuotaExceededException":
688
- case "com.amazonaws.artifact#ServiceQuotaExceededException":
689
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
690
- case "ThrottlingException":
691
- case "com.amazonaws.artifact#ThrottlingException":
692
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
693
- case "ValidationException":
694
- case "com.amazonaws.artifact#ValidationException":
695
- throw await de_ValidationExceptionRes(parsedOutput, context);
696
- default:
697
- const parsedBody = parsedOutput.body;
698
- return throwDefaultError({
699
- output,
700
- parsedBody,
701
- errorCode
702
- });
703
- }
704
- }, "de_CommandError");
705
- var throwDefaultError = (0, import_smithy_client.withBaseException)(ArtifactServiceException);
706
- var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
707
- const contents = (0, import_smithy_client.map)({});
708
- const data = parsedOutput.body;
709
- const doc = (0, import_smithy_client.take)(data, {
710
- message: import_smithy_client.expectString
711
- });
712
- Object.assign(contents, doc);
713
- const exception = new AccessDeniedException({
714
- $metadata: deserializeMetadata(parsedOutput),
715
- ...contents
716
- });
717
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
718
- }, "de_AccessDeniedExceptionRes");
719
- var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
720
- const contents = (0, import_smithy_client.map)({});
721
- const data = parsedOutput.body;
722
- const doc = (0, import_smithy_client.take)(data, {
723
- message: import_smithy_client.expectString,
724
- resourceId: import_smithy_client.expectString,
725
- resourceType: import_smithy_client.expectString
726
- });
727
- Object.assign(contents, doc);
728
- const exception = new ConflictException({
729
- $metadata: deserializeMetadata(parsedOutput),
730
- ...contents
731
- });
732
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
733
- }, "de_ConflictExceptionRes");
734
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
735
- const contents = (0, import_smithy_client.map)({
736
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, import_smithy_client.strictParseInt32)(parsedOutput.headers[_ra])]
737
- });
738
- const data = parsedOutput.body;
739
- const doc = (0, import_smithy_client.take)(data, {
740
- message: import_smithy_client.expectString
741
- });
742
- Object.assign(contents, doc);
743
- const exception = new InternalServerException({
744
- $metadata: deserializeMetadata(parsedOutput),
745
- ...contents
746
- });
747
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
748
- }, "de_InternalServerExceptionRes");
749
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
750
- const contents = (0, import_smithy_client.map)({});
751
- const data = parsedOutput.body;
752
- const doc = (0, import_smithy_client.take)(data, {
753
- message: import_smithy_client.expectString,
754
- resourceId: import_smithy_client.expectString,
755
- resourceType: import_smithy_client.expectString
756
- });
757
- Object.assign(contents, doc);
758
- const exception = new ResourceNotFoundException({
759
- $metadata: deserializeMetadata(parsedOutput),
760
- ...contents
761
- });
762
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
763
- }, "de_ResourceNotFoundExceptionRes");
764
- var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
765
- const contents = (0, import_smithy_client.map)({});
766
- const data = parsedOutput.body;
767
- const doc = (0, import_smithy_client.take)(data, {
768
- message: import_smithy_client.expectString,
769
- quotaCode: import_smithy_client.expectString,
770
- resourceId: import_smithy_client.expectString,
771
- resourceType: import_smithy_client.expectString,
772
- serviceCode: import_smithy_client.expectString
773
- });
774
- Object.assign(contents, doc);
775
- const exception = new ServiceQuotaExceededException({
776
- $metadata: deserializeMetadata(parsedOutput),
777
- ...contents
778
- });
779
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
780
- }, "de_ServiceQuotaExceededExceptionRes");
781
- var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
782
- const contents = (0, import_smithy_client.map)({
783
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, import_smithy_client.strictParseInt32)(parsedOutput.headers[_ra])]
784
- });
785
- const data = parsedOutput.body;
786
- const doc = (0, import_smithy_client.take)(data, {
787
- message: import_smithy_client.expectString,
788
- quotaCode: import_smithy_client.expectString,
789
- serviceCode: import_smithy_client.expectString
790
- });
791
- Object.assign(contents, doc);
792
- const exception = new ThrottlingException({
793
- $metadata: deserializeMetadata(parsedOutput),
794
- ...contents
795
- });
796
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
797
- }, "de_ThrottlingExceptionRes");
798
- var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
799
- const contents = (0, import_smithy_client.map)({});
800
- const data = parsedOutput.body;
801
- const doc = (0, import_smithy_client.take)(data, {
802
- fieldList: import_smithy_client._json,
803
- message: import_smithy_client.expectString,
804
- reason: import_smithy_client.expectString
805
- });
806
- Object.assign(contents, doc);
807
- const exception = new ValidationException({
808
- $metadata: deserializeMetadata(parsedOutput),
809
- ...contents
810
- });
811
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
812
- }, "de_ValidationExceptionRes");
813
- var de_CustomerAgreementList = /* @__PURE__ */ __name((output, context) => {
814
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
815
- return de_CustomerAgreementSummary(entry, context);
816
- });
817
- return retVal;
818
- }, "de_CustomerAgreementList");
819
- var de_CustomerAgreementSummary = /* @__PURE__ */ __name((output, context) => {
820
- return (0, import_smithy_client.take)(output, {
821
- acceptanceTerms: import_smithy_client._json,
822
- agreementArn: import_smithy_client.expectString,
823
- arn: import_smithy_client.expectString,
824
- awsAccountId: import_smithy_client.expectString,
825
- description: import_smithy_client.expectString,
826
- effectiveEnd: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "effectiveEnd"),
827
- effectiveStart: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "effectiveStart"),
828
- id: import_smithy_client.expectString,
829
- name: import_smithy_client.expectString,
830
- organizationArn: import_smithy_client.expectString,
831
- state: import_smithy_client.expectString,
832
- terminateTerms: import_smithy_client._json,
833
- type: import_smithy_client.expectString
834
- });
835
- }, "de_CustomerAgreementSummary");
836
- var de_ReportDetail = /* @__PURE__ */ __name((output, context) => {
837
- return (0, import_smithy_client.take)(output, {
838
- acceptanceType: import_smithy_client.expectString,
839
- arn: import_smithy_client.expectString,
840
- category: import_smithy_client.expectString,
841
- companyName: import_smithy_client.expectString,
842
- createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "createdAt"),
843
- deletedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "deletedAt"),
844
- description: import_smithy_client.expectString,
845
- id: import_smithy_client.expectString,
846
- lastModifiedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "lastModifiedAt"),
847
- name: import_smithy_client.expectString,
848
- periodEnd: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "periodEnd"),
849
- periodStart: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "periodStart"),
850
- productName: import_smithy_client.expectString,
851
- sequenceNumber: import_smithy_client.expectLong,
852
- series: import_smithy_client.expectString,
853
- state: import_smithy_client.expectString,
854
- statusMessage: import_smithy_client.expectString,
855
- termArn: import_smithy_client.expectString,
856
- uploadState: import_smithy_client.expectString,
857
- version: import_smithy_client.expectLong
858
- });
859
- }, "de_ReportDetail");
860
- var de_ReportsList = /* @__PURE__ */ __name((output, context) => {
861
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
862
- return de_ReportSummary(entry, context);
863
- });
864
- return retVal;
865
- }, "de_ReportsList");
866
- var de_ReportSummary = /* @__PURE__ */ __name((output, context) => {
867
- return (0, import_smithy_client.take)(output, {
868
- acceptanceType: import_smithy_client.expectString,
869
- arn: import_smithy_client.expectString,
870
- category: import_smithy_client.expectString,
871
- companyName: import_smithy_client.expectString,
872
- description: import_smithy_client.expectString,
873
- id: import_smithy_client.expectString,
874
- name: import_smithy_client.expectString,
875
- periodEnd: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "periodEnd"),
876
- periodStart: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "periodStart"),
877
- productName: import_smithy_client.expectString,
878
- series: import_smithy_client.expectString,
879
- state: import_smithy_client.expectString,
880
- statusMessage: import_smithy_client.expectString,
881
- uploadState: import_smithy_client.expectString,
882
- version: import_smithy_client.expectLong
883
- });
884
- }, "de_ReportSummary");
885
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
886
- httpStatusCode: output.statusCode,
887
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
888
- extendedRequestId: output.headers["x-amz-id-2"],
889
- cfId: output.headers["x-amz-cf-id"]
890
- }), "deserializeMetadata");
891
- var _mR = "maxResults";
892
- var _nT = "nextToken";
893
- var _rAS = "retryAfterSeconds";
894
- var _rI = "reportId";
895
- var _rV = "reportVersion";
896
- var _ra = "retry-after";
897
- var _tT = "termToken";
898
-
899
- // src/commands/GetAccountSettingsCommand.ts
900
- var GetAccountSettingsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
901
- return [
902
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
903
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
904
- ];
905
- }).s("Artifact", "GetAccountSettings", {}).n("ArtifactClient", "GetAccountSettingsCommand").f(void 0, void 0).ser(se_GetAccountSettingsCommand).de(de_GetAccountSettingsCommand).build() {
906
- static {
907
- __name(this, "GetAccountSettingsCommand");
908
- }
492
+ const throwDefaultError = smithyClient.withBaseException(ArtifactServiceException);
493
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
494
+ const contents = smithyClient.map({});
495
+ const data = parsedOutput.body;
496
+ const doc = smithyClient.take(data, {
497
+ message: smithyClient.expectString,
498
+ });
499
+ Object.assign(contents, doc);
500
+ const exception = new AccessDeniedException({
501
+ $metadata: deserializeMetadata(parsedOutput),
502
+ ...contents,
503
+ });
504
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
909
505
  };
910
-
911
- // src/commands/GetReportCommand.ts
912
-
913
-
914
-
915
- var GetReportCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
916
- return [
917
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
918
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
919
- ];
920
- }).s("Artifact", "GetReport", {}).n("ArtifactClient", "GetReportCommand").f(void 0, void 0).ser(se_GetReportCommand).de(de_GetReportCommand).build() {
921
- static {
922
- __name(this, "GetReportCommand");
923
- }
506
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
507
+ const contents = smithyClient.map({});
508
+ const data = parsedOutput.body;
509
+ const doc = smithyClient.take(data, {
510
+ message: smithyClient.expectString,
511
+ resourceId: smithyClient.expectString,
512
+ resourceType: smithyClient.expectString,
513
+ });
514
+ Object.assign(contents, doc);
515
+ const exception = new ConflictException({
516
+ $metadata: deserializeMetadata(parsedOutput),
517
+ ...contents,
518
+ });
519
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
924
520
  };
925
-
926
- // src/commands/GetReportMetadataCommand.ts
927
-
928
-
929
-
930
- var GetReportMetadataCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
931
- return [
932
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
933
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
934
- ];
935
- }).s("Artifact", "GetReportMetadata", {}).n("ArtifactClient", "GetReportMetadataCommand").f(void 0, void 0).ser(se_GetReportMetadataCommand).de(de_GetReportMetadataCommand).build() {
936
- static {
937
- __name(this, "GetReportMetadataCommand");
938
- }
521
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
522
+ const contents = smithyClient.map({
523
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => smithyClient.strictParseInt32(parsedOutput.headers[_ra])],
524
+ });
525
+ const data = parsedOutput.body;
526
+ const doc = smithyClient.take(data, {
527
+ message: smithyClient.expectString,
528
+ });
529
+ Object.assign(contents, doc);
530
+ const exception = new InternalServerException({
531
+ $metadata: deserializeMetadata(parsedOutput),
532
+ ...contents,
533
+ });
534
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
939
535
  };
940
-
941
- // src/commands/GetTermForReportCommand.ts
942
-
943
-
944
-
945
- var GetTermForReportCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
946
- return [
947
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
948
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
949
- ];
950
- }).s("Artifact", "GetTermForReport", {}).n("ArtifactClient", "GetTermForReportCommand").f(void 0, void 0).ser(se_GetTermForReportCommand).de(de_GetTermForReportCommand).build() {
951
- static {
952
- __name(this, "GetTermForReportCommand");
953
- }
536
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
537
+ const contents = smithyClient.map({});
538
+ const data = parsedOutput.body;
539
+ const doc = smithyClient.take(data, {
540
+ message: smithyClient.expectString,
541
+ resourceId: smithyClient.expectString,
542
+ resourceType: smithyClient.expectString,
543
+ });
544
+ Object.assign(contents, doc);
545
+ const exception = new ResourceNotFoundException({
546
+ $metadata: deserializeMetadata(parsedOutput),
547
+ ...contents,
548
+ });
549
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
954
550
  };
955
-
956
- // src/commands/ListCustomerAgreementsCommand.ts
957
-
958
-
959
-
960
- var ListCustomerAgreementsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
961
- return [
962
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
963
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
964
- ];
965
- }).s("Artifact", "ListCustomerAgreements", {}).n("ArtifactClient", "ListCustomerAgreementsCommand").f(void 0, void 0).ser(se_ListCustomerAgreementsCommand).de(de_ListCustomerAgreementsCommand).build() {
966
- static {
967
- __name(this, "ListCustomerAgreementsCommand");
968
- }
551
+ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
552
+ const contents = smithyClient.map({});
553
+ const data = parsedOutput.body;
554
+ const doc = smithyClient.take(data, {
555
+ message: smithyClient.expectString,
556
+ quotaCode: smithyClient.expectString,
557
+ resourceId: smithyClient.expectString,
558
+ resourceType: smithyClient.expectString,
559
+ serviceCode: smithyClient.expectString,
560
+ });
561
+ Object.assign(contents, doc);
562
+ const exception = new ServiceQuotaExceededException({
563
+ $metadata: deserializeMetadata(parsedOutput),
564
+ ...contents,
565
+ });
566
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
969
567
  };
970
-
971
- // src/commands/ListReportsCommand.ts
972
-
973
-
974
-
975
- var ListReportsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
976
- return [
977
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
978
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
979
- ];
980
- }).s("Artifact", "ListReports", {}).n("ArtifactClient", "ListReportsCommand").f(void 0, void 0).ser(se_ListReportsCommand).de(de_ListReportsCommand).build() {
981
- static {
982
- __name(this, "ListReportsCommand");
983
- }
568
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
569
+ const contents = smithyClient.map({
570
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => smithyClient.strictParseInt32(parsedOutput.headers[_ra])],
571
+ });
572
+ const data = parsedOutput.body;
573
+ const doc = smithyClient.take(data, {
574
+ message: smithyClient.expectString,
575
+ quotaCode: smithyClient.expectString,
576
+ serviceCode: smithyClient.expectString,
577
+ });
578
+ Object.assign(contents, doc);
579
+ const exception = new ThrottlingException({
580
+ $metadata: deserializeMetadata(parsedOutput),
581
+ ...contents,
582
+ });
583
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
984
584
  };
985
-
986
- // src/commands/PutAccountSettingsCommand.ts
987
-
988
-
989
-
990
- var PutAccountSettingsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
991
- return [
992
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
993
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
994
- ];
995
- }).s("Artifact", "PutAccountSettings", {}).n("ArtifactClient", "PutAccountSettingsCommand").f(void 0, void 0).ser(se_PutAccountSettingsCommand).de(de_PutAccountSettingsCommand).build() {
996
- static {
997
- __name(this, "PutAccountSettingsCommand");
998
- }
585
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
586
+ const contents = smithyClient.map({});
587
+ const data = parsedOutput.body;
588
+ const doc = smithyClient.take(data, {
589
+ fieldList: smithyClient._json,
590
+ message: smithyClient.expectString,
591
+ reason: smithyClient.expectString,
592
+ });
593
+ Object.assign(contents, doc);
594
+ const exception = new ValidationException({
595
+ $metadata: deserializeMetadata(parsedOutput),
596
+ ...contents,
597
+ });
598
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
999
599
  };
1000
-
1001
- // src/Artifact.ts
1002
- var commands = {
1003
- GetAccountSettingsCommand,
1004
- GetReportCommand,
1005
- GetReportMetadataCommand,
1006
- GetTermForReportCommand,
1007
- ListCustomerAgreementsCommand,
1008
- ListReportsCommand,
1009
- PutAccountSettingsCommand
600
+ const de_CustomerAgreementList = (output, context) => {
601
+ const retVal = (output || [])
602
+ .filter((e) => e != null)
603
+ .map((entry) => {
604
+ return de_CustomerAgreementSummary(entry);
605
+ });
606
+ return retVal;
1010
607
  };
1011
- var Artifact = class extends ArtifactClient {
1012
- static {
1013
- __name(this, "Artifact");
1014
- }
608
+ const de_CustomerAgreementSummary = (output, context) => {
609
+ return smithyClient.take(output, {
610
+ acceptanceTerms: smithyClient._json,
611
+ agreementArn: smithyClient.expectString,
612
+ arn: smithyClient.expectString,
613
+ awsAccountId: smithyClient.expectString,
614
+ description: smithyClient.expectString,
615
+ effectiveEnd: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
616
+ effectiveStart: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
617
+ id: smithyClient.expectString,
618
+ name: smithyClient.expectString,
619
+ organizationArn: smithyClient.expectString,
620
+ state: smithyClient.expectString,
621
+ terminateTerms: smithyClient._json,
622
+ type: smithyClient.expectString,
623
+ });
1015
624
  };
1016
- (0, import_smithy_client.createAggregatedClient)(commands, Artifact);
1017
-
1018
- // src/pagination/ListCustomerAgreementsPaginator.ts
1019
-
1020
- var paginateListCustomerAgreements = (0, import_core.createPaginator)(ArtifactClient, ListCustomerAgreementsCommand, "nextToken", "nextToken", "maxResults");
625
+ const de_ReportDetail = (output, context) => {
626
+ return smithyClient.take(output, {
627
+ acceptanceType: smithyClient.expectString,
628
+ arn: smithyClient.expectString,
629
+ category: smithyClient.expectString,
630
+ companyName: smithyClient.expectString,
631
+ createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
632
+ deletedAt: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
633
+ description: smithyClient.expectString,
634
+ id: smithyClient.expectString,
635
+ lastModifiedAt: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
636
+ name: smithyClient.expectString,
637
+ periodEnd: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
638
+ periodStart: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
639
+ productName: smithyClient.expectString,
640
+ sequenceNumber: smithyClient.expectLong,
641
+ series: smithyClient.expectString,
642
+ state: smithyClient.expectString,
643
+ statusMessage: smithyClient.expectString,
644
+ termArn: smithyClient.expectString,
645
+ uploadState: smithyClient.expectString,
646
+ version: smithyClient.expectLong,
647
+ });
648
+ };
649
+ const de_ReportsList = (output, context) => {
650
+ const retVal = (output || [])
651
+ .filter((e) => e != null)
652
+ .map((entry) => {
653
+ return de_ReportSummary(entry);
654
+ });
655
+ return retVal;
656
+ };
657
+ const de_ReportSummary = (output, context) => {
658
+ return smithyClient.take(output, {
659
+ acceptanceType: smithyClient.expectString,
660
+ arn: smithyClient.expectString,
661
+ category: smithyClient.expectString,
662
+ companyName: smithyClient.expectString,
663
+ description: smithyClient.expectString,
664
+ id: smithyClient.expectString,
665
+ name: smithyClient.expectString,
666
+ periodEnd: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
667
+ periodStart: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
668
+ productName: smithyClient.expectString,
669
+ series: smithyClient.expectString,
670
+ state: smithyClient.expectString,
671
+ statusMessage: smithyClient.expectString,
672
+ uploadState: smithyClient.expectString,
673
+ version: smithyClient.expectLong,
674
+ });
675
+ };
676
+ const deserializeMetadata = (output) => ({
677
+ httpStatusCode: output.statusCode,
678
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
679
+ extendedRequestId: output.headers["x-amz-id-2"],
680
+ cfId: output.headers["x-amz-cf-id"],
681
+ });
682
+ const _mR = "maxResults";
683
+ const _nT = "nextToken";
684
+ const _rAS = "retryAfterSeconds";
685
+ const _rI = "reportId";
686
+ const _rV = "reportVersion";
687
+ const _ra = "retry-after";
688
+ const _tT = "termToken";
689
+
690
+ class GetAccountSettingsCommand extends smithyClient.Command
691
+ .classBuilder()
692
+ .ep(commonParams)
693
+ .m(function (Command, cs, config, o) {
694
+ return [
695
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
696
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
697
+ ];
698
+ })
699
+ .s("Artifact", "GetAccountSettings", {})
700
+ .n("ArtifactClient", "GetAccountSettingsCommand")
701
+ .f(void 0, void 0)
702
+ .ser(se_GetAccountSettingsCommand)
703
+ .de(de_GetAccountSettingsCommand)
704
+ .build() {
705
+ }
706
+
707
+ class GetReportCommand extends smithyClient.Command
708
+ .classBuilder()
709
+ .ep(commonParams)
710
+ .m(function (Command, cs, config, o) {
711
+ return [
712
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
713
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
714
+ ];
715
+ })
716
+ .s("Artifact", "GetReport", {})
717
+ .n("ArtifactClient", "GetReportCommand")
718
+ .f(void 0, void 0)
719
+ .ser(se_GetReportCommand)
720
+ .de(de_GetReportCommand)
721
+ .build() {
722
+ }
723
+
724
+ class GetReportMetadataCommand extends smithyClient.Command
725
+ .classBuilder()
726
+ .ep(commonParams)
727
+ .m(function (Command, cs, config, o) {
728
+ return [
729
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
730
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
731
+ ];
732
+ })
733
+ .s("Artifact", "GetReportMetadata", {})
734
+ .n("ArtifactClient", "GetReportMetadataCommand")
735
+ .f(void 0, void 0)
736
+ .ser(se_GetReportMetadataCommand)
737
+ .de(de_GetReportMetadataCommand)
738
+ .build() {
739
+ }
740
+
741
+ class GetTermForReportCommand extends smithyClient.Command
742
+ .classBuilder()
743
+ .ep(commonParams)
744
+ .m(function (Command, cs, config, o) {
745
+ return [
746
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
747
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
748
+ ];
749
+ })
750
+ .s("Artifact", "GetTermForReport", {})
751
+ .n("ArtifactClient", "GetTermForReportCommand")
752
+ .f(void 0, void 0)
753
+ .ser(se_GetTermForReportCommand)
754
+ .de(de_GetTermForReportCommand)
755
+ .build() {
756
+ }
757
+
758
+ class ListCustomerAgreementsCommand extends smithyClient.Command
759
+ .classBuilder()
760
+ .ep(commonParams)
761
+ .m(function (Command, cs, config, o) {
762
+ return [
763
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
764
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
765
+ ];
766
+ })
767
+ .s("Artifact", "ListCustomerAgreements", {})
768
+ .n("ArtifactClient", "ListCustomerAgreementsCommand")
769
+ .f(void 0, void 0)
770
+ .ser(se_ListCustomerAgreementsCommand)
771
+ .de(de_ListCustomerAgreementsCommand)
772
+ .build() {
773
+ }
774
+
775
+ class ListReportsCommand extends smithyClient.Command
776
+ .classBuilder()
777
+ .ep(commonParams)
778
+ .m(function (Command, cs, config, o) {
779
+ return [
780
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
781
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
782
+ ];
783
+ })
784
+ .s("Artifact", "ListReports", {})
785
+ .n("ArtifactClient", "ListReportsCommand")
786
+ .f(void 0, void 0)
787
+ .ser(se_ListReportsCommand)
788
+ .de(de_ListReportsCommand)
789
+ .build() {
790
+ }
791
+
792
+ class PutAccountSettingsCommand extends smithyClient.Command
793
+ .classBuilder()
794
+ .ep(commonParams)
795
+ .m(function (Command, cs, config, o) {
796
+ return [
797
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
798
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
799
+ ];
800
+ })
801
+ .s("Artifact", "PutAccountSettings", {})
802
+ .n("ArtifactClient", "PutAccountSettingsCommand")
803
+ .f(void 0, void 0)
804
+ .ser(se_PutAccountSettingsCommand)
805
+ .de(de_PutAccountSettingsCommand)
806
+ .build() {
807
+ }
808
+
809
+ const commands = {
810
+ GetAccountSettingsCommand,
811
+ GetReportCommand,
812
+ GetReportMetadataCommand,
813
+ GetTermForReportCommand,
814
+ ListCustomerAgreementsCommand,
815
+ ListReportsCommand,
816
+ PutAccountSettingsCommand,
817
+ };
818
+ class Artifact extends ArtifactClient {
819
+ }
820
+ smithyClient.createAggregatedClient(commands, Artifact);
1021
821
 
1022
- // src/pagination/ListReportsPaginator.ts
822
+ const paginateListCustomerAgreements = core.createPaginator(ArtifactClient, ListCustomerAgreementsCommand, "nextToken", "nextToken", "maxResults");
1023
823
 
1024
- var paginateListReports = (0, import_core.createPaginator)(ArtifactClient, ListReportsCommand, "nextToken", "nextToken", "maxResults");
1025
- // Annotate the CommonJS export names for ESM import in node:
824
+ const paginateListReports = core.createPaginator(ArtifactClient, ListReportsCommand, "nextToken", "nextToken", "maxResults");
1026
825
 
1027
- 0 && (module.exports = {
1028
- ArtifactServiceException,
1029
- __Client,
1030
- ArtifactClient,
1031
- Artifact,
1032
- $Command,
1033
- GetAccountSettingsCommand,
1034
- GetReportCommand,
1035
- GetReportMetadataCommand,
1036
- GetTermForReportCommand,
1037
- ListCustomerAgreementsCommand,
1038
- ListReportsCommand,
1039
- PutAccountSettingsCommand,
1040
- paginateListCustomerAgreements,
1041
- paginateListReports,
1042
- AcceptanceType,
1043
- AccessDeniedException,
1044
- NotificationSubscriptionStatus,
1045
- ConflictException,
1046
- InternalServerException,
1047
- ResourceNotFoundException,
1048
- ServiceQuotaExceededException,
1049
- ThrottlingException,
1050
- ValidationExceptionReason,
1051
- ValidationException,
1052
- AgreementType,
1053
- CustomerAgreementState,
1054
- PublishedState,
1055
- UploadState
826
+ Object.defineProperty(exports, "$Command", {
827
+ enumerable: true,
828
+ get: function () { return smithyClient.Command; }
1056
829
  });
1057
-
830
+ Object.defineProperty(exports, "__Client", {
831
+ enumerable: true,
832
+ get: function () { return smithyClient.Client; }
833
+ });
834
+ exports.AcceptanceType = AcceptanceType;
835
+ exports.AccessDeniedException = AccessDeniedException;
836
+ exports.AgreementType = AgreementType;
837
+ exports.Artifact = Artifact;
838
+ exports.ArtifactClient = ArtifactClient;
839
+ exports.ArtifactServiceException = ArtifactServiceException;
840
+ exports.ConflictException = ConflictException;
841
+ exports.CustomerAgreementState = CustomerAgreementState;
842
+ exports.GetAccountSettingsCommand = GetAccountSettingsCommand;
843
+ exports.GetReportCommand = GetReportCommand;
844
+ exports.GetReportMetadataCommand = GetReportMetadataCommand;
845
+ exports.GetTermForReportCommand = GetTermForReportCommand;
846
+ exports.InternalServerException = InternalServerException;
847
+ exports.ListCustomerAgreementsCommand = ListCustomerAgreementsCommand;
848
+ exports.ListReportsCommand = ListReportsCommand;
849
+ exports.NotificationSubscriptionStatus = NotificationSubscriptionStatus;
850
+ exports.PublishedState = PublishedState;
851
+ exports.PutAccountSettingsCommand = PutAccountSettingsCommand;
852
+ exports.ResourceNotFoundException = ResourceNotFoundException;
853
+ exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
854
+ exports.ThrottlingException = ThrottlingException;
855
+ exports.UploadState = UploadState;
856
+ exports.ValidationException = ValidationException;
857
+ exports.ValidationExceptionReason = ValidationExceptionReason;
858
+ exports.paginateListCustomerAgreements = paginateListCustomerAgreements;
859
+ exports.paginateListReports = paginateListReports;