@aws-sdk/client-braket 3.476.0 → 3.477.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,56 +1,42 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SearchQuantumTasksCommand = exports.de_SearchJobsCommand = exports.de_SearchDevicesCommand = exports.de_ListTagsForResourceCommand = exports.de_GetQuantumTaskCommand = exports.de_GetJobCommand = exports.de_GetDeviceCommand = exports.de_CreateQuantumTaskCommand = exports.de_CreateJobCommand = exports.de_CancelQuantumTaskCommand = exports.de_CancelJobCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SearchQuantumTasksCommand = exports.se_SearchJobsCommand = exports.se_SearchDevicesCommand = exports.se_ListTagsForResourceCommand = exports.se_GetQuantumTaskCommand = exports.se_GetJobCommand = exports.se_GetDeviceCommand = exports.se_CreateQuantumTaskCommand = exports.se_CreateJobCommand = exports.se_CancelQuantumTaskCommand = exports.se_CancelJobCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const uuid_1 = require("uuid");
7
7
  const BraketServiceException_1 = require("../models/BraketServiceException");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const se_CancelJobCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
11
11
  const headers = {};
12
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job/{jobArn}/cancel";
13
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobArn", () => input.jobArn, "{jobArn}", false);
12
+ b.bp("/job/{jobArn}/cancel");
13
+ b.p("jobArn", () => input.jobArn, "{jobArn}", false);
14
14
  let body;
15
- return new protocol_http_1.HttpRequest({
16
- protocol,
17
- hostname,
18
- port,
19
- method: "PUT",
20
- headers,
21
- path: resolvedPath,
22
- body,
23
- });
15
+ b.m("PUT").h(headers).b(body);
16
+ return b.build();
24
17
  };
25
18
  exports.se_CancelJobCommand = se_CancelJobCommand;
26
19
  const se_CancelQuantumTaskCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = (0, core_1.requestBuilder)(input, context);
28
21
  const headers = {
29
22
  "content-type": "application/json",
30
23
  };
31
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task/{quantumTaskArn}/cancel";
32
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
24
+ b.bp("/quantum-task/{quantumTaskArn}/cancel");
25
+ b.p("quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
33
26
  let body;
34
27
  body = JSON.stringify((0, smithy_client_1.take)(input, {
35
28
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
36
29
  }));
37
- return new protocol_http_1.HttpRequest({
38
- protocol,
39
- hostname,
40
- port,
41
- method: "PUT",
42
- headers,
43
- path: resolvedPath,
44
- body,
45
- });
30
+ b.m("PUT").h(headers).b(body);
31
+ return b.build();
46
32
  };
47
33
  exports.se_CancelQuantumTaskCommand = se_CancelQuantumTaskCommand;
