@aws-sdk/client-lookoutequipment 3.35.0 → 3.38.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 (240) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/LookoutEquipment.js +0 -5
  3. package/dist-cjs/LookoutEquipmentClient.js +0 -10
  4. package/dist-cjs/commands/CreateDatasetCommand.js +0 -28
  5. package/dist-cjs/commands/CreateInferenceSchedulerCommand.js +0 -29
  6. package/dist-cjs/commands/CreateModelCommand.js +0 -33
  7. package/dist-cjs/commands/DeleteDatasetCommand.js +0 -29
  8. package/dist-cjs/commands/DeleteInferenceSchedulerCommand.js +0 -26
  9. package/dist-cjs/commands/DeleteModelCommand.js +0 -26
  10. package/dist-cjs/commands/DescribeDataIngestionJobCommand.js +0 -26
  11. package/dist-cjs/commands/DescribeDatasetCommand.js +0 -25
  12. package/dist-cjs/commands/DescribeInferenceSchedulerCommand.js +0 -26
  13. package/dist-cjs/commands/DescribeModelCommand.js +0 -26
  14. package/dist-cjs/commands/ListDataIngestionJobsCommand.js +0 -26
  15. package/dist-cjs/commands/ListDatasetsCommand.js +0 -26
  16. package/dist-cjs/commands/ListInferenceExecutionsCommand.js +0 -26
  17. package/dist-cjs/commands/ListInferenceSchedulersCommand.js +0 -26
  18. package/dist-cjs/commands/ListModelsCommand.js +0 -26
  19. package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -25
  20. package/dist-cjs/commands/StartDataIngestionJobCommand.js +0 -25
  21. package/dist-cjs/commands/StartInferenceSchedulerCommand.js +0 -25
  22. package/dist-cjs/commands/StopInferenceSchedulerCommand.js +0 -25
  23. package/dist-cjs/commands/TagResourceCommand.js +0 -29
  24. package/dist-cjs/commands/UntagResourceCommand.js +0 -25
  25. package/dist-cjs/commands/UpdateInferenceSchedulerCommand.js +0 -25
  26. package/dist-cjs/commands/index.js +25 -0
  27. package/dist-cjs/endpoints.js +1 -2
  28. package/dist-cjs/index.js +4 -31
  29. package/dist-cjs/models/index.js +0 -1
  30. package/dist-cjs/models/models_0.js +0 -196
  31. package/dist-cjs/pagination/Interfaces.js +0 -1
  32. package/dist-cjs/pagination/ListDataIngestionJobsPaginator.js +0 -11
  33. package/dist-cjs/pagination/ListDatasetsPaginator.js +0 -11
  34. package/dist-cjs/pagination/ListInferenceExecutionsPaginator.js +0 -11
  35. package/dist-cjs/pagination/ListInferenceSchedulersPaginator.js +0 -11
  36. package/dist-cjs/pagination/ListModelsPaginator.js +0 -11
  37. package/dist-cjs/pagination/index.js +9 -0
  38. package/dist-cjs/protocols/Aws_json1_0.js +0 -6
  39. package/dist-cjs/runtimeConfig.browser.js +1 -6
  40. package/dist-cjs/runtimeConfig.js +2 -7
  41. package/dist-cjs/runtimeConfig.native.js +0 -4
  42. package/dist-cjs/runtimeConfig.shared.js +0 -4
  43. package/dist-es/LookoutEquipment.js +0 -1
  44. package/dist-es/LookoutEquipmentClient.js +0 -1
  45. package/dist-es/commands/CreateDatasetCommand.js +0 -1
  46. package/dist-es/commands/CreateInferenceSchedulerCommand.js +0 -1
  47. package/dist-es/commands/CreateModelCommand.js +0 -1
  48. package/dist-es/commands/DeleteDatasetCommand.js +0 -1
  49. package/dist-es/commands/DeleteInferenceSchedulerCommand.js +0 -1
  50. package/dist-es/commands/DeleteModelCommand.js +0 -1
  51. package/dist-es/commands/DescribeDataIngestionJobCommand.js +0 -1
  52. package/dist-es/commands/DescribeDatasetCommand.js +0 -1
  53. package/dist-es/commands/DescribeInferenceSchedulerCommand.js +0 -1
  54. package/dist-es/commands/DescribeModelCommand.js +0 -1
  55. package/dist-es/commands/ListDataIngestionJobsCommand.js +0 -1
  56. package/dist-es/commands/ListDatasetsCommand.js +0 -1
  57. package/dist-es/commands/ListInferenceExecutionsCommand.js +0 -1
  58. package/dist-es/commands/ListInferenceSchedulersCommand.js +0 -1
  59. package/dist-es/commands/ListModelsCommand.js +0 -1
  60. package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
  61. package/dist-es/commands/StartDataIngestionJobCommand.js +0 -1
  62. package/dist-es/commands/StartInferenceSchedulerCommand.js +0 -1
  63. package/dist-es/commands/StopInferenceSchedulerCommand.js +0 -1
  64. package/dist-es/commands/TagResourceCommand.js +0 -1
  65. package/dist-es/commands/UntagResourceCommand.js +0 -1
  66. package/dist-es/commands/UpdateInferenceSchedulerCommand.js +0 -1
  67. package/dist-es/commands/index.js +22 -0
  68. package/dist-es/endpoints.js +1 -2
  69. package/dist-es/index.js +4 -31
  70. package/dist-es/models/index.js +0 -1
  71. package/dist-es/models/models_0.js +0 -1
  72. package/dist-es/pagination/Interfaces.js +0 -1
  73. package/dist-es/pagination/ListDataIngestionJobsPaginator.js +0 -1
  74. package/dist-es/pagination/ListDatasetsPaginator.js +0 -1
  75. package/dist-es/pagination/ListInferenceExecutionsPaginator.js +0 -1
  76. package/dist-es/pagination/ListInferenceSchedulersPaginator.js +0 -1
  77. package/dist-es/pagination/ListModelsPaginator.js +0 -1
  78. package/dist-es/pagination/index.js +6 -0
  79. package/dist-es/protocols/Aws_json1_0.js +0 -1
  80. package/dist-es/runtimeConfig.browser.js +1 -2
  81. package/dist-es/runtimeConfig.js +2 -3
  82. package/dist-es/runtimeConfig.native.js +0 -1
  83. package/dist-es/runtimeConfig.shared.js +0 -1
  84. package/dist-types/commands/index.d.ts +22 -0
  85. package/dist-types/index.d.ts +4 -30
  86. package/dist-types/pagination/index.d.ts +6 -0
  87. package/dist-types/ts3.4/LookoutEquipment.d.ts +23 -103
  88. package/dist-types/ts3.4/LookoutEquipmentClient.d.ts +24 -90
  89. package/dist-types/ts3.4/commands/CreateDatasetCommand.d.ts +2 -23
  90. package/dist-types/ts3.4/commands/CreateInferenceSchedulerCommand.d.ts +2 -24
  91. package/dist-types/ts3.4/commands/CreateModelCommand.d.ts +2 -28
  92. package/dist-types/ts3.4/commands/DeleteDatasetCommand.d.ts +2 -24
  93. package/dist-types/ts3.4/commands/DeleteInferenceSchedulerCommand.d.ts +2 -21
  94. package/dist-types/ts3.4/commands/DeleteModelCommand.d.ts +2 -21
  95. package/dist-types/ts3.4/commands/DescribeDataIngestionJobCommand.d.ts +2 -21
  96. package/dist-types/ts3.4/commands/DescribeDatasetCommand.d.ts +2 -20
  97. package/dist-types/ts3.4/commands/DescribeInferenceSchedulerCommand.d.ts +2 -21
  98. package/dist-types/ts3.4/commands/DescribeModelCommand.d.ts +2 -21
  99. package/dist-types/ts3.4/commands/ListDataIngestionJobsCommand.d.ts +2 -21
  100. package/dist-types/ts3.4/commands/ListDatasetsCommand.d.ts +2 -21
  101. package/dist-types/ts3.4/commands/ListInferenceExecutionsCommand.d.ts +2 -21
  102. package/dist-types/ts3.4/commands/ListInferenceSchedulersCommand.d.ts +2 -21
  103. package/dist-types/ts3.4/commands/ListModelsCommand.d.ts +2 -21
  104. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +2 -20
  105. package/dist-types/ts3.4/commands/StartDataIngestionJobCommand.d.ts +2 -20
  106. package/dist-types/ts3.4/commands/StartInferenceSchedulerCommand.d.ts +2 -20
  107. package/dist-types/ts3.4/commands/StopInferenceSchedulerCommand.d.ts +2 -20
  108. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +2 -24
  109. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +2 -20
  110. package/dist-types/ts3.4/commands/UpdateInferenceSchedulerCommand.d.ts +2 -20
  111. package/dist-types/ts3.4/commands/index.d.ts +22 -0
  112. package/dist-types/ts3.4/index.d.ts +4 -30
  113. package/dist-types/ts3.4/models/models_0.d.ts +302 -1080
  114. package/dist-types/ts3.4/pagination/index.d.ts +6 -0
  115. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  116. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  117. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  118. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  119. package/package.json +33 -30
  120. package/dist-cjs/LookoutEquipment.js.map +0 -1
  121. package/dist-cjs/LookoutEquipmentClient.js.map +0 -1
  122. package/dist-cjs/commands/CreateDatasetCommand.js.map +0 -1
  123. package/dist-cjs/commands/CreateInferenceSchedulerCommand.js.map +0 -1
  124. package/dist-cjs/commands/CreateModelCommand.js.map +0 -1
  125. package/dist-cjs/commands/DeleteDatasetCommand.js.map +0 -1
  126. package/dist-cjs/commands/DeleteInferenceSchedulerCommand.js.map +0 -1
  127. package/dist-cjs/commands/DeleteModelCommand.js.map +0 -1
  128. package/dist-cjs/commands/DescribeDataIngestionJobCommand.js.map +0 -1
  129. package/dist-cjs/commands/DescribeDatasetCommand.js.map +0 -1
  130. package/dist-cjs/commands/DescribeInferenceSchedulerCommand.js.map +0 -1
  131. package/dist-cjs/commands/DescribeModelCommand.js.map +0 -1
  132. package/dist-cjs/commands/ListDataIngestionJobsCommand.js.map +0 -1
  133. package/dist-cjs/commands/ListDatasetsCommand.js.map +0 -1
  134. package/dist-cjs/commands/ListInferenceExecutionsCommand.js.map +0 -1
  135. package/dist-cjs/commands/ListInferenceSchedulersCommand.js.map +0 -1
  136. package/dist-cjs/commands/ListModelsCommand.js.map +0 -1
  137. package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
  138. package/dist-cjs/commands/StartDataIngestionJobCommand.js.map +0 -1
  139. package/dist-cjs/commands/StartInferenceSchedulerCommand.js.map +0 -1
  140. package/dist-cjs/commands/StopInferenceSchedulerCommand.js.map +0 -1
  141. package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
  142. package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
  143. package/dist-cjs/commands/UpdateInferenceSchedulerCommand.js.map +0 -1
  144. package/dist-cjs/endpoints.js.map +0 -1
  145. package/dist-cjs/index.js.map +0 -1
  146. package/dist-cjs/models/index.js.map +0 -1
  147. package/dist-cjs/models/models_0.js.map +0 -1
  148. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  149. package/dist-cjs/pagination/ListDataIngestionJobsPaginator.js.map +0 -1
  150. package/dist-cjs/pagination/ListDatasetsPaginator.js.map +0 -1
  151. package/dist-cjs/pagination/ListInferenceExecutionsPaginator.js.map +0 -1
  152. package/dist-cjs/pagination/ListInferenceSchedulersPaginator.js.map +0 -1
  153. package/dist-cjs/pagination/ListModelsPaginator.js.map +0 -1
  154. package/dist-cjs/protocols/Aws_json1_0.js.map +0 -1
  155. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  156. package/dist-cjs/runtimeConfig.js.map +0 -1
  157. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  158. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  159. package/dist-es/LookoutEquipment.js.map +0 -1
  160. package/dist-es/LookoutEquipmentClient.js.map +0 -1
  161. package/dist-es/commands/CreateDatasetCommand.js.map +0 -1
  162. package/dist-es/commands/CreateInferenceSchedulerCommand.js.map +0 -1
  163. package/dist-es/commands/CreateModelCommand.js.map +0 -1
  164. package/dist-es/commands/DeleteDatasetCommand.js.map +0 -1
  165. package/dist-es/commands/DeleteInferenceSchedulerCommand.js.map +0 -1
  166. package/dist-es/commands/DeleteModelCommand.js.map +0 -1
  167. package/dist-es/commands/DescribeDataIngestionJobCommand.js.map +0 -1
  168. package/dist-es/commands/DescribeDatasetCommand.js.map +0 -1
  169. package/dist-es/commands/DescribeInferenceSchedulerCommand.js.map +0 -1
  170. package/dist-es/commands/DescribeModelCommand.js.map +0 -1
  171. package/dist-es/commands/ListDataIngestionJobsCommand.js.map +0 -1
  172. package/dist-es/commands/ListDatasetsCommand.js.map +0 -1
  173. package/dist-es/commands/ListInferenceExecutionsCommand.js.map +0 -1
  174. package/dist-es/commands/ListInferenceSchedulersCommand.js.map +0 -1
  175. package/dist-es/commands/ListModelsCommand.js.map +0 -1
  176. package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
  177. package/dist-es/commands/StartDataIngestionJobCommand.js.map +0 -1
  178. package/dist-es/commands/StartInferenceSchedulerCommand.js.map +0 -1
  179. package/dist-es/commands/StopInferenceSchedulerCommand.js.map +0 -1
  180. package/dist-es/commands/TagResourceCommand.js.map +0 -1
  181. package/dist-es/commands/UntagResourceCommand.js.map +0 -1
  182. package/dist-es/commands/UpdateInferenceSchedulerCommand.js.map +0 -1
  183. package/dist-es/endpoints.js.map +0 -1
  184. package/dist-es/index.js.map +0 -1
  185. package/dist-es/models/index.js.map +0 -1
  186. package/dist-es/models/models_0.js.map +0 -1
  187. package/dist-es/pagination/Interfaces.js.map +0 -1
  188. package/dist-es/pagination/ListDataIngestionJobsPaginator.js.map +0 -1
  189. package/dist-es/pagination/ListDatasetsPaginator.js.map +0 -1
  190. package/dist-es/pagination/ListInferenceExecutionsPaginator.js.map +0 -1
  191. package/dist-es/pagination/ListInferenceSchedulersPaginator.js.map +0 -1
  192. package/dist-es/pagination/ListModelsPaginator.js.map +0 -1
  193. package/dist-es/protocols/Aws_json1_0.js.map +0 -1
  194. package/dist-es/runtimeConfig.browser.js.map +0 -1
  195. package/dist-es/runtimeConfig.js.map +0 -1
  196. package/dist-es/runtimeConfig.native.js.map +0 -1
  197. package/dist-es/runtimeConfig.shared.js.map +0 -1
  198. package/jest.config.js +0 -4
  199. package/src/LookoutEquipment.ts +0 -813
  200. package/src/LookoutEquipmentClient.ts +0 -339
  201. package/src/commands/CreateDatasetCommand.ts +0 -98
  202. package/src/commands/CreateInferenceSchedulerCommand.ts +0 -99
  203. package/src/commands/CreateModelCommand.ts +0 -103
  204. package/src/commands/DeleteDatasetCommand.ts +0 -99
  205. package/src/commands/DeleteInferenceSchedulerCommand.ts +0 -96
  206. package/src/commands/DeleteModelCommand.ts +0 -96
  207. package/src/commands/DescribeDataIngestionJobCommand.ts +0 -96
  208. package/src/commands/DescribeDatasetCommand.ts +0 -95
  209. package/src/commands/DescribeInferenceSchedulerCommand.ts +0 -99
  210. package/src/commands/DescribeModelCommand.ts +0 -96
  211. package/src/commands/ListDataIngestionJobsCommand.ts +0 -96
  212. package/src/commands/ListDatasetsCommand.ts +0 -96
  213. package/src/commands/ListInferenceExecutionsCommand.ts +0 -96
  214. package/src/commands/ListInferenceSchedulersCommand.ts +0 -96
  215. package/src/commands/ListModelsCommand.ts +0 -96
  216. package/src/commands/ListTagsForResourceCommand.ts +0 -95
  217. package/src/commands/StartDataIngestionJobCommand.ts +0 -95
  218. package/src/commands/StartInferenceSchedulerCommand.ts +0 -95
  219. package/src/commands/StopInferenceSchedulerCommand.ts +0 -95
  220. package/src/commands/TagResourceCommand.ts +0 -99
  221. package/src/commands/UntagResourceCommand.ts +0 -95
  222. package/src/commands/UpdateInferenceSchedulerCommand.ts +0 -95
  223. package/src/endpoints.ts +0 -57
  224. package/src/index.ts +0 -31
  225. package/src/models/index.ts +0 -1
  226. package/src/models/models_0.ts +0 -2107
  227. package/src/pagination/Interfaces.ts +0 -8
  228. package/src/pagination/ListDataIngestionJobsPaginator.ts +0 -59
  229. package/src/pagination/ListDatasetsPaginator.ts +0 -59
  230. package/src/pagination/ListInferenceExecutionsPaginator.ts +0 -59
  231. package/src/pagination/ListInferenceSchedulersPaginator.ts +0 -59
  232. package/src/pagination/ListModelsPaginator.ts +0 -55
  233. package/src/protocols/Aws_json1_0.ts +0 -3644
  234. package/src/runtimeConfig.browser.ts +0 -41
  235. package/src/runtimeConfig.native.ts +0 -17
  236. package/src/runtimeConfig.shared.ts +0 -17
  237. package/src/runtimeConfig.ts +0 -46
  238. package/tsconfig.es.json +0 -10
  239. package/tsconfig.json +0 -33
  240. package/tsconfig.types.json +0 -9
