@aws-sdk/client-account 3.901.0 → 3.907.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist-cjs/index.js +1070 -1255
  2. package/package.json +6 -6
package/dist-cjs/index.js CHANGED
@@ -1,1299 +1,1114 @@
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: "account",
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
- AcceptPrimaryEmailUpdateCommand: () => AcceptPrimaryEmailUpdateCommand,
25
- AcceptPrimaryEmailUpdateRequestFilterSensitiveLog: () => AcceptPrimaryEmailUpdateRequestFilterSensitiveLog,
26
- AccessDeniedException: () => AccessDeniedException,
27
- Account: () => Account,
28
- AccountClient: () => AccountClient,
29
- AccountServiceException: () => AccountServiceException,
30
- AlternateContactFilterSensitiveLog: () => AlternateContactFilterSensitiveLog,
31
- AlternateContactType: () => AlternateContactType,
32
- ConflictException: () => ConflictException,
33
- ContactInformationFilterSensitiveLog: () => ContactInformationFilterSensitiveLog,
34
- DeleteAlternateContactCommand: () => DeleteAlternateContactCommand,
35
- DisableRegionCommand: () => DisableRegionCommand,
36
- EnableRegionCommand: () => EnableRegionCommand,
37
- GetAccountInformationCommand: () => GetAccountInformationCommand,
38
- GetAccountInformationResponseFilterSensitiveLog: () => GetAccountInformationResponseFilterSensitiveLog,
39
- GetAlternateContactCommand: () => GetAlternateContactCommand,
40
- GetAlternateContactResponseFilterSensitiveLog: () => GetAlternateContactResponseFilterSensitiveLog,
41
- GetContactInformationCommand: () => GetContactInformationCommand,
42
- GetContactInformationResponseFilterSensitiveLog: () => GetContactInformationResponseFilterSensitiveLog,
43
- GetPrimaryEmailCommand: () => GetPrimaryEmailCommand,
44
- GetPrimaryEmailResponseFilterSensitiveLog: () => GetPrimaryEmailResponseFilterSensitiveLog,
45
- GetRegionOptStatusCommand: () => GetRegionOptStatusCommand,
46
- InternalServerException: () => InternalServerException,
47
- ListRegionsCommand: () => ListRegionsCommand,
48
- PrimaryEmailUpdateStatus: () => PrimaryEmailUpdateStatus,
49
- PutAccountNameCommand: () => PutAccountNameCommand,
50
- PutAccountNameRequestFilterSensitiveLog: () => PutAccountNameRequestFilterSensitiveLog,
51
- PutAlternateContactCommand: () => PutAlternateContactCommand,
52
- PutAlternateContactRequestFilterSensitiveLog: () => PutAlternateContactRequestFilterSensitiveLog,
53
- PutContactInformationCommand: () => PutContactInformationCommand,
54
- PutContactInformationRequestFilterSensitiveLog: () => PutContactInformationRequestFilterSensitiveLog,
55
- RegionOptStatus: () => RegionOptStatus,
56
- ResourceNotFoundException: () => ResourceNotFoundException,
57
- StartPrimaryEmailUpdateCommand: () => StartPrimaryEmailUpdateCommand,
58
- StartPrimaryEmailUpdateRequestFilterSensitiveLog: () => StartPrimaryEmailUpdateRequestFilterSensitiveLog,
59
- TooManyRequestsException: () => TooManyRequestsException,
60
- ValidationException: () => ValidationException,
61
- ValidationExceptionFieldFilterSensitiveLog: () => ValidationExceptionFieldFilterSensitiveLog,
62
- ValidationExceptionReason: () => ValidationExceptionReason,
63
- __Client: () => import_smithy_client.Client,
64
- paginateListRegions: () => paginateListRegions
65
- });
66
- module.exports = __toCommonJS(index_exports);
67
33
 
68
- // src/AccountClient.ts
69
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
70
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
71
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
72
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
73
- var import_config_resolver = require("@smithy/config-resolver");
74
- var import_core = require("@smithy/core");
75
- var import_middleware_content_length = require("@smithy/middleware-content-length");
76
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
77
- var import_middleware_retry = require("@smithy/middleware-retry");
78
-
79
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
80
-
81
- // src/endpoint/EndpointParameters.ts
82
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
83
- return Object.assign(options, {
84
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
85
- useFipsEndpoint: options.useFipsEndpoint ?? false,
86
- defaultSigningName: "account"
87
- });
88
- }, "resolveClientEndpointParameters");
89
- var commonParams = {
90
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
91
- Endpoint: { type: "builtInParams", name: "endpoint" },
92
- Region: { type: "builtInParams", name: "region" },
93
- 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
+ };
94
71
  };
95
72
 
96
- // src/AccountClient.ts
97
- var import_runtimeConfig = require("././runtimeConfig");
98
-
99
- // src/runtimeExtensions.ts
100
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
101
- var import_protocol_http = require("@smithy/protocol-http");
102
- 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
+ };
103
78
 
104
- // src/auth/httpAuthExtensionConfiguration.ts
105
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
106
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
107
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
108
- let _credentials = runtimeConfig.credentials;
109
- return {
110
- setHttpAuthScheme(httpAuthScheme) {
111
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
112
- if (index === -1) {
113
- _httpAuthSchemes.push(httpAuthScheme);
114
- } else {
115
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
116
- }
117
- },
118
- httpAuthSchemes() {
119
- return _httpAuthSchemes;
120
- },
121
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
122
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
123
- },
124
- httpAuthSchemeProvider() {
125
- return _httpAuthSchemeProvider;
126
- },
127
- setCredentials(credentials) {
128
- _credentials = credentials;
129
- },
130
- credentials() {
131
- return _credentials;
79
+ class AccountClient 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.defaultAccountHttpAuthSchemeParametersProvider,
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();
132
110
  }
133
- };
134
- }, "getHttpAuthExtensionConfiguration");
135
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
136
- return {
137
- httpAuthSchemes: config.httpAuthSchemes(),
138
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
139
- credentials: config.credentials()
140
- };
141
- }, "resolveHttpAuthRuntimeConfig");
111
+ }
142
112
 
143
- // src/runtimeExtensions.ts
144
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
145
- const extensionConfiguration = Object.assign(
146
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
147
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
148
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
149
- getHttpAuthExtensionConfiguration(runtimeConfig)
150
- );
151
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
152
- return Object.assign(
153
- runtimeConfig,
154
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
155
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
156
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
157
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
158
- );
159
- }, "resolveRuntimeExtensions");
113
+ class AccountServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, AccountServiceException.prototype);
117
+ }
118
+ }
160
119
 
161
- // src/AccountClient.ts
162
- var AccountClient = class extends import_smithy_client.Client {
163
- static {
164
- __name(this, "AccountClient");
165
- }
166
- /**
167
- * The resolved configuration of AccountClient class. This is resolved and normalized from the {@link AccountClientConfig | constructor configuration interface}.
168
- */
169
- config;
170
- constructor(...[configuration]) {
171
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
172
- super(_config_0);
173
- this.initConfig = _config_0;
174
- const _config_1 = resolveClientEndpointParameters(_config_0);
175
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
176
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
177
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
178
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
179
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
180
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
181
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
182
- this.config = _config_8;
183
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
184
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
185
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
186
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
187
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
188
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
189
- this.middlewareStack.use(
190
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
191
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultAccountHttpAuthSchemeParametersProvider,
192
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
193
- "aws.auth#sigv4": config.credentials
194
- }), "identityProviderConfigProvider")
195
- })
196
- );
197
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
198
- }
199
- /**
200
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
201
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
202
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
203
- */
204
- destroy() {
205
- super.destroy();
206
- }
120
+ const PrimaryEmailUpdateStatus = {
121
+ ACCEPTED: "ACCEPTED",
122
+ PENDING: "PENDING",
207
123
  };