48
34
  const se_CreateJobCommand = async (input, context) => {
49
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
35
+ const b = (0, core_1.requestBuilder)(input, context);
50
36
  const headers = {
51
37
  "content-type": "application/json",
52
38
  };
53
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job";
39
+ b.bp("/job");
54
40
  let body;
55
41
  body = JSON.stringify((0, smithy_client_1.take)(input, {
56
42
  algorithmSpecification: (_) => (0, smithy_client_1._json)(_),
@@ -67,23 +53,16 @@ const se_CreateJobCommand = async (input, context) => {
67
53
  stoppingCondition: (_) => (0, smithy_client_1._json)(_),
68
54
  tags: (_) => (0, smithy_client_1._json)(_),
69
55
  }));
70
- return new protocol_http_1.HttpRequest({
71
- protocol,
72
- hostname,
73
- port,
74
- method: "POST",
75
- headers,
76
- path: resolvedPath,
77
- body,
78
- });
56
+ b.m("POST").h(headers).b(body);
57
+ return b.build();
79
58
  };
80
59
  exports.se_CreateJobCommand = se_CreateJobCommand;
81
60
  const se_CreateQuantumTaskCommand = async (input, context) => {
82
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
61
+ const b = (0, core_1.requestBuilder)(input, context);
83
62
  const headers = {
84
63
  "content-type": "application/json",
85
64
  };
86
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task";
65
+ b.bp("/quantum-task");
87
66
  let body;
88
67
  body = JSON.stringify((0, smithy_client_1.take)(input, {
89
68
  action: (_) => smithy_client_1.LazyJsonString.fromObject(_),
@@ -97,212 +76,139 @@ const se_CreateQuantumTaskCommand = async (input, context) => {
97
76
  shots: [],
98
77
  tags: (_) => (0, smithy_client_1._json)(_),
99
78
  }));
100
- return new protocol_http_1.HttpRequest({
101
- protocol,
102
- hostname,
103
- port,
104
- method: "POST",
105
- headers,
106
- path: resolvedPath,
107
- body,
108
- });
79
+ b.m("POST").h(headers).b(body);
80
+ return b.build();
109
81
  };
110
82
  exports.se_CreateQuantumTaskCommand = se_CreateQuantumTaskCommand;
111
83
  const se_GetDeviceCommand = async (input, context) => {
112
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
+ const b = (0, core_1.requestBuilder)(input, context);
113
85
  const headers = {};
114
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/device/{deviceArn}";
115
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "deviceArn", () => input.deviceArn, "{deviceArn}", false);
86
+ b.bp("/device/{deviceArn}");
87
+ b.p("deviceArn", () => input.deviceArn, "{deviceArn}", false);
116
88
  let body;
117
- return new protocol_http_1.HttpRequest({
118
- protocol,
119
- hostname,
120
- port,
121
- method: "GET",
122
- headers,
123
- path: resolvedPath,
124
- body,
125
- });
89
+ b.m("GET").h(headers).b(body);
90
+ return b.build();
126
91
  };
127
92
  exports.se_GetDeviceCommand = se_GetDeviceCommand;
128
93
  const se_GetJobCommand = async (input, context) => {
129
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
94
+ const b = (0, core_1.requestBuilder)(input, context);
130
95
  const headers = {};
131
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job/{jobArn}";
132
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobArn", () => input.jobArn, "{jobArn}", false);
96
+ b.bp("/job/{jobArn}");
97
+ b.p("jobArn", () => input.jobArn, "{jobArn}", false);
133
98
  const query = (0, smithy_client_1.map)({
134
- additionalAttributeNames: [
99
+ [_aAN]: [
135
100
  () => input.additionalAttributeNames !== void 0,
136
- () => (input.additionalAttributeNames || []).map((_entry) => _entry),
101
+ () => (input[_aAN] || []).map((_entry) => _entry),
137
102
  ],
138
103
  });
139
104
  let body;
140
- return new protocol_http_1.HttpRequest({
141
- protocol,
142
- hostname,
143
- port,
144
- method: "GET",
145
- headers,
146
- path: resolvedPath,
147
- query,
148
- body,
149
- });
105
+ b.m("GET").h(headers).q(query).b(body);
106
+ return b.build();
150
107
  };
151
108
  exports.se_GetJobCommand = se_GetJobCommand;
152
109
  const se_GetQuantumTaskCommand = async (input, context) => {
153
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
110
+ const b = (0, core_1.requestBuilder)(input, context);
154
111
  const headers = {};
155
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task/{quantumTaskArn}";
156
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
112
+ b.bp("/quantum-task/{quantumTaskArn}");
113
+ b.p("quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
157
114
  const query = (0, smithy_client_1.map)({
158
- additionalAttributeNames: [
115
+ [_aAN]: [
159
116
  () => input.additionalAttributeNames !== void 0,
160
- () => (input.additionalAttributeNames || []).map((_entry) => _entry),
117
+ () => (input[_aAN] || []).map((_entry) => _entry),
161
118
  ],
162
119
  });
163
120
  let body;
164
- return new protocol_http_1.HttpRequest({
165
- protocol,
166
- hostname,
167
- port,
168
- method: "GET",
169
- headers,
170
- path: resolvedPath,
171
- query,
172
- body,
173
- });
121
+ b.m("GET").h(headers).q(query).b(body);
122
+ return b.build();
174
123
  };
175
124
  exports.se_GetQuantumTaskCommand = se_GetQuantumTaskCommand;
176
125
  const se_ListTagsForResourceCommand = async (input, context) => {
177
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
126
+ const b = (0, core_1.requestBuilder)(input, context);
178
127
  const headers = {};
179
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
180
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
128
+ b.bp("/tags/{resourceArn}");
129
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
181
130
  let body;
182
- return new protocol_http_1.HttpRequest({
183
- protocol,
184
- hostname,
185
- port,
186
- method: "GET",
187
- headers,
188
- path: resolvedPath,
189
- body,
190
- });
131
+ b.m("GET").h(headers).b(body);
132
+ return b.build();
191
133
  };
192
134
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
193
135
  const se_SearchDevicesCommand = async (input, context) => {
194
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
136
+ const b = (0, core_1.requestBuilder)(input, context);
195
137
  const headers = {
196
138
  "content-type": "application/json",
197
139
  };
198
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices";
140
+ b.bp("/devices");
199
141
  let body;
200
142
  body = JSON.stringify((0, smithy_client_1.take)(input, {
201
143
  filters: (_) => (0, smithy_client_1._json)(_),
202
144
  maxResults: [],
203
145
  nextToken: [],
204
146
  }));
205
- return new protocol_http_1.HttpRequest({
206
- protocol,
207
- hostname,
208
- port,
209
- method: "POST",
210
- headers,
211
- path: resolvedPath,
212
- body,
213
- });
147
+ b.m("POST").h(headers).b(body);
148
+ return b.build();
214
149
  };
215
150
  exports.se_SearchDevicesCommand = se_SearchDevicesCommand;
216
151
  const se_SearchJobsCommand = async (input, context) => {
217
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = (0, core_1.requestBuilder)(input, context);
218
153
  const headers = {
219
154
  "content-type": "application/json",
220
155
  };
221
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs";
156
+ b.bp("/jobs");
222
157
  let body;
223
158
  body = JSON.stringify((0, smithy_client_1.take)(input, {
224
159
  filters: (_) => (0, smithy_client_1._json)(_),
225
160
  maxResults: [],
226
161
  nextToken: [],
227
162
  }));
228
- return new protocol_http_1.HttpRequest({
229
- protocol,
230
- hostname,
231
- port,
232
- method: "POST",
233
- headers,
234
- path: resolvedPath,
235
- body,
236
- });
163
+ b.m("POST").h(headers).b(body);
164
+ return b.build();
237
165
  };
238
166
  exports.se_SearchJobsCommand = se_SearchJobsCommand;
239
167
  const se_SearchQuantumTasksCommand = async (input, context) => {
240
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
+ const b = (0, core_1.requestBuilder)(input, context);
241
169
  const headers = {
242
170
  "content-type": "application/json",
243
171
  };
244
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-tasks";
172
+ b.bp("/quantum-tasks");
245
173
  let body;
246
174
  body = JSON.stringify((0, smithy_client_1.take)(input, {
247
175
  filters: (_) => (0, smithy_client_1._json)(_),
248
176
  maxResults: [],
249
177
  nextToken: [],
250
178
  }));
251
- return new protocol_http_1.HttpRequest({
252
- protocol,
253
- hostname,
254
- port,
255
- method: "POST",
256
- headers,
257
- path: resolvedPath,
258
- body,
259
- });
179
+ b.m("POST").h(headers).b(body);
180
+ return b.build();
260
181
  };
261
182
  exports.se_SearchQuantumTasksCommand = se_SearchQuantumTasksCommand;
262
183
  const se_TagResourceCommand = async (input, context) => {
263
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
184
+ const b = (0, core_1.requestBuilder)(input, context);
264
185
  const headers = {
265
186
  "content-type": "application/json",
266
187
  };
267
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
268
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
188
+ b.bp("/tags/{resourceArn}");
189
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
269
190
  let body;
270
191
  body = JSON.stringify((0, smithy_client_1.take)(input, {
271
192
  tags: (_) => (0, smithy_client_1._json)(_),
272
193
  }));
273
- return new protocol_http_1.HttpRequest({
274
- protocol,
275
- hostname,
276
- port,
277
- method: "POST",
278
- headers,
279
- path: resolvedPath,
280
- body,
281
- });
194
+ b.m("POST").h(headers).b(body);
195
+ return b.build();
282
196
  };
283
197
  exports.se_TagResourceCommand = se_TagResourceCommand;
284
198
  const se_UntagResourceCommand = async (input, context) => {
285
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
199
+ const b = (0, core_1.requestBuilder)(input, context);
286
200
  const headers = {};
287
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
288
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
201
+ b.bp("/tags/{resourceArn}");
202
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
289
203
  const query = (0, smithy_client_1.map)({
290
- tagKeys: [
204
+ [_tK]: [
291
205
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
292
- () => (input.tagKeys || []).map((_entry) => _entry),
206
+ () => (input[_tK] || []).map((_entry) => _entry),
293
207
  ],
294
208
  });
295
209
  let body;
296
- return new protocol_http_1.HttpRequest({
297
- protocol,
298
- hostname,
299
- port,
300
- method: "DELETE",
301
- headers,
302
- path: resolvedPath,
303
- query,
304
- body,
305
- });
210
+ b.m("DELETE").h(headers).q(query).b(body);
211
+ return b.build();
306
212
  };
307
213
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
308
214
  const de_CancelJobCommand = async (output, context) => {
@@ -1116,6 +1022,8 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1116
1022
  value !== "" &&
1117
1023
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1118
1024
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1025
+ const _aAN = "additionalAttributeNames";
1026
+ const _tK = "tagKeys";
1119
1027
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1120
1028
  if (encoded.length) {
1121
1029
  return JSON.parse(encoded);
@@ -1,51 +1,37 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { BraketServiceException as __BaseException } from "../models/BraketServiceException";
5
5
  import { AccessDeniedException, ConflictException, DeviceOfflineException, DeviceRetiredException, InternalServiceException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export const se_CancelJobCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {};
9
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job/{jobArn}/cancel";
10
- resolvedPath = __resolvedPath(resolvedPath, input, "jobArn", () => input.jobArn, "{jobArn}", false);
9
+ b.bp("/job/{jobArn}/cancel");
10
+ b.p("jobArn", () => input.jobArn, "{jobArn}", false);
11
11
  let body;
12
- return new __HttpRequest({
13
- protocol,
14
- hostname,
15
- port,
16
- method: "PUT",
17
- headers,
18
- path: resolvedPath,
19
- body,
20
- });
12
+ b.m("PUT").h(headers).b(body);
13
+ return b.build();
21
14
  };
22
15
  export const se_CancelQuantumTaskCommand = async (input, context) => {
23
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
16
+ const b = rb(input, context);
24
17
  const headers = {
25
18
  "content-type": "application/json",
26
19
  };
27
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task/{quantumTaskArn}/cancel";
28
- resolvedPath = __resolvedPath(resolvedPath, input, "quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
20
+ b.bp("/quantum-task/{quantumTaskArn}/cancel");
21
+ b.p("quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
29
22
  let body;
30
23
  body = JSON.stringify(take(input, {
31
24
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
32
25
  }));
33
- return new __HttpRequest({
34
- protocol,
35
- hostname,
36
- port,
37
- method: "PUT",
38
- headers,
39
- path: resolvedPath,
40
- body,
41
- });
26
+ b.m("PUT").h(headers).b(body);
27
+ return b.build();
42
28
  };
43
29
  export const se_CreateJobCommand = async (input, context) => {
44
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
30
+ const b = rb(input, context);
45
31
  const headers = {
46
32
  "content-type": "application/json",
47
33
  };
48
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job";
34
+ b.bp("/job");
49
35
  let body;
50
36
  body = JSON.stringify(take(input, {
51
37
  algorithmSpecification: (_) => _json(_),
@@ -62,22 +48,15 @@ export const se_CreateJobCommand = async (input, context) => {
62
48
  stoppingCondition: (_) => _json(_),
63
49
  tags: (_) => _json(_),
64
50
  }));
65
- return new __HttpRequest({
66
- protocol,
67
- hostname,
68
- port,
69
- method: "POST",
70
- headers,
71
- path: resolvedPath,
72
- body,
73
- });
51
+ b.m("POST").h(headers).b(body);
52
+ return b.build();
74
53
  };
75
54
  export const se_CreateQuantumTaskCommand = async (input, context) => {
76
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
55
+ const b = rb(input, context);
77
56
  const headers = {
78
57
  "content-type": "application/json",
79
58
  };
80
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task";
59
+ b.bp("/quantum-task");
81
60
  let body;
82
61
  body = JSON.stringify(take(input, {
83
62
  action: (_) => __LazyJsonString.fromObject(_),
@@ -91,203 +70,130 @@ export const se_CreateQuantumTaskCommand = async (input, context) => {
91
70
  shots: [],
92
71
  tags: (_) => _json(_),
93
72
  }));
94
- return new __HttpRequest({
95
- protocol,
96
- hostname,
97
- port,
98
- method: "POST",
99
- headers,
100
- path: resolvedPath,
101
- body,
102
- });
73
+ b.m("POST").h(headers).b(body);
74
+ return b.build();
103
75
  };
104
76
  export const se_GetDeviceCommand = async (input, context) => {
105
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
+ const b = rb(input, context);
106
78
  const headers = {};
107
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/device/{deviceArn}";
108
- resolvedPath = __resolvedPath(resolvedPath, input, "deviceArn", () => input.deviceArn, "{deviceArn}", false);
79
+ b.bp("/device/{deviceArn}");
80
+ b.p("deviceArn", () => input.deviceArn, "{deviceArn}", false);
109
81
  let body;
110
- return new __HttpRequest({
111
- protocol,
112
- hostname,
113
- port,
114
- method: "GET",
115
- headers,
116
- path: resolvedPath,
117
- body,
118
- });
82
+ b.m("GET").h(headers).b(body);
83
+ return b.build();
119
84
  };
120
85
  export const se_GetJobCommand = async (input, context) => {
121
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
86
+ const b = rb(input, context);
122
87
  const headers = {};
123
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job/{jobArn}";
124
- resolvedPath = __resolvedPath(resolvedPath, input, "jobArn", () => input.jobArn, "{jobArn}", false);
88
+ b.bp("/job/{jobArn}");
89
+ b.p("jobArn", () => input.jobArn, "{jobArn}", false);
125
90
  const query = map({
126
- additionalAttributeNames: [
91
+ [_aAN]: [
127
92
  () => input.additionalAttributeNames !== void 0,
128
- () => (input.additionalAttributeNames || []).map((_entry) => _entry),
93
+ () => (input[_aAN] || []).map((_entry) => _entry),
129
94
  ],
130
95
  });
131
96
  let body;
132
- return new __HttpRequest({
133
- protocol,
134
- hostname,
135
- port,
136
- method: "GET",
137
- headers,
138
- path: resolvedPath,
139
- query,
140
- body,
141
- });
97
+ b.m("GET").h(headers).q(query).b(body);
98
+ return b.build();
142
99
  };
143
100
  export const se_GetQuantumTaskCommand = async (input, context) => {
144
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
101
+ const b = rb(input, context);
145
102
  const headers = {};
146
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task/{quantumTaskArn}";
147
- resolvedPath = __resolvedPath(resolvedPath, input, "quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
103
+ b.bp("/quantum-task/{quantumTaskArn}");
104
+ b.p("quantumTaskArn", () => input.quantumTaskArn, "{quantumTaskArn}", false);
148
105
  const query = map({
149
- additionalAttributeNames: [
106
+ [_aAN]: [
150
107
  () => input.additionalAttributeNames !== void 0,
151
- () => (input.additionalAttributeNames || []).map((_entry) => _entry),
108
+ () => (input[_aAN] || []).map((_entry) => _entry),
152
109
  ],
153
110
  });
154
111
  let body;
155
- return new __HttpRequest({
156
- protocol,
157
- hostname,
158
- port,
159
- method: "GET",
160
- headers,
161
- path: resolvedPath,
162
- query,
163
- body,
164
- });
112
+ b.m("GET").h(headers).q(query).b(body);
113
+ return b.build();
165
114
  };
166
115
  export const se_ListTagsForResourceCommand = async (input, context) => {
167
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = rb(input, context);
168
117
  const headers = {};
169
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
170
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
118
+ b.bp("/tags/{resourceArn}");
119
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
171
120
  let body;
172
- return new __HttpRequest({
173
- protocol,
174
- hostname,
175
- port,
176
- method: "GET",
177
- headers,
178
- path: resolvedPath,
179
- body,
180
- });
121
+ b.m("GET").h(headers).b(body);
122
+ return b.build();
181
123
  };
182
124
  export const se_SearchDevicesCommand = async (input, context) => {
183
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
+ const b = rb(input, context);
184
126
  const headers = {
185
127
  "content-type": "application/json",
186
128
  };
187
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices";
129
+ b.bp("/devices");
188
130
  let body;
189
131
  body = JSON.stringify(take(input, {
190
132
  filters: (_) => _json(_),
191
133
  maxResults: [],
192
134
  nextToken: [],
193
135
  }));
194
- return new __HttpRequest({
195
- protocol,
196
- hostname,
197
- port,
198
- method: "POST",
199
- headers,
200
- path: resolvedPath,
201
- body,
202
- });
136
+ b.m("POST").h(headers).b(body);
137
+ return b.build();
203
138
  };
204
139
  export const se_SearchJobsCommand = async (input, context) => {
205
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
140
+ const b = rb(input, context);
206
141
  const headers = {
207
142
  "content-type": "application/json",
208
143
  };
209
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs";
144
+ b.bp("/jobs");
210
145
  let body;
211
146
  body = JSON.stringify(take(input, {
212
147
  filters: (_) => _json(_),
213
148
  maxResults: [],
214
149
  nextToken: [],
215
150
  }));
216
- return new __HttpRequest({
217
- protocol,
218
- hostname,
219
- port,
220
- method: "POST",
221
- headers,
222
- path: resolvedPath,
223
- body,
224
- });
151
+ b.m("POST").h(headers).b(body);
152
+ return b.build();
225
153
  };
226
154
  export const se_SearchQuantumTasksCommand = async (input, context) => {
227
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
155
+ const b = rb(input, context);
228
156
  const headers = {
229
157
  "content-type": "application/json",
230
158
  };
231
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-tasks";
159
+ b.bp("/quantum-tasks");
232
160
  let body;
233
161
  body = JSON.stringify(take(input, {
234
162
  filters: (_) => _json(_),
235
163
  maxResults: [],
236
164
  nextToken: [],
237
165
  }));
238
- return new __HttpRequest({
239
- protocol,
240
- hostname,
241
- port,
242
- method: "POST",
243
- headers,
244
- path: resolvedPath,
245
- body,
246
- });
166
+ b.m("POST").h(headers).b(body);
167
+ return b.build();
247
168
  };
248
169
  export const se_TagResourceCommand = async (input, context) => {
249
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
170
+ const b = rb(input, context);
250
171
  const headers = {
251
172
  "content-type": "application/json",
252
173
  };
253
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
254
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
174
+ b.bp("/tags/{resourceArn}");
175
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
255
176
  let body;
256
177
  body = JSON.stringify(take(input, {
257
178
  tags: (_) => _json(_),
258
179
  }));
259
- return new __HttpRequest({
260
- protocol,
261
- hostname,
262
- port,
263
- method: "POST",
264
- headers,
265
- path: resolvedPath,
266
- body,
267
- });
180
+ b.m("POST").h(headers).b(body);
181
+ return b.build();
268
182
  };
269
183
  export const se_UntagResourceCommand = async (input, context) => {
270
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
184
+ const b = rb(input, context);
271
185
  const headers = {};
272
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
273
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
186
+ b.bp("/tags/{resourceArn}");
187
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
274
188
  const query = map({
275
- tagKeys: [
189
+ [_tK]: [
276
190
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
277
- () => (input.tagKeys || []).map((_entry) => _entry),
191
+ () => (input[_tK] || []).map((_entry) => _entry),
278
192
  ],
279
193
  });
280
194
  let body;
281
- return new __HttpRequest({
282
- protocol,
283
- hostname,
284
- port,
285
- method: "DELETE",
286
- headers,
287
- path: resolvedPath,
288
- query,
289
- body,
290
- });
195
+ b.m("DELETE").h(headers).q(query).b(body);
196
+ return b.build();
291
197
  };
292
198
  export const de_CancelJobCommand = async (output, context) => {
293
199
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1087,6 +993,8 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1087
993
  value !== "" &&
1088
994
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1089
995
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
996
+ const _aAN = "additionalAttributeNames";
997
+ const _tK = "tagKeys";
1090
998
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1091
999
  if (encoded.length) {
1092
1000
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-braket",
3
3
  "description": "AWS SDK for JavaScript Braket Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.477.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",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",