@aws-sdk/client-sagemaker-a2i-runtime 3.899.0 → 3.906.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist-cjs/index.js +584 -710
  2. package/package.json +37 -37
package/dist-cjs/index.js CHANGED
@@ -1,745 +1,619 @@
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: "sagemaker",
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
- ConflictException: () => ConflictException,
25
- ContentClassifier: () => ContentClassifier,
26
- DeleteHumanLoopCommand: () => DeleteHumanLoopCommand,
27
- DescribeHumanLoopCommand: () => DescribeHumanLoopCommand,
28
- HumanLoopStatus: () => HumanLoopStatus,
29
- InternalServerException: () => InternalServerException,
30
- ListHumanLoopsCommand: () => ListHumanLoopsCommand,
31
- ResourceNotFoundException: () => ResourceNotFoundException,
32
- SageMakerA2IRuntime: () => SageMakerA2IRuntime,
33
- SageMakerA2IRuntimeClient: () => SageMakerA2IRuntimeClient,
34
- SageMakerA2IRuntimeServiceException: () => SageMakerA2IRuntimeServiceException,
35
- ServiceQuotaExceededException: () => ServiceQuotaExceededException,
36
- SortOrder: () => SortOrder,
37
- StartHumanLoopCommand: () => StartHumanLoopCommand,
38
- StopHumanLoopCommand: () => StopHumanLoopCommand,
39
- ThrottlingException: () => ThrottlingException,
40
- ValidationException: () => ValidationException,
41
- __Client: () => import_smithy_client.Client,
42
- paginateListHumanLoops: () => paginateListHumanLoops
43
- });
44
- module.exports = __toCommonJS(index_exports);
45
-
46
- // src/SageMakerA2IRuntimeClient.ts
47
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
48
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
49
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
50
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
51
- var import_config_resolver = require("@smithy/config-resolver");
52
- var import_core = require("@smithy/core");
53
- var import_middleware_content_length = require("@smithy/middleware-content-length");
54
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
55
- var import_middleware_retry = require("@smithy/middleware-retry");
56
-
57
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
58
33
 
59
- // src/endpoint/EndpointParameters.ts
60
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
61
- return Object.assign(options, {
62
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
63
- useFipsEndpoint: options.useFipsEndpoint ?? false,
64
- defaultSigningName: "sagemaker"
65
- });
66
- }, "resolveClientEndpointParameters");
67
- var commonParams = {
68
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
69
- Endpoint: { type: "builtInParams", name: "endpoint" },
70
- Region: { type: "builtInParams", name: "region" },
71
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
34
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
37
+ let _credentials = runtimeConfig.credentials;
38
+ return {
39
+ setHttpAuthScheme(httpAuthScheme) {
40
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
41
+ if (index === -1) {
42
+ _httpAuthSchemes.push(httpAuthScheme);
43
+ }
44
+ else {
45
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
46
+ }
47
+ },
48
+ httpAuthSchemes() {
49
+ return _httpAuthSchemes;
50
+ },
51
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
52
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
53
+ },
54
+ httpAuthSchemeProvider() {
55
+ return _httpAuthSchemeProvider;
56
+ },
57
+ setCredentials(credentials) {
58
+ _credentials = credentials;
59
+ },
60
+ credentials() {
61
+ return _credentials;
62
+ },
63
+ };
64
+ };
65
+ const resolveHttpAuthRuntimeConfig = (config) => {
66
+ return {
67
+ httpAuthSchemes: config.httpAuthSchemes(),
68
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
69
+ credentials: config.credentials(),
70
+ };
72
71
  };
73
72
 
74
- // src/SageMakerA2IRuntimeClient.ts
75
- var import_runtimeConfig = require("././runtimeConfig");
76
-
77
- // src/runtimeExtensions.ts
78
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
79
- var import_protocol_http = require("@smithy/protocol-http");
80
- var import_smithy_client = require("@smithy/smithy-client");
73
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
74
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
75
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
76
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
77
+ };
81
78
 
82
- // src/auth/httpAuthExtensionConfiguration.ts
83
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
84
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
85
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
86
- let _credentials = runtimeConfig.credentials;
87
- return {
88
- setHttpAuthScheme(httpAuthScheme) {
89
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
90
- if (index === -1) {
91
- _httpAuthSchemes.push(httpAuthScheme);
92
- } else {
93
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
94
- }
95
- },
96
- httpAuthSchemes() {
97
- return _httpAuthSchemes;
98
- },
99
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
100
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
101
- },
102
- httpAuthSchemeProvider() {
103
- return _httpAuthSchemeProvider;
104
- },
105
- setCredentials(credentials) {
106
- _credentials = credentials;
107
- },
108
- credentials() {
109
- return _credentials;
79
+ class SageMakerA2IRuntimeClient 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.defaultSageMakerA2IRuntimeHttpAuthSchemeParametersProvider,
102
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
103
+ "aws.auth#sigv4": config.credentials,
104
+ }),
105
+ }));
106
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
110
107
  }
111
- };
112
- }, "getHttpAuthExtensionConfiguration");
113
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
114
- return {
115
- httpAuthSchemes: config.httpAuthSchemes(),
116
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
117
- credentials: config.credentials()
118
- };
119
- }, "resolveHttpAuthRuntimeConfig");
120
-
121
- // src/runtimeExtensions.ts
122
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
123
- const extensionConfiguration = Object.assign(
124
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
125
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
126
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
127
- getHttpAuthExtensionConfiguration(runtimeConfig)
128
- );
129
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
130
- return Object.assign(
131
- runtimeConfig,
132
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
133
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
134
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
135
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
136
- );
137
- }, "resolveRuntimeExtensions");
108
+ destroy() {
109
+ super.destroy();
110
+ }
111
+ }
138
112
 
