@aws-sdk/client-applicationcostprofiler 3.901.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 +597 -717
  2. package/package.json +5 -5
package/dist-cjs/index.js CHANGED
@@ -1,750 +1,630 @@
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: "application-cost-profiler",
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
- AccessDeniedException: () => AccessDeniedException,
25
- ApplicationCostProfiler: () => ApplicationCostProfiler,
26
- ApplicationCostProfilerClient: () => ApplicationCostProfilerClient,
27
- ApplicationCostProfilerServiceException: () => ApplicationCostProfilerServiceException,
28
- DeleteReportDefinitionCommand: () => DeleteReportDefinitionCommand,
29
- Format: () => Format,
30
- GetReportDefinitionCommand: () => GetReportDefinitionCommand,
31
- ImportApplicationUsageCommand: () => ImportApplicationUsageCommand,
32
- InternalServerException: () => InternalServerException,
33
- ListReportDefinitionsCommand: () => ListReportDefinitionsCommand,
34
- PutReportDefinitionCommand: () => PutReportDefinitionCommand,
35
- ReportFrequency: () => ReportFrequency,
36
- S3BucketRegion: () => S3BucketRegion,
37
- ServiceQuotaExceededException: () => ServiceQuotaExceededException,
38
- ThrottlingException: () => ThrottlingException,
39
- UpdateReportDefinitionCommand: () => UpdateReportDefinitionCommand,
40
- ValidationException: () => ValidationException,
41
- __Client: () => import_smithy_client.Client,
42
- paginateListReportDefinitions: () => paginateListReportDefinitions
43
- });
44
- module.exports = __toCommonJS(index_exports);
45
33
 
46
- // src/ApplicationCostProfilerClient.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: "application-cost-profiler"
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" }
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
+ };
72
71
  };
73
72
 
74
- // src/ApplicationCostProfilerClient.ts
75
- var import_runtimeConfig = require("././runtimeConfig");
76
-
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 ApplicationCostProfilerClient 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.defaultApplicationCostProfilerHttpAuthSchemeParametersProvider,
102
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
103
+ "aws.auth#sigv4": config.credentials,
104
+ }),
105
+ }));
106
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
110
107
  }
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");
120
-
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");
108
+ destroy() {
109
+ super.destroy();
110
+ }
111
+ }
138
112
 
