@aws-sdk/client-s3outposts 3.131.0 → 3.142.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,39 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
7
+
8
+
9
+ ### Features
10
+
11
+ * **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
18
+
19
+
20
+ ### Features
21
+
22
+ * **clients:** update client endpoints as of 2022-08-01 ([aaf49f2](https://github.com/aws/aws-sdk-js-v3/commit/aaf49f21b371412e6ea7e00890b71a7b31991b66))
23
+
24
+
25
+
26
+
27
+
28
+ # [3.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
29
+
30
+
31
+ ### Features
32
+
33
+ * **namespaces:** remove namespaces with only a log filter ([#3823](https://github.com/aws/aws-sdk-js-v3/issues/3823)) ([33e6822](https://github.com/aws/aws-sdk-js-v3/commit/33e68228fb64c53dd8f89e6be76dd5f46edc3cfd))
34
+
35
+
36
+
37
+
38
+
6
39
  # [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
7
40
 
8
41
  **Note:** Version bump only for package @aws-sdk/client-s3outposts
package/README.md CHANGED
@@ -165,7 +165,7 @@ try {
165
165
  const data = await client.send(command);
166
166
  // process data.
167
167
  } catch (error) {
168
- const { requestId, cfId, extendedRequestId } = error.$metadata;
168
+ const { requestId, cfId, extendedRequestId } = error.$$metadata;
169
169
  console.log({ requestId, cfId, extendedRequestId });
170
170
  /**
171
171
  * The keys within exceptions are also parsed.
@@ -20,8 +20,8 @@ class CreateEndpointCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.CreateEndpointRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.CreateEndpointResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.CreateEndpointRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.CreateEndpointResultFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20,7 +20,7 @@ class DeleteEndpointCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.DeleteEndpointRequest.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.DeleteEndpointRequestFilterSensitiveLog,
24
24
  outputFilterSensitiveLog: (output) => output,
25
25
  };
26
26
  const { requestHandler } = configuration;
@@ -20,8 +20,8 @@ class ListEndpointsCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.ListEndpointsRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.ListEndpointsResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.ListEndpointsRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.ListEndpointsResultFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20,8 +20,8 @@ class ListSharedEndpointsCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.ListSharedEndpointsRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.ListSharedEndpointsResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.ListSharedEndpointsRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.ListSharedEndpointsResultFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListSharedEndpointsResult = exports.ListSharedEndpointsRequest = exports.ListEndpointsResult = exports.ListEndpointsRequest = exports.Endpoint = exports.EndpointStatus = exports.NetworkInterface = exports.DeleteEndpointRequest = exports.ValidationException = exports.ResourceNotFoundException = exports.InternalServerException = exports.CreateEndpointResult = exports.CreateEndpointRequest = exports.EndpointAccessType = exports.ConflictException = exports.AccessDeniedException = void 0;
3
+ exports.ListSharedEndpointsResultFilterSensitiveLog = exports.ListSharedEndpointsRequestFilterSensitiveLog = exports.ListEndpointsResultFilterSensitiveLog = exports.ListEndpointsRequestFilterSensitiveLog = exports.EndpointFilterSensitiveLog = exports.NetworkInterfaceFilterSensitiveLog = exports.DeleteEndpointRequestFilterSensitiveLog = exports.CreateEndpointResultFilterSensitiveLog = exports.CreateEndpointRequestFilterSensitiveLog = exports.EndpointStatus = exports.ValidationException = exports.ResourceNotFoundException = exports.InternalServerException = exports.EndpointAccessType = exports.ConflictException = exports.AccessDeniedException = void 0;
4
4
  const S3OutpostsServiceException_1 = require("./S3OutpostsServiceException");
5
5
  class AccessDeniedException extends S3OutpostsServiceException_1.S3OutpostsServiceException {
6
6
  constructor(opts) {
@@ -35,18 +35,6 @@ var EndpointAccessType;
35
35
  EndpointAccessType["CUSTOMER_OWNED_IP"] = "CustomerOwnedIp";
36
36
  EndpointAccessType["PRIVATE"] = "Private";
37
37
  })(EndpointAccessType = exports.EndpointAccessType || (exports.EndpointAccessType = {}));
38
- var CreateEndpointRequest;
39
- (function (CreateEndpointRequest) {
40
- CreateEndpointRequest.filterSensitiveLog = (obj) => ({
41
- ...obj,
42
- });
43
- })(CreateEndpointRequest = exports.CreateEndpointRequest || (exports.CreateEndpointRequest = {}));
44
- var CreateEndpointResult;
45
- (function (CreateEndpointResult) {
46
- CreateEndpointResult.filterSensitiveLog = (obj) => ({
47
- ...obj,
48
- });
49
- })(CreateEndpointResult = exports.CreateEndpointResult || (exports.CreateEndpointResult = {}));
50
38
  class InternalServerException extends S3OutpostsServiceException_1.S3OutpostsServiceException {
51
39
  constructor(opts) {
52
40
  super({
@@ -89,51 +77,45 @@ class ValidationException extends S3OutpostsServiceException_1.S3OutpostsService
89
77
  }
90
78
  }
91
79
  exports.ValidationException = ValidationException;
92
- var DeleteEndpointRequest;
93
- (function (DeleteEndpointRequest) {
94
- DeleteEndpointRequest.filterSensitiveLog = (obj) => ({
95
- ...obj,
96
- });
97
- })(DeleteEndpointRequest = exports.DeleteEndpointRequest || (exports.DeleteEndpointRequest = {}));
98
- var NetworkInterface;
99
- (function (NetworkInterface) {
100
- NetworkInterface.filterSensitiveLog = (obj) => ({
101
- ...obj,
102
- });
103
- })(NetworkInterface = exports.NetworkInterface || (exports.NetworkInterface = {}));
104
80
  var EndpointStatus;
105
81
  (function (EndpointStatus) {
106
82
  EndpointStatus["AVAILABLE"] = "Available";
107
83
  EndpointStatus["DELETING"] = "Deleting";
108
84
  EndpointStatus["PENDING"] = "Pending";
109
85
  })(EndpointStatus = exports.EndpointStatus || (exports.EndpointStatus = {}));
110
- var Endpoint;
111
- (function (Endpoint) {
112
- Endpoint.filterSensitiveLog = (obj) => ({
113
- ...obj,
114
- });
115
- })(Endpoint = exports.Endpoint || (exports.Endpoint = {}));
116
- var ListEndpointsRequest;
117
- (function (ListEndpointsRequest) {
118
- ListEndpointsRequest.filterSensitiveLog = (obj) => ({
119
- ...obj,
120
- });
121
- })(ListEndpointsRequest = exports.ListEndpointsRequest || (exports.ListEndpointsRequest = {}));
122
- var ListEndpointsResult;
123
- (function (ListEndpointsResult) {
124
- ListEndpointsResult.filterSensitiveLog = (obj) => ({
125
- ...obj,
126
- });
127
- })(ListEndpointsResult = exports.ListEndpointsResult || (exports.ListEndpointsResult = {}));
128
- var ListSharedEndpointsRequest;
129
- (function (ListSharedEndpointsRequest) {
130
- ListSharedEndpointsRequest.filterSensitiveLog = (obj) => ({
131
- ...obj,
132
- });
133
- })(ListSharedEndpointsRequest = exports.ListSharedEndpointsRequest || (exports.ListSharedEndpointsRequest = {}));
134
- var ListSharedEndpointsResult;
135
- (function (ListSharedEndpointsResult) {
136
- ListSharedEndpointsResult.filterSensitiveLog = (obj) => ({
137
- ...obj,
138
- });
139
- })(ListSharedEndpointsResult = exports.ListSharedEndpointsResult || (exports.ListSharedEndpointsResult = {}));
86
+ const CreateEndpointRequestFilterSensitiveLog = (obj) => ({
87
+ ...obj,
88
+ });
89
+ exports.CreateEndpointRequestFilterSensitiveLog = CreateEndpointRequestFilterSensitiveLog;
90
+ const CreateEndpointResultFilterSensitiveLog = (obj) => ({
91
+ ...obj,
92
+ });
93
+ exports.CreateEndpointResultFilterSensitiveLog = CreateEndpointResultFilterSensitiveLog;
94
+ const DeleteEndpointRequestFilterSensitiveLog = (obj) => ({
95
+ ...obj,
96
+ });
97
+ exports.DeleteEndpointRequestFilterSensitiveLog = DeleteEndpointRequestFilterSensitiveLog;
98
+ const NetworkInterfaceFilterSensitiveLog = (obj) => ({
99
+ ...obj,
100
+ });
101
+ exports.NetworkInterfaceFilterSensitiveLog = NetworkInterfaceFilterSensitiveLog;
102
+ const EndpointFilterSensitiveLog = (obj) => ({
103
+ ...obj,
104
+ });
105
+ exports.EndpointFilterSensitiveLog = EndpointFilterSensitiveLog;
106
+ const ListEndpointsRequestFilterSensitiveLog = (obj) => ({
107
+ ...obj,
108
+ });
109
+ exports.ListEndpointsRequestFilterSensitiveLog = ListEndpointsRequestFilterSensitiveLog;
110
+ const ListEndpointsResultFilterSensitiveLog = (obj) => ({
111
+ ...obj,
112
+ });
113
+ exports.ListEndpointsResultFilterSensitiveLog = ListEndpointsResultFilterSensitiveLog;
114
+ const ListSharedEndpointsRequestFilterSensitiveLog = (obj) => ({
115
+ ...obj,
116
+ });
117
+ exports.ListSharedEndpointsRequestFilterSensitiveLog = ListSharedEndpointsRequestFilterSensitiveLog;
118
+ const ListSharedEndpointsResultFilterSensitiveLog = (obj) => ({
119
+ ...obj,
120
+ });
121
+ exports.ListSharedEndpointsResultFilterSensitiveLog = ListSharedEndpointsResultFilterSensitiveLog;
@@ -34,10 +34,10 @@ const serializeAws_restJson1DeleteEndpointCommand = async (input, context) => {
34
34
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
35
35
  const headers = {};
36
36
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/S3Outposts/DeleteEndpoint";
37
- const query = {
38
- ...(input.EndpointId !== undefined && { endpointId: input.EndpointId }),
39
- ...(input.OutpostId !== undefined && { outpostId: input.OutpostId }),
40
- };
37
+ const query = map({
38
+ endpointId: [, input.EndpointId],
39
+ outpostId: [, input.OutpostId],
40
+ });
41
41
  let body;
42
42
  return new protocol_http_1.HttpRequest({
43
43
  protocol,
@@ -55,10 +55,10 @@ const serializeAws_restJson1ListEndpointsCommand = async (input, context) => {
55
55
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
56
  const headers = {};
57
57
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/S3Outposts/ListEndpoints";
58
- const query = {
59
- ...(input.NextToken !== undefined && { nextToken: input.NextToken }),
60
- ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
61
- };
58
+ const query = map({
59
+ nextToken: [, input.NextToken],
60
+ maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
61
+ });
62
62
  let body;
63
63
  return new protocol_http_1.HttpRequest({
64
64
  protocol,
@@ -76,11 +76,11 @@ const serializeAws_restJson1ListSharedEndpointsCommand = async (input, context)
76
76
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
77
  const headers = {};
78
78
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/S3Outposts/ListSharedEndpoints";
79
- const query = {
80
- ...(input.NextToken !== undefined && { nextToken: input.NextToken }),
81
- ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
82
- ...(input.OutpostId !== undefined && { outpostId: input.OutpostId }),
83
- };
79
+ const query = map({
80
+ nextToken: [, input.NextToken],
81
+ maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
82
+ outpostId: [, input.OutpostId],
83
+ });
84
84
  let body;
85
85
  return new protocol_http_1.HttpRequest({
86
86
  protocol,
@@ -98,15 +98,14 @@ const deserializeAws_restJson1CreateEndpointCommand = async (output, context) =>
98
98
  if (output.statusCode !== 200 && output.statusCode >= 300) {
99
99
  return deserializeAws_restJson1CreateEndpointCommandError(output, context);
100
100
  }
101
- const contents = {
101
+ const contents = map({
102
102
  $metadata: deserializeMetadata(output),
103
- EndpointArn: undefined,
104
- };
103
+ });
105
104
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
106
- if (data.EndpointArn !== undefined && data.EndpointArn !== null) {
105
+ if (data.EndpointArn != null) {
107
106
  contents.EndpointArn = (0, smithy_client_1.expectString)(data.EndpointArn);
108
107
  }
109
- return Promise.resolve(contents);
108
+ return contents;
110
109
  };
111
110
  exports.deserializeAws_restJson1CreateEndpointCommand = deserializeAws_restJson1CreateEndpointCommand;
112
111
  const deserializeAws_restJson1CreateEndpointCommandError = async (output, context) => {
@@ -114,7 +113,6 @@ const deserializeAws_restJson1CreateEndpointCommandError = async (output, contex
114
113
  ...output,
115
114
  body: await parseBody(output.body, context),
116
115
  };
117
- let response;
118
116
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
119
117
  switch (errorCode) {
120
118
  case "AccessDeniedException":
@@ -134,25 +132,23 @@ const deserializeAws_restJson1CreateEndpointCommandError = async (output, contex
134
132
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
135
133
  default:
136
134
  const parsedBody = parsedOutput.body;
137
- const $metadata = deserializeMetadata(output);
138
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
139
- response = new S3OutpostsServiceException_1.S3OutpostsServiceException({
140
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
141
- $fault: "client",
142
- $metadata,
135
+ (0, smithy_client_1.throwDefaultError)({
136
+ output,
137
+ parsedBody,
138
+ exceptionCtor: S3OutpostsServiceException_1.S3OutpostsServiceException,
139
+ errorCode,
143
140
  });
144
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
145
141
  }
146
142
  };
147
143
  const deserializeAws_restJson1DeleteEndpointCommand = async (output, context) => {
148
144
  if (output.statusCode !== 200 && output.statusCode >= 300) {
149
145
  return deserializeAws_restJson1DeleteEndpointCommandError(output, context);
150
146
  }
151
- const contents = {
147
+ const contents = map({
152
148
  $metadata: deserializeMetadata(output),
153
- };
149
+ });
154
150
  await collectBody(output.body, context);
155
- return Promise.resolve(contents);
151
+ return contents;
156
152
  };
157
153
  exports.deserializeAws_restJson1DeleteEndpointCommand = deserializeAws_restJson1DeleteEndpointCommand;
158
154
  const deserializeAws_restJson1DeleteEndpointCommandError = async (output, context) => {
@@ -160,7 +156,6 @@ const deserializeAws_restJson1DeleteEndpointCommandError = async (output, contex
160
156
  ...output,
161
157
  body: await parseBody(output.body, context),
162
158
  };
163
- let response;
164
159
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
165
160
  switch (errorCode) {
166
161
  case "AccessDeniedException":
@@ -177,33 +172,29 @@ const deserializeAws_restJson1DeleteEndpointCommandError = async (output, contex
177
172
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
178
173
  default:
179
174
  const parsedBody = parsedOutput.body;
180
- const $metadata = deserializeMetadata(output);
181
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
182
- response = new S3OutpostsServiceException_1.S3OutpostsServiceException({
183
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
184
- $fault: "client",
185
- $metadata,
175
+ (0, smithy_client_1.throwDefaultError)({
176
+ output,
177
+ parsedBody,
178
+ exceptionCtor: S3OutpostsServiceException_1.S3OutpostsServiceException,
179
+ errorCode,
186
180
  });
187
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
188
181
  }
189
182
  };
190
183
  const deserializeAws_restJson1ListEndpointsCommand = async (output, context) => {
191
184
  if (output.statusCode !== 200 && output.statusCode >= 300) {
192
185
  return deserializeAws_restJson1ListEndpointsCommandError(output, context);
193
186
  }
194
- const contents = {
187
+ const contents = map({
195
188
  $metadata: deserializeMetadata(output),
196
- Endpoints: undefined,
197
- NextToken: undefined,
198
- };
189
+ });
199
190
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
200
- if (data.Endpoints !== undefined && data.Endpoints !== null) {
191
+ if (data.Endpoints != null) {
201
192
  contents.Endpoints = deserializeAws_restJson1Endpoints(data.Endpoints, context);
202
193
  }
203
- if (data.NextToken !== undefined && data.NextToken !== null) {
194
+ if (data.NextToken != null) {
204
195
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
205
196
  }
206
- return Promise.resolve(contents);
197
+ return contents;
207
198
  };
208
199
  exports.deserializeAws_restJson1ListEndpointsCommand = deserializeAws_restJson1ListEndpointsCommand;
209
200
  const deserializeAws_restJson1ListEndpointsCommandError = async (output, context) => {
@@ -211,7 +202,6 @@ const deserializeAws_restJson1ListEndpointsCommandError = async (output, context
211
202
  ...output,
212
203
  body: await parseBody(output.body, context),
213
204
  };
214
- let response;
215
205
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
216
206
  switch (errorCode) {
217
207
  case "AccessDeniedException":
@@ -228,33 +218,29 @@ const deserializeAws_restJson1ListEndpointsCommandError = async (output, context
228
218
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
229
219
  default:
230
220
  const parsedBody = parsedOutput.body;
231
- const $metadata = deserializeMetadata(output);
232
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
233
- response = new S3OutpostsServiceException_1.S3OutpostsServiceException({
234
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
235
- $fault: "client",
236
- $metadata,
221
+ (0, smithy_client_1.throwDefaultError)({
222
+ output,
223
+ parsedBody,
224
+ exceptionCtor: S3OutpostsServiceException_1.S3OutpostsServiceException,
225
+ errorCode,
237
226
  });
238
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
239
227
  }
240
228
  };
241
229
  const deserializeAws_restJson1ListSharedEndpointsCommand = async (output, context) => {
242
230
  if (output.statusCode !== 200 && output.statusCode >= 300) {
243
231
  return deserializeAws_restJson1ListSharedEndpointsCommandError(output, context);
244
232
  }
245
- const contents = {
233
+ const contents = map({
246
234
  $metadata: deserializeMetadata(output),
247
- Endpoints: undefined,
248
- NextToken: undefined,
249
- };
235
+ });
250
236
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
251
- if (data.Endpoints !== undefined && data.Endpoints !== null) {
237
+ if (data.Endpoints != null) {
252
238
  contents.Endpoints = deserializeAws_restJson1Endpoints(data.Endpoints, context);
253
239
  }
254
- if (data.NextToken !== undefined && data.NextToken !== null) {
240
+ if (data.NextToken != null) {
255
241
  contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
256
242
  }
257
- return Promise.resolve(contents);
243
+ return contents;
258
244
  };
259
245
  exports.deserializeAws_restJson1ListSharedEndpointsCommand = deserializeAws_restJson1ListSharedEndpointsCommand;
260
246
  const deserializeAws_restJson1ListSharedEndpointsCommandError = async (output, context) => {
@@ -262,7 +248,6 @@ const deserializeAws_restJson1ListSharedEndpointsCommandError = async (output, c
262
248
  ...output,
263
249
  body: await parseBody(output.body, context),
264
250
  };
265
- let response;
266
251
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
267
252
  switch (errorCode) {
268
253
  case "AccessDeniedException":
@@ -279,20 +264,19 @@ const deserializeAws_restJson1ListSharedEndpointsCommandError = async (output, c
279
264
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
280
265
  default:
281
266
  const parsedBody = parsedOutput.body;
282
- const $metadata = deserializeMetadata(output);
283
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
284
- response = new S3OutpostsServiceException_1.S3OutpostsServiceException({
285
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
286
- $fault: "client",
287
- $metadata,
267
+ (0, smithy_client_1.throwDefaultError)({
268
+ output,
269
+ parsedBody,
270
+ exceptionCtor: S3OutpostsServiceException_1.S3OutpostsServiceException,
271
+ errorCode,
288
272
  });
289
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
290
273
  }
291
274
  };
275
+ const map = smithy_client_1.map;
292
276
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
293
- const contents = {};
277
+ const contents = map({});
294
278
  const data = parsedOutput.body;
295
- if (data.Message !== undefined && data.Message !== null) {
279
+ if (data.Message != null) {
296
280
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
297
281
  }
298
282
  const exception = new models_0_1.AccessDeniedException({
@@ -302,9 +286,9 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
302
286
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
303
287
  };
304
288
  const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
305
- const contents = {};
289
+ const contents = map({});
306
290
  const data = parsedOutput.body;
307
- if (data.Message !== undefined && data.Message !== null) {
291
+ if (data.Message != null) {
308
292
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
309
293
  }
310
294
  const exception = new models_0_1.ConflictException({
@@ -314,9 +298,9 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
314
298
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
315
299
  };
316
300
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
317
- const contents = {};
301
+ const contents = map({});
318
302
  const data = parsedOutput.body;
319
- if (data.Message !== undefined && data.Message !== null) {
303
+ if (data.Message != null) {
320
304
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
321
305
  }
322
306
  const exception = new models_0_1.InternalServerException({
@@ -326,9 +310,9 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
326
310
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
327
311
  };
328
312
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
329
- const contents = {};
313
+ const contents = map({});
330
314
  const data = parsedOutput.body;
331
- if (data.Message !== undefined && data.Message !== null) {
315
+ if (data.Message != null) {
332
316
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
333
317
  }
334
318
  const exception = new models_0_1.ResourceNotFoundException({
@@ -338,9 +322,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
338
322
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
339
323
  };
340
324
  const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
341
- const contents = {};
325
+ const contents = map({});
342
326
  const data = parsedOutput.body;
343
- if (data.Message !== undefined && data.Message !== null) {
327
+ if (data.Message != null) {
344
328
  contents.Message = (0, smithy_client_1.expectString)(data.Message);
345
329
  }
346
330
  const exception = new models_0_1.ValidationException({
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { CreateEndpointRequest, CreateEndpointResult } from "../models/models_0";
4
+ import { CreateEndpointRequestFilterSensitiveLog, CreateEndpointResultFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1CreateEndpointCommand, serializeAws_restJson1CreateEndpointCommand, } from "../protocols/Aws_restJson1";
6
6
  var CreateEndpointCommand = (function (_super) {
7
7
  __extends(CreateEndpointCommand, _super);
@@ -20,8 +20,8 @@ var CreateEndpointCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: CreateEndpointRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: CreateEndpointResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: CreateEndpointRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: CreateEndpointResultFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { DeleteEndpointRequest } from "../models/models_0";
4
+ import { DeleteEndpointRequestFilterSensitiveLog } from "../models/models_0";
5
5
  import { deserializeAws_restJson1DeleteEndpointCommand, serializeAws_restJson1DeleteEndpointCommand, } from "../protocols/Aws_restJson1";
6
6
  var DeleteEndpointCommand = (function (_super) {
7
7
  __extends(DeleteEndpointCommand, _super);
@@ -20,7 +20,7 @@ var DeleteEndpointCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: DeleteEndpointRequest.filterSensitiveLog,
23
+ inputFilterSensitiveLog: DeleteEndpointRequestFilterSensitiveLog,
24
24
  outputFilterSensitiveLog: function (output) { return output; },
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { ListEndpointsRequest, ListEndpointsResult } from "../models/models_0";
4
+ import { ListEndpointsRequestFilterSensitiveLog, ListEndpointsResultFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1ListEndpointsCommand, serializeAws_restJson1ListEndpointsCommand, } from "../protocols/Aws_restJson1";
6
6
  var ListEndpointsCommand = (function (_super) {
7
7
  __extends(ListEndpointsCommand, _super);
@@ -20,8 +20,8 @@ var ListEndpointsCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: ListEndpointsRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: ListEndpointsResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: ListEndpointsRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: ListEndpointsResultFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { ListSharedEndpointsRequest, ListSharedEndpointsResult } from "../models/models_0";
4
+ import { ListSharedEndpointsRequestFilterSensitiveLog, ListSharedEndpointsResultFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1ListSharedEndpointsCommand, serializeAws_restJson1ListSharedEndpointsCommand, } from "../protocols/Aws_restJson1";
6
6
  var ListSharedEndpointsCommand = (function (_super) {
7
7
  __extends(ListSharedEndpointsCommand, _super);
@@ -20,8 +20,8 @@ var ListSharedEndpointsCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: ListSharedEndpointsRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: ListSharedEndpointsResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: ListSharedEndpointsRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: ListSharedEndpointsResultFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {
@@ -31,14 +31,6 @@ export var EndpointAccessType;
31
31
  EndpointAccessType["CUSTOMER_OWNED_IP"] = "CustomerOwnedIp";
32
32
  EndpointAccessType["PRIVATE"] = "Private";
33
33
  })(EndpointAccessType || (EndpointAccessType = {}));
34
- export var CreateEndpointRequest;
35
- (function (CreateEndpointRequest) {
36
- CreateEndpointRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
37
- })(CreateEndpointRequest || (CreateEndpointRequest = {}));
38
- export var CreateEndpointResult;
39
- (function (CreateEndpointResult) {
40
- CreateEndpointResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
41
- })(CreateEndpointResult || (CreateEndpointResult = {}));
42
34
  var InternalServerException = (function (_super) {
43
35
  __extends(InternalServerException, _super);
44
36
  function InternalServerException(opts) {
@@ -78,37 +70,18 @@ var ValidationException = (function (_super) {
78
70
  return ValidationException;
79
71
  }(__BaseException));
80
72
  export { ValidationException };
81
- export var DeleteEndpointRequest;
82
- (function (DeleteEndpointRequest) {
83
- DeleteEndpointRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
84
- })(DeleteEndpointRequest || (DeleteEndpointRequest = {}));
85
- export var NetworkInterface;
86
- (function (NetworkInterface) {
87
- NetworkInterface.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
88
- })(NetworkInterface || (NetworkInterface = {}));
89
73
  export var EndpointStatus;
90
74
  (function (EndpointStatus) {
91
75
  EndpointStatus["AVAILABLE"] = "Available";
92
76
  EndpointStatus["DELETING"] = "Deleting";
93
77
  EndpointStatus["PENDING"] = "Pending";
94
78
  })(EndpointStatus || (EndpointStatus = {}));
95
- export var Endpoint;
96
- (function (Endpoint) {
97
- Endpoint.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
98
- })(Endpoint || (Endpoint = {}));
99
- export var ListEndpointsRequest;
100
- (function (ListEndpointsRequest) {
101
- ListEndpointsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
102
- })(ListEndpointsRequest || (ListEndpointsRequest = {}));
103
- export var ListEndpointsResult;
104
- (function (ListEndpointsResult) {
105
- ListEndpointsResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
106
- })(ListEndpointsResult || (ListEndpointsResult = {}));
107
- export var ListSharedEndpointsRequest;
108
- (function (ListSharedEndpointsRequest) {
109
- ListSharedEndpointsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
110
- })(ListSharedEndpointsRequest || (ListSharedEndpointsRequest = {}));
111
- export var ListSharedEndpointsResult;
112
- (function (ListSharedEndpointsResult) {
113
- ListSharedEndpointsResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
114
- })(ListSharedEndpointsResult || (ListSharedEndpointsResult = {}));
79
+ export var CreateEndpointRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
80
+ export var CreateEndpointResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
81
+ export var DeleteEndpointRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
82
+ export var NetworkInterfaceFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
83
+ export var EndpointFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
84
+ export var ListEndpointsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
85
+ export var ListEndpointsResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
86
+ export var ListSharedEndpointsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
87
+ export var ListSharedEndpointsResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
5
5
  import { S3OutpostsServiceException as __BaseException } from "../models/S3OutpostsServiceException";
6
6
  export var serializeAws_restJson1CreateEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -36,7 +36,10 @@ export var serializeAws_restJson1DeleteEndpointCommand = function (input, contex
36
36
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
37
37
  headers = {};
38
38
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/S3Outposts/DeleteEndpoint";
39
- query = __assign(__assign({}, (input.EndpointId !== undefined && { endpointId: input.EndpointId })), (input.OutpostId !== undefined && { outpostId: input.OutpostId }));
39
+ query = map({
40
+ endpointId: [, input.EndpointId],
41
+ outpostId: [, input.OutpostId],
42
+ });
40
43
  return [2, new __HttpRequest({
41
44
  protocol: protocol,
42
45
  hostname: hostname,
@@ -59,7 +62,10 @@ export var serializeAws_restJson1ListEndpointsCommand = function (input, context
59
62
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
60
63
  headers = {};
61
64
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/S3Outposts/ListEndpoints";
62
- query = __assign(__assign({}, (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }));
65
+ query = map({
66
+ nextToken: [, input.NextToken],
67
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
68
+ });
63
69
  return [2, new __HttpRequest({
64
70
  protocol: protocol,
65
71
  hostname: hostname,
@@ -82,7 +88,11 @@ export var serializeAws_restJson1ListSharedEndpointsCommand = function (input, c
82
88
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
83
89
  headers = {};
84
90
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/S3Outposts/ListSharedEndpoints";
85
- query = __assign(__assign(__assign({}, (input.NextToken !== undefined && { nextToken: input.NextToken })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.OutpostId !== undefined && { outpostId: input.OutpostId }));
91
+ query = map({
92
+ nextToken: [, input.NextToken],
93
+ maxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
94
+ outpostId: [, input.OutpostId],
95
+ });
86
96
  return [2, new __HttpRequest({
87
97
  protocol: protocol,
88
98
  hostname: hostname,
@@ -104,24 +114,23 @@ export var deserializeAws_restJson1CreateEndpointCommand = function (output, con
104
114
  if (output.statusCode !== 200 && output.statusCode >= 300) {
105
115
  return [2, deserializeAws_restJson1CreateEndpointCommandError(output, context)];
106
116
  }
107
- contents = {
117
+ contents = map({
108
118
  $metadata: deserializeMetadata(output),
109
- EndpointArn: undefined,
110
- };
119
+ });
111
120
  _a = __expectNonNull;
112
121
  _b = __expectObject;
113
122
  return [4, parseBody(output.body, context)];
114
123
  case 1:
115
124
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
116
- if (data.EndpointArn !== undefined && data.EndpointArn !== null) {
125
+ if (data.EndpointArn != null) {
117
126
  contents.EndpointArn = __expectString(data.EndpointArn);
118
127
  }
119
- return [2, Promise.resolve(contents)];
128
+ return [2, contents];
120
129
  }
121
130
  });
122
131
  }); };
123
132
  var deserializeAws_restJson1CreateEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
124
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
133
+ var parsedOutput, _a, errorCode, _b, parsedBody;
125
134
  var _c;
126
135
  return __generator(this, function (_d) {
127
136
  switch (_d.label) {
@@ -158,14 +167,14 @@ var deserializeAws_restJson1CreateEndpointCommandError = function (output, conte
158
167
  case 11: throw _d.sent();
159
168
  case 12:
160
169
  parsedBody = parsedOutput.body;
161
- $metadata = deserializeMetadata(output);
162
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
163
- response = new __BaseException({
164
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
165
- $fault: "client",
166
- $metadata: $metadata,
170
+ throwDefaultError({
171
+ output: output,
172
+ parsedBody: parsedBody,
173
+ exceptionCtor: __BaseException,
174
+ errorCode: errorCode,
167
175
  });
168
- throw __decorateServiceException(response, parsedBody);
176
+ _d.label = 13;
177
+ case 13: return [2];
169
178
  }
170
179
  });
171
180
  }); };
@@ -177,18 +186,18 @@ export var deserializeAws_restJson1DeleteEndpointCommand = function (output, con
177
186
  if (output.statusCode !== 200 && output.statusCode >= 300) {
178
187
  return [2, deserializeAws_restJson1DeleteEndpointCommandError(output, context)];
179
188
  }
180
- contents = {
189
+ contents = map({
181
190
  $metadata: deserializeMetadata(output),
182
- };
191
+ });
183
192
  return [4, collectBody(output.body, context)];
184
193
  case 1:
185
194
  _a.sent();
186
- return [2, Promise.resolve(contents)];
195
+ return [2, contents];
187
196
  }
188
197
  });
189
198
  }); };
190
199
  var deserializeAws_restJson1DeleteEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
191
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
200
+ var parsedOutput, _a, errorCode, _b, parsedBody;
192
201
  var _c;
193
202
  return __generator(this, function (_d) {
194
203
  switch (_d.label) {
@@ -221,14 +230,14 @@ var deserializeAws_restJson1DeleteEndpointCommandError = function (output, conte
221
230
  case 9: throw _d.sent();
222
231
  case 10:
223
232
  parsedBody = parsedOutput.body;
224
- $metadata = deserializeMetadata(output);
225
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
226
- response = new __BaseException({
227
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
228
- $fault: "client",
229
- $metadata: $metadata,
233
+ throwDefaultError({
234
+ output: output,
235
+ parsedBody: parsedBody,
236
+ exceptionCtor: __BaseException,
237
+ errorCode: errorCode,
230
238
  });
231
- throw __decorateServiceException(response, parsedBody);
239
+ _d.label = 11;
240
+ case 11: return [2];
232
241
  }
233
242
  });
234
243
  }); };
@@ -240,28 +249,26 @@ export var deserializeAws_restJson1ListEndpointsCommand = function (output, cont
240
249
  if (output.statusCode !== 200 && output.statusCode >= 300) {
241
250
  return [2, deserializeAws_restJson1ListEndpointsCommandError(output, context)];
242
251
  }
243
- contents = {
252
+ contents = map({
244
253
  $metadata: deserializeMetadata(output),
245
- Endpoints: undefined,
246
- NextToken: undefined,
247
- };
254
+ });
248
255
  _a = __expectNonNull;
249
256
  _b = __expectObject;
250
257
  return [4, parseBody(output.body, context)];
251
258
  case 1:
252
259
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
253
- if (data.Endpoints !== undefined && data.Endpoints !== null) {
260
+ if (data.Endpoints != null) {
254
261
  contents.Endpoints = deserializeAws_restJson1Endpoints(data.Endpoints, context);
255
262
  }
256
- if (data.NextToken !== undefined && data.NextToken !== null) {
263
+ if (data.NextToken != null) {
257
264
  contents.NextToken = __expectString(data.NextToken);
258
265
  }
259
- return [2, Promise.resolve(contents)];
266
+ return [2, contents];
260
267
  }
261
268
  });
262
269
  }); };
263
270
  var deserializeAws_restJson1ListEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
264
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
271
+ var parsedOutput, _a, errorCode, _b, parsedBody;
265
272
  var _c;
266
273
  return __generator(this, function (_d) {
267
274
  switch (_d.label) {
@@ -294,14 +301,14 @@ var deserializeAws_restJson1ListEndpointsCommandError = function (output, contex
294
301
  case 9: throw _d.sent();
295
302
  case 10:
296
303
  parsedBody = parsedOutput.body;
297
- $metadata = deserializeMetadata(output);
298
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
299
- response = new __BaseException({
300
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
301
- $fault: "client",
302
- $metadata: $metadata,
304
+ throwDefaultError({
305
+ output: output,
306
+ parsedBody: parsedBody,
307
+ exceptionCtor: __BaseException,
308
+ errorCode: errorCode,
303
309
  });
304
- throw __decorateServiceException(response, parsedBody);
310
+ _d.label = 11;
311
+ case 11: return [2];
305
312
  }
306
313
  });
307
314
  }); };
@@ -313,28 +320,26 @@ export var deserializeAws_restJson1ListSharedEndpointsCommand = function (output
313
320
  if (output.statusCode !== 200 && output.statusCode >= 300) {
314
321
  return [2, deserializeAws_restJson1ListSharedEndpointsCommandError(output, context)];
315
322
  }
316
- contents = {
323
+ contents = map({
317
324
  $metadata: deserializeMetadata(output),
318
- Endpoints: undefined,
319
- NextToken: undefined,
320
- };
325
+ });
321
326
  _a = __expectNonNull;
322
327
  _b = __expectObject;
323
328
  return [4, parseBody(output.body, context)];
324
329
  case 1:
325
330
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
326
- if (data.Endpoints !== undefined && data.Endpoints !== null) {
331
+ if (data.Endpoints != null) {
327
332
  contents.Endpoints = deserializeAws_restJson1Endpoints(data.Endpoints, context);
328
333
  }
329
- if (data.NextToken !== undefined && data.NextToken !== null) {
334
+ if (data.NextToken != null) {
330
335
  contents.NextToken = __expectString(data.NextToken);
331
336
  }
332
- return [2, Promise.resolve(contents)];
337
+ return [2, contents];
333
338
  }
334
339
  });
335
340
  }); };
336
341
  var deserializeAws_restJson1ListSharedEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
337
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
342
+ var parsedOutput, _a, errorCode, _b, parsedBody;
338
343
  var _c;
339
344
  return __generator(this, function (_d) {
340
345
  switch (_d.label) {
@@ -367,23 +372,24 @@ var deserializeAws_restJson1ListSharedEndpointsCommandError = function (output,
367
372
  case 9: throw _d.sent();
368
373
  case 10:
369
374
  parsedBody = parsedOutput.body;
370
- $metadata = deserializeMetadata(output);
371
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
372
- response = new __BaseException({
373
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
374
- $fault: "client",
375
- $metadata: $metadata,
375
+ throwDefaultError({
376
+ output: output,
377
+ parsedBody: parsedBody,
378
+ exceptionCtor: __BaseException,
379
+ errorCode: errorCode,
376
380
  });
377
- throw __decorateServiceException(response, parsedBody);
381
+ _d.label = 11;
382
+ case 11: return [2];
378
383
  }
379
384
  });
380
385
  }); };
386
+ var map = __map;
381
387
  var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
382
388
  var contents, data, exception;
383
389
  return __generator(this, function (_a) {
384
- contents = {};
390
+ contents = map({});
385
391
  data = parsedOutput.body;
386
- if (data.Message !== undefined && data.Message !== null) {
392
+ if (data.Message != null) {
387
393
  contents.Message = __expectString(data.Message);
388
394
  }
389
395
  exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -393,9 +399,9 @@ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutp
393
399
  var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
394
400
  var contents, data, exception;
395
401
  return __generator(this, function (_a) {
396
- contents = {};
402
+ contents = map({});
397
403
  data = parsedOutput.body;
398
- if (data.Message !== undefined && data.Message !== null) {
404
+ if (data.Message != null) {
399
405
  contents.Message = __expectString(data.Message);
400
406
  }
401
407
  exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -405,9 +411,9 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
405
411
  var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
406
412
  var contents, data, exception;
407
413
  return __generator(this, function (_a) {
408
- contents = {};
414
+ contents = map({});
409
415
  data = parsedOutput.body;
410
- if (data.Message !== undefined && data.Message !== null) {
416
+ if (data.Message != null) {
411
417
  contents.Message = __expectString(data.Message);
412
418
  }
413
419
  exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -417,9 +423,9 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
417
423
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
418
424
  var contents, data, exception;
419
425
  return __generator(this, function (_a) {
420
- contents = {};
426
+ contents = map({});
421
427
  data = parsedOutput.body;
422
- if (data.Message !== undefined && data.Message !== null) {
428
+ if (data.Message != null) {
423
429
  contents.Message = __expectString(data.Message);
424
430
  }
425
431
  exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -429,9 +435,9 @@ var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsed
429
435
  var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
430
436
  var contents, data, exception;
431
437
  return __generator(this, function (_a) {
432
- contents = {};
438
+ contents = map({});
433
439
  data = parsedOutput.body;
434
- if (data.Message !== undefined && data.Message !== null) {
440
+ if (data.Message != null) {
435
441
  contents.Message = __expectString(data.Message);
436
442
  }
437
443
  exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -60,24 +60,12 @@ export interface CreateEndpointRequest {
60
60
  */
61
61
  CustomerOwnedIpv4Pool?: string;
62
62
  }
63
- export declare namespace CreateEndpointRequest {
64
- /**
65
- * @internal
66
- */
67
- const filterSensitiveLog: (obj: CreateEndpointRequest) => any;
68
- }
69
63
  export interface CreateEndpointResult {
70
64
  /**
71
65
  * <p>The Amazon Resource Name (ARN) of the endpoint.</p>
72
66
  */
73
67
  EndpointArn?: string;
74
68
  }
75
- export declare namespace CreateEndpointResult {
76
- /**
77
- * @internal
78
- */
79
- const filterSensitiveLog: (obj: CreateEndpointResult) => any;
80
- }
81
69
  /**
82
70
  * <p>There was an exception with the internal server.</p>
83
71
  */
@@ -124,12 +112,6 @@ export interface DeleteEndpointRequest {
124
112
  */
125
113
  OutpostId: string | undefined;
126
114
  }
127
- export declare namespace DeleteEndpointRequest {
128
- /**
129
- * @internal
130
- */
131
- const filterSensitiveLog: (obj: DeleteEndpointRequest) => any;
132
- }
133
115
  /**
134
116
  * <p>The container for the network interface.</p>
135
117
  */
@@ -139,12 +121,6 @@ export interface NetworkInterface {
139
121
  */
140
122
  NetworkInterfaceId?: string;
141
123
  }
142
- export declare namespace NetworkInterface {
143
- /**
144
- * @internal
145
- */
146
- const filterSensitiveLog: (obj: NetworkInterface) => any;
147
- }
148
124
  export declare enum EndpointStatus {
149
125
  AVAILABLE = "Available",
150
126
  DELETING = "Deleting",
@@ -202,12 +178,6 @@ export interface Endpoint {
202
178
  */
203
179
  CustomerOwnedIpv4Pool?: string;
204
180
  }
205
- export declare namespace Endpoint {
206
- /**
207
- * @internal
208
- */
209
- const filterSensitiveLog: (obj: Endpoint) => any;
210
- }
211
181
  export interface ListEndpointsRequest {
212
182
  /**
213
183
  * <p>If a previous response from this operation included a <code>NextToken</code> value,
@@ -219,12 +189,6 @@ export interface ListEndpointsRequest {
219
189
  */
220
190
  MaxResults?: number;
221
191
  }
222
- export declare namespace ListEndpointsRequest {
223
- /**
224
- * @internal
225
- */
226
- const filterSensitiveLog: (obj: ListEndpointsRequest) => any;
227
- }
228
192
  export interface ListEndpointsResult {
229
193
  /**
230
194
  * <p>The list of endpoints associated with the specified Outpost.</p>
@@ -236,12 +200,6 @@ export interface ListEndpointsResult {
236
200
  */
237
201
  NextToken?: string;
238
202
  }
239
- export declare namespace ListEndpointsResult {
240
- /**
241
- * @internal
242
- */
243
- const filterSensitiveLog: (obj: ListEndpointsResult) => any;
244
- }
245
203
  export interface ListSharedEndpointsRequest {
246
204
  /**
247
205
  * <p>If a previous response from this operation included a <code>NextToken</code> value, you
@@ -257,12 +215,6 @@ export interface ListSharedEndpointsRequest {
257
215
  */
258
216
  OutpostId: string | undefined;
259
217
  }
260
- export declare namespace ListSharedEndpointsRequest {
261
- /**
262
- * @internal
263
- */
264
- const filterSensitiveLog: (obj: ListSharedEndpointsRequest) => any;
265
- }
266
218
  export interface ListSharedEndpointsResult {
267
219
  /**
268
220
  * <p>The list of endpoints associated with the specified Outpost that have been shared by Amazon Web Services Resource Access Manager (RAM).</p>
@@ -274,9 +226,39 @@ export interface ListSharedEndpointsResult {
274
226
  */
275
227
  NextToken?: string;
276
228
  }
277
- export declare namespace ListSharedEndpointsResult {
278
- /**
279
- * @internal
280
- */
281
- const filterSensitiveLog: (obj: ListSharedEndpointsResult) => any;
282
- }
229
+ /**
230
+ * @internal
231
+ */
232
+ export declare const CreateEndpointRequestFilterSensitiveLog: (obj: CreateEndpointRequest) => any;
233
+ /**
234
+ * @internal
235
+ */
236
+ export declare const CreateEndpointResultFilterSensitiveLog: (obj: CreateEndpointResult) => any;
237
+ /**
238
+ * @internal
239
+ */
240
+ export declare const DeleteEndpointRequestFilterSensitiveLog: (obj: DeleteEndpointRequest) => any;
241
+ /**
242
+ * @internal
243
+ */
244
+ export declare const NetworkInterfaceFilterSensitiveLog: (obj: NetworkInterface) => any;
245
+ /**
246
+ * @internal
247
+ */
248
+ export declare const EndpointFilterSensitiveLog: (obj: Endpoint) => any;
249
+ /**
250
+ * @internal
251
+ */
252
+ export declare const ListEndpointsRequestFilterSensitiveLog: (obj: ListEndpointsRequest) => any;
253
+ /**
254
+ * @internal
255
+ */
256
+ export declare const ListEndpointsResultFilterSensitiveLog: (obj: ListEndpointsResult) => any;
257
+ /**
258
+ * @internal
259
+ */
260
+ export declare const ListSharedEndpointsRequestFilterSensitiveLog: (obj: ListSharedEndpointsRequest) => any;
261
+ /**
262
+ * @internal
263
+ */
264
+ export declare const ListSharedEndpointsResultFilterSensitiveLog: (obj: ListSharedEndpointsResult) => any;
@@ -32,18 +32,10 @@ export interface CreateEndpointRequest {
32
32
 
33
33
  CustomerOwnedIpv4Pool?: string;
34
34
  }
35
- export declare namespace CreateEndpointRequest {
36
-
37
- const filterSensitiveLog: (obj: CreateEndpointRequest) => any;
38
- }
39
35
  export interface CreateEndpointResult {
40
36
 
41
37
  EndpointArn?: string;
42
38
  }
43
- export declare namespace CreateEndpointResult {
44
-
45
- const filterSensitiveLog: (obj: CreateEndpointResult) => any;
46
- }
47
39
 
48
40
  export declare class InternalServerException extends __BaseException {
49
41
  readonly name: "InternalServerException";
@@ -74,19 +66,11 @@ export interface DeleteEndpointRequest {
74
66
 
75
67
  OutpostId: string | undefined;
76
68
  }
77
- export declare namespace DeleteEndpointRequest {
78
-
79
- const filterSensitiveLog: (obj: DeleteEndpointRequest) => any;
80
- }
81
69
 
82
70
  export interface NetworkInterface {
83
71
 
84
72
  NetworkInterfaceId?: string;
85
73
  }
86
- export declare namespace NetworkInterface {
87
-
88
- const filterSensitiveLog: (obj: NetworkInterface) => any;
89
- }
90
74
  export declare enum EndpointStatus {
91
75
  AVAILABLE = "Available",
92
76
  DELETING = "Deleting",
@@ -117,30 +101,18 @@ export interface Endpoint {
117
101
 
118
102
  CustomerOwnedIpv4Pool?: string;
119
103
  }
120
- export declare namespace Endpoint {
121
-
122
- const filterSensitiveLog: (obj: Endpoint) => any;
123
- }
124
104
  export interface ListEndpointsRequest {
125
105
 
126
106
  NextToken?: string;
127
107
 
128
108
  MaxResults?: number;
129
109
  }
130
- export declare namespace ListEndpointsRequest {
131
-
132
- const filterSensitiveLog: (obj: ListEndpointsRequest) => any;
133
- }
134
110
  export interface ListEndpointsResult {
135
111
 
136
112
  Endpoints?: Endpoint[];
137
113
 
138
114
  NextToken?: string;
139
115
  }
140
- export declare namespace ListEndpointsResult {
141
-
142
- const filterSensitiveLog: (obj: ListEndpointsResult) => any;
143
- }
144
116
  export interface ListSharedEndpointsRequest {
145
117
 
146
118
  NextToken?: string;
@@ -149,17 +121,27 @@ export interface ListSharedEndpointsRequest {
149
121
 
150
122
  OutpostId: string | undefined;
151
123
  }
152
- export declare namespace ListSharedEndpointsRequest {
153
-
154
- const filterSensitiveLog: (obj: ListSharedEndpointsRequest) => any;
155
- }
156
124
  export interface ListSharedEndpointsResult {
157
125
 
158
126
  Endpoints?: Endpoint[];
159
127
 
160
128
  NextToken?: string;
161
129
  }
162
- export declare namespace ListSharedEndpointsResult {
163
-
164
- const filterSensitiveLog: (obj: ListSharedEndpointsResult) => any;
165
- }
130
+
131
+ export declare const CreateEndpointRequestFilterSensitiveLog: (obj: CreateEndpointRequest) => any;
132
+
133
+ export declare const CreateEndpointResultFilterSensitiveLog: (obj: CreateEndpointResult) => any;
134
+
135
+ export declare const DeleteEndpointRequestFilterSensitiveLog: (obj: DeleteEndpointRequest) => any;
136
+
137
+ export declare const NetworkInterfaceFilterSensitiveLog: (obj: NetworkInterface) => any;
138
+
139
+ export declare const EndpointFilterSensitiveLog: (obj: Endpoint) => any;
140
+
141
+ export declare const ListEndpointsRequestFilterSensitiveLog: (obj: ListEndpointsRequest) => any;
142
+
143
+ export declare const ListEndpointsResultFilterSensitiveLog: (obj: ListEndpointsResult) => any;
144
+
145
+ export declare const ListSharedEndpointsRequestFilterSensitiveLog: (obj: ListSharedEndpointsRequest) => any;
146
+
147
+ export declare const ListSharedEndpointsResultFilterSensitiveLog: (obj: ListSharedEndpointsResult) => any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-s3outposts",
3
3
  "description": "AWS SDK for JavaScript S3outposts Client for Node.js, Browser and React Native",
4
- "version": "3.131.0",
4
+ "version": "3.142.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -18,9 +18,9 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.131.0",
21
+ "@aws-sdk/client-sts": "3.142.0",
22
22
  "@aws-sdk/config-resolver": "3.130.0",
23
- "@aws-sdk/credential-provider-node": "3.131.0",
23
+ "@aws-sdk/credential-provider-node": "3.142.0",
24
24
  "@aws-sdk/fetch-http-handler": "3.131.0",
25
25
  "@aws-sdk/hash-node": "3.127.0",
26
26
  "@aws-sdk/invalid-dependency": "3.127.0",
@@ -36,15 +36,15 @@
36
36
  "@aws-sdk/node-config-provider": "3.127.0",
37
37
  "@aws-sdk/node-http-handler": "3.127.0",
38
38
  "@aws-sdk/protocol-http": "3.127.0",
39
- "@aws-sdk/smithy-client": "3.127.0",
39
+ "@aws-sdk/smithy-client": "3.142.0",
40
40
  "@aws-sdk/types": "3.127.0",
41
41
  "@aws-sdk/url-parser": "3.127.0",
42
42
  "@aws-sdk/util-base64-browser": "3.109.0",
43
43
  "@aws-sdk/util-base64-node": "3.55.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.55.0",
45
45
  "@aws-sdk/util-body-length-node": "3.55.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.127.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.130.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.142.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.142.0",
48
48
  "@aws-sdk/util-user-agent-browser": "3.127.0",
49
49
  "@aws-sdk/util-user-agent-node": "3.127.0",
50
50
  "@aws-sdk/util-utf8-browser": "3.109.0",