@aws-sdk/client-bedrock 3.927.0 → 3.929.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 (121) hide show
  1. package/dist-cjs/index.js +6331 -6098
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/BedrockClient.js +2 -0
  4. package/dist-es/commands/BatchDeleteEvaluationJobCommand.js +3 -10
  5. package/dist-es/commands/CancelAutomatedReasoningPolicyBuildWorkflowCommand.js +3 -9
  6. package/dist-es/commands/CreateAutomatedReasoningPolicyCommand.js +3 -10
  7. package/dist-es/commands/CreateAutomatedReasoningPolicyTestCaseCommand.js +3 -10
  8. package/dist-es/commands/CreateAutomatedReasoningPolicyVersionCommand.js +3 -10
  9. package/dist-es/commands/CreateCustomModelCommand.js +3 -9
  10. package/dist-es/commands/CreateCustomModelDeploymentCommand.js +3 -9
  11. package/dist-es/commands/CreateEvaluationJobCommand.js +3 -10
  12. package/dist-es/commands/CreateFoundationModelAgreementCommand.js +3 -9
  13. package/dist-es/commands/CreateGuardrailCommand.js +3 -10
  14. package/dist-es/commands/CreateGuardrailVersionCommand.js +3 -10
  15. package/dist-es/commands/CreateInferenceProfileCommand.js +3 -10
  16. package/dist-es/commands/CreateMarketplaceModelEndpointCommand.js +3 -9
  17. package/dist-es/commands/CreateModelCopyJobCommand.js +3 -9
  18. package/dist-es/commands/CreateModelCustomizationJobCommand.js +3 -10
  19. package/dist-es/commands/CreateModelImportJobCommand.js +3 -9
  20. package/dist-es/commands/CreateModelInvocationJobCommand.js +3 -9
  21. package/dist-es/commands/CreatePromptRouterCommand.js +3 -10
  22. package/dist-es/commands/CreateProvisionedModelThroughputCommand.js +3 -9
  23. package/dist-es/commands/DeleteAutomatedReasoningPolicyBuildWorkflowCommand.js +3 -9
  24. package/dist-es/commands/DeleteAutomatedReasoningPolicyCommand.js +3 -9
  25. package/dist-es/commands/DeleteAutomatedReasoningPolicyTestCaseCommand.js +3 -9
  26. package/dist-es/commands/DeleteCustomModelCommand.js +3 -9
  27. package/dist-es/commands/DeleteCustomModelDeploymentCommand.js +3 -9
  28. package/dist-es/commands/DeleteFoundationModelAgreementCommand.js +3 -9
  29. package/dist-es/commands/DeleteGuardrailCommand.js +3 -9
  30. package/dist-es/commands/DeleteImportedModelCommand.js +3 -9
  31. package/dist-es/commands/DeleteInferenceProfileCommand.js +3 -9
  32. package/dist-es/commands/DeleteMarketplaceModelEndpointCommand.js +3 -9
  33. package/dist-es/commands/DeleteModelInvocationLoggingConfigurationCommand.js +3 -9
  34. package/dist-es/commands/DeletePromptRouterCommand.js +3 -9
  35. package/dist-es/commands/DeleteProvisionedModelThroughputCommand.js +3 -9
  36. package/dist-es/commands/DeregisterMarketplaceModelEndpointCommand.js +3 -9
  37. package/dist-es/commands/ExportAutomatedReasoningPolicyVersionCommand.js +3 -10
  38. package/dist-es/commands/GetAutomatedReasoningPolicyAnnotationsCommand.js +3 -10
  39. package/dist-es/commands/GetAutomatedReasoningPolicyBuildWorkflowCommand.js +3 -10
  40. package/dist-es/commands/GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand.js +3 -10
  41. package/dist-es/commands/GetAutomatedReasoningPolicyCommand.js +3 -10
  42. package/dist-es/commands/GetAutomatedReasoningPolicyNextScenarioCommand.js +3 -10
  43. package/dist-es/commands/GetAutomatedReasoningPolicyTestCaseCommand.js +3 -10
  44. package/dist-es/commands/GetAutomatedReasoningPolicyTestResultCommand.js +3 -10
  45. package/dist-es/commands/GetCustomModelCommand.js +3 -10
  46. package/dist-es/commands/GetCustomModelDeploymentCommand.js +3 -9
  47. package/dist-es/commands/GetEvaluationJobCommand.js +3 -11
  48. package/dist-es/commands/GetFoundationModelAvailabilityCommand.js +3 -9
  49. package/dist-es/commands/GetFoundationModelCommand.js +3 -9
  50. package/dist-es/commands/GetGuardrailCommand.js +3 -10
  51. package/dist-es/commands/GetImportedModelCommand.js +3 -9
  52. package/dist-es/commands/GetInferenceProfileCommand.js +3 -10
  53. package/dist-es/commands/GetMarketplaceModelEndpointCommand.js +3 -9
  54. package/dist-es/commands/GetModelCopyJobCommand.js +3 -9
  55. package/dist-es/commands/GetModelCustomizationJobCommand.js +3 -10
  56. package/dist-es/commands/GetModelImportJobCommand.js +3 -9
  57. package/dist-es/commands/GetModelInvocationJobCommand.js +3 -10
  58. package/dist-es/commands/GetModelInvocationLoggingConfigurationCommand.js +3 -9
  59. package/dist-es/commands/GetPromptRouterCommand.js +3 -10
  60. package/dist-es/commands/GetProvisionedModelThroughputCommand.js +3 -9
  61. package/dist-es/commands/GetUseCaseForModelAccessCommand.js +3 -9
  62. package/dist-es/commands/ListAutomatedReasoningPoliciesCommand.js +3 -10
  63. package/dist-es/commands/ListAutomatedReasoningPolicyBuildWorkflowsCommand.js +3 -9
  64. package/dist-es/commands/ListAutomatedReasoningPolicyTestCasesCommand.js +3 -10
  65. package/dist-es/commands/ListAutomatedReasoningPolicyTestResultsCommand.js +3 -10
  66. package/dist-es/commands/ListCustomModelDeploymentsCommand.js +3 -9
  67. package/dist-es/commands/ListCustomModelsCommand.js +3 -9
  68. package/dist-es/commands/ListEvaluationJobsCommand.js +3 -9
  69. package/dist-es/commands/ListFoundationModelAgreementOffersCommand.js +3 -9
  70. package/dist-es/commands/ListFoundationModelsCommand.js +3 -9
  71. package/dist-es/commands/ListGuardrailsCommand.js +3 -10
  72. package/dist-es/commands/ListImportedModelsCommand.js +3 -9
  73. package/dist-es/commands/ListInferenceProfilesCommand.js +3 -10
  74. package/dist-es/commands/ListMarketplaceModelEndpointsCommand.js +3 -9
  75. package/dist-es/commands/ListModelCopyJobsCommand.js +3 -9
  76. package/dist-es/commands/ListModelCustomizationJobsCommand.js +3 -9
  77. package/dist-es/commands/ListModelImportJobsCommand.js +3 -9
  78. package/dist-es/commands/ListModelInvocationJobsCommand.js +3 -10
  79. package/dist-es/commands/ListPromptRoutersCommand.js +3 -10
  80. package/dist-es/commands/ListProvisionedModelThroughputsCommand.js +3 -9
  81. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  82. package/dist-es/commands/PutModelInvocationLoggingConfigurationCommand.js +3 -9
  83. package/dist-es/commands/PutUseCaseForModelAccessCommand.js +3 -9
  84. package/dist-es/commands/RegisterMarketplaceModelEndpointCommand.js +3 -9
  85. package/dist-es/commands/StartAutomatedReasoningPolicyBuildWorkflowCommand.js +3 -10
  86. package/dist-es/commands/StartAutomatedReasoningPolicyTestWorkflowCommand.js +3 -9
  87. package/dist-es/commands/StopEvaluationJobCommand.js +3 -10
  88. package/dist-es/commands/StopModelCustomizationJobCommand.js +3 -9
  89. package/dist-es/commands/StopModelInvocationJobCommand.js +3 -9
  90. package/dist-es/commands/TagResourceCommand.js +3 -9
  91. package/dist-es/commands/UntagResourceCommand.js +3 -9
  92. package/dist-es/commands/UpdateAutomatedReasoningPolicyAnnotationsCommand.js +3 -10
  93. package/dist-es/commands/UpdateAutomatedReasoningPolicyCommand.js +3 -10
  94. package/dist-es/commands/UpdateAutomatedReasoningPolicyTestCaseCommand.js +3 -10
  95. package/dist-es/commands/UpdateGuardrailCommand.js +3 -10
  96. package/dist-es/commands/UpdateMarketplaceModelEndpointCommand.js +3 -9
  97. package/dist-es/commands/UpdateProvisionedModelThroughputCommand.js +3 -9
  98. package/dist-es/models/models_0.js +0 -775
  99. package/dist-es/models/models_1.js +0 -314
  100. package/dist-es/runtimeConfig.shared.js +2 -0
  101. package/dist-es/schemas/schemas_0.js +6150 -0
  102. package/dist-types/BedrockClient.d.ts +10 -1
  103. package/dist-types/models/models_0.d.ts +0 -488
  104. package/dist-types/models/models_1.d.ts +0 -176
  105. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  106. package/dist-types/runtimeConfig.d.ts +1 -0
  107. package/dist-types/runtimeConfig.native.d.ts +1 -0
  108. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  109. package/dist-types/schemas/schemas_0.d.ts +668 -0
  110. package/dist-types/ts3.4/BedrockClient.d.ts +4 -0
  111. package/dist-types/ts3.4/models/models_0.d.ts +0 -366
  112. package/dist-types/ts3.4/models/models_1.d.ts +0 -130
  113. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  114. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  115. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  116. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  117. package/dist-types/ts3.4/schemas/schemas_0.d.ts +675 -0
  118. package/package.json +6 -7
  119. package/dist-es/protocols/Aws_restJson1.js +0 -4177
  120. package/dist-types/protocols/Aws_restJson1.d.ts +0 -848
  121. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -1133