139
- // src/ApplicationCostProfilerClient.ts
140
- var ApplicationCostProfilerClient = class extends import_smithy_client.Client {
141
- static {
142
- __name(this, "ApplicationCostProfilerClient");
143
- }
144
- /**
145
- * The resolved configuration of ApplicationCostProfilerClient class. This is resolved and normalized from the {@link ApplicationCostProfilerClientConfig | 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.defaultApplicationCostProfilerHttpAuthSchemeParametersProvider,
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
- }
113
+ class ApplicationCostProfilerServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, ApplicationCostProfilerServiceException.prototype);
117
+ }
118
+ }
119
+
120
+ class AccessDeniedException extends ApplicationCostProfilerServiceException {
121
+ name = "AccessDeniedException";
122
+ $fault = "client";
123
+ constructor(opts) {
124
+ super({
125
+ name: "AccessDeniedException",
126
+ $fault: "client",
127
+ ...opts,
128
+ });
129
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
130
+ }
131
+ }
132
+ class InternalServerException extends ApplicationCostProfilerServiceException {
133
+ name = "InternalServerException";
134
+ $fault = "server";
135
+ constructor(opts) {
136
+ super({
137
+ name: "InternalServerException",
138
+ $fault: "server",
139
+ ...opts,
140
+ });
141
+ Object.setPrototypeOf(this, InternalServerException.prototype);
142
+ }
143
+ }
144
+ class ThrottlingException extends ApplicationCostProfilerServiceException {
145
+ name = "ThrottlingException";
146
+ $fault = "client";
147
+ constructor(opts) {
148
+ super({
149
+ name: "ThrottlingException",
150
+ $fault: "client",
151
+ ...opts,
152
+ });
153
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
154
+ }
155
+ }
156
+ class ValidationException extends ApplicationCostProfilerServiceException {
157
+ name = "ValidationException";
158
+ $fault = "client";
159
+ constructor(opts) {
160
+ super({
161
+ name: "ValidationException",
162
+ $fault: "client",
163
+ ...opts,
164
+ });
165
+ Object.setPrototypeOf(this, ValidationException.prototype);
166
+ }
167
+ }
168
+ const Format = {
169
+ CSV: "CSV",
170
+ PARQUET: "PARQUET",
185
171
  };
186
-
187
- // src/ApplicationCostProfiler.ts
188
-
189
-
190
- // src/commands/DeleteReportDefinitionCommand.ts
191
-
192
- var import_middleware_serde = require("@smithy/middleware-serde");
193
-
194
-
195
- // src/protocols/Aws_restJson1.ts
196
- var import_core2 = require("@aws-sdk/core");
197
-
198
-
199
-
200
- // src/models/ApplicationCostProfilerServiceException.ts
201
-
202
- var ApplicationCostProfilerServiceException = class _ApplicationCostProfilerServiceException extends import_smithy_client.ServiceException {
203
- static {
204
- __name(this, "ApplicationCostProfilerServiceException");
205
- }
206
- /**
207
- * @internal
208
- */
209
- constructor(options) {
210
- super(options);
211
- Object.setPrototypeOf(this, _ApplicationCostProfilerServiceException.prototype);
212
- }
172
+ const ReportFrequency = {
173
+ ALL: "ALL",
174
+ DAILY: "DAILY",
175
+ MONTHLY: "MONTHLY",
213
176
  };
214
-
215
- // src/models/models_0.ts
216
- var AccessDeniedException = class _AccessDeniedException extends ApplicationCostProfilerServiceException {
217
- static {
218
- __name(this, "AccessDeniedException");
219
- }
220
- name = "AccessDeniedException";
221
- $fault = "client";
222
- /**
223
- * @internal
224
- */
225
- constructor(opts) {
226
- super({
227
- name: "AccessDeniedException",
228
- $fault: "client",
229
- ...opts
230
- });
231
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
232
- }
177
+ const S3BucketRegion = {
178
+ AF_SOUTH_1: "af-south-1",
179
+ AP_EAST_1: "ap-east-1",
180
+ EU_SOUTH_1: "eu-south-1",
181
+ ME_SOUTH_1: "me-south-1",
182
+ };
183
+ class ServiceQuotaExceededException extends ApplicationCostProfilerServiceException {
184
+ name = "ServiceQuotaExceededException";
185
+ $fault = "client";
186
+ constructor(opts) {
187
+ super({
188
+ name: "ServiceQuotaExceededException",
189
+ $fault: "client",
190
+ ...opts,
191
+ });
192
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
193
+ }
194
+ }
195
+
196
+ const se_DeleteReportDefinitionCommand = async (input, context) => {
197
+ const b = core.requestBuilder(input, context);
198
+ const headers = {};
199
+ b.bp("/reportDefinition/{reportId}");
200
+ b.p("reportId", () => input.reportId, "{reportId}", false);
201
+ let body;
202
+ b.m("DELETE").h(headers).b(body);
203
+ return b.build();
233
204
  };
234
- var InternalServerException = class _InternalServerException extends ApplicationCostProfilerServiceException {
235
- static {
236
- __name(this, "InternalServerException");
237
- }
238
- name = "InternalServerException";
239
- $fault = "server";
240
- /**
241
- * @internal
242
- */
243
- constructor(opts) {
244
- super({
245
- name: "InternalServerException",
246
- $fault: "server",
247
- ...opts
205
+ const se_GetReportDefinitionCommand = async (input, context) => {
206
+ const b = core.requestBuilder(input, context);
207
+ const headers = {};
208
+ b.bp("/reportDefinition/{reportId}");
209
+ b.p("reportId", () => input.reportId, "{reportId}", false);
210
+ let body;
211
+ b.m("GET").h(headers).b(body);
212
+ return b.build();
213
+ };
214
+ const se_ImportApplicationUsageCommand = async (input, context) => {
215
+ const b = core.requestBuilder(input, context);
216
+ const headers = {
217
+ "content-type": "application/json",
218
+ };
219
+ b.bp("/importApplicationUsage");
220
+ let body;
221
+ body = JSON.stringify(smithyClient.take(input, {
222
+ sourceS3Location: (_) => smithyClient._json(_),
223
+ }));
224
+ b.m("POST").h(headers).b(body);
225
+ return b.build();
226
+ };
227
+ const se_ListReportDefinitionsCommand = async (input, context) => {
228
+ const b = core.requestBuilder(input, context);
229
+ const headers = {};
230
+ b.bp("/reportDefinition");
231
+ const query = smithyClient.map({
232
+ [_nT]: [, input[_nT]],
233
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
248
234
  });
249
- Object.setPrototypeOf(this, _InternalServerException.prototype);
250
- }
235
+ let body;
236
+ b.m("GET").h(headers).q(query).b(body);
237
+ return b.build();
238
+ };
239
+ const se_PutReportDefinitionCommand = async (input, context) => {
240
+ const b = core.requestBuilder(input, context);
241
+ const headers = {
242
+ "content-type": "application/json",
243
+ };
244
+ b.bp("/reportDefinition");
245
+ let body;
246
+ body = JSON.stringify(smithyClient.take(input, {
247
+ destinationS3Location: (_) => smithyClient._json(_),
248
+ format: [],
249
+ reportDescription: [],
250
+ reportFrequency: [],
251
+ reportId: [],
252
+ }));
253
+ b.m("POST").h(headers).b(body);
254
+ return b.build();
251
255
  };
252
- var ThrottlingException = class _ThrottlingException extends ApplicationCostProfilerServiceException {
253
- static {
254
- __name(this, "ThrottlingException");
255
- }
256
- name = "ThrottlingException";
257
- $fault = "client";
258
- /**
259
- * @internal
260
- */
261
- constructor(opts) {
262
- super({
263
- name: "ThrottlingException",
264
- $fault: "client",
265
- ...opts
256
+ const se_UpdateReportDefinitionCommand = async (input, context) => {
257
+ const b = core.requestBuilder(input, context);
258
+ const headers = {
259
+ "content-type": "application/json",
260
+ };
261
+ b.bp("/reportDefinition/{reportId}");
262
+ b.p("reportId", () => input.reportId, "{reportId}", false);
263
+ let body;
264
+ body = JSON.stringify(smithyClient.take(input, {
265
+ destinationS3Location: (_) => smithyClient._json(_),
266
+ format: [],
267
+ reportDescription: [],
268
+ reportFrequency: [],
269
+ }));
270
+ b.m("PUT").h(headers).b(body);
271
+ return b.build();
272
+ };
273
+ const de_DeleteReportDefinitionCommand = async (output, context) => {
274
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
275
+ return de_CommandError(output, context);
276
+ }
277
+ const contents = smithyClient.map({
278
+ $metadata: deserializeMetadata(output),
266
279
  });
267
- Object.setPrototypeOf(this, _ThrottlingException.prototype);
268
- }
280
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
281
+ const doc = smithyClient.take(data, {
282
+ reportId: smithyClient.expectString,
283
+ });
284
+ Object.assign(contents, doc);
285
+ return contents;
269
286
  };
270
- var ValidationException = class _ValidationException extends ApplicationCostProfilerServiceException {
271
- static {
272
- __name(this, "ValidationException");
273
- }
274
- name = "ValidationException";
275
- $fault = "client";
276
- /**
277
- * @internal
278
- */
279
- constructor(opts) {
280
- super({
281
- name: "ValidationException",
282
- $fault: "client",
283
- ...opts
287
+ const de_GetReportDefinitionCommand = async (output, context) => {
288
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
289
+ return de_CommandError(output, context);
290
+ }
291
+ const contents = smithyClient.map({
292
+ $metadata: deserializeMetadata(output),
293
+ });
294
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
295
+ const doc = smithyClient.take(data, {
296
+ createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
297
+ destinationS3Location: smithyClient._json,
298
+ format: smithyClient.expectString,
299
+ lastUpdated: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
300
+ reportDescription: smithyClient.expectString,
301
+ reportFrequency: smithyClient.expectString,
302
+ reportId: smithyClient.expectString,
284
303
  });
285
- Object.setPrototypeOf(this, _ValidationException.prototype);
286
- }
304
+ Object.assign(contents, doc);
305
+ return contents;
287
306
  };
288
- var Format = {
289
- CSV: "CSV",
290
- PARQUET: "PARQUET"
307
+ const de_ImportApplicationUsageCommand = async (output, context) => {
308
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
309
+ return de_CommandError(output, context);
310
+ }
311
+ const contents = smithyClient.map({
312
+ $metadata: deserializeMetadata(output),
313
+ });
314
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
315
+ const doc = smithyClient.take(data, {
316
+ importId: smithyClient.expectString,
317
+ });
318
+ Object.assign(contents, doc);
319
+ return contents;
291
320
  };
292
- var ReportFrequency = {
293
- ALL: "ALL",
294
- DAILY: "DAILY",
295
- MONTHLY: "MONTHLY"
321
+ const de_ListReportDefinitionsCommand = async (output, context) => {
322
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
323
+ return de_CommandError(output, context);
324
+ }
325
+ const contents = smithyClient.map({
326
+ $metadata: deserializeMetadata(output),
327
+ });
328
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
329
+ const doc = smithyClient.take(data, {
330
+ nextToken: smithyClient.expectString,
331
+ reportDefinitions: (_) => de_ReportDefinitionList(_),
332
+ });
333
+ Object.assign(contents, doc);
334
+ return contents;
296
335
  };
297
- var S3BucketRegion = {
298
- AF_SOUTH_1: "af-south-1",
299
- AP_EAST_1: "ap-east-1",
300
- EU_SOUTH_1: "eu-south-1",
301
- ME_SOUTH_1: "me-south-1"
336
+ const de_PutReportDefinitionCommand = async (output, context) => {
337
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
338
+ return de_CommandError(output, context);
339
+ }
340
+ const contents = smithyClient.map({
341
+ $metadata: deserializeMetadata(output),
342
+ });
343
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
344
+ const doc = smithyClient.take(data, {
345
+ reportId: smithyClient.expectString,
346
+ });
347
+ Object.assign(contents, doc);
348
+ return contents;
302
349
  };
303
- var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends ApplicationCostProfilerServiceException {
304
- static {
305
- __name(this, "ServiceQuotaExceededException");
306
- }
307
- name = "ServiceQuotaExceededException";
308
- $fault = "client";
309
- /**
310
- * @internal
311
- */
312
- constructor(opts) {
313
- super({
314
- name: "ServiceQuotaExceededException",
315
- $fault: "client",
316
- ...opts
350
+ const de_UpdateReportDefinitionCommand = async (output, context) => {
351
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
352
+ return de_CommandError(output, context);
353
+ }
354
+ const contents = smithyClient.map({
355
+ $metadata: deserializeMetadata(output),
356
+ });
357
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
358
+ const doc = smithyClient.take(data, {
359
+ reportId: smithyClient.expectString,
317
360
  });
318
- Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
319
- }
361
+ Object.assign(contents, doc);
362
+ return contents;
320
363
  };
321
-
322
- // src/protocols/Aws_restJson1.ts
323
- var se_DeleteReportDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
324
- const b = (0, import_core.requestBuilder)(input, context);
325
- const headers = {};
326
- b.bp("/reportDefinition/{reportId}");
327
- b.p("reportId", () => input.reportId, "{reportId}", false);
328
- let body;
329
- b.m("DELETE").h(headers).b(body);
330
- return b.build();
331
- }, "se_DeleteReportDefinitionCommand");
332
- var se_GetReportDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
333
- const b = (0, import_core.requestBuilder)(input, context);
334
- const headers = {};
335
- b.bp("/reportDefinition/{reportId}");
336
- b.p("reportId", () => input.reportId, "{reportId}", false);
337
- let body;
338
- b.m("GET").h(headers).b(body);
339
- return b.build();
340
- }, "se_GetReportDefinitionCommand");
341
- var se_ImportApplicationUsageCommand = /* @__PURE__ */ __name(async (input, context) => {
342
- const b = (0, import_core.requestBuilder)(input, context);
343
- const headers = {
344
- "content-type": "application/json"
345
- };
346
- b.bp("/importApplicationUsage");
347
- let body;
348
- body = JSON.stringify(
349
- (0, import_smithy_client.take)(input, {
350
- sourceS3Location: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "sourceS3Location")
351
- })
352
- );
353
- b.m("POST").h(headers).b(body);
354
- return b.build();
355
- }, "se_ImportApplicationUsageCommand");
356
- var se_ListReportDefinitionsCommand = /* @__PURE__ */ __name(async (input, context) => {
357
- const b = (0, import_core.requestBuilder)(input, context);
358
- const headers = {};
359
- b.bp("/reportDefinition");
360
- const query = (0, import_smithy_client.map)({
361
- [_nT]: [, input[_nT]],
362
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()]
363
- });
364
- let body;
365
- b.m("GET").h(headers).q(query).b(body);
366
- return b.build();
367
- }, "se_ListReportDefinitionsCommand");
368
- var se_PutReportDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
369
- const b = (0, import_core.requestBuilder)(input, context);
370
- const headers = {
371
- "content-type": "application/json"
372
- };
373
- b.bp("/reportDefinition");
374
- let body;
375
- body = JSON.stringify(
376
- (0, import_smithy_client.take)(input, {
377
- destinationS3Location: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "destinationS3Location"),
378
- format: [],
379
- reportDescription: [],
380
- reportFrequency: [],
381
- reportId: []
382
- })
383
- );
384
- b.m("POST").h(headers).b(body);
385
- return b.build();
386
- }, "se_PutReportDefinitionCommand");
387
- var se_UpdateReportDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
388
- const b = (0, import_core.requestBuilder)(input, context);
389
- const headers = {
390
- "content-type": "application/json"
391
- };
392
- b.bp("/reportDefinition/{reportId}");
393
- b.p("reportId", () => input.reportId, "{reportId}", false);
394
- let body;
395
- body = JSON.stringify(
396
- (0, import_smithy_client.take)(input, {
397
- destinationS3Location: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "destinationS3Location"),
398
- format: [],
399
- reportDescription: [],
400
- reportFrequency: []
401
- })
402
- );
403
- b.m("PUT").h(headers).b(body);
404
- return b.build();
405
- }, "se_UpdateReportDefinitionCommand");
406
- var de_DeleteReportDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
407
- if (output.statusCode !== 200 && output.statusCode >= 300) {
408
- return de_CommandError(output, context);
409
- }
410
- const contents = (0, import_smithy_client.map)({
411
- $metadata: deserializeMetadata(output)
412
- });
413
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
414
- const doc = (0, import_smithy_client.take)(data, {
415
- reportId: import_smithy_client.expectString
416
- });
417
- Object.assign(contents, doc);
418
- return contents;
419
- }, "de_DeleteReportDefinitionCommand");
420
- var de_GetReportDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
421
- if (output.statusCode !== 200 && output.statusCode >= 300) {
422
- return de_CommandError(output, context);
423
- }
424
- const contents = (0, import_smithy_client.map)({
425
- $metadata: deserializeMetadata(output)
426
- });
427
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
428
- const doc = (0, import_smithy_client.take)(data, {
429
- createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"),
430
- destinationS3Location: import_smithy_client._json,
431
- format: import_smithy_client.expectString,
432
- lastUpdated: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "lastUpdated"),
433
- reportDescription: import_smithy_client.expectString,
434
- reportFrequency: import_smithy_client.expectString,
435
- reportId: import_smithy_client.expectString
436
- });
437
- Object.assign(contents, doc);
438
- return contents;
439
- }, "de_GetReportDefinitionCommand");
440
- var de_ImportApplicationUsageCommand = /* @__PURE__ */ __name(async (output, context) => {
441
- if (output.statusCode !== 200 && output.statusCode >= 300) {
442
- return de_CommandError(output, context);
443
- }
444
- const contents = (0, import_smithy_client.map)({
445
- $metadata: deserializeMetadata(output)
446
- });
447
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
448
- const doc = (0, import_smithy_client.take)(data, {
449
- importId: import_smithy_client.expectString
450
- });
451
- Object.assign(contents, doc);
452
- return contents;
453
- }, "de_ImportApplicationUsageCommand");
454
- var de_ListReportDefinitionsCommand = /* @__PURE__ */ __name(async (output, context) => {
455
- if (output.statusCode !== 200 && output.statusCode >= 300) {
456
- return de_CommandError(output, context);
457
- }
458
- const contents = (0, import_smithy_client.map)({
459
- $metadata: deserializeMetadata(output)
460
- });
461
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
462
- const doc = (0, import_smithy_client.take)(data, {
463
- nextToken: import_smithy_client.expectString,
464
- reportDefinitions: /* @__PURE__ */ __name((_) => de_ReportDefinitionList(_, context), "reportDefinitions")
465
- });
466
- Object.assign(contents, doc);
467
- return contents;
468
- }, "de_ListReportDefinitionsCommand");
469
- var de_PutReportDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
470
- if (output.statusCode !== 200 && output.statusCode >= 300) {
471
- return de_CommandError(output, context);
472
- }
473
- const contents = (0, import_smithy_client.map)({
474
- $metadata: deserializeMetadata(output)
475
- });
476
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
477
- const doc = (0, import_smithy_client.take)(data, {
478
- reportId: import_smithy_client.expectString
479
- });
480
- Object.assign(contents, doc);
481
- return contents;
482
- }, "de_PutReportDefinitionCommand");
483
- var de_UpdateReportDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => {
484
- if (output.statusCode !== 200 && output.statusCode >= 300) {
485
- return de_CommandError(output, context);
486
- }
487
- const contents = (0, import_smithy_client.map)({
488
- $metadata: deserializeMetadata(output)
489
- });
490
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
491
- const doc = (0, import_smithy_client.take)(data, {
492
- reportId: import_smithy_client.expectString
493
- });
494
- Object.assign(contents, doc);
495
- return contents;
496
- }, "de_UpdateReportDefinitionCommand");
497
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
498
- const parsedOutput = {
499
- ...output,
500
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
501
- };
502
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
503
- switch (errorCode) {
504
- case "AccessDeniedException":
505
- case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
506
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
507
- case "InternalServerException":
508
- case "com.amazonaws.applicationcostprofiler#InternalServerException":
509
- throw await de_InternalServerExceptionRes(parsedOutput, context);
510
- case "ThrottlingException":
511
- case "com.amazonaws.applicationcostprofiler#ThrottlingException":
512
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
513
- case "ValidationException":
514
- case "com.amazonaws.applicationcostprofiler#ValidationException":
515
- throw await de_ValidationExceptionRes(parsedOutput, context);
516
- case "ServiceQuotaExceededException":
517
- case "com.amazonaws.applicationcostprofiler#ServiceQuotaExceededException":
518
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
519
- default:
520
- const parsedBody = parsedOutput.body;
521
- return throwDefaultError({
522
- output,
523
- parsedBody,
524
- errorCode
525
- });
526
- }
527
- }, "de_CommandError");
528
- var throwDefaultError = (0, import_smithy_client.withBaseException)(ApplicationCostProfilerServiceException);
529
- var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
530
- const contents = (0, import_smithy_client.map)({});
531
- const data = parsedOutput.body;
532
- const doc = (0, import_smithy_client.take)(data, {
533
- message: import_smithy_client.expectString
534
- });
535
- Object.assign(contents, doc);
536
- const exception = new AccessDeniedException({
537
- $metadata: deserializeMetadata(parsedOutput),
538
- ...contents
539
- });
540
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
541
- }, "de_AccessDeniedExceptionRes");
542
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
543
- const contents = (0, import_smithy_client.map)({});
544
- const data = parsedOutput.body;
545
- const doc = (0, import_smithy_client.take)(data, {
546
- message: import_smithy_client.expectString
547
- });
548
- Object.assign(contents, doc);
549
- const exception = new InternalServerException({
550
- $metadata: deserializeMetadata(parsedOutput),
551
- ...contents
552
- });
553
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
554
- }, "de_InternalServerExceptionRes");
555
- var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
556
- const contents = (0, import_smithy_client.map)({});
557
- const data = parsedOutput.body;
558
- const doc = (0, import_smithy_client.take)(data, {
559
- message: import_smithy_client.expectString
560
- });
561
- Object.assign(contents, doc);
562
- const exception = new ServiceQuotaExceededException({
563
- $metadata: deserializeMetadata(parsedOutput),
564
- ...contents
565
- });
566
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
567
- }, "de_ServiceQuotaExceededExceptionRes");
568
- var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
569
- const contents = (0, import_smithy_client.map)({});
570
- const data = parsedOutput.body;
571
- const doc = (0, import_smithy_client.take)(data, {
572
- message: import_smithy_client.expectString
573
- });
574
- Object.assign(contents, doc);
575
- const exception = new ThrottlingException({
576
- $metadata: deserializeMetadata(parsedOutput),
577
- ...contents
578
- });
579
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
580
- }, "de_ThrottlingExceptionRes");
581
- var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
582
- const contents = (0, import_smithy_client.map)({});
583
- const data = parsedOutput.body;
584
- const doc = (0, import_smithy_client.take)(data, {
585
- message: import_smithy_client.expectString
586
- });
587
- Object.assign(contents, doc);
588
- const exception = new ValidationException({
589
- $metadata: deserializeMetadata(parsedOutput),
590
- ...contents
591
- });
592
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
593
- }, "de_ValidationExceptionRes");
594
- var de_ReportDefinition = /* @__PURE__ */ __name((output, context) => {
595
- return (0, import_smithy_client.take)(output, {
596
- createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"),
597
- destinationS3Location: import_smithy_client._json,
598
- format: import_smithy_client.expectString,
599
- lastUpdatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "lastUpdatedAt"),
600
- reportDescription: import_smithy_client.expectString,
601
- reportFrequency: import_smithy_client.expectString,
602
- reportId: import_smithy_client.expectString
603
- });
604
- }, "de_ReportDefinition");
605
- var de_ReportDefinitionList = /* @__PURE__ */ __name((output, context) => {
606
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
607
- return de_ReportDefinition(entry, context);
608
- });
609
- return retVal;
610
- }, "de_ReportDefinitionList");
611
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
612
- httpStatusCode: output.statusCode,
613
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
614
- extendedRequestId: output.headers["x-amz-id-2"],
615
- cfId: output.headers["x-amz-cf-id"]
616
- }), "deserializeMetadata");
617
- var _mR = "maxResults";
618
- var _nT = "nextToken";
619
-
620
- // src/commands/DeleteReportDefinitionCommand.ts
621
- var DeleteReportDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
622
- return [
623
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
624
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
625
- ];
626
- }).s("AWSApplicationCostProfiler", "DeleteReportDefinition", {}).n("ApplicationCostProfilerClient", "DeleteReportDefinitionCommand").f(void 0, void 0).ser(se_DeleteReportDefinitionCommand).de(de_DeleteReportDefinitionCommand).build() {
627
- static {
628
- __name(this, "DeleteReportDefinitionCommand");
629
- }
364
+ const de_CommandError = async (output, context) => {
365
+ const parsedOutput = {
366
+ ...output,
367
+ body: await core$1.parseJsonErrorBody(output.body, context),
368
+ };
369
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
370
+ switch (errorCode) {
371
+ case "AccessDeniedException":
372
+ case "com.amazonaws.applicationcostprofiler#AccessDeniedException":
373
+ throw await de_AccessDeniedExceptionRes(parsedOutput);
374
+ case "InternalServerException":
375
+ case "com.amazonaws.applicationcostprofiler#InternalServerException":
376
+ throw await de_InternalServerExceptionRes(parsedOutput);
377
+ case "ThrottlingException":
378
+ case "com.amazonaws.applicationcostprofiler#ThrottlingException":
379
+ throw await de_ThrottlingExceptionRes(parsedOutput);
380
+ case "ValidationException":
381
+ case "com.amazonaws.applicationcostprofiler#ValidationException":
382
+ throw await de_ValidationExceptionRes(parsedOutput);
383
+ case "ServiceQuotaExceededException":
384
+ case "com.amazonaws.applicationcostprofiler#ServiceQuotaExceededException":
385
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput);
386
+ default:
387
+ const parsedBody = parsedOutput.body;
388
+ return throwDefaultError({
389
+ output,
390
+ parsedBody,
391
+ errorCode,
392
+ });
393
+ }
630
394
  };
