@aws-sdk/client-data-pipeline 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 (212) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/DataPipeline.js +0 -20
  3. package/dist-cjs/DataPipelineClient.js +0 -25
  4. package/dist-cjs/commands/ActivatePipelineCommand.js +0 -55
  5. package/dist-cjs/commands/AddTagsCommand.js +0 -25
  6. package/dist-cjs/commands/CreatePipelineCommand.js +0 -55
  7. package/dist-cjs/commands/DeactivatePipelineCommand.js +0 -28
  8. package/dist-cjs/commands/DeletePipelineCommand.js +0 -56
  9. package/dist-cjs/commands/DescribeObjectsCommand.js +0 -83
  10. package/dist-cjs/commands/DescribePipelinesCommand.js +0 -86
  11. package/dist-cjs/commands/EvaluateExpressionCommand.js +0 -55
  12. package/dist-cjs/commands/GetPipelineDefinitionCommand.js +0 -89
  13. package/dist-cjs/commands/ListPipelinesCommand.js +0 -56
  14. package/dist-cjs/commands/PollForTaskCommand.js +0 -103
  15. package/dist-cjs/commands/PutPipelineDefinitionCommand.js +0 -184
  16. package/dist-cjs/commands/QueryObjectsCommand.js +0 -63
  17. package/dist-cjs/commands/RemoveTagsCommand.js +0 -25
  18. package/dist-cjs/commands/ReportTaskProgressCommand.js +0 -62
  19. package/dist-cjs/commands/ReportTaskRunnerHeartbeatCommand.js +0 -57
  20. package/dist-cjs/commands/SetStatusCommand.js +0 -57
  21. package/dist-cjs/commands/SetTaskStatusCommand.js +0 -55
  22. package/dist-cjs/commands/ValidatePipelineDefinitionCommand.js +0 -176
  23. package/dist-cjs/commands/index.js +22 -0
  24. package/dist-cjs/endpoints.js +1 -2
  25. package/dist-cjs/index.js +4 -26
  26. package/dist-cjs/models/index.js +0 -1
  27. package/dist-cjs/models/models_0.js +0 -169
  28. package/dist-cjs/pagination/DescribeObjectsPaginator.js +0 -11
  29. package/dist-cjs/pagination/Interfaces.js +0 -1
  30. package/dist-cjs/pagination/ListPipelinesPaginator.js +0 -11
  31. package/dist-cjs/pagination/QueryObjectsPaginator.js +0 -11
  32. package/dist-cjs/pagination/index.js +7 -0
  33. package/dist-cjs/protocols/Aws_json1_1.js +0 -6
  34. package/dist-cjs/runtimeConfig.browser.js +1 -6
  35. package/dist-cjs/runtimeConfig.js +2 -7
  36. package/dist-cjs/runtimeConfig.native.js +0 -4
  37. package/dist-cjs/runtimeConfig.shared.js +0 -4
  38. package/dist-es/DataPipeline.js +0 -1
  39. package/dist-es/DataPipelineClient.js +0 -1
  40. package/dist-es/commands/ActivatePipelineCommand.js +0 -1
  41. package/dist-es/commands/AddTagsCommand.js +0 -1
  42. package/dist-es/commands/CreatePipelineCommand.js +0 -1
  43. package/dist-es/commands/DeactivatePipelineCommand.js +0 -1
  44. package/dist-es/commands/DeletePipelineCommand.js +0 -1
  45. package/dist-es/commands/DescribeObjectsCommand.js +0 -1
  46. package/dist-es/commands/DescribePipelinesCommand.js +0 -1
  47. package/dist-es/commands/EvaluateExpressionCommand.js +0 -1
  48. package/dist-es/commands/GetPipelineDefinitionCommand.js +0 -1
  49. package/dist-es/commands/ListPipelinesCommand.js +0 -1
  50. package/dist-es/commands/PollForTaskCommand.js +0 -1
  51. package/dist-es/commands/PutPipelineDefinitionCommand.js +0 -1
  52. package/dist-es/commands/QueryObjectsCommand.js +0 -1
  53. package/dist-es/commands/RemoveTagsCommand.js +0 -1
  54. package/dist-es/commands/ReportTaskProgressCommand.js +0 -1
  55. package/dist-es/commands/ReportTaskRunnerHeartbeatCommand.js +0 -1
  56. package/dist-es/commands/SetStatusCommand.js +0 -1
  57. package/dist-es/commands/SetTaskStatusCommand.js +0 -1
  58. package/dist-es/commands/ValidatePipelineDefinitionCommand.js +0 -1
  59. package/dist-es/commands/index.js +19 -0
  60. package/dist-es/endpoints.js +1 -2
  61. package/dist-es/index.js +4 -26
  62. package/dist-es/models/index.js +0 -1
  63. package/dist-es/models/models_0.js +0 -1
  64. package/dist-es/pagination/DescribeObjectsPaginator.js +0 -1
  65. package/dist-es/pagination/Interfaces.js +0 -1
  66. package/dist-es/pagination/ListPipelinesPaginator.js +0 -1
  67. package/dist-es/pagination/QueryObjectsPaginator.js +0 -1
  68. package/dist-es/pagination/index.js +4 -0
  69. package/dist-es/protocols/Aws_json1_1.js +0 -1
  70. package/dist-es/runtimeConfig.browser.js +1 -2
  71. package/dist-es/runtimeConfig.js +2 -3
  72. package/dist-es/runtimeConfig.native.js +0 -1
  73. package/dist-es/runtimeConfig.shared.js +0 -1
  74. package/dist-types/commands/index.d.ts +19 -0
  75. package/dist-types/index.d.ts +4 -25
  76. package/dist-types/pagination/index.d.ts +4 -0
  77. package/dist-types/ts3.4/DataPipeline.d.ts +20 -971
  78. package/dist-types/ts3.4/DataPipelineClient.d.ts +24 -105
  79. package/dist-types/ts3.4/commands/ActivatePipelineCommand.d.ts +2 -50
  80. package/dist-types/ts3.4/commands/AddTagsCommand.d.ts +2 -20
  81. package/dist-types/ts3.4/commands/CreatePipelineCommand.d.ts +2 -50
  82. package/dist-types/ts3.4/commands/DeactivatePipelineCommand.d.ts +2 -23
  83. package/dist-types/ts3.4/commands/DeletePipelineCommand.d.ts +2 -51
  84. package/dist-types/ts3.4/commands/DescribeObjectsCommand.d.ts +2 -78
  85. package/dist-types/ts3.4/commands/DescribePipelinesCommand.d.ts +2 -81
  86. package/dist-types/ts3.4/commands/EvaluateExpressionCommand.d.ts +2 -50
  87. package/dist-types/ts3.4/commands/GetPipelineDefinitionCommand.d.ts +2 -84
  88. package/dist-types/ts3.4/commands/ListPipelinesCommand.d.ts +2 -51
  89. package/dist-types/ts3.4/commands/PollForTaskCommand.d.ts +2 -98
  90. package/dist-types/ts3.4/commands/PutPipelineDefinitionCommand.d.ts +2 -179
  91. package/dist-types/ts3.4/commands/QueryObjectsCommand.d.ts +2 -58
  92. package/dist-types/ts3.4/commands/RemoveTagsCommand.d.ts +2 -20
  93. package/dist-types/ts3.4/commands/ReportTaskProgressCommand.d.ts +2 -57
  94. package/dist-types/ts3.4/commands/ReportTaskRunnerHeartbeatCommand.d.ts +2 -52
  95. package/dist-types/ts3.4/commands/SetStatusCommand.d.ts +2 -52
  96. package/dist-types/ts3.4/commands/SetTaskStatusCommand.d.ts +2 -50
  97. package/dist-types/ts3.4/commands/ValidatePipelineDefinitionCommand.d.ts +2 -171
  98. package/dist-types/ts3.4/commands/index.d.ts +19 -0
  99. package/dist-types/ts3.4/index.d.ts +4 -25
  100. package/dist-types/ts3.4/models/models_0.d.ts +231 -769
  101. package/dist-types/ts3.4/pagination/index.d.ts +4 -0
  102. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  103. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  104. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  105. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  106. package/package.json +33 -30
  107. package/dist-cjs/DataPipeline.js.map +0 -1
  108. package/dist-cjs/DataPipelineClient.js.map +0 -1
  109. package/dist-cjs/commands/ActivatePipelineCommand.js.map +0 -1
  110. package/dist-cjs/commands/AddTagsCommand.js.map +0 -1
  111. package/dist-cjs/commands/CreatePipelineCommand.js.map +0 -1
  112. package/dist-cjs/commands/DeactivatePipelineCommand.js.map +0 -1
  113. package/dist-cjs/commands/DeletePipelineCommand.js.map +0 -1
  114. package/dist-cjs/commands/DescribeObjectsCommand.js.map +0 -1
  115. package/dist-cjs/commands/DescribePipelinesCommand.js.map +0 -1
  116. package/dist-cjs/commands/EvaluateExpressionCommand.js.map +0 -1
  117. package/dist-cjs/commands/GetPipelineDefinitionCommand.js.map +0 -1
  118. package/dist-cjs/commands/ListPipelinesCommand.js.map +0 -1
  119. package/dist-cjs/commands/PollForTaskCommand.js.map +0 -1
  120. package/dist-cjs/commands/PutPipelineDefinitionCommand.js.map +0 -1
  121. package/dist-cjs/commands/QueryObjectsCommand.js.map +0 -1
  122. package/dist-cjs/commands/RemoveTagsCommand.js.map +0 -1
  123. package/dist-cjs/commands/ReportTaskProgressCommand.js.map +0 -1
  124. package/dist-cjs/commands/ReportTaskRunnerHeartbeatCommand.js.map +0 -1
  125. package/dist-cjs/commands/SetStatusCommand.js.map +0 -1
  126. package/dist-cjs/commands/SetTaskStatusCommand.js.map +0 -1
  127. package/dist-cjs/commands/ValidatePipelineDefinitionCommand.js.map +0 -1
  128. package/dist-cjs/endpoints.js.map +0 -1
  129. package/dist-cjs/index.js.map +0 -1
  130. package/dist-cjs/models/index.js.map +0 -1
  131. package/dist-cjs/models/models_0.js.map +0 -1
  132. package/dist-cjs/pagination/DescribeObjectsPaginator.js.map +0 -1
  133. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  134. package/dist-cjs/pagination/ListPipelinesPaginator.js.map +0 -1
  135. package/dist-cjs/pagination/QueryObjectsPaginator.js.map +0 -1
  136. package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
  137. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  138. package/dist-cjs/runtimeConfig.js.map +0 -1
  139. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  140. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  141. package/dist-es/DataPipeline.js.map +0 -1
  142. package/dist-es/DataPipelineClient.js.map +0 -1
  143. package/dist-es/commands/ActivatePipelineCommand.js.map +0 -1
  144. package/dist-es/commands/AddTagsCommand.js.map +0 -1
  145. package/dist-es/commands/CreatePipelineCommand.js.map +0 -1
  146. package/dist-es/commands/DeactivatePipelineCommand.js.map +0 -1
  147. package/dist-es/commands/DeletePipelineCommand.js.map +0 -1
  148. package/dist-es/commands/DescribeObjectsCommand.js.map +0 -1
  149. package/dist-es/commands/DescribePipelinesCommand.js.map +0 -1
  150. package/dist-es/commands/EvaluateExpressionCommand.js.map +0 -1
  151. package/dist-es/commands/GetPipelineDefinitionCommand.js.map +0 -1
  152. package/dist-es/commands/ListPipelinesCommand.js.map +0 -1
  153. package/dist-es/commands/PollForTaskCommand.js.map +0 -1
  154. package/dist-es/commands/PutPipelineDefinitionCommand.js.map +0 -1
  155. package/dist-es/commands/QueryObjectsCommand.js.map +0 -1
  156. package/dist-es/commands/RemoveTagsCommand.js.map +0 -1
  157. package/dist-es/commands/ReportTaskProgressCommand.js.map +0 -1
  158. package/dist-es/commands/ReportTaskRunnerHeartbeatCommand.js.map +0 -1
  159. package/dist-es/commands/SetStatusCommand.js.map +0 -1
  160. package/dist-es/commands/SetTaskStatusCommand.js.map +0 -1
  161. package/dist-es/commands/ValidatePipelineDefinitionCommand.js.map +0 -1
  162. package/dist-es/endpoints.js.map +0 -1
  163. package/dist-es/index.js.map +0 -1
  164. package/dist-es/models/index.js.map +0 -1
  165. package/dist-es/models/models_0.js.map +0 -1
  166. package/dist-es/pagination/DescribeObjectsPaginator.js.map +0 -1
  167. package/dist-es/pagination/Interfaces.js.map +0 -1
  168. package/dist-es/pagination/ListPipelinesPaginator.js.map +0 -1
  169. package/dist-es/pagination/QueryObjectsPaginator.js.map +0 -1
  170. package/dist-es/protocols/Aws_json1_1.js.map +0 -1
  171. package/dist-es/runtimeConfig.browser.js.map +0 -1
  172. package/dist-es/runtimeConfig.js.map +0 -1
  173. package/dist-es/runtimeConfig.native.js.map +0 -1
  174. package/dist-es/runtimeConfig.shared.js.map +0 -1
  175. package/jest.config.js +0 -4
  176. package/src/DataPipeline.ts +0 -1579
  177. package/src/DataPipelineClient.ts +0 -321
  178. package/src/commands/ActivatePipelineCommand.ts +0 -125
  179. package/src/commands/AddTagsCommand.ts +0 -92
  180. package/src/commands/CreatePipelineCommand.ts +0 -125
  181. package/src/commands/DeactivatePipelineCommand.ts +0 -98
  182. package/src/commands/DeletePipelineCommand.ts +0 -126
  183. package/src/commands/DescribeObjectsCommand.ts +0 -153
  184. package/src/commands/DescribePipelinesCommand.ts +0 -156
  185. package/src/commands/EvaluateExpressionCommand.ts +0 -125
  186. package/src/commands/GetPipelineDefinitionCommand.ts +0 -159
  187. package/src/commands/ListPipelinesCommand.ts +0 -126
  188. package/src/commands/PollForTaskCommand.ts +0 -173
  189. package/src/commands/PutPipelineDefinitionCommand.ts +0 -254
  190. package/src/commands/QueryObjectsCommand.ts +0 -133
  191. package/src/commands/RemoveTagsCommand.ts +0 -95
  192. package/src/commands/ReportTaskProgressCommand.ts +0 -132
  193. package/src/commands/ReportTaskRunnerHeartbeatCommand.ts +0 -130
  194. package/src/commands/SetStatusCommand.ts +0 -124
  195. package/src/commands/SetTaskStatusCommand.ts +0 -125
  196. package/src/commands/ValidatePipelineDefinitionCommand.ts +0 -249
  197. package/src/endpoints.ts +0 -57
  198. package/src/index.ts +0 -26
  199. package/src/models/index.ts +0 -1
  200. package/src/models/models_0.ts +0 -1480
  201. package/src/pagination/DescribeObjectsPaginator.ts +0 -58
  202. package/src/pagination/Interfaces.ts +0 -8
  203. package/src/pagination/ListPipelinesPaginator.ts +0 -58
  204. package/src/pagination/QueryObjectsPaginator.ts +0 -59
  205. package/src/protocols/Aws_json1_1.ts +0 -2767
  206. package/src/runtimeConfig.browser.ts +0 -41
  207. package/src/runtimeConfig.native.ts +0 -17
  208. package/src/runtimeConfig.shared.ts +0 -17
  209. package/src/runtimeConfig.ts +0 -46
  210. package/tsconfig.es.json +0 -10
  211. package/tsconfig.json +0 -33
  212. package/tsconfig.types.json +0 -9