139
- // src/SageMakerA2IRuntimeClient.ts
140
- var SageMakerA2IRuntimeClient = class extends import_smithy_client.Client {
141
- static {
142
- __name(this, "SageMakerA2IRuntimeClient");
143
- }
144
- /**
145
- * The resolved configuration of SageMakerA2IRuntimeClient class. This is resolved and normalized from the {@link SageMakerA2IRuntimeClientConfig | constructor configuration interface}.
146
- */
147
- config;
148
- constructor(...[configuration]) {
149
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
150
- super(_config_0);
151
- this.initConfig = _config_0;
152
- const _config_1 = resolveClientEndpointParameters(_config_0);
153
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
154
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
155
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
156
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
157
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
158
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
159
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
160
- this.config = _config_8;
161
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
162
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
163
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
164
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
165
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
166
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
167
- this.middlewareStack.use(
168
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
169
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSageMakerA2IRuntimeHttpAuthSchemeParametersProvider,
170
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
171
- "aws.auth#sigv4": config.credentials
172
- }), "identityProviderConfigProvider")
173
- })
174
- );
175
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
176
- }
177
- /**
178
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
179
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
180
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
181
- */
182
- destroy() {
183
- super.destroy();
184
- }
113
+ class SageMakerA2IRuntimeServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, SageMakerA2IRuntimeServiceException.prototype);
117
+ }
118
+ }
119
+
120
+ class InternalServerException extends SageMakerA2IRuntimeServiceException {
121
+ name = "InternalServerException";
122
+ $fault = "server";
123
+ Message;
124
+ constructor(opts) {
125
+ super({
126
+ name: "InternalServerException",
127
+ $fault: "server",
128
+ ...opts,
129
+ });
130
+ Object.setPrototypeOf(this, InternalServerException.prototype);
131
+ this.Message = opts.Message;
132
+ }
133
+ }
134
+ class ResourceNotFoundException extends SageMakerA2IRuntimeServiceException {
135
+ name = "ResourceNotFoundException";
136
+ $fault = "client";
137
+ Message;
138
+ constructor(opts) {
139
+ super({
140
+ name: "ResourceNotFoundException",
141
+ $fault: "client",
142
+ ...opts,
143
+ });
144
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
145
+ this.Message = opts.Message;
146
+ }
147
+ }
148
+ class ThrottlingException extends SageMakerA2IRuntimeServiceException {
149
+ name = "ThrottlingException";
150
+ $fault = "client";
151
+ Message;
152
+ constructor(opts) {
153
+ super({
154
+ name: "ThrottlingException",
155
+ $fault: "client",
156
+ ...opts,
157
+ });
158
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
159
+ this.Message = opts.Message;
160
+ }
161
+ }
162
+ class ValidationException extends SageMakerA2IRuntimeServiceException {
163
+ name = "ValidationException";
164
+ $fault = "client";
165
+ Message;
166
+ constructor(opts) {
167
+ super({
168
+ name: "ValidationException",
169
+ $fault: "client",
170
+ ...opts,
171
+ });
172
+ Object.setPrototypeOf(this, ValidationException.prototype);
173
+ this.Message = opts.Message;
174
+ }
175
+ }
176
+ const HumanLoopStatus = {
177
+ COMPLETED: "Completed",
178
+ FAILED: "Failed",
179
+ IN_PROGRESS: "InProgress",
180
+ STOPPED: "Stopped",
181
+ STOPPING: "Stopping",
185
182
  };