208
-
209
- // src/Account.ts
210
-
211
-
212
- // src/commands/AcceptPrimaryEmailUpdateCommand.ts
213
-
214
- var import_middleware_serde = require("@smithy/middleware-serde");
215
-
216
-
217
- // src/models/models_0.ts
218
-
219
-
220
- // src/models/AccountServiceException.ts
221
-
222
- var AccountServiceException = class _AccountServiceException extends import_smithy_client.ServiceException {
223
- static {
224
- __name(this, "AccountServiceException");
225
- }
226
- /**
227
- * @internal
228
- */
229
- constructor(options) {
230
- super(options);
231
- Object.setPrototypeOf(this, _AccountServiceException.prototype);
232
- }
124
+ class AccessDeniedException extends AccountServiceException {
125
+ name = "AccessDeniedException";
126
+ $fault = "client";
127
+ errorType;
128
+ constructor(opts) {
129
+ super({
130
+ name: "AccessDeniedException",
131
+ $fault: "client",
132
+ ...opts,
133
+ });
134
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
135
+ this.errorType = opts.errorType;
136
+ }
137
+ }
138
+ class ConflictException extends AccountServiceException {
139
+ name = "ConflictException";
140
+ $fault = "client";
141
+ errorType;
142
+ constructor(opts) {
143
+ super({
144
+ name: "ConflictException",
145
+ $fault: "client",
146
+ ...opts,
147
+ });
148
+ Object.setPrototypeOf(this, ConflictException.prototype);
149
+ this.errorType = opts.errorType;
150
+ }
151
+ }
152
+ class InternalServerException extends AccountServiceException {
153
+ name = "InternalServerException";
154
+ $fault = "server";
155
+ $retryable = {};
156
+ errorType;
157
+ constructor(opts) {
158
+ super({
159
+ name: "InternalServerException",
160
+ $fault: "server",
161
+ ...opts,
162
+ });
163
+ Object.setPrototypeOf(this, InternalServerException.prototype);
164
+ this.errorType = opts.errorType;
165
+ }
166
+ }
167
+ class ResourceNotFoundException extends AccountServiceException {
168
+ name = "ResourceNotFoundException";
169
+ $fault = "client";
170
+ errorType;
171
+ constructor(opts) {
172
+ super({
173
+ name: "ResourceNotFoundException",
174
+ $fault: "client",
175
+ ...opts,
176
+ });
177
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
178
+ this.errorType = opts.errorType;
179
+ }
180
+ }
181
+ class TooManyRequestsException extends AccountServiceException {
182
+ name = "TooManyRequestsException";
183
+ $fault = "client";
184
+ $retryable = {
185
+ throttling: true,
186
+ };
187
+ errorType;
188
+ constructor(opts) {
189
+ super({
190
+ name: "TooManyRequestsException",
191
+ $fault: "client",
192
+ ...opts,
193
+ });
194
+ Object.setPrototypeOf(this, TooManyRequestsException.prototype);
195
+ this.errorType = opts.errorType;
196
+ }
197
+ }
198
+ const ValidationExceptionReason = {
199
+ FIELD_VALIDATION_FAILED: "fieldValidationFailed",
200
+ INVALID_REGION_OPT_TARGET: "invalidRegionOptTarget",
201
+ };
202
+ class ValidationException extends AccountServiceException {
203
+ name = "ValidationException";
204
+ $fault = "client";
205
+ reason;
206
+ fieldList;
207
+ constructor(opts) {
208
+ super({
209
+ name: "ValidationException",
210
+ $fault: "client",
211
+ ...opts,
212
+ });
213
+ Object.setPrototypeOf(this, ValidationException.prototype);
214
+ this.reason = opts.reason;
215
+ this.fieldList = opts.fieldList;
216
+ }
217
+ }
218
+ const AlternateContactType = {
219
+ BILLING: "BILLING",
220
+ OPERATIONS: "OPERATIONS",
221
+ SECURITY: "SECURITY",
233
222
  };
223
+ const RegionOptStatus = {
224
+ DISABLED: "DISABLED",
225
+ DISABLING: "DISABLING",
226
+ ENABLED: "ENABLED",
227
+ ENABLED_BY_DEFAULT: "ENABLED_BY_DEFAULT",
228
+ ENABLING: "ENABLING",
229
+ };
230
+ const AcceptPrimaryEmailUpdateRequestFilterSensitiveLog = (obj) => ({
231
+ ...obj,
232
+ ...(obj.PrimaryEmail && { PrimaryEmail: smithyClient.SENSITIVE_STRING }),
233
+ ...(obj.Otp && { Otp: smithyClient.SENSITIVE_STRING }),
234
+ });
235
+ const ValidationExceptionFieldFilterSensitiveLog = (obj) => ({
236
+ ...obj,
237
+ ...(obj.message && { message: smithyClient.SENSITIVE_STRING }),
238
+ });
239
+ const GetAccountInformationResponseFilterSensitiveLog = (obj) => ({
240
+ ...obj,
241
+ ...(obj.AccountName && { AccountName: smithyClient.SENSITIVE_STRING }),
242
+ });
243
+ const PutAccountNameRequestFilterSensitiveLog = (obj) => ({
244
+ ...obj,
245
+ ...(obj.AccountName && { AccountName: smithyClient.SENSITIVE_STRING }),
246
+ });
247
+ const AlternateContactFilterSensitiveLog = (obj) => ({
248
+ ...obj,
249
+ ...(obj.Name && { Name: smithyClient.SENSITIVE_STRING }),
250
+ ...(obj.Title && { Title: smithyClient.SENSITIVE_STRING }),
251
+ ...(obj.EmailAddress && { EmailAddress: smithyClient.SENSITIVE_STRING }),
252
+ ...(obj.PhoneNumber && { PhoneNumber: smithyClient.SENSITIVE_STRING }),
253
+ });
254
+ const GetAlternateContactResponseFilterSensitiveLog = (obj) => ({
255
+ ...obj,
256
+ ...(obj.AlternateContact && { AlternateContact: AlternateContactFilterSensitiveLog(obj.AlternateContact) }),
257
+ });
258
+ const PutAlternateContactRequestFilterSensitiveLog = (obj) => ({
259
+ ...obj,
260
+ ...(obj.Name && { Name: smithyClient.SENSITIVE_STRING }),
261
+ ...(obj.Title && { Title: smithyClient.SENSITIVE_STRING }),
262
+ ...(obj.EmailAddress && { EmailAddress: smithyClient.SENSITIVE_STRING }),
263
+ ...(obj.PhoneNumber && { PhoneNumber: smithyClient.SENSITIVE_STRING }),
264
+ });
265
+ const ContactInformationFilterSensitiveLog = (obj) => ({
266
+ ...obj,
267
+ ...(obj.FullName && { FullName: smithyClient.SENSITIVE_STRING }),
268
+ ...(obj.AddressLine1 && { AddressLine1: smithyClient.SENSITIVE_STRING }),
269
+ ...(obj.AddressLine2 && { AddressLine2: smithyClient.SENSITIVE_STRING }),
270
+ ...(obj.AddressLine3 && { AddressLine3: smithyClient.SENSITIVE_STRING }),
271
+ ...(obj.City && { City: smithyClient.SENSITIVE_STRING }),
272
+ ...(obj.StateOrRegion && { StateOrRegion: smithyClient.SENSITIVE_STRING }),
273
+ ...(obj.DistrictOrCounty && { DistrictOrCounty: smithyClient.SENSITIVE_STRING }),
274
+ ...(obj.PostalCode && { PostalCode: smithyClient.SENSITIVE_STRING }),
275
+ ...(obj.CountryCode && { CountryCode: smithyClient.SENSITIVE_STRING }),
276
+ ...(obj.PhoneNumber && { PhoneNumber: smithyClient.SENSITIVE_STRING }),
277
+ ...(obj.CompanyName && { CompanyName: smithyClient.SENSITIVE_STRING }),
278
+ ...(obj.WebsiteUrl && { WebsiteUrl: smithyClient.SENSITIVE_STRING }),
279
+ });
280
+ const GetContactInformationResponseFilterSensitiveLog = (obj) => ({
281
+ ...obj,
282
+ ...(obj.ContactInformation && { ContactInformation: ContactInformationFilterSensitiveLog(obj.ContactInformation) }),
283
+ });
284
+ const PutContactInformationRequestFilterSensitiveLog = (obj) => ({
285
+ ...obj,
286
+ ...(obj.ContactInformation && { ContactInformation: ContactInformationFilterSensitiveLog(obj.ContactInformation) }),
287
+ });
288
+ const GetPrimaryEmailResponseFilterSensitiveLog = (obj) => ({
289
+ ...obj,
290
+ ...(obj.PrimaryEmail && { PrimaryEmail: smithyClient.SENSITIVE_STRING }),
291
+ });
292
+ const StartPrimaryEmailUpdateRequestFilterSensitiveLog = (obj) => ({
293
+ ...obj,
294
+ ...(obj.PrimaryEmail && { PrimaryEmail: smithyClient.SENSITIVE_STRING }),
295
+ });
234
296
 
235
- // src/models/models_0.ts
236
- var PrimaryEmailUpdateStatus = {
237
- ACCEPTED: "ACCEPTED",
238
- PENDING: "PENDING"
297
+ const se_AcceptPrimaryEmailUpdateCommand = async (input, context) => {
298
+ const b = core.requestBuilder(input, context);
299
+ const headers = {
300
+ "content-type": "application/json",
301
+ };
302
+ b.bp("/acceptPrimaryEmailUpdate");
303
+ let body;
304
+ body = JSON.stringify(smithyClient.take(input, {
305
+ AccountId: [],
306
+ Otp: [],
307
+ PrimaryEmail: [],
308
+ }));
309
+ b.m("POST").h(headers).b(body);
310
+ return b.build();
239
311
  };
240
- var AccessDeniedException = class _AccessDeniedException extends AccountServiceException {
241
- static {
242
- __name(this, "AccessDeniedException");
243
- }
244
- name = "AccessDeniedException";
245
- $fault = "client";
246
- /**
247
- * <p>The value populated to the <code>x-amzn-ErrorType</code> response header by API Gateway.</p>
248
- * @public
249
- */
250
- errorType;
251
- /**
252
- * @internal
253
- */
254
- constructor(opts) {
255
- super({
256
- name: "AccessDeniedException",
257
- $fault: "client",
258
- ...opts
259
- });
260
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
261
- this.errorType = opts.errorType;
262
- }
312
+ const se_DeleteAlternateContactCommand = async (input, context) => {
313
+ const b = core.requestBuilder(input, context);
314
+ const headers = {
315
+ "content-type": "application/json",
316
+ };
317
+ b.bp("/deleteAlternateContact");
318
+ let body;
319
+ body = JSON.stringify(smithyClient.take(input, {
320
+ AccountId: [],
321
+ AlternateContactType: [],
322
+ }));
323
+ b.m("POST").h(headers).b(body);
324
+ return b.build();
263
325
  };
264
- var ConflictException = class _ConflictException extends AccountServiceException {
265
- static {
266
- __name(this, "ConflictException");
267
- }
268
- name = "ConflictException";
269
- $fault = "client";
270
- /**
271
- * <p>The value populated to the <code>x-amzn-ErrorType</code> response header by API Gateway.</p>
272
- * @public
273
- */
274
- errorType;
275
- /**
276
- * @internal
277
- */
278
- constructor(opts) {
279
- super({
280
- name: "ConflictException",
281
- $fault: "client",
282
- ...opts
283
- });
284
- Object.setPrototypeOf(this, _ConflictException.prototype);
285
- this.errorType = opts.errorType;
286
- }
326
+ const se_DisableRegionCommand = async (input, context) => {
327
+ const b = core.requestBuilder(input, context);
328
+ const headers = {
329
+ "content-type": "application/json",
330
+ };
331
+ b.bp("/disableRegion");
332
+ let body;
333
+ body = JSON.stringify(smithyClient.take(input, {
334
+ AccountId: [],
335
+ RegionName: [],
336
+ }));
337
+ b.m("POST").h(headers).b(body);
338
+ return b.build();
287
339
  };
288
- var InternalServerException = class _InternalServerException extends AccountServiceException {
289
- static {
290
- __name(this, "InternalServerException");
291
- }
292
- name = "InternalServerException";
293
- $fault = "server";
294
- $retryable = {};
295
- /**
296
- * <p>The value populated to the <code>x-amzn-ErrorType</code> response header by API Gateway.</p>
297
- * @public
298
- */
299
- errorType;
300
- /**
301
- * @internal
302
- */
303
- constructor(opts) {
304
- super({
305
- name: "InternalServerException",
306
- $fault: "server",
307
- ...opts
308
- });
309
- Object.setPrototypeOf(this, _InternalServerException.prototype);
310
- this.errorType = opts.errorType;
311
- }
340
+ const se_EnableRegionCommand = async (input, context) => {
341
+ const b = core.requestBuilder(input, context);
342
+ const headers = {
343
+ "content-type": "application/json",
344
+ };
345
+ b.bp("/enableRegion");
346
+ let body;
347
+ body = JSON.stringify(smithyClient.take(input, {
348
+ AccountId: [],
349
+ RegionName: [],
350
+ }));
351
+ b.m("POST").h(headers).b(body);
352
+ return b.build();
353
+ };
354
+ const se_GetAccountInformationCommand = async (input, context) => {
355
+ const b = core.requestBuilder(input, context);
356
+ const headers = {
357
+ "content-type": "application/json",
358
+ };
359
+ b.bp("/getAccountInformation");
360
+ let body;
361
+ body = JSON.stringify(smithyClient.take(input, {
362
+ AccountId: [],
363
+ }));
364
+ b.m("POST").h(headers).b(body);
365
+ return b.build();
366
+ };
367
+ const se_GetAlternateContactCommand = async (input, context) => {
368
+ const b = core.requestBuilder(input, context);
369
+ const headers = {
370
+ "content-type": "application/json",
371
+ };
372
+ b.bp("/getAlternateContact");
373
+ let body;
374
+ body = JSON.stringify(smithyClient.take(input, {
375
+ AccountId: [],
376
+ AlternateContactType: [],
377
+ }));
378
+ b.m("POST").h(headers).b(body);
379
+ return b.build();
380
+ };
381
+ const se_GetContactInformationCommand = async (input, context) => {
382
+ const b = core.requestBuilder(input, context);
383
+ const headers = {
384
+ "content-type": "application/json",
385
+ };
386
+ b.bp("/getContactInformation");
387
+ let body;
388
+ body = JSON.stringify(smithyClient.take(input, {
389
+ AccountId: [],
390
+ }));
391
+ b.m("POST").h(headers).b(body);
392
+ return b.build();
393
+ };
394
+ const se_GetPrimaryEmailCommand = async (input, context) => {
395
+ const b = core.requestBuilder(input, context);
396
+ const headers = {
397
+ "content-type": "application/json",
398
+ };
399
+ b.bp("/getPrimaryEmail");
400
+ let body;
401
+ body = JSON.stringify(smithyClient.take(input, {
402
+ AccountId: [],
403
+ }));
404
+ b.m("POST").h(headers).b(body);
405
+ return b.build();
406
+ };
407
+ const se_GetRegionOptStatusCommand = async (input, context) => {
408
+ const b = core.requestBuilder(input, context);
409
+ const headers = {
410
+ "content-type": "application/json",
411
+ };
412
+ b.bp("/getRegionOptStatus");
413
+ let body;
414
+ body = JSON.stringify(smithyClient.take(input, {
415
+ AccountId: [],
416
+ RegionName: [],
417
+ }));
418
+ b.m("POST").h(headers).b(body);
419
+ return b.build();
420
+ };
421
+ const se_ListRegionsCommand = async (input, context) => {
422
+ const b = core.requestBuilder(input, context);
423
+ const headers = {
424
+ "content-type": "application/json",
425
+ };
426
+ b.bp("/listRegions");
427
+ let body;
428
+ body = JSON.stringify(smithyClient.take(input, {
429
+ AccountId: [],
430
+ MaxResults: [],
431
+ NextToken: [],
432
+ RegionOptStatusContains: (_) => smithyClient._json(_),
433
+ }));
434
+ b.m("POST").h(headers).b(body);
435
+ return b.build();
436
+ };
437
+ const se_PutAccountNameCommand = async (input, context) => {
438
+ const b = core.requestBuilder(input, context);
439
+ const headers = {
440
+ "content-type": "application/json",
441
+ };
442
+ b.bp("/putAccountName");
443
+ let body;
444
+ body = JSON.stringify(smithyClient.take(input, {
445
+ AccountId: [],
446
+ AccountName: [],
447
+ }));
448
+ b.m("POST").h(headers).b(body);
449
+ return b.build();
450
+ };
451
+ const se_PutAlternateContactCommand = async (input, context) => {
452
+ const b = core.requestBuilder(input, context);
453
+ const headers = {
454
+ "content-type": "application/json",
455
+ };
456
+ b.bp("/putAlternateContact");
457
+ let body;
458
+ body = JSON.stringify(smithyClient.take(input, {
459
+ AccountId: [],
460
+ AlternateContactType: [],
461
+ EmailAddress: [],
462
+ Name: [],
463
+ PhoneNumber: [],
464
+ Title: [],
465
+ }));
466
+ b.m("POST").h(headers).b(body);
467
+ return b.build();
468
+ };
469
+ const se_PutContactInformationCommand = async (input, context) => {
470
+ const b = core.requestBuilder(input, context);
471
+ const headers = {
472
+ "content-type": "application/json",
473
+ };
474
+ b.bp("/putContactInformation");
475
+ let body;
476
+ body = JSON.stringify(smithyClient.take(input, {
477
+ AccountId: [],
478
+ ContactInformation: (_) => smithyClient._json(_),
479
+ }));
480
+ b.m("POST").h(headers).b(body);
481
+ return b.build();
482
+ };
483
+ const se_StartPrimaryEmailUpdateCommand = async (input, context) => {
484
+ const b = core.requestBuilder(input, context);
485
+ const headers = {
486
+ "content-type": "application/json",
487
+ };
488
+ b.bp("/startPrimaryEmailUpdate");
489
+ let body;
490
+ body = JSON.stringify(smithyClient.take(input, {
491
+ AccountId: [],
492
+ PrimaryEmail: [],
493
+ }));
494
+ b.m("POST").h(headers).b(body);
495
+ return b.build();
312
496
  };
313
- var ResourceNotFoundException = class _ResourceNotFoundException extends AccountServiceException {
314
- static {
315
- __name(this, "ResourceNotFoundException");
316
- }
317
- name = "ResourceNotFoundException";
318
- $fault = "client";
319
- /**
320
- * <p>The value populated to the <code>x-amzn-ErrorType</code> response header by API Gateway.</p>
321
- * @public
322
- */
323
- errorType;
324
- /**
325
- * @internal
326
- */
327
- constructor(opts) {
328
- super({
329
- name: "ResourceNotFoundException",
330
- $fault: "client",
331
- ...opts
497
+ const de_AcceptPrimaryEmailUpdateCommand = async (output, context) => {
498
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
499
+ return de_CommandError(output, context);
500
+ }
501
+ const contents = smithyClient.map({
502
+ $metadata: deserializeMetadata(output),
503
+ });
504
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
505
+ const doc = smithyClient.take(data, {
506
+ Status: smithyClient.expectString,
332
507
  });
333
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
334
- this.errorType = opts.errorType;
335
- }
508
+ Object.assign(contents, doc);
509
+ return contents;
336
510
  };
337
- var TooManyRequestsException = class _TooManyRequestsException extends AccountServiceException {
338
- static {
339
- __name(this, "TooManyRequestsException");
340
- }
341
- name = "TooManyRequestsException";
342
- $fault = "client";
343
- $retryable = {
344
- throttling: true
345
- };
346
- /**
347
- * <p>The value populated to the <code>x-amzn-ErrorType</code> response header by API Gateway.</p>
348
- * @public
349
- */
350
- errorType;
351
- /**
352
- * @internal
353
- */
354
- constructor(opts) {
355
- super({
356
- name: "TooManyRequestsException",
357
- $fault: "client",
358
- ...opts
511
+ const de_DeleteAlternateContactCommand = async (output, context) => {
512
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
513
+ return de_CommandError(output, context);
514
+ }
515
+ const contents = smithyClient.map({
516
+ $metadata: deserializeMetadata(output),
359
517
  });
360
- Object.setPrototypeOf(this, _TooManyRequestsException.prototype);
361
- this.errorType = opts.errorType;
362
- }
518
+ await smithyClient.collectBody(output.body, context);
519
+ return contents;
363
520
  };
364
- var ValidationExceptionReason = {
365
- FIELD_VALIDATION_FAILED: "fieldValidationFailed",
366
- INVALID_REGION_OPT_TARGET: "invalidRegionOptTarget"
521
+ const de_DisableRegionCommand = async (output, context) => {
522
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
523
+ return de_CommandError(output, context);
524
+ }
525
+ const contents = smithyClient.map({
526
+ $metadata: deserializeMetadata(output),
527
+ });
528
+ await smithyClient.collectBody(output.body, context);
529
+ return contents;
367
530
  };
368
- var ValidationException = class _ValidationException extends AccountServiceException {
369
- static {
370
- __name(this, "ValidationException");
371
- }
372
- name = "ValidationException";
373
- $fault = "client";
374
- /**
375
- * <p>The reason that validation failed.</p>
376
- * @public
377
- */
378
- reason;
379
- /**
380
- * <p>The field where the invalid entry was detected.</p>
381
- * @public
382
- */
383
- fieldList;
384
- /**
385
- * @internal
386
- */
387
- constructor(opts) {
388
- super({
389
- name: "ValidationException",
390
- $fault: "client",
391
- ...opts
531
+ const de_EnableRegionCommand = async (output, context) => {
532
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
533
+ return de_CommandError(output, context);
534
+ }
535
+ const contents = smithyClient.map({
536
+ $metadata: deserializeMetadata(output),
392
537
  });
393
- Object.setPrototypeOf(this, _ValidationException.prototype);
394
- this.reason = opts.reason;
395
- this.fieldList = opts.fieldList;
396
- }
538
+ await smithyClient.collectBody(output.body, context);
539
+ return contents;
397
540
  };
398
- var AlternateContactType = {
399
- BILLING: "BILLING",
400
- OPERATIONS: "OPERATIONS",
401
- SECURITY: "SECURITY"
541
+ const de_GetAccountInformationCommand = async (output, context) => {
542
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
543
+ return de_CommandError(output, context);
544
+ }
545
+ const contents = smithyClient.map({
546
+ $metadata: deserializeMetadata(output),
547
+ });
548
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
549
+ const doc = smithyClient.take(data, {
550
+ AccountCreatedDate: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
551
+ AccountId: smithyClient.expectString,
552
+ AccountName: smithyClient.expectString,
553
+ });
554
+ Object.assign(contents, doc);
555
+ return contents;
402
556
  };
403
- var RegionOptStatus = {
404
- DISABLED: "DISABLED",
405
- DISABLING: "DISABLING",
406
- ENABLED: "ENABLED",
407
- ENABLED_BY_DEFAULT: "ENABLED_BY_DEFAULT",
408
- ENABLING: "ENABLING"
557
+ const de_GetAlternateContactCommand = async (output, context) => {
558
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
559
+ return de_CommandError(output, context);
560
+ }
561
+ const contents = smithyClient.map({
562
+ $metadata: deserializeMetadata(output),
563
+ });
564
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
565
+ const doc = smithyClient.take(data, {
566
+ AlternateContact: smithyClient._json,
567
+ });
568
+ Object.assign(contents, doc);
569
+ return contents;
409
570
  };
410
- var AcceptPrimaryEmailUpdateRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
411
- ...obj,
412
- ...obj.PrimaryEmail && { PrimaryEmail: import_smithy_client.SENSITIVE_STRING },
413
- ...obj.Otp && { Otp: import_smithy_client.SENSITIVE_STRING }
414
- }), "AcceptPrimaryEmailUpdateRequestFilterSensitiveLog");
415
- var ValidationExceptionFieldFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
416
- ...obj,
417
- ...obj.message && { message: import_smithy_client.SENSITIVE_STRING }
418
- }), "ValidationExceptionFieldFilterSensitiveLog");
419
- var GetAccountInformationResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
420
- ...obj,
421
- ...obj.AccountName && { AccountName: import_smithy_client.SENSITIVE_STRING }
422
- }), "GetAccountInformationResponseFilterSensitiveLog");
423
- var PutAccountNameRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
424
- ...obj,
425
- ...obj.AccountName && { AccountName: import_smithy_client.SENSITIVE_STRING }
426
- }), "PutAccountNameRequestFilterSensitiveLog");
427
- var AlternateContactFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
428
- ...obj,
429
- ...obj.Name && { Name: import_smithy_client.SENSITIVE_STRING },
430
- ...obj.Title && { Title: import_smithy_client.SENSITIVE_STRING },
431
- ...obj.EmailAddress && { EmailAddress: import_smithy_client.SENSITIVE_STRING },
432
- ...obj.PhoneNumber && { PhoneNumber: import_smithy_client.SENSITIVE_STRING }
433
- }), "AlternateContactFilterSensitiveLog");
434
- var GetAlternateContactResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
435
- ...obj,
436
- ...obj.AlternateContact && { AlternateContact: AlternateContactFilterSensitiveLog(obj.AlternateContact) }
437
- }), "GetAlternateContactResponseFilterSensitiveLog");
438
- var PutAlternateContactRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
439
- ...obj,
440
- ...obj.Name && { Name: import_smithy_client.SENSITIVE_STRING },
441
- ...obj.Title && { Title: import_smithy_client.SENSITIVE_STRING },
442
- ...obj.EmailAddress && { EmailAddress: import_smithy_client.SENSITIVE_STRING },
443
- ...obj.PhoneNumber && { PhoneNumber: import_smithy_client.SENSITIVE_STRING }
444
- }), "PutAlternateContactRequestFilterSensitiveLog");
445
- var ContactInformationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
446
- ...obj,
447
- ...obj.FullName && { FullName: import_smithy_client.SENSITIVE_STRING },
448
- ...obj.AddressLine1 && { AddressLine1: import_smithy_client.SENSITIVE_STRING },
449
- ...obj.AddressLine2 && { AddressLine2: import_smithy_client.SENSITIVE_STRING },
450
- ...obj.AddressLine3 && { AddressLine3: import_smithy_client.SENSITIVE_STRING },
451
- ...obj.City && { City: import_smithy_client.SENSITIVE_STRING },
452
- ...obj.StateOrRegion && { StateOrRegion: import_smithy_client.SENSITIVE_STRING },
453
- ...obj.DistrictOrCounty && { DistrictOrCounty: import_smithy_client.SENSITIVE_STRING },
454
- ...obj.PostalCode && { PostalCode: import_smithy_client.SENSITIVE_STRING },
455
- ...obj.CountryCode && { CountryCode: import_smithy_client.SENSITIVE_STRING },
456
- ...obj.PhoneNumber && { PhoneNumber: import_smithy_client.SENSITIVE_STRING },
457
- ...obj.CompanyName && { CompanyName: import_smithy_client.SENSITIVE_STRING },
458
- ...obj.WebsiteUrl && { WebsiteUrl: import_smithy_client.SENSITIVE_STRING }
459
- }), "ContactInformationFilterSensitiveLog");
460
- var GetContactInformationResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
461
- ...obj,
462
- ...obj.ContactInformation && { ContactInformation: ContactInformationFilterSensitiveLog(obj.ContactInformation) }
463
- }), "GetContactInformationResponseFilterSensitiveLog");
464
- var PutContactInformationRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
465
- ...obj,
466
- ...obj.ContactInformation && { ContactInformation: ContactInformationFilterSensitiveLog(obj.ContactInformation) }
467
- }), "PutContactInformationRequestFilterSensitiveLog");
468
- var GetPrimaryEmailResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
469
- ...obj,
470
- ...obj.PrimaryEmail && { PrimaryEmail: import_smithy_client.SENSITIVE_STRING }
471
- }), "GetPrimaryEmailResponseFilterSensitiveLog");
472
- var StartPrimaryEmailUpdateRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
473
- ...obj,
474
- ...obj.PrimaryEmail && { PrimaryEmail: import_smithy_client.SENSITIVE_STRING }
475
- }), "StartPrimaryEmailUpdateRequestFilterSensitiveLog");
476
-
477
- // src/protocols/Aws_restJson1.ts
478
- var import_core2 = require("@aws-sdk/core");
479
-
480
-
481
- var se_AcceptPrimaryEmailUpdateCommand = /* @__PURE__ */ __name(async (input, context) => {
482
- const b = (0, import_core.requestBuilder)(input, context);
483
- const headers = {
484
- "content-type": "application/json"
485
- };
486
- b.bp("/acceptPrimaryEmailUpdate");
487
- let body;
488
- body = JSON.stringify(
489
- (0, import_smithy_client.take)(input, {
490
- AccountId: [],
491
- Otp: [],
492
- PrimaryEmail: []
493
- })
494
- );
495
- b.m("POST").h(headers).b(body);
496
- return b.build();
497
- }, "se_AcceptPrimaryEmailUpdateCommand");
498
- var se_DeleteAlternateContactCommand = /* @__PURE__ */ __name(async (input, context) => {
499
- const b = (0, import_core.requestBuilder)(input, context);
500
- const headers = {
501
- "content-type": "application/json"
502
- };
503
- b.bp("/deleteAlternateContact");
504
- let body;
505
- body = JSON.stringify(
506
- (0, import_smithy_client.take)(input, {
507
- AccountId: [],
508
- AlternateContactType: []
509
- })
510
- );
511
- b.m("POST").h(headers).b(body);
512
- return b.build();
513
- }, "se_DeleteAlternateContactCommand");
514
- var se_DisableRegionCommand = /* @__PURE__ */ __name(async (input, context) => {
515
- const b = (0, import_core.requestBuilder)(input, context);
516
- const headers = {
517
- "content-type": "application/json"
518
- };
519
- b.bp("/disableRegion");
520
- let body;
521
- body = JSON.stringify(
522
- (0, import_smithy_client.take)(input, {
523
- AccountId: [],
524
- RegionName: []
525
- })
526
- );
527
- b.m("POST").h(headers).b(body);
528
- return b.build();
529
- }, "se_DisableRegionCommand");
530
- var se_EnableRegionCommand = /* @__PURE__ */ __name(async (input, context) => {
531
- const b = (0, import_core.requestBuilder)(input, context);
532
- const headers = {
533
- "content-type": "application/json"
534
- };
535
- b.bp("/enableRegion");
536
- let body;
537
- body = JSON.stringify(
538
- (0, import_smithy_client.take)(input, {
539
- AccountId: [],
540
- RegionName: []
541
- })
542
- );
543
- b.m("POST").h(headers).b(body);
544
- return b.build();
545
- }, "se_EnableRegionCommand");
546
- var se_GetAccountInformationCommand = /* @__PURE__ */ __name(async (input, context) => {
547
- const b = (0, import_core.requestBuilder)(input, context);
548
- const headers = {
549
- "content-type": "application/json"
550
- };
551
- b.bp("/getAccountInformation");
552
- let body;
553
- body = JSON.stringify(
554
- (0, import_smithy_client.take)(input, {
555
- AccountId: []
556
- })
557
- );
558
- b.m("POST").h(headers).b(body);
559
- return b.build();
560
- }, "se_GetAccountInformationCommand");
561
- var se_GetAlternateContactCommand = /* @__PURE__ */ __name(async (input, context) => {
562
- const b = (0, import_core.requestBuilder)(input, context);
563
- const headers = {
564
- "content-type": "application/json"
565
- };
566
- b.bp("/getAlternateContact");
567
- let body;
568
- body = JSON.stringify(
569
- (0, import_smithy_client.take)(input, {
570
- AccountId: [],
571
- AlternateContactType: []
572
- })
573
- );
574
- b.m("POST").h(headers).b(body);
575
- return b.build();
576
- }, "se_GetAlternateContactCommand");
577
- var se_GetContactInformationCommand = /* @__PURE__ */ __name(async (input, context) => {
578
- const b = (0, import_core.requestBuilder)(input, context);
579
- const headers = {
580
- "content-type": "application/json"
581
- };
582
- b.bp("/getContactInformation");
583
- let body;
584
- body = JSON.stringify(
585
- (0, import_smithy_client.take)(input, {
586
- AccountId: []
587
- })
588
- );
589
- b.m("POST").h(headers).b(body);
590
- return b.build();
591
- }, "se_GetContactInformationCommand");
592
- var se_GetPrimaryEmailCommand = /* @__PURE__ */ __name(async (input, context) => {
593
- const b = (0, import_core.requestBuilder)(input, context);
594
- const headers = {
595
- "content-type": "application/json"
596
- };
597
- b.bp("/getPrimaryEmail");
598
- let body;
599
- body = JSON.stringify(
600
- (0, import_smithy_client.take)(input, {
601
- AccountId: []
602
- })
603
- );
604
- b.m("POST").h(headers).b(body);
605
- return b.build();
606
- }, "se_GetPrimaryEmailCommand");
607
- var se_GetRegionOptStatusCommand = /* @__PURE__ */ __name(async (input, context) => {
608
- const b = (0, import_core.requestBuilder)(input, context);
609
- const headers = {
610
- "content-type": "application/json"
611
- };
612
- b.bp("/getRegionOptStatus");
613
- let body;
614
- body = JSON.stringify(
615
- (0, import_smithy_client.take)(input, {
616
- AccountId: [],
617
- RegionName: []
618
- })
619
- );
620
- b.m("POST").h(headers).b(body);
621
- return b.build();
622
- }, "se_GetRegionOptStatusCommand");
623
- var se_ListRegionsCommand = /* @__PURE__ */ __name(async (input, context) => {
624
- const b = (0, import_core.requestBuilder)(input, context);
625
- const headers = {
626
- "content-type": "application/json"
627
- };
628
- b.bp("/listRegions");
629
- let body;
630
- body = JSON.stringify(
631
- (0, import_smithy_client.take)(input, {
632
- AccountId: [],
633
- MaxResults: [],
634
- NextToken: [],
635
- RegionOptStatusContains: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "RegionOptStatusContains")
636
- })
637
- );
638
- b.m("POST").h(headers).b(body);
639
- return b.build();
640
- }, "se_ListRegionsCommand");
641
- var se_PutAccountNameCommand = /* @__PURE__ */ __name(async (input, context) => {
642
- const b = (0, import_core.requestBuilder)(input, context);
643
- const headers = {
644
- "content-type": "application/json"
645
- };
646
- b.bp("/putAccountName");
647
- let body;
648
- body = JSON.stringify(
649
- (0, import_smithy_client.take)(input, {
650
- AccountId: [],
651
- AccountName: []
652
- })
653
- );
654
- b.m("POST").h(headers).b(body);
655
- return b.build();
656
- }, "se_PutAccountNameCommand");
657
- var se_PutAlternateContactCommand = /* @__PURE__ */ __name(async (input, context) => {
658
- const b = (0, import_core.requestBuilder)(input, context);
659
- const headers = {
660
- "content-type": "application/json"
661
- };
662
- b.bp("/putAlternateContact");
663
- let body;
664
- body = JSON.stringify(
665
- (0, import_smithy_client.take)(input, {
666
- AccountId: [],
667
- AlternateContactType: [],
668
- EmailAddress: [],
669
- Name: [],
670
- PhoneNumber: [],
671
- Title: []
672
- })
673
- );
674
- b.m("POST").h(headers).b(body);
675
- return b.build();
676
- }, "se_PutAlternateContactCommand");
677
- var se_PutContactInformationCommand = /* @__PURE__ */ __name(async (input, context) => {
678
- const b = (0, import_core.requestBuilder)(input, context);
679
- const headers = {
680
- "content-type": "application/json"
681
- };
682
- b.bp("/putContactInformation");
683
- let body;
684
- body = JSON.stringify(
685
- (0, import_smithy_client.take)(input, {
686
- AccountId: [],
687
- ContactInformation: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "ContactInformation")
688
- })
689
- );
690
- b.m("POST").h(headers).b(body);
691
- return b.build();
692
- }, "se_PutContactInformationCommand");
693
- var se_StartPrimaryEmailUpdateCommand = /* @__PURE__ */ __name(async (input, context) => {
694
- const b = (0, import_core.requestBuilder)(input, context);
695
- const headers = {
696
- "content-type": "application/json"
697
- };
698
- b.bp("/startPrimaryEmailUpdate");
699
- let body;
700
- body = JSON.stringify(
701
- (0, import_smithy_client.take)(input, {
702
- AccountId: [],
703
- PrimaryEmail: []
704
- })
705
- );
706
- b.m("POST").h(headers).b(body);
707
- return b.build();
708
- }, "se_StartPrimaryEmailUpdateCommand");
709
- var de_AcceptPrimaryEmailUpdateCommand = /* @__PURE__ */ __name(async (output, context) => {
710
- if (output.statusCode !== 200 && output.statusCode >= 300) {
711
- return de_CommandError(output, context);
712
- }
713
- const contents = (0, import_smithy_client.map)({
714
- $metadata: deserializeMetadata(output)
715
- });
716
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
717
- const doc = (0, import_smithy_client.take)(data, {
718
- Status: import_smithy_client.expectString
719
- });
720
- Object.assign(contents, doc);
721
- return contents;
722
- }, "de_AcceptPrimaryEmailUpdateCommand");
723
- var de_DeleteAlternateContactCommand = /* @__PURE__ */ __name(async (output, context) => {
724
- if (output.statusCode !== 200 && output.statusCode >= 300) {
725
- return de_CommandError(output, context);
726
- }
727
- const contents = (0, import_smithy_client.map)({
728
- $metadata: deserializeMetadata(output)
729
- });
730
- await (0, import_smithy_client.collectBody)(output.body, context);
731
- return contents;
732
- }, "de_DeleteAlternateContactCommand");
733
- var de_DisableRegionCommand = /* @__PURE__ */ __name(async (output, context) => {
734
- if (output.statusCode !== 200 && output.statusCode >= 300) {
735
- return de_CommandError(output, context);
736
- }
737
- const contents = (0, import_smithy_client.map)({
738
- $metadata: deserializeMetadata(output)
739
- });
740
- await (0, import_smithy_client.collectBody)(output.body, context);
741
- return contents;
742
- }, "de_DisableRegionCommand");
743
- var de_EnableRegionCommand = /* @__PURE__ */ __name(async (output, context) => {
744
- if (output.statusCode !== 200 && output.statusCode >= 300) {
745
- return de_CommandError(output, context);
746
- }
747
- const contents = (0, import_smithy_client.map)({
748
- $metadata: deserializeMetadata(output)
749
- });
750
- await (0, import_smithy_client.collectBody)(output.body, context);
751
- return contents;
752
- }, "de_EnableRegionCommand");
753
- var de_GetAccountInformationCommand = /* @__PURE__ */ __name(async (output, context) => {
754
- if (output.statusCode !== 200 && output.statusCode >= 300) {
755
- return de_CommandError(output, context);
756
- }
757
- const contents = (0, import_smithy_client.map)({
758
- $metadata: deserializeMetadata(output)
759
- });
760
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
761
- const doc = (0, import_smithy_client.take)(data, {
762
- AccountCreatedDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "AccountCreatedDate"),
763
- AccountId: import_smithy_client.expectString,
764
- AccountName: import_smithy_client.expectString
765
- });
766
- Object.assign(contents, doc);
767
- return contents;
768
- }, "de_GetAccountInformationCommand");
769
- var de_GetAlternateContactCommand = /* @__PURE__ */ __name(async (output, context) => {
770
- if (output.statusCode !== 200 && output.statusCode >= 300) {
771
- return de_CommandError(output, context);
772
- }
773
- const contents = (0, import_smithy_client.map)({
774
- $metadata: deserializeMetadata(output)
775
- });
776
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
777
- const doc = (0, import_smithy_client.take)(data, {
778
- AlternateContact: import_smithy_client._json
779
- });
780
- Object.assign(contents, doc);
781
- return contents;
782
- }, "de_GetAlternateContactCommand");
783
- var de_GetContactInformationCommand = /* @__PURE__ */ __name(async (output, context) => {
784
- if (output.statusCode !== 200 && output.statusCode >= 300) {
785
- return de_CommandError(output, context);
786
- }
787
- const contents = (0, import_smithy_client.map)({
788
- $metadata: deserializeMetadata(output)
789
- });
790
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
791
- const doc = (0, import_smithy_client.take)(data, {
792
- ContactInformation: import_smithy_client._json
793
- });
794
- Object.assign(contents, doc);
795
- return contents;
796
- }, "de_GetContactInformationCommand");
797
- var de_GetPrimaryEmailCommand = /* @__PURE__ */ __name(async (output, context) => {
798
- if (output.statusCode !== 200 && output.statusCode >= 300) {
799
- return de_CommandError(output, context);
800
- }
801
- const contents = (0, import_smithy_client.map)({
802
- $metadata: deserializeMetadata(output)
803
- });
804
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
805
- const doc = (0, import_smithy_client.take)(data, {
806
- PrimaryEmail: import_smithy_client.expectString
807
- });
808
- Object.assign(contents, doc);
809
- return contents;
810
- }, "de_GetPrimaryEmailCommand");
811
- var de_GetRegionOptStatusCommand = /* @__PURE__ */ __name(async (output, context) => {
812
- if (output.statusCode !== 200 && output.statusCode >= 300) {
813
- return de_CommandError(output, context);
814
- }
815
- const contents = (0, import_smithy_client.map)({
816
- $metadata: deserializeMetadata(output)
817
- });
818
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
819
- const doc = (0, import_smithy_client.take)(data, {
820
- RegionName: import_smithy_client.expectString,
821
- RegionOptStatus: import_smithy_client.expectString
822
- });
823
- Object.assign(contents, doc);
824
- return contents;
825
- }, "de_GetRegionOptStatusCommand");
826
- var de_ListRegionsCommand = /* @__PURE__ */ __name(async (output, context) => {
827
- if (output.statusCode !== 200 && output.statusCode >= 300) {
828
- return de_CommandError(output, context);
829
- }
830
- const contents = (0, import_smithy_client.map)({
831
- $metadata: deserializeMetadata(output)
832
- });
833
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
834
- const doc = (0, import_smithy_client.take)(data, {
835
- NextToken: import_smithy_client.expectString,
836
- Regions: import_smithy_client._json
837
- });
838
- Object.assign(contents, doc);
839
- return contents;
840
- }, "de_ListRegionsCommand");
841
- var de_PutAccountNameCommand = /* @__PURE__ */ __name(async (output, context) => {
842
- if (output.statusCode !== 200 && output.statusCode >= 300) {
843
- return de_CommandError(output, context);
844
- }
845
- const contents = (0, import_smithy_client.map)({
846
- $metadata: deserializeMetadata(output)
847
- });
848
- await (0, import_smithy_client.collectBody)(output.body, context);
849
- return contents;
850
- }, "de_PutAccountNameCommand");
851
- var de_PutAlternateContactCommand = /* @__PURE__ */ __name(async (output, context) => {
852
- if (output.statusCode !== 200 && output.statusCode >= 300) {
853
- return de_CommandError(output, context);
854
- }
855
- const contents = (0, import_smithy_client.map)({
856
- $metadata: deserializeMetadata(output)
857
- });
858
- await (0, import_smithy_client.collectBody)(output.body, context);
859
- return contents;
860
- }, "de_PutAlternateContactCommand");
861
- var de_PutContactInformationCommand = /* @__PURE__ */ __name(async (output, context) => {
862
- if (output.statusCode !== 200 && output.statusCode >= 300) {
863
- return de_CommandError(output, context);
864
- }
865
- const contents = (0, import_smithy_client.map)({
866
- $metadata: deserializeMetadata(output)
867
- });
868
- await (0, import_smithy_client.collectBody)(output.body, context);
869
- return contents;
870
- }, "de_PutContactInformationCommand");
871
- var de_StartPrimaryEmailUpdateCommand = /* @__PURE__ */ __name(async (output, context) => {
872
- if (output.statusCode !== 200 && output.statusCode >= 300) {
873
- return de_CommandError(output, context);
874
- }
875
- const contents = (0, import_smithy_client.map)({
876
- $metadata: deserializeMetadata(output)
877
- });
878
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
879
- const doc = (0, import_smithy_client.take)(data, {
880
- Status: import_smithy_client.expectString
881
- });
882
- Object.assign(contents, doc);
883
- return contents;
884
- }, "de_StartPrimaryEmailUpdateCommand");
885
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
886
- const parsedOutput = {
887
- ...output,
888
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
889
- };
890
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
891
- switch (errorCode) {
892
- case "AccessDeniedException":
893
- case "com.amazonaws.account#AccessDeniedException":
894
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
895
- case "ConflictException":
896
- case "com.amazonaws.account#ConflictException":
897
- throw await de_ConflictExceptionRes(parsedOutput, context);
898
- case "InternalServerException":
899
- case "com.amazonaws.account#InternalServerException":
900
- throw await de_InternalServerExceptionRes(parsedOutput, context);
901
- case "ResourceNotFoundException":
902
- case "com.amazonaws.account#ResourceNotFoundException":
903
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
904
- case "TooManyRequestsException":
905
- case "com.amazonaws.account#TooManyRequestsException":
906
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
907
- case "ValidationException":
908
- case "com.amazonaws.account#ValidationException":
909
- throw await de_ValidationExceptionRes(parsedOutput, context);
910
- default:
911
- const parsedBody = parsedOutput.body;
912
- return throwDefaultError({
913
- output,
914
- parsedBody,
915
- errorCode
916
- });
917
- }
918
- }, "de_CommandError");
919
- var throwDefaultError = (0, import_smithy_client.withBaseException)(AccountServiceException);
920
- var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
921
- const contents = (0, import_smithy_client.map)({
922
- [_eT]: [, parsedOutput.headers[_xae]]
923
- });
924
- const data = parsedOutput.body;
925
- const doc = (0, import_smithy_client.take)(data, {
926
- message: import_smithy_client.expectString
927
- });
928
- Object.assign(contents, doc);
929
- const exception = new AccessDeniedException({
930
- $metadata: deserializeMetadata(parsedOutput),
931
- ...contents
932
- });
933
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
934
- }, "de_AccessDeniedExceptionRes");
935
- var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
936
- const contents = (0, import_smithy_client.map)({
937
- [_eT]: [, parsedOutput.headers[_xae]]
938
- });
939
- const data = parsedOutput.body;
940
- const doc = (0, import_smithy_client.take)(data, {
941
- message: import_smithy_client.expectString
942
- });
943
- Object.assign(contents, doc);
944
- const exception = new ConflictException({
945
- $metadata: deserializeMetadata(parsedOutput),
946
- ...contents
947
- });
948
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
949
- }, "de_ConflictExceptionRes");
950
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
951
- const contents = (0, import_smithy_client.map)({
952
- [_eT]: [, parsedOutput.headers[_xae]]
953
- });
954
- const data = parsedOutput.body;
955
- const doc = (0, import_smithy_client.take)(data, {
956
- message: import_smithy_client.expectString
957
- });
958
- Object.assign(contents, doc);
959
- const exception = new InternalServerException({
960
- $metadata: deserializeMetadata(parsedOutput),
961
- ...contents
962
- });
963
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
964
- }, "de_InternalServerExceptionRes");
965
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
966
- const contents = (0, import_smithy_client.map)({
967
- [_eT]: [, parsedOutput.headers[_xae]]
968
- });
969
- const data = parsedOutput.body;
970
- const doc = (0, import_smithy_client.take)(data, {
971
- message: import_smithy_client.expectString
972
- });
973
- Object.assign(contents, doc);
974
- const exception = new ResourceNotFoundException({
975
- $metadata: deserializeMetadata(parsedOutput),
976
- ...contents
977
- });
978
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
979
- }, "de_ResourceNotFoundExceptionRes");
980
- var de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
981
- const contents = (0, import_smithy_client.map)({
982
- [_eT]: [, parsedOutput.headers[_xae]]
983
- });
984
- const data = parsedOutput.body;
985
- const doc = (0, import_smithy_client.take)(data, {
986
- message: import_smithy_client.expectString
987
- });
988
- Object.assign(contents, doc);
989
- const exception = new TooManyRequestsException({
990
- $metadata: deserializeMetadata(parsedOutput),
991
- ...contents
992
- });
993
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
994
- }, "de_TooManyRequestsExceptionRes");
995
- var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
996
- const contents = (0, import_smithy_client.map)({});
997
- const data = parsedOutput.body;
998
- const doc = (0, import_smithy_client.take)(data, {
999
- fieldList: import_smithy_client._json,
1000
- message: import_smithy_client.expectString,
1001
- reason: import_smithy_client.expectString
1002
- });
1003
- Object.assign(contents, doc);
1004
- const exception = new ValidationException({
1005
- $metadata: deserializeMetadata(parsedOutput),
1006
- ...contents
1007
- });
1008
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
1009
- }, "de_ValidationExceptionRes");
1010
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1011
- httpStatusCode: output.statusCode,
1012
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1013
- extendedRequestId: output.headers["x-amz-id-2"],
1014
- cfId: output.headers["x-amz-cf-id"]
1015
- }), "deserializeMetadata");
1016
- var _eT = "errorType";
1017
- var _xae = "x-amzn-errortype";
1018
-
1019
- // src/commands/AcceptPrimaryEmailUpdateCommand.ts
1020
- var AcceptPrimaryEmailUpdateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1021
- return [
1022
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1023
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1024
- ];
1025
- }).s("Account", "AcceptPrimaryEmailUpdate", {}).n("AccountClient", "AcceptPrimaryEmailUpdateCommand").f(AcceptPrimaryEmailUpdateRequestFilterSensitiveLog, void 0).ser(se_AcceptPrimaryEmailUpdateCommand).de(de_AcceptPrimaryEmailUpdateCommand).build() {
1026
- static {
1027
- __name(this, "AcceptPrimaryEmailUpdateCommand");
1028
- }
571
+ const de_GetContactInformationCommand = async (output, context) => {
572
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
573
+ return de_CommandError(output, context);
574
+ }
575
+ const contents = smithyClient.map({
576
+ $metadata: deserializeMetadata(output),
577
+ });
578
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
579
+ const doc = smithyClient.take(data, {
580
+ ContactInformation: smithyClient._json,
581
+ });
582
+ Object.assign(contents, doc);
583
+ return contents;
1029
584
  };