@@ -1,2767 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
2
- import { expectBoolean as __expectBoolean, expectString as __expectString } from "@aws-sdk/smithy-client";
3
- import {
4
- Endpoint as __Endpoint,
5
- HeaderBag as __HeaderBag,
6
- MetadataBearer as __MetadataBearer,
7
- ResponseMetadata as __ResponseMetadata,
8
- SerdeContext as __SerdeContext,
9
- SmithyException as __SmithyException,
10
- } from "@aws-sdk/types";
11
-
12
- import { ActivatePipelineCommandInput, ActivatePipelineCommandOutput } from "../commands/ActivatePipelineCommand";
13
- import { AddTagsCommandInput, AddTagsCommandOutput } from "../commands/AddTagsCommand";
14
- import { CreatePipelineCommandInput, CreatePipelineCommandOutput } from "../commands/CreatePipelineCommand";
15
- import { DeactivatePipelineCommandInput, DeactivatePipelineCommandOutput } from "../commands/DeactivatePipelineCommand";
16
- import { DeletePipelineCommandInput, DeletePipelineCommandOutput } from "../commands/DeletePipelineCommand";
17
- import { DescribeObjectsCommandInput, DescribeObjectsCommandOutput } from "../commands/DescribeObjectsCommand";
18
- import { DescribePipelinesCommandInput, DescribePipelinesCommandOutput } from "../commands/DescribePipelinesCommand";
19
- import { EvaluateExpressionCommandInput, EvaluateExpressionCommandOutput } from "../commands/EvaluateExpressionCommand";
20
- import {
21
- GetPipelineDefinitionCommandInput,
22
- GetPipelineDefinitionCommandOutput,
23
- } from "../commands/GetPipelineDefinitionCommand";
24
- import { ListPipelinesCommandInput, ListPipelinesCommandOutput } from "../commands/ListPipelinesCommand";
25
- import { PollForTaskCommandInput, PollForTaskCommandOutput } from "../commands/PollForTaskCommand";
26
- import {
27
- PutPipelineDefinitionCommandInput,
28
- PutPipelineDefinitionCommandOutput,
29
- } from "../commands/PutPipelineDefinitionCommand";
30
- import { QueryObjectsCommandInput, QueryObjectsCommandOutput } from "../commands/QueryObjectsCommand";
31
- import { RemoveTagsCommandInput, RemoveTagsCommandOutput } from "../commands/RemoveTagsCommand";
32
- import { ReportTaskProgressCommandInput, ReportTaskProgressCommandOutput } from "../commands/ReportTaskProgressCommand";
33
- import {
34
- ReportTaskRunnerHeartbeatCommandInput,
35
- ReportTaskRunnerHeartbeatCommandOutput,
36
- } from "../commands/ReportTaskRunnerHeartbeatCommand";
37
- import { SetStatusCommandInput, SetStatusCommandOutput } from "../commands/SetStatusCommand";
38
- import { SetTaskStatusCommandInput, SetTaskStatusCommandOutput } from "../commands/SetTaskStatusCommand";
39
- import {
40
- ValidatePipelineDefinitionCommandInput,
41
- ValidatePipelineDefinitionCommandOutput,
42
- } from "../commands/ValidatePipelineDefinitionCommand";
43
- import {
44
- ActivatePipelineInput,
45
- ActivatePipelineOutput,
46
- AddTagsInput,
47
- AddTagsOutput,
48
- CreatePipelineInput,
49
- CreatePipelineOutput,
50
- DeactivatePipelineInput,
51
- DeactivatePipelineOutput,
52
- DeletePipelineInput,
53
- DescribeObjectsInput,
54
- DescribeObjectsOutput,
55
- DescribePipelinesInput,
56
- DescribePipelinesOutput,
57
- EvaluateExpressionInput,
58
- EvaluateExpressionOutput,
59
- Field,
60
- GetPipelineDefinitionInput,
61
- GetPipelineDefinitionOutput,
62
- InstanceIdentity,
63
- InternalServiceError,
64
- InvalidRequestException,
65
- ListPipelinesInput,
66
- ListPipelinesOutput,
67
- Operator,
68
- ParameterAttribute,
69
- ParameterObject,
70
- ParameterValue,
71
- PipelineDeletedException,
72
- PipelineDescription,
73
- PipelineIdName,
74
- PipelineNotFoundException,
75
- PipelineObject,
76
- PollForTaskInput,
77
- PollForTaskOutput,
78
- PutPipelineDefinitionInput,
79
- PutPipelineDefinitionOutput,
80
- Query,
81
- QueryObjectsInput,
82
- QueryObjectsOutput,
83
- RemoveTagsInput,
84
- RemoveTagsOutput,
85
- ReportTaskProgressInput,
86
- ReportTaskProgressOutput,
87
- ReportTaskRunnerHeartbeatInput,
88
- ReportTaskRunnerHeartbeatOutput,
89
- Selector,
90
- SetStatusInput,
91
- SetTaskStatusInput,
92
- SetTaskStatusOutput,
93
- Tag,
94
- TaskNotFoundException,
95
- TaskObject,
96
- ValidatePipelineDefinitionInput,
97
- ValidatePipelineDefinitionOutput,
98
- ValidationError,
99
- ValidationWarning,
100
- } from "../models/models_0";
101
-
102
- export const serializeAws_json1_1ActivatePipelineCommand = async (
103
- input: ActivatePipelineCommandInput,
104
- context: __SerdeContext
105
- ): Promise<__HttpRequest> => {
106
- const headers: __HeaderBag = {
107
- "content-type": "application/x-amz-json-1.1",
108
- "x-amz-target": "DataPipeline.ActivatePipeline",
109
- };
110
- let body: any;
111
- body = JSON.stringify(serializeAws_json1_1ActivatePipelineInput(input, context));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
-
115
- export const serializeAws_json1_1AddTagsCommand = async (
116
- input: AddTagsCommandInput,
117
- context: __SerdeContext
118
- ): Promise<__HttpRequest> => {
119
- const headers: __HeaderBag = {
120
- "content-type": "application/x-amz-json-1.1",
121
- "x-amz-target": "DataPipeline.AddTags",
122
- };
123
- let body: any;
124
- body = JSON.stringify(serializeAws_json1_1AddTagsInput(input, context));
125
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
- };
127
-
128
- export const serializeAws_json1_1CreatePipelineCommand = async (
129
- input: CreatePipelineCommandInput,
130
- context: __SerdeContext
131
- ): Promise<__HttpRequest> => {
132
- const headers: __HeaderBag = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "DataPipeline.CreatePipeline",
135
- };
136
- let body: any;
137
- body = JSON.stringify(serializeAws_json1_1CreatePipelineInput(input, context));
138
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
- };
140
-
141
- export const serializeAws_json1_1DeactivatePipelineCommand = async (
142
- input: DeactivatePipelineCommandInput,
143
- context: __SerdeContext
144
- ): Promise<__HttpRequest> => {
145
- const headers: __HeaderBag = {
146
- "content-type": "application/x-amz-json-1.1",
147
- "x-amz-target": "DataPipeline.DeactivatePipeline",
148
- };
149
- let body: any;
150
- body = JSON.stringify(serializeAws_json1_1DeactivatePipelineInput(input, context));
151
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
152
- };
153
-
154
- export const serializeAws_json1_1DeletePipelineCommand = async (
155
- input: DeletePipelineCommandInput,
156
- context: __SerdeContext
157
- ): Promise<__HttpRequest> => {
158
- const headers: __HeaderBag = {
159
- "content-type": "application/x-amz-json-1.1",
160
- "x-amz-target": "DataPipeline.DeletePipeline",
161
- };
162
- let body: any;
163
- body = JSON.stringify(serializeAws_json1_1DeletePipelineInput(input, context));
164
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
165
- };
166
-
167
- export const serializeAws_json1_1DescribeObjectsCommand = async (
168
- input: DescribeObjectsCommandInput,
169
- context: __SerdeContext
170
- ): Promise<__HttpRequest> => {
171
- const headers: __HeaderBag = {
172
- "content-type": "application/x-amz-json-1.1",
173
- "x-amz-target": "DataPipeline.DescribeObjects",
174
- };
175
- let body: any;
176
- body = JSON.stringify(serializeAws_json1_1DescribeObjectsInput(input, context));
177
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
178
- };
179
-
180
- export const serializeAws_json1_1DescribePipelinesCommand = async (
181
- input: DescribePipelinesCommandInput,
182
- context: __SerdeContext
183
- ): Promise<__HttpRequest> => {
184
- const headers: __HeaderBag = {
185
- "content-type": "application/x-amz-json-1.1",
186
- "x-amz-target": "DataPipeline.DescribePipelines",
187
- };
188
- let body: any;
189
- body = JSON.stringify(serializeAws_json1_1DescribePipelinesInput(input, context));
190
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
191
- };
192
-
193
- export const serializeAws_json1_1EvaluateExpressionCommand = async (
194
- input: EvaluateExpressionCommandInput,
195
- context: __SerdeContext
196
- ): Promise<__HttpRequest> => {
197
- const headers: __HeaderBag = {
198
- "content-type": "application/x-amz-json-1.1",
199
- "x-amz-target": "DataPipeline.EvaluateExpression",
200
- };
201
- let body: any;
202
- body = JSON.stringify(serializeAws_json1_1EvaluateExpressionInput(input, context));
203
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
204
- };
205
-
206
- export const serializeAws_json1_1GetPipelineDefinitionCommand = async (
207
- input: GetPipelineDefinitionCommandInput,
208
- context: __SerdeContext
209
- ): Promise<__HttpRequest> => {
210
- const headers: __HeaderBag = {
211
- "content-type": "application/x-amz-json-1.1",
212
- "x-amz-target": "DataPipeline.GetPipelineDefinition",
213
- };
214
- let body: any;
215
- body = JSON.stringify(serializeAws_json1_1GetPipelineDefinitionInput(input, context));
216
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
217
- };
218
-
219
- export const serializeAws_json1_1ListPipelinesCommand = async (
220
- input: ListPipelinesCommandInput,
221
- context: __SerdeContext
222
- ): Promise<__HttpRequest> => {
223
- const headers: __HeaderBag = {
224
- "content-type": "application/x-amz-json-1.1",
225
- "x-amz-target": "DataPipeline.ListPipelines",
226
- };
227
- let body: any;
228
- body = JSON.stringify(serializeAws_json1_1ListPipelinesInput(input, context));
229
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
230
- };
231
-
232
- export const serializeAws_json1_1PollForTaskCommand = async (
233
- input: PollForTaskCommandInput,
234
- context: __SerdeContext
235
- ): Promise<__HttpRequest> => {
236
- const headers: __HeaderBag = {
237
- "content-type": "application/x-amz-json-1.1",
238
- "x-amz-target": "DataPipeline.PollForTask",
239
- };
240
- let body: any;
241
- body = JSON.stringify(serializeAws_json1_1PollForTaskInput(input, context));
242
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
243
- };
244
-
245
- export const serializeAws_json1_1PutPipelineDefinitionCommand = async (
246
- input: PutPipelineDefinitionCommandInput,
247
- context: __SerdeContext
248
- ): Promise<__HttpRequest> => {
249
- const headers: __HeaderBag = {
250
- "content-type": "application/x-amz-json-1.1",
251
- "x-amz-target": "DataPipeline.PutPipelineDefinition",
252
- };
253
- let body: any;
254
- body = JSON.stringify(serializeAws_json1_1PutPipelineDefinitionInput(input, context));
255
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
256
- };
257
-
258
- export const serializeAws_json1_1QueryObjectsCommand = async (
259
- input: QueryObjectsCommandInput,
260
- context: __SerdeContext
261
- ): Promise<__HttpRequest> => {
262
- const headers: __HeaderBag = {
263
- "content-type": "application/x-amz-json-1.1",
264
- "x-amz-target": "DataPipeline.QueryObjects",
265
- };
266
- let body: any;
267
- body = JSON.stringify(serializeAws_json1_1QueryObjectsInput(input, context));
268
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
269
- };
270
-
271
- export const serializeAws_json1_1RemoveTagsCommand = async (
272
- input: RemoveTagsCommandInput,
273
- context: __SerdeContext
274
- ): Promise<__HttpRequest> => {
275
- const headers: __HeaderBag = {
276
- "content-type": "application/x-amz-json-1.1",
277
- "x-amz-target": "DataPipeline.RemoveTags",
278
- };
279
- let body: any;
280
- body = JSON.stringify(serializeAws_json1_1RemoveTagsInput(input, context));
281
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
282
- };
283
-
284
- export const serializeAws_json1_1ReportTaskProgressCommand = async (
285
- input: ReportTaskProgressCommandInput,
286
- context: __SerdeContext
287
- ): Promise<__HttpRequest> => {
288
- const headers: __HeaderBag = {
289
- "content-type": "application/x-amz-json-1.1",
290
- "x-amz-target": "DataPipeline.ReportTaskProgress",
291
- };
292
- let body: any;
293
- body = JSON.stringify(serializeAws_json1_1ReportTaskProgressInput(input, context));
294
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
295
- };
296
-
297
- export const serializeAws_json1_1ReportTaskRunnerHeartbeatCommand = async (
298
- input: ReportTaskRunnerHeartbeatCommandInput,
299
- context: __SerdeContext
300
- ): Promise<__HttpRequest> => {
301
- const headers: __HeaderBag = {
302
- "content-type": "application/x-amz-json-1.1",
303
- "x-amz-target": "DataPipeline.ReportTaskRunnerHeartbeat",
304
- };
305
- let body: any;
306
- body = JSON.stringify(serializeAws_json1_1ReportTaskRunnerHeartbeatInput(input, context));
307
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
308
- };
309
-
310
- export const serializeAws_json1_1SetStatusCommand = async (
311
- input: SetStatusCommandInput,
312
- context: __SerdeContext
313
- ): Promise<__HttpRequest> => {
314
- const headers: __HeaderBag = {
315
- "content-type": "application/x-amz-json-1.1",
316
- "x-amz-target": "DataPipeline.SetStatus",
317
- };
318
- let body: any;
319
- body = JSON.stringify(serializeAws_json1_1SetStatusInput(input, context));
320
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
321
- };
322
-
323
- export const serializeAws_json1_1SetTaskStatusCommand = async (
324
- input: SetTaskStatusCommandInput,
325
- context: __SerdeContext
326
- ): Promise<__HttpRequest> => {
327
- const headers: __HeaderBag = {
328
- "content-type": "application/x-amz-json-1.1",
329
- "x-amz-target": "DataPipeline.SetTaskStatus",
330
- };
331
- let body: any;
332
- body = JSON.stringify(serializeAws_json1_1SetTaskStatusInput(input, context));
333
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
334
- };
335
-
336
- export const serializeAws_json1_1ValidatePipelineDefinitionCommand = async (
337
- input: ValidatePipelineDefinitionCommandInput,
338
- context: __SerdeContext
339
- ): Promise<__HttpRequest> => {
340
- const headers: __HeaderBag = {
341
- "content-type": "application/x-amz-json-1.1",
342
- "x-amz-target": "DataPipeline.ValidatePipelineDefinition",
343
- };
344
- let body: any;
345
- body = JSON.stringify(serializeAws_json1_1ValidatePipelineDefinitionInput(input, context));
346
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
347
- };
348
-
349
- export const deserializeAws_json1_1ActivatePipelineCommand = async (
350
- output: __HttpResponse,
351
- context: __SerdeContext
352
- ): Promise<ActivatePipelineCommandOutput> => {
353
- if (output.statusCode >= 300) {
354
- return deserializeAws_json1_1ActivatePipelineCommandError(output, context);
355
- }
356
- const data: any = await parseBody(output.body, context);
357
- let contents: any = {};
358
- contents = deserializeAws_json1_1ActivatePipelineOutput(data, context);
359
- const response: ActivatePipelineCommandOutput = {
360
- $metadata: deserializeMetadata(output),
361
- ...contents,
362
- };
363
- return Promise.resolve(response);
364
- };
365
-
366
- const deserializeAws_json1_1ActivatePipelineCommandError = async (
367
- output: __HttpResponse,
368
- context: __SerdeContext
369
- ): Promise<ActivatePipelineCommandOutput> => {
370
- const parsedOutput: any = {
371
- ...output,
372
- body: await parseBody(output.body, context),
373
- };
374
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
375
- let errorCode = "UnknownError";
376
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
377
- switch (errorCode) {
378
- case "InternalServiceError":
379
- case "com.amazonaws.datapipeline#InternalServiceError":
380
- response = {
381
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
382
- name: errorCode,
383
- $metadata: deserializeMetadata(output),
384
- };
385
- break;
386
- case "InvalidRequestException":
387
- case "com.amazonaws.datapipeline#InvalidRequestException":
388
- response = {
389
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
390
- name: errorCode,
391
- $metadata: deserializeMetadata(output),
392
- };
393
- break;
394
- case "PipelineDeletedException":
395
- case "com.amazonaws.datapipeline#PipelineDeletedException":
396
- response = {
397
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
398
- name: errorCode,
399
- $metadata: deserializeMetadata(output),
400
- };
401
- break;
402
- case "PipelineNotFoundException":
403
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
404
- response = {
405
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
406
- name: errorCode,
407
- $metadata: deserializeMetadata(output),
408
- };
409
- break;
410
- default:
411
- const parsedBody = parsedOutput.body;
412
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
413
- response = {
414
- ...parsedBody,
415
- name: `${errorCode}`,
416
- message: parsedBody.message || parsedBody.Message || errorCode,
417
- $fault: "client",
418
- $metadata: deserializeMetadata(output),
419
- } as any;
420
- }
421
- const message = response.message || response.Message || errorCode;
422
- response.message = message;
423
- delete response.Message;
424
- return Promise.reject(Object.assign(new Error(message), response));
425
- };
426
-
427
- export const deserializeAws_json1_1AddTagsCommand = async (
428
- output: __HttpResponse,
429
- context: __SerdeContext
430
- ): Promise<AddTagsCommandOutput> => {
431
- if (output.statusCode >= 300) {
432
- return deserializeAws_json1_1AddTagsCommandError(output, context);
433
- }
434
- const data: any = await parseBody(output.body, context);
435
- let contents: any = {};
436
- contents = deserializeAws_json1_1AddTagsOutput(data, context);
437
- const response: AddTagsCommandOutput = {
438
- $metadata: deserializeMetadata(output),
439
- ...contents,
440
- };
441
- return Promise.resolve(response);
442
- };
443
-
444
- const deserializeAws_json1_1AddTagsCommandError = async (
445
- output: __HttpResponse,
446
- context: __SerdeContext
447
- ): Promise<AddTagsCommandOutput> => {
448
- const parsedOutput: any = {
449
- ...output,
450
- body: await parseBody(output.body, context),
451
- };
452
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
453
- let errorCode = "UnknownError";
454
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
455
- switch (errorCode) {
456
- case "InternalServiceError":
457
- case "com.amazonaws.datapipeline#InternalServiceError":
458
- response = {
459
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
460
- name: errorCode,
461
- $metadata: deserializeMetadata(output),
462
- };
463
- break;
464
- case "InvalidRequestException":
465
- case "com.amazonaws.datapipeline#InvalidRequestException":
466
- response = {
467
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
468
- name: errorCode,
469
- $metadata: deserializeMetadata(output),
470
- };
471
- break;
472
- case "PipelineDeletedException":
473
- case "com.amazonaws.datapipeline#PipelineDeletedException":
474
- response = {
475
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
476
- name: errorCode,
477
- $metadata: deserializeMetadata(output),
478
- };
479
- break;
480
- case "PipelineNotFoundException":
481
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
482
- response = {
483
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
484
- name: errorCode,
485
- $metadata: deserializeMetadata(output),
486
- };
487
- break;
488
- default:
489
- const parsedBody = parsedOutput.body;
490
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
491
- response = {
492
- ...parsedBody,
493
- name: `${errorCode}`,
494
- message: parsedBody.message || parsedBody.Message || errorCode,
495
- $fault: "client",
496
- $metadata: deserializeMetadata(output),
497
- } as any;
498
- }
499
- const message = response.message || response.Message || errorCode;
500
- response.message = message;
501
- delete response.Message;
502
- return Promise.reject(Object.assign(new Error(message), response));
503
- };
504
-
505
- export const deserializeAws_json1_1CreatePipelineCommand = async (
506
- output: __HttpResponse,
507
- context: __SerdeContext
508
- ): Promise<CreatePipelineCommandOutput> => {
509
- if (output.statusCode >= 300) {
510
- return deserializeAws_json1_1CreatePipelineCommandError(output, context);
511
- }
512
- const data: any = await parseBody(output.body, context);
513
- let contents: any = {};
514
- contents = deserializeAws_json1_1CreatePipelineOutput(data, context);
515
- const response: CreatePipelineCommandOutput = {
516
- $metadata: deserializeMetadata(output),
517
- ...contents,
518
- };
519
- return Promise.resolve(response);
520
- };
521
-
522
- const deserializeAws_json1_1CreatePipelineCommandError = async (
523
- output: __HttpResponse,
524
- context: __SerdeContext
525
- ): Promise<CreatePipelineCommandOutput> => {
526
- const parsedOutput: any = {
527
- ...output,
528
- body: await parseBody(output.body, context),
529
- };
530
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
531
- let errorCode = "UnknownError";
532
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
533
- switch (errorCode) {
534
- case "InternalServiceError":
535
- case "com.amazonaws.datapipeline#InternalServiceError":
536
- response = {
537
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
538
- name: errorCode,
539
- $metadata: deserializeMetadata(output),
540
- };
541
- break;
542
- case "InvalidRequestException":
543
- case "com.amazonaws.datapipeline#InvalidRequestException":
544
- response = {
545
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
546
- name: errorCode,
547
- $metadata: deserializeMetadata(output),
548
- };
549
- break;
550
- default:
551
- const parsedBody = parsedOutput.body;
552
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
553
- response = {
554
- ...parsedBody,
555
- name: `${errorCode}`,
556
- message: parsedBody.message || parsedBody.Message || errorCode,
557
- $fault: "client",
558
- $metadata: deserializeMetadata(output),
559
- } as any;
560
- }
561
- const message = response.message || response.Message || errorCode;
562
- response.message = message;
563
- delete response.Message;
564
- return Promise.reject(Object.assign(new Error(message), response));
565
- };
566
-
567
- export const deserializeAws_json1_1DeactivatePipelineCommand = async (
568
- output: __HttpResponse,
569
- context: __SerdeContext
570
- ): Promise<DeactivatePipelineCommandOutput> => {
571
- if (output.statusCode >= 300) {
572
- return deserializeAws_json1_1DeactivatePipelineCommandError(output, context);
573
- }
574
- const data: any = await parseBody(output.body, context);
575
- let contents: any = {};
576
- contents = deserializeAws_json1_1DeactivatePipelineOutput(data, context);
577
- const response: DeactivatePipelineCommandOutput = {
578
- $metadata: deserializeMetadata(output),
579
- ...contents,
580
- };
581
- return Promise.resolve(response);
582
- };
583
-
584
- const deserializeAws_json1_1DeactivatePipelineCommandError = async (
585
- output: __HttpResponse,
586
- context: __SerdeContext
587
- ): Promise<DeactivatePipelineCommandOutput> => {
588
- const parsedOutput: any = {
589
- ...output,
590
- body: await parseBody(output.body, context),
591
- };
592
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
593
- let errorCode = "UnknownError";
594
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
595
- switch (errorCode) {
596
- case "InternalServiceError":
597
- case "com.amazonaws.datapipeline#InternalServiceError":
598
- response = {
599
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
600
- name: errorCode,
601
- $metadata: deserializeMetadata(output),
602
- };
603
- break;
604
- case "InvalidRequestException":
605
- case "com.amazonaws.datapipeline#InvalidRequestException":
606
- response = {
607
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
608
- name: errorCode,
609
- $metadata: deserializeMetadata(output),
610
- };
611
- break;
612
- case "PipelineDeletedException":
613
- case "com.amazonaws.datapipeline#PipelineDeletedException":
614
- response = {
615
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
616
- name: errorCode,
617
- $metadata: deserializeMetadata(output),
618
- };
619
- break;
620
- case "PipelineNotFoundException":
621
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
622
- response = {
623
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
624
- name: errorCode,
625
- $metadata: deserializeMetadata(output),
626
- };
627
- break;
628
- default:
629
- const parsedBody = parsedOutput.body;
630
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
631
- response = {
632
- ...parsedBody,
633
- name: `${errorCode}`,
634
- message: parsedBody.message || parsedBody.Message || errorCode,
635
- $fault: "client",
636
- $metadata: deserializeMetadata(output),
637
- } as any;
638
- }
639
- const message = response.message || response.Message || errorCode;
640
- response.message = message;
641
- delete response.Message;
642
- return Promise.reject(Object.assign(new Error(message), response));
643
- };
644
-
645
- export const deserializeAws_json1_1DeletePipelineCommand = async (
646
- output: __HttpResponse,
647
- context: __SerdeContext
648
- ): Promise<DeletePipelineCommandOutput> => {
649
- if (output.statusCode >= 300) {
650
- return deserializeAws_json1_1DeletePipelineCommandError(output, context);
651
- }
652
- await collectBody(output.body, context);
653
- const response: DeletePipelineCommandOutput = {
654
- $metadata: deserializeMetadata(output),
655
- };
656
- return Promise.resolve(response);
657
- };
658
-
659
- const deserializeAws_json1_1DeletePipelineCommandError = async (
660
- output: __HttpResponse,
661
- context: __SerdeContext
662
- ): Promise<DeletePipelineCommandOutput> => {
663
- const parsedOutput: any = {
664
- ...output,
665
- body: await parseBody(output.body, context),
666
- };
667
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
668
- let errorCode = "UnknownError";
669
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
670
- switch (errorCode) {
671
- case "InternalServiceError":
672
- case "com.amazonaws.datapipeline#InternalServiceError":
673
- response = {
674
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
675
- name: errorCode,
676
- $metadata: deserializeMetadata(output),
677
- };
678
- break;
679
- case "InvalidRequestException":
680
- case "com.amazonaws.datapipeline#InvalidRequestException":
681
- response = {
682
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
683
- name: errorCode,
684
- $metadata: deserializeMetadata(output),
685
- };
686
- break;
687
- case "PipelineNotFoundException":
688
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
689
- response = {
690
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
691
- name: errorCode,
692
- $metadata: deserializeMetadata(output),
693
- };
694
- break;
695
- default:
696
- const parsedBody = parsedOutput.body;
697
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
698
- response = {
699
- ...parsedBody,
700
- name: `${errorCode}`,
701
- message: parsedBody.message || parsedBody.Message || errorCode,
702
- $fault: "client",
703
- $metadata: deserializeMetadata(output),
704
- } as any;
705
- }
706
- const message = response.message || response.Message || errorCode;
707
- response.message = message;
708
- delete response.Message;
709
- return Promise.reject(Object.assign(new Error(message), response));
710
- };
711
-
712
- export const deserializeAws_json1_1DescribeObjectsCommand = async (
713
- output: __HttpResponse,
714
- context: __SerdeContext
715
- ): Promise<DescribeObjectsCommandOutput> => {
716
- if (output.statusCode >= 300) {
717
- return deserializeAws_json1_1DescribeObjectsCommandError(output, context);
718
- }
719
- const data: any = await parseBody(output.body, context);
720
- let contents: any = {};
721
- contents = deserializeAws_json1_1DescribeObjectsOutput(data, context);
722
- const response: DescribeObjectsCommandOutput = {
723
- $metadata: deserializeMetadata(output),
724
- ...contents,
725
- };
726
- return Promise.resolve(response);
727
- };
728
-
729
- const deserializeAws_json1_1DescribeObjectsCommandError = async (
730
- output: __HttpResponse,
731
- context: __SerdeContext
732
- ): Promise<DescribeObjectsCommandOutput> => {
733
- const parsedOutput: any = {
734
- ...output,
735
- body: await parseBody(output.body, context),
736
- };
737
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
738
- let errorCode = "UnknownError";
739
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
740
- switch (errorCode) {
741
- case "InternalServiceError":
742
- case "com.amazonaws.datapipeline#InternalServiceError":
743
- response = {
744
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
745
- name: errorCode,
746
- $metadata: deserializeMetadata(output),
747
- };
748
- break;
749
- case "InvalidRequestException":
750
- case "com.amazonaws.datapipeline#InvalidRequestException":
751
- response = {
752
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
753
- name: errorCode,
754
- $metadata: deserializeMetadata(output),
755
- };
756
- break;
757
- case "PipelineDeletedException":
758
- case "com.amazonaws.datapipeline#PipelineDeletedException":
759
- response = {
760
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
761
- name: errorCode,
762
- $metadata: deserializeMetadata(output),
763
- };
764
- break;
765
- case "PipelineNotFoundException":
766
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
767
- response = {
768
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
769
- name: errorCode,
770
- $metadata: deserializeMetadata(output),
771
- };
772
- break;
773
- default:
774
- const parsedBody = parsedOutput.body;
775
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
776
- response = {
777
- ...parsedBody,
778
- name: `${errorCode}`,
779
- message: parsedBody.message || parsedBody.Message || errorCode,
780
- $fault: "client",
781
- $metadata: deserializeMetadata(output),
782
- } as any;
783
- }
784
- const message = response.message || response.Message || errorCode;
785
- response.message = message;
786
- delete response.Message;
787
- return Promise.reject(Object.assign(new Error(message), response));
788
- };
789
-
790
- export const deserializeAws_json1_1DescribePipelinesCommand = async (
791
- output: __HttpResponse,
792
- context: __SerdeContext
793
- ): Promise<DescribePipelinesCommandOutput> => {
794
- if (output.statusCode >= 300) {
795
- return deserializeAws_json1_1DescribePipelinesCommandError(output, context);
796
- }
797
- const data: any = await parseBody(output.body, context);
798
- let contents: any = {};
799
- contents = deserializeAws_json1_1DescribePipelinesOutput(data, context);
800
- const response: DescribePipelinesCommandOutput = {
801
- $metadata: deserializeMetadata(output),
802
- ...contents,
803
- };
804
- return Promise.resolve(response);
805
- };
806
-
807
- const deserializeAws_json1_1DescribePipelinesCommandError = async (
808
- output: __HttpResponse,
809
- context: __SerdeContext
810
- ): Promise<DescribePipelinesCommandOutput> => {
811
- const parsedOutput: any = {
812
- ...output,
813
- body: await parseBody(output.body, context),
814
- };
815
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
816
- let errorCode = "UnknownError";
817
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
818
- switch (errorCode) {
819
- case "InternalServiceError":
820
- case "com.amazonaws.datapipeline#InternalServiceError":
821
- response = {
822
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
823
- name: errorCode,
824
- $metadata: deserializeMetadata(output),
825
- };
826
- break;
827
- case "InvalidRequestException":
828
- case "com.amazonaws.datapipeline#InvalidRequestException":
829
- response = {
830
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
831
- name: errorCode,
832
- $metadata: deserializeMetadata(output),
833
- };
834
- break;
835
- case "PipelineDeletedException":
836
- case "com.amazonaws.datapipeline#PipelineDeletedException":
837
- response = {
838
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
839
- name: errorCode,
840
- $metadata: deserializeMetadata(output),
841
- };
842
- break;
843
- case "PipelineNotFoundException":
844
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
845
- response = {
846
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
847
- name: errorCode,
848
- $metadata: deserializeMetadata(output),
849
- };
850
- break;
851
- default:
852
- const parsedBody = parsedOutput.body;
853
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
854
- response = {
855
- ...parsedBody,
856
- name: `${errorCode}`,
857
- message: parsedBody.message || parsedBody.Message || errorCode,
858
- $fault: "client",
859
- $metadata: deserializeMetadata(output),
860
- } as any;
861
- }
862
- const message = response.message || response.Message || errorCode;
863
- response.message = message;
864
- delete response.Message;
865
- return Promise.reject(Object.assign(new Error(message), response));
866
- };
867
-
868
- export const deserializeAws_json1_1EvaluateExpressionCommand = async (
869
- output: __HttpResponse,
870
- context: __SerdeContext
871
- ): Promise<EvaluateExpressionCommandOutput> => {
872
- if (output.statusCode >= 300) {
873
- return deserializeAws_json1_1EvaluateExpressionCommandError(output, context);
874
- }
875
- const data: any = await parseBody(output.body, context);
876
- let contents: any = {};
877
- contents = deserializeAws_json1_1EvaluateExpressionOutput(data, context);
878
- const response: EvaluateExpressionCommandOutput = {
879
- $metadata: deserializeMetadata(output),
880
- ...contents,
881
- };
882
- return Promise.resolve(response);
883
- };
884
-
885
- const deserializeAws_json1_1EvaluateExpressionCommandError = async (
886
- output: __HttpResponse,
887
- context: __SerdeContext
888
- ): Promise<EvaluateExpressionCommandOutput> => {
889
- const parsedOutput: any = {
890
- ...output,
891
- body: await parseBody(output.body, context),
892
- };
893
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
894
- let errorCode = "UnknownError";
895
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
896
- switch (errorCode) {
897
- case "InternalServiceError":
898
- case "com.amazonaws.datapipeline#InternalServiceError":
899
- response = {
900
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
901
- name: errorCode,
902
- $metadata: deserializeMetadata(output),
903
- };
904
- break;
905
- case "InvalidRequestException":
906
- case "com.amazonaws.datapipeline#InvalidRequestException":
907
- response = {
908
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
909
- name: errorCode,
910
- $metadata: deserializeMetadata(output),
911
- };
912
- break;
913
- case "PipelineDeletedException":
914
- case "com.amazonaws.datapipeline#PipelineDeletedException":
915
- response = {
916
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
917
- name: errorCode,
918
- $metadata: deserializeMetadata(output),
919
- };
920
- break;
921
- case "PipelineNotFoundException":
922
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
923
- response = {
924
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
925
- name: errorCode,
926
- $metadata: deserializeMetadata(output),
927
- };
928
- break;
929
- case "TaskNotFoundException":
930
- case "com.amazonaws.datapipeline#TaskNotFoundException":
931
- response = {
932
- ...(await deserializeAws_json1_1TaskNotFoundExceptionResponse(parsedOutput, context)),
933
- name: errorCode,
934
- $metadata: deserializeMetadata(output),
935
- };
936
- break;
937
- default:
938
- const parsedBody = parsedOutput.body;
939
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
940
- response = {
941
- ...parsedBody,
942
- name: `${errorCode}`,
943
- message: parsedBody.message || parsedBody.Message || errorCode,
944
- $fault: "client",
945
- $metadata: deserializeMetadata(output),
946
- } as any;
947
- }
948
- const message = response.message || response.Message || errorCode;
949
- response.message = message;
950
- delete response.Message;
951
- return Promise.reject(Object.assign(new Error(message), response));
952
- };
953
-
954
- export const deserializeAws_json1_1GetPipelineDefinitionCommand = async (
955
- output: __HttpResponse,
956
- context: __SerdeContext
957
- ): Promise<GetPipelineDefinitionCommandOutput> => {
958
- if (output.statusCode >= 300) {
959
- return deserializeAws_json1_1GetPipelineDefinitionCommandError(output, context);
960
- }
961
- const data: any = await parseBody(output.body, context);
962
- let contents: any = {};
963
- contents = deserializeAws_json1_1GetPipelineDefinitionOutput(data, context);
964
- const response: GetPipelineDefinitionCommandOutput = {
965
- $metadata: deserializeMetadata(output),
966
- ...contents,
967
- };
968
- return Promise.resolve(response);
969
- };
970
-
971
- const deserializeAws_json1_1GetPipelineDefinitionCommandError = async (
972
- output: __HttpResponse,
973
- context: __SerdeContext
974
- ): Promise<GetPipelineDefinitionCommandOutput> => {
975
- const parsedOutput: any = {
976
- ...output,
977
- body: await parseBody(output.body, context),
978
- };
979
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
980
- let errorCode = "UnknownError";
981
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
982
- switch (errorCode) {
983
- case "InternalServiceError":
984
- case "com.amazonaws.datapipeline#InternalServiceError":
985
- response = {
986
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
987
- name: errorCode,
988
- $metadata: deserializeMetadata(output),
989
- };
990
- break;
991
- case "InvalidRequestException":
992
- case "com.amazonaws.datapipeline#InvalidRequestException":
993
- response = {
994
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
995
- name: errorCode,
996
- $metadata: deserializeMetadata(output),
997
- };
998
- break;
999
- case "PipelineDeletedException":
1000
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1001
- response = {
1002
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1003
- name: errorCode,
1004
- $metadata: deserializeMetadata(output),
1005
- };
1006
- break;
1007
- case "PipelineNotFoundException":
1008
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1009
- response = {
1010
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1011
- name: errorCode,
1012
- $metadata: deserializeMetadata(output),
1013
- };
1014
- break;
1015
- default:
1016
- const parsedBody = parsedOutput.body;
1017
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1018
- response = {
1019
- ...parsedBody,
1020
- name: `${errorCode}`,
1021
- message: parsedBody.message || parsedBody.Message || errorCode,
1022
- $fault: "client",
1023
- $metadata: deserializeMetadata(output),
1024
- } as any;
1025
- }
1026
- const message = response.message || response.Message || errorCode;
1027
- response.message = message;
1028
- delete response.Message;
1029
- return Promise.reject(Object.assign(new Error(message), response));
1030
- };
1031
-
1032
- export const deserializeAws_json1_1ListPipelinesCommand = async (
1033
- output: __HttpResponse,
1034
- context: __SerdeContext
1035
- ): Promise<ListPipelinesCommandOutput> => {
1036
- if (output.statusCode >= 300) {
1037
- return deserializeAws_json1_1ListPipelinesCommandError(output, context);
1038
- }
1039
- const data: any = await parseBody(output.body, context);
1040
- let contents: any = {};
1041
- contents = deserializeAws_json1_1ListPipelinesOutput(data, context);
1042
- const response: ListPipelinesCommandOutput = {
1043
- $metadata: deserializeMetadata(output),
1044
- ...contents,
1045
- };
1046
- return Promise.resolve(response);
1047
- };
1048
-
1049
- const deserializeAws_json1_1ListPipelinesCommandError = async (
1050
- output: __HttpResponse,
1051
- context: __SerdeContext
1052
- ): Promise<ListPipelinesCommandOutput> => {
1053
- const parsedOutput: any = {
1054
- ...output,
1055
- body: await parseBody(output.body, context),
1056
- };
1057
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1058
- let errorCode = "UnknownError";
1059
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1060
- switch (errorCode) {
1061
- case "InternalServiceError":
1062
- case "com.amazonaws.datapipeline#InternalServiceError":
1063
- response = {
1064
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1065
- name: errorCode,
1066
- $metadata: deserializeMetadata(output),
1067
- };
1068
- break;
1069
- case "InvalidRequestException":
1070
- case "com.amazonaws.datapipeline#InvalidRequestException":
1071
- response = {
1072
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1073
- name: errorCode,
1074
- $metadata: deserializeMetadata(output),
1075
- };
1076
- break;
1077
- default:
1078
- const parsedBody = parsedOutput.body;
1079
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1080
- response = {
1081
- ...parsedBody,
1082
- name: `${errorCode}`,
1083
- message: parsedBody.message || parsedBody.Message || errorCode,
1084
- $fault: "client",
1085
- $metadata: deserializeMetadata(output),
1086
- } as any;
1087
- }
1088
- const message = response.message || response.Message || errorCode;
1089
- response.message = message;
1090
- delete response.Message;
1091
- return Promise.reject(Object.assign(new Error(message), response));
1092
- };
1093
-
1094
- export const deserializeAws_json1_1PollForTaskCommand = async (
1095
- output: __HttpResponse,
1096
- context: __SerdeContext
1097
- ): Promise<PollForTaskCommandOutput> => {
1098
- if (output.statusCode >= 300) {
1099
- return deserializeAws_json1_1PollForTaskCommandError(output, context);
1100
- }
1101
- const data: any = await parseBody(output.body, context);
1102
- let contents: any = {};
1103
- contents = deserializeAws_json1_1PollForTaskOutput(data, context);
1104
- const response: PollForTaskCommandOutput = {
1105
- $metadata: deserializeMetadata(output),
1106
- ...contents,
1107
- };
1108
- return Promise.resolve(response);
1109
- };
1110
-
1111
- const deserializeAws_json1_1PollForTaskCommandError = async (
1112
- output: __HttpResponse,
1113
- context: __SerdeContext
1114
- ): Promise<PollForTaskCommandOutput> => {
1115
- const parsedOutput: any = {
1116
- ...output,
1117
- body: await parseBody(output.body, context),
1118
- };
1119
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1120
- let errorCode = "UnknownError";
1121
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1122
- switch (errorCode) {
1123
- case "InternalServiceError":
1124
- case "com.amazonaws.datapipeline#InternalServiceError":
1125
- response = {
1126
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1127
- name: errorCode,
1128
- $metadata: deserializeMetadata(output),
1129
- };
1130
- break;
1131
- case "InvalidRequestException":
1132
- case "com.amazonaws.datapipeline#InvalidRequestException":
1133
- response = {
1134
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1135
- name: errorCode,
1136
- $metadata: deserializeMetadata(output),
1137
- };
1138
- break;
1139
- case "TaskNotFoundException":
1140
- case "com.amazonaws.datapipeline#TaskNotFoundException":
1141
- response = {
1142
- ...(await deserializeAws_json1_1TaskNotFoundExceptionResponse(parsedOutput, context)),
1143
- name: errorCode,
1144
- $metadata: deserializeMetadata(output),
1145
- };
1146
- break;
1147
- default:
1148
- const parsedBody = parsedOutput.body;
1149
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1150
- response = {
1151
- ...parsedBody,
1152
- name: `${errorCode}`,
1153
- message: parsedBody.message || parsedBody.Message || errorCode,
1154
- $fault: "client",
1155
- $metadata: deserializeMetadata(output),
1156
- } as any;
1157
- }
1158
- const message = response.message || response.Message || errorCode;
1159
- response.message = message;
1160
- delete response.Message;
1161
- return Promise.reject(Object.assign(new Error(message), response));
1162
- };
1163
-
1164
- export const deserializeAws_json1_1PutPipelineDefinitionCommand = async (
1165
- output: __HttpResponse,
1166
- context: __SerdeContext
1167
- ): Promise<PutPipelineDefinitionCommandOutput> => {
1168
- if (output.statusCode >= 300) {
1169
- return deserializeAws_json1_1PutPipelineDefinitionCommandError(output, context);
1170
- }
1171
- const data: any = await parseBody(output.body, context);
1172
- let contents: any = {};
1173
- contents = deserializeAws_json1_1PutPipelineDefinitionOutput(data, context);
1174
- const response: PutPipelineDefinitionCommandOutput = {
1175
- $metadata: deserializeMetadata(output),
1176
- ...contents,
1177
- };
1178
- return Promise.resolve(response);
1179
- };
1180
-
1181
- const deserializeAws_json1_1PutPipelineDefinitionCommandError = async (
1182
- output: __HttpResponse,
1183
- context: __SerdeContext
1184
- ): Promise<PutPipelineDefinitionCommandOutput> => {
1185
- const parsedOutput: any = {
1186
- ...output,
1187
- body: await parseBody(output.body, context),
1188
- };
1189
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1190
- let errorCode = "UnknownError";
1191
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1192
- switch (errorCode) {
1193
- case "InternalServiceError":
1194
- case "com.amazonaws.datapipeline#InternalServiceError":
1195
- response = {
1196
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1197
- name: errorCode,
1198
- $metadata: deserializeMetadata(output),
1199
- };
1200
- break;
1201
- case "InvalidRequestException":
1202
- case "com.amazonaws.datapipeline#InvalidRequestException":
1203
- response = {
1204
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1205
- name: errorCode,
1206
- $metadata: deserializeMetadata(output),
1207
- };
1208
- break;
1209
- case "PipelineDeletedException":
1210
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1211
- response = {
1212
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1213
- name: errorCode,
1214
- $metadata: deserializeMetadata(output),
1215
- };
1216
- break;
1217
- case "PipelineNotFoundException":
1218
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1219
- response = {
1220
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1221
- name: errorCode,
1222
- $metadata: deserializeMetadata(output),
1223
- };
1224
- break;
1225
- default:
1226
- const parsedBody = parsedOutput.body;
1227
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1228
- response = {
1229
- ...parsedBody,
1230
- name: `${errorCode}`,
1231
- message: parsedBody.message || parsedBody.Message || errorCode,
1232
- $fault: "client",
1233
- $metadata: deserializeMetadata(output),
1234
- } as any;
1235
- }
1236
- const message = response.message || response.Message || errorCode;
1237
- response.message = message;
1238
- delete response.Message;
1239
- return Promise.reject(Object.assign(new Error(message), response));
1240
- };
1241
-
1242
- export const deserializeAws_json1_1QueryObjectsCommand = async (
1243
- output: __HttpResponse,
1244
- context: __SerdeContext
1245
- ): Promise<QueryObjectsCommandOutput> => {
1246
- if (output.statusCode >= 300) {
1247
- return deserializeAws_json1_1QueryObjectsCommandError(output, context);
1248
- }
1249
- const data: any = await parseBody(output.body, context);
1250
- let contents: any = {};
1251
- contents = deserializeAws_json1_1QueryObjectsOutput(data, context);
1252
- const response: QueryObjectsCommandOutput = {
1253
- $metadata: deserializeMetadata(output),
1254
- ...contents,
1255
- };
1256
- return Promise.resolve(response);
1257
- };
1258
-
1259
- const deserializeAws_json1_1QueryObjectsCommandError = async (
1260
- output: __HttpResponse,
1261
- context: __SerdeContext
1262
- ): Promise<QueryObjectsCommandOutput> => {
1263
- const parsedOutput: any = {
1264
- ...output,
1265
- body: await parseBody(output.body, context),
1266
- };
1267
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1268
- let errorCode = "UnknownError";
1269
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1270
- switch (errorCode) {
1271
- case "InternalServiceError":
1272
- case "com.amazonaws.datapipeline#InternalServiceError":
1273
- response = {
1274
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1275
- name: errorCode,
1276
- $metadata: deserializeMetadata(output),
1277
- };
1278
- break;
1279
- case "InvalidRequestException":
1280
- case "com.amazonaws.datapipeline#InvalidRequestException":
1281
- response = {
1282
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1283
- name: errorCode,
1284
- $metadata: deserializeMetadata(output),
1285
- };
1286
- break;
1287
- case "PipelineDeletedException":
1288
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1289
- response = {
1290
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1291
- name: errorCode,
1292
- $metadata: deserializeMetadata(output),
1293
- };
1294
- break;
1295
- case "PipelineNotFoundException":
1296
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1297
- response = {
1298
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1299
- name: errorCode,
1300
- $metadata: deserializeMetadata(output),
1301
- };
1302
- break;
1303
- default:
1304
- const parsedBody = parsedOutput.body;
1305
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1306
- response = {
1307
- ...parsedBody,
1308
- name: `${errorCode}`,
1309
- message: parsedBody.message || parsedBody.Message || errorCode,
1310
- $fault: "client",
1311
- $metadata: deserializeMetadata(output),
1312
- } as any;
1313
- }
1314
- const message = response.message || response.Message || errorCode;
1315
- response.message = message;
1316
- delete response.Message;
1317
- return Promise.reject(Object.assign(new Error(message), response));
1318
- };
1319
-
1320
- export const deserializeAws_json1_1RemoveTagsCommand = async (
1321
- output: __HttpResponse,
1322
- context: __SerdeContext
1323
- ): Promise<RemoveTagsCommandOutput> => {
1324
- if (output.statusCode >= 300) {
1325
- return deserializeAws_json1_1RemoveTagsCommandError(output, context);
1326
- }
1327
- const data: any = await parseBody(output.body, context);
1328
- let contents: any = {};
1329
- contents = deserializeAws_json1_1RemoveTagsOutput(data, context);
1330
- const response: RemoveTagsCommandOutput = {
1331
- $metadata: deserializeMetadata(output),
1332
- ...contents,
1333
- };
1334
- return Promise.resolve(response);
1335
- };
1336
-
1337
- const deserializeAws_json1_1RemoveTagsCommandError = async (
1338
- output: __HttpResponse,
1339
- context: __SerdeContext
1340
- ): Promise<RemoveTagsCommandOutput> => {
1341
- const parsedOutput: any = {
1342
- ...output,
1343
- body: await parseBody(output.body, context),
1344
- };
1345
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1346
- let errorCode = "UnknownError";
1347
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1348
- switch (errorCode) {
1349
- case "InternalServiceError":
1350
- case "com.amazonaws.datapipeline#InternalServiceError":
1351
- response = {
1352
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1353
- name: errorCode,
1354
- $metadata: deserializeMetadata(output),
1355
- };
1356
- break;
1357
- case "InvalidRequestException":
1358
- case "com.amazonaws.datapipeline#InvalidRequestException":
1359
- response = {
1360
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1361
- name: errorCode,
1362
- $metadata: deserializeMetadata(output),
1363
- };
1364
- break;
1365
- case "PipelineDeletedException":
1366
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1367
- response = {
1368
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1369
- name: errorCode,
1370
- $metadata: deserializeMetadata(output),
1371
- };
1372
- break;
1373
- case "PipelineNotFoundException":
1374
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1375
- response = {
1376
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1377
- name: errorCode,
1378
- $metadata: deserializeMetadata(output),
1379
- };
1380
- break;
1381
- default:
1382
- const parsedBody = parsedOutput.body;
1383
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1384
- response = {
1385
- ...parsedBody,
1386
- name: `${errorCode}`,
1387
- message: parsedBody.message || parsedBody.Message || errorCode,
1388
- $fault: "client",
1389
- $metadata: deserializeMetadata(output),
1390
- } as any;
1391
- }
1392
- const message = response.message || response.Message || errorCode;
1393
- response.message = message;
1394
- delete response.Message;
1395
- return Promise.reject(Object.assign(new Error(message), response));
1396
- };
1397
-
1398
- export const deserializeAws_json1_1ReportTaskProgressCommand = async (
1399
- output: __HttpResponse,
1400
- context: __SerdeContext
1401
- ): Promise<ReportTaskProgressCommandOutput> => {
1402
- if (output.statusCode >= 300) {
1403
- return deserializeAws_json1_1ReportTaskProgressCommandError(output, context);
1404
- }
1405
- const data: any = await parseBody(output.body, context);
1406
- let contents: any = {};
1407
- contents = deserializeAws_json1_1ReportTaskProgressOutput(data, context);
1408
- const response: ReportTaskProgressCommandOutput = {
1409
- $metadata: deserializeMetadata(output),
1410
- ...contents,
1411
- };
1412
- return Promise.resolve(response);
1413
- };
1414
-
1415
- const deserializeAws_json1_1ReportTaskProgressCommandError = async (
1416
- output: __HttpResponse,
1417
- context: __SerdeContext
1418
- ): Promise<ReportTaskProgressCommandOutput> => {
1419
- const parsedOutput: any = {
1420
- ...output,
1421
- body: await parseBody(output.body, context),
1422
- };
1423
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1424
- let errorCode = "UnknownError";
1425
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1426
- switch (errorCode) {
1427
- case "InternalServiceError":
1428
- case "com.amazonaws.datapipeline#InternalServiceError":
1429
- response = {
1430
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1431
- name: errorCode,
1432
- $metadata: deserializeMetadata(output),
1433
- };
1434
- break;
1435
- case "InvalidRequestException":
1436
- case "com.amazonaws.datapipeline#InvalidRequestException":
1437
- response = {
1438
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1439
- name: errorCode,
1440
- $metadata: deserializeMetadata(output),
1441
- };
1442
- break;
1443
- case "PipelineDeletedException":
1444
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1445
- response = {
1446
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1447
- name: errorCode,
1448
- $metadata: deserializeMetadata(output),
1449
- };
1450
- break;
1451
- case "PipelineNotFoundException":
1452
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1453
- response = {
1454
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1455
- name: errorCode,
1456
- $metadata: deserializeMetadata(output),
1457
- };
1458
- break;
1459
- case "TaskNotFoundException":
1460
- case "com.amazonaws.datapipeline#TaskNotFoundException":
1461
- response = {
1462
- ...(await deserializeAws_json1_1TaskNotFoundExceptionResponse(parsedOutput, context)),
1463
- name: errorCode,
1464
- $metadata: deserializeMetadata(output),
1465
- };
1466
- break;
1467
- default:
1468
- const parsedBody = parsedOutput.body;
1469
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1470
- response = {
1471
- ...parsedBody,
1472
- name: `${errorCode}`,
1473
- message: parsedBody.message || parsedBody.Message || errorCode,
1474
- $fault: "client",
1475
- $metadata: deserializeMetadata(output),
1476
- } as any;
1477
- }
1478
- const message = response.message || response.Message || errorCode;
1479
- response.message = message;
1480
- delete response.Message;
1481
- return Promise.reject(Object.assign(new Error(message), response));
1482
- };
1483
-
1484
- export const deserializeAws_json1_1ReportTaskRunnerHeartbeatCommand = async (
1485
- output: __HttpResponse,
1486
- context: __SerdeContext
1487
- ): Promise<ReportTaskRunnerHeartbeatCommandOutput> => {
1488
- if (output.statusCode >= 300) {
1489
- return deserializeAws_json1_1ReportTaskRunnerHeartbeatCommandError(output, context);
1490
- }
1491
- const data: any = await parseBody(output.body, context);
1492
- let contents: any = {};
1493
- contents = deserializeAws_json1_1ReportTaskRunnerHeartbeatOutput(data, context);
1494
- const response: ReportTaskRunnerHeartbeatCommandOutput = {
1495
- $metadata: deserializeMetadata(output),
1496
- ...contents,
1497
- };
1498
- return Promise.resolve(response);
1499
- };
1500
-
1501
- const deserializeAws_json1_1ReportTaskRunnerHeartbeatCommandError = async (
1502
- output: __HttpResponse,
1503
- context: __SerdeContext
1504
- ): Promise<ReportTaskRunnerHeartbeatCommandOutput> => {
1505
- const parsedOutput: any = {
1506
- ...output,
1507
- body: await parseBody(output.body, context),
1508
- };
1509
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1510
- let errorCode = "UnknownError";
1511
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1512
- switch (errorCode) {
1513
- case "InternalServiceError":
1514
- case "com.amazonaws.datapipeline#InternalServiceError":
1515
- response = {
1516
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1517
- name: errorCode,
1518
- $metadata: deserializeMetadata(output),
1519
- };
1520
- break;
1521
- case "InvalidRequestException":
1522
- case "com.amazonaws.datapipeline#InvalidRequestException":
1523
- response = {
1524
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1525
- name: errorCode,
1526
- $metadata: deserializeMetadata(output),
1527
- };
1528
- break;
1529
- default:
1530
- const parsedBody = parsedOutput.body;
1531
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1532
- response = {
1533
- ...parsedBody,
1534
- name: `${errorCode}`,
1535
- message: parsedBody.message || parsedBody.Message || errorCode,
1536
- $fault: "client",
1537
- $metadata: deserializeMetadata(output),
1538
- } as any;
1539
- }
1540
- const message = response.message || response.Message || errorCode;
1541
- response.message = message;
1542
- delete response.Message;
1543
- return Promise.reject(Object.assign(new Error(message), response));
1544
- };
1545
-
1546
- export const deserializeAws_json1_1SetStatusCommand = async (
1547
- output: __HttpResponse,
1548
- context: __SerdeContext
1549
- ): Promise<SetStatusCommandOutput> => {
1550
- if (output.statusCode >= 300) {
1551
- return deserializeAws_json1_1SetStatusCommandError(output, context);
1552
- }
1553
- await collectBody(output.body, context);
1554
- const response: SetStatusCommandOutput = {
1555
- $metadata: deserializeMetadata(output),
1556
- };
1557
- return Promise.resolve(response);
1558
- };
1559
-
1560
- const deserializeAws_json1_1SetStatusCommandError = async (
1561
- output: __HttpResponse,
1562
- context: __SerdeContext
1563
- ): Promise<SetStatusCommandOutput> => {
1564
- const parsedOutput: any = {
1565
- ...output,
1566
- body: await parseBody(output.body, context),
1567
- };
1568
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1569
- let errorCode = "UnknownError";
1570
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1571
- switch (errorCode) {
1572
- case "InternalServiceError":
1573
- case "com.amazonaws.datapipeline#InternalServiceError":
1574
- response = {
1575
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1576
- name: errorCode,
1577
- $metadata: deserializeMetadata(output),
1578
- };
1579
- break;
1580
- case "InvalidRequestException":
1581
- case "com.amazonaws.datapipeline#InvalidRequestException":
1582
- response = {
1583
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1584
- name: errorCode,
1585
- $metadata: deserializeMetadata(output),
1586
- };
1587
- break;
1588
- case "PipelineDeletedException":
1589
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1590
- response = {
1591
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1592
- name: errorCode,
1593
- $metadata: deserializeMetadata(output),
1594
- };
1595
- break;
1596
- case "PipelineNotFoundException":
1597
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1598
- response = {
1599
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1600
- name: errorCode,
1601
- $metadata: deserializeMetadata(output),
1602
- };
1603
- break;
1604
- default:
1605
- const parsedBody = parsedOutput.body;
1606
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1607
- response = {
1608
- ...parsedBody,
1609
- name: `${errorCode}`,
1610
- message: parsedBody.message || parsedBody.Message || errorCode,
1611
- $fault: "client",
1612
- $metadata: deserializeMetadata(output),
1613
- } as any;
1614
- }
1615
- const message = response.message || response.Message || errorCode;
1616
- response.message = message;
1617
- delete response.Message;
1618
- return Promise.reject(Object.assign(new Error(message), response));
1619
- };
1620
-
1621
- export const deserializeAws_json1_1SetTaskStatusCommand = async (
1622
- output: __HttpResponse,
1623
- context: __SerdeContext
1624
- ): Promise<SetTaskStatusCommandOutput> => {
1625
- if (output.statusCode >= 300) {
1626
- return deserializeAws_json1_1SetTaskStatusCommandError(output, context);
1627
- }
1628
- const data: any = await parseBody(output.body, context);
1629
- let contents: any = {};
1630
- contents = deserializeAws_json1_1SetTaskStatusOutput(data, context);
1631
- const response: SetTaskStatusCommandOutput = {
1632
- $metadata: deserializeMetadata(output),
1633
- ...contents,
1634
- };
1635
- return Promise.resolve(response);
1636
- };
1637
-
1638
- const deserializeAws_json1_1SetTaskStatusCommandError = async (
1639
- output: __HttpResponse,
1640
- context: __SerdeContext
1641
- ): Promise<SetTaskStatusCommandOutput> => {
1642
- const parsedOutput: any = {
1643
- ...output,
1644
- body: await parseBody(output.body, context),
1645
- };
1646
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1647
- let errorCode = "UnknownError";
1648
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1649
- switch (errorCode) {
1650
- case "InternalServiceError":
1651
- case "com.amazonaws.datapipeline#InternalServiceError":
1652
- response = {
1653
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1654
- name: errorCode,
1655
- $metadata: deserializeMetadata(output),
1656
- };
1657
- break;
1658
- case "InvalidRequestException":
1659
- case "com.amazonaws.datapipeline#InvalidRequestException":
1660
- response = {
1661
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1662
- name: errorCode,
1663
- $metadata: deserializeMetadata(output),
1664
- };
1665
- break;
1666
- case "PipelineDeletedException":
1667
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1668
- response = {
1669
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1670
- name: errorCode,
1671
- $metadata: deserializeMetadata(output),
1672
- };
1673
- break;
1674
- case "PipelineNotFoundException":
1675
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1676
- response = {
1677
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1678
- name: errorCode,
1679
- $metadata: deserializeMetadata(output),
1680
- };
1681
- break;
1682
- case "TaskNotFoundException":
1683
- case "com.amazonaws.datapipeline#TaskNotFoundException":
1684
- response = {
1685
- ...(await deserializeAws_json1_1TaskNotFoundExceptionResponse(parsedOutput, context)),
1686
- name: errorCode,
1687
- $metadata: deserializeMetadata(output),
1688
- };
1689
- break;
1690
- default:
1691
- const parsedBody = parsedOutput.body;
1692
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1693
- response = {
1694
- ...parsedBody,
1695
- name: `${errorCode}`,
1696
- message: parsedBody.message || parsedBody.Message || errorCode,
1697
- $fault: "client",
1698
- $metadata: deserializeMetadata(output),
1699
- } as any;
1700
- }
1701
- const message = response.message || response.Message || errorCode;
1702
- response.message = message;
1703
- delete response.Message;
1704
- return Promise.reject(Object.assign(new Error(message), response));
1705
- };
1706
-
1707
- export const deserializeAws_json1_1ValidatePipelineDefinitionCommand = async (
1708
- output: __HttpResponse,
1709
- context: __SerdeContext
1710
- ): Promise<ValidatePipelineDefinitionCommandOutput> => {
1711
- if (output.statusCode >= 300) {
1712
- return deserializeAws_json1_1ValidatePipelineDefinitionCommandError(output, context);
1713
- }
1714
- const data: any = await parseBody(output.body, context);
1715
- let contents: any = {};
1716
- contents = deserializeAws_json1_1ValidatePipelineDefinitionOutput(data, context);
1717
- const response: ValidatePipelineDefinitionCommandOutput = {
1718
- $metadata: deserializeMetadata(output),
1719
- ...contents,
1720
- };
1721
- return Promise.resolve(response);
1722
- };
1723
-
1724
- const deserializeAws_json1_1ValidatePipelineDefinitionCommandError = async (
1725
- output: __HttpResponse,
1726
- context: __SerdeContext
1727
- ): Promise<ValidatePipelineDefinitionCommandOutput> => {
1728
- const parsedOutput: any = {
1729
- ...output,
1730
- body: await parseBody(output.body, context),
1731
- };
1732
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1733
- let errorCode = "UnknownError";
1734
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1735
- switch (errorCode) {
1736
- case "InternalServiceError":
1737
- case "com.amazonaws.datapipeline#InternalServiceError":
1738
- response = {
1739
- ...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
1740
- name: errorCode,
1741
- $metadata: deserializeMetadata(output),
1742
- };
1743
- break;
1744
- case "InvalidRequestException":
1745
- case "com.amazonaws.datapipeline#InvalidRequestException":
1746
- response = {
1747
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1748
- name: errorCode,
1749
- $metadata: deserializeMetadata(output),
1750
- };
1751
- break;
1752
- case "PipelineDeletedException":
1753
- case "com.amazonaws.datapipeline#PipelineDeletedException":
1754
- response = {
1755
- ...(await deserializeAws_json1_1PipelineDeletedExceptionResponse(parsedOutput, context)),
1756
- name: errorCode,
1757
- $metadata: deserializeMetadata(output),
1758
- };
1759
- break;
1760
- case "PipelineNotFoundException":
1761
- case "com.amazonaws.datapipeline#PipelineNotFoundException":
1762
- response = {
1763
- ...(await deserializeAws_json1_1PipelineNotFoundExceptionResponse(parsedOutput, context)),
1764
- name: errorCode,
1765
- $metadata: deserializeMetadata(output),
1766
- };
1767
- break;
1768
- default:
1769
- const parsedBody = parsedOutput.body;
1770
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1771
- response = {
1772
- ...parsedBody,
1773
- name: `${errorCode}`,
1774
- message: parsedBody.message || parsedBody.Message || errorCode,
1775
- $fault: "client",
1776
- $metadata: deserializeMetadata(output),
1777
- } as any;
1778
- }
1779
- const message = response.message || response.Message || errorCode;
1780
- response.message = message;
1781
- delete response.Message;
1782
- return Promise.reject(Object.assign(new Error(message), response));
1783
- };
1784
-
1785
- const deserializeAws_json1_1InternalServiceErrorResponse = async (
1786
- parsedOutput: any,
1787
- context: __SerdeContext
1788
- ): Promise<InternalServiceError> => {
1789
- const body = parsedOutput.body;
1790
- const deserialized: any = deserializeAws_json1_1InternalServiceError(body, context);
1791
- const contents: InternalServiceError = {
1792
- name: "InternalServiceError",
1793
- $fault: "server",
1794
- $metadata: deserializeMetadata(parsedOutput),
1795
- ...deserialized,
1796
- };
1797
- return contents;
1798
- };
1799
-
1800
- const deserializeAws_json1_1InvalidRequestExceptionResponse = async (
1801
- parsedOutput: any,
1802
- context: __SerdeContext
1803
- ): Promise<InvalidRequestException> => {
1804
- const body = parsedOutput.body;
1805
- const deserialized: any = deserializeAws_json1_1InvalidRequestException(body, context);
1806
- const contents: InvalidRequestException = {
1807
- name: "InvalidRequestException",
1808
- $fault: "client",
1809
- $metadata: deserializeMetadata(parsedOutput),
1810
- ...deserialized,
1811
- };
1812
- return contents;
1813
- };
1814
-
1815
- const deserializeAws_json1_1PipelineDeletedExceptionResponse = async (
1816
- parsedOutput: any,
1817
- context: __SerdeContext
1818
- ): Promise<PipelineDeletedException> => {
1819
- const body = parsedOutput.body;
1820
- const deserialized: any = deserializeAws_json1_1PipelineDeletedException(body, context);
1821
- const contents: PipelineDeletedException = {
1822
- name: "PipelineDeletedException",
1823
- $fault: "client",
1824
- $metadata: deserializeMetadata(parsedOutput),
1825
- ...deserialized,
1826
- };
1827
- return contents;
1828
- };
1829
-
1830
- const deserializeAws_json1_1PipelineNotFoundExceptionResponse = async (
1831
- parsedOutput: any,
1832
- context: __SerdeContext
1833
- ): Promise<PipelineNotFoundException> => {
1834
- const body = parsedOutput.body;
1835
- const deserialized: any = deserializeAws_json1_1PipelineNotFoundException(body, context);
1836
- const contents: PipelineNotFoundException = {
1837
- name: "PipelineNotFoundException",
1838
- $fault: "client",
1839
- $metadata: deserializeMetadata(parsedOutput),
1840
- ...deserialized,
1841
- };
1842
- return contents;
1843
- };
1844
-
1845
- const deserializeAws_json1_1TaskNotFoundExceptionResponse = async (
1846
- parsedOutput: any,
1847
- context: __SerdeContext
1848
- ): Promise<TaskNotFoundException> => {
1849
- const body = parsedOutput.body;
1850
- const deserialized: any = deserializeAws_json1_1TaskNotFoundException(body, context);
1851
- const contents: TaskNotFoundException = {
1852
- name: "TaskNotFoundException",
1853
- $fault: "client",
1854
- $metadata: deserializeMetadata(parsedOutput),
1855
- ...deserialized,
1856
- };
1857
- return contents;
1858
- };
1859
-
1860
- const serializeAws_json1_1ActivatePipelineInput = (input: ActivatePipelineInput, context: __SerdeContext): any => {
1861
- return {
1862
- ...(input.parameterValues !== undefined &&
1863
- input.parameterValues !== null && {
1864
- parameterValues: serializeAws_json1_1ParameterValueList(input.parameterValues, context),
1865
- }),
1866
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1867
- ...(input.startTimestamp !== undefined &&
1868
- input.startTimestamp !== null && { startTimestamp: Math.round(input.startTimestamp.getTime() / 1000) }),
1869
- };
1870
- };
1871
-
1872
- const serializeAws_json1_1AddTagsInput = (input: AddTagsInput, context: __SerdeContext): any => {
1873
- return {
1874
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1875
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
1876
- };
1877
- };
1878
-
1879
- const serializeAws_json1_1CreatePipelineInput = (input: CreatePipelineInput, context: __SerdeContext): any => {
1880
- return {
1881
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
1882
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
1883
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
1884
- ...(input.uniqueId !== undefined && input.uniqueId !== null && { uniqueId: input.uniqueId }),
1885
- };
1886
- };
1887
-
1888
- const serializeAws_json1_1DeactivatePipelineInput = (input: DeactivatePipelineInput, context: __SerdeContext): any => {
1889
- return {
1890
- ...(input.cancelActive !== undefined && input.cancelActive !== null && { cancelActive: input.cancelActive }),
1891
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1892
- };
1893
- };
1894
-
1895
- const serializeAws_json1_1DeletePipelineInput = (input: DeletePipelineInput, context: __SerdeContext): any => {
1896
- return {
1897
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1898
- };
1899
- };
1900
-
1901
- const serializeAws_json1_1DescribeObjectsInput = (input: DescribeObjectsInput, context: __SerdeContext): any => {
1902
- return {
1903
- ...(input.evaluateExpressions !== undefined &&
1904
- input.evaluateExpressions !== null && { evaluateExpressions: input.evaluateExpressions }),
1905
- ...(input.marker !== undefined && input.marker !== null && { marker: input.marker }),
1906
- ...(input.objectIds !== undefined &&
1907
- input.objectIds !== null && { objectIds: serializeAws_json1_1idList(input.objectIds, context) }),
1908
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1909
- };
1910
- };
1911
-
1912
- const serializeAws_json1_1DescribePipelinesInput = (input: DescribePipelinesInput, context: __SerdeContext): any => {
1913
- return {
1914
- ...(input.pipelineIds !== undefined &&
1915
- input.pipelineIds !== null && { pipelineIds: serializeAws_json1_1idList(input.pipelineIds, context) }),
1916
- };
1917
- };
1918
-
1919
- const serializeAws_json1_1EvaluateExpressionInput = (input: EvaluateExpressionInput, context: __SerdeContext): any => {
1920
- return {
1921
- ...(input.expression !== undefined && input.expression !== null && { expression: input.expression }),
1922
- ...(input.objectId !== undefined && input.objectId !== null && { objectId: input.objectId }),
1923
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1924
- };
1925
- };
1926
-
1927
- const serializeAws_json1_1Field = (input: Field, context: __SerdeContext): any => {
1928
- return {
1929
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
1930
- ...(input.refValue !== undefined && input.refValue !== null && { refValue: input.refValue }),
1931
- ...(input.stringValue !== undefined && input.stringValue !== null && { stringValue: input.stringValue }),
1932
- };
1933
- };
1934
-
1935
- const serializeAws_json1_1fieldList = (input: Field[], context: __SerdeContext): any => {
1936
- return input
1937
- .filter((e: any) => e != null)
1938
- .map((entry) => {
1939
- if (entry === null) {
1940
- return null as any;
1941
- }
1942
- return serializeAws_json1_1Field(entry, context);
1943
- });
1944
- };
1945
-
1946
- const serializeAws_json1_1GetPipelineDefinitionInput = (
1947
- input: GetPipelineDefinitionInput,
1948
- context: __SerdeContext
1949
- ): any => {
1950
- return {
1951
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
1952
- ...(input.version !== undefined && input.version !== null && { version: input.version }),
1953
- };
1954
- };
1955
-
1956
- const serializeAws_json1_1idList = (input: string[], context: __SerdeContext): any => {
1957
- return input
1958
- .filter((e: any) => e != null)
1959
- .map((entry) => {
1960
- if (entry === null) {
1961
- return null as any;
1962
- }
1963
- return entry;
1964
- });
1965
- };
1966
-
1967
- const serializeAws_json1_1InstanceIdentity = (input: InstanceIdentity, context: __SerdeContext): any => {
1968
- return {
1969
- ...(input.document !== undefined && input.document !== null && { document: input.document }),
1970
- ...(input.signature !== undefined && input.signature !== null && { signature: input.signature }),
1971
- };
1972
- };
1973
-
1974
- const serializeAws_json1_1ListPipelinesInput = (input: ListPipelinesInput, context: __SerdeContext): any => {
1975
- return {
1976
- ...(input.marker !== undefined && input.marker !== null && { marker: input.marker }),
1977
- };
1978
- };
1979
-
1980
- const serializeAws_json1_1Operator = (input: Operator, context: __SerdeContext): any => {
1981
- return {
1982
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
1983
- ...(input.values !== undefined &&
1984
- input.values !== null && { values: serializeAws_json1_1stringList(input.values, context) }),
1985
- };
1986
- };
1987
-
1988
- const serializeAws_json1_1ParameterAttribute = (input: ParameterAttribute, context: __SerdeContext): any => {
1989
- return {
1990
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
1991
- ...(input.stringValue !== undefined && input.stringValue !== null && { stringValue: input.stringValue }),
1992
- };
1993
- };
1994
-
1995
- const serializeAws_json1_1ParameterAttributeList = (input: ParameterAttribute[], context: __SerdeContext): any => {
1996
- return input
1997
- .filter((e: any) => e != null)
1998
- .map((entry) => {
1999
- if (entry === null) {
2000
- return null as any;
2001
- }
2002
- return serializeAws_json1_1ParameterAttribute(entry, context);
2003
- });
2004
- };
2005
-
2006
- const serializeAws_json1_1ParameterObject = (input: ParameterObject, context: __SerdeContext): any => {
2007
- return {
2008
- ...(input.attributes !== undefined &&
2009
- input.attributes !== null && {
2010
- attributes: serializeAws_json1_1ParameterAttributeList(input.attributes, context),
2011
- }),
2012
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
2013
- };
2014
- };
2015
-
2016
- const serializeAws_json1_1ParameterObjectList = (input: ParameterObject[], context: __SerdeContext): any => {
2017
- return input
2018
- .filter((e: any) => e != null)
2019
- .map((entry) => {
2020
- if (entry === null) {
2021
- return null as any;
2022
- }
2023
- return serializeAws_json1_1ParameterObject(entry, context);
2024
- });
2025
- };
2026
-
2027
- const serializeAws_json1_1ParameterValue = (input: ParameterValue, context: __SerdeContext): any => {
2028
- return {
2029
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
2030
- ...(input.stringValue !== undefined && input.stringValue !== null && { stringValue: input.stringValue }),
2031
- };
2032
- };
2033
-
2034
- const serializeAws_json1_1ParameterValueList = (input: ParameterValue[], context: __SerdeContext): any => {
2035
- return input
2036
- .filter((e: any) => e != null)
2037
- .map((entry) => {
2038
- if (entry === null) {
2039
- return null as any;
2040
- }
2041
- return serializeAws_json1_1ParameterValue(entry, context);
2042
- });
2043
- };
2044
-
2045
- const serializeAws_json1_1PipelineObject = (input: PipelineObject, context: __SerdeContext): any => {
2046
- return {
2047
- ...(input.fields !== undefined &&
2048
- input.fields !== null && { fields: serializeAws_json1_1fieldList(input.fields, context) }),
2049
- ...(input.id !== undefined && input.id !== null && { id: input.id }),
2050
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
2051
- };
2052
- };
2053
-
2054
- const serializeAws_json1_1PipelineObjectList = (input: PipelineObject[], context: __SerdeContext): any => {
2055
- return input
2056
- .filter((e: any) => e != null)
2057
- .map((entry) => {
2058
- if (entry === null) {
2059
- return null as any;
2060
- }
2061
- return serializeAws_json1_1PipelineObject(entry, context);
2062
- });
2063
- };
2064
-
2065
- const serializeAws_json1_1PollForTaskInput = (input: PollForTaskInput, context: __SerdeContext): any => {
2066
- return {
2067
- ...(input.hostname !== undefined && input.hostname !== null && { hostname: input.hostname }),
2068
- ...(input.instanceIdentity !== undefined &&
2069
- input.instanceIdentity !== null && {
2070
- instanceIdentity: serializeAws_json1_1InstanceIdentity(input.instanceIdentity, context),
2071
- }),
2072
- ...(input.workerGroup !== undefined && input.workerGroup !== null && { workerGroup: input.workerGroup }),
2073
- };
2074
- };
2075
-
2076
- const serializeAws_json1_1PutPipelineDefinitionInput = (
2077
- input: PutPipelineDefinitionInput,
2078
- context: __SerdeContext
2079
- ): any => {
2080
- return {
2081
- ...(input.parameterObjects !== undefined &&
2082
- input.parameterObjects !== null && {
2083
- parameterObjects: serializeAws_json1_1ParameterObjectList(input.parameterObjects, context),
2084
- }),
2085
- ...(input.parameterValues !== undefined &&
2086
- input.parameterValues !== null && {
2087
- parameterValues: serializeAws_json1_1ParameterValueList(input.parameterValues, context),
2088
- }),
2089
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
2090
- ...(input.pipelineObjects !== undefined &&
2091
- input.pipelineObjects !== null && {
2092
- pipelineObjects: serializeAws_json1_1PipelineObjectList(input.pipelineObjects, context),
2093
- }),
2094
- };
2095
- };
2096
-
2097
- const serializeAws_json1_1Query = (input: Query, context: __SerdeContext): any => {
2098
- return {
2099
- ...(input.selectors !== undefined &&
2100
- input.selectors !== null && { selectors: serializeAws_json1_1SelectorList(input.selectors, context) }),
2101
- };
2102
- };
2103
-
2104
- const serializeAws_json1_1QueryObjectsInput = (input: QueryObjectsInput, context: __SerdeContext): any => {
2105
- return {
2106
- ...(input.limit !== undefined && input.limit !== null && { limit: input.limit }),
2107
- ...(input.marker !== undefined && input.marker !== null && { marker: input.marker }),
2108
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
2109
- ...(input.query !== undefined &&
2110
- input.query !== null && { query: serializeAws_json1_1Query(input.query, context) }),
2111
- ...(input.sphere !== undefined && input.sphere !== null && { sphere: input.sphere }),
2112
- };
2113
- };
2114
-
2115
- const serializeAws_json1_1RemoveTagsInput = (input: RemoveTagsInput, context: __SerdeContext): any => {
2116
- return {
2117
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
2118
- ...(input.tagKeys !== undefined &&
2119
- input.tagKeys !== null && { tagKeys: serializeAws_json1_1stringList(input.tagKeys, context) }),
2120
- };
2121
- };
2122
-
2123
- const serializeAws_json1_1ReportTaskProgressInput = (input: ReportTaskProgressInput, context: __SerdeContext): any => {
2124
- return {
2125
- ...(input.fields !== undefined &&
2126
- input.fields !== null && { fields: serializeAws_json1_1fieldList(input.fields, context) }),
2127
- ...(input.taskId !== undefined && input.taskId !== null && { taskId: input.taskId }),
2128
- };
2129
- };
2130
-
2131
- const serializeAws_json1_1ReportTaskRunnerHeartbeatInput = (
2132
- input: ReportTaskRunnerHeartbeatInput,
2133
- context: __SerdeContext
2134
- ): any => {
2135
- return {
2136
- ...(input.hostname !== undefined && input.hostname !== null && { hostname: input.hostname }),
2137
- ...(input.taskrunnerId !== undefined && input.taskrunnerId !== null && { taskrunnerId: input.taskrunnerId }),
2138
- ...(input.workerGroup !== undefined && input.workerGroup !== null && { workerGroup: input.workerGroup }),
2139
- };
2140
- };
2141
-
2142
- const serializeAws_json1_1Selector = (input: Selector, context: __SerdeContext): any => {
2143
- return {
2144
- ...(input.fieldName !== undefined && input.fieldName !== null && { fieldName: input.fieldName }),
2145
- ...(input.operator !== undefined &&
2146
- input.operator !== null && { operator: serializeAws_json1_1Operator(input.operator, context) }),
2147
- };
2148
- };
2149
-
2150
- const serializeAws_json1_1SelectorList = (input: Selector[], context: __SerdeContext): any => {
2151
- return input
2152
- .filter((e: any) => e != null)
2153
- .map((entry) => {
2154
- if (entry === null) {
2155
- return null as any;
2156
- }
2157
- return serializeAws_json1_1Selector(entry, context);
2158
- });
2159
- };
2160
-
2161
- const serializeAws_json1_1SetStatusInput = (input: SetStatusInput, context: __SerdeContext): any => {
2162
- return {
2163
- ...(input.objectIds !== undefined &&
2164
- input.objectIds !== null && { objectIds: serializeAws_json1_1idList(input.objectIds, context) }),
2165
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
2166
- ...(input.status !== undefined && input.status !== null && { status: input.status }),
2167
- };
2168
- };
2169
-
2170
- const serializeAws_json1_1SetTaskStatusInput = (input: SetTaskStatusInput, context: __SerdeContext): any => {
2171
- return {
2172
- ...(input.errorId !== undefined && input.errorId !== null && { errorId: input.errorId }),
2173
- ...(input.errorMessage !== undefined && input.errorMessage !== null && { errorMessage: input.errorMessage }),
2174
- ...(input.errorStackTrace !== undefined &&
2175
- input.errorStackTrace !== null && { errorStackTrace: input.errorStackTrace }),
2176
- ...(input.taskId !== undefined && input.taskId !== null && { taskId: input.taskId }),
2177
- ...(input.taskStatus !== undefined && input.taskStatus !== null && { taskStatus: input.taskStatus }),
2178
- };
2179
- };
2180
-
2181
- const serializeAws_json1_1stringList = (input: string[], context: __SerdeContext): any => {
2182
- return input
2183
- .filter((e: any) => e != null)
2184
- .map((entry) => {
2185
- if (entry === null) {
2186
- return null as any;
2187
- }
2188
- return entry;
2189
- });
2190
- };
2191
-
2192
- const serializeAws_json1_1Tag = (input: Tag, context: __SerdeContext): any => {
2193
- return {
2194
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
2195
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
2196
- };
2197
- };
2198
-
2199
- const serializeAws_json1_1tagList = (input: Tag[], context: __SerdeContext): any => {
2200
- return input
2201
- .filter((e: any) => e != null)
2202
- .map((entry) => {
2203
- if (entry === null) {
2204
- return null as any;
2205
- }
2206
- return serializeAws_json1_1Tag(entry, context);
2207
- });
2208
- };
2209
-
2210
- const serializeAws_json1_1ValidatePipelineDefinitionInput = (
2211
- input: ValidatePipelineDefinitionInput,
2212
- context: __SerdeContext
2213
- ): any => {
2214
- return {
2215
- ...(input.parameterObjects !== undefined &&
2216
- input.parameterObjects !== null && {
2217
- parameterObjects: serializeAws_json1_1ParameterObjectList(input.parameterObjects, context),
2218
- }),
2219
- ...(input.parameterValues !== undefined &&
2220
- input.parameterValues !== null && {
2221
- parameterValues: serializeAws_json1_1ParameterValueList(input.parameterValues, context),
2222
- }),
2223
- ...(input.pipelineId !== undefined && input.pipelineId !== null && { pipelineId: input.pipelineId }),
2224
- ...(input.pipelineObjects !== undefined &&
2225
- input.pipelineObjects !== null && {
2226
- pipelineObjects: serializeAws_json1_1PipelineObjectList(input.pipelineObjects, context),
2227
- }),
2228
- };
2229
- };
2230
-
2231
- const deserializeAws_json1_1ActivatePipelineOutput = (output: any, context: __SerdeContext): ActivatePipelineOutput => {
2232
- return {} as any;
2233
- };
2234
-
2235
- const deserializeAws_json1_1AddTagsOutput = (output: any, context: __SerdeContext): AddTagsOutput => {
2236
- return {} as any;
2237
- };
2238
-
2239
- const deserializeAws_json1_1CreatePipelineOutput = (output: any, context: __SerdeContext): CreatePipelineOutput => {
2240
- return {
2241
- pipelineId: __expectString(output.pipelineId),
2242
- } as any;
2243
- };
2244
-
2245
- const deserializeAws_json1_1DeactivatePipelineOutput = (
2246
- output: any,
2247
- context: __SerdeContext
2248
- ): DeactivatePipelineOutput => {
2249
- return {} as any;
2250
- };
2251
-
2252
- const deserializeAws_json1_1DescribeObjectsOutput = (output: any, context: __SerdeContext): DescribeObjectsOutput => {
2253
- return {
2254
- hasMoreResults: __expectBoolean(output.hasMoreResults),
2255
- marker: __expectString(output.marker),
2256
- pipelineObjects:
2257
- output.pipelineObjects !== undefined && output.pipelineObjects !== null
2258
- ? deserializeAws_json1_1PipelineObjectList(output.pipelineObjects, context)
2259
- : undefined,
2260
- } as any;
2261
- };
2262
-
2263
- const deserializeAws_json1_1DescribePipelinesOutput = (
2264
- output: any,
2265
- context: __SerdeContext
2266
- ): DescribePipelinesOutput => {
2267
- return {
2268
- pipelineDescriptionList:
2269
- output.pipelineDescriptionList !== undefined && output.pipelineDescriptionList !== null
2270
- ? deserializeAws_json1_1PipelineDescriptionList(output.pipelineDescriptionList, context)
2271
- : undefined,
2272
- } as any;
2273
- };
2274
-
2275
- const deserializeAws_json1_1EvaluateExpressionOutput = (
2276
- output: any,
2277
- context: __SerdeContext
2278
- ): EvaluateExpressionOutput => {
2279
- return {
2280
- evaluatedExpression: __expectString(output.evaluatedExpression),
2281
- } as any;
2282
- };
2283
-
2284
- const deserializeAws_json1_1Field = (output: any, context: __SerdeContext): Field => {
2285
- return {
2286
- key: __expectString(output.key),
2287
- refValue: __expectString(output.refValue),
2288
- stringValue: __expectString(output.stringValue),
2289
- } as any;
2290
- };
2291
-
2292
- const deserializeAws_json1_1fieldList = (output: any, context: __SerdeContext): Field[] => {
2293
- return (output || [])
2294
- .filter((e: any) => e != null)
2295
- .map((entry: any) => {
2296
- if (entry === null) {
2297
- return null as any;
2298
- }
2299
- return deserializeAws_json1_1Field(entry, context);
2300
- });
2301
- };
2302
-
2303
- const deserializeAws_json1_1GetPipelineDefinitionOutput = (
2304
- output: any,
2305
- context: __SerdeContext
2306
- ): GetPipelineDefinitionOutput => {
2307
- return {
2308
- parameterObjects:
2309
- output.parameterObjects !== undefined && output.parameterObjects !== null
2310
- ? deserializeAws_json1_1ParameterObjectList(output.parameterObjects, context)
2311
- : undefined,
2312
- parameterValues:
2313
- output.parameterValues !== undefined && output.parameterValues !== null
2314
- ? deserializeAws_json1_1ParameterValueList(output.parameterValues, context)
2315
- : undefined,
2316
- pipelineObjects:
2317
- output.pipelineObjects !== undefined && output.pipelineObjects !== null
2318
- ? deserializeAws_json1_1PipelineObjectList(output.pipelineObjects, context)
2319
- : undefined,
2320
- } as any;
2321
- };
2322
-
2323
- const deserializeAws_json1_1idList = (output: any, context: __SerdeContext): string[] => {
2324
- return (output || [])
2325
- .filter((e: any) => e != null)
2326
- .map((entry: any) => {
2327
- if (entry === null) {
2328
- return null as any;
2329
- }
2330
- return __expectString(entry) as any;
2331
- });
2332
- };
2333
-
2334
- const deserializeAws_json1_1InternalServiceError = (output: any, context: __SerdeContext): InternalServiceError => {
2335
- return {
2336
- message: __expectString(output.message),
2337
- } as any;
2338
- };
2339
-
2340
- const deserializeAws_json1_1InvalidRequestException = (
2341
- output: any,
2342
- context: __SerdeContext
2343
- ): InvalidRequestException => {
2344
- return {
2345
- message: __expectString(output.message),
2346
- } as any;
2347
- };
2348
-
2349
- const deserializeAws_json1_1ListPipelinesOutput = (output: any, context: __SerdeContext): ListPipelinesOutput => {
2350
- return {
2351
- hasMoreResults: __expectBoolean(output.hasMoreResults),
2352
- marker: __expectString(output.marker),
2353
- pipelineIdList:
2354
- output.pipelineIdList !== undefined && output.pipelineIdList !== null
2355
- ? deserializeAws_json1_1pipelineList(output.pipelineIdList, context)
2356
- : undefined,
2357
- } as any;
2358
- };
2359
-
2360
- const deserializeAws_json1_1ParameterAttribute = (output: any, context: __SerdeContext): ParameterAttribute => {
2361
- return {
2362
- key: __expectString(output.key),
2363
- stringValue: __expectString(output.stringValue),
2364
- } as any;
2365
- };
2366
-
2367
- const deserializeAws_json1_1ParameterAttributeList = (output: any, context: __SerdeContext): ParameterAttribute[] => {
2368
- return (output || [])
2369
- .filter((e: any) => e != null)
2370
- .map((entry: any) => {
2371
- if (entry === null) {
2372
- return null as any;
2373
- }
2374
- return deserializeAws_json1_1ParameterAttribute(entry, context);
2375
- });
2376
- };
2377
-
2378
- const deserializeAws_json1_1ParameterObject = (output: any, context: __SerdeContext): ParameterObject => {
2379
- return {
2380
- attributes:
2381
- output.attributes !== undefined && output.attributes !== null
2382
- ? deserializeAws_json1_1ParameterAttributeList(output.attributes, context)
2383
- : undefined,
2384
- id: __expectString(output.id),
2385
- } as any;
2386
- };
2387
-
2388
- const deserializeAws_json1_1ParameterObjectList = (output: any, context: __SerdeContext): ParameterObject[] => {
2389
- return (output || [])
2390
- .filter((e: any) => e != null)
2391
- .map((entry: any) => {
2392
- if (entry === null) {
2393
- return null as any;
2394
- }
2395
- return deserializeAws_json1_1ParameterObject(entry, context);
2396
- });
2397
- };
2398
-
2399
- const deserializeAws_json1_1ParameterValue = (output: any, context: __SerdeContext): ParameterValue => {
2400
- return {
2401
- id: __expectString(output.id),
2402
- stringValue: __expectString(output.stringValue),
2403
- } as any;
2404
- };
2405
-
2406
- const deserializeAws_json1_1ParameterValueList = (output: any, context: __SerdeContext): ParameterValue[] => {
2407
- return (output || [])
2408
- .filter((e: any) => e != null)
2409
- .map((entry: any) => {
2410
- if (entry === null) {
2411
- return null as any;
2412
- }
2413
- return deserializeAws_json1_1ParameterValue(entry, context);
2414
- });
2415
- };
2416
-
2417
- const deserializeAws_json1_1PipelineDeletedException = (
2418
- output: any,
2419
- context: __SerdeContext
2420
- ): PipelineDeletedException => {
2421
- return {
2422
- message: __expectString(output.message),
2423
- } as any;
2424
- };
2425
-
2426
- const deserializeAws_json1_1PipelineDescription = (output: any, context: __SerdeContext): PipelineDescription => {
2427
- return {
2428
- description: __expectString(output.description),
2429
- fields:
2430
- output.fields !== undefined && output.fields !== null
2431
- ? deserializeAws_json1_1fieldList(output.fields, context)
2432
- : undefined,
2433
- name: __expectString(output.name),
2434
- pipelineId: __expectString(output.pipelineId),
2435
- tags:
2436
- output.tags !== undefined && output.tags !== null
2437
- ? deserializeAws_json1_1tagList(output.tags, context)
2438
- : undefined,
2439
- } as any;
2440
- };
2441
-
2442
- const deserializeAws_json1_1PipelineDescriptionList = (output: any, context: __SerdeContext): PipelineDescription[] => {
2443
- return (output || [])
2444
- .filter((e: any) => e != null)
2445
- .map((entry: any) => {
2446
- if (entry === null) {
2447
- return null as any;
2448
- }
2449
- return deserializeAws_json1_1PipelineDescription(entry, context);
2450
- });
2451
- };
2452
-
2453
- const deserializeAws_json1_1PipelineIdName = (output: any, context: __SerdeContext): PipelineIdName => {
2454
- return {
2455
- id: __expectString(output.id),
2456
- name: __expectString(output.name),
2457
- } as any;
2458
- };
2459
-
2460
- const deserializeAws_json1_1pipelineList = (output: any, context: __SerdeContext): PipelineIdName[] => {
2461
- return (output || [])
2462
- .filter((e: any) => e != null)
2463
- .map((entry: any) => {
2464
- if (entry === null) {
2465
- return null as any;
2466
- }
2467
- return deserializeAws_json1_1PipelineIdName(entry, context);
2468
- });
2469
- };
2470
-
2471
- const deserializeAws_json1_1PipelineNotFoundException = (
2472
- output: any,
2473
- context: __SerdeContext
2474
- ): PipelineNotFoundException => {
2475
- return {
2476
- message: __expectString(output.message),
2477
- } as any;
2478
- };
2479
-
2480
- const deserializeAws_json1_1PipelineObject = (output: any, context: __SerdeContext): PipelineObject => {
2481
- return {
2482
- fields:
2483
- output.fields !== undefined && output.fields !== null
2484
- ? deserializeAws_json1_1fieldList(output.fields, context)
2485
- : undefined,
2486
- id: __expectString(output.id),
2487
- name: __expectString(output.name),
2488
- } as any;
2489
- };
2490
-
2491
- const deserializeAws_json1_1PipelineObjectList = (output: any, context: __SerdeContext): PipelineObject[] => {
2492
- return (output || [])
2493
- .filter((e: any) => e != null)
2494
- .map((entry: any) => {
2495
- if (entry === null) {
2496
- return null as any;
2497
- }
2498
- return deserializeAws_json1_1PipelineObject(entry, context);
2499
- });
2500
- };
2501
-
2502
- const deserializeAws_json1_1PipelineObjectMap = (
2503
- output: any,
2504
- context: __SerdeContext
2505
- ): { [key: string]: PipelineObject } => {
2506
- return Object.entries(output).reduce((acc: { [key: string]: PipelineObject }, [key, value]: [string, any]) => {
2507
- if (value === null) {
2508
- return acc;
2509
- }
2510
- return {
2511
- ...acc,
2512
- [key]: deserializeAws_json1_1PipelineObject(value, context),
2513
- };
2514
- }, {});
2515
- };
2516
-
2517
- const deserializeAws_json1_1PollForTaskOutput = (output: any, context: __SerdeContext): PollForTaskOutput => {
2518
- return {
2519
- taskObject:
2520
- output.taskObject !== undefined && output.taskObject !== null
2521
- ? deserializeAws_json1_1TaskObject(output.taskObject, context)
2522
- : undefined,
2523
- } as any;
2524
- };
2525
-
2526
- const deserializeAws_json1_1PutPipelineDefinitionOutput = (
2527
- output: any,
2528
- context: __SerdeContext
2529
- ): PutPipelineDefinitionOutput => {
2530
- return {
2531
- errored: __expectBoolean(output.errored),
2532
- validationErrors:
2533
- output.validationErrors !== undefined && output.validationErrors !== null
2534
- ? deserializeAws_json1_1ValidationErrors(output.validationErrors, context)
2535
- : undefined,
2536
- validationWarnings:
2537
- output.validationWarnings !== undefined && output.validationWarnings !== null
2538
- ? deserializeAws_json1_1ValidationWarnings(output.validationWarnings, context)
2539
- : undefined,
2540
- } as any;
2541
- };
2542
-
2543
- const deserializeAws_json1_1QueryObjectsOutput = (output: any, context: __SerdeContext): QueryObjectsOutput => {
2544
- return {
2545
- hasMoreResults: __expectBoolean(output.hasMoreResults),
2546
- ids:
2547
- output.ids !== undefined && output.ids !== null ? deserializeAws_json1_1idList(output.ids, context) : undefined,
2548
- marker: __expectString(output.marker),
2549
- } as any;
2550
- };
2551
-
2552
- const deserializeAws_json1_1RemoveTagsOutput = (output: any, context: __SerdeContext): RemoveTagsOutput => {
2553
- return {} as any;
2554
- };
2555
-
2556
- const deserializeAws_json1_1ReportTaskProgressOutput = (
2557
- output: any,
2558
- context: __SerdeContext
2559
- ): ReportTaskProgressOutput => {
2560
- return {
2561
- canceled: __expectBoolean(output.canceled),
2562
- } as any;
2563
- };
2564
-
2565
- const deserializeAws_json1_1ReportTaskRunnerHeartbeatOutput = (
2566
- output: any,
2567
- context: __SerdeContext
2568
- ): ReportTaskRunnerHeartbeatOutput => {
2569
- return {
2570
- terminate: __expectBoolean(output.terminate),
2571
- } as any;
2572
- };
2573
-
2574
- const deserializeAws_json1_1SetTaskStatusOutput = (output: any, context: __SerdeContext): SetTaskStatusOutput => {
2575
- return {} as any;
2576
- };
2577
-
2578
- const deserializeAws_json1_1Tag = (output: any, context: __SerdeContext): Tag => {
2579
- return {
2580
- key: __expectString(output.key),
2581
- value: __expectString(output.value),
2582
- } as any;
2583
- };
2584
-
2585
- const deserializeAws_json1_1tagList = (output: any, context: __SerdeContext): Tag[] => {
2586
- return (output || [])
2587
- .filter((e: any) => e != null)
2588
- .map((entry: any) => {
2589
- if (entry === null) {
2590
- return null as any;
2591
- }
2592
- return deserializeAws_json1_1Tag(entry, context);
2593
- });
2594
- };
2595
-
2596
- const deserializeAws_json1_1TaskNotFoundException = (output: any, context: __SerdeContext): TaskNotFoundException => {
2597
- return {
2598
- message: __expectString(output.message),
2599
- } as any;
2600
- };
2601
-
2602
- const deserializeAws_json1_1TaskObject = (output: any, context: __SerdeContext): TaskObject => {
2603
- return {
2604
- attemptId: __expectString(output.attemptId),
2605
- objects:
2606
- output.objects !== undefined && output.objects !== null
2607
- ? deserializeAws_json1_1PipelineObjectMap(output.objects, context)
2608
- : undefined,
2609
- pipelineId: __expectString(output.pipelineId),
2610
- taskId: __expectString(output.taskId),
2611
- } as any;
2612
- };
2613
-
2614
- const deserializeAws_json1_1ValidatePipelineDefinitionOutput = (
2615
- output: any,
2616
- context: __SerdeContext
2617
- ): ValidatePipelineDefinitionOutput => {
2618
- return {
2619
- errored: __expectBoolean(output.errored),
2620
- validationErrors:
2621
- output.validationErrors !== undefined && output.validationErrors !== null
2622
- ? deserializeAws_json1_1ValidationErrors(output.validationErrors, context)
2623
- : undefined,
2624
- validationWarnings:
2625
- output.validationWarnings !== undefined && output.validationWarnings !== null
2626
- ? deserializeAws_json1_1ValidationWarnings(output.validationWarnings, context)
2627
- : undefined,
2628
- } as any;
2629
- };
2630
-
2631
- const deserializeAws_json1_1ValidationError = (output: any, context: __SerdeContext): ValidationError => {
2632
- return {
2633
- errors:
2634
- output.errors !== undefined && output.errors !== null
2635
- ? deserializeAws_json1_1validationMessages(output.errors, context)
2636
- : undefined,
2637
- id: __expectString(output.id),
2638
- } as any;
2639
- };
2640
-
2641
- const deserializeAws_json1_1ValidationErrors = (output: any, context: __SerdeContext): ValidationError[] => {
2642
- return (output || [])
2643
- .filter((e: any) => e != null)
2644
- .map((entry: any) => {
2645
- if (entry === null) {
2646
- return null as any;
2647
- }
2648
- return deserializeAws_json1_1ValidationError(entry, context);
2649
- });
2650
- };
2651
-
2652
- const deserializeAws_json1_1validationMessages = (output: any, context: __SerdeContext): string[] => {
2653
- return (output || [])
2654
- .filter((e: any) => e != null)
2655
- .map((entry: any) => {
2656
- if (entry === null) {
2657
- return null as any;
2658
- }
2659
- return __expectString(entry) as any;
2660
- });
2661
- };
2662
-
2663
- const deserializeAws_json1_1ValidationWarning = (output: any, context: __SerdeContext): ValidationWarning => {
2664
- return {
2665
- id: __expectString(output.id),
2666
- warnings:
2667
- output.warnings !== undefined && output.warnings !== null
2668
- ? deserializeAws_json1_1validationMessages(output.warnings, context)
2669
- : undefined,
2670
- } as any;
2671
- };
2672
-
2673
- const deserializeAws_json1_1ValidationWarnings = (output: any, context: __SerdeContext): ValidationWarning[] => {
2674
- return (output || [])
2675
- .filter((e: any) => e != null)
2676
- .map((entry: any) => {
2677
- if (entry === null) {
2678
- return null as any;
2679
- }
2680
- return deserializeAws_json1_1ValidationWarning(entry, context);
2681
- });
2682
- };
2683
-
2684
- const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
2685
- httpStatusCode: output.statusCode,
2686
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
2687
- extendedRequestId: output.headers["x-amz-id-2"],
2688
- cfId: output.headers["x-amz-cf-id"],
2689
- });
2690
-
2691
- // Collect low-level response body stream to Uint8Array.
2692
- const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
2693
- if (streamBody instanceof Uint8Array) {
2694
- return Promise.resolve(streamBody);
2695
- }
2696
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2697
- };
2698
-
2699
- // Encode Uint8Array data into string with utf-8.
2700
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
2701
- collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
2702
-
2703
- const buildHttpRpcRequest = async (
2704
- context: __SerdeContext,
2705
- headers: __HeaderBag,
2706
- path: string,
2707
- resolvedHostname: string | undefined,
2708
- body: any
2709
- ): Promise<__HttpRequest> => {
2710
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2711
- const contents: any = {
2712
- protocol,
2713
- hostname,
2714
- port,
2715
- method: "POST",
2716
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2717
- headers,
2718
- };
2719
- if (resolvedHostname !== undefined) {
2720
- contents.hostname = resolvedHostname;
2721
- }
2722
- if (body !== undefined) {
2723
- contents.body = body;
2724
- }
2725
- return new __HttpRequest(contents);
2726
- };
2727
-
2728
- const parseBody = (streamBody: any, context: __SerdeContext): any =>
2729
- collectBodyString(streamBody, context).then((encoded) => {
2730
- if (encoded.length) {
2731
- return JSON.parse(encoded);
2732
- }
2733
- return {};
2734
- });
2735
-
2736
- /**
2737
- * Load an error code for the aws.rest-json-1.1 protocol.
2738
- */
2739
- const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
2740
- const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2741
-
2742
- const sanitizeErrorCode = (rawValue: string): string => {
2743
- let cleanValue = rawValue;
2744
- if (cleanValue.indexOf(":") >= 0) {
2745
- cleanValue = cleanValue.split(":")[0];
2746
- }
2747
- if (cleanValue.indexOf("#") >= 0) {
2748
- cleanValue = cleanValue.split("#")[1];
2749
- }
2750
- return cleanValue;
2751
- };
2752
-
2753
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2754
- if (headerKey !== undefined) {
2755
- return sanitizeErrorCode(output.headers[headerKey]);
2756
- }
2757
-
2758
- if (data.code !== undefined) {
2759
- return sanitizeErrorCode(data.code);
2760
- }
2761
-
2762
- if (data["__type"] !== undefined) {
2763
- return sanitizeErrorCode(data["__type"]);
2764
- }
2765
-
2766
- return "";
2767
- };