186
-
187
- // src/SageMakerA2IRuntime.ts
188
-
189
-
190
- // src/commands/DeleteHumanLoopCommand.ts
191
-
192
- var import_middleware_serde = require("@smithy/middleware-serde");
193
-
194
-
195
- // src/protocols/Aws_restJson1.ts
196
- var import_core2 = require("@aws-sdk/core");
197
-
198
-
199
-
200
- // src/models/SageMakerA2IRuntimeServiceException.ts
201
-
202
- var SageMakerA2IRuntimeServiceException = class _SageMakerA2IRuntimeServiceException extends import_smithy_client.ServiceException {
203
- static {
204
- __name(this, "SageMakerA2IRuntimeServiceException");
205
- }
206
- /**
207
- * @internal
208
- */
209
- constructor(options) {
210
- super(options);
211
- Object.setPrototypeOf(this, _SageMakerA2IRuntimeServiceException.prototype);
212
- }
183
+ const SortOrder = {
184
+ ASCENDING: "Ascending",
185
+ DESCENDING: "Descending",
186
+ };
187
+ class ConflictException extends SageMakerA2IRuntimeServiceException {
188
+ name = "ConflictException";
189
+ $fault = "client";
190
+ Message;
191
+ constructor(opts) {
192
+ super({
193
+ name: "ConflictException",
194
+ $fault: "client",
195
+ ...opts,
196
+ });
197
+ Object.setPrototypeOf(this, ConflictException.prototype);
198
+ this.Message = opts.Message;
199
+ }
200
+ }
201
+ class ServiceQuotaExceededException extends SageMakerA2IRuntimeServiceException {
202
+ name = "ServiceQuotaExceededException";
203
+ $fault = "client";
204
+ Message;
205
+ constructor(opts) {
206
+ super({
207
+ name: "ServiceQuotaExceededException",
208
+ $fault: "client",
209
+ ...opts,
210
+ });
211
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
212
+ this.Message = opts.Message;
213
+ }
214
+ }
215
+ const ContentClassifier = {
216
+ FREE_OF_ADULT_CONTENT: "FreeOfAdultContent",
217
+ FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION: "FreeOfPersonallyIdentifiableInformation",
213
218
  };
214
219
 
215
- // src/models/models_0.ts
216
- var InternalServerException = class _InternalServerException extends SageMakerA2IRuntimeServiceException {
217
- static {
218
- __name(this, "InternalServerException");
219
- }
220
- name = "InternalServerException";
221
- $fault = "server";
222
- Message;
223
- /**
224
- * @internal
225
- */
226
- constructor(opts) {
227
- super({
228
- name: "InternalServerException",
229
- $fault: "server",
230
- ...opts
231
- });
232
- Object.setPrototypeOf(this, _InternalServerException.prototype);
233
- this.Message = opts.Message;
234
- }
220
+ const se_DeleteHumanLoopCommand = async (input, context) => {
221
+ const b = core.requestBuilder(input, context);
222
+ const headers = {};
223
+ b.bp("/human-loops/{HumanLoopName}");
224
+ b.p("HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
225
+ let body;
226
+ b.m("DELETE").h(headers).b(body);
227
+ return b.build();
228
+ };
229
+ const se_DescribeHumanLoopCommand = async (input, context) => {
230
+ const b = core.requestBuilder(input, context);
231
+ const headers = {};
232
+ b.bp("/human-loops/{HumanLoopName}");
233
+ b.p("HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
234
+ let body;
235
+ b.m("GET").h(headers).b(body);
236
+ return b.build();
235
237
  };
236
- var ResourceNotFoundException = class _ResourceNotFoundException extends SageMakerA2IRuntimeServiceException {
237
- static {
238
- __name(this, "ResourceNotFoundException");
239
- }
240
- name = "ResourceNotFoundException";
241
- $fault = "client";
242
- Message;
243
- /**
244
- * @internal
245
- */
246
- constructor(opts) {
247
- super({
248
- name: "ResourceNotFoundException",
249
- $fault: "client",
250
- ...opts
238
+ const se_ListHumanLoopsCommand = async (input, context) => {
239
+ const b = core.requestBuilder(input, context);
240
+ const headers = {};
241
+ b.bp("/human-loops");
242
+ const query = smithyClient.map({
243
+ [_CTA]: [() => input.CreationTimeAfter !== void 0, () => smithyClient.serializeDateTime(input[_CTA]).toString()],
244
+ [_CTB]: [() => input.CreationTimeBefore !== void 0, () => smithyClient.serializeDateTime(input[_CTB]).toString()],
245
+ [_FDA]: [, smithyClient.expectNonNull(input[_FDA], `FlowDefinitionArn`)],
246
+ [_SO]: [, input[_SO]],
247
+ [_NT]: [, input[_NT]],
248
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
251
249
  });
252
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
253
- this.Message = opts.Message;
254
- }
250
+ let body;
251
+ b.m("GET").h(headers).q(query).b(body);
252
+ return b.build();
255
253
  };
256
- var ThrottlingException = class _ThrottlingException extends SageMakerA2IRuntimeServiceException {
257
- static {
258
- __name(this, "ThrottlingException");
259
- }
260
- name = "ThrottlingException";
261
- $fault = "client";
262
- Message;
263
- /**
264
- * @internal
265
- */
266
- constructor(opts) {
267
- super({
268
- name: "ThrottlingException",
269
- $fault: "client",
270
- ...opts
254
+ const se_StartHumanLoopCommand = async (input, context) => {
255
+ const b = core.requestBuilder(input, context);
256
+ const headers = {
257
+ "content-type": "application/json",
258
+ };
259
+ b.bp("/human-loops");
260
+ let body;
261
+ body = JSON.stringify(smithyClient.take(input, {
262
+ DataAttributes: (_) => smithyClient._json(_),
263
+ FlowDefinitionArn: [],
264
+ HumanLoopInput: (_) => smithyClient._json(_),
265
+ HumanLoopName: [],
266
+ }));
267
+ b.m("POST").h(headers).b(body);
268
+ return b.build();
269
+ };
270
+ const se_StopHumanLoopCommand = async (input, context) => {
271
+ const b = core.requestBuilder(input, context);
272
+ const headers = {
273
+ "content-type": "application/json",
274
+ };
275
+ b.bp("/human-loops/stop");
276
+ let body;
277
+ body = JSON.stringify(smithyClient.take(input, {
278
+ HumanLoopName: [],
279
+ }));
280
+ b.m("POST").h(headers).b(body);
281
+ return b.build();
282
+ };
283
+ const de_DeleteHumanLoopCommand = async (output, context) => {
284
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
285
+ return de_CommandError(output, context);
286
+ }
287
+ const contents = smithyClient.map({
288
+ $metadata: deserializeMetadata(output),
271
289
  });
272
- Object.setPrototypeOf(this, _ThrottlingException.prototype);
273
- this.Message = opts.Message;
274
- }
290
+ await smithyClient.collectBody(output.body, context);
291
+ return contents;
275
292
  };
276
- var ValidationException = class _ValidationException extends SageMakerA2IRuntimeServiceException {
277
- static {
278
- __name(this, "ValidationException");
279
- }
280
- name = "ValidationException";
281
- $fault = "client";
282
- Message;
283
- /**
284
- * @internal
285
- */
286
- constructor(opts) {
287
- super({
288
- name: "ValidationException",
289
- $fault: "client",
290
- ...opts
293
+ const de_DescribeHumanLoopCommand = async (output, context) => {
294
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
295
+ return de_CommandError(output, context);
296
+ }
297
+ const contents = smithyClient.map({
298
+ $metadata: deserializeMetadata(output),
299
+ });
300
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
301
+ const doc = smithyClient.take(data, {
302
+ CreationTime: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
303
+ FailureCode: smithyClient.expectString,
304
+ FailureReason: smithyClient.expectString,
305
+ FlowDefinitionArn: smithyClient.expectString,
306
+ HumanLoopArn: smithyClient.expectString,
307
+ HumanLoopName: smithyClient.expectString,
308
+ HumanLoopOutput: smithyClient._json,
309
+ HumanLoopStatus: smithyClient.expectString,
291
310
  });
292
- Object.setPrototypeOf(this, _ValidationException.prototype);
293
- this.Message = opts.Message;
294
- }
311
+ Object.assign(contents, doc);
312
+ return contents;
295
313
  };
296
- var HumanLoopStatus = {
297
- COMPLETED: "Completed",
298
- FAILED: "Failed",
299
- IN_PROGRESS: "InProgress",
300
- STOPPED: "Stopped",
301
- STOPPING: "Stopping"
314
+ const de_ListHumanLoopsCommand = async (output, context) => {
315
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
316
+ return de_CommandError(output, context);
317
+ }
318
+ const contents = smithyClient.map({
319
+ $metadata: deserializeMetadata(output),
320
+ });
321
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
322
+ const doc = smithyClient.take(data, {
323
+ HumanLoopSummaries: (_) => de_HumanLoopSummaries(_),
324
+ NextToken: smithyClient.expectString,
325
+ });
326
+ Object.assign(contents, doc);
327
+ return contents;
302
328
  };
303
- var SortOrder = {
304
- ASCENDING: "Ascending",
305
- DESCENDING: "Descending"
329
+ const de_StartHumanLoopCommand = async (output, context) => {
330
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
331
+ return de_CommandError(output, context);
332
+ }
333
+ const contents = smithyClient.map({
334
+ $metadata: deserializeMetadata(output),
335
+ });
336
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
337
+ const doc = smithyClient.take(data, {
338
+ HumanLoopArn: smithyClient.expectString,
339
+ });
340
+ Object.assign(contents, doc);
341
+ return contents;
306
342
  };
307
- var ConflictException = class _ConflictException extends SageMakerA2IRuntimeServiceException {
308
- static {
309
- __name(this, "ConflictException");
310
- }
311
- name = "ConflictException";
312
- $fault = "client";
313
- Message;
314
- /**
315
- * @internal
316
- */
317
- constructor(opts) {
318
- super({
319
- name: "ConflictException",
320
- $fault: "client",
321
- ...opts
343
+ const de_StopHumanLoopCommand = async (output, context) => {
344
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
345
+ return de_CommandError(output, context);
346
+ }
347
+ const contents = smithyClient.map({
348
+ $metadata: deserializeMetadata(output),
322
349
  });
323
- Object.setPrototypeOf(this, _ConflictException.prototype);
324
- this.Message = opts.Message;
325
- }
350
+ await smithyClient.collectBody(output.body, context);
351
+ return contents;
326
352
  };
327
- var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends SageMakerA2IRuntimeServiceException {
328
- static {
329
- __name(this, "ServiceQuotaExceededException");
330
- }
331
- name = "ServiceQuotaExceededException";
332
- $fault = "client";
333
- Message;
334
- /**
335
- * @internal
336
- */
337
- constructor(opts) {
338
- super({
339
- name: "ServiceQuotaExceededException",
340
- $fault: "client",
341
- ...opts
353
+ const de_CommandError = async (output, context) => {
354
+ const parsedOutput = {
355
+ ...output,
356
+ body: await core$1.parseJsonErrorBody(output.body, context),
357
+ };
358
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
359
+ switch (errorCode) {
360
+ case "InternalServerException":
361
+ case "com.amazonaws.sagemakera2iruntime#InternalServerException":
362
+ throw await de_InternalServerExceptionRes(parsedOutput);
363
+ case "ResourceNotFoundException":
364
+ case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
365
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
366
+ case "ThrottlingException":
367
+ case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
368
+ throw await de_ThrottlingExceptionRes(parsedOutput);
369
+ case "ValidationException":
370
+ case "com.amazonaws.sagemakera2iruntime#ValidationException":
371
+ throw await de_ValidationExceptionRes(parsedOutput);
372
+ case "ConflictException":
373
+ case "com.amazonaws.sagemakera2iruntime#ConflictException":
374
+ throw await de_ConflictExceptionRes(parsedOutput);
375
+ case "ServiceQuotaExceededException":
376
+ case "com.amazonaws.sagemakera2iruntime#ServiceQuotaExceededException":
377
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput);
378
+ default:
379
+ const parsedBody = parsedOutput.body;
380
+ return throwDefaultError({
381
+ output,
382
+ parsedBody,
383
+ errorCode,
384
+ });
385
+ }
386
+ };
387
+ const throwDefaultError = smithyClient.withBaseException(SageMakerA2IRuntimeServiceException);
388
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
389
+ const contents = smithyClient.map({});
390
+ const data = parsedOutput.body;
391
+ const doc = smithyClient.take(data, {
392
+ Message: smithyClient.expectString,
393
+ });
394
+ Object.assign(contents, doc);
395
+ const exception = new ConflictException({
396
+ $metadata: deserializeMetadata(parsedOutput),
397
+ ...contents,
342
398
  });
343
- Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
344
- this.Message = opts.Message;
345
- }
399
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
346
400
  };
347
- var ContentClassifier = {
348
- FREE_OF_ADULT_CONTENT: "FreeOfAdultContent",
349
- FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION: "FreeOfPersonallyIdentifiableInformation"
401
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
402
+ const contents = smithyClient.map({});
403
+ const data = parsedOutput.body;
404
+ const doc = smithyClient.take(data, {
405
+ Message: smithyClient.expectString,
406
+ });
407
+ Object.assign(contents, doc);
408
+ const exception = new InternalServerException({
409
+ $metadata: deserializeMetadata(parsedOutput),
410
+ ...contents,
411
+ });
412
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
350
413
  };
351
-
352
- // src/protocols/Aws_restJson1.ts
353
- var se_DeleteHumanLoopCommand = /* @__PURE__ */ __name(async (input, context) => {
354
- const b = (0, import_core.requestBuilder)(input, context);
355
- const headers = {};
356
- b.bp("/human-loops/{HumanLoopName}");
357
- b.p("HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
358
- let body;
359
- b.m("DELETE").h(headers).b(body);
360
- return b.build();
361
- }, "se_DeleteHumanLoopCommand");
362
- var se_DescribeHumanLoopCommand = /* @__PURE__ */ __name(async (input, context) => {
363
- const b = (0, import_core.requestBuilder)(input, context);
364
- const headers = {};
365
- b.bp("/human-loops/{HumanLoopName}");
366
- b.p("HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
367
- let body;
368
- b.m("GET").h(headers).b(body);
369
- return b.build();
370
- }, "se_DescribeHumanLoopCommand");
371
- var se_ListHumanLoopsCommand = /* @__PURE__ */ __name(async (input, context) => {
372
- const b = (0, import_core.requestBuilder)(input, context);
373
- const headers = {};
374
- b.bp("/human-loops");
375
- const query = (0, import_smithy_client.map)({
376
- [_CTA]: [() => input.CreationTimeAfter !== void 0, () => (0, import_smithy_client.serializeDateTime)(input[_CTA]).toString()],
377
- [_CTB]: [() => input.CreationTimeBefore !== void 0, () => (0, import_smithy_client.serializeDateTime)(input[_CTB]).toString()],
378
- [_FDA]: [, (0, import_smithy_client.expectNonNull)(input[_FDA], `FlowDefinitionArn`)],
379
- [_SO]: [, input[_SO]],
380
- [_NT]: [, input[_NT]],
381
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()]
382
- });
383
- let body;
384
- b.m("GET").h(headers).q(query).b(body);
385
- return b.build();
386
- }, "se_ListHumanLoopsCommand");
387
- var se_StartHumanLoopCommand = /* @__PURE__ */ __name(async (input, context) => {
388
- const b = (0, import_core.requestBuilder)(input, context);
389
- const headers = {
390
- "content-type": "application/json"
391
- };
392
- b.bp("/human-loops");
393
- let body;
394
- body = JSON.stringify(
395
- (0, import_smithy_client.take)(input, {
396
- DataAttributes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "DataAttributes"),
397
- FlowDefinitionArn: [],
398
- HumanLoopInput: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "HumanLoopInput"),
399
- HumanLoopName: []
400
- })
401
- );
402
- b.m("POST").h(headers).b(body);
403
- return b.build();
404
- }, "se_StartHumanLoopCommand");
405
- var se_StopHumanLoopCommand = /* @__PURE__ */ __name(async (input, context) => {
406
- const b = (0, import_core.requestBuilder)(input, context);
407
- const headers = {
408
- "content-type": "application/json"
409
- };
410
- b.bp("/human-loops/stop");
411
- let body;
412
- body = JSON.stringify(
413
- (0, import_smithy_client.take)(input, {
414
- HumanLoopName: []
415
- })
416
- );
417
- b.m("POST").h(headers).b(body);
418
- return b.build();
419
- }, "se_StopHumanLoopCommand");
420
- var de_DeleteHumanLoopCommand = /* @__PURE__ */ __name(async (output, context) => {
421
- if (output.statusCode !== 200 && output.statusCode >= 300) {
422
- return de_CommandError(output, context);
423
- }
424
- const contents = (0, import_smithy_client.map)({
425
- $metadata: deserializeMetadata(output)
426
- });
427
- await (0, import_smithy_client.collectBody)(output.body, context);
428
- return contents;
429
- }, "de_DeleteHumanLoopCommand");
430
- var de_DescribeHumanLoopCommand = /* @__PURE__ */ __name(async (output, context) => {
431
- if (output.statusCode !== 200 && output.statusCode >= 300) {
432
- return de_CommandError(output, context);
433
- }
434
- const contents = (0, import_smithy_client.map)({
435
- $metadata: deserializeMetadata(output)
436
- });
437
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
438
- const doc = (0, import_smithy_client.take)(data, {
439
- CreationTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "CreationTime"),
440
- FailureCode: import_smithy_client.expectString,
441
- FailureReason: import_smithy_client.expectString,
442
- FlowDefinitionArn: import_smithy_client.expectString,
443
- HumanLoopArn: import_smithy_client.expectString,
444
- HumanLoopName: import_smithy_client.expectString,
445
- HumanLoopOutput: import_smithy_client._json,
446
- HumanLoopStatus: import_smithy_client.expectString
447
- });
448
- Object.assign(contents, doc);
449
- return contents;
450
- }, "de_DescribeHumanLoopCommand");
451
- var de_ListHumanLoopsCommand = /* @__PURE__ */ __name(async (output, context) => {
452
- if (output.statusCode !== 200 && output.statusCode >= 300) {
453
- return de_CommandError(output, context);
454
- }
455
- const contents = (0, import_smithy_client.map)({
456
- $metadata: deserializeMetadata(output)
457
- });
458
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
459
- const doc = (0, import_smithy_client.take)(data, {
460
- HumanLoopSummaries: /* @__PURE__ */ __name((_) => de_HumanLoopSummaries(_, context), "HumanLoopSummaries"),
461
- NextToken: import_smithy_client.expectString
462
- });
463
- Object.assign(contents, doc);
464
- return contents;
465
- }, "de_ListHumanLoopsCommand");
466
- var de_StartHumanLoopCommand = /* @__PURE__ */ __name(async (output, context) => {
467
- if (output.statusCode !== 200 && output.statusCode >= 300) {
468
- return de_CommandError(output, context);
469
- }
470
- const contents = (0, import_smithy_client.map)({
471
- $metadata: deserializeMetadata(output)
472
- });
473
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
474
- const doc = (0, import_smithy_client.take)(data, {
475
- HumanLoopArn: import_smithy_client.expectString
476
- });
477
- Object.assign(contents, doc);
478
- return contents;
479
- }, "de_StartHumanLoopCommand");
480
- var de_StopHumanLoopCommand = /* @__PURE__ */ __name(async (output, context) => {
481
- if (output.statusCode !== 200 && output.statusCode >= 300) {
482
- return de_CommandError(output, context);
483
- }
484
- const contents = (0, import_smithy_client.map)({
485
- $metadata: deserializeMetadata(output)
486
- });
487
- await (0, import_smithy_client.collectBody)(output.body, context);
488
- return contents;
489
- }, "de_StopHumanLoopCommand");
490
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
491
- const parsedOutput = {
492
- ...output,
493
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
494
- };
495
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
496
- switch (errorCode) {
497
- case "InternalServerException":
498
- case "com.amazonaws.sagemakera2iruntime#InternalServerException":
499
- throw await de_InternalServerExceptionRes(parsedOutput, context);
500
- case "ResourceNotFoundException":
501
- case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
502
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
503
- case "ThrottlingException":
504
- case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
505
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
506
- case "ValidationException":
507
- case "com.amazonaws.sagemakera2iruntime#ValidationException":
508
- throw await de_ValidationExceptionRes(parsedOutput, context);
509
- case "ConflictException":
510
- case "com.amazonaws.sagemakera2iruntime#ConflictException":
511
- throw await de_ConflictExceptionRes(parsedOutput, context);
512
- case "ServiceQuotaExceededException":
513
- case "com.amazonaws.sagemakera2iruntime#ServiceQuotaExceededException":
514
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
515
- default:
516
- const parsedBody = parsedOutput.body;
517
- return throwDefaultError({
518
- output,
519
- parsedBody,
520
- errorCode
521
- });
522
- }
523
- }, "de_CommandError");
524
- var throwDefaultError = (0, import_smithy_client.withBaseException)(SageMakerA2IRuntimeServiceException);
525
- var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
526
- const contents = (0, import_smithy_client.map)({});
527
- const data = parsedOutput.body;
528
- const doc = (0, import_smithy_client.take)(data, {
529
- Message: import_smithy_client.expectString
530
- });
531
- Object.assign(contents, doc);
532
- const exception = new ConflictException({
533
- $metadata: deserializeMetadata(parsedOutput),
534
- ...contents
535
- });
536
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
537
- }, "de_ConflictExceptionRes");
538
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
539
- const contents = (0, import_smithy_client.map)({});
540
- const data = parsedOutput.body;
541
- const doc = (0, import_smithy_client.take)(data, {
542
- Message: import_smithy_client.expectString
543
- });
544
- Object.assign(contents, doc);
545
- const exception = new InternalServerException({
546
- $metadata: deserializeMetadata(parsedOutput),
547
- ...contents
548
- });
549
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
550
- }, "de_InternalServerExceptionRes");
551
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
552
- const contents = (0, import_smithy_client.map)({});
553
- const data = parsedOutput.body;
554
- const doc = (0, import_smithy_client.take)(data, {
555
- Message: import_smithy_client.expectString
556
- });
557
- Object.assign(contents, doc);
558
- const exception = new ResourceNotFoundException({
559
- $metadata: deserializeMetadata(parsedOutput),
560
- ...contents
561
- });
562
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
563
- }, "de_ResourceNotFoundExceptionRes");
564
- var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
565
- const contents = (0, import_smithy_client.map)({});
566
- const data = parsedOutput.body;
567
- const doc = (0, import_smithy_client.take)(data, {
568
- Message: import_smithy_client.expectString
569
- });
570
- Object.assign(contents, doc);
571
- const exception = new ServiceQuotaExceededException({
572
- $metadata: deserializeMetadata(parsedOutput),
573
- ...contents
574
- });
575
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
576
- }, "de_ServiceQuotaExceededExceptionRes");
577
- var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
578
- const contents = (0, import_smithy_client.map)({});
579
- const data = parsedOutput.body;
580
- const doc = (0, import_smithy_client.take)(data, {
581
- Message: import_smithy_client.expectString
582
- });
583
- Object.assign(contents, doc);
584
- const exception = new ThrottlingException({
585
- $metadata: deserializeMetadata(parsedOutput),
586
- ...contents
587
- });
588
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
589
- }, "de_ThrottlingExceptionRes");
590
- var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
591
- const contents = (0, import_smithy_client.map)({});
592
- const data = parsedOutput.body;
593
- const doc = (0, import_smithy_client.take)(data, {
594
- Message: import_smithy_client.expectString
595
- });
596
- Object.assign(contents, doc);
597
- const exception = new ValidationException({
598
- $metadata: deserializeMetadata(parsedOutput),
599
- ...contents
600
- });
601
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
602
- }, "de_ValidationExceptionRes");
603
- var de_HumanLoopSummaries = /* @__PURE__ */ __name((output, context) => {
604
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
605
- return de_HumanLoopSummary(entry, context);
606
- });
607
- return retVal;
608
- }, "de_HumanLoopSummaries");
609
- var de_HumanLoopSummary = /* @__PURE__ */ __name((output, context) => {
610
- return (0, import_smithy_client.take)(output, {
611
- CreationTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "CreationTime"),
612
- FailureReason: import_smithy_client.expectString,
613
- FlowDefinitionArn: import_smithy_client.expectString,
614
- HumanLoopName: import_smithy_client.expectString,
615
- HumanLoopStatus: import_smithy_client.expectString
616
- });
617
- }, "de_HumanLoopSummary");
618
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
619
- httpStatusCode: output.statusCode,
620
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
621
- extendedRequestId: output.headers["x-amz-id-2"],
622
- cfId: output.headers["x-amz-cf-id"]
623
- }), "deserializeMetadata");
624
- var _CTA = "CreationTimeAfter";
625
- var _CTB = "CreationTimeBefore";
626
- var _FDA = "FlowDefinitionArn";
627
- var _MR = "MaxResults";
628
- var _NT = "NextToken";
629
- var _SO = "SortOrder";
630
-
631
- // src/commands/DeleteHumanLoopCommand.ts
632
- var DeleteHumanLoopCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
633
- return [
634
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
635
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
636
- ];
637
- }).s("AmazonSageMakerA2IRuntime", "DeleteHumanLoop", {}).n("SageMakerA2IRuntimeClient", "DeleteHumanLoopCommand").f(void 0, void 0).ser(se_DeleteHumanLoopCommand).de(de_DeleteHumanLoopCommand).build() {
638
- static {
639
- __name(this, "DeleteHumanLoopCommand");
640
- }
414
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
415
+ const contents = smithyClient.map({});
416
+ const data = parsedOutput.body;
417
+ const doc = smithyClient.take(data, {
418
+ Message: smithyClient.expectString,
419
+ });
420
+ Object.assign(contents, doc);
421
+ const exception = new ResourceNotFoundException({
422
+ $metadata: deserializeMetadata(parsedOutput),
423
+ ...contents,
424
+ });
425
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
641
426
  };