@@ -1,3644 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
2
- import {
3
- expectLong as __expectLong,
4
- expectNonNull as __expectNonNull,
5
- expectNumber as __expectNumber,
6
- expectString as __expectString,
7
- LazyJsonString as __LazyJsonString,
8
- parseEpochTimestamp as __parseEpochTimestamp,
9
- } from "@aws-sdk/smithy-client";
10
- import {
11
- Endpoint as __Endpoint,
12
- HeaderBag as __HeaderBag,
13
- MetadataBearer as __MetadataBearer,
14
- ResponseMetadata as __ResponseMetadata,
15
- SerdeContext as __SerdeContext,
16
- SmithyException as __SmithyException,
17
- } from "@aws-sdk/types";
18
- import { v4 as generateIdempotencyToken } from "uuid";
19
-
20
- import { CreateDatasetCommandInput, CreateDatasetCommandOutput } from "../commands/CreateDatasetCommand";
21
- import {
22
- CreateInferenceSchedulerCommandInput,
23
- CreateInferenceSchedulerCommandOutput,
24
- } from "../commands/CreateInferenceSchedulerCommand";
25
- import { CreateModelCommandInput, CreateModelCommandOutput } from "../commands/CreateModelCommand";
26
- import { DeleteDatasetCommandInput, DeleteDatasetCommandOutput } from "../commands/DeleteDatasetCommand";
27
- import {
28
- DeleteInferenceSchedulerCommandInput,
29
- DeleteInferenceSchedulerCommandOutput,
30
- } from "../commands/DeleteInferenceSchedulerCommand";
31
- import { DeleteModelCommandInput, DeleteModelCommandOutput } from "../commands/DeleteModelCommand";
32
- import {
33
- DescribeDataIngestionJobCommandInput,
34
- DescribeDataIngestionJobCommandOutput,
35
- } from "../commands/DescribeDataIngestionJobCommand";
36
- import { DescribeDatasetCommandInput, DescribeDatasetCommandOutput } from "../commands/DescribeDatasetCommand";
37
- import {
38
- DescribeInferenceSchedulerCommandInput,
39
- DescribeInferenceSchedulerCommandOutput,
40
- } from "../commands/DescribeInferenceSchedulerCommand";
41
- import { DescribeModelCommandInput, DescribeModelCommandOutput } from "../commands/DescribeModelCommand";
42
- import {
43
- ListDataIngestionJobsCommandInput,
44
- ListDataIngestionJobsCommandOutput,
45
- } from "../commands/ListDataIngestionJobsCommand";
46
- import { ListDatasetsCommandInput, ListDatasetsCommandOutput } from "../commands/ListDatasetsCommand";
47
- import {
48
- ListInferenceExecutionsCommandInput,
49
- ListInferenceExecutionsCommandOutput,
50
- } from "../commands/ListInferenceExecutionsCommand";
51
- import {
52
- ListInferenceSchedulersCommandInput,
53
- ListInferenceSchedulersCommandOutput,
54
- } from "../commands/ListInferenceSchedulersCommand";
55
- import { ListModelsCommandInput, ListModelsCommandOutput } from "../commands/ListModelsCommand";
56
- import {
57
- ListTagsForResourceCommandInput,
58
- ListTagsForResourceCommandOutput,
59
- } from "../commands/ListTagsForResourceCommand";
60
- import {
61
- StartDataIngestionJobCommandInput,
62
- StartDataIngestionJobCommandOutput,
63
- } from "../commands/StartDataIngestionJobCommand";
64
- import {
65
- StartInferenceSchedulerCommandInput,
66
- StartInferenceSchedulerCommandOutput,
67
- } from "../commands/StartInferenceSchedulerCommand";
68
- import {
69
- StopInferenceSchedulerCommandInput,
70
- StopInferenceSchedulerCommandOutput,
71
- } from "../commands/StopInferenceSchedulerCommand";
72
- import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
73
- import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
74
- import {
75
- UpdateInferenceSchedulerCommandInput,
76
- UpdateInferenceSchedulerCommandOutput,
77
- } from "../commands/UpdateInferenceSchedulerCommand";
78
- import {
79
- AccessDeniedException,
80
- ConflictException,
81
- CreateDatasetRequest,
82
- CreateDatasetResponse,
83
- CreateInferenceSchedulerRequest,
84
- CreateInferenceSchedulerResponse,
85
- CreateModelRequest,
86
- CreateModelResponse,
87
- DataIngestionJobSummary,
88
- DataPreProcessingConfiguration,
89
- DatasetSchema,
90
- DatasetSummary,
91
- DeleteDatasetRequest,
92
- DeleteInferenceSchedulerRequest,
93
- DeleteModelRequest,
94
- DescribeDataIngestionJobRequest,
95
- DescribeDataIngestionJobResponse,
96
- DescribeDatasetRequest,
97
- DescribeDatasetResponse,
98
- DescribeInferenceSchedulerRequest,
99
- DescribeInferenceSchedulerResponse,
100
- DescribeModelRequest,
101
- DescribeModelResponse,
102
- InferenceExecutionSummary,
103
- InferenceInputConfiguration,
104
- InferenceInputNameConfiguration,
105
- InferenceOutputConfiguration,
106
- InferenceS3InputConfiguration,
107
- InferenceS3OutputConfiguration,
108
- InferenceSchedulerSummary,
109
- IngestionInputConfiguration,
110
- IngestionS3InputConfiguration,
111
- InternalServerException,
112
- LabelsInputConfiguration,
113
- LabelsS3InputConfiguration,
114
- ListDataIngestionJobsRequest,
115
- ListDataIngestionJobsResponse,
116
- ListDatasetsRequest,
117
- ListDatasetsResponse,
118
- ListInferenceExecutionsRequest,
119
- ListInferenceExecutionsResponse,
120
- ListInferenceSchedulersRequest,
121
- ListInferenceSchedulersResponse,
122
- ListModelsRequest,
123
- ListModelsResponse,
124
- ListTagsForResourceRequest,
125
- ListTagsForResourceResponse,
126
- ModelSummary,
127
- ResourceNotFoundException,
128
- S3Object,
129
- ServiceQuotaExceededException,
130
- StartDataIngestionJobRequest,
131
- StartDataIngestionJobResponse,
132
- StartInferenceSchedulerRequest,
133
- StartInferenceSchedulerResponse,
134
- StopInferenceSchedulerRequest,
135
- StopInferenceSchedulerResponse,
136
- Tag,
137
- TagResourceRequest,
138
- TagResourceResponse,
139
- ThrottlingException,
140
- UntagResourceRequest,
141
- UntagResourceResponse,
142
- UpdateInferenceSchedulerRequest,
143
- ValidationException,
144
- } from "../models/models_0";
145
-
146
- export const serializeAws_json1_0CreateDatasetCommand = async (
147
- input: CreateDatasetCommandInput,
148
- context: __SerdeContext
149
- ): Promise<__HttpRequest> => {
150
- const headers: __HeaderBag = {
151
- "content-type": "application/x-amz-json-1.0",
152
- "x-amz-target": "AWSLookoutEquipmentFrontendService.CreateDataset",
153
- };
154
- let body: any;
155
- body = JSON.stringify(serializeAws_json1_0CreateDatasetRequest(input, context));
156
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
- };
158
-
159
- export const serializeAws_json1_0CreateInferenceSchedulerCommand = async (
160
- input: CreateInferenceSchedulerCommandInput,
161
- context: __SerdeContext
162
- ): Promise<__HttpRequest> => {
163
- const headers: __HeaderBag = {
164
- "content-type": "application/x-amz-json-1.0",
165
- "x-amz-target": "AWSLookoutEquipmentFrontendService.CreateInferenceScheduler",
166
- };
167
- let body: any;
168
- body = JSON.stringify(serializeAws_json1_0CreateInferenceSchedulerRequest(input, context));
169
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
170
- };
171
-
172
- export const serializeAws_json1_0CreateModelCommand = async (
173
- input: CreateModelCommandInput,
174
- context: __SerdeContext
175
- ): Promise<__HttpRequest> => {
176
- const headers: __HeaderBag = {
177
- "content-type": "application/x-amz-json-1.0",
178
- "x-amz-target": "AWSLookoutEquipmentFrontendService.CreateModel",
179
- };
180
- let body: any;
181
- body = JSON.stringify(serializeAws_json1_0CreateModelRequest(input, context));
182
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
183
- };
184
-
185
- export const serializeAws_json1_0DeleteDatasetCommand = async (
186
- input: DeleteDatasetCommandInput,
187
- context: __SerdeContext
188
- ): Promise<__HttpRequest> => {
189
- const headers: __HeaderBag = {
190
- "content-type": "application/x-amz-json-1.0",
191
- "x-amz-target": "AWSLookoutEquipmentFrontendService.DeleteDataset",
192
- };
193
- let body: any;
194
- body = JSON.stringify(serializeAws_json1_0DeleteDatasetRequest(input, context));
195
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
- };
197
-
198
- export const serializeAws_json1_0DeleteInferenceSchedulerCommand = async (
199
- input: DeleteInferenceSchedulerCommandInput,
200
- context: __SerdeContext
201
- ): Promise<__HttpRequest> => {
202
- const headers: __HeaderBag = {
203
- "content-type": "application/x-amz-json-1.0",
204
- "x-amz-target": "AWSLookoutEquipmentFrontendService.DeleteInferenceScheduler",
205
- };
206
- let body: any;
207
- body = JSON.stringify(serializeAws_json1_0DeleteInferenceSchedulerRequest(input, context));
208
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
209
- };
210
-
211
- export const serializeAws_json1_0DeleteModelCommand = async (
212
- input: DeleteModelCommandInput,
213
- context: __SerdeContext
214
- ): Promise<__HttpRequest> => {
215
- const headers: __HeaderBag = {
216
- "content-type": "application/x-amz-json-1.0",
217
- "x-amz-target": "AWSLookoutEquipmentFrontendService.DeleteModel",
218
- };
219
- let body: any;
220
- body = JSON.stringify(serializeAws_json1_0DeleteModelRequest(input, context));
221
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
222
- };
223
-
224
- export const serializeAws_json1_0DescribeDataIngestionJobCommand = async (
225
- input: DescribeDataIngestionJobCommandInput,
226
- context: __SerdeContext
227
- ): Promise<__HttpRequest> => {
228
- const headers: __HeaderBag = {
229
- "content-type": "application/x-amz-json-1.0",
230
- "x-amz-target": "AWSLookoutEquipmentFrontendService.DescribeDataIngestionJob",
231
- };
232
- let body: any;
233
- body = JSON.stringify(serializeAws_json1_0DescribeDataIngestionJobRequest(input, context));
234
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
235
- };
236
-
237
- export const serializeAws_json1_0DescribeDatasetCommand = async (
238
- input: DescribeDatasetCommandInput,
239
- context: __SerdeContext
240
- ): Promise<__HttpRequest> => {
241
- const headers: __HeaderBag = {
242
- "content-type": "application/x-amz-json-1.0",
243
- "x-amz-target": "AWSLookoutEquipmentFrontendService.DescribeDataset",
244
- };
245
- let body: any;
246
- body = JSON.stringify(serializeAws_json1_0DescribeDatasetRequest(input, context));
247
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
248
- };
249
-
250
- export const serializeAws_json1_0DescribeInferenceSchedulerCommand = async (
251
- input: DescribeInferenceSchedulerCommandInput,
252
- context: __SerdeContext
253
- ): Promise<__HttpRequest> => {
254
- const headers: __HeaderBag = {
255
- "content-type": "application/x-amz-json-1.0",
256
- "x-amz-target": "AWSLookoutEquipmentFrontendService.DescribeInferenceScheduler",
257
- };
258
- let body: any;
259
- body = JSON.stringify(serializeAws_json1_0DescribeInferenceSchedulerRequest(input, context));
260
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
261
- };
262
-
263
- export const serializeAws_json1_0DescribeModelCommand = async (
264
- input: DescribeModelCommandInput,
265
- context: __SerdeContext
266
- ): Promise<__HttpRequest> => {
267
- const headers: __HeaderBag = {
268
- "content-type": "application/x-amz-json-1.0",
269
- "x-amz-target": "AWSLookoutEquipmentFrontendService.DescribeModel",
270
- };
271
- let body: any;
272
- body = JSON.stringify(serializeAws_json1_0DescribeModelRequest(input, context));
273
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
274
- };
275
-
276
- export const serializeAws_json1_0ListDataIngestionJobsCommand = async (
277
- input: ListDataIngestionJobsCommandInput,
278
- context: __SerdeContext
279
- ): Promise<__HttpRequest> => {
280
- const headers: __HeaderBag = {
281
- "content-type": "application/x-amz-json-1.0",
282
- "x-amz-target": "AWSLookoutEquipmentFrontendService.ListDataIngestionJobs",
283
- };
284
- let body: any;
285
- body = JSON.stringify(serializeAws_json1_0ListDataIngestionJobsRequest(input, context));
286
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
287
- };
288
-
289
- export const serializeAws_json1_0ListDatasetsCommand = async (
290
- input: ListDatasetsCommandInput,
291
- context: __SerdeContext
292
- ): Promise<__HttpRequest> => {
293
- const headers: __HeaderBag = {
294
- "content-type": "application/x-amz-json-1.0",
295
- "x-amz-target": "AWSLookoutEquipmentFrontendService.ListDatasets",
296
- };
297
- let body: any;
298
- body = JSON.stringify(serializeAws_json1_0ListDatasetsRequest(input, context));
299
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
300
- };
301
-
302
- export const serializeAws_json1_0ListInferenceExecutionsCommand = async (
303
- input: ListInferenceExecutionsCommandInput,
304
- context: __SerdeContext
305
- ): Promise<__HttpRequest> => {
306
- const headers: __HeaderBag = {
307
- "content-type": "application/x-amz-json-1.0",
308
- "x-amz-target": "AWSLookoutEquipmentFrontendService.ListInferenceExecutions",
309
- };
310
- let body: any;
311
- body = JSON.stringify(serializeAws_json1_0ListInferenceExecutionsRequest(input, context));
312
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
313
- };
314
-
315
- export const serializeAws_json1_0ListInferenceSchedulersCommand = async (
316
- input: ListInferenceSchedulersCommandInput,
317
- context: __SerdeContext
318
- ): Promise<__HttpRequest> => {
319
- const headers: __HeaderBag = {
320
- "content-type": "application/x-amz-json-1.0",
321
- "x-amz-target": "AWSLookoutEquipmentFrontendService.ListInferenceSchedulers",
322
- };
323
- let body: any;
324
- body = JSON.stringify(serializeAws_json1_0ListInferenceSchedulersRequest(input, context));
325
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
326
- };
327
-
328
- export const serializeAws_json1_0ListModelsCommand = async (
329
- input: ListModelsCommandInput,
330
- context: __SerdeContext
331
- ): Promise<__HttpRequest> => {
332
- const headers: __HeaderBag = {
333
- "content-type": "application/x-amz-json-1.0",
334
- "x-amz-target": "AWSLookoutEquipmentFrontendService.ListModels",
335
- };
336
- let body: any;
337
- body = JSON.stringify(serializeAws_json1_0ListModelsRequest(input, context));
338
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
339
- };
340
-
341
- export const serializeAws_json1_0ListTagsForResourceCommand = async (
342
- input: ListTagsForResourceCommandInput,
343
- context: __SerdeContext
344
- ): Promise<__HttpRequest> => {
345
- const headers: __HeaderBag = {
346
- "content-type": "application/x-amz-json-1.0",
347
- "x-amz-target": "AWSLookoutEquipmentFrontendService.ListTagsForResource",
348
- };
349
- let body: any;
350
- body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context));
351
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
352
- };
353
-
354
- export const serializeAws_json1_0StartDataIngestionJobCommand = async (
355
- input: StartDataIngestionJobCommandInput,
356
- context: __SerdeContext
357
- ): Promise<__HttpRequest> => {
358
- const headers: __HeaderBag = {
359
- "content-type": "application/x-amz-json-1.0",
360
- "x-amz-target": "AWSLookoutEquipmentFrontendService.StartDataIngestionJob",
361
- };
362
- let body: any;
363
- body = JSON.stringify(serializeAws_json1_0StartDataIngestionJobRequest(input, context));
364
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
365
- };
366
-
367
- export const serializeAws_json1_0StartInferenceSchedulerCommand = async (
368
- input: StartInferenceSchedulerCommandInput,
369
- context: __SerdeContext
370
- ): Promise<__HttpRequest> => {
371
- const headers: __HeaderBag = {
372
- "content-type": "application/x-amz-json-1.0",
373
- "x-amz-target": "AWSLookoutEquipmentFrontendService.StartInferenceScheduler",
374
- };
375
- let body: any;
376
- body = JSON.stringify(serializeAws_json1_0StartInferenceSchedulerRequest(input, context));
377
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
378
- };
379
-
380
- export const serializeAws_json1_0StopInferenceSchedulerCommand = async (
381
- input: StopInferenceSchedulerCommandInput,
382
- context: __SerdeContext
383
- ): Promise<__HttpRequest> => {
384
- const headers: __HeaderBag = {
385
- "content-type": "application/x-amz-json-1.0",
386
- "x-amz-target": "AWSLookoutEquipmentFrontendService.StopInferenceScheduler",
387
- };
388
- let body: any;
389
- body = JSON.stringify(serializeAws_json1_0StopInferenceSchedulerRequest(input, context));
390
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
391
- };
392
-
393
- export const serializeAws_json1_0TagResourceCommand = async (
394
- input: TagResourceCommandInput,
395
- context: __SerdeContext
396
- ): Promise<__HttpRequest> => {
397
- const headers: __HeaderBag = {
398
- "content-type": "application/x-amz-json-1.0",
399
- "x-amz-target": "AWSLookoutEquipmentFrontendService.TagResource",
400
- };
401
- let body: any;
402
- body = JSON.stringify(serializeAws_json1_0TagResourceRequest(input, context));
403
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
404
- };
405
-
406
- export const serializeAws_json1_0UntagResourceCommand = async (
407
- input: UntagResourceCommandInput,
408
- context: __SerdeContext
409
- ): Promise<__HttpRequest> => {
410
- const headers: __HeaderBag = {
411
- "content-type": "application/x-amz-json-1.0",
412
- "x-amz-target": "AWSLookoutEquipmentFrontendService.UntagResource",
413
- };
414
- let body: any;
415
- body = JSON.stringify(serializeAws_json1_0UntagResourceRequest(input, context));
416
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
417
- };
418
-
419
- export const serializeAws_json1_0UpdateInferenceSchedulerCommand = async (
420
- input: UpdateInferenceSchedulerCommandInput,
421
- context: __SerdeContext
422
- ): Promise<__HttpRequest> => {
423
- const headers: __HeaderBag = {
424
- "content-type": "application/x-amz-json-1.0",
425
- "x-amz-target": "AWSLookoutEquipmentFrontendService.UpdateInferenceScheduler",
426
- };
427
- let body: any;
428
- body = JSON.stringify(serializeAws_json1_0UpdateInferenceSchedulerRequest(input, context));
429
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
430
- };
431
-
432
- export const deserializeAws_json1_0CreateDatasetCommand = async (
433
- output: __HttpResponse,
434
- context: __SerdeContext
435
- ): Promise<CreateDatasetCommandOutput> => {
436
- if (output.statusCode >= 300) {
437
- return deserializeAws_json1_0CreateDatasetCommandError(output, context);
438
- }
439
- const data: any = await parseBody(output.body, context);
440
- let contents: any = {};
441
- contents = deserializeAws_json1_0CreateDatasetResponse(data, context);
442
- const response: CreateDatasetCommandOutput = {
443
- $metadata: deserializeMetadata(output),
444
- ...contents,
445
- };
446
- return Promise.resolve(response);
447
- };
448
-
449
- const deserializeAws_json1_0CreateDatasetCommandError = async (
450
- output: __HttpResponse,
451
- context: __SerdeContext
452
- ): Promise<CreateDatasetCommandOutput> => {
453
- const parsedOutput: any = {
454
- ...output,
455
- body: await parseBody(output.body, context),
456
- };
457
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
458
- let errorCode = "UnknownError";
459
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
460
- switch (errorCode) {
461
- case "AccessDeniedException":
462
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
463
- response = {
464
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
465
- name: errorCode,
466
- $metadata: deserializeMetadata(output),
467
- };
468
- break;
469
- case "ConflictException":
470
- case "com.amazonaws.lookoutequipment#ConflictException":
471
- response = {
472
- ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
473
- name: errorCode,
474
- $metadata: deserializeMetadata(output),
475
- };
476
- break;
477
- case "InternalServerException":
478
- case "com.amazonaws.lookoutequipment#InternalServerException":
479
- response = {
480
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
481
- name: errorCode,
482
- $metadata: deserializeMetadata(output),
483
- };
484
- break;
485
- case "ServiceQuotaExceededException":
486
- case "com.amazonaws.lookoutequipment#ServiceQuotaExceededException":
487
- response = {
488
- ...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
489
- name: errorCode,
490
- $metadata: deserializeMetadata(output),
491
- };
492
- break;
493
- case "ThrottlingException":
494
- case "com.amazonaws.lookoutequipment#ThrottlingException":
495
- response = {
496
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
497
- name: errorCode,
498
- $metadata: deserializeMetadata(output),
499
- };
500
- break;
501
- case "ValidationException":
502
- case "com.amazonaws.lookoutequipment#ValidationException":
503
- response = {
504
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
505
- name: errorCode,
506
- $metadata: deserializeMetadata(output),
507
- };
508
- break;
509
- default:
510
- const parsedBody = parsedOutput.body;
511
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
512
- response = {
513
- ...parsedBody,
514
- name: `${errorCode}`,
515
- message: parsedBody.message || parsedBody.Message || errorCode,
516
- $fault: "client",
517
- $metadata: deserializeMetadata(output),
518
- } as any;
519
- }
520
- const message = response.message || response.Message || errorCode;
521
- response.message = message;
522
- delete response.Message;
523
- return Promise.reject(Object.assign(new Error(message), response));
524
- };
525
-
526
- export const deserializeAws_json1_0CreateInferenceSchedulerCommand = async (
527
- output: __HttpResponse,
528
- context: __SerdeContext
529
- ): Promise<CreateInferenceSchedulerCommandOutput> => {
530
- if (output.statusCode >= 300) {
531
- return deserializeAws_json1_0CreateInferenceSchedulerCommandError(output, context);
532
- }
533
- const data: any = await parseBody(output.body, context);
534
- let contents: any = {};
535
- contents = deserializeAws_json1_0CreateInferenceSchedulerResponse(data, context);
536
- const response: CreateInferenceSchedulerCommandOutput = {
537
- $metadata: deserializeMetadata(output),
538
- ...contents,
539
- };
540
- return Promise.resolve(response);
541
- };
542
-
543
- const deserializeAws_json1_0CreateInferenceSchedulerCommandError = async (
544
- output: __HttpResponse,
545
- context: __SerdeContext
546
- ): Promise<CreateInferenceSchedulerCommandOutput> => {
547
- const parsedOutput: any = {
548
- ...output,
549
- body: await parseBody(output.body, context),
550
- };
551
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
552
- let errorCode = "UnknownError";
553
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
554
- switch (errorCode) {
555
- case "AccessDeniedException":
556
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
557
- response = {
558
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
559
- name: errorCode,
560
- $metadata: deserializeMetadata(output),
561
- };
562
- break;
563
- case "ConflictException":
564
- case "com.amazonaws.lookoutequipment#ConflictException":
565
- response = {
566
- ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
567
- name: errorCode,
568
- $metadata: deserializeMetadata(output),
569
- };
570
- break;
571
- case "InternalServerException":
572
- case "com.amazonaws.lookoutequipment#InternalServerException":
573
- response = {
574
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
575
- name: errorCode,
576
- $metadata: deserializeMetadata(output),
577
- };
578
- break;
579
- case "ResourceNotFoundException":
580
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
581
- response = {
582
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
583
- name: errorCode,
584
- $metadata: deserializeMetadata(output),
585
- };
586
- break;
587
- case "ServiceQuotaExceededException":
588
- case "com.amazonaws.lookoutequipment#ServiceQuotaExceededException":
589
- response = {
590
- ...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
591
- name: errorCode,
592
- $metadata: deserializeMetadata(output),
593
- };
594
- break;
595
- case "ThrottlingException":
596
- case "com.amazonaws.lookoutequipment#ThrottlingException":
597
- response = {
598
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
599
- name: errorCode,
600
- $metadata: deserializeMetadata(output),
601
- };
602
- break;
603
- case "ValidationException":
604
- case "com.amazonaws.lookoutequipment#ValidationException":
605
- response = {
606
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
607
- name: errorCode,
608
- $metadata: deserializeMetadata(output),
609
- };
610
- break;
611
- default:
612
- const parsedBody = parsedOutput.body;
613
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
614
- response = {
615
- ...parsedBody,
616
- name: `${errorCode}`,
617
- message: parsedBody.message || parsedBody.Message || errorCode,
618
- $fault: "client",
619
- $metadata: deserializeMetadata(output),
620
- } as any;
621
- }
622
- const message = response.message || response.Message || errorCode;
623
- response.message = message;
624
- delete response.Message;
625
- return Promise.reject(Object.assign(new Error(message), response));
626
- };
627
-
628
- export const deserializeAws_json1_0CreateModelCommand = async (
629
- output: __HttpResponse,
630
- context: __SerdeContext
631
- ): Promise<CreateModelCommandOutput> => {
632
- if (output.statusCode >= 300) {
633
- return deserializeAws_json1_0CreateModelCommandError(output, context);
634
- }
635
- const data: any = await parseBody(output.body, context);
636
- let contents: any = {};
637
- contents = deserializeAws_json1_0CreateModelResponse(data, context);
638
- const response: CreateModelCommandOutput = {
639
- $metadata: deserializeMetadata(output),
640
- ...contents,
641
- };
642
- return Promise.resolve(response);
643
- };
644
-
645
- const deserializeAws_json1_0CreateModelCommandError = async (
646
- output: __HttpResponse,
647
- context: __SerdeContext
648
- ): Promise<CreateModelCommandOutput> => {
649
- const parsedOutput: any = {
650
- ...output,
651
- body: await parseBody(output.body, context),
652
- };
653
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
654
- let errorCode = "UnknownError";
655
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
656
- switch (errorCode) {
657
- case "AccessDeniedException":
658
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
659
- response = {
660
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
661
- name: errorCode,
662
- $metadata: deserializeMetadata(output),
663
- };
664
- break;
665
- case "ConflictException":
666
- case "com.amazonaws.lookoutequipment#ConflictException":
667
- response = {
668
- ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
669
- name: errorCode,
670
- $metadata: deserializeMetadata(output),
671
- };
672
- break;
673
- case "InternalServerException":
674
- case "com.amazonaws.lookoutequipment#InternalServerException":
675
- response = {
676
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
677
- name: errorCode,
678
- $metadata: deserializeMetadata(output),
679
- };
680
- break;
681
- case "ResourceNotFoundException":
682
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
683
- response = {
684
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
685
- name: errorCode,
686
- $metadata: deserializeMetadata(output),
687
- };
688
- break;
689
- case "ServiceQuotaExceededException":
690
- case "com.amazonaws.lookoutequipment#ServiceQuotaExceededException":
691
- response = {
692
- ...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
693
- name: errorCode,
694
- $metadata: deserializeMetadata(output),
695
- };
696
- break;
697
- case "ThrottlingException":
698
- case "com.amazonaws.lookoutequipment#ThrottlingException":
699
- response = {
700
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
701
- name: errorCode,
702
- $metadata: deserializeMetadata(output),
703
- };
704
- break;
705
- case "ValidationException":
706
- case "com.amazonaws.lookoutequipment#ValidationException":
707
- response = {
708
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
709
- name: errorCode,
710
- $metadata: deserializeMetadata(output),
711
- };
712
- break;
713
- default:
714
- const parsedBody = parsedOutput.body;
715
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
716
- response = {
717
- ...parsedBody,
718
- name: `${errorCode}`,
719
- message: parsedBody.message || parsedBody.Message || errorCode,
720
- $fault: "client",
721
- $metadata: deserializeMetadata(output),
722
- } as any;
723
- }
724
- const message = response.message || response.Message || errorCode;
725
- response.message = message;
726
- delete response.Message;
727
- return Promise.reject(Object.assign(new Error(message), response));
728
- };
729
-
730
- export const deserializeAws_json1_0DeleteDatasetCommand = async (
731
- output: __HttpResponse,
732
- context: __SerdeContext
733
- ): Promise<DeleteDatasetCommandOutput> => {
734
- if (output.statusCode >= 300) {
735
- return deserializeAws_json1_0DeleteDatasetCommandError(output, context);
736
- }
737
- await collectBody(output.body, context);
738
- const response: DeleteDatasetCommandOutput = {
739
- $metadata: deserializeMetadata(output),
740
- };
741
- return Promise.resolve(response);
742
- };
743
-
744
- const deserializeAws_json1_0DeleteDatasetCommandError = async (
745
- output: __HttpResponse,
746
- context: __SerdeContext
747
- ): Promise<DeleteDatasetCommandOutput> => {
748
- const parsedOutput: any = {
749
- ...output,
750
- body: await parseBody(output.body, context),
751
- };
752
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
753
- let errorCode = "UnknownError";
754
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
755
- switch (errorCode) {
756
- case "AccessDeniedException":
757
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
758
- response = {
759
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
760
- name: errorCode,
761
- $metadata: deserializeMetadata(output),
762
- };
763
- break;
764
- case "ConflictException":
765
- case "com.amazonaws.lookoutequipment#ConflictException":
766
- response = {
767
- ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
768
- name: errorCode,
769
- $metadata: deserializeMetadata(output),
770
- };
771
- break;
772
- case "InternalServerException":
773
- case "com.amazonaws.lookoutequipment#InternalServerException":
774
- response = {
775
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
776
- name: errorCode,
777
- $metadata: deserializeMetadata(output),
778
- };
779
- break;
780
- case "ResourceNotFoundException":
781
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
782
- response = {
783
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
784
- name: errorCode,
785
- $metadata: deserializeMetadata(output),
786
- };
787
- break;
788
- case "ThrottlingException":
789
- case "com.amazonaws.lookoutequipment#ThrottlingException":
790
- response = {
791
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
792
- name: errorCode,
793
- $metadata: deserializeMetadata(output),
794
- };
795
- break;
796
- default:
797
- const parsedBody = parsedOutput.body;
798
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
799
- response = {
800
- ...parsedBody,
801
- name: `${errorCode}`,
802
- message: parsedBody.message || parsedBody.Message || errorCode,
803
- $fault: "client",
804
- $metadata: deserializeMetadata(output),
805
- } as any;
806
- }
807
- const message = response.message || response.Message || errorCode;
808
- response.message = message;
809
- delete response.Message;
810
- return Promise.reject(Object.assign(new Error(message), response));
811
- };
812
-
813
- export const deserializeAws_json1_0DeleteInferenceSchedulerCommand = async (
814
- output: __HttpResponse,
815
- context: __SerdeContext
816
- ): Promise<DeleteInferenceSchedulerCommandOutput> => {
817
- if (output.statusCode >= 300) {
818
- return deserializeAws_json1_0DeleteInferenceSchedulerCommandError(output, context);
819
- }
820
- await collectBody(output.body, context);
821
- const response: DeleteInferenceSchedulerCommandOutput = {
822
- $metadata: deserializeMetadata(output),
823
- };
824
- return Promise.resolve(response);
825
- };
826
-
827
- const deserializeAws_json1_0DeleteInferenceSchedulerCommandError = async (
828
- output: __HttpResponse,
829
- context: __SerdeContext
830
- ): Promise<DeleteInferenceSchedulerCommandOutput> => {
831
- const parsedOutput: any = {
832
- ...output,
833
- body: await parseBody(output.body, context),
834
- };
835
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
836
- let errorCode = "UnknownError";
837
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
838
- switch (errorCode) {
839
- case "AccessDeniedException":
840
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
841
- response = {
842
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
843
- name: errorCode,
844
- $metadata: deserializeMetadata(output),
845
- };
846
- break;
847
- case "ConflictException":
848
- case "com.amazonaws.lookoutequipment#ConflictException":
849
- response = {
850
- ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
851
- name: errorCode,
852
- $metadata: deserializeMetadata(output),
853
- };
854
- break;
855
- case "InternalServerException":
856
- case "com.amazonaws.lookoutequipment#InternalServerException":
857
- response = {
858
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
859
- name: errorCode,
860
- $metadata: deserializeMetadata(output),
861
- };
862
- break;
863
- case "ResourceNotFoundException":
864
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
865
- response = {
866
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
867
- name: errorCode,
868
- $metadata: deserializeMetadata(output),
869
- };
870
- break;
871
- case "ThrottlingException":
872
- case "com.amazonaws.lookoutequipment#ThrottlingException":
873
- response = {
874
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
875
- name: errorCode,
876
- $metadata: deserializeMetadata(output),
877
- };
878
- break;
879
- case "ValidationException":
880
- case "com.amazonaws.lookoutequipment#ValidationException":
881
- response = {
882
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
883
- name: errorCode,
884
- $metadata: deserializeMetadata(output),
885
- };
886
- break;
887
- default:
888
- const parsedBody = parsedOutput.body;
889
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
890
- response = {
891
- ...parsedBody,
892
- name: `${errorCode}`,
893
- message: parsedBody.message || parsedBody.Message || errorCode,
894
- $fault: "client",
895
- $metadata: deserializeMetadata(output),
896
- } as any;
897
- }
898
- const message = response.message || response.Message || errorCode;
899
- response.message = message;
900
- delete response.Message;
901
- return Promise.reject(Object.assign(new Error(message), response));
902
- };
903
-
904
- export const deserializeAws_json1_0DeleteModelCommand = async (
905
- output: __HttpResponse,
906
- context: __SerdeContext
907
- ): Promise<DeleteModelCommandOutput> => {
908
- if (output.statusCode >= 300) {
909
- return deserializeAws_json1_0DeleteModelCommandError(output, context);
910
- }
911
- await collectBody(output.body, context);
912
- const response: DeleteModelCommandOutput = {
913
- $metadata: deserializeMetadata(output),
914
- };
915
- return Promise.resolve(response);
916
- };
917
-
918
- const deserializeAws_json1_0DeleteModelCommandError = async (
919
- output: __HttpResponse,
920
- context: __SerdeContext
921
- ): Promise<DeleteModelCommandOutput> => {
922
- const parsedOutput: any = {
923
- ...output,
924
- body: await parseBody(output.body, context),
925
- };
926
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
927
- let errorCode = "UnknownError";
928
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
929
- switch (errorCode) {
930
- case "AccessDeniedException":
931
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
932
- response = {
933
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
934
- name: errorCode,
935
- $metadata: deserializeMetadata(output),
936
- };
937
- break;
938
- case "ConflictException":
939
- case "com.amazonaws.lookoutequipment#ConflictException":
940
- response = {
941
- ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
942
- name: errorCode,
943
- $metadata: deserializeMetadata(output),
944
- };
945
- break;
946
- case "InternalServerException":
947
- case "com.amazonaws.lookoutequipment#InternalServerException":
948
- response = {
949
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
950
- name: errorCode,
951
- $metadata: deserializeMetadata(output),
952
- };
953
- break;
954
- case "ResourceNotFoundException":
955
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
956
- response = {
957
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
958
- name: errorCode,
959
- $metadata: deserializeMetadata(output),
960
- };
961
- break;
962
- case "ThrottlingException":
963
- case "com.amazonaws.lookoutequipment#ThrottlingException":
964
- response = {
965
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
966
- name: errorCode,
967
- $metadata: deserializeMetadata(output),
968
- };
969
- break;
970
- default:
971
- const parsedBody = parsedOutput.body;
972
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
973
- response = {
974
- ...parsedBody,
975
- name: `${errorCode}`,
976
- message: parsedBody.message || parsedBody.Message || errorCode,
977
- $fault: "client",
978
- $metadata: deserializeMetadata(output),
979
- } as any;
980
- }
981
- const message = response.message || response.Message || errorCode;
982
- response.message = message;
983
- delete response.Message;
984
- return Promise.reject(Object.assign(new Error(message), response));
985
- };
986
-
987
- export const deserializeAws_json1_0DescribeDataIngestionJobCommand = async (
988
- output: __HttpResponse,
989
- context: __SerdeContext
990
- ): Promise<DescribeDataIngestionJobCommandOutput> => {
991
- if (output.statusCode >= 300) {
992
- return deserializeAws_json1_0DescribeDataIngestionJobCommandError(output, context);
993
- }
994
- const data: any = await parseBody(output.body, context);
995
- let contents: any = {};
996
- contents = deserializeAws_json1_0DescribeDataIngestionJobResponse(data, context);
997
- const response: DescribeDataIngestionJobCommandOutput = {
998
- $metadata: deserializeMetadata(output),
999
- ...contents,
1000
- };
1001
- return Promise.resolve(response);
1002
- };
1003
-
1004
- const deserializeAws_json1_0DescribeDataIngestionJobCommandError = async (
1005
- output: __HttpResponse,
1006
- context: __SerdeContext
1007
- ): Promise<DescribeDataIngestionJobCommandOutput> => {
1008
- const parsedOutput: any = {
1009
- ...output,
1010
- body: await parseBody(output.body, context),
1011
- };
1012
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1013
- let errorCode = "UnknownError";
1014
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1015
- switch (errorCode) {
1016
- case "AccessDeniedException":
1017
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1018
- response = {
1019
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1020
- name: errorCode,
1021
- $metadata: deserializeMetadata(output),
1022
- };
1023
- break;
1024
- case "InternalServerException":
1025
- case "com.amazonaws.lookoutequipment#InternalServerException":
1026
- response = {
1027
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1028
- name: errorCode,
1029
- $metadata: deserializeMetadata(output),
1030
- };
1031
- break;
1032
- case "ResourceNotFoundException":
1033
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
1034
- response = {
1035
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
1036
- name: errorCode,
1037
- $metadata: deserializeMetadata(output),
1038
- };
1039
- break;
1040
- case "ThrottlingException":
1041
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1042
- response = {
1043
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1044
- name: errorCode,
1045
- $metadata: deserializeMetadata(output),
1046
- };
1047
- break;
1048
- case "ValidationException":
1049
- case "com.amazonaws.lookoutequipment#ValidationException":
1050
- response = {
1051
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1052
- name: errorCode,
1053
- $metadata: deserializeMetadata(output),
1054
- };
1055
- break;
1056
- default:
1057
- const parsedBody = parsedOutput.body;
1058
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1059
- response = {
1060
- ...parsedBody,
1061
- name: `${errorCode}`,
1062
- message: parsedBody.message || parsedBody.Message || errorCode,
1063
- $fault: "client",
1064
- $metadata: deserializeMetadata(output),
1065
- } as any;
1066
- }
1067
- const message = response.message || response.Message || errorCode;
1068
- response.message = message;
1069
- delete response.Message;
1070
- return Promise.reject(Object.assign(new Error(message), response));
1071
- };
1072
-
1073
- export const deserializeAws_json1_0DescribeDatasetCommand = async (
1074
- output: __HttpResponse,
1075
- context: __SerdeContext
1076
- ): Promise<DescribeDatasetCommandOutput> => {
1077
- if (output.statusCode >= 300) {
1078
- return deserializeAws_json1_0DescribeDatasetCommandError(output, context);
1079
- }
1080
- const data: any = await parseBody(output.body, context);
1081
- let contents: any = {};
1082
- contents = deserializeAws_json1_0DescribeDatasetResponse(data, context);
1083
- const response: DescribeDatasetCommandOutput = {
1084
- $metadata: deserializeMetadata(output),
1085
- ...contents,
1086
- };
1087
- return Promise.resolve(response);
1088
- };
1089
-
1090
- const deserializeAws_json1_0DescribeDatasetCommandError = async (
1091
- output: __HttpResponse,
1092
- context: __SerdeContext
1093
- ): Promise<DescribeDatasetCommandOutput> => {
1094
- const parsedOutput: any = {
1095
- ...output,
1096
- body: await parseBody(output.body, context),
1097
- };
1098
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1099
- let errorCode = "UnknownError";
1100
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1101
- switch (errorCode) {
1102
- case "AccessDeniedException":
1103
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1104
- response = {
1105
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1106
- name: errorCode,
1107
- $metadata: deserializeMetadata(output),
1108
- };
1109
- break;
1110
- case "InternalServerException":
1111
- case "com.amazonaws.lookoutequipment#InternalServerException":
1112
- response = {
1113
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1114
- name: errorCode,
1115
- $metadata: deserializeMetadata(output),
1116
- };
1117
- break;
1118
- case "ResourceNotFoundException":
1119
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
1120
- response = {
1121
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
1122
- name: errorCode,
1123
- $metadata: deserializeMetadata(output),
1124
- };
1125
- break;
1126
- case "ThrottlingException":
1127
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1128
- response = {
1129
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1130
- name: errorCode,
1131
- $metadata: deserializeMetadata(output),
1132
- };
1133
- break;
1134
- case "ValidationException":
1135
- case "com.amazonaws.lookoutequipment#ValidationException":
1136
- response = {
1137
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1138
- name: errorCode,
1139
- $metadata: deserializeMetadata(output),
1140
- };
1141
- break;
1142
- default:
1143
- const parsedBody = parsedOutput.body;
1144
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1145
- response = {
1146
- ...parsedBody,
1147
- name: `${errorCode}`,
1148
- message: parsedBody.message || parsedBody.Message || errorCode,
1149
- $fault: "client",
1150
- $metadata: deserializeMetadata(output),
1151
- } as any;
1152
- }
1153
- const message = response.message || response.Message || errorCode;
1154
- response.message = message;
1155
- delete response.Message;
1156
- return Promise.reject(Object.assign(new Error(message), response));
1157
- };
1158
-
1159
- export const deserializeAws_json1_0DescribeInferenceSchedulerCommand = async (
1160
- output: __HttpResponse,
1161
- context: __SerdeContext
1162
- ): Promise<DescribeInferenceSchedulerCommandOutput> => {
1163
- if (output.statusCode >= 300) {
1164
- return deserializeAws_json1_0DescribeInferenceSchedulerCommandError(output, context);
1165
- }
1166
- const data: any = await parseBody(output.body, context);
1167
- let contents: any = {};
1168
- contents = deserializeAws_json1_0DescribeInferenceSchedulerResponse(data, context);
1169
- const response: DescribeInferenceSchedulerCommandOutput = {
1170
- $metadata: deserializeMetadata(output),
1171
- ...contents,
1172
- };
1173
- return Promise.resolve(response);
1174
- };
1175
-
1176
- const deserializeAws_json1_0DescribeInferenceSchedulerCommandError = async (
1177
- output: __HttpResponse,
1178
- context: __SerdeContext
1179
- ): Promise<DescribeInferenceSchedulerCommandOutput> => {
1180
- const parsedOutput: any = {
1181
- ...output,
1182
- body: await parseBody(output.body, context),
1183
- };
1184
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1185
- let errorCode = "UnknownError";
1186
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1187
- switch (errorCode) {
1188
- case "AccessDeniedException":
1189
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1190
- response = {
1191
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1192
- name: errorCode,
1193
- $metadata: deserializeMetadata(output),
1194
- };
1195
- break;
1196
- case "InternalServerException":
1197
- case "com.amazonaws.lookoutequipment#InternalServerException":
1198
- response = {
1199
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1200
- name: errorCode,
1201
- $metadata: deserializeMetadata(output),
1202
- };
1203
- break;
1204
- case "ResourceNotFoundException":
1205
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
1206
- response = {
1207
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
1208
- name: errorCode,
1209
- $metadata: deserializeMetadata(output),
1210
- };
1211
- break;
1212
- case "ThrottlingException":
1213
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1214
- response = {
1215
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1216
- name: errorCode,
1217
- $metadata: deserializeMetadata(output),
1218
- };
1219
- break;
1220
- case "ValidationException":
1221
- case "com.amazonaws.lookoutequipment#ValidationException":
1222
- response = {
1223
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1224
- name: errorCode,
1225
- $metadata: deserializeMetadata(output),
1226
- };
1227
- break;
1228
- default:
1229
- const parsedBody = parsedOutput.body;
1230
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1231
- response = {
1232
- ...parsedBody,
1233
- name: `${errorCode}`,
1234
- message: parsedBody.message || parsedBody.Message || errorCode,
1235
- $fault: "client",
1236
- $metadata: deserializeMetadata(output),
1237
- } as any;
1238
- }
1239
- const message = response.message || response.Message || errorCode;
1240
- response.message = message;
1241
- delete response.Message;
1242
- return Promise.reject(Object.assign(new Error(message), response));
1243
- };
1244
-
1245
- export const deserializeAws_json1_0DescribeModelCommand = async (
1246
- output: __HttpResponse,
1247
- context: __SerdeContext
1248
- ): Promise<DescribeModelCommandOutput> => {
1249
- if (output.statusCode >= 300) {
1250
- return deserializeAws_json1_0DescribeModelCommandError(output, context);
1251
- }
1252
- const data: any = await parseBody(output.body, context);
1253
- let contents: any = {};
1254
- contents = deserializeAws_json1_0DescribeModelResponse(data, context);
1255
- const response: DescribeModelCommandOutput = {
1256
- $metadata: deserializeMetadata(output),
1257
- ...contents,
1258
- };
1259
- return Promise.resolve(response);
1260
- };
1261
-
1262
- const deserializeAws_json1_0DescribeModelCommandError = async (
1263
- output: __HttpResponse,
1264
- context: __SerdeContext
1265
- ): Promise<DescribeModelCommandOutput> => {
1266
- const parsedOutput: any = {
1267
- ...output,
1268
- body: await parseBody(output.body, context),
1269
- };
1270
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1271
- let errorCode = "UnknownError";
1272
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1273
- switch (errorCode) {
1274
- case "AccessDeniedException":
1275
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1276
- response = {
1277
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1278
- name: errorCode,
1279
- $metadata: deserializeMetadata(output),
1280
- };
1281
- break;
1282
- case "InternalServerException":
1283
- case "com.amazonaws.lookoutequipment#InternalServerException":
1284
- response = {
1285
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1286
- name: errorCode,
1287
- $metadata: deserializeMetadata(output),
1288
- };
1289
- break;
1290
- case "ResourceNotFoundException":
1291
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
1292
- response = {
1293
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
1294
- name: errorCode,
1295
- $metadata: deserializeMetadata(output),
1296
- };
1297
- break;
1298
- case "ThrottlingException":
1299
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1300
- response = {
1301
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1302
- name: errorCode,
1303
- $metadata: deserializeMetadata(output),
1304
- };
1305
- break;
1306
- case "ValidationException":
1307
- case "com.amazonaws.lookoutequipment#ValidationException":
1308
- response = {
1309
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1310
- name: errorCode,
1311
- $metadata: deserializeMetadata(output),
1312
- };
1313
- break;
1314
- default:
1315
- const parsedBody = parsedOutput.body;
1316
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1317
- response = {
1318
- ...parsedBody,
1319
- name: `${errorCode}`,
1320
- message: parsedBody.message || parsedBody.Message || errorCode,
1321
- $fault: "client",
1322
- $metadata: deserializeMetadata(output),
1323
- } as any;
1324
- }
1325
- const message = response.message || response.Message || errorCode;
1326
- response.message = message;
1327
- delete response.Message;
1328
- return Promise.reject(Object.assign(new Error(message), response));
1329
- };
1330
-
1331
- export const deserializeAws_json1_0ListDataIngestionJobsCommand = async (
1332
- output: __HttpResponse,
1333
- context: __SerdeContext
1334
- ): Promise<ListDataIngestionJobsCommandOutput> => {
1335
- if (output.statusCode >= 300) {
1336
- return deserializeAws_json1_0ListDataIngestionJobsCommandError(output, context);
1337
- }
1338
- const data: any = await parseBody(output.body, context);
1339
- let contents: any = {};
1340
- contents = deserializeAws_json1_0ListDataIngestionJobsResponse(data, context);
1341
- const response: ListDataIngestionJobsCommandOutput = {
1342
- $metadata: deserializeMetadata(output),
1343
- ...contents,
1344
- };
1345
- return Promise.resolve(response);
1346
- };
1347
-
1348
- const deserializeAws_json1_0ListDataIngestionJobsCommandError = async (
1349
- output: __HttpResponse,
1350
- context: __SerdeContext
1351
- ): Promise<ListDataIngestionJobsCommandOutput> => {
1352
- const parsedOutput: any = {
1353
- ...output,
1354
- body: await parseBody(output.body, context),
1355
- };
1356
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1357
- let errorCode = "UnknownError";
1358
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1359
- switch (errorCode) {
1360
- case "AccessDeniedException":
1361
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1362
- response = {
1363
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1364
- name: errorCode,
1365
- $metadata: deserializeMetadata(output),
1366
- };
1367
- break;
1368
- case "InternalServerException":
1369
- case "com.amazonaws.lookoutequipment#InternalServerException":
1370
- response = {
1371
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1372
- name: errorCode,
1373
- $metadata: deserializeMetadata(output),
1374
- };
1375
- break;
1376
- case "ThrottlingException":
1377
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1378
- response = {
1379
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1380
- name: errorCode,
1381
- $metadata: deserializeMetadata(output),
1382
- };
1383
- break;
1384
- case "ValidationException":
1385
- case "com.amazonaws.lookoutequipment#ValidationException":
1386
- response = {
1387
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1388
- name: errorCode,
1389
- $metadata: deserializeMetadata(output),
1390
- };
1391
- break;
1392
- default:
1393
- const parsedBody = parsedOutput.body;
1394
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1395
- response = {
1396
- ...parsedBody,
1397
- name: `${errorCode}`,
1398
- message: parsedBody.message || parsedBody.Message || errorCode,
1399
- $fault: "client",
1400
- $metadata: deserializeMetadata(output),
1401
- } as any;
1402
- }
1403
- const message = response.message || response.Message || errorCode;
1404
- response.message = message;
1405
- delete response.Message;
1406
- return Promise.reject(Object.assign(new Error(message), response));
1407
- };
1408
-
1409
- export const deserializeAws_json1_0ListDatasetsCommand = async (
1410
- output: __HttpResponse,
1411
- context: __SerdeContext
1412
- ): Promise<ListDatasetsCommandOutput> => {
1413
- if (output.statusCode >= 300) {
1414
- return deserializeAws_json1_0ListDatasetsCommandError(output, context);
1415
- }
1416
- const data: any = await parseBody(output.body, context);
1417
- let contents: any = {};
1418
- contents = deserializeAws_json1_0ListDatasetsResponse(data, context);
1419
- const response: ListDatasetsCommandOutput = {
1420
- $metadata: deserializeMetadata(output),
1421
- ...contents,
1422
- };
1423
- return Promise.resolve(response);
1424
- };
1425
-
1426
- const deserializeAws_json1_0ListDatasetsCommandError = async (
1427
- output: __HttpResponse,
1428
- context: __SerdeContext
1429
- ): Promise<ListDatasetsCommandOutput> => {
1430
- const parsedOutput: any = {
1431
- ...output,
1432
- body: await parseBody(output.body, context),
1433
- };
1434
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1435
- let errorCode = "UnknownError";
1436
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1437
- switch (errorCode) {
1438
- case "AccessDeniedException":
1439
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1440
- response = {
1441
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1442
- name: errorCode,
1443
- $metadata: deserializeMetadata(output),
1444
- };
1445
- break;
1446
- case "InternalServerException":
1447
- case "com.amazonaws.lookoutequipment#InternalServerException":
1448
- response = {
1449
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1450
- name: errorCode,
1451
- $metadata: deserializeMetadata(output),
1452
- };
1453
- break;
1454
- case "ThrottlingException":
1455
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1456
- response = {
1457
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1458
- name: errorCode,
1459
- $metadata: deserializeMetadata(output),
1460
- };
1461
- break;
1462
- case "ValidationException":
1463
- case "com.amazonaws.lookoutequipment#ValidationException":
1464
- response = {
1465
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1466
- name: errorCode,
1467
- $metadata: deserializeMetadata(output),
1468
- };
1469
- break;
1470
- default:
1471
- const parsedBody = parsedOutput.body;
1472
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1473
- response = {
1474
- ...parsedBody,
1475
- name: `${errorCode}`,
1476
- message: parsedBody.message || parsedBody.Message || errorCode,
1477
- $fault: "client",
1478
- $metadata: deserializeMetadata(output),
1479
- } as any;
1480
- }
1481
- const message = response.message || response.Message || errorCode;
1482
- response.message = message;
1483
- delete response.Message;
1484
- return Promise.reject(Object.assign(new Error(message), response));
1485
- };
1486
-
1487
- export const deserializeAws_json1_0ListInferenceExecutionsCommand = async (
1488
- output: __HttpResponse,
1489
- context: __SerdeContext
1490
- ): Promise<ListInferenceExecutionsCommandOutput> => {
1491
- if (output.statusCode >= 300) {
1492
- return deserializeAws_json1_0ListInferenceExecutionsCommandError(output, context);
1493
- }
1494
- const data: any = await parseBody(output.body, context);
1495
- let contents: any = {};
1496
- contents = deserializeAws_json1_0ListInferenceExecutionsResponse(data, context);
1497
- const response: ListInferenceExecutionsCommandOutput = {
1498
- $metadata: deserializeMetadata(output),
1499
- ...contents,
1500
- };
1501
- return Promise.resolve(response);
1502
- };
1503
-
1504
- const deserializeAws_json1_0ListInferenceExecutionsCommandError = async (
1505
- output: __HttpResponse,
1506
- context: __SerdeContext
1507
- ): Promise<ListInferenceExecutionsCommandOutput> => {
1508
- const parsedOutput: any = {
1509
- ...output,
1510
- body: await parseBody(output.body, context),
1511
- };
1512
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1513
- let errorCode = "UnknownError";
1514
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1515
- switch (errorCode) {
1516
- case "AccessDeniedException":
1517
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1518
- response = {
1519
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1520
- name: errorCode,
1521
- $metadata: deserializeMetadata(output),
1522
- };
1523
- break;
1524
- case "InternalServerException":
1525
- case "com.amazonaws.lookoutequipment#InternalServerException":
1526
- response = {
1527
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1528
- name: errorCode,
1529
- $metadata: deserializeMetadata(output),
1530
- };
1531
- break;
1532
- case "ResourceNotFoundException":
1533
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
1534
- response = {
1535
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
1536
- name: errorCode,
1537
- $metadata: deserializeMetadata(output),
1538
- };
1539
- break;
1540
- case "ThrottlingException":
1541
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1542
- response = {
1543
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1544
- name: errorCode,
1545
- $metadata: deserializeMetadata(output),
1546
- };
1547
- break;
1548
- case "ValidationException":
1549
- case "com.amazonaws.lookoutequipment#ValidationException":
1550
- response = {
1551
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1552
- name: errorCode,
1553
- $metadata: deserializeMetadata(output),
1554
- };
1555
- break;
1556
- default:
1557
- const parsedBody = parsedOutput.body;
1558
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1559
- response = {
1560
- ...parsedBody,
1561
- name: `${errorCode}`,
1562
- message: parsedBody.message || parsedBody.Message || errorCode,
1563
- $fault: "client",
1564
- $metadata: deserializeMetadata(output),
1565
- } as any;
1566
- }
1567
- const message = response.message || response.Message || errorCode;
1568
- response.message = message;
1569
- delete response.Message;
1570
- return Promise.reject(Object.assign(new Error(message), response));
1571
- };
1572
-
1573
- export const deserializeAws_json1_0ListInferenceSchedulersCommand = async (
1574
- output: __HttpResponse,
1575
- context: __SerdeContext
1576
- ): Promise<ListInferenceSchedulersCommandOutput> => {
1577
- if (output.statusCode >= 300) {
1578
- return deserializeAws_json1_0ListInferenceSchedulersCommandError(output, context);
1579
- }
1580
- const data: any = await parseBody(output.body, context);
1581
- let contents: any = {};
1582
- contents = deserializeAws_json1_0ListInferenceSchedulersResponse(data, context);
1583
- const response: ListInferenceSchedulersCommandOutput = {
1584
- $metadata: deserializeMetadata(output),
1585
- ...contents,
1586
- };
1587
- return Promise.resolve(response);
1588
- };
1589
-
1590
- const deserializeAws_json1_0ListInferenceSchedulersCommandError = async (
1591
- output: __HttpResponse,
1592
- context: __SerdeContext
1593
- ): Promise<ListInferenceSchedulersCommandOutput> => {
1594
- const parsedOutput: any = {
1595
- ...output,
1596
- body: await parseBody(output.body, context),
1597
- };
1598
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1599
- let errorCode = "UnknownError";
1600
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1601
- switch (errorCode) {
1602
- case "AccessDeniedException":
1603
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1604
- response = {
1605
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1606
- name: errorCode,
1607
- $metadata: deserializeMetadata(output),
1608
- };
1609
- break;
1610
- case "InternalServerException":
1611
- case "com.amazonaws.lookoutequipment#InternalServerException":
1612
- response = {
1613
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1614
- name: errorCode,
1615
- $metadata: deserializeMetadata(output),
1616
- };
1617
- break;
1618
- case "ThrottlingException":
1619
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1620
- response = {
1621
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1622
- name: errorCode,
1623
- $metadata: deserializeMetadata(output),
1624
- };
1625
- break;
1626
- case "ValidationException":
1627
- case "com.amazonaws.lookoutequipment#ValidationException":
1628
- response = {
1629
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1630
- name: errorCode,
1631
- $metadata: deserializeMetadata(output),
1632
- };
1633
- break;
1634
- default:
1635
- const parsedBody = parsedOutput.body;
1636
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1637
- response = {
1638
- ...parsedBody,
1639
- name: `${errorCode}`,
1640
- message: parsedBody.message || parsedBody.Message || errorCode,
1641
- $fault: "client",
1642
- $metadata: deserializeMetadata(output),
1643
- } as any;
1644
- }
1645
- const message = response.message || response.Message || errorCode;
1646
- response.message = message;
1647
- delete response.Message;
1648
- return Promise.reject(Object.assign(new Error(message), response));
1649
- };
1650
-
1651
- export const deserializeAws_json1_0ListModelsCommand = async (
1652
- output: __HttpResponse,
1653
- context: __SerdeContext
1654
- ): Promise<ListModelsCommandOutput> => {
1655
- if (output.statusCode >= 300) {
1656
- return deserializeAws_json1_0ListModelsCommandError(output, context);
1657
- }
1658
- const data: any = await parseBody(output.body, context);
1659
- let contents: any = {};
1660
- contents = deserializeAws_json1_0ListModelsResponse(data, context);
1661
- const response: ListModelsCommandOutput = {
1662
- $metadata: deserializeMetadata(output),
1663
- ...contents,
1664
- };
1665
- return Promise.resolve(response);
1666
- };
1667
-
1668
- const deserializeAws_json1_0ListModelsCommandError = async (
1669
- output: __HttpResponse,
1670
- context: __SerdeContext
1671
- ): Promise<ListModelsCommandOutput> => {
1672
- const parsedOutput: any = {
1673
- ...output,
1674
- body: await parseBody(output.body, context),
1675
- };
1676
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1677
- let errorCode = "UnknownError";
1678
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1679
- switch (errorCode) {
1680
- case "AccessDeniedException":
1681
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1682
- response = {
1683
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1684
- name: errorCode,
1685
- $metadata: deserializeMetadata(output),
1686
- };
1687
- break;
1688
- case "InternalServerException":
1689
- case "com.amazonaws.lookoutequipment#InternalServerException":
1690
- response = {
1691
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1692
- name: errorCode,
1693
- $metadata: deserializeMetadata(output),
1694
- };
1695
- break;
1696
- case "ThrottlingException":
1697
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1698
- response = {
1699
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1700
- name: errorCode,
1701
- $metadata: deserializeMetadata(output),
1702
- };
1703
- break;
1704
- case "ValidationException":
1705
- case "com.amazonaws.lookoutequipment#ValidationException":
1706
- response = {
1707
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1708
- name: errorCode,
1709
- $metadata: deserializeMetadata(output),
1710
- };
1711
- break;
1712
- default:
1713
- const parsedBody = parsedOutput.body;
1714
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1715
- response = {
1716
- ...parsedBody,
1717
- name: `${errorCode}`,
1718
- message: parsedBody.message || parsedBody.Message || errorCode,
1719
- $fault: "client",
1720
- $metadata: deserializeMetadata(output),
1721
- } as any;
1722
- }
1723
- const message = response.message || response.Message || errorCode;
1724
- response.message = message;
1725
- delete response.Message;
1726
- return Promise.reject(Object.assign(new Error(message), response));
1727
- };
1728
-
1729
- export const deserializeAws_json1_0ListTagsForResourceCommand = async (
1730
- output: __HttpResponse,
1731
- context: __SerdeContext
1732
- ): Promise<ListTagsForResourceCommandOutput> => {
1733
- if (output.statusCode >= 300) {
1734
- return deserializeAws_json1_0ListTagsForResourceCommandError(output, context);
1735
- }
1736
- const data: any = await parseBody(output.body, context);
1737
- let contents: any = {};
1738
- contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context);
1739
- const response: ListTagsForResourceCommandOutput = {
1740
- $metadata: deserializeMetadata(output),
1741
- ...contents,
1742
- };
1743
- return Promise.resolve(response);
1744
- };
1745
-
1746
- const deserializeAws_json1_0ListTagsForResourceCommandError = async (
1747
- output: __HttpResponse,
1748
- context: __SerdeContext
1749
- ): Promise<ListTagsForResourceCommandOutput> => {
1750
- const parsedOutput: any = {
1751
- ...output,
1752
- body: await parseBody(output.body, context),
1753
- };
1754
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1755
- let errorCode = "UnknownError";
1756
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1757
- switch (errorCode) {
1758
- case "AccessDeniedException":
1759
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1760
- response = {
1761
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1762
- name: errorCode,
1763
- $metadata: deserializeMetadata(output),
1764
- };
1765
- break;
1766
- case "InternalServerException":
1767
- case "com.amazonaws.lookoutequipment#InternalServerException":
1768
- response = {
1769
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1770
- name: errorCode,
1771
- $metadata: deserializeMetadata(output),
1772
- };
1773
- break;
1774
- case "ResourceNotFoundException":
1775
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
1776
- response = {
1777
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
1778
- name: errorCode,
1779
- $metadata: deserializeMetadata(output),
1780
- };
1781
- break;
1782
- case "ThrottlingException":
1783
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1784
- response = {
1785
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1786
- name: errorCode,
1787
- $metadata: deserializeMetadata(output),
1788
- };
1789
- break;
1790
- case "ValidationException":
1791
- case "com.amazonaws.lookoutequipment#ValidationException":
1792
- response = {
1793
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1794
- name: errorCode,
1795
- $metadata: deserializeMetadata(output),
1796
- };
1797
- break;
1798
- default:
1799
- const parsedBody = parsedOutput.body;
1800
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1801
- response = {
1802
- ...parsedBody,
1803
- name: `${errorCode}`,
1804
- message: parsedBody.message || parsedBody.Message || errorCode,
1805
- $fault: "client",
1806
- $metadata: deserializeMetadata(output),
1807
- } as any;
1808
- }
1809
- const message = response.message || response.Message || errorCode;
1810
- response.message = message;
1811
- delete response.Message;
1812
- return Promise.reject(Object.assign(new Error(message), response));
1813
- };
1814
-
1815
- export const deserializeAws_json1_0StartDataIngestionJobCommand = async (
1816
- output: __HttpResponse,
1817
- context: __SerdeContext
1818
- ): Promise<StartDataIngestionJobCommandOutput> => {
1819
- if (output.statusCode >= 300) {
1820
- return deserializeAws_json1_0StartDataIngestionJobCommandError(output, context);
1821
- }
1822
- const data: any = await parseBody(output.body, context);
1823
- let contents: any = {};
1824
- contents = deserializeAws_json1_0StartDataIngestionJobResponse(data, context);
1825
- const response: StartDataIngestionJobCommandOutput = {
1826
- $metadata: deserializeMetadata(output),
1827
- ...contents,
1828
- };
1829
- return Promise.resolve(response);
1830
- };
1831
-
1832
- const deserializeAws_json1_0StartDataIngestionJobCommandError = async (
1833
- output: __HttpResponse,
1834
- context: __SerdeContext
1835
- ): Promise<StartDataIngestionJobCommandOutput> => {
1836
- const parsedOutput: any = {
1837
- ...output,
1838
- body: await parseBody(output.body, context),
1839
- };
1840
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1841
- let errorCode = "UnknownError";
1842
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1843
- switch (errorCode) {
1844
- case "AccessDeniedException":
1845
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1846
- response = {
1847
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1848
- name: errorCode,
1849
- $metadata: deserializeMetadata(output),
1850
- };
1851
- break;
1852
- case "ConflictException":
1853
- case "com.amazonaws.lookoutequipment#ConflictException":
1854
- response = {
1855
- ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
1856
- name: errorCode,
1857
- $metadata: deserializeMetadata(output),
1858
- };
1859
- break;
1860
- case "InternalServerException":
1861
- case "com.amazonaws.lookoutequipment#InternalServerException":
1862
- response = {
1863
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1864
- name: errorCode,
1865
- $metadata: deserializeMetadata(output),
1866
- };
1867
- break;
1868
- case "ResourceNotFoundException":
1869
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
1870
- response = {
1871
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
1872
- name: errorCode,
1873
- $metadata: deserializeMetadata(output),
1874
- };
1875
- break;
1876
- case "ServiceQuotaExceededException":
1877
- case "com.amazonaws.lookoutequipment#ServiceQuotaExceededException":
1878
- response = {
1879
- ...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
1880
- name: errorCode,
1881
- $metadata: deserializeMetadata(output),
1882
- };
1883
- break;
1884
- case "ThrottlingException":
1885
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1886
- response = {
1887
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1888
- name: errorCode,
1889
- $metadata: deserializeMetadata(output),
1890
- };
1891
- break;
1892
- case "ValidationException":
1893
- case "com.amazonaws.lookoutequipment#ValidationException":
1894
- response = {
1895
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1896
- name: errorCode,
1897
- $metadata: deserializeMetadata(output),
1898
- };
1899
- break;
1900
- default:
1901
- const parsedBody = parsedOutput.body;
1902
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1903
- response = {
1904
- ...parsedBody,
1905
- name: `${errorCode}`,
1906
- message: parsedBody.message || parsedBody.Message || errorCode,
1907
- $fault: "client",
1908
- $metadata: deserializeMetadata(output),
1909
- } as any;
1910
- }
1911
- const message = response.message || response.Message || errorCode;
1912
- response.message = message;
1913
- delete response.Message;
1914
- return Promise.reject(Object.assign(new Error(message), response));
1915
- };
1916
-
1917
- export const deserializeAws_json1_0StartInferenceSchedulerCommand = async (
1918
- output: __HttpResponse,
1919
- context: __SerdeContext
1920
- ): Promise<StartInferenceSchedulerCommandOutput> => {
1921
- if (output.statusCode >= 300) {
1922
- return deserializeAws_json1_0StartInferenceSchedulerCommandError(output, context);
1923
- }
1924
- const data: any = await parseBody(output.body, context);
1925
- let contents: any = {};
1926
- contents = deserializeAws_json1_0StartInferenceSchedulerResponse(data, context);
1927
- const response: StartInferenceSchedulerCommandOutput = {
1928
- $metadata: deserializeMetadata(output),
1929
- ...contents,
1930
- };
1931
- return Promise.resolve(response);
1932
- };
1933
-
1934
- const deserializeAws_json1_0StartInferenceSchedulerCommandError = async (
1935
- output: __HttpResponse,
1936
- context: __SerdeContext
1937
- ): Promise<StartInferenceSchedulerCommandOutput> => {
1938
- const parsedOutput: any = {
1939
- ...output,
1940
- body: await parseBody(output.body, context),
1941
- };
1942
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1943
- let errorCode = "UnknownError";
1944
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1945
- switch (errorCode) {
1946
- case "AccessDeniedException":
1947
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
1948
- response = {
1949
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
1950
- name: errorCode,
1951
- $metadata: deserializeMetadata(output),
1952
- };
1953
- break;
1954
- case "ConflictException":
1955
- case "com.amazonaws.lookoutequipment#ConflictException":
1956
- response = {
1957
- ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
1958
- name: errorCode,
1959
- $metadata: deserializeMetadata(output),
1960
- };
1961
- break;
1962
- case "InternalServerException":
1963
- case "com.amazonaws.lookoutequipment#InternalServerException":
1964
- response = {
1965
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
1966
- name: errorCode,
1967
- $metadata: deserializeMetadata(output),
1968
- };
1969
- break;
1970
- case "ResourceNotFoundException":
1971
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
1972
- response = {
1973
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
1974
- name: errorCode,
1975
- $metadata: deserializeMetadata(output),
1976
- };
1977
- break;
1978
- case "ThrottlingException":
1979
- case "com.amazonaws.lookoutequipment#ThrottlingException":
1980
- response = {
1981
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
1982
- name: errorCode,
1983
- $metadata: deserializeMetadata(output),
1984
- };
1985
- break;
1986
- case "ValidationException":
1987
- case "com.amazonaws.lookoutequipment#ValidationException":
1988
- response = {
1989
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
1990
- name: errorCode,
1991
- $metadata: deserializeMetadata(output),
1992
- };
1993
- break;
1994
- default:
1995
- const parsedBody = parsedOutput.body;
1996
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1997
- response = {
1998
- ...parsedBody,
1999
- name: `${errorCode}`,
2000
- message: parsedBody.message || parsedBody.Message || errorCode,
2001
- $fault: "client",
2002
- $metadata: deserializeMetadata(output),
2003
- } as any;
2004
- }
2005
- const message = response.message || response.Message || errorCode;
2006
- response.message = message;
2007
- delete response.Message;
2008
- return Promise.reject(Object.assign(new Error(message), response));
2009
- };
2010
-
2011
- export const deserializeAws_json1_0StopInferenceSchedulerCommand = async (
2012
- output: __HttpResponse,
2013
- context: __SerdeContext
2014
- ): Promise<StopInferenceSchedulerCommandOutput> => {
2015
- if (output.statusCode >= 300) {
2016
- return deserializeAws_json1_0StopInferenceSchedulerCommandError(output, context);
2017
- }
2018
- const data: any = await parseBody(output.body, context);
2019
- let contents: any = {};
2020
- contents = deserializeAws_json1_0StopInferenceSchedulerResponse(data, context);
2021
- const response: StopInferenceSchedulerCommandOutput = {
2022
- $metadata: deserializeMetadata(output),
2023
- ...contents,
2024
- };
2025
- return Promise.resolve(response);
2026
- };
2027
-
2028
- const deserializeAws_json1_0StopInferenceSchedulerCommandError = async (
2029
- output: __HttpResponse,
2030
- context: __SerdeContext
2031
- ): Promise<StopInferenceSchedulerCommandOutput> => {
2032
- const parsedOutput: any = {
2033
- ...output,
2034
- body: await parseBody(output.body, context),
2035
- };
2036
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2037
- let errorCode = "UnknownError";
2038
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2039
- switch (errorCode) {
2040
- case "AccessDeniedException":
2041
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
2042
- response = {
2043
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
2044
- name: errorCode,
2045
- $metadata: deserializeMetadata(output),
2046
- };
2047
- break;
2048
- case "ConflictException":
2049
- case "com.amazonaws.lookoutequipment#ConflictException":
2050
- response = {
2051
- ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
2052
- name: errorCode,
2053
- $metadata: deserializeMetadata(output),
2054
- };
2055
- break;
2056
- case "InternalServerException":
2057
- case "com.amazonaws.lookoutequipment#InternalServerException":
2058
- response = {
2059
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
2060
- name: errorCode,
2061
- $metadata: deserializeMetadata(output),
2062
- };
2063
- break;
2064
- case "ResourceNotFoundException":
2065
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
2066
- response = {
2067
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
2068
- name: errorCode,
2069
- $metadata: deserializeMetadata(output),
2070
- };
2071
- break;
2072
- case "ThrottlingException":
2073
- case "com.amazonaws.lookoutequipment#ThrottlingException":
2074
- response = {
2075
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
2076
- name: errorCode,
2077
- $metadata: deserializeMetadata(output),
2078
- };
2079
- break;
2080
- case "ValidationException":
2081
- case "com.amazonaws.lookoutequipment#ValidationException":
2082
- response = {
2083
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
2084
- name: errorCode,
2085
- $metadata: deserializeMetadata(output),
2086
- };
2087
- break;
2088
- default:
2089
- const parsedBody = parsedOutput.body;
2090
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2091
- response = {
2092
- ...parsedBody,
2093
- name: `${errorCode}`,
2094
- message: parsedBody.message || parsedBody.Message || errorCode,
2095
- $fault: "client",
2096
- $metadata: deserializeMetadata(output),
2097
- } as any;
2098
- }
2099
- const message = response.message || response.Message || errorCode;
2100
- response.message = message;
2101
- delete response.Message;
2102
- return Promise.reject(Object.assign(new Error(message), response));
2103
- };
2104
-
2105
- export const deserializeAws_json1_0TagResourceCommand = async (
2106
- output: __HttpResponse,
2107
- context: __SerdeContext
2108
- ): Promise<TagResourceCommandOutput> => {
2109
- if (output.statusCode >= 300) {
2110
- return deserializeAws_json1_0TagResourceCommandError(output, context);
2111
- }
2112
- const data: any = await parseBody(output.body, context);
2113
- let contents: any = {};
2114
- contents = deserializeAws_json1_0TagResourceResponse(data, context);
2115
- const response: TagResourceCommandOutput = {
2116
- $metadata: deserializeMetadata(output),
2117
- ...contents,
2118
- };
2119
- return Promise.resolve(response);
2120
- };
2121
-
2122
- const deserializeAws_json1_0TagResourceCommandError = async (
2123
- output: __HttpResponse,
2124
- context: __SerdeContext
2125
- ): Promise<TagResourceCommandOutput> => {
2126
- const parsedOutput: any = {
2127
- ...output,
2128
- body: await parseBody(output.body, context),
2129
- };
2130
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2131
- let errorCode = "UnknownError";
2132
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2133
- switch (errorCode) {
2134
- case "AccessDeniedException":
2135
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
2136
- response = {
2137
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
2138
- name: errorCode,
2139
- $metadata: deserializeMetadata(output),
2140
- };
2141
- break;
2142
- case "InternalServerException":
2143
- case "com.amazonaws.lookoutequipment#InternalServerException":
2144
- response = {
2145
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
2146
- name: errorCode,
2147
- $metadata: deserializeMetadata(output),
2148
- };
2149
- break;
2150
- case "ResourceNotFoundException":
2151
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
2152
- response = {
2153
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
2154
- name: errorCode,
2155
- $metadata: deserializeMetadata(output),
2156
- };
2157
- break;
2158
- case "ServiceQuotaExceededException":
2159
- case "com.amazonaws.lookoutequipment#ServiceQuotaExceededException":
2160
- response = {
2161
- ...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
2162
- name: errorCode,
2163
- $metadata: deserializeMetadata(output),
2164
- };
2165
- break;
2166
- case "ThrottlingException":
2167
- case "com.amazonaws.lookoutequipment#ThrottlingException":
2168
- response = {
2169
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
2170
- name: errorCode,
2171
- $metadata: deserializeMetadata(output),
2172
- };
2173
- break;
2174
- case "ValidationException":
2175
- case "com.amazonaws.lookoutequipment#ValidationException":
2176
- response = {
2177
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
2178
- name: errorCode,
2179
- $metadata: deserializeMetadata(output),
2180
- };
2181
- break;
2182
- default:
2183
- const parsedBody = parsedOutput.body;
2184
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2185
- response = {
2186
- ...parsedBody,
2187
- name: `${errorCode}`,
2188
- message: parsedBody.message || parsedBody.Message || errorCode,
2189
- $fault: "client",
2190
- $metadata: deserializeMetadata(output),
2191
- } as any;
2192
- }
2193
- const message = response.message || response.Message || errorCode;
2194
- response.message = message;
2195
- delete response.Message;
2196
- return Promise.reject(Object.assign(new Error(message), response));
2197
- };
2198
-
2199
- export const deserializeAws_json1_0UntagResourceCommand = async (
2200
- output: __HttpResponse,
2201
- context: __SerdeContext
2202
- ): Promise<UntagResourceCommandOutput> => {
2203
- if (output.statusCode >= 300) {
2204
- return deserializeAws_json1_0UntagResourceCommandError(output, context);
2205
- }
2206
- const data: any = await parseBody(output.body, context);
2207
- let contents: any = {};
2208
- contents = deserializeAws_json1_0UntagResourceResponse(data, context);
2209
- const response: UntagResourceCommandOutput = {
2210
- $metadata: deserializeMetadata(output),
2211
- ...contents,
2212
- };
2213
- return Promise.resolve(response);
2214
- };
2215
-
2216
- const deserializeAws_json1_0UntagResourceCommandError = async (
2217
- output: __HttpResponse,
2218
- context: __SerdeContext
2219
- ): Promise<UntagResourceCommandOutput> => {
2220
- const parsedOutput: any = {
2221
- ...output,
2222
- body: await parseBody(output.body, context),
2223
- };
2224
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2225
- let errorCode = "UnknownError";
2226
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2227
- switch (errorCode) {
2228
- case "AccessDeniedException":
2229
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
2230
- response = {
2231
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
2232
- name: errorCode,
2233
- $metadata: deserializeMetadata(output),
2234
- };
2235
- break;
2236
- case "InternalServerException":
2237
- case "com.amazonaws.lookoutequipment#InternalServerException":
2238
- response = {
2239
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
2240
- name: errorCode,
2241
- $metadata: deserializeMetadata(output),
2242
- };
2243
- break;
2244
- case "ResourceNotFoundException":
2245
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
2246
- response = {
2247
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
2248
- name: errorCode,
2249
- $metadata: deserializeMetadata(output),
2250
- };
2251
- break;
2252
- case "ThrottlingException":
2253
- case "com.amazonaws.lookoutequipment#ThrottlingException":
2254
- response = {
2255
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
2256
- name: errorCode,
2257
- $metadata: deserializeMetadata(output),
2258
- };
2259
- break;
2260
- case "ValidationException":
2261
- case "com.amazonaws.lookoutequipment#ValidationException":
2262
- response = {
2263
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
2264
- name: errorCode,
2265
- $metadata: deserializeMetadata(output),
2266
- };
2267
- break;
2268
- default:
2269
- const parsedBody = parsedOutput.body;
2270
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2271
- response = {
2272
- ...parsedBody,
2273
- name: `${errorCode}`,
2274
- message: parsedBody.message || parsedBody.Message || errorCode,
2275
- $fault: "client",
2276
- $metadata: deserializeMetadata(output),
2277
- } as any;
2278
- }
2279
- const message = response.message || response.Message || errorCode;
2280
- response.message = message;
2281
- delete response.Message;
2282
- return Promise.reject(Object.assign(new Error(message), response));
2283
- };
2284
-
2285
- export const deserializeAws_json1_0UpdateInferenceSchedulerCommand = async (
2286
- output: __HttpResponse,
2287
- context: __SerdeContext
2288
- ): Promise<UpdateInferenceSchedulerCommandOutput> => {
2289
- if (output.statusCode >= 300) {
2290
- return deserializeAws_json1_0UpdateInferenceSchedulerCommandError(output, context);
2291
- }
2292
- await collectBody(output.body, context);
2293
- const response: UpdateInferenceSchedulerCommandOutput = {
2294
- $metadata: deserializeMetadata(output),
2295
- };
2296
- return Promise.resolve(response);
2297
- };
2298
-
2299
- const deserializeAws_json1_0UpdateInferenceSchedulerCommandError = async (
2300
- output: __HttpResponse,
2301
- context: __SerdeContext
2302
- ): Promise<UpdateInferenceSchedulerCommandOutput> => {
2303
- const parsedOutput: any = {
2304
- ...output,
2305
- body: await parseBody(output.body, context),
2306
- };
2307
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2308
- let errorCode = "UnknownError";
2309
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2310
- switch (errorCode) {
2311
- case "AccessDeniedException":
2312
- case "com.amazonaws.lookoutequipment#AccessDeniedException":
2313
- response = {
2314
- ...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
2315
- name: errorCode,
2316
- $metadata: deserializeMetadata(output),
2317
- };
2318
- break;
2319
- case "ConflictException":
2320
- case "com.amazonaws.lookoutequipment#ConflictException":
2321
- response = {
2322
- ...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
2323
- name: errorCode,
2324
- $metadata: deserializeMetadata(output),
2325
- };
2326
- break;
2327
- case "InternalServerException":
2328
- case "com.amazonaws.lookoutequipment#InternalServerException":
2329
- response = {
2330
- ...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
2331
- name: errorCode,
2332
- $metadata: deserializeMetadata(output),
2333
- };
2334
- break;
2335
- case "ResourceNotFoundException":
2336
- case "com.amazonaws.lookoutequipment#ResourceNotFoundException":
2337
- response = {
2338
- ...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
2339
- name: errorCode,
2340
- $metadata: deserializeMetadata(output),
2341
- };
2342
- break;
2343
- case "ThrottlingException":
2344
- case "com.amazonaws.lookoutequipment#ThrottlingException":
2345
- response = {
2346
- ...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
2347
- name: errorCode,
2348
- $metadata: deserializeMetadata(output),
2349
- };
2350
- break;
2351
- case "ValidationException":
2352
- case "com.amazonaws.lookoutequipment#ValidationException":
2353
- response = {
2354
- ...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
2355
- name: errorCode,
2356
- $metadata: deserializeMetadata(output),
2357
- };
2358
- break;
2359
- default:
2360
- const parsedBody = parsedOutput.body;
2361
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2362
- response = {
2363
- ...parsedBody,
2364
- name: `${errorCode}`,
2365
- message: parsedBody.message || parsedBody.Message || errorCode,
2366
- $fault: "client",
2367
- $metadata: deserializeMetadata(output),
2368
- } as any;
2369
- }
2370
- const message = response.message || response.Message || errorCode;
2371
- response.message = message;
2372
- delete response.Message;
2373
- return Promise.reject(Object.assign(new Error(message), response));
2374
- };
2375
-
2376
- const deserializeAws_json1_0AccessDeniedExceptionResponse = async (
2377
- parsedOutput: any,
2378
- context: __SerdeContext
2379
- ): Promise<AccessDeniedException> => {
2380
- const body = parsedOutput.body;
2381
- const deserialized: any = deserializeAws_json1_0AccessDeniedException(body, context);
2382
- const contents: AccessDeniedException = {
2383
- name: "AccessDeniedException",
2384
- $fault: "client",
2385
- $metadata: deserializeMetadata(parsedOutput),
2386
- ...deserialized,
2387
- };
2388
- return contents;
2389
- };
2390
-
2391
- const deserializeAws_json1_0ConflictExceptionResponse = async (
2392
- parsedOutput: any,
2393
- context: __SerdeContext
2394
- ): Promise<ConflictException> => {
2395
- const body = parsedOutput.body;
2396
- const deserialized: any = deserializeAws_json1_0ConflictException(body, context);
2397
- const contents: ConflictException = {
2398
- name: "ConflictException",
2399
- $fault: "client",
2400
- $metadata: deserializeMetadata(parsedOutput),
2401
- ...deserialized,
2402
- };
2403
- return contents;
2404
- };
2405
-
2406
- const deserializeAws_json1_0InternalServerExceptionResponse = async (
2407
- parsedOutput: any,
2408
- context: __SerdeContext
2409
- ): Promise<InternalServerException> => {
2410
- const body = parsedOutput.body;
2411
- const deserialized: any = deserializeAws_json1_0InternalServerException(body, context);
2412
- const contents: InternalServerException = {
2413
- name: "InternalServerException",
2414
- $fault: "server",
2415
- $metadata: deserializeMetadata(parsedOutput),
2416
- ...deserialized,
2417
- };
2418
- return contents;
2419
- };
2420
-
2421
- const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (
2422
- parsedOutput: any,
2423
- context: __SerdeContext
2424
- ): Promise<ResourceNotFoundException> => {
2425
- const body = parsedOutput.body;
2426
- const deserialized: any = deserializeAws_json1_0ResourceNotFoundException(body, context);
2427
- const contents: ResourceNotFoundException = {
2428
- name: "ResourceNotFoundException",
2429
- $fault: "client",
2430
- $metadata: deserializeMetadata(parsedOutput),
2431
- ...deserialized,
2432
- };
2433
- return contents;
2434
- };
2435
-
2436
- const deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = async (
2437
- parsedOutput: any,
2438
- context: __SerdeContext
2439
- ): Promise<ServiceQuotaExceededException> => {
2440
- const body = parsedOutput.body;
2441
- const deserialized: any = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
2442
- const contents: ServiceQuotaExceededException = {
2443
- name: "ServiceQuotaExceededException",
2444
- $fault: "client",
2445
- $metadata: deserializeMetadata(parsedOutput),
2446
- ...deserialized,
2447
- };
2448
- return contents;
2449
- };
2450
-
2451
- const deserializeAws_json1_0ThrottlingExceptionResponse = async (
2452
- parsedOutput: any,
2453
- context: __SerdeContext
2454
- ): Promise<ThrottlingException> => {
2455
- const body = parsedOutput.body;
2456
- const deserialized: any = deserializeAws_json1_0ThrottlingException(body, context);
2457
- const contents: ThrottlingException = {
2458
- name: "ThrottlingException",
2459
- $fault: "client",
2460
- $metadata: deserializeMetadata(parsedOutput),
2461
- ...deserialized,
2462
- };
2463
- return contents;
2464
- };
2465
-
2466
- const deserializeAws_json1_0ValidationExceptionResponse = async (
2467
- parsedOutput: any,
2468
- context: __SerdeContext
2469
- ): Promise<ValidationException> => {
2470
- const body = parsedOutput.body;
2471
- const deserialized: any = deserializeAws_json1_0ValidationException(body, context);
2472
- const contents: ValidationException = {
2473
- name: "ValidationException",
2474
- $fault: "client",
2475
- $metadata: deserializeMetadata(parsedOutput),
2476
- ...deserialized,
2477
- };
2478
- return contents;
2479
- };
2480
-
2481
- const serializeAws_json1_0CreateDatasetRequest = (input: CreateDatasetRequest, context: __SerdeContext): any => {
2482
- return {
2483
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
2484
- ...(input.DatasetName !== undefined && input.DatasetName !== null && { DatasetName: input.DatasetName }),
2485
- ...(input.DatasetSchema !== undefined &&
2486
- input.DatasetSchema !== null && {
2487
- DatasetSchema: serializeAws_json1_0DatasetSchema(input.DatasetSchema, context),
2488
- }),
2489
- ...(input.ServerSideKmsKeyId !== undefined &&
2490
- input.ServerSideKmsKeyId !== null && { ServerSideKmsKeyId: input.ServerSideKmsKeyId }),
2491
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
2492
- };
2493
- };
2494
-
2495
- const serializeAws_json1_0CreateInferenceSchedulerRequest = (
2496
- input: CreateInferenceSchedulerRequest,
2497
- context: __SerdeContext
2498
- ): any => {
2499
- return {
2500
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
2501
- ...(input.DataDelayOffsetInMinutes !== undefined &&
2502
- input.DataDelayOffsetInMinutes !== null && { DataDelayOffsetInMinutes: input.DataDelayOffsetInMinutes }),
2503
- ...(input.DataInputConfiguration !== undefined &&
2504
- input.DataInputConfiguration !== null && {
2505
- DataInputConfiguration: serializeAws_json1_0InferenceInputConfiguration(input.DataInputConfiguration, context),
2506
- }),
2507
- ...(input.DataOutputConfiguration !== undefined &&
2508
- input.DataOutputConfiguration !== null && {
2509
- DataOutputConfiguration: serializeAws_json1_0InferenceOutputConfiguration(
2510
- input.DataOutputConfiguration,
2511
- context
2512
- ),
2513
- }),
2514
- ...(input.DataUploadFrequency !== undefined &&
2515
- input.DataUploadFrequency !== null && { DataUploadFrequency: input.DataUploadFrequency }),
2516
- ...(input.InferenceSchedulerName !== undefined &&
2517
- input.InferenceSchedulerName !== null && { InferenceSchedulerName: input.InferenceSchedulerName }),
2518
- ...(input.ModelName !== undefined && input.ModelName !== null && { ModelName: input.ModelName }),
2519
- ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }),
2520
- ...(input.ServerSideKmsKeyId !== undefined &&
2521
- input.ServerSideKmsKeyId !== null && { ServerSideKmsKeyId: input.ServerSideKmsKeyId }),
2522
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
2523
- };
2524
- };
2525
-
2526
- const serializeAws_json1_0CreateModelRequest = (input: CreateModelRequest, context: __SerdeContext): any => {
2527
- return {
2528
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
2529
- ...(input.DataPreProcessingConfiguration !== undefined &&
2530
- input.DataPreProcessingConfiguration !== null && {
2531
- DataPreProcessingConfiguration: serializeAws_json1_0DataPreProcessingConfiguration(
2532
- input.DataPreProcessingConfiguration,
2533
- context
2534
- ),
2535
- }),
2536
- ...(input.DatasetName !== undefined && input.DatasetName !== null && { DatasetName: input.DatasetName }),
2537
- ...(input.DatasetSchema !== undefined &&
2538
- input.DatasetSchema !== null && {
2539
- DatasetSchema: serializeAws_json1_0DatasetSchema(input.DatasetSchema, context),
2540
- }),
2541
- ...(input.EvaluationDataEndTime !== undefined &&
2542
- input.EvaluationDataEndTime !== null && {
2543
- EvaluationDataEndTime: Math.round(input.EvaluationDataEndTime.getTime() / 1000),
2544
- }),
2545
- ...(input.EvaluationDataStartTime !== undefined &&
2546
- input.EvaluationDataStartTime !== null && {
2547
- EvaluationDataStartTime: Math.round(input.EvaluationDataStartTime.getTime() / 1000),
2548
- }),
2549
- ...(input.LabelsInputConfiguration !== undefined &&
2550
- input.LabelsInputConfiguration !== null && {
2551
- LabelsInputConfiguration: serializeAws_json1_0LabelsInputConfiguration(input.LabelsInputConfiguration, context),
2552
- }),
2553
- ...(input.ModelName !== undefined && input.ModelName !== null && { ModelName: input.ModelName }),
2554
- ...(input.OffCondition !== undefined && input.OffCondition !== null && { OffCondition: input.OffCondition }),
2555
- ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }),
2556
- ...(input.ServerSideKmsKeyId !== undefined &&
2557
- input.ServerSideKmsKeyId !== null && { ServerSideKmsKeyId: input.ServerSideKmsKeyId }),
2558
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
2559
- ...(input.TrainingDataEndTime !== undefined &&
2560
- input.TrainingDataEndTime !== null && {
2561
- TrainingDataEndTime: Math.round(input.TrainingDataEndTime.getTime() / 1000),
2562
- }),
2563
- ...(input.TrainingDataStartTime !== undefined &&
2564
- input.TrainingDataStartTime !== null && {
2565
- TrainingDataStartTime: Math.round(input.TrainingDataStartTime.getTime() / 1000),
2566
- }),
2567
- };
2568
- };
2569
-
2570
- const serializeAws_json1_0DataPreProcessingConfiguration = (
2571
- input: DataPreProcessingConfiguration,
2572
- context: __SerdeContext
2573
- ): any => {
2574
- return {
2575
- ...(input.TargetSamplingRate !== undefined &&
2576
- input.TargetSamplingRate !== null && { TargetSamplingRate: input.TargetSamplingRate }),
2577
- };
2578
- };
2579
-
2580
- const serializeAws_json1_0DatasetSchema = (input: DatasetSchema, context: __SerdeContext): any => {
2581
- return {
2582
- ...(input.InlineDataSchema !== undefined &&
2583
- input.InlineDataSchema !== null && { InlineDataSchema: __LazyJsonString.fromObject(input.InlineDataSchema) }),
2584
- };
2585
- };
2586
-
2587
- const serializeAws_json1_0DeleteDatasetRequest = (input: DeleteDatasetRequest, context: __SerdeContext): any => {
2588
- return {
2589
- ...(input.DatasetName !== undefined && input.DatasetName !== null && { DatasetName: input.DatasetName }),
2590
- };
2591
- };
2592
-
2593
- const serializeAws_json1_0DeleteInferenceSchedulerRequest = (
2594
- input: DeleteInferenceSchedulerRequest,
2595
- context: __SerdeContext
2596
- ): any => {
2597
- return {
2598
- ...(input.InferenceSchedulerName !== undefined &&
2599
- input.InferenceSchedulerName !== null && { InferenceSchedulerName: input.InferenceSchedulerName }),
2600
- };
2601
- };
2602
-
2603
- const serializeAws_json1_0DeleteModelRequest = (input: DeleteModelRequest, context: __SerdeContext): any => {
2604
- return {
2605
- ...(input.ModelName !== undefined && input.ModelName !== null && { ModelName: input.ModelName }),
2606
- };
2607
- };
2608
-
2609
- const serializeAws_json1_0DescribeDataIngestionJobRequest = (
2610
- input: DescribeDataIngestionJobRequest,
2611
- context: __SerdeContext
2612
- ): any => {
2613
- return {
2614
- ...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }),
2615
- };
2616
- };
2617
-
2618
- const serializeAws_json1_0DescribeDatasetRequest = (input: DescribeDatasetRequest, context: __SerdeContext): any => {
2619
- return {
2620
- ...(input.DatasetName !== undefined && input.DatasetName !== null && { DatasetName: input.DatasetName }),
2621
- };
2622
- };
2623
-
2624
- const serializeAws_json1_0DescribeInferenceSchedulerRequest = (
2625
- input: DescribeInferenceSchedulerRequest,
2626
- context: __SerdeContext
2627
- ): any => {
2628
- return {
2629
- ...(input.InferenceSchedulerName !== undefined &&
2630
- input.InferenceSchedulerName !== null && { InferenceSchedulerName: input.InferenceSchedulerName }),
2631
- };
2632
- };
2633
-
2634
- const serializeAws_json1_0DescribeModelRequest = (input: DescribeModelRequest, context: __SerdeContext): any => {
2635
- return {
2636
- ...(input.ModelName !== undefined && input.ModelName !== null && { ModelName: input.ModelName }),
2637
- };
2638
- };
2639
-
2640
- const serializeAws_json1_0InferenceInputConfiguration = (
2641
- input: InferenceInputConfiguration,
2642
- context: __SerdeContext
2643
- ): any => {
2644
- return {
2645
- ...(input.InferenceInputNameConfiguration !== undefined &&
2646
- input.InferenceInputNameConfiguration !== null && {
2647
- InferenceInputNameConfiguration: serializeAws_json1_0InferenceInputNameConfiguration(
2648
- input.InferenceInputNameConfiguration,
2649
- context
2650
- ),
2651
- }),
2652
- ...(input.InputTimeZoneOffset !== undefined &&
2653
- input.InputTimeZoneOffset !== null && { InputTimeZoneOffset: input.InputTimeZoneOffset }),
2654
- ...(input.S3InputConfiguration !== undefined &&
2655
- input.S3InputConfiguration !== null && {
2656
- S3InputConfiguration: serializeAws_json1_0InferenceS3InputConfiguration(input.S3InputConfiguration, context),
2657
- }),
2658
- };
2659
- };
2660
-
2661
- const serializeAws_json1_0InferenceInputNameConfiguration = (
2662
- input: InferenceInputNameConfiguration,
2663
- context: __SerdeContext
2664
- ): any => {
2665
- return {
2666
- ...(input.ComponentTimestampDelimiter !== undefined &&
2667
- input.ComponentTimestampDelimiter !== null && { ComponentTimestampDelimiter: input.ComponentTimestampDelimiter }),
2668
- ...(input.TimestampFormat !== undefined &&
2669
- input.TimestampFormat !== null && { TimestampFormat: input.TimestampFormat }),
2670
- };
2671
- };
2672
-
2673
- const serializeAws_json1_0InferenceOutputConfiguration = (
2674
- input: InferenceOutputConfiguration,
2675
- context: __SerdeContext
2676
- ): any => {
2677
- return {
2678
- ...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }),
2679
- ...(input.S3OutputConfiguration !== undefined &&
2680
- input.S3OutputConfiguration !== null && {
2681
- S3OutputConfiguration: serializeAws_json1_0InferenceS3OutputConfiguration(input.S3OutputConfiguration, context),
2682
- }),
2683
- };
2684
- };
2685
-
2686
- const serializeAws_json1_0InferenceS3InputConfiguration = (
2687
- input: InferenceS3InputConfiguration,
2688
- context: __SerdeContext
2689
- ): any => {
2690
- return {
2691
- ...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
2692
- ...(input.Prefix !== undefined && input.Prefix !== null && { Prefix: input.Prefix }),
2693
- };
2694
- };
2695
-
2696
- const serializeAws_json1_0InferenceS3OutputConfiguration = (
2697
- input: InferenceS3OutputConfiguration,
2698
- context: __SerdeContext
2699
- ): any => {
2700
- return {
2701
- ...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
2702
- ...(input.Prefix !== undefined && input.Prefix !== null && { Prefix: input.Prefix }),
2703
- };
2704
- };
2705
-
2706
- const serializeAws_json1_0IngestionInputConfiguration = (
2707
- input: IngestionInputConfiguration,
2708
- context: __SerdeContext
2709
- ): any => {
2710
- return {
2711
- ...(input.S3InputConfiguration !== undefined &&
2712
- input.S3InputConfiguration !== null && {
2713
- S3InputConfiguration: serializeAws_json1_0IngestionS3InputConfiguration(input.S3InputConfiguration, context),
2714
- }),
2715
- };
2716
- };
2717
-
2718
- const serializeAws_json1_0IngestionS3InputConfiguration = (
2719
- input: IngestionS3InputConfiguration,
2720
- context: __SerdeContext
2721
- ): any => {
2722
- return {
2723
- ...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
2724
- ...(input.Prefix !== undefined && input.Prefix !== null && { Prefix: input.Prefix }),
2725
- };
2726
- };
2727
-
2728
- const serializeAws_json1_0LabelsInputConfiguration = (
2729
- input: LabelsInputConfiguration,
2730
- context: __SerdeContext
2731
- ): any => {
2732
- return {
2733
- ...(input.S3InputConfiguration !== undefined &&
2734
- input.S3InputConfiguration !== null && {
2735
- S3InputConfiguration: serializeAws_json1_0LabelsS3InputConfiguration(input.S3InputConfiguration, context),
2736
- }),
2737
- };
2738
- };
2739
-
2740
- const serializeAws_json1_0LabelsS3InputConfiguration = (
2741
- input: LabelsS3InputConfiguration,
2742
- context: __SerdeContext
2743
- ): any => {
2744
- return {
2745
- ...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
2746
- ...(input.Prefix !== undefined && input.Prefix !== null && { Prefix: input.Prefix }),
2747
- };
2748
- };
2749
-
2750
- const serializeAws_json1_0ListDataIngestionJobsRequest = (
2751
- input: ListDataIngestionJobsRequest,
2752
- context: __SerdeContext
2753
- ): any => {
2754
- return {
2755
- ...(input.DatasetName !== undefined && input.DatasetName !== null && { DatasetName: input.DatasetName }),
2756
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
2757
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
2758
- ...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
2759
- };
2760
- };
2761
-
2762
- const serializeAws_json1_0ListDatasetsRequest = (input: ListDatasetsRequest, context: __SerdeContext): any => {
2763
- return {
2764
- ...(input.DatasetNameBeginsWith !== undefined &&
2765
- input.DatasetNameBeginsWith !== null && { DatasetNameBeginsWith: input.DatasetNameBeginsWith }),
2766
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
2767
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
2768
- };
2769
- };
2770
-
2771
- const serializeAws_json1_0ListInferenceExecutionsRequest = (
2772
- input: ListInferenceExecutionsRequest,
2773
- context: __SerdeContext
2774
- ): any => {
2775
- return {
2776
- ...(input.DataEndTimeBefore !== undefined &&
2777
- input.DataEndTimeBefore !== null && { DataEndTimeBefore: Math.round(input.DataEndTimeBefore.getTime() / 1000) }),
2778
- ...(input.DataStartTimeAfter !== undefined &&
2779
- input.DataStartTimeAfter !== null && {
2780
- DataStartTimeAfter: Math.round(input.DataStartTimeAfter.getTime() / 1000),
2781
- }),
2782
- ...(input.InferenceSchedulerName !== undefined &&
2783
- input.InferenceSchedulerName !== null && { InferenceSchedulerName: input.InferenceSchedulerName }),
2784
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
2785
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
2786
- ...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
2787
- };
2788
- };
2789
-
2790
- const serializeAws_json1_0ListInferenceSchedulersRequest = (
2791
- input: ListInferenceSchedulersRequest,
2792
- context: __SerdeContext
2793
- ): any => {
2794
- return {
2795
- ...(input.InferenceSchedulerNameBeginsWith !== undefined &&
2796
- input.InferenceSchedulerNameBeginsWith !== null && {
2797
- InferenceSchedulerNameBeginsWith: input.InferenceSchedulerNameBeginsWith,
2798
- }),
2799
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
2800
- ...(input.ModelName !== undefined && input.ModelName !== null && { ModelName: input.ModelName }),
2801
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
2802
- };
2803
- };
2804
-
2805
- const serializeAws_json1_0ListModelsRequest = (input: ListModelsRequest, context: __SerdeContext): any => {
2806
- return {
2807
- ...(input.DatasetNameBeginsWith !== undefined &&
2808
- input.DatasetNameBeginsWith !== null && { DatasetNameBeginsWith: input.DatasetNameBeginsWith }),
2809
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
2810
- ...(input.ModelNameBeginsWith !== undefined &&
2811
- input.ModelNameBeginsWith !== null && { ModelNameBeginsWith: input.ModelNameBeginsWith }),
2812
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
2813
- ...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
2814
- };
2815
- };
2816
-
2817
- const serializeAws_json1_0ListTagsForResourceRequest = (
2818
- input: ListTagsForResourceRequest,
2819
- context: __SerdeContext
2820
- ): any => {
2821
- return {
2822
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2823
- };
2824
- };
2825
-
2826
- const serializeAws_json1_0StartDataIngestionJobRequest = (
2827
- input: StartDataIngestionJobRequest,
2828
- context: __SerdeContext
2829
- ): any => {
2830
- return {
2831
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
2832
- ...(input.DatasetName !== undefined && input.DatasetName !== null && { DatasetName: input.DatasetName }),
2833
- ...(input.IngestionInputConfiguration !== undefined &&
2834
- input.IngestionInputConfiguration !== null && {
2835
- IngestionInputConfiguration: serializeAws_json1_0IngestionInputConfiguration(
2836
- input.IngestionInputConfiguration,
2837
- context
2838
- ),
2839
- }),
2840
- ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }),
2841
- };
2842
- };
2843
-
2844
- const serializeAws_json1_0StartInferenceSchedulerRequest = (
2845
- input: StartInferenceSchedulerRequest,
2846
- context: __SerdeContext
2847
- ): any => {
2848
- return {
2849
- ...(input.InferenceSchedulerName !== undefined &&
2850
- input.InferenceSchedulerName !== null && { InferenceSchedulerName: input.InferenceSchedulerName }),
2851
- };
2852
- };
2853
-
2854
- const serializeAws_json1_0StopInferenceSchedulerRequest = (
2855
- input: StopInferenceSchedulerRequest,
2856
- context: __SerdeContext
2857
- ): any => {
2858
- return {
2859
- ...(input.InferenceSchedulerName !== undefined &&
2860
- input.InferenceSchedulerName !== null && { InferenceSchedulerName: input.InferenceSchedulerName }),
2861
- };
2862
- };
2863
-
2864
- const serializeAws_json1_0Tag = (input: Tag, context: __SerdeContext): any => {
2865
- return {
2866
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
2867
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
2868
- };
2869
- };
2870
-
2871
- const serializeAws_json1_0TagKeyList = (input: string[], context: __SerdeContext): any => {
2872
- return input
2873
- .filter((e: any) => e != null)
2874
- .map((entry) => {
2875
- if (entry === null) {
2876
- return null as any;
2877
- }
2878
- return entry;
2879
- });
2880
- };
2881
-
2882
- const serializeAws_json1_0TagList = (input: Tag[], context: __SerdeContext): any => {
2883
- return input
2884
- .filter((e: any) => e != null)
2885
- .map((entry) => {
2886
- if (entry === null) {
2887
- return null as any;
2888
- }
2889
- return serializeAws_json1_0Tag(entry, context);
2890
- });
2891
- };
2892
-
2893
- const serializeAws_json1_0TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => {
2894
- return {
2895
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2896
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
2897
- };
2898
- };
2899
-
2900
- const serializeAws_json1_0UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => {
2901
- return {
2902
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2903
- ...(input.TagKeys !== undefined &&
2904
- input.TagKeys !== null && { TagKeys: serializeAws_json1_0TagKeyList(input.TagKeys, context) }),
2905
- };
2906
- };
2907
-
2908
- const serializeAws_json1_0UpdateInferenceSchedulerRequest = (
2909
- input: UpdateInferenceSchedulerRequest,
2910
- context: __SerdeContext
2911
- ): any => {
2912
- return {
2913
- ...(input.DataDelayOffsetInMinutes !== undefined &&
2914
- input.DataDelayOffsetInMinutes !== null && { DataDelayOffsetInMinutes: input.DataDelayOffsetInMinutes }),
2915
- ...(input.DataInputConfiguration !== undefined &&
2916
- input.DataInputConfiguration !== null && {
2917
- DataInputConfiguration: serializeAws_json1_0InferenceInputConfiguration(input.DataInputConfiguration, context),
2918
- }),
2919
- ...(input.DataOutputConfiguration !== undefined &&
2920
- input.DataOutputConfiguration !== null && {
2921
- DataOutputConfiguration: serializeAws_json1_0InferenceOutputConfiguration(
2922
- input.DataOutputConfiguration,
2923
- context
2924
- ),
2925
- }),
2926
- ...(input.DataUploadFrequency !== undefined &&
2927
- input.DataUploadFrequency !== null && { DataUploadFrequency: input.DataUploadFrequency }),
2928
- ...(input.InferenceSchedulerName !== undefined &&
2929
- input.InferenceSchedulerName !== null && { InferenceSchedulerName: input.InferenceSchedulerName }),
2930
- ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }),
2931
- };
2932
- };
2933
-
2934
- const deserializeAws_json1_0AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => {
2935
- return {
2936
- Message: __expectString(output.Message),
2937
- } as any;
2938
- };
2939
-
2940
- const deserializeAws_json1_0ConflictException = (output: any, context: __SerdeContext): ConflictException => {
2941
- return {
2942
- Message: __expectString(output.Message),
2943
- } as any;
2944
- };
2945
-
2946
- const deserializeAws_json1_0CreateDatasetResponse = (output: any, context: __SerdeContext): CreateDatasetResponse => {
2947
- return {
2948
- DatasetArn: __expectString(output.DatasetArn),
2949
- DatasetName: __expectString(output.DatasetName),
2950
- Status: __expectString(output.Status),
2951
- } as any;
2952
- };
2953
-
2954
- const deserializeAws_json1_0CreateInferenceSchedulerResponse = (
2955
- output: any,
2956
- context: __SerdeContext
2957
- ): CreateInferenceSchedulerResponse => {
2958
- return {
2959
- InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn),
2960
- InferenceSchedulerName: __expectString(output.InferenceSchedulerName),
2961
- Status: __expectString(output.Status),
2962
- } as any;
2963
- };
2964
-
2965
- const deserializeAws_json1_0CreateModelResponse = (output: any, context: __SerdeContext): CreateModelResponse => {
2966
- return {
2967
- ModelArn: __expectString(output.ModelArn),
2968
- Status: __expectString(output.Status),
2969
- } as any;
2970
- };
2971
-
2972
- const deserializeAws_json1_0DataIngestionJobSummaries = (
2973
- output: any,
2974
- context: __SerdeContext
2975
- ): DataIngestionJobSummary[] => {
2976
- return (output || [])
2977
- .filter((e: any) => e != null)
2978
- .map((entry: any) => {
2979
- if (entry === null) {
2980
- return null as any;
2981
- }
2982
- return deserializeAws_json1_0DataIngestionJobSummary(entry, context);
2983
- });
2984
- };
2985
-
2986
- const deserializeAws_json1_0DataIngestionJobSummary = (
2987
- output: any,
2988
- context: __SerdeContext
2989
- ): DataIngestionJobSummary => {
2990
- return {
2991
- DatasetArn: __expectString(output.DatasetArn),
2992
- DatasetName: __expectString(output.DatasetName),
2993
- IngestionInputConfiguration:
2994
- output.IngestionInputConfiguration !== undefined && output.IngestionInputConfiguration !== null
2995
- ? deserializeAws_json1_0IngestionInputConfiguration(output.IngestionInputConfiguration, context)
2996
- : undefined,
2997
- JobId: __expectString(output.JobId),
2998
- Status: __expectString(output.Status),
2999
- } as any;
3000
- };
3001
-
3002
- const deserializeAws_json1_0DataPreProcessingConfiguration = (
3003
- output: any,
3004
- context: __SerdeContext
3005
- ): DataPreProcessingConfiguration => {
3006
- return {
3007
- TargetSamplingRate: __expectString(output.TargetSamplingRate),
3008
- } as any;
3009
- };
3010
-
3011
- const deserializeAws_json1_0DatasetSummaries = (output: any, context: __SerdeContext): DatasetSummary[] => {
3012
- return (output || [])
3013
- .filter((e: any) => e != null)
3014
- .map((entry: any) => {
3015
- if (entry === null) {
3016
- return null as any;
3017
- }
3018
- return deserializeAws_json1_0DatasetSummary(entry, context);
3019
- });
3020
- };
3021
-
3022
- const deserializeAws_json1_0DatasetSummary = (output: any, context: __SerdeContext): DatasetSummary => {
3023
- return {
3024
- CreatedAt:
3025
- output.CreatedAt !== undefined && output.CreatedAt !== null
3026
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3027
- : undefined,
3028
- DatasetArn: __expectString(output.DatasetArn),
3029
- DatasetName: __expectString(output.DatasetName),
3030
- Status: __expectString(output.Status),
3031
- } as any;
3032
- };
3033
-
3034
- const deserializeAws_json1_0DescribeDataIngestionJobResponse = (
3035
- output: any,
3036
- context: __SerdeContext
3037
- ): DescribeDataIngestionJobResponse => {
3038
- return {
3039
- CreatedAt:
3040
- output.CreatedAt !== undefined && output.CreatedAt !== null
3041
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3042
- : undefined,
3043
- DatasetArn: __expectString(output.DatasetArn),
3044
- FailedReason: __expectString(output.FailedReason),
3045
- IngestionInputConfiguration:
3046
- output.IngestionInputConfiguration !== undefined && output.IngestionInputConfiguration !== null
3047
- ? deserializeAws_json1_0IngestionInputConfiguration(output.IngestionInputConfiguration, context)
3048
- : undefined,
3049
- JobId: __expectString(output.JobId),
3050
- RoleArn: __expectString(output.RoleArn),
3051
- Status: __expectString(output.Status),
3052
- } as any;
3053
- };
3054
-
3055
- const deserializeAws_json1_0DescribeDatasetResponse = (
3056
- output: any,
3057
- context: __SerdeContext
3058
- ): DescribeDatasetResponse => {
3059
- return {
3060
- CreatedAt:
3061
- output.CreatedAt !== undefined && output.CreatedAt !== null
3062
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3063
- : undefined,
3064
- DatasetArn: __expectString(output.DatasetArn),
3065
- DatasetName: __expectString(output.DatasetName),
3066
- IngestionInputConfiguration:
3067
- output.IngestionInputConfiguration !== undefined && output.IngestionInputConfiguration !== null
3068
- ? deserializeAws_json1_0IngestionInputConfiguration(output.IngestionInputConfiguration, context)
3069
- : undefined,
3070
- LastUpdatedAt:
3071
- output.LastUpdatedAt !== undefined && output.LastUpdatedAt !== null
3072
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt)))
3073
- : undefined,
3074
- Schema: output.Schema !== undefined && output.Schema !== null ? new __LazyJsonString(output.Schema) : undefined,
3075
- ServerSideKmsKeyId: __expectString(output.ServerSideKmsKeyId),
3076
- Status: __expectString(output.Status),
3077
- } as any;
3078
- };
3079
-
3080
- const deserializeAws_json1_0DescribeInferenceSchedulerResponse = (
3081
- output: any,
3082
- context: __SerdeContext
3083
- ): DescribeInferenceSchedulerResponse => {
3084
- return {
3085
- CreatedAt:
3086
- output.CreatedAt !== undefined && output.CreatedAt !== null
3087
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3088
- : undefined,
3089
- DataDelayOffsetInMinutes: __expectLong(output.DataDelayOffsetInMinutes),
3090
- DataInputConfiguration:
3091
- output.DataInputConfiguration !== undefined && output.DataInputConfiguration !== null
3092
- ? deserializeAws_json1_0InferenceInputConfiguration(output.DataInputConfiguration, context)
3093
- : undefined,
3094
- DataOutputConfiguration:
3095
- output.DataOutputConfiguration !== undefined && output.DataOutputConfiguration !== null
3096
- ? deserializeAws_json1_0InferenceOutputConfiguration(output.DataOutputConfiguration, context)
3097
- : undefined,
3098
- DataUploadFrequency: __expectString(output.DataUploadFrequency),
3099
- InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn),
3100
- InferenceSchedulerName: __expectString(output.InferenceSchedulerName),
3101
- ModelArn: __expectString(output.ModelArn),
3102
- ModelName: __expectString(output.ModelName),
3103
- RoleArn: __expectString(output.RoleArn),
3104
- ServerSideKmsKeyId: __expectString(output.ServerSideKmsKeyId),
3105
- Status: __expectString(output.Status),
3106
- UpdatedAt:
3107
- output.UpdatedAt !== undefined && output.UpdatedAt !== null
3108
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt)))
3109
- : undefined,
3110
- } as any;
3111
- };
3112
-
3113
- const deserializeAws_json1_0DescribeModelResponse = (output: any, context: __SerdeContext): DescribeModelResponse => {
3114
- return {
3115
- CreatedAt:
3116
- output.CreatedAt !== undefined && output.CreatedAt !== null
3117
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3118
- : undefined,
3119
- DataPreProcessingConfiguration:
3120
- output.DataPreProcessingConfiguration !== undefined && output.DataPreProcessingConfiguration !== null
3121
- ? deserializeAws_json1_0DataPreProcessingConfiguration(output.DataPreProcessingConfiguration, context)
3122
- : undefined,
3123
- DatasetArn: __expectString(output.DatasetArn),
3124
- DatasetName: __expectString(output.DatasetName),
3125
- EvaluationDataEndTime:
3126
- output.EvaluationDataEndTime !== undefined && output.EvaluationDataEndTime !== null
3127
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EvaluationDataEndTime)))
3128
- : undefined,
3129
- EvaluationDataStartTime:
3130
- output.EvaluationDataStartTime !== undefined && output.EvaluationDataStartTime !== null
3131
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EvaluationDataStartTime)))
3132
- : undefined,
3133
- FailedReason: __expectString(output.FailedReason),
3134
- LabelsInputConfiguration:
3135
- output.LabelsInputConfiguration !== undefined && output.LabelsInputConfiguration !== null
3136
- ? deserializeAws_json1_0LabelsInputConfiguration(output.LabelsInputConfiguration, context)
3137
- : undefined,
3138
- LastUpdatedTime:
3139
- output.LastUpdatedTime !== undefined && output.LastUpdatedTime !== null
3140
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime)))
3141
- : undefined,
3142
- ModelArn: __expectString(output.ModelArn),
3143
- ModelMetrics:
3144
- output.ModelMetrics !== undefined && output.ModelMetrics !== null
3145
- ? new __LazyJsonString(output.ModelMetrics)
3146
- : undefined,
3147
- ModelName: __expectString(output.ModelName),
3148
- OffCondition: __expectString(output.OffCondition),
3149
- RoleArn: __expectString(output.RoleArn),
3150
- Schema: output.Schema !== undefined && output.Schema !== null ? new __LazyJsonString(output.Schema) : undefined,
3151
- ServerSideKmsKeyId: __expectString(output.ServerSideKmsKeyId),
3152
- Status: __expectString(output.Status),
3153
- TrainingDataEndTime:
3154
- output.TrainingDataEndTime !== undefined && output.TrainingDataEndTime !== null
3155
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingDataEndTime)))
3156
- : undefined,
3157
- TrainingDataStartTime:
3158
- output.TrainingDataStartTime !== undefined && output.TrainingDataStartTime !== null
3159
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingDataStartTime)))
3160
- : undefined,
3161
- TrainingExecutionEndTime:
3162
- output.TrainingExecutionEndTime !== undefined && output.TrainingExecutionEndTime !== null
3163
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingExecutionEndTime)))
3164
- : undefined,
3165
- TrainingExecutionStartTime:
3166
- output.TrainingExecutionStartTime !== undefined && output.TrainingExecutionStartTime !== null
3167
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingExecutionStartTime)))
3168
- : undefined,
3169
- } as any;
3170
- };
3171
-
3172
- const deserializeAws_json1_0InferenceExecutionSummaries = (
3173
- output: any,
3174
- context: __SerdeContext
3175
- ): InferenceExecutionSummary[] => {
3176
- return (output || [])
3177
- .filter((e: any) => e != null)
3178
- .map((entry: any) => {
3179
- if (entry === null) {
3180
- return null as any;
3181
- }
3182
- return deserializeAws_json1_0InferenceExecutionSummary(entry, context);
3183
- });
3184
- };
3185
-
3186
- const deserializeAws_json1_0InferenceExecutionSummary = (
3187
- output: any,
3188
- context: __SerdeContext
3189
- ): InferenceExecutionSummary => {
3190
- return {
3191
- CustomerResultObject:
3192
- output.CustomerResultObject !== undefined && output.CustomerResultObject !== null
3193
- ? deserializeAws_json1_0S3Object(output.CustomerResultObject, context)
3194
- : undefined,
3195
- DataEndTime:
3196
- output.DataEndTime !== undefined && output.DataEndTime !== null
3197
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DataEndTime)))
3198
- : undefined,
3199
- DataInputConfiguration:
3200
- output.DataInputConfiguration !== undefined && output.DataInputConfiguration !== null
3201
- ? deserializeAws_json1_0InferenceInputConfiguration(output.DataInputConfiguration, context)
3202
- : undefined,
3203
- DataOutputConfiguration:
3204
- output.DataOutputConfiguration !== undefined && output.DataOutputConfiguration !== null
3205
- ? deserializeAws_json1_0InferenceOutputConfiguration(output.DataOutputConfiguration, context)
3206
- : undefined,
3207
- DataStartTime:
3208
- output.DataStartTime !== undefined && output.DataStartTime !== null
3209
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DataStartTime)))
3210
- : undefined,
3211
- FailedReason: __expectString(output.FailedReason),
3212
- InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn),
3213
- InferenceSchedulerName: __expectString(output.InferenceSchedulerName),
3214
- ModelArn: __expectString(output.ModelArn),
3215
- ModelName: __expectString(output.ModelName),
3216
- ScheduledStartTime:
3217
- output.ScheduledStartTime !== undefined && output.ScheduledStartTime !== null
3218
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ScheduledStartTime)))
3219
- : undefined,
3220
- Status: __expectString(output.Status),
3221
- } as any;
3222
- };
3223
-
3224
- const deserializeAws_json1_0InferenceInputConfiguration = (
3225
- output: any,
3226
- context: __SerdeContext
3227
- ): InferenceInputConfiguration => {
3228
- return {
3229
- InferenceInputNameConfiguration:
3230
- output.InferenceInputNameConfiguration !== undefined && output.InferenceInputNameConfiguration !== null
3231
- ? deserializeAws_json1_0InferenceInputNameConfiguration(output.InferenceInputNameConfiguration, context)
3232
- : undefined,
3233
- InputTimeZoneOffset: __expectString(output.InputTimeZoneOffset),
3234
- S3InputConfiguration:
3235
- output.S3InputConfiguration !== undefined && output.S3InputConfiguration !== null
3236
- ? deserializeAws_json1_0InferenceS3InputConfiguration(output.S3InputConfiguration, context)
3237
- : undefined,
3238
- } as any;
3239
- };
3240
-
3241
- const deserializeAws_json1_0InferenceInputNameConfiguration = (
3242
- output: any,
3243
- context: __SerdeContext
3244
- ): InferenceInputNameConfiguration => {
3245
- return {
3246
- ComponentTimestampDelimiter: __expectString(output.ComponentTimestampDelimiter),
3247
- TimestampFormat: __expectString(output.TimestampFormat),
3248
- } as any;
3249
- };
3250
-
3251
- const deserializeAws_json1_0InferenceOutputConfiguration = (
3252
- output: any,
3253
- context: __SerdeContext
3254
- ): InferenceOutputConfiguration => {
3255
- return {
3256
- KmsKeyId: __expectString(output.KmsKeyId),
3257
- S3OutputConfiguration:
3258
- output.S3OutputConfiguration !== undefined && output.S3OutputConfiguration !== null
3259
- ? deserializeAws_json1_0InferenceS3OutputConfiguration(output.S3OutputConfiguration, context)
3260
- : undefined,
3261
- } as any;
3262
- };
3263
-
3264
- const deserializeAws_json1_0InferenceS3InputConfiguration = (
3265
- output: any,
3266
- context: __SerdeContext
3267
- ): InferenceS3InputConfiguration => {
3268
- return {
3269
- Bucket: __expectString(output.Bucket),
3270
- Prefix: __expectString(output.Prefix),
3271
- } as any;
3272
- };
3273
-
3274
- const deserializeAws_json1_0InferenceS3OutputConfiguration = (
3275
- output: any,
3276
- context: __SerdeContext
3277
- ): InferenceS3OutputConfiguration => {
3278
- return {
3279
- Bucket: __expectString(output.Bucket),
3280
- Prefix: __expectString(output.Prefix),
3281
- } as any;
3282
- };
3283
-
3284
- const deserializeAws_json1_0InferenceSchedulerSummaries = (
3285
- output: any,
3286
- context: __SerdeContext
3287
- ): InferenceSchedulerSummary[] => {
3288
- return (output || [])
3289
- .filter((e: any) => e != null)
3290
- .map((entry: any) => {
3291
- if (entry === null) {
3292
- return null as any;
3293
- }
3294
- return deserializeAws_json1_0InferenceSchedulerSummary(entry, context);
3295
- });
3296
- };
3297
-
3298
- const deserializeAws_json1_0InferenceSchedulerSummary = (
3299
- output: any,
3300
- context: __SerdeContext
3301
- ): InferenceSchedulerSummary => {
3302
- return {
3303
- DataDelayOffsetInMinutes: __expectLong(output.DataDelayOffsetInMinutes),
3304
- DataUploadFrequency: __expectString(output.DataUploadFrequency),
3305
- InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn),
3306
- InferenceSchedulerName: __expectString(output.InferenceSchedulerName),
3307
- ModelArn: __expectString(output.ModelArn),
3308
- ModelName: __expectString(output.ModelName),
3309
- Status: __expectString(output.Status),
3310
- } as any;
3311
- };
3312
-
3313
- const deserializeAws_json1_0IngestionInputConfiguration = (
3314
- output: any,
3315
- context: __SerdeContext
3316
- ): IngestionInputConfiguration => {
3317
- return {
3318
- S3InputConfiguration:
3319
- output.S3InputConfiguration !== undefined && output.S3InputConfiguration !== null
3320
- ? deserializeAws_json1_0IngestionS3InputConfiguration(output.S3InputConfiguration, context)
3321
- : undefined,
3322
- } as any;
3323
- };
3324
-
3325
- const deserializeAws_json1_0IngestionS3InputConfiguration = (
3326
- output: any,
3327
- context: __SerdeContext
3328
- ): IngestionS3InputConfiguration => {
3329
- return {
3330
- Bucket: __expectString(output.Bucket),
3331
- Prefix: __expectString(output.Prefix),
3332
- } as any;
3333
- };
3334
-
3335
- const deserializeAws_json1_0InternalServerException = (
3336
- output: any,
3337
- context: __SerdeContext
3338
- ): InternalServerException => {
3339
- return {
3340
- Message: __expectString(output.Message),
3341
- } as any;
3342
- };
3343
-
3344
- const deserializeAws_json1_0LabelsInputConfiguration = (
3345
- output: any,
3346
- context: __SerdeContext
3347
- ): LabelsInputConfiguration => {
3348
- return {
3349
- S3InputConfiguration:
3350
- output.S3InputConfiguration !== undefined && output.S3InputConfiguration !== null
3351
- ? deserializeAws_json1_0LabelsS3InputConfiguration(output.S3InputConfiguration, context)
3352
- : undefined,
3353
- } as any;
3354
- };
3355
-
3356
- const deserializeAws_json1_0LabelsS3InputConfiguration = (
3357
- output: any,
3358
- context: __SerdeContext
3359
- ): LabelsS3InputConfiguration => {
3360
- return {
3361
- Bucket: __expectString(output.Bucket),
3362
- Prefix: __expectString(output.Prefix),
3363
- } as any;
3364
- };
3365
-
3366
- const deserializeAws_json1_0ListDataIngestionJobsResponse = (
3367
- output: any,
3368
- context: __SerdeContext
3369
- ): ListDataIngestionJobsResponse => {
3370
- return {
3371
- DataIngestionJobSummaries:
3372
- output.DataIngestionJobSummaries !== undefined && output.DataIngestionJobSummaries !== null
3373
- ? deserializeAws_json1_0DataIngestionJobSummaries(output.DataIngestionJobSummaries, context)
3374
- : undefined,
3375
- NextToken: __expectString(output.NextToken),
3376
- } as any;
3377
- };
3378
-
3379
- const deserializeAws_json1_0ListDatasetsResponse = (output: any, context: __SerdeContext): ListDatasetsResponse => {
3380
- return {
3381
- DatasetSummaries:
3382
- output.DatasetSummaries !== undefined && output.DatasetSummaries !== null
3383
- ? deserializeAws_json1_0DatasetSummaries(output.DatasetSummaries, context)
3384
- : undefined,
3385
- NextToken: __expectString(output.NextToken),
3386
- } as any;
3387
- };
3388
-
3389
- const deserializeAws_json1_0ListInferenceExecutionsResponse = (
3390
- output: any,
3391
- context: __SerdeContext
3392
- ): ListInferenceExecutionsResponse => {
3393
- return {
3394
- InferenceExecutionSummaries:
3395
- output.InferenceExecutionSummaries !== undefined && output.InferenceExecutionSummaries !== null
3396
- ? deserializeAws_json1_0InferenceExecutionSummaries(output.InferenceExecutionSummaries, context)
3397
- : undefined,
3398
- NextToken: __expectString(output.NextToken),
3399
- } as any;
3400
- };
3401
-
3402
- const deserializeAws_json1_0ListInferenceSchedulersResponse = (
3403
- output: any,
3404
- context: __SerdeContext
3405
- ): ListInferenceSchedulersResponse => {
3406
- return {
3407
- InferenceSchedulerSummaries:
3408
- output.InferenceSchedulerSummaries !== undefined && output.InferenceSchedulerSummaries !== null
3409
- ? deserializeAws_json1_0InferenceSchedulerSummaries(output.InferenceSchedulerSummaries, context)
3410
- : undefined,
3411
- NextToken: __expectString(output.NextToken),
3412
- } as any;
3413
- };
3414
-
3415
- const deserializeAws_json1_0ListModelsResponse = (output: any, context: __SerdeContext): ListModelsResponse => {
3416
- return {
3417
- ModelSummaries:
3418
- output.ModelSummaries !== undefined && output.ModelSummaries !== null
3419
- ? deserializeAws_json1_0ModelSummaries(output.ModelSummaries, context)
3420
- : undefined,
3421
- NextToken: __expectString(output.NextToken),
3422
- } as any;
3423
- };
3424
-
3425
- const deserializeAws_json1_0ListTagsForResourceResponse = (
3426
- output: any,
3427
- context: __SerdeContext
3428
- ): ListTagsForResourceResponse => {
3429
- return {
3430
- Tags:
3431
- output.Tags !== undefined && output.Tags !== null
3432
- ? deserializeAws_json1_0TagList(output.Tags, context)
3433
- : undefined,
3434
- } as any;
3435
- };
3436
-
3437
- const deserializeAws_json1_0ModelSummaries = (output: any, context: __SerdeContext): ModelSummary[] => {
3438
- return (output || [])
3439
- .filter((e: any) => e != null)
3440
- .map((entry: any) => {
3441
- if (entry === null) {
3442
- return null as any;
3443
- }
3444
- return deserializeAws_json1_0ModelSummary(entry, context);
3445
- });
3446
- };
3447
-
3448
- const deserializeAws_json1_0ModelSummary = (output: any, context: __SerdeContext): ModelSummary => {
3449
- return {
3450
- CreatedAt:
3451
- output.CreatedAt !== undefined && output.CreatedAt !== null
3452
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3453
- : undefined,
3454
- DatasetArn: __expectString(output.DatasetArn),
3455
- DatasetName: __expectString(output.DatasetName),
3456
- ModelArn: __expectString(output.ModelArn),
3457
- ModelName: __expectString(output.ModelName),
3458
- Status: __expectString(output.Status),
3459
- } as any;
3460
- };
3461
-
3462
- const deserializeAws_json1_0ResourceNotFoundException = (
3463
- output: any,
3464
- context: __SerdeContext
3465
- ): ResourceNotFoundException => {
3466
- return {
3467
- Message: __expectString(output.Message),
3468
- } as any;
3469
- };
3470
-
3471
- const deserializeAws_json1_0S3Object = (output: any, context: __SerdeContext): S3Object => {
3472
- return {
3473
- Bucket: __expectString(output.Bucket),
3474
- Key: __expectString(output.Key),
3475
- } as any;
3476
- };
3477
-
3478
- const deserializeAws_json1_0ServiceQuotaExceededException = (
3479
- output: any,
3480
- context: __SerdeContext
3481
- ): ServiceQuotaExceededException => {
3482
- return {
3483
- Message: __expectString(output.Message),
3484
- } as any;
3485
- };
3486
-
3487
- const deserializeAws_json1_0StartDataIngestionJobResponse = (
3488
- output: any,
3489
- context: __SerdeContext
3490
- ): StartDataIngestionJobResponse => {
3491
- return {
3492
- JobId: __expectString(output.JobId),
3493
- Status: __expectString(output.Status),
3494
- } as any;
3495
- };
3496
-
3497
- const deserializeAws_json1_0StartInferenceSchedulerResponse = (
3498
- output: any,
3499
- context: __SerdeContext
3500
- ): StartInferenceSchedulerResponse => {
3501
- return {
3502
- InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn),
3503
- InferenceSchedulerName: __expectString(output.InferenceSchedulerName),
3504
- ModelArn: __expectString(output.ModelArn),
3505
- ModelName: __expectString(output.ModelName),
3506
- Status: __expectString(output.Status),
3507
- } as any;
3508
- };
3509
-
3510
- const deserializeAws_json1_0StopInferenceSchedulerResponse = (
3511
- output: any,
3512
- context: __SerdeContext
3513
- ): StopInferenceSchedulerResponse => {
3514
- return {
3515
- InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn),
3516
- InferenceSchedulerName: __expectString(output.InferenceSchedulerName),
3517
- ModelArn: __expectString(output.ModelArn),
3518
- ModelName: __expectString(output.ModelName),
3519
- Status: __expectString(output.Status),
3520
- } as any;
3521
- };
3522
-
3523
- const deserializeAws_json1_0Tag = (output: any, context: __SerdeContext): Tag => {
3524
- return {
3525
- Key: __expectString(output.Key),
3526
- Value: __expectString(output.Value),
3527
- } as any;
3528
- };
3529
-
3530
- const deserializeAws_json1_0TagList = (output: any, context: __SerdeContext): Tag[] => {
3531
- return (output || [])
3532
- .filter((e: any) => e != null)
3533
- .map((entry: any) => {
3534
- if (entry === null) {
3535
- return null as any;
3536
- }
3537
- return deserializeAws_json1_0Tag(entry, context);
3538
- });
3539
- };
3540
-
3541
- const deserializeAws_json1_0TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => {
3542
- return {} as any;
3543
- };
3544
-
3545
- const deserializeAws_json1_0ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => {
3546
- return {
3547
- Message: __expectString(output.Message),
3548
- } as any;
3549
- };
3550
-
3551
- const deserializeAws_json1_0UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => {
3552
- return {} as any;
3553
- };
3554
-
3555
- const deserializeAws_json1_0ValidationException = (output: any, context: __SerdeContext): ValidationException => {
3556
- return {
3557
- Message: __expectString(output.Message),
3558
- } as any;
3559
- };
3560
-
3561
- const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
3562
- httpStatusCode: output.statusCode,
3563
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
3564
- extendedRequestId: output.headers["x-amz-id-2"],
3565
- cfId: output.headers["x-amz-cf-id"],
3566
- });
3567
-
3568
- // Collect low-level response body stream to Uint8Array.
3569
- const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
3570
- if (streamBody instanceof Uint8Array) {
3571
- return Promise.resolve(streamBody);
3572
- }
3573
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3574
- };
3575
-
3576
- // Encode Uint8Array data into string with utf-8.
3577
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
3578
- collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
3579
-
3580
- const buildHttpRpcRequest = async (
3581
- context: __SerdeContext,
3582
- headers: __HeaderBag,
3583
- path: string,
3584
- resolvedHostname: string | undefined,
3585
- body: any
3586
- ): Promise<__HttpRequest> => {
3587
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3588
- const contents: any = {
3589
- protocol,
3590
- hostname,
3591
- port,
3592
- method: "POST",
3593
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
3594
- headers,
3595
- };
3596
- if (resolvedHostname !== undefined) {
3597
- contents.hostname = resolvedHostname;
3598
- }
3599
- if (body !== undefined) {
3600
- contents.body = body;
3601
- }
3602
- return new __HttpRequest(contents);
3603
- };
3604
-
3605
- const parseBody = (streamBody: any, context: __SerdeContext): any =>
3606
- collectBodyString(streamBody, context).then((encoded) => {
3607
- if (encoded.length) {
3608
- return JSON.parse(encoded);
3609
- }
3610
- return {};
3611
- });
3612
-
3613
- /**
3614
- * Load an error code for the aws.rest-json-1.1 protocol.
3615
- */
3616
- const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
3617
- const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3618
-
3619
- const sanitizeErrorCode = (rawValue: string): string => {
3620
- let cleanValue = rawValue;
3621
- if (cleanValue.indexOf(":") >= 0) {
3622
- cleanValue = cleanValue.split(":")[0];
3623
- }
3624
- if (cleanValue.indexOf("#") >= 0) {
3625
- cleanValue = cleanValue.split("#")[1];
3626
- }
3627
- return cleanValue;
3628
- };
3629
-
3630
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3631
- if (headerKey !== undefined) {
3632
- return sanitizeErrorCode(output.headers[headerKey]);
3633
- }
3634
-
3635
- if (data.code !== undefined) {
3636
- return sanitizeErrorCode(data.code);
3637
- }
3638
-
3639
- if (data["__type"] !== undefined) {
3640
- return sanitizeErrorCode(data["__type"]);
3641
- }
3642
-
3643
- return "";
3644
- };