@aws-sdk/client-osis 3.321.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 (131) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +322 -0
  3. package/dist-cjs/OSIS.js +39 -0
  4. package/dist-cjs/OSISClient.js +40 -0
  5. package/dist-cjs/commands/CreatePipelineCommand.js +45 -0
  6. package/dist-cjs/commands/DeletePipelineCommand.js +45 -0
  7. package/dist-cjs/commands/GetPipelineBlueprintCommand.js +45 -0
  8. package/dist-cjs/commands/GetPipelineChangeProgressCommand.js +45 -0
  9. package/dist-cjs/commands/GetPipelineCommand.js +45 -0
  10. package/dist-cjs/commands/ListPipelineBlueprintsCommand.js +45 -0
  11. package/dist-cjs/commands/ListPipelinesCommand.js +45 -0
  12. package/dist-cjs/commands/ListTagsForResourceCommand.js +45 -0
  13. package/dist-cjs/commands/StartPipelineCommand.js +45 -0
  14. package/dist-cjs/commands/StopPipelineCommand.js +45 -0
  15. package/dist-cjs/commands/TagResourceCommand.js +45 -0
  16. package/dist-cjs/commands/UntagResourceCommand.js +45 -0
  17. package/dist-cjs/commands/UpdatePipelineCommand.js +45 -0
  18. package/dist-cjs/commands/ValidatePipelineCommand.js +45 -0
  19. package/dist-cjs/commands/index.js +17 -0
  20. package/dist-cjs/endpoint/EndpointParameters.js +12 -0
  21. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  22. package/dist-cjs/endpoint/ruleset.js +7 -0
  23. package/dist-cjs/index.js +11 -0
  24. package/dist-cjs/models/OSISServiceException.js +11 -0
  25. package/dist-cjs/models/index.js +4 -0
  26. package/dist-cjs/models/models_0.js +132 -0
  27. package/dist-cjs/pagination/Interfaces.js +2 -0
  28. package/dist-cjs/pagination/ListPipelinesPaginator.js +29 -0
  29. package/dist-cjs/pagination/index.js +5 -0
  30. package/dist-cjs/protocols/Aws_restJson1.js +1137 -0
  31. package/dist-cjs/runtimeConfig.browser.js +39 -0
  32. package/dist-cjs/runtimeConfig.js +48 -0
  33. package/dist-cjs/runtimeConfig.native.js +15 -0
  34. package/dist-cjs/runtimeConfig.shared.js +21 -0
  35. package/dist-es/OSIS.js +35 -0
  36. package/dist-es/OSISClient.js +36 -0
  37. package/dist-es/commands/CreatePipelineCommand.js +41 -0
  38. package/dist-es/commands/DeletePipelineCommand.js +41 -0
  39. package/dist-es/commands/GetPipelineBlueprintCommand.js +41 -0
  40. package/dist-es/commands/GetPipelineChangeProgressCommand.js +41 -0
  41. package/dist-es/commands/GetPipelineCommand.js +41 -0
  42. package/dist-es/commands/ListPipelineBlueprintsCommand.js +41 -0
  43. package/dist-es/commands/ListPipelinesCommand.js +41 -0
  44. package/dist-es/commands/ListTagsForResourceCommand.js +41 -0
  45. package/dist-es/commands/StartPipelineCommand.js +41 -0
  46. package/dist-es/commands/StopPipelineCommand.js +41 -0
  47. package/dist-es/commands/TagResourceCommand.js +41 -0
  48. package/dist-es/commands/UntagResourceCommand.js +41 -0
  49. package/dist-es/commands/UpdatePipelineCommand.js +41 -0
  50. package/dist-es/commands/ValidatePipelineCommand.js +41 -0
  51. package/dist-es/commands/index.js +14 -0
  52. package/dist-es/endpoint/EndpointParameters.js +8 -0
  53. package/dist-es/endpoint/endpointResolver.js +8 -0
  54. package/dist-es/endpoint/ruleset.js +4 -0
  55. package/dist-es/index.js +6 -0
  56. package/dist-es/models/OSISServiceException.js +7 -0
  57. package/dist-es/models/index.js +1 -0
  58. package/dist-es/models/models_0.js +121 -0
  59. package/dist-es/pagination/Interfaces.js +1 -0
  60. package/dist-es/pagination/ListPipelinesPaginator.js +25 -0
  61. package/dist-es/pagination/index.js +2 -0
  62. package/dist-es/protocols/Aws_restJson1.js +1106 -0
  63. package/dist-es/runtimeConfig.browser.js +34 -0
  64. package/dist-es/runtimeConfig.js +43 -0
  65. package/dist-es/runtimeConfig.native.js +11 -0
  66. package/dist-es/runtimeConfig.shared.js +17 -0
  67. package/dist-types/OSIS.d.ts +110 -0
  68. package/dist-types/OSISClient.d.ts +177 -0
  69. package/dist-types/commands/CreatePipelineCommand.d.ts +102 -0
  70. package/dist-types/commands/DeletePipelineCommand.d.ts +80 -0
  71. package/dist-types/commands/GetPipelineBlueprintCommand.d.ts +77 -0
  72. package/dist-types/commands/GetPipelineChangeProgressCommand.d.ts +80 -0
  73. package/dist-types/commands/GetPipelineCommand.d.ts +76 -0
  74. package/dist-types/commands/ListPipelineBlueprintsCommand.d.ts +74 -0
  75. package/dist-types/commands/ListPipelinesCommand.d.ts +79 -0
  76. package/dist-types/commands/ListTagsForResourceCommand.d.ts +78 -0
  77. package/dist-types/commands/StartPipelineCommand.d.ts +80 -0
  78. package/dist-types/commands/StopPipelineCommand.d.ts +80 -0
  79. package/dist-types/commands/TagResourceCommand.d.ts +86 -0
  80. package/dist-types/commands/UntagResourceCommand.d.ts +80 -0
  81. package/dist-types/commands/UpdatePipelineCommand.d.ts +89 -0
  82. package/dist-types/commands/ValidatePipelineCommand.d.ts +75 -0
  83. package/dist-types/commands/index.d.ts +14 -0
  84. package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
  85. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  86. package/dist-types/endpoint/ruleset.d.ts +2 -0
  87. package/dist-types/index.d.ts +6 -0
  88. package/dist-types/models/OSISServiceException.d.ts +12 -0
  89. package/dist-types/models/index.d.ts +1 -0
  90. package/dist-types/models/models_0.d.ts +718 -0
  91. package/dist-types/pagination/Interfaces.d.ts +8 -0
  92. package/dist-types/pagination/ListPipelinesPaginator.d.ts +7 -0
  93. package/dist-types/pagination/index.d.ts +2 -0
  94. package/dist-types/protocols/Aws_restJson1.d.ts +128 -0
  95. package/dist-types/runtimeConfig.browser.d.ts +42 -0
  96. package/dist-types/runtimeConfig.d.ts +42 -0
  97. package/dist-types/runtimeConfig.native.d.ts +41 -0
  98. package/dist-types/runtimeConfig.shared.d.ts +18 -0
  99. package/dist-types/ts3.4/OSIS.d.ts +243 -0
  100. package/dist-types/ts3.4/OSISClient.d.ts +196 -0
  101. package/dist-types/ts3.4/commands/CreatePipelineCommand.d.ts +37 -0
  102. package/dist-types/ts3.4/commands/DeletePipelineCommand.d.ts +37 -0
  103. package/dist-types/ts3.4/commands/GetPipelineBlueprintCommand.d.ts +41 -0
  104. package/dist-types/ts3.4/commands/GetPipelineChangeProgressCommand.d.ts +41 -0
  105. package/dist-types/ts3.4/commands/GetPipelineCommand.d.ts +34 -0
  106. package/dist-types/ts3.4/commands/ListPipelineBlueprintsCommand.d.ts +41 -0
  107. package/dist-types/ts3.4/commands/ListPipelinesCommand.d.ts +37 -0
  108. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
  109. package/dist-types/ts3.4/commands/StartPipelineCommand.d.ts +37 -0
  110. package/dist-types/ts3.4/commands/StopPipelineCommand.d.ts +34 -0
  111. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +34 -0
  112. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +37 -0
  113. package/dist-types/ts3.4/commands/UpdatePipelineCommand.d.ts +37 -0
  114. package/dist-types/ts3.4/commands/ValidatePipelineCommand.d.ts +37 -0
  115. package/dist-types/ts3.4/commands/index.d.ts +14 -0
  116. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
  117. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  118. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  119. package/dist-types/ts3.4/index.d.ts +6 -0
  120. package/dist-types/ts3.4/models/OSISServiceException.d.ts +7 -0
  121. package/dist-types/ts3.4/models/index.d.ts +1 -0
  122. package/dist-types/ts3.4/models/models_0.d.ts +247 -0
  123. package/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
  124. package/dist-types/ts3.4/pagination/ListPipelinesPaginator.d.ts +11 -0
  125. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  126. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +173 -0
  127. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +91 -0
  128. package/dist-types/ts3.4/runtimeConfig.d.ts +91 -0
  129. package/dist-types/ts3.4/runtimeConfig.native.d.ts +80 -0
  130. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +18 -0
  131. package/package.json +98 -0