631
-
632
- // src/commands/GetReportDefinitionCommand.ts
633
-
634
-
635
-
636
- var GetReportDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
637
- return [
638
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
639
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
640
- ];
641
- }).s("AWSApplicationCostProfiler", "GetReportDefinition", {}).n("ApplicationCostProfilerClient", "GetReportDefinitionCommand").f(void 0, void 0).ser(se_GetReportDefinitionCommand).de(de_GetReportDefinitionCommand).build() {
642
- static {
643
- __name(this, "GetReportDefinitionCommand");
644
- }
395
+ const throwDefaultError = smithyClient.withBaseException(ApplicationCostProfilerServiceException);
396
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
397
+ const contents = smithyClient.map({});
398
+ const data = parsedOutput.body;
399
+ const doc = smithyClient.take(data, {
400
+ message: smithyClient.expectString,
401
+ });
402
+ Object.assign(contents, doc);
403
+ const exception = new AccessDeniedException({
404
+ $metadata: deserializeMetadata(parsedOutput),
405
+ ...contents,
406
+ });
407
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
645
408
  };
646
-
647
- // src/commands/ImportApplicationUsageCommand.ts
648
-
649
-
650
-
651
- var ImportApplicationUsageCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
652
- return [
653
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
654
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
655
- ];
656
- }).s("AWSApplicationCostProfiler", "ImportApplicationUsage", {}).n("ApplicationCostProfilerClient", "ImportApplicationUsageCommand").f(void 0, void 0).ser(se_ImportApplicationUsageCommand).de(de_ImportApplicationUsageCommand).build() {
657
- static {
658
- __name(this, "ImportApplicationUsageCommand");
659
- }
409
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
410
+ const contents = smithyClient.map({});
411
+ const data = parsedOutput.body;
412
+ const doc = smithyClient.take(data, {
413
+ message: smithyClient.expectString,
414
+ });
415
+ Object.assign(contents, doc);
416
+ const exception = new InternalServerException({
417
+ $metadata: deserializeMetadata(parsedOutput),
418
+ ...contents,
419
+ });
420
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
660
421
  };