@@ -1,4177 +0,0 @@
1
- import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeDateTime as __serializeDateTime, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { BedrockServiceException as __BaseException } from "../models/BedrockServiceException";
6
- import { AccessDeniedException, AutomatedEvaluationCustomMetricSource, AutomatedReasoningPolicyWorkflowTypeContent, ConflictException, EvaluationConfig, InternalServerException, RatingScaleItemValue, ResourceInUseException, ResourceNotFoundException, ServiceQuotaExceededException, ServiceUnavailableException, ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0";
7
- import { EvaluationInferenceConfig, KnowledgeBaseConfig, RAGConfig, RetrievalFilter, } from "../models/models_1";
8
- export const se_BatchDeleteEvaluationJobCommand = async (input, context) => {
9
- const b = rb(input, context);
10
- const headers = {
11
- "content-type": "application/json",
12
- };
13
- b.bp("/evaluation-jobs/batch-delete");
14
- let body;
15
- body = JSON.stringify(take(input, {
16
- jobIdentifiers: (_) => _json(_),
17
- }));
18
- b.m("POST").h(headers).b(body);
19
- return b.build();
20
- };
21
- export const se_CancelAutomatedReasoningPolicyBuildWorkflowCommand = async (input, context) => {
22
- const b = rb(input, context);
23
- const headers = {};
24
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/cancel");
25
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
26
- b.p("buildWorkflowId", () => input.buildWorkflowId, "{buildWorkflowId}", false);
27
- let body;
28
- b.m("POST").h(headers).b(body);
29
- return b.build();
30
- };
31
- export const se_CreateAutomatedReasoningPolicyCommand = async (input, context) => {
32
- const b = rb(input, context);
33
- const headers = {
34
- "content-type": "application/json",
35
- };
36
- b.bp("/automated-reasoning-policies");
37
- let body;
38
- body = JSON.stringify(take(input, {
39
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
40
- description: [],
41
- kmsKeyId: [],
42
- name: [],
43
- policyDefinition: (_) => _json(_),
44
- tags: (_) => _json(_),
45
- }));
46
- b.m("POST").h(headers).b(body);
47
- return b.build();
48
- };
49
- export const se_CreateAutomatedReasoningPolicyTestCaseCommand = async (input, context) => {
50
- const b = rb(input, context);
51
- const headers = {
52
- "content-type": "application/json",
53
- };
54
- b.bp("/automated-reasoning-policies/{policyArn}/test-cases");
55
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
56
- let body;
57
- body = JSON.stringify(take(input, {
58
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
59
- confidenceThreshold: (_) => __serializeFloat(_),
60
- expectedAggregatedFindingsResult: [],
61
- guardContent: [],
62
- queryContent: [],
63
- }));
64
- b.m("POST").h(headers).b(body);
65
- return b.build();
66
- };
67
- export const se_CreateAutomatedReasoningPolicyVersionCommand = async (input, context) => {
68
- const b = rb(input, context);
69
- const headers = {
70
- "content-type": "application/json",
71
- };
72
- b.bp("/automated-reasoning-policies/{policyArn}/versions");
73
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
74
- let body;
75
- body = JSON.stringify(take(input, {
76
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
77
- lastUpdatedDefinitionHash: [],
78
- tags: (_) => _json(_),
79
- }));
80
- b.m("POST").h(headers).b(body);
81
- return b.build();
82
- };
83
- export const se_CreateCustomModelCommand = async (input, context) => {
84
- const b = rb(input, context);
85
- const headers = {
86
- "content-type": "application/json",
87
- };
88
- b.bp("/custom-models/create-custom-model");
89
- let body;
90
- body = JSON.stringify(take(input, {
91
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
92
- modelKmsKeyArn: [],
93
- modelName: [],
94
- modelSourceConfig: (_) => _json(_),
95
- modelTags: (_) => _json(_),
96
- roleArn: [],
97
- }));
98
- b.m("POST").h(headers).b(body);
99
- return b.build();
100
- };
101
- export const se_CreateCustomModelDeploymentCommand = async (input, context) => {
102
- const b = rb(input, context);
103
- const headers = {
104
- "content-type": "application/json",
105
- };
106
- b.bp("/model-customization/custom-model-deployments");
107
- let body;
108
- body = JSON.stringify(take(input, {
109
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
110
- description: [],
111
- modelArn: [],
112
- modelDeploymentName: [],
113
- tags: (_) => _json(_),
114
- }));
115
- b.m("POST").h(headers).b(body);
116
- return b.build();
117
- };
118
- export const se_CreateEvaluationJobCommand = async (input, context) => {
119
- const b = rb(input, context);
120
- const headers = {
121
- "content-type": "application/json",
122
- };
123
- b.bp("/evaluation-jobs");
124
- let body;
125
- body = JSON.stringify(take(input, {
126
- applicationType: [],
127
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
128
- customerEncryptionKeyId: [],
129
- evaluationConfig: (_) => se_EvaluationConfig(_, context),
130
- inferenceConfig: (_) => se_EvaluationInferenceConfig(_, context),
131
- jobDescription: [],
132
- jobName: [],
133
- jobTags: (_) => _json(_),
134
- outputDataConfig: (_) => _json(_),
135
- roleArn: [],
136
- }));
137
- b.m("POST").h(headers).b(body);
138
- return b.build();
139
- };
140
- export const se_CreateFoundationModelAgreementCommand = async (input, context) => {
141
- const b = rb(input, context);
142
- const headers = {
143
- "content-type": "application/json",
144
- };
145
- b.bp("/create-foundation-model-agreement");
146
- let body;
147
- body = JSON.stringify(take(input, {
148
- modelId: [],
149
- offerToken: [],
150
- }));
151
- b.m("POST").h(headers).b(body);
152
- return b.build();
153
- };
154
- export const se_CreateGuardrailCommand = async (input, context) => {
155
- const b = rb(input, context);
156
- const headers = {
157
- "content-type": "application/json",
158
- };
159
- b.bp("/guardrails");
160
- let body;
161
- body = JSON.stringify(take(input, {
162
- automatedReasoningPolicyConfig: (_) => se_GuardrailAutomatedReasoningPolicyConfig(_, context),
163
- blockedInputMessaging: [],
164
- blockedOutputsMessaging: [],
165
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
166
- contentPolicyConfig: (_) => _json(_),
167
- contextualGroundingPolicyConfig: (_) => se_GuardrailContextualGroundingPolicyConfig(_, context),
168
- crossRegionConfig: (_) => _json(_),
169
- description: [],
170
- kmsKeyId: [],
171
- name: [],
172
- sensitiveInformationPolicyConfig: (_) => _json(_),
173
- tags: (_) => _json(_),
174
- topicPolicyConfig: (_) => _json(_),
175
- wordPolicyConfig: (_) => _json(_),
176
- }));
177
- b.m("POST").h(headers).b(body);
178
- return b.build();
179
- };
180
- export const se_CreateGuardrailVersionCommand = async (input, context) => {
181
- const b = rb(input, context);
182
- const headers = {
183
- "content-type": "application/json",
184
- };
185
- b.bp("/guardrails/{guardrailIdentifier}");
186
- b.p("guardrailIdentifier", () => input.guardrailIdentifier, "{guardrailIdentifier}", false);
187
- let body;
188
- body = JSON.stringify(take(input, {
189
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
190
- description: [],
191
- }));
192
- b.m("POST").h(headers).b(body);
193
- return b.build();
194
- };
195
- export const se_CreateInferenceProfileCommand = async (input, context) => {
196
- const b = rb(input, context);
197
- const headers = {
198
- "content-type": "application/json",
199
- };
200
- b.bp("/inference-profiles");
201
- let body;
202
- body = JSON.stringify(take(input, {
203
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
204
- description: [],
205
- inferenceProfileName: [],
206
- modelSource: (_) => _json(_),
207
- tags: (_) => _json(_),
208
- }));
209
- b.m("POST").h(headers).b(body);
210
- return b.build();
211
- };
212
- export const se_CreateMarketplaceModelEndpointCommand = async (input, context) => {
213
- const b = rb(input, context);
214
- const headers = {
215
- "content-type": "application/json",
216
- };
217
- b.bp("/marketplace-model/endpoints");
218
- let body;
219
- body = JSON.stringify(take(input, {
220
- acceptEula: [],
221
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
222
- endpointConfig: (_) => _json(_),
223
- endpointName: [],
224
- modelSourceIdentifier: [],
225
- tags: (_) => _json(_),
226
- }));
227
- b.m("POST").h(headers).b(body);
228
- return b.build();
229
- };
230
- export const se_CreateModelCopyJobCommand = async (input, context) => {
231
- const b = rb(input, context);
232
- const headers = {
233
- "content-type": "application/json",
234
- };
235
- b.bp("/model-copy-jobs");
236
- let body;
237
- body = JSON.stringify(take(input, {
238
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
239
- modelKmsKeyId: [],
240
- sourceModelArn: [],
241
- targetModelName: [],
242
- targetModelTags: (_) => _json(_),
243
- }));
244
- b.m("POST").h(headers).b(body);
245
- return b.build();
246
- };
247
- export const se_CreateModelCustomizationJobCommand = async (input, context) => {
248
- const b = rb(input, context);
249
- const headers = {
250
- "content-type": "application/json",
251
- };
252
- b.bp("/model-customization-jobs");
253
- let body;
254
- body = JSON.stringify(take(input, {
255
- baseModelIdentifier: [],
256
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
257
- customModelKmsKeyId: [],
258
- customModelName: [],
259
- customModelTags: (_) => _json(_),
260
- customizationConfig: (_) => _json(_),
261
- customizationType: [],
262
- hyperParameters: (_) => _json(_),
263
- jobName: [],
264
- jobTags: (_) => _json(_),
265
- outputDataConfig: (_) => _json(_),
266
- roleArn: [],
267
- trainingDataConfig: (_) => _json(_),
268
- validationDataConfig: (_) => _json(_),
269
- vpcConfig: (_) => _json(_),
270
- }));
271
- b.m("POST").h(headers).b(body);
272
- return b.build();
273
- };
274
- export const se_CreateModelImportJobCommand = async (input, context) => {
275
- const b = rb(input, context);
276
- const headers = {
277
- "content-type": "application/json",
278
- };
279
- b.bp("/model-import-jobs");
280
- let body;
281
- body = JSON.stringify(take(input, {
282
- clientRequestToken: [],
283
- importedModelKmsKeyId: [],
284
- importedModelName: [],
285
- importedModelTags: (_) => _json(_),
286
- jobName: [],
287
- jobTags: (_) => _json(_),
288
- modelDataSource: (_) => _json(_),
289
- roleArn: [],
290
- vpcConfig: (_) => _json(_),
291
- }));
292
- b.m("POST").h(headers).b(body);
293
- return b.build();
294
- };
295
- export const se_CreateModelInvocationJobCommand = async (input, context) => {
296
- const b = rb(input, context);
297
- const headers = {
298
- "content-type": "application/json",
299
- };
300
- b.bp("/model-invocation-job");
301
- let body;
302
- body = JSON.stringify(take(input, {
303
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
304
- inputDataConfig: (_) => _json(_),
305
- jobName: [],
306
- modelId: [],
307
- outputDataConfig: (_) => _json(_),
308
- roleArn: [],
309
- tags: (_) => _json(_),
310
- timeoutDurationInHours: [],
311
- vpcConfig: (_) => _json(_),
312
- }));
313
- b.m("POST").h(headers).b(body);
314
- return b.build();
315
- };
316
- export const se_CreatePromptRouterCommand = async (input, context) => {
317
- const b = rb(input, context);
318
- const headers = {
319
- "content-type": "application/json",
320
- };
321
- b.bp("/prompt-routers");
322
- let body;
323
- body = JSON.stringify(take(input, {
324
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
325
- description: [],
326
- fallbackModel: (_) => _json(_),
327
- models: (_) => _json(_),
328
- promptRouterName: [],
329
- routingCriteria: (_) => se_RoutingCriteria(_, context),
330
- tags: (_) => _json(_),
331
- }));
332
- b.m("POST").h(headers).b(body);
333
- return b.build();
334
- };
335
- export const se_CreateProvisionedModelThroughputCommand = async (input, context) => {
336
- const b = rb(input, context);
337
- const headers = {
338
- "content-type": "application/json",
339
- };
340
- b.bp("/provisioned-model-throughput");
341
- let body;
342
- body = JSON.stringify(take(input, {
343
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
344
- commitmentDuration: [],
345
- modelId: [],
346
- modelUnits: [],
347
- provisionedModelName: [],
348
- tags: (_) => _json(_),
349
- }));
350
- b.m("POST").h(headers).b(body);
351
- return b.build();
352
- };
353
- export const se_DeleteAutomatedReasoningPolicyCommand = async (input, context) => {
354
- const b = rb(input, context);
355
- const headers = {};
356
- b.bp("/automated-reasoning-policies/{policyArn}");
357
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
358
- const query = map({
359
- [_f]: [() => input.force !== void 0, () => input[_f].toString()],
360
- });
361
- let body;
362
- b.m("DELETE").h(headers).q(query).b(body);
363
- return b.build();
364
- };
365
- export const se_DeleteAutomatedReasoningPolicyBuildWorkflowCommand = async (input, context) => {
366
- const b = rb(input, context);
367
- const headers = {};
368
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}");
369
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
370
- b.p("buildWorkflowId", () => input.buildWorkflowId, "{buildWorkflowId}", false);
371
- const query = map({
372
- [_uA]: [
373
- __expectNonNull(input.lastUpdatedAt, `lastUpdatedAt`) != null,
374
- () => __serializeDateTime(input[_lUA]).toString(),
375
- ],
376
- });
377
- let body;
378
- b.m("DELETE").h(headers).q(query).b(body);
379
- return b.build();
380
- };
381
- export const se_DeleteAutomatedReasoningPolicyTestCaseCommand = async (input, context) => {
382
- const b = rb(input, context);
383
- const headers = {};
384
- b.bp("/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}");
385
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
386
- b.p("testCaseId", () => input.testCaseId, "{testCaseId}", false);
387
- const query = map({
388
- [_uA]: [
389
- __expectNonNull(input.lastUpdatedAt, `lastUpdatedAt`) != null,
390
- () => __serializeDateTime(input[_lUA]).toString(),
391
- ],
392
- });
393
- let body;
394
- b.m("DELETE").h(headers).q(query).b(body);
395
- return b.build();
396
- };
397
- export const se_DeleteCustomModelCommand = async (input, context) => {
398
- const b = rb(input, context);
399
- const headers = {};
400
- b.bp("/custom-models/{modelIdentifier}");
401
- b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
402
- let body;
403
- b.m("DELETE").h(headers).b(body);
404
- return b.build();
405
- };
406
- export const se_DeleteCustomModelDeploymentCommand = async (input, context) => {
407
- const b = rb(input, context);
408
- const headers = {};
409
- b.bp("/model-customization/custom-model-deployments/{customModelDeploymentIdentifier}");
410
- b.p("customModelDeploymentIdentifier", () => input.customModelDeploymentIdentifier, "{customModelDeploymentIdentifier}", false);
411
- let body;
412
- b.m("DELETE").h(headers).b(body);
413
- return b.build();
414
- };
415
- export const se_DeleteFoundationModelAgreementCommand = async (input, context) => {
416
- const b = rb(input, context);
417
- const headers = {
418
- "content-type": "application/json",
419
- };
420
- b.bp("/delete-foundation-model-agreement");
421
- let body;
422
- body = JSON.stringify(take(input, {
423
- modelId: [],
424
- }));
425
- b.m("POST").h(headers).b(body);
426
- return b.build();
427
- };
428
- export const se_DeleteGuardrailCommand = async (input, context) => {
429
- const b = rb(input, context);
430
- const headers = {};
431
- b.bp("/guardrails/{guardrailIdentifier}");
432
- b.p("guardrailIdentifier", () => input.guardrailIdentifier, "{guardrailIdentifier}", false);
433
- const query = map({
434
- [_gV]: [, input[_gV]],
435
- });
436
- let body;
437
- b.m("DELETE").h(headers).q(query).b(body);
438
- return b.build();
439
- };
440
- export const se_DeleteImportedModelCommand = async (input, context) => {
441
- const b = rb(input, context);
442
- const headers = {};
443
- b.bp("/imported-models/{modelIdentifier}");
444
- b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
445
- let body;
446
- b.m("DELETE").h(headers).b(body);
447
- return b.build();
448
- };
449
- export const se_DeleteInferenceProfileCommand = async (input, context) => {
450
- const b = rb(input, context);
451
- const headers = {};
452
- b.bp("/inference-profiles/{inferenceProfileIdentifier}");
453
- b.p("inferenceProfileIdentifier", () => input.inferenceProfileIdentifier, "{inferenceProfileIdentifier}", false);
454
- let body;
455
- b.m("DELETE").h(headers).b(body);
456
- return b.build();
457
- };
458
- export const se_DeleteMarketplaceModelEndpointCommand = async (input, context) => {
459
- const b = rb(input, context);
460
- const headers = {};
461
- b.bp("/marketplace-model/endpoints/{endpointArn}");
462
- b.p("endpointArn", () => input.endpointArn, "{endpointArn}", false);
463
- let body;
464
- b.m("DELETE").h(headers).b(body);
465
- return b.build();
466
- };
467
- export const se_DeleteModelInvocationLoggingConfigurationCommand = async (input, context) => {
468
- const b = rb(input, context);
469
- const headers = {};
470
- b.bp("/logging/modelinvocations");
471
- let body;
472
- b.m("DELETE").h(headers).b(body);
473
- return b.build();
474
- };
475
- export const se_DeletePromptRouterCommand = async (input, context) => {
476
- const b = rb(input, context);
477
- const headers = {};
478
- b.bp("/prompt-routers/{promptRouterArn}");
479
- b.p("promptRouterArn", () => input.promptRouterArn, "{promptRouterArn}", false);
480
- let body;
481
- b.m("DELETE").h(headers).b(body);
482
- return b.build();
483
- };
484
- export const se_DeleteProvisionedModelThroughputCommand = async (input, context) => {
485
- const b = rb(input, context);
486
- const headers = {};
487
- b.bp("/provisioned-model-throughput/{provisionedModelId}");
488
- b.p("provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
489
- let body;
490
- b.m("DELETE").h(headers).b(body);
491
- return b.build();
492
- };
493
- export const se_DeregisterMarketplaceModelEndpointCommand = async (input, context) => {
494
- const b = rb(input, context);
495
- const headers = {};
496
- b.bp("/marketplace-model/endpoints/{endpointArn}/registration");
497
- b.p("endpointArn", () => input.endpointArn, "{endpointArn}", false);
498
- let body;
499
- b.m("DELETE").h(headers).b(body);
500
- return b.build();
501
- };
502
- export const se_ExportAutomatedReasoningPolicyVersionCommand = async (input, context) => {
503
- const b = rb(input, context);
504
- const headers = {};
505
- b.bp("/automated-reasoning-policies/{policyArn}/export");
506
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
507
- let body;
508
- b.m("GET").h(headers).b(body);
509
- return b.build();
510
- };
511
- export const se_GetAutomatedReasoningPolicyCommand = async (input, context) => {
512
- const b = rb(input, context);
513
- const headers = {};
514
- b.bp("/automated-reasoning-policies/{policyArn}");
515
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
516
- let body;
517
- b.m("GET").h(headers).b(body);
518
- return b.build();
519
- };
520
- export const se_GetAutomatedReasoningPolicyAnnotationsCommand = async (input, context) => {
521
- const b = rb(input, context);
522
- const headers = {};
523
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/annotations");
524
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
525
- b.p("buildWorkflowId", () => input.buildWorkflowId, "{buildWorkflowId}", false);
526
- let body;
527
- b.m("GET").h(headers).b(body);
528
- return b.build();
529
- };
530
- export const se_GetAutomatedReasoningPolicyBuildWorkflowCommand = async (input, context) => {
531
- const b = rb(input, context);
532
- const headers = {};
533
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}");
534
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
535
- b.p("buildWorkflowId", () => input.buildWorkflowId, "{buildWorkflowId}", false);
536
- let body;
537
- b.m("GET").h(headers).b(body);
538
- return b.build();
539
- };
540
- export const se_GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand = async (input, context) => {
541
- const b = rb(input, context);
542
- const headers = {};
543
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/result-assets");
544
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
545
- b.p("buildWorkflowId", () => input.buildWorkflowId, "{buildWorkflowId}", false);
546
- const query = map({
547
- [_aT]: [, __expectNonNull(input[_aT], `assetType`)],
548
- });
549
- let body;
550
- b.m("GET").h(headers).q(query).b(body);
551
- return b.build();
552
- };
553
- export const se_GetAutomatedReasoningPolicyNextScenarioCommand = async (input, context) => {
554
- const b = rb(input, context);
555
- const headers = {};
556
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/scenarios");
557
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
558
- b.p("buildWorkflowId", () => input.buildWorkflowId, "{buildWorkflowId}", false);
559
- let body;
560
- b.m("GET").h(headers).b(body);
561
- return b.build();
562
- };
563
- export const se_GetAutomatedReasoningPolicyTestCaseCommand = async (input, context) => {
564
- const b = rb(input, context);
565
- const headers = {};
566
- b.bp("/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}");
567
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
568
- b.p("testCaseId", () => input.testCaseId, "{testCaseId}", false);
569
- let body;
570
- b.m("GET").h(headers).b(body);
571
- return b.build();
572
- };
573
- export const se_GetAutomatedReasoningPolicyTestResultCommand = async (input, context) => {
574
- const b = rb(input, context);
575
- const headers = {};
576
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-cases/{testCaseId}/test-results");
577
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
578
- b.p("buildWorkflowId", () => input.buildWorkflowId, "{buildWorkflowId}", false);
579
- b.p("testCaseId", () => input.testCaseId, "{testCaseId}", false);
580
- let body;
581
- b.m("GET").h(headers).b(body);
582
- return b.build();
583
- };
584
- export const se_GetCustomModelCommand = async (input, context) => {
585
- const b = rb(input, context);
586
- const headers = {};
587
- b.bp("/custom-models/{modelIdentifier}");
588
- b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
589
- let body;
590
- b.m("GET").h(headers).b(body);
591
- return b.build();
592
- };
593
- export const se_GetCustomModelDeploymentCommand = async (input, context) => {
594
- const b = rb(input, context);
595
- const headers = {};
596
- b.bp("/model-customization/custom-model-deployments/{customModelDeploymentIdentifier}");
597
- b.p("customModelDeploymentIdentifier", () => input.customModelDeploymentIdentifier, "{customModelDeploymentIdentifier}", false);
598
- let body;
599
- b.m("GET").h(headers).b(body);
600
- return b.build();
601
- };
602
- export const se_GetEvaluationJobCommand = async (input, context) => {
603
- const b = rb(input, context);
604
- const headers = {};
605
- b.bp("/evaluation-jobs/{jobIdentifier}");
606
- b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
607
- let body;
608
- b.m("GET").h(headers).b(body);
609
- return b.build();
610
- };
611
- export const se_GetFoundationModelCommand = async (input, context) => {
612
- const b = rb(input, context);
613
- const headers = {};
614
- b.bp("/foundation-models/{modelIdentifier}");
615
- b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
616
- let body;
617
- b.m("GET").h(headers).b(body);
618
- return b.build();
619
- };
620
- export const se_GetFoundationModelAvailabilityCommand = async (input, context) => {
621
- const b = rb(input, context);
622
- const headers = {};
623
- b.bp("/foundation-model-availability/{modelId}");
624
- b.p("modelId", () => input.modelId, "{modelId}", false);
625
- let body;
626
- b.m("GET").h(headers).b(body);
627
- return b.build();
628
- };
629
- export const se_GetGuardrailCommand = async (input, context) => {
630
- const b = rb(input, context);
631
- const headers = {};
632
- b.bp("/guardrails/{guardrailIdentifier}");
633
- b.p("guardrailIdentifier", () => input.guardrailIdentifier, "{guardrailIdentifier}", false);
634
- const query = map({
635
- [_gV]: [, input[_gV]],
636
- });
637
- let body;
638
- b.m("GET").h(headers).q(query).b(body);
639
- return b.build();
640
- };
641
- export const se_GetImportedModelCommand = async (input, context) => {
642
- const b = rb(input, context);
643
- const headers = {};
644
- b.bp("/imported-models/{modelIdentifier}");
645
- b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
646
- let body;
647
- b.m("GET").h(headers).b(body);
648
- return b.build();
649
- };
650
- export const se_GetInferenceProfileCommand = async (input, context) => {
651
- const b = rb(input, context);
652
- const headers = {};
653
- b.bp("/inference-profiles/{inferenceProfileIdentifier}");
654
- b.p("inferenceProfileIdentifier", () => input.inferenceProfileIdentifier, "{inferenceProfileIdentifier}", false);
655
- let body;
656
- b.m("GET").h(headers).b(body);
657
- return b.build();
658
- };
659
- export const se_GetMarketplaceModelEndpointCommand = async (input, context) => {
660
- const b = rb(input, context);
661
- const headers = {};
662
- b.bp("/marketplace-model/endpoints/{endpointArn}");
663
- b.p("endpointArn", () => input.endpointArn, "{endpointArn}", false);
664
- let body;
665
- b.m("GET").h(headers).b(body);
666
- return b.build();
667
- };
668
- export const se_GetModelCopyJobCommand = async (input, context) => {
669
- const b = rb(input, context);
670
- const headers = {};
671
- b.bp("/model-copy-jobs/{jobArn}");
672
- b.p("jobArn", () => input.jobArn, "{jobArn}", false);
673
- let body;
674
- b.m("GET").h(headers).b(body);
675
- return b.build();
676
- };
677
- export const se_GetModelCustomizationJobCommand = async (input, context) => {
678
- const b = rb(input, context);
679
- const headers = {};
680
- b.bp("/model-customization-jobs/{jobIdentifier}");
681
- b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
682
- let body;
683
- b.m("GET").h(headers).b(body);
684
- return b.build();
685
- };
686
- export const se_GetModelImportJobCommand = async (input, context) => {
687
- const b = rb(input, context);
688
- const headers = {};
689
- b.bp("/model-import-jobs/{jobIdentifier}");
690
- b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
691
- let body;
692
- b.m("GET").h(headers).b(body);
693
- return b.build();
694
- };
695
- export const se_GetModelInvocationJobCommand = async (input, context) => {
696
- const b = rb(input, context);
697
- const headers = {};
698
- b.bp("/model-invocation-job/{jobIdentifier}");
699
- b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
700
- let body;
701
- b.m("GET").h(headers).b(body);
702
- return b.build();
703
- };
704
- export const se_GetModelInvocationLoggingConfigurationCommand = async (input, context) => {
705
- const b = rb(input, context);
706
- const headers = {};
707
- b.bp("/logging/modelinvocations");
708
- let body;
709
- b.m("GET").h(headers).b(body);
710
- return b.build();
711
- };
712
- export const se_GetPromptRouterCommand = async (input, context) => {
713
- const b = rb(input, context);
714
- const headers = {};
715
- b.bp("/prompt-routers/{promptRouterArn}");
716
- b.p("promptRouterArn", () => input.promptRouterArn, "{promptRouterArn}", false);
717
- let body;
718
- b.m("GET").h(headers).b(body);
719
- return b.build();
720
- };
721
- export const se_GetProvisionedModelThroughputCommand = async (input, context) => {
722
- const b = rb(input, context);
723
- const headers = {};
724
- b.bp("/provisioned-model-throughput/{provisionedModelId}");
725
- b.p("provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
726
- let body;
727
- b.m("GET").h(headers).b(body);
728
- return b.build();
729
- };
730
- export const se_GetUseCaseForModelAccessCommand = async (input, context) => {
731
- const b = rb(input, context);
732
- const headers = {};
733
- b.bp("/use-case-for-model-access");
734
- let body;
735
- b.m("GET").h(headers).b(body);
736
- return b.build();
737
- };
738
- export const se_ListAutomatedReasoningPoliciesCommand = async (input, context) => {
739
- const b = rb(input, context);
740
- const headers = {};
741
- b.bp("/automated-reasoning-policies");
742
- const query = map({
743
- [_pA]: [, input[_pA]],
744
- [_nT]: [, input[_nT]],
745
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
746
- });
747
- let body;
748
- b.m("GET").h(headers).q(query).b(body);
749
- return b.build();
750
- };
751
- export const se_ListAutomatedReasoningPolicyBuildWorkflowsCommand = async (input, context) => {
752
- const b = rb(input, context);
753
- const headers = {};
754
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows");
755
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
756
- const query = map({
757
- [_nT]: [, input[_nT]],
758
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
759
- });
760
- let body;
761
- b.m("GET").h(headers).q(query).b(body);
762
- return b.build();
763
- };
764
- export const se_ListAutomatedReasoningPolicyTestCasesCommand = async (input, context) => {
765
- const b = rb(input, context);
766
- const headers = {};
767
- b.bp("/automated-reasoning-policies/{policyArn}/test-cases");
768
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
769
- const query = map({
770
- [_nT]: [, input[_nT]],
771
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
772
- });
773
- let body;
774
- b.m("GET").h(headers).q(query).b(body);
775
- return b.build();
776
- };
777
- export const se_ListAutomatedReasoningPolicyTestResultsCommand = async (input, context) => {
778
- const b = rb(input, context);
779
- const headers = {};
780
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-results");
781
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
782
- b.p("buildWorkflowId", () => input.buildWorkflowId, "{buildWorkflowId}", false);
783
- const query = map({
784
- [_nT]: [, input[_nT]],
785
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
786
- });
787
- let body;
788
- b.m("GET").h(headers).q(query).b(body);
789
- return b.build();
790
- };
791
- export const se_ListCustomModelDeploymentsCommand = async (input, context) => {
792
- const b = rb(input, context);
793
- const headers = {};
794
- b.bp("/model-customization/custom-model-deployments");
795
- const query = map({
796
- [_cB]: [() => input.createdBefore !== void 0, () => __serializeDateTime(input[_cB]).toString()],
797
- [_cA]: [() => input.createdAfter !== void 0, () => __serializeDateTime(input[_cA]).toString()],
798
- [_nC]: [, input[_nC]],
799
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
800
- [_nT]: [, input[_nT]],
801
- [_sB]: [, input[_sB]],
802
- [_sO]: [, input[_sO]],
803
- [_sE]: [, input[_sE]],
804
- [_mAE]: [, input[_mAE]],
805
- });
806
- let body;
807
- b.m("GET").h(headers).q(query).b(body);
808
- return b.build();
809
- };
810
- export const se_ListCustomModelsCommand = async (input, context) => {
811
- const b = rb(input, context);
812
- const headers = {};
813
- b.bp("/custom-models");
814
- const query = map({
815
- [_cTB]: [() => input.creationTimeBefore !== void 0, () => __serializeDateTime(input[_cTB]).toString()],
816
- [_cTA]: [() => input.creationTimeAfter !== void 0, () => __serializeDateTime(input[_cTA]).toString()],
817
- [_nC]: [, input[_nC]],
818
- [_bMAE]: [, input[_bMAE]],
819
- [_fMAE]: [, input[_fMAE]],
820
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
821
- [_nT]: [, input[_nT]],
822
- [_sB]: [, input[_sB]],
823
- [_sO]: [, input[_sO]],
824
- [_iO]: [() => input.isOwned !== void 0, () => input[_iO].toString()],
825
- [_mS]: [, input[_mS]],
826
- });
827
- let body;
828
- b.m("GET").h(headers).q(query).b(body);
829
- return b.build();
830
- };
831
- export const se_ListEvaluationJobsCommand = async (input, context) => {
832
- const b = rb(input, context);
833
- const headers = {};
834
- b.bp("/evaluation-jobs");
835
- const query = map({
836
- [_cTA]: [() => input.creationTimeAfter !== void 0, () => __serializeDateTime(input[_cTA]).toString()],
837
- [_cTB]: [() => input.creationTimeBefore !== void 0, () => __serializeDateTime(input[_cTB]).toString()],
838
- [_sE]: [, input[_sE]],
839
- [_aTE]: [, input[_aTE]],
840
- [_nC]: [, input[_nC]],
841
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
842
- [_nT]: [, input[_nT]],
843
- [_sB]: [, input[_sB]],
844
- [_sO]: [, input[_sO]],
845
- });
846
- let body;
847
- b.m("GET").h(headers).q(query).b(body);
848
- return b.build();
849
- };
850
- export const se_ListFoundationModelAgreementOffersCommand = async (input, context) => {
851
- const b = rb(input, context);
852
- const headers = {};
853
- b.bp("/list-foundation-model-agreement-offers/{modelId}");
854
- b.p("modelId", () => input.modelId, "{modelId}", false);
855
- const query = map({
856
- [_oT]: [, input[_oT]],
857
- });
858
- let body;
859
- b.m("GET").h(headers).q(query).b(body);
860
- return b.build();
861
- };
862
- export const se_ListFoundationModelsCommand = async (input, context) => {
863
- const b = rb(input, context);
864
- const headers = {};
865
- b.bp("/foundation-models");
866
- const query = map({
867
- [_bP]: [, input[_bP]],
868
- [_bCT]: [, input[_bCT]],
869
- [_bOM]: [, input[_bOM]],
870
- [_bIT]: [, input[_bIT]],
871
- });
872
- let body;
873
- b.m("GET").h(headers).q(query).b(body);
874
- return b.build();
875
- };
876
- export const se_ListGuardrailsCommand = async (input, context) => {
877
- const b = rb(input, context);
878
- const headers = {};
879
- b.bp("/guardrails");
880
- const query = map({
881
- [_gI]: [, input[_gI]],
882
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
883
- [_nT]: [, input[_nT]],
884
- });
885
- let body;
886
- b.m("GET").h(headers).q(query).b(body);
887
- return b.build();
888
- };
889
- export const se_ListImportedModelsCommand = async (input, context) => {
890
- const b = rb(input, context);
891
- const headers = {};
892
- b.bp("/imported-models");
893
- const query = map({
894
- [_cTB]: [() => input.creationTimeBefore !== void 0, () => __serializeDateTime(input[_cTB]).toString()],
895
- [_cTA]: [() => input.creationTimeAfter !== void 0, () => __serializeDateTime(input[_cTA]).toString()],
896
- [_nC]: [, input[_nC]],
897
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
898
- [_nT]: [, input[_nT]],
899
- [_sB]: [, input[_sB]],
900
- [_sO]: [, input[_sO]],
901
- });
902
- let body;
903
- b.m("GET").h(headers).q(query).b(body);
904
- return b.build();
905
- };
906
- export const se_ListInferenceProfilesCommand = async (input, context) => {
907
- const b = rb(input, context);
908
- const headers = {};
909
- b.bp("/inference-profiles");
910
- const query = map({
911
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
912
- [_nT]: [, input[_nT]],
913
- [_t]: [, input[_tE]],
914
- });
915
- let body;
916
- b.m("GET").h(headers).q(query).b(body);
917
- return b.build();
918
- };
919
- export const se_ListMarketplaceModelEndpointsCommand = async (input, context) => {
920
- const b = rb(input, context);
921
- const headers = {};
922
- b.bp("/marketplace-model/endpoints");
923
- const query = map({
924
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
925
- [_nT]: [, input[_nT]],
926
- [_mSI]: [, input[_mSE]],
927
- });
928
- let body;
929
- b.m("GET").h(headers).q(query).b(body);
930
- return b.build();
931
- };
932
- export const se_ListModelCopyJobsCommand = async (input, context) => {
933
- const b = rb(input, context);
934
- const headers = {};
935
- b.bp("/model-copy-jobs");
936
- const query = map({
937
- [_cTA]: [() => input.creationTimeAfter !== void 0, () => __serializeDateTime(input[_cTA]).toString()],
938
- [_cTB]: [() => input.creationTimeBefore !== void 0, () => __serializeDateTime(input[_cTB]).toString()],
939
- [_sE]: [, input[_sE]],
940
- [_sAE]: [, input[_sAE]],
941
- [_sMAE]: [, input[_sMAE]],
942
- [_oMNC]: [, input[_tMNC]],
943
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
944
- [_nT]: [, input[_nT]],
945
- [_sB]: [, input[_sB]],
946
- [_sO]: [, input[_sO]],
947
- });
948
- let body;
949
- b.m("GET").h(headers).q(query).b(body);
950
- return b.build();
951
- };
952
- export const se_ListModelCustomizationJobsCommand = async (input, context) => {
953
- const b = rb(input, context);
954
- const headers = {};
955
- b.bp("/model-customization-jobs");
956
- const query = map({
957
- [_cTA]: [() => input.creationTimeAfter !== void 0, () => __serializeDateTime(input[_cTA]).toString()],
958
- [_cTB]: [() => input.creationTimeBefore !== void 0, () => __serializeDateTime(input[_cTB]).toString()],
959
- [_sE]: [, input[_sE]],
960
- [_nC]: [, input[_nC]],
961
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
962
- [_nT]: [, input[_nT]],
963
- [_sB]: [, input[_sB]],
964
- [_sO]: [, input[_sO]],
965
- });
966
- let body;
967
- b.m("GET").h(headers).q(query).b(body);
968
- return b.build();
969
- };
970
- export const se_ListModelImportJobsCommand = async (input, context) => {
971
- const b = rb(input, context);
972
- const headers = {};
973
- b.bp("/model-import-jobs");
974
- const query = map({
975
- [_cTA]: [() => input.creationTimeAfter !== void 0, () => __serializeDateTime(input[_cTA]).toString()],
976
- [_cTB]: [() => input.creationTimeBefore !== void 0, () => __serializeDateTime(input[_cTB]).toString()],
977
- [_sE]: [, input[_sE]],
978
- [_nC]: [, input[_nC]],
979
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
980
- [_nT]: [, input[_nT]],
981
- [_sB]: [, input[_sB]],
982
- [_sO]: [, input[_sO]],
983
- });
984
- let body;
985
- b.m("GET").h(headers).q(query).b(body);
986
- return b.build();
987
- };
988
- export const se_ListModelInvocationJobsCommand = async (input, context) => {
989
- const b = rb(input, context);
990
- const headers = {};
991
- b.bp("/model-invocation-jobs");
992
- const query = map({
993
- [_sTA]: [() => input.submitTimeAfter !== void 0, () => __serializeDateTime(input[_sTA]).toString()],
994
- [_sTB]: [() => input.submitTimeBefore !== void 0, () => __serializeDateTime(input[_sTB]).toString()],
995
- [_sE]: [, input[_sE]],
996
- [_nC]: [, input[_nC]],
997
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
998
- [_nT]: [, input[_nT]],
999
- [_sB]: [, input[_sB]],
1000
- [_sO]: [, input[_sO]],
1001
- });
1002
- let body;
1003
- b.m("GET").h(headers).q(query).b(body);
1004
- return b.build();
1005
- };
1006
- export const se_ListPromptRoutersCommand = async (input, context) => {
1007
- const b = rb(input, context);
1008
- const headers = {};
1009
- b.bp("/prompt-routers");
1010
- const query = map({
1011
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
1012
- [_nT]: [, input[_nT]],
1013
- [_t]: [, input[_t]],
1014
- });
1015
- let body;
1016
- b.m("GET").h(headers).q(query).b(body);
1017
- return b.build();
1018
- };
1019
- export const se_ListProvisionedModelThroughputsCommand = async (input, context) => {
1020
- const b = rb(input, context);
1021
- const headers = {};
1022
- b.bp("/provisioned-model-throughputs");
1023
- const query = map({
1024
- [_cTA]: [() => input.creationTimeAfter !== void 0, () => __serializeDateTime(input[_cTA]).toString()],
1025
- [_cTB]: [() => input.creationTimeBefore !== void 0, () => __serializeDateTime(input[_cTB]).toString()],
1026
- [_sE]: [, input[_sE]],
1027
- [_mAE]: [, input[_mAE]],
1028
- [_nC]: [, input[_nC]],
1029
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
1030
- [_nT]: [, input[_nT]],
1031
- [_sB]: [, input[_sB]],
1032
- [_sO]: [, input[_sO]],
1033
- });
1034
- let body;
1035
- b.m("GET").h(headers).q(query).b(body);
1036
- return b.build();
1037
- };
1038
- export const se_ListTagsForResourceCommand = async (input, context) => {
1039
- const b = rb(input, context);
1040
- const headers = {
1041
- "content-type": "application/json",
1042
- };
1043
- b.bp("/listTagsForResource");
1044
- let body;
1045
- body = JSON.stringify(take(input, {
1046
- resourceARN: [],
1047
- }));
1048
- b.m("POST").h(headers).b(body);
1049
- return b.build();
1050
- };
1051
- export const se_PutModelInvocationLoggingConfigurationCommand = async (input, context) => {
1052
- const b = rb(input, context);
1053
- const headers = {
1054
- "content-type": "application/json",
1055
- };
1056
- b.bp("/logging/modelinvocations");
1057
- let body;
1058
- body = JSON.stringify(take(input, {
1059
- loggingConfig: (_) => _json(_),
1060
- }));
1061
- b.m("PUT").h(headers).b(body);
1062
- return b.build();
1063
- };
1064
- export const se_PutUseCaseForModelAccessCommand = async (input, context) => {
1065
- const b = rb(input, context);
1066
- const headers = {
1067
- "content-type": "application/json",
1068
- };
1069
- b.bp("/use-case-for-model-access");
1070
- let body;
1071
- body = JSON.stringify(take(input, {
1072
- formData: (_) => context.base64Encoder(_),
1073
- }));
1074
- b.m("POST").h(headers).b(body);
1075
- return b.build();
1076
- };
1077
- export const se_RegisterMarketplaceModelEndpointCommand = async (input, context) => {
1078
- const b = rb(input, context);
1079
- const headers = {
1080
- "content-type": "application/json",
1081
- };
1082
- b.bp("/marketplace-model/endpoints/{endpointIdentifier}/registration");
1083
- b.p("endpointIdentifier", () => input.endpointIdentifier, "{endpointIdentifier}", false);
1084
- let body;
1085
- body = JSON.stringify(take(input, {
1086
- modelSourceIdentifier: [],
1087
- }));
1088
- b.m("POST").h(headers).b(body);
1089
- return b.build();
1090
- };
1091
- export const se_StartAutomatedReasoningPolicyBuildWorkflowCommand = async (input, context) => {
1092
- const b = rb(input, context);
1093
- const headers = map({}, isSerializableHeaderValue, {
1094
- "content-type": "application/json",
1095
- [_xact]: input[_cRT] ?? generateIdempotencyToken(),
1096
- });
1097
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowType}/start");
1098
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
1099
- b.p("buildWorkflowType", () => input.buildWorkflowType, "{buildWorkflowType}", false);
1100
- let body;
1101
- if (input.sourceContent !== undefined) {
1102
- body = se_AutomatedReasoningPolicyBuildWorkflowSource(input.sourceContent, context);
1103
- }
1104
- if (body === undefined) {
1105
- body = {};
1106
- }
1107
- body = JSON.stringify(body);
1108
- b.m("POST").h(headers).b(body);
1109
- return b.build();
1110
- };
1111
- export const se_StartAutomatedReasoningPolicyTestWorkflowCommand = async (input, context) => {
1112
- const b = rb(input, context);
1113
- const headers = {
1114
- "content-type": "application/json",
1115
- };
1116
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-workflows");
1117
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
1118
- b.p("buildWorkflowId", () => input.buildWorkflowId, "{buildWorkflowId}", false);
1119
- let body;
1120
- body = JSON.stringify(take(input, {
1121
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
1122
- testCaseIds: (_) => _json(_),
1123
- }));
1124
- b.m("POST").h(headers).b(body);
1125
- return b.build();
1126
- };
1127
- export const se_StopEvaluationJobCommand = async (input, context) => {
1128
- const b = rb(input, context);
1129
- const headers = {};
1130
- b.bp("/evaluation-job/{jobIdentifier}/stop");
1131
- b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
1132
- let body;
1133
- b.m("POST").h(headers).b(body);
1134
- return b.build();
1135
- };
1136
- export const se_StopModelCustomizationJobCommand = async (input, context) => {
1137
- const b = rb(input, context);
1138
- const headers = {};
1139
- b.bp("/model-customization-jobs/{jobIdentifier}/stop");
1140
- b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
1141
- let body;
1142
- b.m("POST").h(headers).b(body);
1143
- return b.build();
1144
- };
1145
- export const se_StopModelInvocationJobCommand = async (input, context) => {
1146
- const b = rb(input, context);
1147
- const headers = {};
1148
- b.bp("/model-invocation-job/{jobIdentifier}/stop");
1149
- b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
1150
- let body;
1151
- b.m("POST").h(headers).b(body);
1152
- return b.build();
1153
- };
1154
- export const se_TagResourceCommand = async (input, context) => {
1155
- const b = rb(input, context);
1156
- const headers = {
1157
- "content-type": "application/json",
1158
- };
1159
- b.bp("/tagResource");
1160
- let body;
1161
- body = JSON.stringify(take(input, {
1162
- resourceARN: [],
1163
- tags: (_) => _json(_),
1164
- }));
1165
- b.m("POST").h(headers).b(body);
1166
- return b.build();
1167
- };
1168
- export const se_UntagResourceCommand = async (input, context) => {
1169
- const b = rb(input, context);
1170
- const headers = {
1171
- "content-type": "application/json",
1172
- };
1173
- b.bp("/untagResource");
1174
- let body;
1175
- body = JSON.stringify(take(input, {
1176
- resourceARN: [],
1177
- tagKeys: (_) => _json(_),
1178
- }));
1179
- b.m("POST").h(headers).b(body);
1180
- return b.build();
1181
- };
1182
- export const se_UpdateAutomatedReasoningPolicyCommand = async (input, context) => {
1183
- const b = rb(input, context);
1184
- const headers = {
1185
- "content-type": "application/json",
1186
- };
1187
- b.bp("/automated-reasoning-policies/{policyArn}");
1188
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
1189
- let body;
1190
- body = JSON.stringify(take(input, {
1191
- description: [],
1192
- name: [],
1193
- policyDefinition: (_) => _json(_),
1194
- }));
1195
- b.m("PATCH").h(headers).b(body);
1196
- return b.build();
1197
- };
1198
- export const se_UpdateAutomatedReasoningPolicyAnnotationsCommand = async (input, context) => {
1199
- const b = rb(input, context);
1200
- const headers = {
1201
- "content-type": "application/json",
1202
- };
1203
- b.bp("/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/annotations");
1204
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
1205
- b.p("buildWorkflowId", () => input.buildWorkflowId, "{buildWorkflowId}", false);
1206
- let body;
1207
- body = JSON.stringify(take(input, {
1208
- annotations: (_) => _json(_),
1209
- lastUpdatedAnnotationSetHash: [],
1210
- }));
1211
- b.m("PATCH").h(headers).b(body);
1212
- return b.build();
1213
- };
1214
- export const se_UpdateAutomatedReasoningPolicyTestCaseCommand = async (input, context) => {
1215
- const b = rb(input, context);
1216
- const headers = {
1217
- "content-type": "application/json",
1218
- };
1219
- b.bp("/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}");
1220
- b.p("policyArn", () => input.policyArn, "{policyArn}", false);
1221
- b.p("testCaseId", () => input.testCaseId, "{testCaseId}", false);
1222
- let body;
1223
- body = JSON.stringify(take(input, {
1224
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
1225
- confidenceThreshold: (_) => __serializeFloat(_),
1226
- expectedAggregatedFindingsResult: [],
1227
- guardContent: [],
1228
- lastUpdatedAt: (_) => __serializeDateTime(_),
1229
- queryContent: [],
1230
- }));
1231
- b.m("PATCH").h(headers).b(body);
1232
- return b.build();
1233
- };
1234
- export const se_UpdateGuardrailCommand = async (input, context) => {
1235
- const b = rb(input, context);
1236
- const headers = {
1237
- "content-type": "application/json",
1238
- };
1239
- b.bp("/guardrails/{guardrailIdentifier}");
1240
- b.p("guardrailIdentifier", () => input.guardrailIdentifier, "{guardrailIdentifier}", false);
1241
- let body;
1242
- body = JSON.stringify(take(input, {
1243
- automatedReasoningPolicyConfig: (_) => se_GuardrailAutomatedReasoningPolicyConfig(_, context),
1244
- blockedInputMessaging: [],
1245
- blockedOutputsMessaging: [],
1246
- contentPolicyConfig: (_) => _json(_),
1247
- contextualGroundingPolicyConfig: (_) => se_GuardrailContextualGroundingPolicyConfig(_, context),
1248
- crossRegionConfig: (_) => _json(_),
1249
- description: [],
1250
- kmsKeyId: [],
1251
- name: [],
1252
- sensitiveInformationPolicyConfig: (_) => _json(_),
1253
- topicPolicyConfig: (_) => _json(_),
1254
- wordPolicyConfig: (_) => _json(_),
1255
- }));
1256
- b.m("PUT").h(headers).b(body);
1257
- return b.build();
1258
- };
1259
- export const se_UpdateMarketplaceModelEndpointCommand = async (input, context) => {
1260
- const b = rb(input, context);
1261
- const headers = {
1262
- "content-type": "application/json",
1263
- };
1264
- b.bp("/marketplace-model/endpoints/{endpointArn}");
1265
- b.p("endpointArn", () => input.endpointArn, "{endpointArn}", false);
1266
- let body;
1267
- body = JSON.stringify(take(input, {
1268
- clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
1269
- endpointConfig: (_) => _json(_),
1270
- }));
1271
- b.m("PATCH").h(headers).b(body);
1272
- return b.build();
1273
- };
1274
- export const se_UpdateProvisionedModelThroughputCommand = async (input, context) => {
1275
- const b = rb(input, context);
1276
- const headers = {
1277
- "content-type": "application/json",
1278
- };
1279
- b.bp("/provisioned-model-throughput/{provisionedModelId}");
1280
- b.p("provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
1281
- let body;
1282
- body = JSON.stringify(take(input, {
1283
- desiredModelId: [],
1284
- desiredProvisionedModelName: [],
1285
- }));
1286
- b.m("PATCH").h(headers).b(body);
1287
- return b.build();
1288
- };
1289
- export const de_BatchDeleteEvaluationJobCommand = async (output, context) => {
1290
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1291
- return de_CommandError(output, context);
1292
- }
1293
- const contents = map({
1294
- $metadata: deserializeMetadata(output),
1295
- });
1296
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1297
- const doc = take(data, {
1298
- errors: _json,
1299
- evaluationJobs: _json,
1300
- });
1301
- Object.assign(contents, doc);
1302
- return contents;
1303
- };
1304
- export const de_CancelAutomatedReasoningPolicyBuildWorkflowCommand = async (output, context) => {
1305
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1306
- return de_CommandError(output, context);
1307
- }
1308
- const contents = map({
1309
- $metadata: deserializeMetadata(output),
1310
- });
1311
- await collectBody(output.body, context);
1312
- return contents;
1313
- };
1314
- export const de_CreateAutomatedReasoningPolicyCommand = async (output, context) => {
1315
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1316
- return de_CommandError(output, context);
1317
- }
1318
- const contents = map({
1319
- $metadata: deserializeMetadata(output),
1320
- });
1321
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1322
- const doc = take(data, {
1323
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1324
- definitionHash: __expectString,
1325
- description: __expectString,
1326
- name: __expectString,
1327
- policyArn: __expectString,
1328
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1329
- version: __expectString,
1330
- });
1331
- Object.assign(contents, doc);
1332
- return contents;
1333
- };
1334
- export const de_CreateAutomatedReasoningPolicyTestCaseCommand = async (output, context) => {
1335
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1336
- return de_CommandError(output, context);
1337
- }
1338
- const contents = map({
1339
- $metadata: deserializeMetadata(output),
1340
- });
1341
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1342
- const doc = take(data, {
1343
- policyArn: __expectString,
1344
- testCaseId: __expectString,
1345
- });
1346
- Object.assign(contents, doc);
1347
- return contents;
1348
- };
1349
- export const de_CreateAutomatedReasoningPolicyVersionCommand = async (output, context) => {
1350
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1351
- return de_CommandError(output, context);
1352
- }
1353
- const contents = map({
1354
- $metadata: deserializeMetadata(output),
1355
- });
1356
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1357
- const doc = take(data, {
1358
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1359
- definitionHash: __expectString,
1360
- description: __expectString,
1361
- name: __expectString,
1362
- policyArn: __expectString,
1363
- version: __expectString,
1364
- });
1365
- Object.assign(contents, doc);
1366
- return contents;
1367
- };
1368
- export const de_CreateCustomModelCommand = async (output, context) => {
1369
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1370
- return de_CommandError(output, context);
1371
- }
1372
- const contents = map({
1373
- $metadata: deserializeMetadata(output),
1374
- });
1375
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1376
- const doc = take(data, {
1377
- modelArn: __expectString,
1378
- });
1379
- Object.assign(contents, doc);
1380
- return contents;
1381
- };
1382
- export const de_CreateCustomModelDeploymentCommand = async (output, context) => {
1383
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1384
- return de_CommandError(output, context);
1385
- }
1386
- const contents = map({
1387
- $metadata: deserializeMetadata(output),
1388
- });
1389
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1390
- const doc = take(data, {
1391
- customModelDeploymentArn: __expectString,
1392
- });
1393
- Object.assign(contents, doc);
1394
- return contents;
1395
- };
1396
- export const de_CreateEvaluationJobCommand = async (output, context) => {
1397
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1398
- return de_CommandError(output, context);
1399
- }
1400
- const contents = map({
1401
- $metadata: deserializeMetadata(output),
1402
- });
1403
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1404
- const doc = take(data, {
1405
- jobArn: __expectString,
1406
- });
1407
- Object.assign(contents, doc);
1408
- return contents;
1409
- };
1410
- export const de_CreateFoundationModelAgreementCommand = async (output, context) => {
1411
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1412
- return de_CommandError(output, context);
1413
- }
1414
- const contents = map({
1415
- $metadata: deserializeMetadata(output),
1416
- });
1417
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1418
- const doc = take(data, {
1419
- modelId: __expectString,
1420
- });
1421
- Object.assign(contents, doc);
1422
- return contents;
1423
- };
1424
- export const de_CreateGuardrailCommand = async (output, context) => {
1425
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1426
- return de_CommandError(output, context);
1427
- }
1428
- const contents = map({
1429
- $metadata: deserializeMetadata(output),
1430
- });
1431
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1432
- const doc = take(data, {
1433
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1434
- guardrailArn: __expectString,
1435
- guardrailId: __expectString,
1436
- version: __expectString,
1437
- });
1438
- Object.assign(contents, doc);
1439
- return contents;
1440
- };
1441
- export const de_CreateGuardrailVersionCommand = async (output, context) => {
1442
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1443
- return de_CommandError(output, context);
1444
- }
1445
- const contents = map({
1446
- $metadata: deserializeMetadata(output),
1447
- });
1448
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1449
- const doc = take(data, {
1450
- guardrailId: __expectString,
1451
- version: __expectString,
1452
- });
1453
- Object.assign(contents, doc);
1454
- return contents;
1455
- };
1456
- export const de_CreateInferenceProfileCommand = async (output, context) => {
1457
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1458
- return de_CommandError(output, context);
1459
- }
1460
- const contents = map({
1461
- $metadata: deserializeMetadata(output),
1462
- });
1463
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1464
- const doc = take(data, {
1465
- inferenceProfileArn: __expectString,
1466
- status: __expectString,
1467
- });
1468
- Object.assign(contents, doc);
1469
- return contents;
1470
- };
1471
- export const de_CreateMarketplaceModelEndpointCommand = async (output, context) => {
1472
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1473
- return de_CommandError(output, context);
1474
- }
1475
- const contents = map({
1476
- $metadata: deserializeMetadata(output),
1477
- });
1478
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1479
- const doc = take(data, {
1480
- marketplaceModelEndpoint: (_) => de_MarketplaceModelEndpoint(_, context),
1481
- });
1482
- Object.assign(contents, doc);
1483
- return contents;
1484
- };
1485
- export const de_CreateModelCopyJobCommand = async (output, context) => {
1486
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1487
- return de_CommandError(output, context);
1488
- }
1489
- const contents = map({
1490
- $metadata: deserializeMetadata(output),
1491
- });
1492
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1493
- const doc = take(data, {
1494
- jobArn: __expectString,
1495
- });
1496
- Object.assign(contents, doc);
1497
- return contents;
1498
- };
1499
- export const de_CreateModelCustomizationJobCommand = async (output, context) => {
1500
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1501
- return de_CommandError(output, context);
1502
- }
1503
- const contents = map({
1504
- $metadata: deserializeMetadata(output),
1505
- });
1506
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1507
- const doc = take(data, {
1508
- jobArn: __expectString,
1509
- });
1510
- Object.assign(contents, doc);
1511
- return contents;
1512
- };
1513
- export const de_CreateModelImportJobCommand = async (output, context) => {
1514
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1515
- return de_CommandError(output, context);
1516
- }
1517
- const contents = map({
1518
- $metadata: deserializeMetadata(output),
1519
- });
1520
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1521
- const doc = take(data, {
1522
- jobArn: __expectString,
1523
- });
1524
- Object.assign(contents, doc);
1525
- return contents;
1526
- };
1527
- export const de_CreateModelInvocationJobCommand = async (output, context) => {
1528
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1529
- return de_CommandError(output, context);
1530
- }
1531
- const contents = map({
1532
- $metadata: deserializeMetadata(output),
1533
- });
1534
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1535
- const doc = take(data, {
1536
- jobArn: __expectString,
1537
- });
1538
- Object.assign(contents, doc);
1539
- return contents;
1540
- };
1541
- export const de_CreatePromptRouterCommand = async (output, context) => {
1542
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1543
- return de_CommandError(output, context);
1544
- }
1545
- const contents = map({
1546
- $metadata: deserializeMetadata(output),
1547
- });
1548
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1549
- const doc = take(data, {
1550
- promptRouterArn: __expectString,
1551
- });
1552
- Object.assign(contents, doc);
1553
- return contents;
1554
- };
1555
- export const de_CreateProvisionedModelThroughputCommand = async (output, context) => {
1556
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1557
- return de_CommandError(output, context);
1558
- }
1559
- const contents = map({
1560
- $metadata: deserializeMetadata(output),
1561
- });
1562
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1563
- const doc = take(data, {
1564
- provisionedModelArn: __expectString,
1565
- });
1566
- Object.assign(contents, doc);
1567
- return contents;
1568
- };
1569
- export const de_DeleteAutomatedReasoningPolicyCommand = async (output, context) => {
1570
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1571
- return de_CommandError(output, context);
1572
- }
1573
- const contents = map({
1574
- $metadata: deserializeMetadata(output),
1575
- });
1576
- await collectBody(output.body, context);
1577
- return contents;
1578
- };
1579
- export const de_DeleteAutomatedReasoningPolicyBuildWorkflowCommand = async (output, context) => {
1580
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1581
- return de_CommandError(output, context);
1582
- }
1583
- const contents = map({
1584
- $metadata: deserializeMetadata(output),
1585
- });
1586
- await collectBody(output.body, context);
1587
- return contents;
1588
- };
1589
- export const de_DeleteAutomatedReasoningPolicyTestCaseCommand = async (output, context) => {
1590
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1591
- return de_CommandError(output, context);
1592
- }
1593
- const contents = map({
1594
- $metadata: deserializeMetadata(output),
1595
- });
1596
- await collectBody(output.body, context);
1597
- return contents;
1598
- };
1599
- export const de_DeleteCustomModelCommand = async (output, context) => {
1600
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1601
- return de_CommandError(output, context);
1602
- }
1603
- const contents = map({
1604
- $metadata: deserializeMetadata(output),
1605
- });
1606
- await collectBody(output.body, context);
1607
- return contents;
1608
- };
1609
- export const de_DeleteCustomModelDeploymentCommand = async (output, context) => {
1610
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1611
- return de_CommandError(output, context);
1612
- }
1613
- const contents = map({
1614
- $metadata: deserializeMetadata(output),
1615
- });
1616
- await collectBody(output.body, context);
1617
- return contents;
1618
- };
1619
- export const de_DeleteFoundationModelAgreementCommand = async (output, context) => {
1620
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1621
- return de_CommandError(output, context);
1622
- }
1623
- const contents = map({
1624
- $metadata: deserializeMetadata(output),
1625
- });
1626
- await collectBody(output.body, context);
1627
- return contents;
1628
- };
1629
- export const de_DeleteGuardrailCommand = async (output, context) => {
1630
- if (output.statusCode !== 202 && output.statusCode >= 300) {
1631
- return de_CommandError(output, context);
1632
- }
1633
- const contents = map({
1634
- $metadata: deserializeMetadata(output),
1635
- });
1636
- await collectBody(output.body, context);
1637
- return contents;
1638
- };
1639
- export const de_DeleteImportedModelCommand = async (output, context) => {
1640
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1641
- return de_CommandError(output, context);
1642
- }
1643
- const contents = map({
1644
- $metadata: deserializeMetadata(output),
1645
- });
1646
- await collectBody(output.body, context);
1647
- return contents;
1648
- };
1649
- export const de_DeleteInferenceProfileCommand = async (output, context) => {
1650
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1651
- return de_CommandError(output, context);
1652
- }
1653
- const contents = map({
1654
- $metadata: deserializeMetadata(output),
1655
- });
1656
- await collectBody(output.body, context);
1657
- return contents;
1658
- };
1659
- export const de_DeleteMarketplaceModelEndpointCommand = async (output, context) => {
1660
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1661
- return de_CommandError(output, context);
1662
- }
1663
- const contents = map({
1664
- $metadata: deserializeMetadata(output),
1665
- });
1666
- await collectBody(output.body, context);
1667
- return contents;
1668
- };
1669
- export const de_DeleteModelInvocationLoggingConfigurationCommand = async (output, context) => {
1670
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1671
- return de_CommandError(output, context);
1672
- }
1673
- const contents = map({
1674
- $metadata: deserializeMetadata(output),
1675
- });
1676
- await collectBody(output.body, context);
1677
- return contents;
1678
- };
1679
- export const de_DeletePromptRouterCommand = async (output, context) => {
1680
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1681
- return de_CommandError(output, context);
1682
- }
1683
- const contents = map({
1684
- $metadata: deserializeMetadata(output),
1685
- });
1686
- await collectBody(output.body, context);
1687
- return contents;
1688
- };
1689
- export const de_DeleteProvisionedModelThroughputCommand = async (output, context) => {
1690
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1691
- return de_CommandError(output, context);
1692
- }
1693
- const contents = map({
1694
- $metadata: deserializeMetadata(output),
1695
- });
1696
- await collectBody(output.body, context);
1697
- return contents;
1698
- };
1699
- export const de_DeregisterMarketplaceModelEndpointCommand = async (output, context) => {
1700
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1701
- return de_CommandError(output, context);
1702
- }
1703
- const contents = map({
1704
- $metadata: deserializeMetadata(output),
1705
- });
1706
- await collectBody(output.body, context);
1707
- return contents;
1708
- };
1709
- export const de_ExportAutomatedReasoningPolicyVersionCommand = async (output, context) => {
1710
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1711
- return de_CommandError(output, context);
1712
- }
1713
- const contents = map({
1714
- $metadata: deserializeMetadata(output),
1715
- });
1716
- const data = __expectObject(await parseBody(output.body, context));
1717
- contents.policyDefinition = _json(data);
1718
- return contents;
1719
- };
1720
- export const de_GetAutomatedReasoningPolicyCommand = async (output, context) => {
1721
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1722
- return de_CommandError(output, context);
1723
- }
1724
- const contents = map({
1725
- $metadata: deserializeMetadata(output),
1726
- });
1727
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1728
- const doc = take(data, {
1729
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1730
- definitionHash: __expectString,
1731
- description: __expectString,
1732
- kmsKeyArn: __expectString,
1733
- name: __expectString,
1734
- policyArn: __expectString,
1735
- policyId: __expectString,
1736
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1737
- version: __expectString,
1738
- });
1739
- Object.assign(contents, doc);
1740
- return contents;
1741
- };
1742
- export const de_GetAutomatedReasoningPolicyAnnotationsCommand = async (output, context) => {
1743
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1744
- return de_CommandError(output, context);
1745
- }
1746
- const contents = map({
1747
- $metadata: deserializeMetadata(output),
1748
- });
1749
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1750
- const doc = take(data, {
1751
- annotationSetHash: __expectString,
1752
- annotations: _json,
1753
- buildWorkflowId: __expectString,
1754
- name: __expectString,
1755
- policyArn: __expectString,
1756
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1757
- });
1758
- Object.assign(contents, doc);
1759
- return contents;
1760
- };
1761
- export const de_GetAutomatedReasoningPolicyBuildWorkflowCommand = async (output, context) => {
1762
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1763
- return de_CommandError(output, context);
1764
- }
1765
- const contents = map({
1766
- $metadata: deserializeMetadata(output),
1767
- });
1768
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1769
- const doc = take(data, {
1770
- buildWorkflowId: __expectString,
1771
- buildWorkflowType: __expectString,
1772
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1773
- documentContentType: __expectString,
1774
- documentDescription: __expectString,
1775
- documentName: __expectString,
1776
- policyArn: __expectString,
1777
- status: __expectString,
1778
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1779
- });
1780
- Object.assign(contents, doc);
1781
- return contents;
1782
- };
1783
- export const de_GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand = async (output, context) => {
1784
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1785
- return de_CommandError(output, context);
1786
- }
1787
- const contents = map({
1788
- $metadata: deserializeMetadata(output),
1789
- });
1790
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1791
- const doc = take(data, {
1792
- buildWorkflowAssets: (_) => de_AutomatedReasoningPolicyBuildResultAssets(__expectUnion(_), context),
1793
- buildWorkflowId: __expectString,
1794
- policyArn: __expectString,
1795
- });
1796
- Object.assign(contents, doc);
1797
- return contents;
1798
- };
1799
- export const de_GetAutomatedReasoningPolicyNextScenarioCommand = async (output, context) => {
1800
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1801
- return de_CommandError(output, context);
1802
- }
1803
- const contents = map({
1804
- $metadata: deserializeMetadata(output),
1805
- });
1806
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1807
- const doc = take(data, {
1808
- policyArn: __expectString,
1809
- scenario: _json,
1810
- });
1811
- Object.assign(contents, doc);
1812
- return contents;
1813
- };
1814
- export const de_GetAutomatedReasoningPolicyTestCaseCommand = async (output, context) => {
1815
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1816
- return de_CommandError(output, context);
1817
- }
1818
- const contents = map({
1819
- $metadata: deserializeMetadata(output),
1820
- });
1821
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1822
- const doc = take(data, {
1823
- policyArn: __expectString,
1824
- testCase: (_) => de_AutomatedReasoningPolicyTestCase(_, context),
1825
- });
1826
- Object.assign(contents, doc);
1827
- return contents;
1828
- };
1829
- export const de_GetAutomatedReasoningPolicyTestResultCommand = async (output, context) => {
1830
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1831
- return de_CommandError(output, context);
1832
- }
1833
- const contents = map({
1834
- $metadata: deserializeMetadata(output),
1835
- });
1836
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1837
- const doc = take(data, {
1838
- testResult: (_) => de_AutomatedReasoningPolicyTestResult(_, context),
1839
- });
1840
- Object.assign(contents, doc);
1841
- return contents;
1842
- };
1843
- export const de_GetCustomModelCommand = async (output, context) => {
1844
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1845
- return de_CommandError(output, context);
1846
- }
1847
- const contents = map({
1848
- $metadata: deserializeMetadata(output),
1849
- });
1850
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1851
- const doc = take(data, {
1852
- baseModelArn: __expectString,
1853
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1854
- customizationConfig: (_) => _json(__expectUnion(_)),
1855
- customizationType: __expectString,
1856
- failureMessage: __expectString,
1857
- hyperParameters: _json,
1858
- jobArn: __expectString,
1859
- jobName: __expectString,
1860
- modelArn: __expectString,
1861
- modelKmsKeyArn: __expectString,
1862
- modelName: __expectString,
1863
- modelStatus: __expectString,
1864
- outputDataConfig: _json,
1865
- trainingDataConfig: _json,
1866
- trainingMetrics: (_) => de_TrainingMetrics(_, context),
1867
- validationDataConfig: _json,
1868
- validationMetrics: (_) => de_ValidationMetrics(_, context),
1869
- });
1870
- Object.assign(contents, doc);
1871
- return contents;
1872
- };
1873
- export const de_GetCustomModelDeploymentCommand = async (output, context) => {
1874
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1875
- return de_CommandError(output, context);
1876
- }
1877
- const contents = map({
1878
- $metadata: deserializeMetadata(output),
1879
- });
1880
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1881
- const doc = take(data, {
1882
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1883
- customModelDeploymentArn: __expectString,
1884
- description: __expectString,
1885
- failureMessage: __expectString,
1886
- lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1887
- modelArn: __expectString,
1888
- modelDeploymentName: __expectString,
1889
- status: __expectString,
1890
- });
1891
- Object.assign(contents, doc);
1892
- return contents;
1893
- };
1894
- export const de_GetEvaluationJobCommand = async (output, context) => {
1895
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1896
- return de_CommandError(output, context);
1897
- }
1898
- const contents = map({
1899
- $metadata: deserializeMetadata(output),
1900
- });
1901
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1902
- const doc = take(data, {
1903
- applicationType: __expectString,
1904
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1905
- customerEncryptionKeyId: __expectString,
1906
- evaluationConfig: (_) => de_EvaluationConfig(__expectUnion(_), context),
1907
- failureMessages: _json,
1908
- inferenceConfig: (_) => de_EvaluationInferenceConfig(__expectUnion(_), context),
1909
- jobArn: __expectString,
1910
- jobDescription: __expectString,
1911
- jobName: __expectString,
1912
- jobType: __expectString,
1913
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1914
- outputDataConfig: _json,
1915
- roleArn: __expectString,
1916
- status: __expectString,
1917
- });
1918
- Object.assign(contents, doc);
1919
- return contents;
1920
- };
1921
- export const de_GetFoundationModelCommand = async (output, context) => {
1922
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1923
- return de_CommandError(output, context);
1924
- }
1925
- const contents = map({
1926
- $metadata: deserializeMetadata(output),
1927
- });
1928
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1929
- const doc = take(data, {
1930
- modelDetails: _json,
1931
- });
1932
- Object.assign(contents, doc);
1933
- return contents;
1934
- };
1935
- export const de_GetFoundationModelAvailabilityCommand = async (output, context) => {
1936
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1937
- return de_CommandError(output, context);
1938
- }
1939
- const contents = map({
1940
- $metadata: deserializeMetadata(output),
1941
- });
1942
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1943
- const doc = take(data, {
1944
- agreementAvailability: _json,
1945
- authorizationStatus: __expectString,
1946
- entitlementAvailability: __expectString,
1947
- modelId: __expectString,
1948
- regionAvailability: __expectString,
1949
- });
1950
- Object.assign(contents, doc);
1951
- return contents;
1952
- };
1953
- export const de_GetGuardrailCommand = async (output, context) => {
1954
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1955
- return de_CommandError(output, context);
1956
- }
1957
- const contents = map({
1958
- $metadata: deserializeMetadata(output),
1959
- });
1960
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1961
- const doc = take(data, {
1962
- automatedReasoningPolicy: (_) => de_GuardrailAutomatedReasoningPolicy(_, context),
1963
- blockedInputMessaging: __expectString,
1964
- blockedOutputsMessaging: __expectString,
1965
- contentPolicy: _json,
1966
- contextualGroundingPolicy: (_) => de_GuardrailContextualGroundingPolicy(_, context),
1967
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1968
- crossRegionDetails: _json,
1969
- description: __expectString,
1970
- failureRecommendations: _json,
1971
- guardrailArn: __expectString,
1972
- guardrailId: __expectString,
1973
- kmsKeyArn: __expectString,
1974
- name: __expectString,
1975
- sensitiveInformationPolicy: _json,
1976
- status: __expectString,
1977
- statusReasons: _json,
1978
- topicPolicy: _json,
1979
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1980
- version: __expectString,
1981
- wordPolicy: _json,
1982
- });
1983
- Object.assign(contents, doc);
1984
- return contents;
1985
- };
1986
- export const de_GetImportedModelCommand = async (output, context) => {
1987
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1988
- return de_CommandError(output, context);
1989
- }
1990
- const contents = map({
1991
- $metadata: deserializeMetadata(output),
1992
- });
1993
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1994
- const doc = take(data, {
1995
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1996
- customModelUnits: _json,
1997
- instructSupported: __expectBoolean,
1998
- jobArn: __expectString,
1999
- jobName: __expectString,
2000
- modelArchitecture: __expectString,
2001
- modelArn: __expectString,
2002
- modelDataSource: (_) => _json(__expectUnion(_)),
2003
- modelKmsKeyArn: __expectString,
2004
- modelName: __expectString,
2005
- });
2006
- Object.assign(contents, doc);
2007
- return contents;
2008
- };
2009
- export const de_GetInferenceProfileCommand = async (output, context) => {
2010
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2011
- return de_CommandError(output, context);
2012
- }
2013
- const contents = map({
2014
- $metadata: deserializeMetadata(output),
2015
- });
2016
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2017
- const doc = take(data, {
2018
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2019
- description: __expectString,
2020
- inferenceProfileArn: __expectString,
2021
- inferenceProfileId: __expectString,
2022
- inferenceProfileName: __expectString,
2023
- models: _json,
2024
- status: __expectString,
2025
- type: __expectString,
2026
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2027
- });
2028
- Object.assign(contents, doc);
2029
- return contents;
2030
- };
2031
- export const de_GetMarketplaceModelEndpointCommand = async (output, context) => {
2032
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2033
- return de_CommandError(output, context);
2034
- }
2035
- const contents = map({
2036
- $metadata: deserializeMetadata(output),
2037
- });
2038
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2039
- const doc = take(data, {
2040
- marketplaceModelEndpoint: (_) => de_MarketplaceModelEndpoint(_, context),
2041
- });
2042
- Object.assign(contents, doc);
2043
- return contents;
2044
- };
2045
- export const de_GetModelCopyJobCommand = async (output, context) => {
2046
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2047
- return de_CommandError(output, context);
2048
- }
2049
- const contents = map({
2050
- $metadata: deserializeMetadata(output),
2051
- });
2052
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2053
- const doc = take(data, {
2054
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2055
- failureMessage: __expectString,
2056
- jobArn: __expectString,
2057
- sourceAccountId: __expectString,
2058
- sourceModelArn: __expectString,
2059
- sourceModelName: __expectString,
2060
- status: __expectString,
2061
- targetModelArn: __expectString,
2062
- targetModelKmsKeyArn: __expectString,
2063
- targetModelName: __expectString,
2064
- targetModelTags: _json,
2065
- });
2066
- Object.assign(contents, doc);
2067
- return contents;
2068
- };
2069
- export const de_GetModelCustomizationJobCommand = async (output, context) => {
2070
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2071
- return de_CommandError(output, context);
2072
- }
2073
- const contents = map({
2074
- $metadata: deserializeMetadata(output),
2075
- });
2076
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2077
- const doc = take(data, {
2078
- baseModelArn: __expectString,
2079
- clientRequestToken: __expectString,
2080
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2081
- customizationConfig: (_) => _json(__expectUnion(_)),
2082
- customizationType: __expectString,
2083
- endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2084
- failureMessage: __expectString,
2085
- hyperParameters: _json,
2086
- jobArn: __expectString,
2087
- jobName: __expectString,
2088
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2089
- outputDataConfig: _json,
2090
- outputModelArn: __expectString,
2091
- outputModelKmsKeyArn: __expectString,
2092
- outputModelName: __expectString,
2093
- roleArn: __expectString,
2094
- status: __expectString,
2095
- statusDetails: (_) => de_StatusDetails(_, context),
2096
- trainingDataConfig: _json,
2097
- trainingMetrics: (_) => de_TrainingMetrics(_, context),
2098
- validationDataConfig: _json,
2099
- validationMetrics: (_) => de_ValidationMetrics(_, context),
2100
- vpcConfig: _json,
2101
- });
2102
- Object.assign(contents, doc);
2103
- return contents;
2104
- };
2105
- export const de_GetModelImportJobCommand = async (output, context) => {
2106
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2107
- return de_CommandError(output, context);
2108
- }
2109
- const contents = map({
2110
- $metadata: deserializeMetadata(output),
2111
- });
2112
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2113
- const doc = take(data, {
2114
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2115
- endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2116
- failureMessage: __expectString,
2117
- importedModelArn: __expectString,
2118
- importedModelKmsKeyArn: __expectString,
2119
- importedModelName: __expectString,
2120
- jobArn: __expectString,
2121
- jobName: __expectString,
2122
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2123
- modelDataSource: (_) => _json(__expectUnion(_)),
2124
- roleArn: __expectString,
2125
- status: __expectString,
2126
- vpcConfig: _json,
2127
- });
2128
- Object.assign(contents, doc);
2129
- return contents;
2130
- };
2131
- export const de_GetModelInvocationJobCommand = async (output, context) => {
2132
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2133
- return de_CommandError(output, context);
2134
- }
2135
- const contents = map({
2136
- $metadata: deserializeMetadata(output),
2137
- });
2138
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2139
- const doc = take(data, {
2140
- clientRequestToken: __expectString,
2141
- endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2142
- inputDataConfig: (_) => _json(__expectUnion(_)),
2143
- jobArn: __expectString,
2144
- jobExpirationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2145
- jobName: __expectString,
2146
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2147
- message: __expectString,
2148
- modelId: __expectString,
2149
- outputDataConfig: (_) => _json(__expectUnion(_)),
2150
- roleArn: __expectString,
2151
- status: __expectString,
2152
- submitTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2153
- timeoutDurationInHours: __expectInt32,
2154
- vpcConfig: _json,
2155
- });
2156
- Object.assign(contents, doc);
2157
- return contents;
2158
- };
2159
- export const de_GetModelInvocationLoggingConfigurationCommand = async (output, context) => {
2160
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2161
- return de_CommandError(output, context);
2162
- }
2163
- const contents = map({
2164
- $metadata: deserializeMetadata(output),
2165
- });
2166
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2167
- const doc = take(data, {
2168
- loggingConfig: _json,
2169
- });
2170
- Object.assign(contents, doc);
2171
- return contents;
2172
- };
2173
- export const de_GetPromptRouterCommand = async (output, context) => {
2174
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2175
- return de_CommandError(output, context);
2176
- }
2177
- const contents = map({
2178
- $metadata: deserializeMetadata(output),
2179
- });
2180
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2181
- const doc = take(data, {
2182
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2183
- description: __expectString,
2184
- fallbackModel: _json,
2185
- models: _json,
2186
- promptRouterArn: __expectString,
2187
- promptRouterName: __expectString,
2188
- routingCriteria: (_) => de_RoutingCriteria(_, context),
2189
- status: __expectString,
2190
- type: __expectString,
2191
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2192
- });
2193
- Object.assign(contents, doc);
2194
- return contents;
2195
- };
2196
- export const de_GetProvisionedModelThroughputCommand = async (output, context) => {
2197
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2198
- return de_CommandError(output, context);
2199
- }
2200
- const contents = map({
2201
- $metadata: deserializeMetadata(output),
2202
- });
2203
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2204
- const doc = take(data, {
2205
- commitmentDuration: __expectString,
2206
- commitmentExpirationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2207
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2208
- desiredModelArn: __expectString,
2209
- desiredModelUnits: __expectInt32,
2210
- failureMessage: __expectString,
2211
- foundationModelArn: __expectString,
2212
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2213
- modelArn: __expectString,
2214
- modelUnits: __expectInt32,
2215
- provisionedModelArn: __expectString,
2216
- provisionedModelName: __expectString,
2217
- status: __expectString,
2218
- });
2219
- Object.assign(contents, doc);
2220
- return contents;
2221
- };
2222
- export const de_GetUseCaseForModelAccessCommand = async (output, context) => {
2223
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2224
- return de_CommandError(output, context);
2225
- }
2226
- const contents = map({
2227
- $metadata: deserializeMetadata(output),
2228
- });
2229
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2230
- const doc = take(data, {
2231
- formData: context.base64Decoder,
2232
- });
2233
- Object.assign(contents, doc);
2234
- return contents;
2235
- };
2236
- export const de_ListAutomatedReasoningPoliciesCommand = async (output, context) => {
2237
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2238
- return de_CommandError(output, context);
2239
- }
2240
- const contents = map({
2241
- $metadata: deserializeMetadata(output),
2242
- });
2243
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2244
- const doc = take(data, {
2245
- automatedReasoningPolicySummaries: (_) => de_AutomatedReasoningPolicySummaries(_, context),
2246
- nextToken: __expectString,
2247
- });
2248
- Object.assign(contents, doc);
2249
- return contents;
2250
- };
2251
- export const de_ListAutomatedReasoningPolicyBuildWorkflowsCommand = async (output, context) => {
2252
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2253
- return de_CommandError(output, context);
2254
- }
2255
- const contents = map({
2256
- $metadata: deserializeMetadata(output),
2257
- });
2258
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2259
- const doc = take(data, {
2260
- automatedReasoningPolicyBuildWorkflowSummaries: (_) => de_AutomatedReasoningPolicyBuildWorkflowSummaries(_, context),
2261
- nextToken: __expectString,
2262
- });
2263
- Object.assign(contents, doc);
2264
- return contents;
2265
- };
2266
- export const de_ListAutomatedReasoningPolicyTestCasesCommand = async (output, context) => {
2267
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2268
- return de_CommandError(output, context);
2269
- }
2270
- const contents = map({
2271
- $metadata: deserializeMetadata(output),
2272
- });
2273
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2274
- const doc = take(data, {
2275
- nextToken: __expectString,
2276
- testCases: (_) => de_AutomatedReasoningPolicyTestCaseList(_, context),
2277
- });
2278
- Object.assign(contents, doc);
2279
- return contents;
2280
- };
2281
- export const de_ListAutomatedReasoningPolicyTestResultsCommand = async (output, context) => {
2282
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2283
- return de_CommandError(output, context);
2284
- }
2285
- const contents = map({
2286
- $metadata: deserializeMetadata(output),
2287
- });
2288
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2289
- const doc = take(data, {
2290
- nextToken: __expectString,
2291
- testResults: (_) => de_AutomatedReasoningPolicyTestList(_, context),
2292
- });
2293
- Object.assign(contents, doc);
2294
- return contents;
2295
- };
2296
- export const de_ListCustomModelDeploymentsCommand = async (output, context) => {
2297
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2298
- return de_CommandError(output, context);
2299
- }
2300
- const contents = map({
2301
- $metadata: deserializeMetadata(output),
2302
- });
2303
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2304
- const doc = take(data, {
2305
- modelDeploymentSummaries: (_) => de_CustomModelDeploymentSummaryList(_, context),
2306
- nextToken: __expectString,
2307
- });
2308
- Object.assign(contents, doc);
2309
- return contents;
2310
- };
2311
- export const de_ListCustomModelsCommand = async (output, context) => {
2312
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2313
- return de_CommandError(output, context);
2314
- }
2315
- const contents = map({
2316
- $metadata: deserializeMetadata(output),
2317
- });
2318
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2319
- const doc = take(data, {
2320
- modelSummaries: (_) => de_CustomModelSummaryList(_, context),
2321
- nextToken: __expectString,
2322
- });
2323
- Object.assign(contents, doc);
2324
- return contents;
2325
- };
2326
- export const de_ListEvaluationJobsCommand = async (output, context) => {
2327
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2328
- return de_CommandError(output, context);
2329
- }
2330
- const contents = map({
2331
- $metadata: deserializeMetadata(output),
2332
- });
2333
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2334
- const doc = take(data, {
2335
- jobSummaries: (_) => de_EvaluationSummaries(_, context),
2336
- nextToken: __expectString,
2337
- });
2338
- Object.assign(contents, doc);
2339
- return contents;
2340
- };
2341
- export const de_ListFoundationModelAgreementOffersCommand = async (output, context) => {
2342
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2343
- return de_CommandError(output, context);
2344
- }
2345
- const contents = map({
2346
- $metadata: deserializeMetadata(output),
2347
- });
2348
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2349
- const doc = take(data, {
2350
- modelId: __expectString,
2351
- offers: _json,
2352
- });
2353
- Object.assign(contents, doc);
2354
- return contents;
2355
- };
2356
- export const de_ListFoundationModelsCommand = async (output, context) => {
2357
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2358
- return de_CommandError(output, context);
2359
- }
2360
- const contents = map({
2361
- $metadata: deserializeMetadata(output),
2362
- });
2363
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2364
- const doc = take(data, {
2365
- modelSummaries: _json,
2366
- });
2367
- Object.assign(contents, doc);
2368
- return contents;
2369
- };
2370
- export const de_ListGuardrailsCommand = async (output, context) => {
2371
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2372
- return de_CommandError(output, context);
2373
- }
2374
- const contents = map({
2375
- $metadata: deserializeMetadata(output),
2376
- });
2377
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2378
- const doc = take(data, {
2379
- guardrails: (_) => de_GuardrailSummaries(_, context),
2380
- nextToken: __expectString,
2381
- });
2382
- Object.assign(contents, doc);
2383
- return contents;
2384
- };
2385
- export const de_ListImportedModelsCommand = async (output, context) => {
2386
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2387
- return de_CommandError(output, context);
2388
- }
2389
- const contents = map({
2390
- $metadata: deserializeMetadata(output),
2391
- });
2392
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2393
- const doc = take(data, {
2394
- modelSummaries: (_) => de_ImportedModelSummaryList(_, context),
2395
- nextToken: __expectString,
2396
- });
2397
- Object.assign(contents, doc);
2398
- return contents;
2399
- };
2400
- export const de_ListInferenceProfilesCommand = async (output, context) => {
2401
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2402
- return de_CommandError(output, context);
2403
- }
2404
- const contents = map({
2405
- $metadata: deserializeMetadata(output),
2406
- });
2407
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2408
- const doc = take(data, {
2409
- inferenceProfileSummaries: (_) => de_InferenceProfileSummaries(_, context),
2410
- nextToken: __expectString,
2411
- });
2412
- Object.assign(contents, doc);
2413
- return contents;
2414
- };
2415
- export const de_ListMarketplaceModelEndpointsCommand = async (output, context) => {
2416
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2417
- return de_CommandError(output, context);
2418
- }
2419
- const contents = map({
2420
- $metadata: deserializeMetadata(output),
2421
- });
2422
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2423
- const doc = take(data, {
2424
- marketplaceModelEndpoints: (_) => de_MarketplaceModelEndpointSummaries(_, context),
2425
- nextToken: __expectString,
2426
- });
2427
- Object.assign(contents, doc);
2428
- return contents;
2429
- };
2430
- export const de_ListModelCopyJobsCommand = async (output, context) => {
2431
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2432
- return de_CommandError(output, context);
2433
- }
2434
- const contents = map({
2435
- $metadata: deserializeMetadata(output),
2436
- });
2437
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2438
- const doc = take(data, {
2439
- modelCopyJobSummaries: (_) => de_ModelCopyJobSummaries(_, context),
2440
- nextToken: __expectString,
2441
- });
2442
- Object.assign(contents, doc);
2443
- return contents;
2444
- };
2445
- export const de_ListModelCustomizationJobsCommand = async (output, context) => {
2446
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2447
- return de_CommandError(output, context);
2448
- }
2449
- const contents = map({
2450
- $metadata: deserializeMetadata(output),
2451
- });
2452
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2453
- const doc = take(data, {
2454
- modelCustomizationJobSummaries: (_) => de_ModelCustomizationJobSummaries(_, context),
2455
- nextToken: __expectString,
2456
- });
2457
- Object.assign(contents, doc);
2458
- return contents;
2459
- };
2460
- export const de_ListModelImportJobsCommand = async (output, context) => {
2461
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2462
- return de_CommandError(output, context);
2463
- }
2464
- const contents = map({
2465
- $metadata: deserializeMetadata(output),
2466
- });
2467
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2468
- const doc = take(data, {
2469
- modelImportJobSummaries: (_) => de_ModelImportJobSummaries(_, context),
2470
- nextToken: __expectString,
2471
- });
2472
- Object.assign(contents, doc);
2473
- return contents;
2474
- };
2475
- export const de_ListModelInvocationJobsCommand = async (output, context) => {
2476
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2477
- return de_CommandError(output, context);
2478
- }
2479
- const contents = map({
2480
- $metadata: deserializeMetadata(output),
2481
- });
2482
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2483
- const doc = take(data, {
2484
- invocationJobSummaries: (_) => de_ModelInvocationJobSummaries(_, context),
2485
- nextToken: __expectString,
2486
- });
2487
- Object.assign(contents, doc);
2488
- return contents;
2489
- };
2490
- export const de_ListPromptRoutersCommand = async (output, context) => {
2491
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2492
- return de_CommandError(output, context);
2493
- }
2494
- const contents = map({
2495
- $metadata: deserializeMetadata(output),
2496
- });
2497
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2498
- const doc = take(data, {
2499
- nextToken: __expectString,
2500
- promptRouterSummaries: (_) => de_PromptRouterSummaries(_, context),
2501
- });
2502
- Object.assign(contents, doc);
2503
- return contents;
2504
- };
2505
- export const de_ListProvisionedModelThroughputsCommand = async (output, context) => {
2506
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2507
- return de_CommandError(output, context);
2508
- }
2509
- const contents = map({
2510
- $metadata: deserializeMetadata(output),
2511
- });
2512
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2513
- const doc = take(data, {
2514
- nextToken: __expectString,
2515
- provisionedModelSummaries: (_) => de_ProvisionedModelSummaries(_, context),
2516
- });
2517
- Object.assign(contents, doc);
2518
- return contents;
2519
- };
2520
- export const de_ListTagsForResourceCommand = async (output, context) => {
2521
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2522
- return de_CommandError(output, context);
2523
- }
2524
- const contents = map({
2525
- $metadata: deserializeMetadata(output),
2526
- });
2527
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2528
- const doc = take(data, {
2529
- tags: _json,
2530
- });
2531
- Object.assign(contents, doc);
2532
- return contents;
2533
- };
2534
- export const de_PutModelInvocationLoggingConfigurationCommand = async (output, context) => {
2535
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2536
- return de_CommandError(output, context);
2537
- }
2538
- const contents = map({
2539
- $metadata: deserializeMetadata(output),
2540
- });
2541
- await collectBody(output.body, context);
2542
- return contents;
2543
- };
2544
- export const de_PutUseCaseForModelAccessCommand = async (output, context) => {
2545
- if (output.statusCode !== 201 && output.statusCode >= 300) {
2546
- return de_CommandError(output, context);
2547
- }
2548
- const contents = map({
2549
- $metadata: deserializeMetadata(output),
2550
- });
2551
- await collectBody(output.body, context);
2552
- return contents;
2553
- };
2554
- export const de_RegisterMarketplaceModelEndpointCommand = async (output, context) => {
2555
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2556
- return de_CommandError(output, context);
2557
- }
2558
- const contents = map({
2559
- $metadata: deserializeMetadata(output),
2560
- });
2561
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2562
- const doc = take(data, {
2563
- marketplaceModelEndpoint: (_) => de_MarketplaceModelEndpoint(_, context),
2564
- });
2565
- Object.assign(contents, doc);
2566
- return contents;
2567
- };
2568
- export const de_StartAutomatedReasoningPolicyBuildWorkflowCommand = async (output, context) => {
2569
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2570
- return de_CommandError(output, context);
2571
- }
2572
- const contents = map({
2573
- $metadata: deserializeMetadata(output),
2574
- });
2575
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2576
- const doc = take(data, {
2577
- buildWorkflowId: __expectString,
2578
- policyArn: __expectString,
2579
- });
2580
- Object.assign(contents, doc);
2581
- return contents;
2582
- };
2583
- export const de_StartAutomatedReasoningPolicyTestWorkflowCommand = async (output, context) => {
2584
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2585
- return de_CommandError(output, context);
2586
- }
2587
- const contents = map({
2588
- $metadata: deserializeMetadata(output),
2589
- });
2590
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2591
- const doc = take(data, {
2592
- policyArn: __expectString,
2593
- });
2594
- Object.assign(contents, doc);
2595
- return contents;
2596
- };
2597
- export const de_StopEvaluationJobCommand = async (output, context) => {
2598
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2599
- return de_CommandError(output, context);
2600
- }
2601
- const contents = map({
2602
- $metadata: deserializeMetadata(output),
2603
- });
2604
- await collectBody(output.body, context);
2605
- return contents;
2606
- };
2607
- export const de_StopModelCustomizationJobCommand = async (output, context) => {
2608
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2609
- return de_CommandError(output, context);
2610
- }
2611
- const contents = map({
2612
- $metadata: deserializeMetadata(output),
2613
- });
2614
- await collectBody(output.body, context);
2615
- return contents;
2616
- };
2617
- export const de_StopModelInvocationJobCommand = async (output, context) => {
2618
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2619
- return de_CommandError(output, context);
2620
- }
2621
- const contents = map({
2622
- $metadata: deserializeMetadata(output),
2623
- });
2624
- await collectBody(output.body, context);
2625
- return contents;
2626
- };
2627
- export const de_TagResourceCommand = async (output, context) => {
2628
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2629
- return de_CommandError(output, context);
2630
- }
2631
- const contents = map({
2632
- $metadata: deserializeMetadata(output),
2633
- });
2634
- await collectBody(output.body, context);
2635
- return contents;
2636
- };
2637
- export const de_UntagResourceCommand = async (output, context) => {
2638
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2639
- return de_CommandError(output, context);
2640
- }
2641
- const contents = map({
2642
- $metadata: deserializeMetadata(output),
2643
- });
2644
- await collectBody(output.body, context);
2645
- return contents;
2646
- };
2647
- export const de_UpdateAutomatedReasoningPolicyCommand = async (output, context) => {
2648
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2649
- return de_CommandError(output, context);
2650
- }
2651
- const contents = map({
2652
- $metadata: deserializeMetadata(output),
2653
- });
2654
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2655
- const doc = take(data, {
2656
- definitionHash: __expectString,
2657
- name: __expectString,
2658
- policyArn: __expectString,
2659
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2660
- });
2661
- Object.assign(contents, doc);
2662
- return contents;
2663
- };
2664
- export const de_UpdateAutomatedReasoningPolicyAnnotationsCommand = async (output, context) => {
2665
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2666
- return de_CommandError(output, context);
2667
- }
2668
- const contents = map({
2669
- $metadata: deserializeMetadata(output),
2670
- });
2671
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2672
- const doc = take(data, {
2673
- annotationSetHash: __expectString,
2674
- buildWorkflowId: __expectString,
2675
- policyArn: __expectString,
2676
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2677
- });
2678
- Object.assign(contents, doc);
2679
- return contents;
2680
- };
2681
- export const de_UpdateAutomatedReasoningPolicyTestCaseCommand = async (output, context) => {
2682
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2683
- return de_CommandError(output, context);
2684
- }
2685
- const contents = map({
2686
- $metadata: deserializeMetadata(output),
2687
- });
2688
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2689
- const doc = take(data, {
2690
- policyArn: __expectString,
2691
- testCaseId: __expectString,
2692
- });
2693
- Object.assign(contents, doc);
2694
- return contents;
2695
- };
2696
- export const de_UpdateGuardrailCommand = async (output, context) => {
2697
- if (output.statusCode !== 202 && output.statusCode >= 300) {
2698
- return de_CommandError(output, context);
2699
- }
2700
- const contents = map({
2701
- $metadata: deserializeMetadata(output),
2702
- });
2703
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2704
- const doc = take(data, {
2705
- guardrailArn: __expectString,
2706
- guardrailId: __expectString,
2707
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2708
- version: __expectString,
2709
- });
2710
- Object.assign(contents, doc);
2711
- return contents;
2712
- };
2713
- export const de_UpdateMarketplaceModelEndpointCommand = async (output, context) => {
2714
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2715
- return de_CommandError(output, context);
2716
- }
2717
- const contents = map({
2718
- $metadata: deserializeMetadata(output),
2719
- });
2720
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2721
- const doc = take(data, {
2722
- marketplaceModelEndpoint: (_) => de_MarketplaceModelEndpoint(_, context),
2723
- });
2724
- Object.assign(contents, doc);
2725
- return contents;
2726
- };
2727
- export const de_UpdateProvisionedModelThroughputCommand = async (output, context) => {
2728
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2729
- return de_CommandError(output, context);
2730
- }
2731
- const contents = map({
2732
- $metadata: deserializeMetadata(output),
2733
- });
2734
- await collectBody(output.body, context);
2735
- return contents;
2736
- };
2737
- const de_CommandError = async (output, context) => {
2738
- const parsedOutput = {
2739
- ...output,
2740
- body: await parseErrorBody(output.body, context),
2741
- };
2742
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2743
- switch (errorCode) {
2744
- case "AccessDeniedException":
2745
- case "com.amazonaws.bedrock#AccessDeniedException":
2746
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2747
- case "ConflictException":
2748
- case "com.amazonaws.bedrock#ConflictException":
2749
- throw await de_ConflictExceptionRes(parsedOutput, context);
2750
- case "InternalServerException":
2751
- case "com.amazonaws.bedrock#InternalServerException":
2752
- throw await de_InternalServerExceptionRes(parsedOutput, context);
2753
- case "ResourceNotFoundException":
2754
- case "com.amazonaws.bedrock#ResourceNotFoundException":
2755
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2756
- case "ThrottlingException":
2757
- case "com.amazonaws.bedrock#ThrottlingException":
2758
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2759
- case "ValidationException":
2760
- case "com.amazonaws.bedrock#ValidationException":
2761
- throw await de_ValidationExceptionRes(parsedOutput, context);
2762
- case "ServiceQuotaExceededException":
2763
- case "com.amazonaws.bedrock#ServiceQuotaExceededException":
2764
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2765
- case "TooManyTagsException":
2766
- case "com.amazonaws.bedrock#TooManyTagsException":
2767
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
2768
- case "ResourceInUseException":
2769
- case "com.amazonaws.bedrock#ResourceInUseException":
2770
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2771
- case "ServiceUnavailableException":
2772
- case "com.amazonaws.bedrock#ServiceUnavailableException":
2773
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2774
- default:
2775
- const parsedBody = parsedOutput.body;
2776
- return throwDefaultError({
2777
- output,
2778
- parsedBody,
2779
- errorCode,
2780
- });
2781
- }
2782
- };
2783
- const throwDefaultError = withBaseException(__BaseException);
2784
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
2785
- const contents = map({});
2786
- const data = parsedOutput.body;
2787
- const doc = take(data, {
2788
- message: __expectString,
2789
- });
2790
- Object.assign(contents, doc);
2791
- const exception = new AccessDeniedException({
2792
- $metadata: deserializeMetadata(parsedOutput),
2793
- ...contents,
2794
- });
2795
- return __decorateServiceException(exception, parsedOutput.body);
2796
- };
2797
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
2798
- const contents = map({});
2799
- const data = parsedOutput.body;
2800
- const doc = take(data, {
2801
- message: __expectString,
2802
- });
2803
- Object.assign(contents, doc);
2804
- const exception = new ConflictException({
2805
- $metadata: deserializeMetadata(parsedOutput),
2806
- ...contents,
2807
- });
2808
- return __decorateServiceException(exception, parsedOutput.body);
2809
- };
2810
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2811
- const contents = map({});
2812
- const data = parsedOutput.body;
2813
- const doc = take(data, {
2814
- message: __expectString,
2815
- });
2816
- Object.assign(contents, doc);
2817
- const exception = new InternalServerException({
2818
- $metadata: deserializeMetadata(parsedOutput),
2819
- ...contents,
2820
- });
2821
- return __decorateServiceException(exception, parsedOutput.body);
2822
- };
2823
- const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
2824
- const contents = map({});
2825
- const data = parsedOutput.body;
2826
- const doc = take(data, {
2827
- message: __expectString,
2828
- });
2829
- Object.assign(contents, doc);
2830
- const exception = new ResourceInUseException({
2831
- $metadata: deserializeMetadata(parsedOutput),
2832
- ...contents,
2833
- });
2834
- return __decorateServiceException(exception, parsedOutput.body);
2835
- };
2836
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
2837
- const contents = map({});
2838
- const data = parsedOutput.body;
2839
- const doc = take(data, {
2840
- message: __expectString,
2841
- });
2842
- Object.assign(contents, doc);
2843
- const exception = new ResourceNotFoundException({
2844
- $metadata: deserializeMetadata(parsedOutput),
2845
- ...contents,
2846
- });
2847
- return __decorateServiceException(exception, parsedOutput.body);
2848
- };
2849
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2850
- const contents = map({});
2851
- const data = parsedOutput.body;
2852
- const doc = take(data, {
2853
- message: __expectString,
2854
- });
2855
- Object.assign(contents, doc);
2856
- const exception = new ServiceQuotaExceededException({
2857
- $metadata: deserializeMetadata(parsedOutput),
2858
- ...contents,
2859
- });
2860
- return __decorateServiceException(exception, parsedOutput.body);
2861
- };
2862
- const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2863
- const contents = map({});
2864
- const data = parsedOutput.body;
2865
- const doc = take(data, {
2866
- message: __expectString,
2867
- });
2868
- Object.assign(contents, doc);
2869
- const exception = new ServiceUnavailableException({
2870
- $metadata: deserializeMetadata(parsedOutput),
2871
- ...contents,
2872
- });
2873
- return __decorateServiceException(exception, parsedOutput.body);
2874
- };
2875
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2876
- const contents = map({});
2877
- const data = parsedOutput.body;
2878
- const doc = take(data, {
2879
- message: __expectString,
2880
- });
2881
- Object.assign(contents, doc);
2882
- const exception = new ThrottlingException({
2883
- $metadata: deserializeMetadata(parsedOutput),
2884
- ...contents,
2885
- });
2886
- return __decorateServiceException(exception, parsedOutput.body);
2887
- };
2888
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2889
- const contents = map({});
2890
- const data = parsedOutput.body;
2891
- const doc = take(data, {
2892
- message: __expectString,
2893
- resourceName: __expectString,
2894
- });
2895
- Object.assign(contents, doc);
2896
- const exception = new TooManyTagsException({
2897
- $metadata: deserializeMetadata(parsedOutput),
2898
- ...contents,
2899
- });
2900
- return __decorateServiceException(exception, parsedOutput.body);
2901
- };
2902
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
2903
- const contents = map({});
2904
- const data = parsedOutput.body;
2905
- const doc = take(data, {
2906
- message: __expectString,
2907
- });
2908
- Object.assign(contents, doc);
2909
- const exception = new ValidationException({
2910
- $metadata: deserializeMetadata(parsedOutput),
2911
- ...contents,
2912
- });
2913
- return __decorateServiceException(exception, parsedOutput.body);
2914
- };
2915
- const se_AdditionalModelRequestFields = (input, context) => {
2916
- return Object.entries(input).reduce((acc, [key, value]) => {
2917
- if (value === null) {
2918
- return acc;
2919
- }
2920
- acc[key] = se_AdditionalModelRequestFieldsValue(value, context);
2921
- return acc;
2922
- }, {});
2923
- };
2924
- const se_AdditionalModelRequestFieldsValue = (input, context) => {
2925
- return input;
2926
- };
2927
- const se_AutomatedEvaluationConfig = (input, context) => {
2928
- return take(input, {
2929
- customMetricConfig: (_) => se_AutomatedEvaluationCustomMetricConfig(_, context),
2930
- datasetMetricConfigs: _json,
2931
- evaluatorModelConfig: _json,
2932
- });
2933
- };
2934
- const se_AutomatedEvaluationCustomMetricConfig = (input, context) => {
2935
- return take(input, {
2936
- customMetrics: (_) => se_AutomatedEvaluationCustomMetrics(_, context),
2937
- evaluatorModelConfig: _json,
2938
- });
2939
- };
2940
- const se_AutomatedEvaluationCustomMetrics = (input, context) => {
2941
- return input
2942
- .filter((e) => e != null)
2943
- .map((entry) => {
2944
- return se_AutomatedEvaluationCustomMetricSource(entry, context);
2945
- });
2946
- };
2947
- const se_AutomatedEvaluationCustomMetricSource = (input, context) => {
2948
- return AutomatedEvaluationCustomMetricSource.visit(input, {
2949
- customMetricDefinition: (value) => ({ customMetricDefinition: se_CustomMetricDefinition(value, context) }),
2950
- _: (name, value) => ({ [name]: value }),
2951
- });
2952
- };
2953
- const se_AutomatedReasoningPolicyBuildWorkflowDocument = (input, context) => {
2954
- return take(input, {
2955
- document: context.base64Encoder,
2956
- documentContentType: [],
2957
- documentDescription: [],
2958
- documentName: [],
2959
- });
2960
- };
2961
- const se_AutomatedReasoningPolicyBuildWorkflowDocumentList = (input, context) => {
2962
- return input
2963
- .filter((e) => e != null)
2964
- .map((entry) => {
2965
- return se_AutomatedReasoningPolicyBuildWorkflowDocument(entry, context);
2966
- });
2967
- };
2968
- const se_AutomatedReasoningPolicyBuildWorkflowSource = (input, context) => {
2969
- return take(input, {
2970
- policyDefinition: _json,
2971
- workflowContent: (_) => se_AutomatedReasoningPolicyWorkflowTypeContent(_, context),
2972
- });
2973
- };
2974
- const se_AutomatedReasoningPolicyWorkflowTypeContent = (input, context) => {
2975
- return AutomatedReasoningPolicyWorkflowTypeContent.visit(input, {
2976
- documents: (value) => ({ documents: se_AutomatedReasoningPolicyBuildWorkflowDocumentList(value, context) }),
2977
- policyRepairAssets: (value) => ({ policyRepairAssets: _json(value) }),
2978
- _: (name, value) => ({ [name]: value }),
2979
- });
2980
- };
2981
- const se_ByteContentDoc = (input, context) => {
2982
- return take(input, {
2983
- contentType: [],
2984
- data: context.base64Encoder,
2985
- identifier: [],
2986
- });
2987
- };
2988
- const se_CustomMetricDefinition = (input, context) => {
2989
- return take(input, {
2990
- instructions: [],
2991
- name: [],
2992
- ratingScale: (_) => se_RatingScale(_, context),
2993
- });
2994
- };
2995
- const se_EvaluationConfig = (input, context) => {
2996
- return EvaluationConfig.visit(input, {
2997
- automated: (value) => ({ automated: se_AutomatedEvaluationConfig(value, context) }),
2998
- human: (value) => ({ human: _json(value) }),
2999
- _: (name, value) => ({ [name]: value }),
3000
- });
3001
- };
3002
- const se_EvaluationInferenceConfig = (input, context) => {
3003
- return EvaluationInferenceConfig.visit(input, {
3004
- models: (value) => ({ models: _json(value) }),
3005
- ragConfigs: (value) => ({ ragConfigs: se_RagConfigs(value, context) }),
3006
- _: (name, value) => ({ [name]: value }),
3007
- });
3008
- };
3009
- const se_ExternalSource = (input, context) => {
3010
- return take(input, {
3011
- byteContent: (_) => se_ByteContentDoc(_, context),
3012
- s3Location: _json,
3013
- sourceType: [],
3014
- });
3015
- };
3016
- const se_ExternalSources = (input, context) => {
3017
- return input
3018
- .filter((e) => e != null)
3019
- .map((entry) => {
3020
- return se_ExternalSource(entry, context);
3021
- });
3022
- };
3023
- const se_ExternalSourcesGenerationConfiguration = (input, context) => {
3024
- return take(input, {
3025
- additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
3026
- guardrailConfiguration: _json,
3027
- kbInferenceConfig: (_) => se_KbInferenceConfig(_, context),
3028
- promptTemplate: _json,
3029
- });
3030
- };
3031
- const se_ExternalSourcesRetrieveAndGenerateConfiguration = (input, context) => {
3032
- return take(input, {
3033
- generationConfiguration: (_) => se_ExternalSourcesGenerationConfiguration(_, context),
3034
- modelArn: [],
3035
- sources: (_) => se_ExternalSources(_, context),
3036
- });
3037
- };
3038
- const se_FilterAttribute = (input, context) => {
3039
- return take(input, {
3040
- key: [],
3041
- value: (_) => se_FilterValue(_, context),
3042
- });
3043
- };
3044
- const se_FilterValue = (input, context) => {
3045
- return input;
3046
- };
3047
- const se_GenerationConfiguration = (input, context) => {
3048
- return take(input, {
3049
- additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
3050
- guardrailConfiguration: _json,
3051
- kbInferenceConfig: (_) => se_KbInferenceConfig(_, context),
3052
- promptTemplate: _json,
3053
- });
3054
- };
3055
- const se_GuardrailAutomatedReasoningPolicyConfig = (input, context) => {
3056
- return take(input, {
3057
- confidenceThreshold: __serializeFloat,
3058
- policies: _json,
3059
- });
3060
- };
3061
- const se_GuardrailContextualGroundingFilterConfig = (input, context) => {
3062
- return take(input, {
3063
- action: [],
3064
- enabled: [],
3065
- threshold: __serializeFloat,
3066
- type: [],
3067
- });
3068
- };
3069
- const se_GuardrailContextualGroundingFiltersConfig = (input, context) => {
3070
- return input
3071
- .filter((e) => e != null)
3072
- .map((entry) => {
3073
- return se_GuardrailContextualGroundingFilterConfig(entry, context);
3074
- });
3075
- };
3076
- const se_GuardrailContextualGroundingPolicyConfig = (input, context) => {
3077
- return take(input, {
3078
- filtersConfig: (_) => se_GuardrailContextualGroundingFiltersConfig(_, context),
3079
- });
3080
- };
3081
- const se_KbInferenceConfig = (input, context) => {
3082
- return take(input, {
3083
- textInferenceConfig: (_) => se_TextInferenceConfig(_, context),
3084
- });
3085
- };
3086
- const se_KnowledgeBaseConfig = (input, context) => {
3087
- return KnowledgeBaseConfig.visit(input, {
3088
- retrieveAndGenerateConfig: (value) => ({
3089
- retrieveAndGenerateConfig: se_RetrieveAndGenerateConfiguration(value, context),
3090
- }),
3091
- retrieveConfig: (value) => ({ retrieveConfig: se_RetrieveConfig(value, context) }),
3092
- _: (name, value) => ({ [name]: value }),
3093
- });
3094
- };
3095
- const se_KnowledgeBaseRetrievalConfiguration = (input, context) => {
3096
- return take(input, {
3097
- vectorSearchConfiguration: (_) => se_KnowledgeBaseVectorSearchConfiguration(_, context),
3098
- });
3099
- };
3100
- const se_KnowledgeBaseRetrieveAndGenerateConfiguration = (input, context) => {
3101
- return take(input, {
3102
- generationConfiguration: (_) => se_GenerationConfiguration(_, context),
3103
- knowledgeBaseId: [],
3104
- modelArn: [],
3105
- orchestrationConfiguration: _json,
3106
- retrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),
3107
- });
3108
- };
3109
- const se_KnowledgeBaseVectorSearchConfiguration = (input, context) => {
3110
- return take(input, {
3111
- filter: (_) => se_RetrievalFilter(_, context),
3112
- implicitFilterConfiguration: _json,
3113
- numberOfResults: [],
3114
- overrideSearchType: [],
3115
- rerankingConfiguration: (_) => se_VectorSearchRerankingConfiguration(_, context),
3116
- });
3117
- };
3118
- const se_RAGConfig = (input, context) => {
3119
- return RAGConfig.visit(input, {
3120
- knowledgeBaseConfig: (value) => ({ knowledgeBaseConfig: se_KnowledgeBaseConfig(value, context) }),
3121
- precomputedRagSourceConfig: (value) => ({ precomputedRagSourceConfig: _json(value) }),
3122
- _: (name, value) => ({ [name]: value }),
3123
- });
3124
- };
3125
- const se_RagConfigs = (input, context) => {
3126
- return input
3127
- .filter((e) => e != null)
3128
- .map((entry) => {
3129
- return se_RAGConfig(entry, context);
3130
- });
3131
- };
3132
- const se_RatingScale = (input, context) => {
3133
- return input
3134
- .filter((e) => e != null)
3135
- .map((entry) => {
3136
- return se_RatingScaleItem(entry, context);
3137
- });
3138
- };
3139
- const se_RatingScaleItem = (input, context) => {
3140
- return take(input, {
3141
- definition: [],
3142
- value: (_) => se_RatingScaleItemValue(_, context),
3143
- });
3144
- };
3145
- const se_RatingScaleItemValue = (input, context) => {
3146
- return RatingScaleItemValue.visit(input, {
3147
- floatValue: (value) => ({ floatValue: __serializeFloat(value) }),
3148
- stringValue: (value) => ({ stringValue: value }),
3149
- _: (name, value) => ({ [name]: value }),
3150
- });
3151
- };
3152
- const se_RetrievalFilter = (input, context) => {
3153
- return RetrievalFilter.visit(input, {
3154
- andAll: (value) => ({ andAll: se_RetrievalFilterList(value, context) }),
3155
- equals: (value) => ({ equals: se_FilterAttribute(value, context) }),
3156
- greaterThan: (value) => ({ greaterThan: se_FilterAttribute(value, context) }),
3157
- greaterThanOrEquals: (value) => ({ greaterThanOrEquals: se_FilterAttribute(value, context) }),
3158
- in: (value) => ({ in: se_FilterAttribute(value, context) }),
3159
- lessThan: (value) => ({ lessThan: se_FilterAttribute(value, context) }),
3160
- lessThanOrEquals: (value) => ({ lessThanOrEquals: se_FilterAttribute(value, context) }),
3161
- listContains: (value) => ({ listContains: se_FilterAttribute(value, context) }),
3162
- notEquals: (value) => ({ notEquals: se_FilterAttribute(value, context) }),
3163
- notIn: (value) => ({ notIn: se_FilterAttribute(value, context) }),
3164
- orAll: (value) => ({ orAll: se_RetrievalFilterList(value, context) }),
3165
- startsWith: (value) => ({ startsWith: se_FilterAttribute(value, context) }),
3166
- stringContains: (value) => ({ stringContains: se_FilterAttribute(value, context) }),
3167
- _: (name, value) => ({ [name]: value }),
3168
- });
3169
- };
3170
- const se_RetrievalFilterList = (input, context) => {
3171
- return input
3172
- .filter((e) => e != null)
3173
- .map((entry) => {
3174
- return se_RetrievalFilter(entry, context);
3175
- });
3176
- };
3177
- const se_RetrieveAndGenerateConfiguration = (input, context) => {
3178
- return take(input, {
3179
- externalSourcesConfiguration: (_) => se_ExternalSourcesRetrieveAndGenerateConfiguration(_, context),
3180
- knowledgeBaseConfiguration: (_) => se_KnowledgeBaseRetrieveAndGenerateConfiguration(_, context),
3181
- type: [],
3182
- });
3183
- };
3184
- const se_RetrieveConfig = (input, context) => {
3185
- return take(input, {
3186
- knowledgeBaseId: [],
3187
- knowledgeBaseRetrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),
3188
- });
3189
- };
3190
- const se_RoutingCriteria = (input, context) => {
3191
- return take(input, {
3192
- responseQualityDifference: __serializeFloat,
3193
- });
3194
- };
3195
- const se_TextInferenceConfig = (input, context) => {
3196
- return take(input, {
3197
- maxTokens: [],
3198
- stopSequences: _json,
3199
- temperature: __serializeFloat,
3200
- topP: __serializeFloat,
3201
- });
3202
- };
3203
- const se_VectorSearchBedrockRerankingConfiguration = (input, context) => {
3204
- return take(input, {
3205
- metadataConfiguration: _json,
3206
- modelConfiguration: (_) => se_VectorSearchBedrockRerankingModelConfiguration(_, context),
3207
- numberOfRerankedResults: [],
3208
- });
3209
- };
3210
- const se_VectorSearchBedrockRerankingModelConfiguration = (input, context) => {
3211
- return take(input, {
3212
- additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
3213
- modelArn: [],
3214
- });
3215
- };
3216
- const se_VectorSearchRerankingConfiguration = (input, context) => {
3217
- return take(input, {
3218
- bedrockRerankingConfiguration: (_) => se_VectorSearchBedrockRerankingConfiguration(_, context),
3219
- type: [],
3220
- });
3221
- };
3222
- const de_AdditionalModelRequestFields = (output, context) => {
3223
- return Object.entries(output).reduce((acc, [key, value]) => {
3224
- if (value === null) {
3225
- return acc;
3226
- }
3227
- acc[key] = de_AdditionalModelRequestFieldsValue(value, context);
3228
- return acc;
3229
- }, {});
3230
- };
3231
- const de_AdditionalModelRequestFieldsValue = (output, context) => {
3232
- return output;
3233
- };
3234
- const de_AutomatedEvaluationConfig = (output, context) => {
3235
- return take(output, {
3236
- customMetricConfig: (_) => de_AutomatedEvaluationCustomMetricConfig(_, context),
3237
- datasetMetricConfigs: _json,
3238
- evaluatorModelConfig: (_) => _json(__expectUnion(_)),
3239
- });
3240
- };
3241
- const de_AutomatedEvaluationCustomMetricConfig = (output, context) => {
3242
- return take(output, {
3243
- customMetrics: (_) => de_AutomatedEvaluationCustomMetrics(_, context),
3244
- evaluatorModelConfig: _json,
3245
- });
3246
- };
3247
- const de_AutomatedEvaluationCustomMetrics = (output, context) => {
3248
- const retVal = (output || [])
3249
- .filter((e) => e != null)
3250
- .map((entry) => {
3251
- return de_AutomatedEvaluationCustomMetricSource(__expectUnion(entry), context);
3252
- });
3253
- return retVal;
3254
- };
3255
- const de_AutomatedEvaluationCustomMetricSource = (output, context) => {
3256
- if (output.customMetricDefinition != null) {
3257
- return {
3258
- customMetricDefinition: de_CustomMetricDefinition(output.customMetricDefinition, context),
3259
- };
3260
- }
3261
- return { $unknown: Object.entries(output)[0] };
3262
- };
3263
- const de_AutomatedReasoningCheckFinding = (output, context) => {
3264
- if (output.impossible != null) {
3265
- return {
3266
- impossible: de_AutomatedReasoningCheckImpossibleFinding(output.impossible, context),
3267
- };
3268
- }
3269
- if (output.invalid != null) {
3270
- return {
3271
- invalid: de_AutomatedReasoningCheckInvalidFinding(output.invalid, context),
3272
- };
3273
- }
3274
- if (output.noTranslations != null) {
3275
- return {
3276
- noTranslations: _json(output.noTranslations),
3277
- };
3278
- }
3279
- if (output.satisfiable != null) {
3280
- return {
3281
- satisfiable: de_AutomatedReasoningCheckSatisfiableFinding(output.satisfiable, context),
3282
- };
3283
- }
3284
- if (output.tooComplex != null) {
3285
- return {
3286
- tooComplex: _json(output.tooComplex),
3287
- };
3288
- }
3289
- if (output.translationAmbiguous != null) {
3290
- return {
3291
- translationAmbiguous: de_AutomatedReasoningCheckTranslationAmbiguousFinding(output.translationAmbiguous, context),
3292
- };
3293
- }
3294
- if (output.valid != null) {
3295
- return {
3296
- valid: de_AutomatedReasoningCheckValidFinding(output.valid, context),
3297
- };
3298
- }
3299
- return { $unknown: Object.entries(output)[0] };
3300
- };
3301
- const de_AutomatedReasoningCheckFindingList = (output, context) => {
3302
- const retVal = (output || [])
3303
- .filter((e) => e != null)
3304
- .map((entry) => {
3305
- return de_AutomatedReasoningCheckFinding(__expectUnion(entry), context);
3306
- });
3307
- return retVal;
3308
- };
3309
- const de_AutomatedReasoningCheckImpossibleFinding = (output, context) => {
3310
- return take(output, {
3311
- contradictingRules: _json,
3312
- logicWarning: _json,
3313
- translation: (_) => de_AutomatedReasoningCheckTranslation(_, context),
3314
- });
3315
- };
3316
- const de_AutomatedReasoningCheckInvalidFinding = (output, context) => {
3317
- return take(output, {
3318
- contradictingRules: _json,
3319
- logicWarning: _json,
3320
- translation: (_) => de_AutomatedReasoningCheckTranslation(_, context),
3321
- });
3322
- };
3323
- const de_AutomatedReasoningCheckSatisfiableFinding = (output, context) => {
3324
- return take(output, {
3325
- claimsFalseScenario: _json,
3326
- claimsTrueScenario: _json,
3327
- logicWarning: _json,
3328
- translation: (_) => de_AutomatedReasoningCheckTranslation(_, context),
3329
- });
3330
- };
3331
- const de_AutomatedReasoningCheckTranslation = (output, context) => {
3332
- return take(output, {
3333
- claims: _json,
3334
- confidence: __limitedParseDouble,
3335
- premises: _json,
3336
- untranslatedClaims: _json,
3337
- untranslatedPremises: _json,
3338
- });
3339
- };
3340
- const de_AutomatedReasoningCheckTranslationAmbiguousFinding = (output, context) => {
3341
- return take(output, {
3342
- differenceScenarios: _json,
3343
- options: (_) => de_AutomatedReasoningCheckTranslationOptionList(_, context),
3344
- });
3345
- };
3346
- const de_AutomatedReasoningCheckTranslationList = (output, context) => {
3347
- const retVal = (output || [])
3348
- .filter((e) => e != null)
3349
- .map((entry) => {
3350
- return de_AutomatedReasoningCheckTranslation(entry, context);
3351
- });
3352
- return retVal;
3353
- };
3354
- const de_AutomatedReasoningCheckTranslationOption = (output, context) => {
3355
- return take(output, {
3356
- translations: (_) => de_AutomatedReasoningCheckTranslationList(_, context),
3357
- });
3358
- };
3359
- const de_AutomatedReasoningCheckTranslationOptionList = (output, context) => {
3360
- const retVal = (output || [])
3361
- .filter((e) => e != null)
3362
- .map((entry) => {
3363
- return de_AutomatedReasoningCheckTranslationOption(entry, context);
3364
- });
3365
- return retVal;
3366
- };
3367
- const de_AutomatedReasoningCheckValidFinding = (output, context) => {
3368
- return take(output, {
3369
- claimsTrueScenario: _json,
3370
- logicWarning: _json,
3371
- supportingRules: _json,
3372
- translation: (_) => de_AutomatedReasoningCheckTranslation(_, context),
3373
- });
3374
- };
3375
- const de_AutomatedReasoningPolicyBuildLog = (output, context) => {
3376
- return take(output, {
3377
- entries: _json,
3378
- });
3379
- };
3380
- const de_AutomatedReasoningPolicyBuildResultAssets = (output, context) => {
3381
- if (output.buildLog != null) {
3382
- return {
3383
- buildLog: de_AutomatedReasoningPolicyBuildLog(output.buildLog, context),
3384
- };
3385
- }
3386
- if (output.policyDefinition != null) {
3387
- return {
3388
- policyDefinition: _json(output.policyDefinition),
3389
- };
3390
- }
3391
- if (output.qualityReport != null) {
3392
- return {
3393
- qualityReport: _json(output.qualityReport),
3394
- };
3395
- }
3396
- return { $unknown: Object.entries(output)[0] };
3397
- };
3398
- const de_AutomatedReasoningPolicyBuildWorkflowSummaries = (output, context) => {
3399
- const retVal = (output || [])
3400
- .filter((e) => e != null)
3401
- .map((entry) => {
3402
- return de_AutomatedReasoningPolicyBuildWorkflowSummary(entry, context);
3403
- });
3404
- return retVal;
3405
- };
3406
- const de_AutomatedReasoningPolicyBuildWorkflowSummary = (output, context) => {
3407
- return take(output, {
3408
- buildWorkflowId: __expectString,
3409
- buildWorkflowType: __expectString,
3410
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3411
- policyArn: __expectString,
3412
- status: __expectString,
3413
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3414
- });
3415
- };
3416
- const de_AutomatedReasoningPolicySummaries = (output, context) => {
3417
- const retVal = (output || [])
3418
- .filter((e) => e != null)
3419
- .map((entry) => {
3420
- return de_AutomatedReasoningPolicySummary(entry, context);
3421
- });
3422
- return retVal;
3423
- };
3424
- const de_AutomatedReasoningPolicySummary = (output, context) => {
3425
- return take(output, {
3426
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3427
- description: __expectString,
3428
- name: __expectString,
3429
- policyArn: __expectString,
3430
- policyId: __expectString,
3431
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3432
- version: __expectString,
3433
- });
3434
- };
3435
- const de_AutomatedReasoningPolicyTestCase = (output, context) => {
3436
- return take(output, {
3437
- confidenceThreshold: __limitedParseDouble,
3438
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3439
- expectedAggregatedFindingsResult: __expectString,
3440
- guardContent: __expectString,
3441
- queryContent: __expectString,
3442
- testCaseId: __expectString,
3443
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3444
- });
3445
- };
3446
- const de_AutomatedReasoningPolicyTestCaseList = (output, context) => {
3447
- const retVal = (output || [])
3448
- .filter((e) => e != null)
3449
- .map((entry) => {
3450
- return de_AutomatedReasoningPolicyTestCase(entry, context);
3451
- });
3452
- return retVal;
3453
- };
3454
- const de_AutomatedReasoningPolicyTestList = (output, context) => {
3455
- const retVal = (output || [])
3456
- .filter((e) => e != null)
3457
- .map((entry) => {
3458
- return de_AutomatedReasoningPolicyTestResult(entry, context);
3459
- });
3460
- return retVal;
3461
- };
3462
- const de_AutomatedReasoningPolicyTestResult = (output, context) => {
3463
- return take(output, {
3464
- aggregatedTestFindingsResult: __expectString,
3465
- policyArn: __expectString,
3466
- testCase: (_) => de_AutomatedReasoningPolicyTestCase(_, context),
3467
- testFindings: (_) => de_AutomatedReasoningCheckFindingList(_, context),
3468
- testRunResult: __expectString,
3469
- testRunStatus: __expectString,
3470
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3471
- });
3472
- };
3473
- const de_ByteContentDoc = (output, context) => {
3474
- return take(output, {
3475
- contentType: __expectString,
3476
- data: context.base64Decoder,
3477
- identifier: __expectString,
3478
- });
3479
- };
3480
- const de_CustomMetricDefinition = (output, context) => {
3481
- return take(output, {
3482
- instructions: __expectString,
3483
- name: __expectString,
3484
- ratingScale: (_) => de_RatingScale(_, context),
3485
- });
3486
- };
3487
- const de_CustomModelDeploymentSummary = (output, context) => {
3488
- return take(output, {
3489
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3490
- customModelDeploymentArn: __expectString,
3491
- customModelDeploymentName: __expectString,
3492
- failureMessage: __expectString,
3493
- lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3494
- modelArn: __expectString,
3495
- status: __expectString,
3496
- });
3497
- };
3498
- const de_CustomModelDeploymentSummaryList = (output, context) => {
3499
- const retVal = (output || [])
3500
- .filter((e) => e != null)
3501
- .map((entry) => {
3502
- return de_CustomModelDeploymentSummary(entry, context);
3503
- });
3504
- return retVal;
3505
- };
3506
- const de_CustomModelSummary = (output, context) => {
3507
- return take(output, {
3508
- baseModelArn: __expectString,
3509
- baseModelName: __expectString,
3510
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3511
- customizationType: __expectString,
3512
- modelArn: __expectString,
3513
- modelName: __expectString,
3514
- modelStatus: __expectString,
3515
- ownerAccountId: __expectString,
3516
- });
3517
- };
3518
- const de_CustomModelSummaryList = (output, context) => {
3519
- const retVal = (output || [])
3520
- .filter((e) => e != null)
3521
- .map((entry) => {
3522
- return de_CustomModelSummary(entry, context);
3523
- });
3524
- return retVal;
3525
- };
3526
- const de_DataProcessingDetails = (output, context) => {
3527
- return take(output, {
3528
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3529
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3530
- status: __expectString,
3531
- });
3532
- };
3533
- const de_EvaluationConfig = (output, context) => {
3534
- if (output.automated != null) {
3535
- return {
3536
- automated: de_AutomatedEvaluationConfig(output.automated, context),
3537
- };
3538
- }
3539
- if (output.human != null) {
3540
- return {
3541
- human: _json(output.human),
3542
- };
3543
- }
3544
- return { $unknown: Object.entries(output)[0] };
3545
- };
3546
- const de_EvaluationInferenceConfig = (output, context) => {
3547
- if (output.models != null) {
3548
- return {
3549
- models: _json(output.models),
3550
- };
3551
- }
3552
- if (output.ragConfigs != null) {
3553
- return {
3554
- ragConfigs: de_RagConfigs(output.ragConfigs, context),
3555
- };
3556
- }
3557
- return { $unknown: Object.entries(output)[0] };
3558
- };
3559
- const de_EvaluationSummaries = (output, context) => {
3560
- const retVal = (output || [])
3561
- .filter((e) => e != null)
3562
- .map((entry) => {
3563
- return de_EvaluationSummary(entry, context);
3564
- });
3565
- return retVal;
3566
- };
3567
- const de_EvaluationSummary = (output, context) => {
3568
- return take(output, {
3569
- applicationType: __expectString,
3570
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3571
- customMetricsEvaluatorModelIdentifiers: _json,
3572
- evaluationTaskTypes: _json,
3573
- evaluatorModelIdentifiers: _json,
3574
- inferenceConfigSummary: _json,
3575
- jobArn: __expectString,
3576
- jobName: __expectString,
3577
- jobType: __expectString,
3578
- modelIdentifiers: _json,
3579
- ragIdentifiers: _json,
3580
- status: __expectString,
3581
- });
3582
- };
3583
- const de_ExternalSource = (output, context) => {
3584
- return take(output, {
3585
- byteContent: (_) => de_ByteContentDoc(_, context),
3586
- s3Location: _json,
3587
- sourceType: __expectString,
3588
- });
3589
- };
3590
- const de_ExternalSources = (output, context) => {
3591
- const retVal = (output || [])
3592
- .filter((e) => e != null)
3593
- .map((entry) => {
3594
- return de_ExternalSource(entry, context);
3595
- });
3596
- return retVal;
3597
- };
3598
- const de_ExternalSourcesGenerationConfiguration = (output, context) => {
3599
- return take(output, {
3600
- additionalModelRequestFields: (_) => de_AdditionalModelRequestFields(_, context),
3601
- guardrailConfiguration: _json,
3602
- kbInferenceConfig: (_) => de_KbInferenceConfig(_, context),
3603
- promptTemplate: _json,
3604
- });
3605
- };
3606
- const de_ExternalSourcesRetrieveAndGenerateConfiguration = (output, context) => {
3607
- return take(output, {
3608
- generationConfiguration: (_) => de_ExternalSourcesGenerationConfiguration(_, context),
3609
- modelArn: __expectString,
3610
- sources: (_) => de_ExternalSources(_, context),
3611
- });
3612
- };
3613
- const de_FilterAttribute = (output, context) => {
3614
- return take(output, {
3615
- key: __expectString,
3616
- value: (_) => de_FilterValue(_, context),
3617
- });
3618
- };
3619
- const de_FilterValue = (output, context) => {
3620
- return output;
3621
- };
3622
- const de_GenerationConfiguration = (output, context) => {
3623
- return take(output, {
3624
- additionalModelRequestFields: (_) => de_AdditionalModelRequestFields(_, context),
3625
- guardrailConfiguration: _json,
3626
- kbInferenceConfig: (_) => de_KbInferenceConfig(_, context),
3627
- promptTemplate: _json,
3628
- });
3629
- };
3630
- const de_GuardrailAutomatedReasoningPolicy = (output, context) => {
3631
- return take(output, {
3632
- confidenceThreshold: __limitedParseDouble,
3633
- policies: _json,
3634
- });
3635
- };
3636
- const de_GuardrailContextualGroundingFilter = (output, context) => {
3637
- return take(output, {
3638
- action: __expectString,
3639
- enabled: __expectBoolean,
3640
- threshold: __limitedParseDouble,
3641
- type: __expectString,
3642
- });
3643
- };
3644
- const de_GuardrailContextualGroundingFilters = (output, context) => {
3645
- const retVal = (output || [])
3646
- .filter((e) => e != null)
3647
- .map((entry) => {
3648
- return de_GuardrailContextualGroundingFilter(entry, context);
3649
- });
3650
- return retVal;
3651
- };
3652
- const de_GuardrailContextualGroundingPolicy = (output, context) => {
3653
- return take(output, {
3654
- filters: (_) => de_GuardrailContextualGroundingFilters(_, context),
3655
- });
3656
- };
3657
- const de_GuardrailSummaries = (output, context) => {
3658
- const retVal = (output || [])
3659
- .filter((e) => e != null)
3660
- .map((entry) => {
3661
- return de_GuardrailSummary(entry, context);
3662
- });
3663
- return retVal;
3664
- };
3665
- const de_GuardrailSummary = (output, context) => {
3666
- return take(output, {
3667
- arn: __expectString,
3668
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3669
- crossRegionDetails: _json,
3670
- description: __expectString,
3671
- id: __expectString,
3672
- name: __expectString,
3673
- status: __expectString,
3674
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3675
- version: __expectString,
3676
- });
3677
- };
3678
- const de_ImportedModelSummary = (output, context) => {
3679
- return take(output, {
3680
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3681
- instructSupported: __expectBoolean,
3682
- modelArchitecture: __expectString,
3683
- modelArn: __expectString,
3684
- modelName: __expectString,
3685
- });
3686
- };
3687
- const de_ImportedModelSummaryList = (output, context) => {
3688
- const retVal = (output || [])
3689
- .filter((e) => e != null)
3690
- .map((entry) => {
3691
- return de_ImportedModelSummary(entry, context);
3692
- });
3693
- return retVal;
3694
- };
3695
- const de_InferenceProfileSummaries = (output, context) => {
3696
- const retVal = (output || [])
3697
- .filter((e) => e != null)
3698
- .map((entry) => {
3699
- return de_InferenceProfileSummary(entry, context);
3700
- });
3701
- return retVal;
3702
- };
3703
- const de_InferenceProfileSummary = (output, context) => {
3704
- return take(output, {
3705
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3706
- description: __expectString,
3707
- inferenceProfileArn: __expectString,
3708
- inferenceProfileId: __expectString,
3709
- inferenceProfileName: __expectString,
3710
- models: _json,
3711
- status: __expectString,
3712
- type: __expectString,
3713
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3714
- });
3715
- };
3716
- const de_KbInferenceConfig = (output, context) => {
3717
- return take(output, {
3718
- textInferenceConfig: (_) => de_TextInferenceConfig(_, context),
3719
- });
3720
- };
3721
- const de_KnowledgeBaseConfig = (output, context) => {
3722
- if (output.retrieveAndGenerateConfig != null) {
3723
- return {
3724
- retrieveAndGenerateConfig: de_RetrieveAndGenerateConfiguration(output.retrieveAndGenerateConfig, context),
3725
- };
3726
- }
3727
- if (output.retrieveConfig != null) {
3728
- return {
3729
- retrieveConfig: de_RetrieveConfig(output.retrieveConfig, context),
3730
- };
3731
- }
3732
- return { $unknown: Object.entries(output)[0] };
3733
- };
3734
- const de_KnowledgeBaseRetrievalConfiguration = (output, context) => {
3735
- return take(output, {
3736
- vectorSearchConfiguration: (_) => de_KnowledgeBaseVectorSearchConfiguration(_, context),
3737
- });
3738
- };
3739
- const de_KnowledgeBaseRetrieveAndGenerateConfiguration = (output, context) => {
3740
- return take(output, {
3741
- generationConfiguration: (_) => de_GenerationConfiguration(_, context),
3742
- knowledgeBaseId: __expectString,
3743
- modelArn: __expectString,
3744
- orchestrationConfiguration: _json,
3745
- retrievalConfiguration: (_) => de_KnowledgeBaseRetrievalConfiguration(_, context),
3746
- });
3747
- };
3748
- const de_KnowledgeBaseVectorSearchConfiguration = (output, context) => {
3749
- return take(output, {
3750
- filter: (_) => de_RetrievalFilter(__expectUnion(_), context),
3751
- implicitFilterConfiguration: _json,
3752
- numberOfResults: __expectInt32,
3753
- overrideSearchType: __expectString,
3754
- rerankingConfiguration: (_) => de_VectorSearchRerankingConfiguration(_, context),
3755
- });
3756
- };
3757
- const de_MarketplaceModelEndpoint = (output, context) => {
3758
- return take(output, {
3759
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3760
- endpointArn: __expectString,
3761
- endpointConfig: (_) => _json(__expectUnion(_)),
3762
- endpointStatus: __expectString,
3763
- endpointStatusMessage: __expectString,
3764
- modelSourceIdentifier: __expectString,
3765
- status: __expectString,
3766
- statusMessage: __expectString,
3767
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3768
- });
3769
- };
3770
- const de_MarketplaceModelEndpointSummaries = (output, context) => {
3771
- const retVal = (output || [])
3772
- .filter((e) => e != null)
3773
- .map((entry) => {
3774
- return de_MarketplaceModelEndpointSummary(entry, context);
3775
- });
3776
- return retVal;
3777
- };
3778
- const de_MarketplaceModelEndpointSummary = (output, context) => {
3779
- return take(output, {
3780
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3781
- endpointArn: __expectString,
3782
- modelSourceIdentifier: __expectString,
3783
- status: __expectString,
3784
- statusMessage: __expectString,
3785
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3786
- });
3787
- };
3788
- const de_ModelCopyJobSummaries = (output, context) => {
3789
- const retVal = (output || [])
3790
- .filter((e) => e != null)
3791
- .map((entry) => {
3792
- return de_ModelCopyJobSummary(entry, context);
3793
- });
3794
- return retVal;
3795
- };
3796
- const de_ModelCopyJobSummary = (output, context) => {
3797
- return take(output, {
3798
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3799
- failureMessage: __expectString,
3800
- jobArn: __expectString,
3801
- sourceAccountId: __expectString,
3802
- sourceModelArn: __expectString,
3803
- sourceModelName: __expectString,
3804
- status: __expectString,
3805
- targetModelArn: __expectString,
3806
- targetModelKmsKeyArn: __expectString,
3807
- targetModelName: __expectString,
3808
- targetModelTags: _json,
3809
- });
3810
- };
3811
- const de_ModelCustomizationJobSummaries = (output, context) => {
3812
- const retVal = (output || [])
3813
- .filter((e) => e != null)
3814
- .map((entry) => {
3815
- return de_ModelCustomizationJobSummary(entry, context);
3816
- });
3817
- return retVal;
3818
- };
3819
- const de_ModelCustomizationJobSummary = (output, context) => {
3820
- return take(output, {
3821
- baseModelArn: __expectString,
3822
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3823
- customModelArn: __expectString,
3824
- customModelName: __expectString,
3825
- customizationType: __expectString,
3826
- endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3827
- jobArn: __expectString,
3828
- jobName: __expectString,
3829
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3830
- status: __expectString,
3831
- statusDetails: (_) => de_StatusDetails(_, context),
3832
- });
3833
- };
3834
- const de_ModelImportJobSummaries = (output, context) => {
3835
- const retVal = (output || [])
3836
- .filter((e) => e != null)
3837
- .map((entry) => {
3838
- return de_ModelImportJobSummary(entry, context);
3839
- });
3840
- return retVal;
3841
- };
3842
- const de_ModelImportJobSummary = (output, context) => {
3843
- return take(output, {
3844
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3845
- endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3846
- importedModelArn: __expectString,
3847
- importedModelName: __expectString,
3848
- jobArn: __expectString,
3849
- jobName: __expectString,
3850
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3851
- status: __expectString,
3852
- });
3853
- };
3854
- const de_ModelInvocationJobSummaries = (output, context) => {
3855
- const retVal = (output || [])
3856
- .filter((e) => e != null)
3857
- .map((entry) => {
3858
- return de_ModelInvocationJobSummary(entry, context);
3859
- });
3860
- return retVal;
3861
- };
3862
- const de_ModelInvocationJobSummary = (output, context) => {
3863
- return take(output, {
3864
- clientRequestToken: __expectString,
3865
- endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3866
- inputDataConfig: (_) => _json(__expectUnion(_)),
3867
- jobArn: __expectString,
3868
- jobExpirationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3869
- jobName: __expectString,
3870
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3871
- message: __expectString,
3872
- modelId: __expectString,
3873
- outputDataConfig: (_) => _json(__expectUnion(_)),
3874
- roleArn: __expectString,
3875
- status: __expectString,
3876
- submitTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3877
- timeoutDurationInHours: __expectInt32,
3878
- vpcConfig: _json,
3879
- });
3880
- };
3881
- const de_PromptRouterSummaries = (output, context) => {
3882
- const retVal = (output || [])
3883
- .filter((e) => e != null)
3884
- .map((entry) => {
3885
- return de_PromptRouterSummary(entry, context);
3886
- });
3887
- return retVal;
3888
- };
3889
- const de_PromptRouterSummary = (output, context) => {
3890
- return take(output, {
3891
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3892
- description: __expectString,
3893
- fallbackModel: _json,
3894
- models: _json,
3895
- promptRouterArn: __expectString,
3896
- promptRouterName: __expectString,
3897
- routingCriteria: (_) => de_RoutingCriteria(_, context),
3898
- status: __expectString,
3899
- type: __expectString,
3900
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3901
- });
3902
- };
3903
- const de_ProvisionedModelSummaries = (output, context) => {
3904
- const retVal = (output || [])
3905
- .filter((e) => e != null)
3906
- .map((entry) => {
3907
- return de_ProvisionedModelSummary(entry, context);
3908
- });
3909
- return retVal;
3910
- };
3911
- const de_ProvisionedModelSummary = (output, context) => {
3912
- return take(output, {
3913
- commitmentDuration: __expectString,
3914
- commitmentExpirationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3915
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3916
- desiredModelArn: __expectString,
3917
- desiredModelUnits: __expectInt32,
3918
- foundationModelArn: __expectString,
3919
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3920
- modelArn: __expectString,
3921
- modelUnits: __expectInt32,
3922
- provisionedModelArn: __expectString,
3923
- provisionedModelName: __expectString,
3924
- status: __expectString,
3925
- });
3926
- };
3927
- const de_RAGConfig = (output, context) => {
3928
- if (output.knowledgeBaseConfig != null) {
3929
- return {
3930
- knowledgeBaseConfig: de_KnowledgeBaseConfig(__expectUnion(output.knowledgeBaseConfig), context),
3931
- };
3932
- }
3933
- if (output.precomputedRagSourceConfig != null) {
3934
- return {
3935
- precomputedRagSourceConfig: _json(__expectUnion(output.precomputedRagSourceConfig)),
3936
- };
3937
- }
3938
- return { $unknown: Object.entries(output)[0] };
3939
- };
3940
- const de_RagConfigs = (output, context) => {
3941
- const retVal = (output || [])
3942
- .filter((e) => e != null)
3943
- .map((entry) => {
3944
- return de_RAGConfig(__expectUnion(entry), context);
3945
- });
3946
- return retVal;
3947
- };
3948
- const de_RatingScale = (output, context) => {
3949
- const retVal = (output || [])
3950
- .filter((e) => e != null)
3951
- .map((entry) => {
3952
- return de_RatingScaleItem(entry, context);
3953
- });
3954
- return retVal;
3955
- };
3956
- const de_RatingScaleItem = (output, context) => {
3957
- return take(output, {
3958
- definition: __expectString,
3959
- value: (_) => de_RatingScaleItemValue(__expectUnion(_), context),
3960
- });
3961
- };
3962
- const de_RatingScaleItemValue = (output, context) => {
3963
- if (__limitedParseFloat32(output.floatValue) !== undefined) {
3964
- return { floatValue: __limitedParseFloat32(output.floatValue) };
3965
- }
3966
- if (__expectString(output.stringValue) !== undefined) {
3967
- return { stringValue: __expectString(output.stringValue) };
3968
- }
3969
- return { $unknown: Object.entries(output)[0] };
3970
- };
3971
- const de_RetrievalFilter = (output, context) => {
3972
- if (output.andAll != null) {
3973
- return {
3974
- andAll: de_RetrievalFilterList(output.andAll, context),
3975
- };
3976
- }
3977
- if (output.equals != null) {
3978
- return {
3979
- equals: de_FilterAttribute(output.equals, context),
3980
- };
3981
- }
3982
- if (output.greaterThan != null) {
3983
- return {
3984
- greaterThan: de_FilterAttribute(output.greaterThan, context),
3985
- };
3986
- }
3987
- if (output.greaterThanOrEquals != null) {
3988
- return {
3989
- greaterThanOrEquals: de_FilterAttribute(output.greaterThanOrEquals, context),
3990
- };
3991
- }
3992
- if (output.in != null) {
3993
- return {
3994
- in: de_FilterAttribute(output.in, context),
3995
- };
3996
- }
3997
- if (output.lessThan != null) {
3998
- return {
3999
- lessThan: de_FilterAttribute(output.lessThan, context),
4000
- };
4001
- }
4002
- if (output.lessThanOrEquals != null) {
4003
- return {
4004
- lessThanOrEquals: de_FilterAttribute(output.lessThanOrEquals, context),
4005
- };
4006
- }
4007
- if (output.listContains != null) {
4008
- return {
4009
- listContains: de_FilterAttribute(output.listContains, context),
4010
- };
4011
- }
4012
- if (output.notEquals != null) {
4013
- return {
4014
- notEquals: de_FilterAttribute(output.notEquals, context),
4015
- };
4016
- }
4017
- if (output.notIn != null) {
4018
- return {
4019
- notIn: de_FilterAttribute(output.notIn, context),
4020
- };
4021
- }
4022
- if (output.orAll != null) {
4023
- return {
4024
- orAll: de_RetrievalFilterList(output.orAll, context),
4025
- };
4026
- }
4027
- if (output.startsWith != null) {
4028
- return {
4029
- startsWith: de_FilterAttribute(output.startsWith, context),
4030
- };
4031
- }
4032
- if (output.stringContains != null) {
4033
- return {
4034
- stringContains: de_FilterAttribute(output.stringContains, context),
4035
- };
4036
- }
4037
- return { $unknown: Object.entries(output)[0] };
4038
- };
4039
- const de_RetrievalFilterList = (output, context) => {
4040
- const retVal = (output || [])
4041
- .filter((e) => e != null)
4042
- .map((entry) => {
4043
- return de_RetrievalFilter(__expectUnion(entry), context);
4044
- });
4045
- return retVal;
4046
- };
4047
- const de_RetrieveAndGenerateConfiguration = (output, context) => {
4048
- return take(output, {
4049
- externalSourcesConfiguration: (_) => de_ExternalSourcesRetrieveAndGenerateConfiguration(_, context),
4050
- knowledgeBaseConfiguration: (_) => de_KnowledgeBaseRetrieveAndGenerateConfiguration(_, context),
4051
- type: __expectString,
4052
- });
4053
- };
4054
- const de_RetrieveConfig = (output, context) => {
4055
- return take(output, {
4056
- knowledgeBaseId: __expectString,
4057
- knowledgeBaseRetrievalConfiguration: (_) => de_KnowledgeBaseRetrievalConfiguration(_, context),
4058
- });
4059
- };
4060
- const de_RoutingCriteria = (output, context) => {
4061
- return take(output, {
4062
- responseQualityDifference: __limitedParseDouble,
4063
- });
4064
- };
4065
- const de_StatusDetails = (output, context) => {
4066
- return take(output, {
4067
- dataProcessingDetails: (_) => de_DataProcessingDetails(_, context),
4068
- trainingDetails: (_) => de_TrainingDetails(_, context),
4069
- validationDetails: (_) => de_ValidationDetails(_, context),
4070
- });
4071
- };
4072
- const de_TextInferenceConfig = (output, context) => {
4073
- return take(output, {
4074
- maxTokens: __expectInt32,
4075
- stopSequences: _json,
4076
- temperature: __limitedParseFloat32,
4077
- topP: __limitedParseFloat32,
4078
- });
4079
- };
4080
- const de_TrainingDetails = (output, context) => {
4081
- return take(output, {
4082
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
4083
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
4084
- status: __expectString,
4085
- });
4086
- };
4087
- const de_TrainingMetrics = (output, context) => {
4088
- return take(output, {
4089
- trainingLoss: __limitedParseFloat32,
4090
- });
4091
- };
4092
- const de_ValidationDetails = (output, context) => {
4093
- return take(output, {
4094
- creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
4095
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
4096
- status: __expectString,
4097
- });
4098
- };
4099
- const de_ValidationMetrics = (output, context) => {
4100
- const retVal = (output || [])
4101
- .filter((e) => e != null)
4102
- .map((entry) => {
4103
- return de_ValidatorMetric(entry, context);
4104
- });
4105
- return retVal;
4106
- };
4107
- const de_ValidatorMetric = (output, context) => {
4108
- return take(output, {
4109
- validationLoss: __limitedParseFloat32,
4110
- });
4111
- };
4112
- const de_VectorSearchBedrockRerankingConfiguration = (output, context) => {
4113
- return take(output, {
4114
- metadataConfiguration: _json,
4115
- modelConfiguration: (_) => de_VectorSearchBedrockRerankingModelConfiguration(_, context),
4116
- numberOfRerankedResults: __expectInt32,
4117
- });
4118
- };
4119
- const de_VectorSearchBedrockRerankingModelConfiguration = (output, context) => {
4120
- return take(output, {
4121
- additionalModelRequestFields: (_) => de_AdditionalModelRequestFields(_, context),
4122
- modelArn: __expectString,
4123
- });
4124
- };
4125
- const de_VectorSearchRerankingConfiguration = (output, context) => {
4126
- return take(output, {
4127
- bedrockRerankingConfiguration: (_) => de_VectorSearchBedrockRerankingConfiguration(_, context),
4128
- type: __expectString,
4129
- });
4130
- };
4131
- const deserializeMetadata = (output) => ({
4132
- httpStatusCode: output.statusCode,
4133
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
4134
- extendedRequestId: output.headers["x-amz-id-2"],
4135
- cfId: output.headers["x-amz-cf-id"],
4136
- });
4137
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
4138
- const _aT = "assetType";
4139
- const _aTE = "applicationTypeEquals";
4140
- const _bCT = "byCustomizationType";
4141
- const _bIT = "byInferenceType";
4142
- const _bMAE = "baseModelArnEquals";
4143
- const _bOM = "byOutputModality";
4144
- const _bP = "byProvider";
4145
- const _cA = "createdAfter";
4146
- const _cB = "createdBefore";
4147
- const _cRT = "clientRequestToken";
4148
- const _cTA = "creationTimeAfter";
4149
- const _cTB = "creationTimeBefore";
4150
- const _f = "force";
4151
- const _fMAE = "foundationModelArnEquals";
4152
- const _gI = "guardrailIdentifier";
4153
- const _gV = "guardrailVersion";
4154
- const _iO = "isOwned";
4155
- const _lUA = "lastUpdatedAt";
4156
- const _mAE = "modelArnEquals";
4157
- const _mR = "maxResults";
4158
- const _mS = "modelStatus";
4159
- const _mSE = "modelSourceEquals";
4160
- const _mSI = "modelSourceIdentifier";
4161
- const _nC = "nameContains";
4162
- const _nT = "nextToken";
4163
- const _oMNC = "outputModelNameContains";
4164
- const _oT = "offerType";
4165
- const _pA = "policyArn";
4166
- const _sAE = "sourceAccountEquals";
4167
- const _sB = "sortBy";
4168
- const _sE = "statusEquals";
4169
- const _sMAE = "sourceModelArnEquals";
4170
- const _sO = "sortOrder";
4171
- const _sTA = "submitTimeAfter";
4172
- const _sTB = "submitTimeBefore";
4173
- const _t = "type";
4174
- const _tE = "typeEquals";
4175
- const _tMNC = "targetModelNameContains";
4176
- const _uA = "updatedAt";
4177
- const _xact = "x-amz-client-token";