642
-
643
- // src/commands/DescribeHumanLoopCommand.ts
644
-
645
-
646
-
647
- var DescribeHumanLoopCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
648
- return [
649
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
650
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
651
- ];
652
- }).s("AmazonSageMakerA2IRuntime", "DescribeHumanLoop", {}).n("SageMakerA2IRuntimeClient", "DescribeHumanLoopCommand").f(void 0, void 0).ser(se_DescribeHumanLoopCommand).de(de_DescribeHumanLoopCommand).build() {
653
- static {
654
- __name(this, "DescribeHumanLoopCommand");
655
- }
427
+ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
428
+ const contents = smithyClient.map({});
429
+ const data = parsedOutput.body;
430
+ const doc = smithyClient.take(data, {
431
+ Message: smithyClient.expectString,
432
+ });
433
+ Object.assign(contents, doc);
434
+ const exception = new ServiceQuotaExceededException({
435
+ $metadata: deserializeMetadata(parsedOutput),
436
+ ...contents,
437
+ });
438
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
656
439
  };
657
-
658
- // src/commands/ListHumanLoopsCommand.ts
659
-
660
-
661
-
662
- var ListHumanLoopsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
663
- return [
664
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
665
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
666
- ];
667
- }).s("AmazonSageMakerA2IRuntime", "ListHumanLoops", {}).n("SageMakerA2IRuntimeClient", "ListHumanLoopsCommand").f(void 0, void 0).ser(se_ListHumanLoopsCommand).de(de_ListHumanLoopsCommand).build() {
668
- static {
669
- __name(this, "ListHumanLoopsCommand");
670
- }
440
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
441
+ const contents = smithyClient.map({});
442
+ const data = parsedOutput.body;
443
+ const doc = smithyClient.take(data, {
444
+ Message: smithyClient.expectString,
445
+ });
446
+ Object.assign(contents, doc);
447
+ const exception = new ThrottlingException({
448
+ $metadata: deserializeMetadata(parsedOutput),
449
+ ...contents,
450
+ });
451
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
671
452
  };