1030
-
1031
- // src/commands/DeleteAlternateContactCommand.ts
1032
-
1033
-
1034
-
1035
- var DeleteAlternateContactCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1036
- return [
1037
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1038
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1039
- ];
1040
- }).s("Account", "DeleteAlternateContact", {}).n("AccountClient", "DeleteAlternateContactCommand").f(void 0, void 0).ser(se_DeleteAlternateContactCommand).de(de_DeleteAlternateContactCommand).build() {
1041
- static {
1042
- __name(this, "DeleteAlternateContactCommand");
1043
- }
585
+ const de_GetPrimaryEmailCommand = async (output, context) => {
586
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
587
+ return de_CommandError(output, context);
588
+ }
589
+ const contents = smithyClient.map({
590
+ $metadata: deserializeMetadata(output),
591
+ });
592
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
593
+ const doc = smithyClient.take(data, {
594
+ PrimaryEmail: smithyClient.expectString,
595
+ });
596
+ Object.assign(contents, doc);
597
+ return contents;
1044
598
  };
1045
-
1046
- // src/commands/DisableRegionCommand.ts
1047
-
1048
-
1049
-
1050
- var DisableRegionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1051
- return [
1052
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1053
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1054
- ];
1055
- }).s("Account", "DisableRegion", {}).n("AccountClient", "DisableRegionCommand").f(void 0, void 0).ser(se_DisableRegionCommand).de(de_DisableRegionCommand).build() {
1056
- static {
1057
- __name(this, "DisableRegionCommand");
1058
- }
599
+ const de_GetRegionOptStatusCommand = async (output, context) => {
600
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
601
+ return de_CommandError(output, context);
602
+ }
603
+ const contents = smithyClient.map({
604
+ $metadata: deserializeMetadata(output),
605
+ });
606
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
607
+ const doc = smithyClient.take(data, {
608
+ RegionName: smithyClient.expectString,
609
+ RegionOptStatus: smithyClient.expectString,
610
+ });
611
+ Object.assign(contents, doc);
612
+ return contents;
1059
613
  };
