@aws-sdk/client-sagemaker-a2i-runtime 3.181.0 → 3.183.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.
@@ -1,57 +1,56 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { SageMakerA2IRuntimeServiceException as __BaseException } from "./SageMakerA2IRuntimeServiceException";
3
- var InternalServerException = (function (_super) {
4
- __extends(InternalServerException, _super);
5
- function InternalServerException(opts) {
6
- var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
7
- _this.name = "InternalServerException";
8
- _this.$fault = "server";
9
- Object.setPrototypeOf(_this, InternalServerException.prototype);
10
- _this.Message = opts.Message;
11
- return _this;
2
+ export class InternalServerException extends __BaseException {
3
+ constructor(opts) {
4
+ super({
5
+ name: "InternalServerException",
6
+ $fault: "server",
7
+ ...opts,
8
+ });
9
+ this.name = "InternalServerException";
10
+ this.$fault = "server";
11
+ Object.setPrototypeOf(this, InternalServerException.prototype);
12
+ this.Message = opts.Message;
12
13
  }
13
- return InternalServerException;
14
- }(__BaseException));
15
- export { InternalServerException };
16
- var ResourceNotFoundException = (function (_super) {
17
- __extends(ResourceNotFoundException, _super);
18
- function ResourceNotFoundException(opts) {
19
- var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
20
- _this.name = "ResourceNotFoundException";
21
- _this.$fault = "client";
22
- Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
23
- _this.Message = opts.Message;
24
- return _this;
14
+ }
15
+ export class ResourceNotFoundException extends __BaseException {
16
+ constructor(opts) {
17
+ super({
18
+ name: "ResourceNotFoundException",
19
+ $fault: "client",
20
+ ...opts,
21
+ });
22
+ this.name = "ResourceNotFoundException";
23
+ this.$fault = "client";
24
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
25
+ this.Message = opts.Message;
25
26
  }
26
- return ResourceNotFoundException;
27
- }(__BaseException));
28
- export { ResourceNotFoundException };
29
- var ThrottlingException = (function (_super) {
30
- __extends(ThrottlingException, _super);
31
- function ThrottlingException(opts) {
32
- var _this = _super.call(this, __assign({ name: "ThrottlingException", $fault: "client" }, opts)) || this;
33
- _this.name = "ThrottlingException";
34
- _this.$fault = "client";
35
- Object.setPrototypeOf(_this, ThrottlingException.prototype);
36
- _this.Message = opts.Message;
37
- return _this;
27
+ }
28
+ export class ThrottlingException extends __BaseException {
29
+ constructor(opts) {
30
+ super({
31
+ name: "ThrottlingException",
32
+ $fault: "client",
33
+ ...opts,
34
+ });
35
+ this.name = "ThrottlingException";
36
+ this.$fault = "client";
37
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
38
+ this.Message = opts.Message;
38
39
  }
39
- return ThrottlingException;
40
- }(__BaseException));
41
- export { ThrottlingException };
42
- var ValidationException = (function (_super) {
43
- __extends(ValidationException, _super);
44
- function ValidationException(opts) {
45
- var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
46
- _this.name = "ValidationException";
47
- _this.$fault = "client";
48
- Object.setPrototypeOf(_this, ValidationException.prototype);
49
- _this.Message = opts.Message;
50
- return _this;
40
+ }
41
+ export class ValidationException extends __BaseException {
42
+ constructor(opts) {
43
+ super({
44
+ name: "ValidationException",
45
+ $fault: "client",
46
+ ...opts,
47
+ });
48
+ this.name = "ValidationException";
49
+ this.$fault = "client";
50
+ Object.setPrototypeOf(this, ValidationException.prototype);
51
+ this.Message = opts.Message;
51
52
  }
52
- return ValidationException;
53
- }(__BaseException));
54
- export { ValidationException };
53
+ }
55
54
  export var HumanLoopStatus;
56
55
  (function (HumanLoopStatus) {
57
56
  HumanLoopStatus["COMPLETED"] = "Completed";
@@ -65,48 +64,76 @@ export var SortOrder;
65
64
  SortOrder["ASCENDING"] = "Ascending";
66
65
  SortOrder["DESCENDING"] = "Descending";
67
66
  })(SortOrder || (SortOrder = {}));
68
- var ConflictException = (function (_super) {
69
- __extends(ConflictException, _super);
70
- function ConflictException(opts) {
71
- var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
72
- _this.name = "ConflictException";
73
- _this.$fault = "client";
74
- Object.setPrototypeOf(_this, ConflictException.prototype);
75
- _this.Message = opts.Message;
76
- return _this;
67
+ export class ConflictException extends __BaseException {
68
+ constructor(opts) {
69
+ super({
70
+ name: "ConflictException",
71
+ $fault: "client",
72
+ ...opts,
73
+ });
74
+ this.name = "ConflictException";
75
+ this.$fault = "client";
76
+ Object.setPrototypeOf(this, ConflictException.prototype);
77
+ this.Message = opts.Message;
77
78
  }
78
- return ConflictException;
79
- }(__BaseException));
80
- export { ConflictException };
81
- var ServiceQuotaExceededException = (function (_super) {
82
- __extends(ServiceQuotaExceededException, _super);
83
- function ServiceQuotaExceededException(opts) {
84
- var _this = _super.call(this, __assign({ name: "ServiceQuotaExceededException", $fault: "client" }, opts)) || this;
85
- _this.name = "ServiceQuotaExceededException";
86
- _this.$fault = "client";
87
- Object.setPrototypeOf(_this, ServiceQuotaExceededException.prototype);
88
- _this.Message = opts.Message;
89
- return _this;
79
+ }
80
+ export class ServiceQuotaExceededException extends __BaseException {
81
+ constructor(opts) {
82
+ super({
83
+ name: "ServiceQuotaExceededException",
84
+ $fault: "client",
85
+ ...opts,
86
+ });
87
+ this.name = "ServiceQuotaExceededException";
88
+ this.$fault = "client";
89
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
90
+ this.Message = opts.Message;
90
91
  }
91
- return ServiceQuotaExceededException;
92
- }(__BaseException));
93
- export { ServiceQuotaExceededException };
92
+ }
94
93
  export var ContentClassifier;
95
94
  (function (ContentClassifier) {
96
95
  ContentClassifier["FREE_OF_ADULT_CONTENT"] = "FreeOfAdultContent";
97
96
  ContentClassifier["FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION"] = "FreeOfPersonallyIdentifiableInformation";
98
97
  })(ContentClassifier || (ContentClassifier = {}));
99
- export var DeleteHumanLoopRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
100
- export var DeleteHumanLoopResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
101
- export var DescribeHumanLoopRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
102
- export var HumanLoopOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
103
- export var DescribeHumanLoopResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
104
- export var ListHumanLoopsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
105
- export var HumanLoopSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
106
- export var ListHumanLoopsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
107
- export var HumanLoopDataAttributesFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
108
- export var HumanLoopInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
109
- export var StartHumanLoopRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
110
- export var StartHumanLoopResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
111
- export var StopHumanLoopRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
112
- export var StopHumanLoopResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
98
+ export const DeleteHumanLoopRequestFilterSensitiveLog = (obj) => ({
99
+ ...obj,
100
+ });
101
+ export const DeleteHumanLoopResponseFilterSensitiveLog = (obj) => ({
102
+ ...obj,
103
+ });
104
+ export const DescribeHumanLoopRequestFilterSensitiveLog = (obj) => ({
105
+ ...obj,
106
+ });
107
+ export const HumanLoopOutputFilterSensitiveLog = (obj) => ({
108
+ ...obj,
109
+ });
110
+ export const DescribeHumanLoopResponseFilterSensitiveLog = (obj) => ({
111
+ ...obj,
112
+ });
113
+ export const ListHumanLoopsRequestFilterSensitiveLog = (obj) => ({
114
+ ...obj,
115
+ });
116
+ export const HumanLoopSummaryFilterSensitiveLog = (obj) => ({
117
+ ...obj,
118
+ });
119
+ export const ListHumanLoopsResponseFilterSensitiveLog = (obj) => ({
120
+ ...obj,
121
+ });
122
+ export const HumanLoopDataAttributesFilterSensitiveLog = (obj) => ({
123
+ ...obj,
124
+ });
125
+ export const HumanLoopInputFilterSensitiveLog = (obj) => ({
126
+ ...obj,
127
+ });
128
+ export const StartHumanLoopRequestFilterSensitiveLog = (obj) => ({
129
+ ...obj,
130
+ });
131
+ export const StartHumanLoopResponseFilterSensitiveLog = (obj) => ({
132
+ ...obj,
133
+ });
134
+ export const StopHumanLoopRequestFilterSensitiveLog = (obj) => ({
135
+ ...obj,
136
+ });
137
+ export const StopHumanLoopResponseFilterSensitiveLog = (obj) => ({
138
+ ...obj,
139
+ });
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListHumanLoopsCommand, } from "../commands/ListHumanLoopsCommand";
3
2
  import { SageMakerA2IRuntime } from "../SageMakerA2IRuntime";
4
3
  import { SageMakerA2IRuntimeClient } from "../SageMakerA2IRuntimeClient";
5
- var makePagedClientRequest = function (client, input) {
6
- var args = [];
7
- for (var _i = 2; _i < arguments.length; _i++) {
8
- args[_i - 2] = arguments[_i];
9
- }
10
- return __awaiter(void 0, void 0, void 0, function () {
11
- return __generator(this, function (_a) {
12
- switch (_a.label) {
13
- case 0: return [4, client.send.apply(client, __spreadArray([new ListHumanLoopsCommand(input)], __read(args), false))];
14
- case 1: return [2, _a.sent()];
15
- }
16
- });
17
- });
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListHumanLoopsCommand(input), ...args);
18
6
  };
19
- var makePagedRequest = function (client, input) {
20
- var args = [];
21
- for (var _i = 2; _i < arguments.length; _i++) {
22
- args[_i - 2] = arguments[_i];
23
- }
24
- return __awaiter(void 0, void 0, void 0, function () {
25
- return __generator(this, function (_a) {
26
- switch (_a.label) {
27
- case 0: return [4, client.listHumanLoops.apply(client, __spreadArray([input], __read(args), false))];
28
- case 1: return [2, _a.sent()];
29
- }
30
- });
31
- });
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listHumanLoops(input, ...args);
32
9
  };
33
- export function paginateListHumanLoops(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListHumanLoops(config, input, ...additionalArguments) {
11
+ let token = config.startingToken || undefined;
12
+ let hasNext = true;
13
+ let page;
14
+ while (hasNext) {
15
+ input.NextToken = token;
16
+ input["MaxResults"] = config.pageSize;
17
+ if (config.client instanceof SageMakerA2IRuntime) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof SageMakerA2IRuntimeClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected SageMakerA2IRuntime | SageMakerA2IRuntimeClient");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.NextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
37
30
  }
38
- return __asyncGenerator(this, arguments, function paginateListHumanLoops_1() {
39
- var token, hasNext, page, prevToken;
40
- return __generator(this, function (_a) {
41
- switch (_a.label) {
42
- case 0:
43
- token = config.startingToken || undefined;
44
- hasNext = true;
45
- _a.label = 1;
46
- case 1:
47
- if (!hasNext) return [3, 9];
48
- input.NextToken = token;
49
- input["MaxResults"] = config.pageSize;
50
- if (!(config.client instanceof SageMakerA2IRuntime)) return [3, 3];
51
- return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
- case 2:
53
- page = _a.sent();
54
- return [3, 6];
55
- case 3:
56
- if (!(config.client instanceof SageMakerA2IRuntimeClient)) return [3, 5];
57
- return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
- case 4:
59
- page = _a.sent();
60
- return [3, 6];
61
- case 5: throw new Error("Invalid client, expected SageMakerA2IRuntime | SageMakerA2IRuntimeClient");
62
- case 6: return [4, __await(page)];
63
- case 7: return [4, _a.sent()];
64
- case 8:
65
- _a.sent();
66
- prevToken = token;
67
- token = page.NextToken;
68
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
- return [3, 1];
70
- case 9: return [4, __await(undefined)];
71
- case 10: return [2, _a.sent()];
72
- }
73
- });
74
- });
31
+ return undefined;
75
32
  }