@@ -0,0 +1,1137 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.de_ValidatePipelineCommand = exports.de_UpdatePipelineCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopPipelineCommand = exports.de_StartPipelineCommand = exports.de_ListTagsForResourceCommand = exports.de_ListPipelinesCommand = exports.de_ListPipelineBlueprintsCommand = exports.de_GetPipelineChangeProgressCommand = exports.de_GetPipelineBlueprintCommand = exports.de_GetPipelineCommand = exports.de_DeletePipelineCommand = exports.de_CreatePipelineCommand = exports.se_ValidatePipelineCommand = exports.se_UpdatePipelineCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopPipelineCommand = exports.se_StartPipelineCommand = exports.se_ListTagsForResourceCommand = exports.se_ListPipelinesCommand = exports.se_ListPipelineBlueprintsCommand = exports.se_GetPipelineChangeProgressCommand = exports.se_GetPipelineBlueprintCommand = exports.se_GetPipelineCommand = exports.se_DeletePipelineCommand = exports.se_CreatePipelineCommand = void 0;
4
+ const protocol_http_1 = require("@aws-sdk/protocol-http");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const OSISServiceException_1 = require("../models/OSISServiceException");
8
+ const se_CreatePipelineCommand = async (input, context) => {
9
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const headers = {
11
+ "content-type": "application/json",
12
+ };
13
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2022-01-01/osis/createPipeline";
14
+ let body;
15
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
16
+ LogPublishingOptions: (_) => (0, smithy_client_1._json)(_),
17
+ MaxUnits: [],
18
+ MinUnits: [],
19
+ PipelineConfigurationBody: [],
20
+ PipelineName: [],
21
+ Tags: (_) => (0, smithy_client_1._json)(_),
22
+ VpcOptions: (_) => (0, smithy_client_1._json)(_),
23
+ }));
24
+ return new protocol_http_1.HttpRequest({
25
+ protocol,
26
+ hostname,
27
+ port,
28
+ method: "POST",
29
+ headers,
30
+ path: resolvedPath,
31
+ body,
32
+ });
33
+ };
34
+ exports.se_CreatePipelineCommand = se_CreatePipelineCommand;
35
+ const se_DeletePipelineCommand = async (input, context) => {
36
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const headers = {};
38
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
39
+ "/2022-01-01/osis/deletePipeline/{PipelineName}";
40
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PipelineName", () => input.PipelineName, "{PipelineName}", false);
41
+ let body;
42
+ return new protocol_http_1.HttpRequest({
43
+ protocol,
44
+ hostname,
45
+ port,
46
+ method: "DELETE",
47
+ headers,
48
+ path: resolvedPath,
49
+ body,
50
+ });
51
+ };
52
+ exports.se_DeletePipelineCommand = se_DeletePipelineCommand;
53
+ const se_GetPipelineCommand = async (input, context) => {
54
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
55
+ const headers = {};
56
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
57
+ "/2022-01-01/osis/getPipeline/{PipelineName}";
58
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PipelineName", () => input.PipelineName, "{PipelineName}", false);
59
+ let body;
60
+ return new protocol_http_1.HttpRequest({
61
+ protocol,
62
+ hostname,
63
+ port,
64
+ method: "GET",
65
+ headers,
66
+ path: resolvedPath,
67
+ body,
68
+ });
69
+ };
70
+ exports.se_GetPipelineCommand = se_GetPipelineCommand;
71
+ const se_GetPipelineBlueprintCommand = async (input, context) => {
72
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const headers = {};
74
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
75
+ "/2022-01-01/osis/getPipelineBlueprint/{BlueprintName}";
76
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "BlueprintName", () => input.BlueprintName, "{BlueprintName}", false);
77
+ let body;
78
+ return new protocol_http_1.HttpRequest({
79
+ protocol,
80
+ hostname,
81
+ port,
82
+ method: "GET",
83
+ headers,
84
+ path: resolvedPath,
85
+ body,
86
+ });
87
+ };
88
+ exports.se_GetPipelineBlueprintCommand = se_GetPipelineBlueprintCommand;
89
+ const se_GetPipelineChangeProgressCommand = async (input, context) => {
90
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
91
+ const headers = {};
92
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
93
+ "/2022-01-01/osis/getPipelineChangeProgress/{PipelineName}";
94
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PipelineName", () => input.PipelineName, "{PipelineName}", false);
95
+ let body;
96
+ return new protocol_http_1.HttpRequest({
97
+ protocol,
98
+ hostname,
99
+ port,
100
+ method: "GET",
101
+ headers,
102
+ path: resolvedPath,
103
+ body,
104
+ });
105
+ };
106
+ exports.se_GetPipelineChangeProgressCommand = se_GetPipelineChangeProgressCommand;
107
+ const se_ListPipelineBlueprintsCommand = async (input, context) => {
108
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
+ const headers = {
110
+ "content-type": "application/json",
111
+ };
112
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2022-01-01/osis/listPipelineBlueprints";
113
+ let body;
114
+ body = "";
115
+ return new protocol_http_1.HttpRequest({
116
+ protocol,
117
+ hostname,
118
+ port,
119
+ method: "POST",
120
+ headers,
121
+ path: resolvedPath,
122
+ body,
123
+ });
124
+ };
125
+ exports.se_ListPipelineBlueprintsCommand = se_ListPipelineBlueprintsCommand;
126
+ const se_ListPipelinesCommand = async (input, context) => {
127
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
128
+ const headers = {};
129
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2022-01-01/osis/listPipelines";
130
+ const query = (0, smithy_client_1.map)({
131
+ maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
132
+ nextToken: [, input.NextToken],
133
+ });
134
+ let body;
135
+ return new protocol_http_1.HttpRequest({
136
+ protocol,
137
+ hostname,
138
+ port,
139
+ method: "GET",
140
+ headers,
141
+ path: resolvedPath,
142
+ query,
143
+ body,
144
+ });
145
+ };
146
+ exports.se_ListPipelinesCommand = se_ListPipelinesCommand;
147
+ const se_ListTagsForResourceCommand = async (input, context) => {
148
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
+ const headers = {};
150
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2022-01-01/osis/listTagsForResource";
151
+ const query = (0, smithy_client_1.map)({
152
+ arn: [, (0, smithy_client_1.expectNonNull)(input.Arn, `Arn`)],
153
+ });
154
+ let body;
155
+ return new protocol_http_1.HttpRequest({
156
+ protocol,
157
+ hostname,
158
+ port,
159
+ method: "GET",
160
+ headers,
161
+ path: resolvedPath,
162
+ query,
163
+ body,
164
+ });
165
+ };
166
+ exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
167
+ const se_StartPipelineCommand = async (input, context) => {
168
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
169
+ const headers = {};
170
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
171
+ "/2022-01-01/osis/startPipeline/{PipelineName}";
172
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PipelineName", () => input.PipelineName, "{PipelineName}", false);
173
+ let body;
174
+ return new protocol_http_1.HttpRequest({
175
+ protocol,
176
+ hostname,
177
+ port,
178
+ method: "PUT",
179
+ headers,
180
+ path: resolvedPath,
181
+ body,
182
+ });
183
+ };
184
+ exports.se_StartPipelineCommand = se_StartPipelineCommand;
185
+ const se_StopPipelineCommand = async (input, context) => {
186
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
187
+ const headers = {};
188
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
189
+ "/2022-01-01/osis/stopPipeline/{PipelineName}";
190
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PipelineName", () => input.PipelineName, "{PipelineName}", false);
191
+ let body;
192
+ return new protocol_http_1.HttpRequest({
193
+ protocol,
194
+ hostname,
195
+ port,
196
+ method: "PUT",
197
+ headers,
198
+ path: resolvedPath,
199
+ body,
200
+ });
201
+ };
202
+ exports.se_StopPipelineCommand = se_StopPipelineCommand;
203
+ const se_TagResourceCommand = async (input, context) => {
204
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
205
+ const headers = {
206
+ "content-type": "application/json",
207
+ };
208
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2022-01-01/osis/tagResource";
209
+ const query = (0, smithy_client_1.map)({
210
+ arn: [, (0, smithy_client_1.expectNonNull)(input.Arn, `Arn`)],
211
+ });
212
+ let body;
213
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
214
+ Tags: (_) => (0, smithy_client_1._json)(_),
215
+ }));
216
+ return new protocol_http_1.HttpRequest({
217
+ protocol,
218
+ hostname,
219
+ port,
220
+ method: "POST",
221
+ headers,
222
+ path: resolvedPath,
223
+ query,
224
+ body,
225
+ });
226
+ };
227
+ exports.se_TagResourceCommand = se_TagResourceCommand;
228
+ const se_UntagResourceCommand = async (input, context) => {
229
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
230
+ const headers = {
231
+ "content-type": "application/json",
232
+ };
233
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2022-01-01/osis/untagResource";
234
+ const query = (0, smithy_client_1.map)({
235
+ arn: [, (0, smithy_client_1.expectNonNull)(input.Arn, `Arn`)],
236
+ });
237
+ let body;
238
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
239
+ TagKeys: (_) => (0, smithy_client_1._json)(_),
240
+ }));
241
+ return new protocol_http_1.HttpRequest({
242
+ protocol,
243
+ hostname,
244
+ port,
245
+ method: "POST",
246
+ headers,
247
+ path: resolvedPath,
248
+ query,
249
+ body,
250
+ });
251
+ };
252
+ exports.se_UntagResourceCommand = se_UntagResourceCommand;
253
+ const se_UpdatePipelineCommand = async (input, context) => {
254
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
255
+ const headers = {
256
+ "content-type": "application/json",
257
+ };
258
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
259
+ "/2022-01-01/osis/updatePipeline/{PipelineName}";
260
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PipelineName", () => input.PipelineName, "{PipelineName}", false);
261
+ let body;
262
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
263
+ LogPublishingOptions: (_) => (0, smithy_client_1._json)(_),
264
+ MaxUnits: [],
265
+ MinUnits: [],
266
+ PipelineConfigurationBody: [],
267
+ }));
268
+ return new protocol_http_1.HttpRequest({
269
+ protocol,
270
+ hostname,
271
+ port,
272
+ method: "PUT",
273
+ headers,
274
+ path: resolvedPath,
275
+ body,
276
+ });
277
+ };
278
+ exports.se_UpdatePipelineCommand = se_UpdatePipelineCommand;
279
+ const se_ValidatePipelineCommand = async (input, context) => {
280
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
281
+ const headers = {
282
+ "content-type": "application/json",
283
+ };
284
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2022-01-01/osis/validatePipeline";
285
+ let body;
286
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
287
+ PipelineConfigurationBody: [],
288
+ }));
289
+ return new protocol_http_1.HttpRequest({
290
+ protocol,
291
+ hostname,
292
+ port,
293
+ method: "POST",
294
+ headers,
295
+ path: resolvedPath,
296
+ body,
297
+ });
298
+ };
299
+ exports.se_ValidatePipelineCommand = se_ValidatePipelineCommand;
300
+ const de_CreatePipelineCommand = async (output, context) => {
301
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
302
+ return de_CreatePipelineCommandError(output, context);
303
+ }
304
+ const contents = (0, smithy_client_1.map)({
305
+ $metadata: deserializeMetadata(output),
306
+ });
307
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
308
+ const doc = (0, smithy_client_1.take)(data, {
309
+ Pipeline: (_) => de_Pipeline(_, context),
310
+ });
311
+ Object.assign(contents, doc);
312
+ return contents;
313
+ };
314
+ exports.de_CreatePipelineCommand = de_CreatePipelineCommand;
315
+ const de_CreatePipelineCommandError = async (output, context) => {
316
+ const parsedOutput = {
317
+ ...output,
318
+ body: await parseErrorBody(output.body, context),
319
+ };
320
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
321
+ switch (errorCode) {
322
+ case "AccessDeniedException":
323
+ case "com.amazonaws.osis#AccessDeniedException":
324
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
325
+ case "InternalException":
326
+ case "com.amazonaws.osis#InternalException":
327
+ throw await de_InternalExceptionRes(parsedOutput, context);
328
+ case "LimitExceededException":
329
+ case "com.amazonaws.osis#LimitExceededException":
330
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
331
+ case "ResourceAlreadyExistsException":
332
+ case "com.amazonaws.osis#ResourceAlreadyExistsException":
333
+ throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
334
+ case "ValidationException":
335
+ case "com.amazonaws.osis#ValidationException":
336
+ throw await de_ValidationExceptionRes(parsedOutput, context);
337
+ default:
338
+ const parsedBody = parsedOutput.body;
339
+ return throwDefaultError({
340
+ output,
341
+ parsedBody,
342
+ errorCode,
343
+ });
344
+ }
345
+ };
346
+ const de_DeletePipelineCommand = async (output, context) => {
347
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
348
+ return de_DeletePipelineCommandError(output, context);
349
+ }
350
+ const contents = (0, smithy_client_1.map)({
351
+ $metadata: deserializeMetadata(output),
352
+ });
353
+ await collectBody(output.body, context);
354
+ return contents;
355
+ };
356
+ exports.de_DeletePipelineCommand = de_DeletePipelineCommand;
357
+ const de_DeletePipelineCommandError = async (output, context) => {
358
+ const parsedOutput = {
359
+ ...output,
360
+ body: await parseErrorBody(output.body, context),
361
+ };
362
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
363
+ switch (errorCode) {
364
+ case "AccessDeniedException":
365
+ case "com.amazonaws.osis#AccessDeniedException":
366
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
367
+ case "ConflictException":
368
+ case "com.amazonaws.osis#ConflictException":
369
+ throw await de_ConflictExceptionRes(parsedOutput, context);
370
+ case "InternalException":
371
+ case "com.amazonaws.osis#InternalException":
372
+ throw await de_InternalExceptionRes(parsedOutput, context);
373
+ case "ResourceNotFoundException":
374
+ case "com.amazonaws.osis#ResourceNotFoundException":
375
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
376
+ case "ValidationException":
377
+ case "com.amazonaws.osis#ValidationException":
378
+ throw await de_ValidationExceptionRes(parsedOutput, context);
379
+ default:
380
+ const parsedBody = parsedOutput.body;
381
+ return throwDefaultError({
382
+ output,
383
+ parsedBody,
384
+ errorCode,
385
+ });
386
+ }
387
+ };
388
+ const de_GetPipelineCommand = async (output, context) => {
389
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
390
+ return de_GetPipelineCommandError(output, context);
391
+ }
392
+ const contents = (0, smithy_client_1.map)({
393
+ $metadata: deserializeMetadata(output),
394
+ });
395
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
396
+ const doc = (0, smithy_client_1.take)(data, {
397
+ Pipeline: (_) => de_Pipeline(_, context),
398
+ });
399
+ Object.assign(contents, doc);
400
+ return contents;
401
+ };
402
+ exports.de_GetPipelineCommand = de_GetPipelineCommand;
403
+ const de_GetPipelineCommandError = async (output, context) => {
404
+ const parsedOutput = {
405
+ ...output,
406
+ body: await parseErrorBody(output.body, context),
407
+ };
408
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
409
+ switch (errorCode) {
410
+ case "AccessDeniedException":
411
+ case "com.amazonaws.osis#AccessDeniedException":
412
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
413
+ case "InternalException":
414
+ case "com.amazonaws.osis#InternalException":
415
+ throw await de_InternalExceptionRes(parsedOutput, context);
416
+ case "ResourceNotFoundException":
417
+ case "com.amazonaws.osis#ResourceNotFoundException":
418
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
419
+ case "ValidationException":
420
+ case "com.amazonaws.osis#ValidationException":
421
+ throw await de_ValidationExceptionRes(parsedOutput, context);
422
+ default:
423
+ const parsedBody = parsedOutput.body;
424
+ return throwDefaultError({
425
+ output,
426
+ parsedBody,
427
+ errorCode,
428
+ });
429
+ }
430
+ };
431
+ const de_GetPipelineBlueprintCommand = async (output, context) => {
432
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
433
+ return de_GetPipelineBlueprintCommandError(output, context);
434
+ }
435
+ const contents = (0, smithy_client_1.map)({
436
+ $metadata: deserializeMetadata(output),
437
+ });
438
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
439
+ const doc = (0, smithy_client_1.take)(data, {
440
+ Blueprint: smithy_client_1._json,
441
+ });
442
+ Object.assign(contents, doc);
443
+ return contents;
444
+ };
445
+ exports.de_GetPipelineBlueprintCommand = de_GetPipelineBlueprintCommand;
446
+ const de_GetPipelineBlueprintCommandError = async (output, context) => {
447
+ const parsedOutput = {
448
+ ...output,
449
+ body: await parseErrorBody(output.body, context),
450
+ };
451
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
452
+ switch (errorCode) {
453
+ case "AccessDeniedException":
454
+ case "com.amazonaws.osis#AccessDeniedException":
455
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
456
+ case "InternalException":
457
+ case "com.amazonaws.osis#InternalException":
458
+ throw await de_InternalExceptionRes(parsedOutput, context);
459
+ case "ResourceNotFoundException":
460
+ case "com.amazonaws.osis#ResourceNotFoundException":
461
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
462
+ case "ValidationException":
463
+ case "com.amazonaws.osis#ValidationException":
464
+ throw await de_ValidationExceptionRes(parsedOutput, context);
465
+ default:
466
+ const parsedBody = parsedOutput.body;
467
+ return throwDefaultError({
468
+ output,
469
+ parsedBody,
470
+ errorCode,
471
+ });
472
+ }
473
+ };
474
+ const de_GetPipelineChangeProgressCommand = async (output, context) => {
475
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
476
+ return de_GetPipelineChangeProgressCommandError(output, context);
477
+ }
478
+ const contents = (0, smithy_client_1.map)({
479
+ $metadata: deserializeMetadata(output),
480
+ });
481
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
482
+ const doc = (0, smithy_client_1.take)(data, {
483
+ ChangeProgressStatuses: (_) => de_ChangeProgressStatusList(_, context),
484
+ });
485
+ Object.assign(contents, doc);
486
+ return contents;
487
+ };
488
+ exports.de_GetPipelineChangeProgressCommand = de_GetPipelineChangeProgressCommand;
489
+ const de_GetPipelineChangeProgressCommandError = async (output, context) => {
490
+ const parsedOutput = {
491
+ ...output,
492
+ body: await parseErrorBody(output.body, context),
493
+ };
494
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
495
+ switch (errorCode) {
496
+ case "AccessDeniedException":
497
+ case "com.amazonaws.osis#AccessDeniedException":
498
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
499
+ case "InternalException":
500
+ case "com.amazonaws.osis#InternalException":
501
+ throw await de_InternalExceptionRes(parsedOutput, context);
502
+ case "ResourceNotFoundException":
503
+ case "com.amazonaws.osis#ResourceNotFoundException":
504
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
505
+ case "ValidationException":
506
+ case "com.amazonaws.osis#ValidationException":
507
+ throw await de_ValidationExceptionRes(parsedOutput, context);
508
+ default:
509
+ const parsedBody = parsedOutput.body;
510
+ return throwDefaultError({
511
+ output,
512
+ parsedBody,
513
+ errorCode,
514
+ });
515
+ }
516
+ };
517
+ const de_ListPipelineBlueprintsCommand = async (output, context) => {
518
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
519
+ return de_ListPipelineBlueprintsCommandError(output, context);
520
+ }
521
+ const contents = (0, smithy_client_1.map)({
522
+ $metadata: deserializeMetadata(output),
523
+ });
524
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
525
+ const doc = (0, smithy_client_1.take)(data, {
526
+ Blueprints: smithy_client_1._json,
527
+ });
528
+ Object.assign(contents, doc);
529
+ return contents;
530
+ };
531
+ exports.de_ListPipelineBlueprintsCommand = de_ListPipelineBlueprintsCommand;
532
+ const de_ListPipelineBlueprintsCommandError = async (output, context) => {
533
+ const parsedOutput = {
534
+ ...output,
535
+ body: await parseErrorBody(output.body, context),
536
+ };
537
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
538
+ switch (errorCode) {
539
+ case "AccessDeniedException":
540
+ case "com.amazonaws.osis#AccessDeniedException":
541
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
542
+ case "InternalException":
543
+ case "com.amazonaws.osis#InternalException":
544
+ throw await de_InternalExceptionRes(parsedOutput, context);
545
+ case "InvalidPaginationTokenException":
546
+ case "com.amazonaws.osis#InvalidPaginationTokenException":
547
+ throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
548
+ case "ValidationException":
549
+ case "com.amazonaws.osis#ValidationException":
550
+ throw await de_ValidationExceptionRes(parsedOutput, context);
551
+ default:
552
+ const parsedBody = parsedOutput.body;
553
+ return throwDefaultError({
554
+ output,
555
+ parsedBody,
556
+ errorCode,
557
+ });
558
+ }
559
+ };
560
+ const de_ListPipelinesCommand = async (output, context) => {
561
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
562
+ return de_ListPipelinesCommandError(output, context);
563
+ }
564
+ const contents = (0, smithy_client_1.map)({
565
+ $metadata: deserializeMetadata(output),
566
+ });
567
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
568
+ const doc = (0, smithy_client_1.take)(data, {
569
+ NextToken: smithy_client_1.expectString,
570
+ Pipelines: (_) => de_PipelineSummaryList(_, context),
571
+ });
572
+ Object.assign(contents, doc);
573
+ return contents;
574
+ };
575
+ exports.de_ListPipelinesCommand = de_ListPipelinesCommand;
576
+ const de_ListPipelinesCommandError = async (output, context) => {
577
+ const parsedOutput = {
578
+ ...output,
579
+ body: await parseErrorBody(output.body, context),
580
+ };
581
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
582
+ switch (errorCode) {
583
+ case "AccessDeniedException":
584
+ case "com.amazonaws.osis#AccessDeniedException":
585
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
586
+ case "InternalException":
587
+ case "com.amazonaws.osis#InternalException":
588
+ throw await de_InternalExceptionRes(parsedOutput, context);
589
+ case "InvalidPaginationTokenException":
590
+ case "com.amazonaws.osis#InvalidPaginationTokenException":
591
+ throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
592
+ case "ValidationException":
593
+ case "com.amazonaws.osis#ValidationException":
594
+ throw await de_ValidationExceptionRes(parsedOutput, context);
595
+ default:
596
+ const parsedBody = parsedOutput.body;
597
+ return throwDefaultError({
598
+ output,
599
+ parsedBody,
600
+ errorCode,
601
+ });
602
+ }
603
+ };
604
+ const de_ListTagsForResourceCommand = async (output, context) => {
605
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
606
+ return de_ListTagsForResourceCommandError(output, context);
607
+ }
608
+ const contents = (0, smithy_client_1.map)({
609
+ $metadata: deserializeMetadata(output),
610
+ });
611
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
612
+ const doc = (0, smithy_client_1.take)(data, {
613
+ Tags: smithy_client_1._json,
614
+ });
615
+ Object.assign(contents, doc);
616
+ return contents;
617
+ };
618
+ exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
619
+ const de_ListTagsForResourceCommandError = async (output, context) => {
620
+ const parsedOutput = {
621
+ ...output,
622
+ body: await parseErrorBody(output.body, context),
623
+ };
624
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
625
+ switch (errorCode) {
626
+ case "AccessDeniedException":
627
+ case "com.amazonaws.osis#AccessDeniedException":
628
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
629
+ case "InternalException":
630
+ case "com.amazonaws.osis#InternalException":
631
+ throw await de_InternalExceptionRes(parsedOutput, context);
632
+ case "ResourceNotFoundException":
633
+ case "com.amazonaws.osis#ResourceNotFoundException":
634
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
635
+ case "ValidationException":
636
+ case "com.amazonaws.osis#ValidationException":
637
+ throw await de_ValidationExceptionRes(parsedOutput, context);
638
+ default:
639
+ const parsedBody = parsedOutput.body;
640
+ return throwDefaultError({
641
+ output,
642
+ parsedBody,
643
+ errorCode,
644
+ });
645
+ }
646
+ };
647
+ const de_StartPipelineCommand = async (output, context) => {
648
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
649
+ return de_StartPipelineCommandError(output, context);
650
+ }
651
+ const contents = (0, smithy_client_1.map)({
652
+ $metadata: deserializeMetadata(output),
653
+ });
654
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
655
+ const doc = (0, smithy_client_1.take)(data, {
656
+ Pipeline: (_) => de_Pipeline(_, context),
657
+ });
658
+ Object.assign(contents, doc);
659
+ return contents;
660
+ };
661
+ exports.de_StartPipelineCommand = de_StartPipelineCommand;
662
+ const de_StartPipelineCommandError = async (output, context) => {
663
+ const parsedOutput = {
664
+ ...output,
665
+ body: await parseErrorBody(output.body, context),
666
+ };
667
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
668
+ switch (errorCode) {
669
+ case "AccessDeniedException":
670
+ case "com.amazonaws.osis#AccessDeniedException":
671
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
672
+ case "ConflictException":
673
+ case "com.amazonaws.osis#ConflictException":
674
+ throw await de_ConflictExceptionRes(parsedOutput, context);
675
+ case "InternalException":
676
+ case "com.amazonaws.osis#InternalException":
677
+ throw await de_InternalExceptionRes(parsedOutput, context);
678
+ case "ResourceNotFoundException":
679
+ case "com.amazonaws.osis#ResourceNotFoundException":
680
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
681
+ case "ValidationException":
682
+ case "com.amazonaws.osis#ValidationException":
683
+ throw await de_ValidationExceptionRes(parsedOutput, context);
684
+ default:
685
+ const parsedBody = parsedOutput.body;
686
+ return throwDefaultError({
687
+ output,
688
+ parsedBody,
689
+ errorCode,
690
+ });
691
+ }
692
+ };
693
+ const de_StopPipelineCommand = async (output, context) => {
694
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
695
+ return de_StopPipelineCommandError(output, context);
696
+ }
697
+ const contents = (0, smithy_client_1.map)({
698
+ $metadata: deserializeMetadata(output),
699
+ });
700
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
701
+ const doc = (0, smithy_client_1.take)(data, {
702
+ Pipeline: (_) => de_Pipeline(_, context),
703
+ });
704
+ Object.assign(contents, doc);
705
+ return contents;
706
+ };
707
+ exports.de_StopPipelineCommand = de_StopPipelineCommand;
708
+ const de_StopPipelineCommandError = async (output, context) => {
709
+ const parsedOutput = {
710
+ ...output,
711
+ body: await parseErrorBody(output.body, context),
712
+ };
713
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
714
+ switch (errorCode) {
715
+ case "AccessDeniedException":
716
+ case "com.amazonaws.osis#AccessDeniedException":
717
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
718
+ case "ConflictException":
719
+ case "com.amazonaws.osis#ConflictException":
720
+ throw await de_ConflictExceptionRes(parsedOutput, context);
721
+ case "InternalException":
722
+ case "com.amazonaws.osis#InternalException":
723
+ throw await de_InternalExceptionRes(parsedOutput, context);
724
+ case "ResourceNotFoundException":
725
+ case "com.amazonaws.osis#ResourceNotFoundException":
726
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
727
+ case "ValidationException":
728
+ case "com.amazonaws.osis#ValidationException":
729
+ throw await de_ValidationExceptionRes(parsedOutput, context);
730
+ default:
731
+ const parsedBody = parsedOutput.body;
732
+ return throwDefaultError({
733
+ output,
734
+ parsedBody,
735
+ errorCode,
736
+ });
737
+ }
738
+ };
739
+ const de_TagResourceCommand = async (output, context) => {
740
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
741
+ return de_TagResourceCommandError(output, context);
742
+ }
743
+ const contents = (0, smithy_client_1.map)({
744
+ $metadata: deserializeMetadata(output),
745
+ });
746
+ await collectBody(output.body, context);
747
+ return contents;
748
+ };
749
+ exports.de_TagResourceCommand = de_TagResourceCommand;
750
+ const de_TagResourceCommandError = async (output, context) => {
751
+ const parsedOutput = {
752
+ ...output,
753
+ body: await parseErrorBody(output.body, context),
754
+ };
755
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
756
+ switch (errorCode) {
757
+ case "AccessDeniedException":
758
+ case "com.amazonaws.osis#AccessDeniedException":
759
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
760
+ case "InternalException":
761
+ case "com.amazonaws.osis#InternalException":
762
+ throw await de_InternalExceptionRes(parsedOutput, context);
763
+ case "LimitExceededException":
764
+ case "com.amazonaws.osis#LimitExceededException":
765
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
766
+ case "ResourceNotFoundException":
767
+ case "com.amazonaws.osis#ResourceNotFoundException":
768
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
769
+ case "ValidationException":
770
+ case "com.amazonaws.osis#ValidationException":
771
+ throw await de_ValidationExceptionRes(parsedOutput, context);
772
+ default:
773
+ const parsedBody = parsedOutput.body;
774
+ return throwDefaultError({
775
+ output,
776
+ parsedBody,
777
+ errorCode,
778
+ });
779
+ }
780
+ };
781
+ const de_UntagResourceCommand = async (output, context) => {
782
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
783
+ return de_UntagResourceCommandError(output, context);
784
+ }
785
+ const contents = (0, smithy_client_1.map)({
786
+ $metadata: deserializeMetadata(output),
787
+ });
788
+ await collectBody(output.body, context);
789
+ return contents;
790
+ };
791
+ exports.de_UntagResourceCommand = de_UntagResourceCommand;
792
+ const de_UntagResourceCommandError = async (output, context) => {
793
+ const parsedOutput = {
794
+ ...output,
795
+ body: await parseErrorBody(output.body, context),
796
+ };
797
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
798
+ switch (errorCode) {
799
+ case "AccessDeniedException":
800
+ case "com.amazonaws.osis#AccessDeniedException":
801
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
802
+ case "InternalException":
803
+ case "com.amazonaws.osis#InternalException":
804
+ throw await de_InternalExceptionRes(parsedOutput, context);
805
+ case "ResourceNotFoundException":
806
+ case "com.amazonaws.osis#ResourceNotFoundException":
807
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
808
+ case "ValidationException":
809
+ case "com.amazonaws.osis#ValidationException":
810
+ throw await de_ValidationExceptionRes(parsedOutput, context);
811
+ default:
812
+ const parsedBody = parsedOutput.body;
813
+ return throwDefaultError({
814
+ output,
815
+ parsedBody,
816
+ errorCode,
817
+ });
818
+ }
819
+ };
820
+ const de_UpdatePipelineCommand = async (output, context) => {
821
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
822
+ return de_UpdatePipelineCommandError(output, context);
823
+ }
824
+ const contents = (0, smithy_client_1.map)({
825
+ $metadata: deserializeMetadata(output),
826
+ });
827
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
828
+ const doc = (0, smithy_client_1.take)(data, {
829
+ Pipeline: (_) => de_Pipeline(_, context),
830
+ });
831
+ Object.assign(contents, doc);
832
+ return contents;
833
+ };
834
+ exports.de_UpdatePipelineCommand = de_UpdatePipelineCommand;
835
+ const de_UpdatePipelineCommandError = async (output, context) => {
836
+ const parsedOutput = {
837
+ ...output,
838
+ body: await parseErrorBody(output.body, context),
839
+ };
840
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
841
+ switch (errorCode) {
842
+ case "AccessDeniedException":
843
+ case "com.amazonaws.osis#AccessDeniedException":
844
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
845
+ case "ConflictException":
846
+ case "com.amazonaws.osis#ConflictException":
847
+ throw await de_ConflictExceptionRes(parsedOutput, context);
848
+ case "InternalException":
849
+ case "com.amazonaws.osis#InternalException":
850
+ throw await de_InternalExceptionRes(parsedOutput, context);
851
+ case "ResourceNotFoundException":
852
+ case "com.amazonaws.osis#ResourceNotFoundException":
853
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
854
+ case "ValidationException":
855
+ case "com.amazonaws.osis#ValidationException":
856
+ throw await de_ValidationExceptionRes(parsedOutput, context);
857
+ default:
858
+ const parsedBody = parsedOutput.body;
859
+ return throwDefaultError({
860
+ output,
861
+ parsedBody,
862
+ errorCode,
863
+ });
864
+ }
865
+ };
866
+ const de_ValidatePipelineCommand = async (output, context) => {
867
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
868
+ return de_ValidatePipelineCommandError(output, context);
869
+ }
870
+ const contents = (0, smithy_client_1.map)({
871
+ $metadata: deserializeMetadata(output),
872
+ });
873
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
874
+ const doc = (0, smithy_client_1.take)(data, {
875
+ Errors: smithy_client_1._json,
876
+ isValid: smithy_client_1.expectBoolean,
877
+ });
878
+ Object.assign(contents, doc);
879
+ return contents;
880
+ };
881
+ exports.de_ValidatePipelineCommand = de_ValidatePipelineCommand;
882
+ const de_ValidatePipelineCommandError = async (output, context) => {
883
+ const parsedOutput = {
884
+ ...output,
885
+ body: await parseErrorBody(output.body, context),
886
+ };
887
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
888
+ switch (errorCode) {
889
+ case "AccessDeniedException":
890
+ case "com.amazonaws.osis#AccessDeniedException":
891
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
892
+ case "InternalException":
893
+ case "com.amazonaws.osis#InternalException":
894
+ throw await de_InternalExceptionRes(parsedOutput, context);
895
+ case "ValidationException":
896
+ case "com.amazonaws.osis#ValidationException":
897
+ throw await de_ValidationExceptionRes(parsedOutput, context);
898
+ default:
899
+ const parsedBody = parsedOutput.body;
900
+ return throwDefaultError({
901
+ output,
902
+ parsedBody,
903
+ errorCode,
904
+ });
905
+ }
906
+ };
907
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(OSISServiceException_1.OSISServiceException);
908
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
909
+ const contents = (0, smithy_client_1.map)({});
910
+ const data = parsedOutput.body;
911
+ const doc = (0, smithy_client_1.take)(data, {
912
+ message: smithy_client_1.expectString,
913
+ });
914
+ Object.assign(contents, doc);
915
+ const exception = new models_0_1.AccessDeniedException({
916
+ $metadata: deserializeMetadata(parsedOutput),
917
+ ...contents,
918
+ });
919
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
920
+ };
921
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
922
+ const contents = (0, smithy_client_1.map)({});
923
+ const data = parsedOutput.body;
924
+ const doc = (0, smithy_client_1.take)(data, {
925
+ message: smithy_client_1.expectString,
926
+ });
927
+ Object.assign(contents, doc);
928
+ const exception = new models_0_1.ConflictException({
929
+ $metadata: deserializeMetadata(parsedOutput),
930
+ ...contents,
931
+ });
932
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
933
+ };
934
+ const de_InternalExceptionRes = async (parsedOutput, context) => {
935
+ const contents = (0, smithy_client_1.map)({});
936
+ const data = parsedOutput.body;
937
+ const doc = (0, smithy_client_1.take)(data, {
938
+ message: smithy_client_1.expectString,
939
+ });
940
+ Object.assign(contents, doc);
941
+ const exception = new models_0_1.InternalException({
942
+ $metadata: deserializeMetadata(parsedOutput),
943
+ ...contents,
944
+ });
945
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
946
+ };
947
+ const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
948
+ const contents = (0, smithy_client_1.map)({});
949
+ const data = parsedOutput.body;
950
+ const doc = (0, smithy_client_1.take)(data, {
951
+ message: smithy_client_1.expectString,
952
+ });
953
+ Object.assign(contents, doc);
954
+ const exception = new models_0_1.InvalidPaginationTokenException({
955
+ $metadata: deserializeMetadata(parsedOutput),
956
+ ...contents,
957
+ });
958
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
959
+ };
960
+ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
961
+ const contents = (0, smithy_client_1.map)({});
962
+ const data = parsedOutput.body;
963
+ const doc = (0, smithy_client_1.take)(data, {
964
+ message: smithy_client_1.expectString,
965
+ });
966
+ Object.assign(contents, doc);
967
+ const exception = new models_0_1.LimitExceededException({
968
+ $metadata: deserializeMetadata(parsedOutput),
969
+ ...contents,
970
+ });
971
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
972
+ };
973
+ const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
974
+ const contents = (0, smithy_client_1.map)({});
975
+ const data = parsedOutput.body;
976
+ const doc = (0, smithy_client_1.take)(data, {
977
+ message: smithy_client_1.expectString,
978
+ });
979
+ Object.assign(contents, doc);
980
+ const exception = new models_0_1.ResourceAlreadyExistsException({
981
+ $metadata: deserializeMetadata(parsedOutput),
982
+ ...contents,
983
+ });
984
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
985
+ };
986
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
987
+ const contents = (0, smithy_client_1.map)({});
988
+ const data = parsedOutput.body;
989
+ const doc = (0, smithy_client_1.take)(data, {
990
+ message: smithy_client_1.expectString,
991
+ });
992
+ Object.assign(contents, doc);
993
+ const exception = new models_0_1.ResourceNotFoundException({
994
+ $metadata: deserializeMetadata(parsedOutput),
995
+ ...contents,
996
+ });
997
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
998
+ };
999
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
1000
+ const contents = (0, smithy_client_1.map)({});
1001
+ const data = parsedOutput.body;
1002
+ const doc = (0, smithy_client_1.take)(data, {
1003
+ message: smithy_client_1.expectString,
1004
+ });
1005
+ Object.assign(contents, doc);
1006
+ const exception = new models_0_1.ValidationException({
1007
+ $metadata: deserializeMetadata(parsedOutput),
1008
+ ...contents,
1009
+ });
1010
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1011
+ };
1012
+ const de_ChangeProgressStage = (output, context) => {
1013
+ return (0, smithy_client_1.take)(output, {
1014
+ Description: smithy_client_1.expectString,
1015
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1016
+ Name: smithy_client_1.expectString,
1017
+ Status: smithy_client_1.expectString,
1018
+ });
1019
+ };
1020
+ const de_ChangeProgressStageList = (output, context) => {
1021
+ const retVal = (output || [])
1022
+ .filter((e) => e != null)
1023
+ .map((entry) => {
1024
+ return de_ChangeProgressStage(entry, context);
1025
+ });
1026
+ return retVal;
1027
+ };
1028
+ const de_ChangeProgressStatus = (output, context) => {
1029
+ return (0, smithy_client_1.take)(output, {
1030
+ ChangeProgressStages: (_) => de_ChangeProgressStageList(_, context),
1031
+ StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1032
+ Status: smithy_client_1.expectString,
1033
+ TotalNumberOfStages: smithy_client_1.expectInt32,
1034
+ });
1035
+ };
1036
+ const de_ChangeProgressStatusList = (output, context) => {
1037
+ const retVal = (output || [])
1038
+ .filter((e) => e != null)
1039
+ .map((entry) => {
1040
+ return de_ChangeProgressStatus(entry, context);
1041
+ });
1042
+ return retVal;
1043
+ };
1044
+ const de_Pipeline = (output, context) => {
1045
+ return (0, smithy_client_1.take)(output, {
1046
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1047
+ IngestEndpointUrls: smithy_client_1._json,
1048
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1049
+ LogPublishingOptions: smithy_client_1._json,
1050
+ MaxUnits: smithy_client_1.expectInt32,
1051
+ MinUnits: smithy_client_1.expectInt32,
1052
+ PipelineArn: smithy_client_1.expectString,
1053
+ PipelineConfigurationBody: smithy_client_1.expectString,
1054
+ PipelineName: smithy_client_1.expectString,
1055
+ Status: smithy_client_1.expectString,
1056
+ StatusReason: smithy_client_1._json,
1057
+ VpcEndpoints: smithy_client_1._json,
1058
+ });
1059
+ };
1060
+ const de_PipelineSummary = (output, context) => {
1061
+ return (0, smithy_client_1.take)(output, {
1062
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1063
+ LastUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1064
+ MaxUnits: smithy_client_1.expectInt32,
1065
+ MinUnits: smithy_client_1.expectInt32,
1066
+ PipelineArn: smithy_client_1.expectString,
1067
+ PipelineName: smithy_client_1.expectString,
1068
+ Status: smithy_client_1.expectString,
1069
+ StatusReason: smithy_client_1._json,
1070
+ });
1071
+ };
1072
+ const de_PipelineSummaryList = (output, context) => {
1073
+ const retVal = (output || [])
1074
+ .filter((e) => e != null)
1075
+ .map((entry) => {
1076
+ return de_PipelineSummary(entry, context);
1077
+ });
1078
+ return retVal;
1079
+ };
1080
+ const deserializeMetadata = (output) => ({
1081
+ httpStatusCode: output.statusCode,
1082
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1083
+ extendedRequestId: output.headers["x-amz-id-2"],
1084
+ cfId: output.headers["x-amz-cf-id"],
1085
+ });
1086
+ const collectBody = (streamBody = new Uint8Array(), context) => {
1087
+ if (streamBody instanceof Uint8Array) {
1088
+ return Promise.resolve(streamBody);
1089
+ }
1090
+ return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1091
+ };
1092
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1093
+ const isSerializableHeaderValue = (value) => value !== undefined &&
1094
+ value !== null &&
1095
+ value !== "" &&
1096
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1097
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1098
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1099
+ if (encoded.length) {
1100
+ return JSON.parse(encoded);
1101
+ }
1102
+ return {};
1103
+ });
1104
+ const parseErrorBody = async (errorBody, context) => {
1105
+ const value = await parseBody(errorBody, context);
1106
+ value.message = value.message ?? value.Message;
1107
+ return value;
1108
+ };
1109
+ const loadRestJsonErrorCode = (output, data) => {
1110
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1111
+ const sanitizeErrorCode = (rawValue) => {
1112
+ let cleanValue = rawValue;
1113
+ if (typeof cleanValue === "number") {
1114
+ cleanValue = cleanValue.toString();
1115
+ }
1116
+ if (cleanValue.indexOf(",") >= 0) {
1117
+ cleanValue = cleanValue.split(",")[0];
1118
+ }
1119
+ if (cleanValue.indexOf(":") >= 0) {
1120
+ cleanValue = cleanValue.split(":")[0];
1121
+ }
1122
+ if (cleanValue.indexOf("#") >= 0) {
1123
+ cleanValue = cleanValue.split("#")[1];
1124
+ }
1125
+ return cleanValue;
1126
+ };
1127
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
1128
+ if (headerKey !== undefined) {
1129
+ return sanitizeErrorCode(output.headers[headerKey]);
1130
+ }
1131
+ if (data.code !== undefined) {
1132
+ return sanitizeErrorCode(data.code);
1133
+ }
1134
+ if (data["__type"] !== undefined) {
1135
+ return sanitizeErrorCode(data["__type"]);
1136
+ }
1137
+ };