1060
-
1061
- // src/commands/EnableRegionCommand.ts
1062
-
1063
-
1064
-
1065
- var EnableRegionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1066
- return [
1067
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1068
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1069
- ];
1070
- }).s("Account", "EnableRegion", {}).n("AccountClient", "EnableRegionCommand").f(void 0, void 0).ser(se_EnableRegionCommand).de(de_EnableRegionCommand).build() {
1071
- static {
1072
- __name(this, "EnableRegionCommand");
1073
- }
614
+ const de_ListRegionsCommand = async (output, context) => {
615
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
616
+ return de_CommandError(output, context);
617
+ }
618
+ const contents = smithyClient.map({
619
+ $metadata: deserializeMetadata(output),
620
+ });
621
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
622
+ const doc = smithyClient.take(data, {
623
+ NextToken: smithyClient.expectString,
624
+ Regions: smithyClient._json,
625
+ });
626
+ Object.assign(contents, doc);
627
+ return contents;
1074
628
  };
1075
-
1076
- // src/commands/GetAccountInformationCommand.ts
1077
-
1078
-
1079
-
1080
- var GetAccountInformationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1081
- return [
1082
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1083
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1084
- ];
1085
- }).s("Account", "GetAccountInformation", {}).n("AccountClient", "GetAccountInformationCommand").f(void 0, GetAccountInformationResponseFilterSensitiveLog).ser(se_GetAccountInformationCommand).de(de_GetAccountInformationCommand).build() {
1086
- static {
1087
- __name(this, "GetAccountInformationCommand");
1088
- }
629
+ const de_PutAccountNameCommand = async (output, context) => {
630
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
631
+ return de_CommandError(output, context);
632
+ }
633
+ const contents = smithyClient.map({
634
+ $metadata: deserializeMetadata(output),
635
+ });
636
+ await smithyClient.collectBody(output.body, context);
637
+ return contents;
1089
638
  };