661
-
662
- // src/commands/ListReportDefinitionsCommand.ts
663
-
664
-
665
-
666
- var ListReportDefinitionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
667
- return [
668
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
669
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
670
- ];
671
- }).s("AWSApplicationCostProfiler", "ListReportDefinitions", {}).n("ApplicationCostProfilerClient", "ListReportDefinitionsCommand").f(void 0, void 0).ser(se_ListReportDefinitionsCommand).de(de_ListReportDefinitionsCommand).build() {
672
- static {
673
- __name(this, "ListReportDefinitionsCommand");
674
- }
422
+ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
423
+ const contents = smithyClient.map({});
424
+ const data = parsedOutput.body;
425
+ const doc = smithyClient.take(data, {
426
+ message: smithyClient.expectString,
427
+ });
428
+ Object.assign(contents, doc);
429
+ const exception = new ServiceQuotaExceededException({
430
+ $metadata: deserializeMetadata(parsedOutput),
431
+ ...contents,
432
+ });
433
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
675
434
  };
676
-
677
- // src/commands/PutReportDefinitionCommand.ts
678
-
679
-
680
-
681
- var PutReportDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
682
- return [
683
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
684
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
685
- ];
686
- }).s("AWSApplicationCostProfiler", "PutReportDefinition", {}).n("ApplicationCostProfilerClient", "PutReportDefinitionCommand").f(void 0, void 0).ser(se_PutReportDefinitionCommand).de(de_PutReportDefinitionCommand).build() {
687
- static {
688
- __name(this, "PutReportDefinitionCommand");
689
- }
435
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
436
+ const contents = smithyClient.map({});
437
+ const data = parsedOutput.body;
438
+ const doc = smithyClient.take(data, {
439
+ message: smithyClient.expectString,
440
+ });
441
+ Object.assign(contents, doc);
442
+ const exception = new ThrottlingException({
443
+ $metadata: deserializeMetadata(parsedOutput),
444
+ ...contents,
445
+ });
446
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
690
447
  };