672
-
673
- // src/commands/StartHumanLoopCommand.ts
674
-
675
-
676
-
677
- var StartHumanLoopCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
678
- return [
679
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
680
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
681
- ];
682
- }).s("AmazonSageMakerA2IRuntime", "StartHumanLoop", {}).n("SageMakerA2IRuntimeClient", "StartHumanLoopCommand").f(void 0, void 0).ser(se_StartHumanLoopCommand).de(de_StartHumanLoopCommand).build() {
683
- static {
684
- __name(this, "StartHumanLoopCommand");
685
- }
453
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
454
+ const contents = smithyClient.map({});
455
+ const data = parsedOutput.body;
456
+ const doc = smithyClient.take(data, {
457
+ Message: smithyClient.expectString,
458
+ });
459
+ Object.assign(contents, doc);
460
+ const exception = new ValidationException({
461
+ $metadata: deserializeMetadata(parsedOutput),
462
+ ...contents,
463
+ });
464
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
686
465
  };
687
-
688
- // src/commands/StopHumanLoopCommand.ts
689
-
690
-
691
-
692
- var StopHumanLoopCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
693
- return [
694
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
695
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
696
- ];
697
- }).s("AmazonSageMakerA2IRuntime", "StopHumanLoop", {}).n("SageMakerA2IRuntimeClient", "StopHumanLoopCommand").f(void 0, void 0).ser(se_StopHumanLoopCommand).de(de_StopHumanLoopCommand).build() {
698
- static {
699
- __name(this, "StopHumanLoopCommand");
700
- }
466
+ const de_HumanLoopSummaries = (output, context) => {
467
+ const retVal = (output || [])
468
+ .filter((e) => e != null)
469
+ .map((entry) => {
470
+ return de_HumanLoopSummary(entry);
471
+ });
472
+ return retVal;
701
473
  };
702
-
703
- // src/SageMakerA2IRuntime.ts
704
- var commands = {
705
- DeleteHumanLoopCommand,
706
- DescribeHumanLoopCommand,
707
- ListHumanLoopsCommand,
708
- StartHumanLoopCommand,
709
- StopHumanLoopCommand
474
+ const de_HumanLoopSummary = (output, context) => {
475
+ return smithyClient.take(output, {
476
+ CreationTime: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
477
+ FailureReason: smithyClient.expectString,
478
+ FlowDefinitionArn: smithyClient.expectString,
479
+ HumanLoopName: smithyClient.expectString,
480
+ HumanLoopStatus: smithyClient.expectString,
481
+ });
710
482
  };
711
- var SageMakerA2IRuntime = class extends SageMakerA2IRuntimeClient {
712
- static {
713
- __name(this, "SageMakerA2IRuntime");
714
- }
483
+ const deserializeMetadata = (output) => ({
484
+ httpStatusCode: output.statusCode,
485
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
486
+ extendedRequestId: output.headers["x-amz-id-2"],
487
+ cfId: output.headers["x-amz-cf-id"],
488
+ });
489
+ const _CTA = "CreationTimeAfter";
490
+ const _CTB = "CreationTimeBefore";
491
+ const _FDA = "FlowDefinitionArn";
492
+ const _MR = "MaxResults";
493
+ const _NT = "NextToken";
494
+ const _SO = "SortOrder";
495
+
496
+ class DeleteHumanLoopCommand extends smithyClient.Command
497
+ .classBuilder()
498
+ .ep(commonParams)
499
+ .m(function (Command, cs, config, o) {
500
+ return [
501
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
502
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
503
+ ];
504
+ })
505
+ .s("AmazonSageMakerA2IRuntime", "DeleteHumanLoop", {})
506
+ .n("SageMakerA2IRuntimeClient", "DeleteHumanLoopCommand")
507
+ .f(void 0, void 0)
508
+ .ser(se_DeleteHumanLoopCommand)
509
+ .de(de_DeleteHumanLoopCommand)
510
+ .build() {
511
+ }
512
+
513
+ class DescribeHumanLoopCommand extends smithyClient.Command
514
+ .classBuilder()
515
+ .ep(commonParams)
516
+ .m(function (Command, cs, config, o) {
517
+ return [
518
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
519
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
520
+ ];
521
+ })
522
+ .s("AmazonSageMakerA2IRuntime", "DescribeHumanLoop", {})
523
+ .n("SageMakerA2IRuntimeClient", "DescribeHumanLoopCommand")
524
+ .f(void 0, void 0)
525
+ .ser(se_DescribeHumanLoopCommand)
526
+ .de(de_DescribeHumanLoopCommand)
527
+ .build() {
528
+ }
529
+
530
+ class ListHumanLoopsCommand extends smithyClient.Command
531
+ .classBuilder()
532
+ .ep(commonParams)
533
+ .m(function (Command, cs, config, o) {
534
+ return [
535
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
536
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
537
+ ];
538
+ })
539
+ .s("AmazonSageMakerA2IRuntime", "ListHumanLoops", {})
540
+ .n("SageMakerA2IRuntimeClient", "ListHumanLoopsCommand")
541
+ .f(void 0, void 0)
542
+ .ser(se_ListHumanLoopsCommand)
543
+ .de(de_ListHumanLoopsCommand)
544
+ .build() {
545
+ }
546
+
547
+ class StartHumanLoopCommand extends smithyClient.Command
548
+ .classBuilder()
549
+ .ep(commonParams)
550
+ .m(function (Command, cs, config, o) {
551
+ return [
552
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
553
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
554
+ ];
555
+ })
556
+ .s("AmazonSageMakerA2IRuntime", "StartHumanLoop", {})
557
+ .n("SageMakerA2IRuntimeClient", "StartHumanLoopCommand")
558
+ .f(void 0, void 0)
559
+ .ser(se_StartHumanLoopCommand)
560
+ .de(de_StartHumanLoopCommand)
561
+ .build() {
562
+ }
563
+
564
+ class StopHumanLoopCommand extends smithyClient.Command
565
+ .classBuilder()
566
+ .ep(commonParams)
567
+ .m(function (Command, cs, config, o) {
568
+ return [
569
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
570
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
571
+ ];
572
+ })
573
+ .s("AmazonSageMakerA2IRuntime", "StopHumanLoop", {})
574
+ .n("SageMakerA2IRuntimeClient", "StopHumanLoopCommand")
575
+ .f(void 0, void 0)
576
+ .ser(se_StopHumanLoopCommand)
577
+ .de(de_StopHumanLoopCommand)
578
+ .build() {
579
+ }
580
+
581
+ const commands = {
582
+ DeleteHumanLoopCommand,
583
+ DescribeHumanLoopCommand,
584
+ ListHumanLoopsCommand,
585
+ StartHumanLoopCommand,
586
+ StopHumanLoopCommand,
715
587
  };
716
- (0, import_smithy_client.createAggregatedClient)(commands, SageMakerA2IRuntime);
717
-
718
- // src/pagination/ListHumanLoopsPaginator.ts
588
+ class SageMakerA2IRuntime extends SageMakerA2IRuntimeClient {
589
+ }
590
+ smithyClient.createAggregatedClient(commands, SageMakerA2IRuntime);
719
591
 
720
- var paginateListHumanLoops = (0, import_core.createPaginator)(SageMakerA2IRuntimeClient, ListHumanLoopsCommand, "NextToken", "NextToken", "MaxResults");
721
- // Annotate the CommonJS export names for ESM import in node:
592
+ const paginateListHumanLoops = core.createPaginator(SageMakerA2IRuntimeClient, ListHumanLoopsCommand, "NextToken", "NextToken", "MaxResults");
722
593
 
723
- 0 && (module.exports = {
724
- SageMakerA2IRuntimeServiceException,
725
- __Client,
726
- SageMakerA2IRuntimeClient,
727
- SageMakerA2IRuntime,
728
- $Command,
729
- DeleteHumanLoopCommand,
730
- DescribeHumanLoopCommand,
731
- ListHumanLoopsCommand,
732
- StartHumanLoopCommand,
733
- StopHumanLoopCommand,
734
- paginateListHumanLoops,
735
- InternalServerException,
736
- ResourceNotFoundException,
737
- ThrottlingException,
738
- ValidationException,
739
- HumanLoopStatus,
740
- SortOrder,
741
- ConflictException,
742
- ServiceQuotaExceededException,
743
- ContentClassifier
594
+ Object.defineProperty(exports, "$Command", {
595
+ enumerable: true,
596
+ get: function () { return smithyClient.Command; }
744
597
  });
745
-
598
+ Object.defineProperty(exports, "__Client", {
599
+ enumerable: true,
600
+ get: function () { return smithyClient.Client; }
601
+ });
602
+ exports.ConflictException = ConflictException;
603
+ exports.ContentClassifier = ContentClassifier;
604
+ exports.DeleteHumanLoopCommand = DeleteHumanLoopCommand;
605
+ exports.DescribeHumanLoopCommand = DescribeHumanLoopCommand;
606
+ exports.HumanLoopStatus = HumanLoopStatus;
607
+ exports.InternalServerException = InternalServerException;
608
+ exports.ListHumanLoopsCommand = ListHumanLoopsCommand;
609
+ exports.ResourceNotFoundException = ResourceNotFoundException;
610
+ exports.SageMakerA2IRuntime = SageMakerA2IRuntime;
611
+ exports.SageMakerA2IRuntimeClient = SageMakerA2IRuntimeClient;
612
+ exports.SageMakerA2IRuntimeServiceException = SageMakerA2IRuntimeServiceException;
613
+ exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
614
+ exports.SortOrder = SortOrder;
615
+ exports.StartHumanLoopCommand = StartHumanLoopCommand;
616
+ exports.StopHumanLoopCommand = StopHumanLoopCommand;
617
+ exports.ThrottlingException = ThrottlingException;
618
+ exports.ValidationException = ValidationException;
619
+ exports.paginateListHumanLoops = paginateListHumanLoops;