1090
-
1091
- // src/commands/GetAlternateContactCommand.ts
1092
-
1093
-
1094
-
1095
- var GetAlternateContactCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1096
- return [
1097
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1098
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1099
- ];
1100
- }).s("Account", "GetAlternateContact", {}).n("AccountClient", "GetAlternateContactCommand").f(void 0, GetAlternateContactResponseFilterSensitiveLog).ser(se_GetAlternateContactCommand).de(de_GetAlternateContactCommand).build() {
1101
- static {
1102
- __name(this, "GetAlternateContactCommand");
1103
- }
639
+ const de_PutAlternateContactCommand = async (output, context) => {
640
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
641
+ return de_CommandError(output, context);
642
+ }
643
+ const contents = smithyClient.map({
644
+ $metadata: deserializeMetadata(output),
645
+ });
646
+ await smithyClient.collectBody(output.body, context);
647
+ return contents;
1104
648
  };
1105
-
1106
- // src/commands/GetContactInformationCommand.ts
1107
-
1108
-
1109
-
1110
- var GetContactInformationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1111
- return [
1112
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1113
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1114
- ];
1115
- }).s("Account", "GetContactInformation", {}).n("AccountClient", "GetContactInformationCommand").f(void 0, GetContactInformationResponseFilterSensitiveLog).ser(se_GetContactInformationCommand).de(de_GetContactInformationCommand).build() {
1116
- static {
1117
- __name(this, "GetContactInformationCommand");
1118
- }
649
+ const de_PutContactInformationCommand = async (output, context) => {
650
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
651
+ return de_CommandError(output, context);
652
+ }
653
+ const contents = smithyClient.map({
654
+ $metadata: deserializeMetadata(output),
655
+ });
656
+ await smithyClient.collectBody(output.body, context);
657
+ return contents;
1119
658
  };