691
-
692
- // src/commands/UpdateReportDefinitionCommand.ts
693
-
694
-
695
-
696
- var UpdateReportDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
697
- return [
698
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
699
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
700
- ];
701
- }).s("AWSApplicationCostProfiler", "UpdateReportDefinition", {}).n("ApplicationCostProfilerClient", "UpdateReportDefinitionCommand").f(void 0, void 0).ser(se_UpdateReportDefinitionCommand).de(de_UpdateReportDefinitionCommand).build() {
702
- static {
703
- __name(this, "UpdateReportDefinitionCommand");
704
- }
448
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
449
+ const contents = smithyClient.map({});
450
+ const data = parsedOutput.body;
451
+ const doc = smithyClient.take(data, {
452
+ message: smithyClient.expectString,
453
+ });
454
+ Object.assign(contents, doc);
455
+ const exception = new ValidationException({
456
+ $metadata: deserializeMetadata(parsedOutput),
457
+ ...contents,
458
+ });
459
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
705
460
  };
706
-
707
- // src/ApplicationCostProfiler.ts
708
- var commands = {
709
- DeleteReportDefinitionCommand,
710
- GetReportDefinitionCommand,
711
- ImportApplicationUsageCommand,
712
- ListReportDefinitionsCommand,
713
- PutReportDefinitionCommand,
714
- UpdateReportDefinitionCommand
461
+ const de_ReportDefinition = (output, context) => {
462
+ return smithyClient.take(output, {
463
+ createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
464
+ destinationS3Location: smithyClient._json,
465
+ format: smithyClient.expectString,
466
+ lastUpdatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
467
+ reportDescription: smithyClient.expectString,
468
+ reportFrequency: smithyClient.expectString,
469
+ reportId: smithyClient.expectString,
470
+ });
715
471
  };
716
- var ApplicationCostProfiler = class extends ApplicationCostProfilerClient {
717
- static {
718
- __name(this, "ApplicationCostProfiler");
719
- }
472
+ const de_ReportDefinitionList = (output, context) => {
473
+ const retVal = (output || [])
474
+ .filter((e) => e != null)
475
+ .map((entry) => {
476
+ return de_ReportDefinition(entry);
477
+ });
478
+ return retVal;
720
479
  };
721
- (0, import_smithy_client.createAggregatedClient)(commands, ApplicationCostProfiler);
722
-
723
- // src/pagination/ListReportDefinitionsPaginator.ts
480
+ const deserializeMetadata = (output) => ({
481
+ httpStatusCode: output.statusCode,
482
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
483
+ extendedRequestId: output.headers["x-amz-id-2"],
484
+ cfId: output.headers["x-amz-cf-id"],
485
+ });
486
+ const _mR = "maxResults";
487
+ const _nT = "nextToken";
488
+
489
+ class DeleteReportDefinitionCommand extends smithyClient.Command
490
+ .classBuilder()
491
+ .ep(commonParams)
492
+ .m(function (Command, cs, config, o) {
493
+ return [
494
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
495
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
496
+ ];
497
+ })
498
+ .s("AWSApplicationCostProfiler", "DeleteReportDefinition", {})
499
+ .n("ApplicationCostProfilerClient", "DeleteReportDefinitionCommand")
500
+ .f(void 0, void 0)
501
+ .ser(se_DeleteReportDefinitionCommand)
502
+ .de(de_DeleteReportDefinitionCommand)
503
+ .build() {
504
+ }
505
+
506
+ class GetReportDefinitionCommand extends smithyClient.Command
507
+ .classBuilder()
508
+ .ep(commonParams)
509
+ .m(function (Command, cs, config, o) {
510
+ return [
511
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
512
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
513
+ ];
514
+ })
515
+ .s("AWSApplicationCostProfiler", "GetReportDefinition", {})
516
+ .n("ApplicationCostProfilerClient", "GetReportDefinitionCommand")
517
+ .f(void 0, void 0)
518
+ .ser(se_GetReportDefinitionCommand)
519
+ .de(de_GetReportDefinitionCommand)
520
+ .build() {
521
+ }
522
+
523
+ class ImportApplicationUsageCommand extends smithyClient.Command
524
+ .classBuilder()
525
+ .ep(commonParams)
526
+ .m(function (Command, cs, config, o) {
527
+ return [
528
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
529
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
530
+ ];
531
+ })
532
+ .s("AWSApplicationCostProfiler", "ImportApplicationUsage", {})
533
+ .n("ApplicationCostProfilerClient", "ImportApplicationUsageCommand")
534
+ .f(void 0, void 0)
535
+ .ser(se_ImportApplicationUsageCommand)
536
+ .de(de_ImportApplicationUsageCommand)
537
+ .build() {
538
+ }
539
+
540
+ class ListReportDefinitionsCommand extends smithyClient.Command
541
+ .classBuilder()
542
+ .ep(commonParams)
543
+ .m(function (Command, cs, config, o) {
544
+ return [
545
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
546
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
547
+ ];
548
+ })
549
+ .s("AWSApplicationCostProfiler", "ListReportDefinitions", {})
550
+ .n("ApplicationCostProfilerClient", "ListReportDefinitionsCommand")
551
+ .f(void 0, void 0)
552
+ .ser(se_ListReportDefinitionsCommand)
553
+ .de(de_ListReportDefinitionsCommand)
554
+ .build() {
555
+ }
556
+
557
+ class PutReportDefinitionCommand extends smithyClient.Command
558
+ .classBuilder()
559
+ .ep(commonParams)
560
+ .m(function (Command, cs, config, o) {
561
+ return [
562
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
563
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
564
+ ];
565
+ })
566
+ .s("AWSApplicationCostProfiler", "PutReportDefinition", {})
567
+ .n("ApplicationCostProfilerClient", "PutReportDefinitionCommand")
568
+ .f(void 0, void 0)
569
+ .ser(se_PutReportDefinitionCommand)
570
+ .de(de_PutReportDefinitionCommand)
571
+ .build() {
572
+ }
573
+
574
+ class UpdateReportDefinitionCommand extends smithyClient.Command
575
+ .classBuilder()
576
+ .ep(commonParams)
577
+ .m(function (Command, cs, config, o) {
578
+ return [
579
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
580
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
581
+ ];
582
+ })
583
+ .s("AWSApplicationCostProfiler", "UpdateReportDefinition", {})
584
+ .n("ApplicationCostProfilerClient", "UpdateReportDefinitionCommand")
585
+ .f(void 0, void 0)
586
+ .ser(se_UpdateReportDefinitionCommand)
587
+ .de(de_UpdateReportDefinitionCommand)
588
+ .build() {
589
+ }
590
+
591
+ const commands = {
592
+ DeleteReportDefinitionCommand,
593
+ GetReportDefinitionCommand,
594
+ ImportApplicationUsageCommand,
595
+ ListReportDefinitionsCommand,
596
+ PutReportDefinitionCommand,
597
+ UpdateReportDefinitionCommand,
598
+ };
599
+ class ApplicationCostProfiler extends ApplicationCostProfilerClient {
600
+ }
601
+ smithyClient.createAggregatedClient(commands, ApplicationCostProfiler);
724
602
 
725
- var paginateListReportDefinitions = (0, import_core.createPaginator)(ApplicationCostProfilerClient, ListReportDefinitionsCommand, "nextToken", "nextToken", "maxResults");
726
- // Annotate the CommonJS export names for ESM import in node:
603
+ const paginateListReportDefinitions = core.createPaginator(ApplicationCostProfilerClient, ListReportDefinitionsCommand, "nextToken", "nextToken", "maxResults");
727
604
 
728
- 0 && (module.exports = {
729
- ApplicationCostProfilerServiceException,
730
- __Client,
731
- ApplicationCostProfilerClient,
732
- ApplicationCostProfiler,
733
- $Command,
734
- DeleteReportDefinitionCommand,
735
- GetReportDefinitionCommand,
736
- ImportApplicationUsageCommand,
737
- ListReportDefinitionsCommand,
738
- PutReportDefinitionCommand,
739
- UpdateReportDefinitionCommand,
740
- paginateListReportDefinitions,
741
- AccessDeniedException,
742
- InternalServerException,
743
- ThrottlingException,
744
- ValidationException,
745
- Format,
746
- ReportFrequency,
747
- S3BucketRegion,
748
- ServiceQuotaExceededException
605
+ Object.defineProperty(exports, "$Command", {
606
+ enumerable: true,
607
+ get: function () { return smithyClient.Command; }
749
608
  });
750
-
609
+ Object.defineProperty(exports, "__Client", {
610
+ enumerable: true,
611
+ get: function () { return smithyClient.Client; }
612
+ });
613
+ exports.AccessDeniedException = AccessDeniedException;
614
+ exports.ApplicationCostProfiler = ApplicationCostProfiler;
615
+ exports.ApplicationCostProfilerClient = ApplicationCostProfilerClient;
616
+ exports.ApplicationCostProfilerServiceException = ApplicationCostProfilerServiceException;
617
+ exports.DeleteReportDefinitionCommand = DeleteReportDefinitionCommand;
618
+ exports.Format = Format;
619
+ exports.GetReportDefinitionCommand = GetReportDefinitionCommand;
620
+ exports.ImportApplicationUsageCommand = ImportApplicationUsageCommand;
621
+ exports.InternalServerException = InternalServerException;
622
+ exports.ListReportDefinitionsCommand = ListReportDefinitionsCommand;
623
+ exports.PutReportDefinitionCommand = PutReportDefinitionCommand;
624
+ exports.ReportFrequency = ReportFrequency;
625
+ exports.S3BucketRegion = S3BucketRegion;
626
+ exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
627
+ exports.ThrottlingException = ThrottlingException;
628
+ exports.UpdateReportDefinitionCommand = UpdateReportDefinitionCommand;
629
+ exports.ValidationException = ValidationException;
630
+ exports.paginateListReportDefinitions = paginateListReportDefinitions;