1120
-
1121
- // src/commands/GetPrimaryEmailCommand.ts
1122
-
1123
-
1124
-
1125
- var GetPrimaryEmailCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1126
- return [
1127
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1128
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1129
- ];
1130
- }).s("Account", "GetPrimaryEmail", {}).n("AccountClient", "GetPrimaryEmailCommand").f(void 0, GetPrimaryEmailResponseFilterSensitiveLog).ser(se_GetPrimaryEmailCommand).de(de_GetPrimaryEmailCommand).build() {
1131
- static {
1132
- __name(this, "GetPrimaryEmailCommand");
1133
- }
659
+ const de_StartPrimaryEmailUpdateCommand = async (output, context) => {
660
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
661
+ return de_CommandError(output, context);
662
+ }
663
+ const contents = smithyClient.map({
664
+ $metadata: deserializeMetadata(output),
665
+ });
666
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
667
+ const doc = smithyClient.take(data, {
668
+ Status: smithyClient.expectString,
669
+ });
670
+ Object.assign(contents, doc);
671
+ return contents;
1134
672
  };
1135
-
1136
- // src/commands/GetRegionOptStatusCommand.ts
1137
-
1138
-
1139
-
1140
- var GetRegionOptStatusCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1141
- return [
1142
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1143
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1144
- ];
1145
- }).s("Account", "GetRegionOptStatus", {}).n("AccountClient", "GetRegionOptStatusCommand").f(void 0, void 0).ser(se_GetRegionOptStatusCommand).de(de_GetRegionOptStatusCommand).build() {
1146
- static {
1147
- __name(this, "GetRegionOptStatusCommand");
1148
- }
673
+ const de_CommandError = async (output, context) => {
674
+ const parsedOutput = {
675
+ ...output,
676
+ body: await core$1.parseJsonErrorBody(output.body, context),
677
+ };
678
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
679
+ switch (errorCode) {
680
+ case "AccessDeniedException":
681
+ case "com.amazonaws.account#AccessDeniedException":
682
+ throw await de_AccessDeniedExceptionRes(parsedOutput);
683
+ case "ConflictException":
684
+ case "com.amazonaws.account#ConflictException":
685
+ throw await de_ConflictExceptionRes(parsedOutput);
686
+ case "InternalServerException":
687
+ case "com.amazonaws.account#InternalServerException":
688
+ throw await de_InternalServerExceptionRes(parsedOutput);
689
+ case "ResourceNotFoundException":
690
+ case "com.amazonaws.account#ResourceNotFoundException":
691
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
692
+ case "TooManyRequestsException":
693
+ case "com.amazonaws.account#TooManyRequestsException":
694
+ throw await de_TooManyRequestsExceptionRes(parsedOutput);
695
+ case "ValidationException":
696
+ case "com.amazonaws.account#ValidationException":
697
+ throw await de_ValidationExceptionRes(parsedOutput);
698
+ default:
699
+ const parsedBody = parsedOutput.body;
700
+ return throwDefaultError({
701
+ output,
702
+ parsedBody,
703
+ errorCode,
704
+ });
705
+ }
1149
706
  };
1150
-
1151
- // src/commands/ListRegionsCommand.ts
1152
-
1153
-
1154
-
1155
- var ListRegionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1156
- return [
1157
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1158
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1159
- ];
1160
- }).s("Account", "ListRegions", {}).n("AccountClient", "ListRegionsCommand").f(void 0, void 0).ser(se_ListRegionsCommand).de(de_ListRegionsCommand).build() {
1161
- static {
1162
- __name(this, "ListRegionsCommand");
1163
- }
707
+ const throwDefaultError = smithyClient.withBaseException(AccountServiceException);
708
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
709
+ const contents = smithyClient.map({
710
+ [_eT]: [, parsedOutput.headers[_xae]],
711
+ });
712
+ const data = parsedOutput.body;
713
+ const doc = smithyClient.take(data, {
714
+ message: smithyClient.expectString,
715
+ });
716
+ Object.assign(contents, doc);
717
+ const exception = new AccessDeniedException({
718
+ $metadata: deserializeMetadata(parsedOutput),
719
+ ...contents,
720
+ });
721
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1164
722
  };
1165
-
1166
- // src/commands/PutAccountNameCommand.ts
1167
-
1168
-
1169
-
1170
- var PutAccountNameCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1171
- return [
1172
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1173
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1174
- ];
1175
- }).s("Account", "PutAccountName", {}).n("AccountClient", "PutAccountNameCommand").f(PutAccountNameRequestFilterSensitiveLog, void 0).ser(se_PutAccountNameCommand).de(de_PutAccountNameCommand).build() {
1176
- static {
1177
- __name(this, "PutAccountNameCommand");
1178
- }
723
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
724
+ const contents = smithyClient.map({
725
+ [_eT]: [, parsedOutput.headers[_xae]],
726
+ });
727
+ const data = parsedOutput.body;
728
+ const doc = smithyClient.take(data, {
729
+ message: smithyClient.expectString,
730
+ });
731
+ Object.assign(contents, doc);
732
+ const exception = new ConflictException({
733
+ $metadata: deserializeMetadata(parsedOutput),
734
+ ...contents,
735
+ });
736
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1179
737
  };
1180
-
1181
- // src/commands/PutAlternateContactCommand.ts
1182
-
1183
-
1184
-
1185
- var PutAlternateContactCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1186
- return [
1187
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1188
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1189
- ];
1190
- }).s("Account", "PutAlternateContact", {}).n("AccountClient", "PutAlternateContactCommand").f(PutAlternateContactRequestFilterSensitiveLog, void 0).ser(se_PutAlternateContactCommand).de(de_PutAlternateContactCommand).build() {
1191
- static {
1192
- __name(this, "PutAlternateContactCommand");
1193
- }
738
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
739
+ const contents = smithyClient.map({
740
+ [_eT]: [, parsedOutput.headers[_xae]],
741
+ });
742
+ const data = parsedOutput.body;
743
+ const doc = smithyClient.take(data, {
744
+ message: smithyClient.expectString,
745
+ });
746
+ Object.assign(contents, doc);
747
+ const exception = new InternalServerException({
748
+ $metadata: deserializeMetadata(parsedOutput),
749
+ ...contents,
750
+ });
751
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1194
752
  };
1195
-
1196
- // src/commands/PutContactInformationCommand.ts
1197
-
1198
-
1199
-
1200
- var PutContactInformationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1201
- return [
1202
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1203
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1204
- ];
1205
- }).s("Account", "PutContactInformation", {}).n("AccountClient", "PutContactInformationCommand").f(PutContactInformationRequestFilterSensitiveLog, void 0).ser(se_PutContactInformationCommand).de(de_PutContactInformationCommand).build() {
1206
- static {
1207
- __name(this, "PutContactInformationCommand");
1208
- }
753
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
754
+ const contents = smithyClient.map({
755
+ [_eT]: [, parsedOutput.headers[_xae]],
756
+ });
757
+ const data = parsedOutput.body;
758
+ const doc = smithyClient.take(data, {
759
+ message: smithyClient.expectString,
760
+ });
761
+ Object.assign(contents, doc);
762
+ const exception = new ResourceNotFoundException({
763
+ $metadata: deserializeMetadata(parsedOutput),
764
+ ...contents,
765
+ });
766
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1209
767
  };
1210
-
1211
- // src/commands/StartPrimaryEmailUpdateCommand.ts
1212
-
1213
-
1214
-
1215
- var StartPrimaryEmailUpdateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1216
- return [
1217
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1218
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1219
- ];
1220
- }).s("Account", "StartPrimaryEmailUpdate", {}).n("AccountClient", "StartPrimaryEmailUpdateCommand").f(StartPrimaryEmailUpdateRequestFilterSensitiveLog, void 0).ser(se_StartPrimaryEmailUpdateCommand).de(de_StartPrimaryEmailUpdateCommand).build() {
1221
- static {
1222
- __name(this, "StartPrimaryEmailUpdateCommand");
1223
- }
768
+ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
769
+ const contents = smithyClient.map({
770
+ [_eT]: [, parsedOutput.headers[_xae]],
771
+ });
772
+ const data = parsedOutput.body;
773
+ const doc = smithyClient.take(data, {
774
+ message: smithyClient.expectString,
775
+ });
776
+ Object.assign(contents, doc);
777
+ const exception = new TooManyRequestsException({
778
+ $metadata: deserializeMetadata(parsedOutput),
779
+ ...contents,
780
+ });
781
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1224
782
  };
1225
-
1226
- // src/Account.ts
1227
- var commands = {
1228
- AcceptPrimaryEmailUpdateCommand,
1229
- DeleteAlternateContactCommand,
1230
- DisableRegionCommand,
1231
- EnableRegionCommand,
1232
- GetAccountInformationCommand,
1233
- GetAlternateContactCommand,
1234
- GetContactInformationCommand,
1235
- GetPrimaryEmailCommand,
1236
- GetRegionOptStatusCommand,
1237
- ListRegionsCommand,
1238
- PutAccountNameCommand,
1239
- PutAlternateContactCommand,
1240
- PutContactInformationCommand,
1241
- StartPrimaryEmailUpdateCommand
783
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
784
+ const contents = smithyClient.map({});
785
+ const data = parsedOutput.body;
786
+ const doc = smithyClient.take(data, {
787
+ fieldList: smithyClient._json,
788
+ message: smithyClient.expectString,
789
+ reason: smithyClient.expectString,
790
+ });
791
+ Object.assign(contents, doc);
792
+ const exception = new ValidationException({
793
+ $metadata: deserializeMetadata(parsedOutput),
794
+ ...contents,
795
+ });
796
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
1242
797
  };
1243
- var Account = class extends AccountClient {
1244
- static {
1245
- __name(this, "Account");
1246
- }
798
+ const deserializeMetadata = (output) => ({
799
+ httpStatusCode: output.statusCode,
800
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
801
+ extendedRequestId: output.headers["x-amz-id-2"],
802
+ cfId: output.headers["x-amz-cf-id"],
803
+ });
804
+ const _eT = "errorType";
805
+ const _xae = "x-amzn-errortype";
806
+
807
+ class AcceptPrimaryEmailUpdateCommand extends smithyClient.Command
808
+ .classBuilder()
809
+ .ep(commonParams)
810
+ .m(function (Command, cs, config, o) {
811
+ return [
812
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
813
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
814
+ ];
815
+ })
816
+ .s("Account", "AcceptPrimaryEmailUpdate", {})
817
+ .n("AccountClient", "AcceptPrimaryEmailUpdateCommand")
818
+ .f(AcceptPrimaryEmailUpdateRequestFilterSensitiveLog, void 0)
819
+ .ser(se_AcceptPrimaryEmailUpdateCommand)
820
+ .de(de_AcceptPrimaryEmailUpdateCommand)
821
+ .build() {
822
+ }
823
+
824
+ class DeleteAlternateContactCommand extends smithyClient.Command
825
+ .classBuilder()
826
+ .ep(commonParams)
827
+ .m(function (Command, cs, config, o) {
828
+ return [
829
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
830
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
831
+ ];
832
+ })
833
+ .s("Account", "DeleteAlternateContact", {})
834
+ .n("AccountClient", "DeleteAlternateContactCommand")
835
+ .f(void 0, void 0)
836
+ .ser(se_DeleteAlternateContactCommand)
837
+ .de(de_DeleteAlternateContactCommand)
838
+ .build() {
839
+ }
840
+
841
+ class DisableRegionCommand extends smithyClient.Command
842
+ .classBuilder()
843
+ .ep(commonParams)
844
+ .m(function (Command, cs, config, o) {
845
+ return [
846
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
847
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
848
+ ];
849
+ })
850
+ .s("Account", "DisableRegion", {})
851
+ .n("AccountClient", "DisableRegionCommand")
852
+ .f(void 0, void 0)
853
+ .ser(se_DisableRegionCommand)
854
+ .de(de_DisableRegionCommand)
855
+ .build() {
856
+ }
857
+
858
+ class EnableRegionCommand extends smithyClient.Command
859
+ .classBuilder()
860
+ .ep(commonParams)
861
+ .m(function (Command, cs, config, o) {
862
+ return [
863
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
864
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
865
+ ];
866
+ })
867
+ .s("Account", "EnableRegion", {})
868
+ .n("AccountClient", "EnableRegionCommand")
869
+ .f(void 0, void 0)
870
+ .ser(se_EnableRegionCommand)
871
+ .de(de_EnableRegionCommand)
872
+ .build() {
873
+ }
874
+
875
+ class GetAccountInformationCommand extends smithyClient.Command
876
+ .classBuilder()
877
+ .ep(commonParams)
878
+ .m(function (Command, cs, config, o) {
879
+ return [
880
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
881
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
882
+ ];
883
+ })
884
+ .s("Account", "GetAccountInformation", {})
885
+ .n("AccountClient", "GetAccountInformationCommand")
886
+ .f(void 0, GetAccountInformationResponseFilterSensitiveLog)
887
+ .ser(se_GetAccountInformationCommand)
888
+ .de(de_GetAccountInformationCommand)
889
+ .build() {
890
+ }
891
+
892
+ class GetAlternateContactCommand extends smithyClient.Command
893
+ .classBuilder()
894
+ .ep(commonParams)
895
+ .m(function (Command, cs, config, o) {
896
+ return [
897
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
898
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
899
+ ];
900
+ })
901
+ .s("Account", "GetAlternateContact", {})
902
+ .n("AccountClient", "GetAlternateContactCommand")
903
+ .f(void 0, GetAlternateContactResponseFilterSensitiveLog)
904
+ .ser(se_GetAlternateContactCommand)
905
+ .de(de_GetAlternateContactCommand)
906
+ .build() {
907
+ }
908
+
909
+ class GetContactInformationCommand extends smithyClient.Command
910
+ .classBuilder()
911
+ .ep(commonParams)
912
+ .m(function (Command, cs, config, o) {
913
+ return [
914
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
915
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
916
+ ];
917
+ })
918
+ .s("Account", "GetContactInformation", {})
919
+ .n("AccountClient", "GetContactInformationCommand")
920
+ .f(void 0, GetContactInformationResponseFilterSensitiveLog)
921
+ .ser(se_GetContactInformationCommand)
922
+ .de(de_GetContactInformationCommand)
923
+ .build() {
924
+ }
925
+
926
+ class GetPrimaryEmailCommand extends smithyClient.Command
927
+ .classBuilder()
928
+ .ep(commonParams)
929
+ .m(function (Command, cs, config, o) {
930
+ return [
931
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
932
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
933
+ ];
934
+ })
935
+ .s("Account", "GetPrimaryEmail", {})
936
+ .n("AccountClient", "GetPrimaryEmailCommand")
937
+ .f(void 0, GetPrimaryEmailResponseFilterSensitiveLog)
938
+ .ser(se_GetPrimaryEmailCommand)
939
+ .de(de_GetPrimaryEmailCommand)
940
+ .build() {
941
+ }
942
+
943
+ class GetRegionOptStatusCommand extends smithyClient.Command
944
+ .classBuilder()
945
+ .ep(commonParams)
946
+ .m(function (Command, cs, config, o) {
947
+ return [
948
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
949
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
950
+ ];
951
+ })
952
+ .s("Account", "GetRegionOptStatus", {})
953
+ .n("AccountClient", "GetRegionOptStatusCommand")
954
+ .f(void 0, void 0)
955
+ .ser(se_GetRegionOptStatusCommand)
956
+ .de(de_GetRegionOptStatusCommand)
957
+ .build() {
958
+ }
959
+
960
+ class ListRegionsCommand extends smithyClient.Command
961
+ .classBuilder()
962
+ .ep(commonParams)
963
+ .m(function (Command, cs, config, o) {
964
+ return [
965
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
966
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
967
+ ];
968
+ })
969
+ .s("Account", "ListRegions", {})
970
+ .n("AccountClient", "ListRegionsCommand")
971
+ .f(void 0, void 0)
972
+ .ser(se_ListRegionsCommand)
973
+ .de(de_ListRegionsCommand)
974
+ .build() {
975
+ }
976
+
977
+ class PutAccountNameCommand extends smithyClient.Command
978
+ .classBuilder()
979
+ .ep(commonParams)
980
+ .m(function (Command, cs, config, o) {
981
+ return [
982
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
983
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
984
+ ];
985
+ })
986
+ .s("Account", "PutAccountName", {})
987
+ .n("AccountClient", "PutAccountNameCommand")
988
+ .f(PutAccountNameRequestFilterSensitiveLog, void 0)
989
+ .ser(se_PutAccountNameCommand)
990
+ .de(de_PutAccountNameCommand)
991
+ .build() {
992
+ }
993
+
994
+ class PutAlternateContactCommand extends smithyClient.Command
995
+ .classBuilder()
996
+ .ep(commonParams)
997
+ .m(function (Command, cs, config, o) {
998
+ return [
999
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1000
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1001
+ ];
1002
+ })
1003
+ .s("Account", "PutAlternateContact", {})
1004
+ .n("AccountClient", "PutAlternateContactCommand")
1005
+ .f(PutAlternateContactRequestFilterSensitiveLog, void 0)
1006
+ .ser(se_PutAlternateContactCommand)
1007
+ .de(de_PutAlternateContactCommand)
1008
+ .build() {
1009
+ }
1010
+
1011
+ class PutContactInformationCommand extends smithyClient.Command
1012
+ .classBuilder()
1013
+ .ep(commonParams)
1014
+ .m(function (Command, cs, config, o) {
1015
+ return [
1016
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1017
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1018
+ ];
1019
+ })
1020
+ .s("Account", "PutContactInformation", {})
1021
+ .n("AccountClient", "PutContactInformationCommand")
1022
+ .f(PutContactInformationRequestFilterSensitiveLog, void 0)
1023
+ .ser(se_PutContactInformationCommand)
1024
+ .de(de_PutContactInformationCommand)
1025
+ .build() {
1026
+ }
1027
+
1028
+ class StartPrimaryEmailUpdateCommand extends smithyClient.Command
1029
+ .classBuilder()
1030
+ .ep(commonParams)
1031
+ .m(function (Command, cs, config, o) {
1032
+ return [
1033
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1034
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1035
+ ];
1036
+ })
1037
+ .s("Account", "StartPrimaryEmailUpdate", {})
1038
+ .n("AccountClient", "StartPrimaryEmailUpdateCommand")
1039
+ .f(StartPrimaryEmailUpdateRequestFilterSensitiveLog, void 0)
1040
+ .ser(se_StartPrimaryEmailUpdateCommand)
1041
+ .de(de_StartPrimaryEmailUpdateCommand)
1042
+ .build() {
1043
+ }
1044
+
1045
+ const commands = {
1046
+ AcceptPrimaryEmailUpdateCommand,
1047
+ DeleteAlternateContactCommand,
1048
+ DisableRegionCommand,
1049
+ EnableRegionCommand,
1050
+ GetAccountInformationCommand,
1051
+ GetAlternateContactCommand,
1052
+ GetContactInformationCommand,
1053
+ GetPrimaryEmailCommand,
1054
+ GetRegionOptStatusCommand,
1055
+ ListRegionsCommand,
1056
+ PutAccountNameCommand,
1057
+ PutAlternateContactCommand,
1058
+ PutContactInformationCommand,
1059
+ StartPrimaryEmailUpdateCommand,
1247
1060
  };
1248
- (0, import_smithy_client.createAggregatedClient)(commands, Account);
1249
-
1250
- // src/pagination/ListRegionsPaginator.ts
1061
+ class Account extends AccountClient {
1062
+ }
1063
+ smithyClient.createAggregatedClient(commands, Account);
1251
1064
 
1252
- var paginateListRegions = (0, import_core.createPaginator)(AccountClient, ListRegionsCommand, "NextToken", "NextToken", "MaxResults");
1253
- // Annotate the CommonJS export names for ESM import in node:
1065
+ const paginateListRegions = core.createPaginator(AccountClient, ListRegionsCommand, "NextToken", "NextToken", "MaxResults");
1254
1066
 
1255
- 0 && (module.exports = {
1256
- AccountServiceException,
1257
- __Client,
1258
- AccountClient,
1259
- Account,
1260
- $Command,
1261
- AcceptPrimaryEmailUpdateCommand,
1262
- DeleteAlternateContactCommand,
1263
- DisableRegionCommand,
1264
- EnableRegionCommand,
1265
- GetAccountInformationCommand,
1266
- GetAlternateContactCommand,
1267
- GetContactInformationCommand,
1268
- GetPrimaryEmailCommand,
1269
- GetRegionOptStatusCommand,
1270
- ListRegionsCommand,
1271
- PutAccountNameCommand,
1272
- PutAlternateContactCommand,
1273
- PutContactInformationCommand,
1274
- StartPrimaryEmailUpdateCommand,
1275
- paginateListRegions,
1276
- PrimaryEmailUpdateStatus,
1277
- AccessDeniedException,
1278
- ConflictException,
1279
- InternalServerException,
1280
- ResourceNotFoundException,
1281
- TooManyRequestsException,
1282
- ValidationExceptionReason,
1283
- ValidationException,
1284
- AlternateContactType,
1285
- RegionOptStatus,
1286
- AcceptPrimaryEmailUpdateRequestFilterSensitiveLog,
1287
- ValidationExceptionFieldFilterSensitiveLog,
1288
- GetAccountInformationResponseFilterSensitiveLog,
1289
- PutAccountNameRequestFilterSensitiveLog,
1290
- AlternateContactFilterSensitiveLog,
1291
- GetAlternateContactResponseFilterSensitiveLog,
1292
- PutAlternateContactRequestFilterSensitiveLog,
1293
- ContactInformationFilterSensitiveLog,
1294
- GetContactInformationResponseFilterSensitiveLog,
1295
- PutContactInformationRequestFilterSensitiveLog,
1296
- GetPrimaryEmailResponseFilterSensitiveLog,
1297
- StartPrimaryEmailUpdateRequestFilterSensitiveLog
1067
+ Object.defineProperty(exports, "$Command", {
1068
+ enumerable: true,
1069
+ get: function () { return smithyClient.Command; }
1298
1070
  });
1299
-
1071
+ Object.defineProperty(exports, "__Client", {
1072
+ enumerable: true,
1073
+ get: function () { return smithyClient.Client; }
1074
+ });
1075
+ exports.AcceptPrimaryEmailUpdateCommand = AcceptPrimaryEmailUpdateCommand;
1076
+ exports.AcceptPrimaryEmailUpdateRequestFilterSensitiveLog = AcceptPrimaryEmailUpdateRequestFilterSensitiveLog;
1077
+ exports.AccessDeniedException = AccessDeniedException;
1078
+ exports.Account = Account;
1079
+ exports.AccountClient = AccountClient;
1080
+ exports.AccountServiceException = AccountServiceException;
1081
+ exports.AlternateContactFilterSensitiveLog = AlternateContactFilterSensitiveLog;
1082
+ exports.AlternateContactType = AlternateContactType;
1083
+ exports.ConflictException = ConflictException;
1084
+ exports.ContactInformationFilterSensitiveLog = ContactInformationFilterSensitiveLog;
1085
+ exports.DeleteAlternateContactCommand = DeleteAlternateContactCommand;
1086
+ exports.DisableRegionCommand = DisableRegionCommand;
1087
+ exports.EnableRegionCommand = EnableRegionCommand;
1088
+ exports.GetAccountInformationCommand = GetAccountInformationCommand;
1089
+ exports.GetAccountInformationResponseFilterSensitiveLog = GetAccountInformationResponseFilterSensitiveLog;
1090
+ exports.GetAlternateContactCommand = GetAlternateContactCommand;
1091
+ exports.GetAlternateContactResponseFilterSensitiveLog = GetAlternateContactResponseFilterSensitiveLog;
1092
+ exports.GetContactInformationCommand = GetContactInformationCommand;
1093
+ exports.GetContactInformationResponseFilterSensitiveLog = GetContactInformationResponseFilterSensitiveLog;
1094
+ exports.GetPrimaryEmailCommand = GetPrimaryEmailCommand;
1095
+ exports.GetPrimaryEmailResponseFilterSensitiveLog = GetPrimaryEmailResponseFilterSensitiveLog;
1096
+ exports.GetRegionOptStatusCommand = GetRegionOptStatusCommand;
1097
+ exports.InternalServerException = InternalServerException;
1098
+ exports.ListRegionsCommand = ListRegionsCommand;
1099
+ exports.PrimaryEmailUpdateStatus = PrimaryEmailUpdateStatus;
1100
+ exports.PutAccountNameCommand = PutAccountNameCommand;
1101
+ exports.PutAccountNameRequestFilterSensitiveLog = PutAccountNameRequestFilterSensitiveLog;
1102
+ exports.PutAlternateContactCommand = PutAlternateContactCommand;
1103
+ exports.PutAlternateContactRequestFilterSensitiveLog = PutAlternateContactRequestFilterSensitiveLog;
1104
+ exports.PutContactInformationCommand = PutContactInformationCommand;
1105
+ exports.PutContactInformationRequestFilterSensitiveLog = PutContactInformationRequestFilterSensitiveLog;
1106
+ exports.RegionOptStatus = RegionOptStatus;
1107
+ exports.ResourceNotFoundException = ResourceNotFoundException;
1108
+ exports.StartPrimaryEmailUpdateCommand = StartPrimaryEmailUpdateCommand;
1109
+ exports.StartPrimaryEmailUpdateRequestFilterSensitiveLog = StartPrimaryEmailUpdateRequestFilterSensitiveLog;
1110
+ exports.TooManyRequestsException = TooManyRequestsException;
1111
+ exports.ValidationException = ValidationException;
1112
+ exports.ValidationExceptionFieldFilterSensitiveLog = ValidationExceptionFieldFilterSensitiveLog;
1113
+ exports.ValidationExceptionReason = ValidationExceptionReason;
1114
+ exports.paginateListRegions = paginateListRegions;