@aws-sdk/client-arc-region-switch 3.859.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 (207) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +365 -0
  3. package/dist-cjs/ARCRegionSwitch.js +51 -0
  4. package/dist-cjs/ARCRegionSwitchClient.js +52 -0
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  7. package/dist-cjs/commands/ApprovePlanExecutionStepCommand.js +26 -0
  8. package/dist-cjs/commands/CancelPlanExecutionCommand.js +26 -0
  9. package/dist-cjs/commands/CreatePlanCommand.js +29 -0
  10. package/dist-cjs/commands/DeletePlanCommand.js +29 -0
  11. package/dist-cjs/commands/GetPlanCommand.js +29 -0
  12. package/dist-cjs/commands/GetPlanEvaluationStatusCommand.js +26 -0
  13. package/dist-cjs/commands/GetPlanExecutionCommand.js +26 -0
  14. package/dist-cjs/commands/GetPlanInRegionCommand.js +26 -0
  15. package/dist-cjs/commands/ListPlanExecutionEventsCommand.js +26 -0
  16. package/dist-cjs/commands/ListPlanExecutionsCommand.js +26 -0
  17. package/dist-cjs/commands/ListPlansCommand.js +29 -0
  18. package/dist-cjs/commands/ListPlansInRegionCommand.js +26 -0
  19. package/dist-cjs/commands/ListRoute53HealthChecksCommand.js +29 -0
  20. package/dist-cjs/commands/ListTagsForResourceCommand.js +29 -0
  21. package/dist-cjs/commands/StartPlanExecutionCommand.js +26 -0
  22. package/dist-cjs/commands/TagResourceCommand.js +29 -0
  23. package/dist-cjs/commands/UntagResourceCommand.js +29 -0
  24. package/dist-cjs/commands/UpdatePlanCommand.js +29 -0
  25. package/dist-cjs/commands/UpdatePlanExecutionCommand.js +26 -0
  26. package/dist-cjs/commands/UpdatePlanExecutionStepCommand.js +26 -0
  27. package/dist-cjs/commands/index.js +23 -0
  28. package/dist-cjs/endpoint/EndpointParameters.js +15 -0
  29. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  30. package/dist-cjs/endpoint/ruleset.js +7 -0
  31. package/dist-cjs/extensionConfiguration.js +2 -0
  32. package/dist-cjs/index.js +12 -0
  33. package/dist-cjs/models/ARCRegionSwitchServiceException.js +12 -0
  34. package/dist-cjs/models/index.js +4 -0
  35. package/dist-cjs/models/models_0.js +233 -0
  36. package/dist-cjs/pagination/GetPlanEvaluationStatusPaginator.js +7 -0
  37. package/dist-cjs/pagination/GetPlanExecutionPaginator.js +7 -0
  38. package/dist-cjs/pagination/Interfaces.js +2 -0
  39. package/dist-cjs/pagination/ListPlanExecutionEventsPaginator.js +7 -0
  40. package/dist-cjs/pagination/ListPlanExecutionsPaginator.js +7 -0
  41. package/dist-cjs/pagination/ListPlansInRegionPaginator.js +7 -0
  42. package/dist-cjs/pagination/ListPlansPaginator.js +7 -0
  43. package/dist-cjs/pagination/ListRoute53HealthChecksPaginator.js +7 -0
  44. package/dist-cjs/pagination/index.js +11 -0
  45. package/dist-cjs/protocols/Aws_json1_0.js +919 -0
  46. package/dist-cjs/runtimeConfig.browser.js +39 -0
  47. package/dist-cjs/runtimeConfig.js +56 -0
  48. package/dist-cjs/runtimeConfig.native.js +15 -0
  49. package/dist-cjs/runtimeConfig.shared.js +34 -0
  50. package/dist-cjs/runtimeExtensions.js +13 -0
  51. package/dist-cjs/waiters/index.js +5 -0
  52. package/dist-cjs/waiters/waitForPlanEvaluationStatusPassed.js +54 -0
  53. package/dist-cjs/waiters/waitForPlanExecutionCompleted.js +72 -0
  54. package/dist-es/ARCRegionSwitch.js +47 -0
  55. package/dist-es/ARCRegionSwitchClient.js +48 -0
  56. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  57. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  58. package/dist-es/commands/ApprovePlanExecutionStepCommand.js +22 -0
  59. package/dist-es/commands/CancelPlanExecutionCommand.js +22 -0
  60. package/dist-es/commands/CreatePlanCommand.js +25 -0
  61. package/dist-es/commands/DeletePlanCommand.js +25 -0
  62. package/dist-es/commands/GetPlanCommand.js +25 -0
  63. package/dist-es/commands/GetPlanEvaluationStatusCommand.js +22 -0
  64. package/dist-es/commands/GetPlanExecutionCommand.js +22 -0
  65. package/dist-es/commands/GetPlanInRegionCommand.js +22 -0
  66. package/dist-es/commands/ListPlanExecutionEventsCommand.js +22 -0
  67. package/dist-es/commands/ListPlanExecutionsCommand.js +22 -0
  68. package/dist-es/commands/ListPlansCommand.js +25 -0
  69. package/dist-es/commands/ListPlansInRegionCommand.js +22 -0
  70. package/dist-es/commands/ListRoute53HealthChecksCommand.js +25 -0
  71. package/dist-es/commands/ListTagsForResourceCommand.js +25 -0
  72. package/dist-es/commands/StartPlanExecutionCommand.js +22 -0
  73. package/dist-es/commands/TagResourceCommand.js +25 -0
  74. package/dist-es/commands/UntagResourceCommand.js +25 -0
  75. package/dist-es/commands/UpdatePlanCommand.js +25 -0
  76. package/dist-es/commands/UpdatePlanExecutionCommand.js +22 -0
  77. package/dist-es/commands/UpdatePlanExecutionStepCommand.js +22 -0
  78. package/dist-es/commands/index.js +20 -0
  79. package/dist-es/endpoint/EndpointParameters.js +11 -0
  80. package/dist-es/endpoint/endpointResolver.js +14 -0
  81. package/dist-es/endpoint/ruleset.js +4 -0
  82. package/dist-es/extensionConfiguration.js +1 -0
  83. package/dist-es/index.js +7 -0
  84. package/dist-es/models/ARCRegionSwitchServiceException.js +8 -0
  85. package/dist-es/models/index.js +1 -0
  86. package/dist-es/models/models_0.js +225 -0
  87. package/dist-es/pagination/GetPlanEvaluationStatusPaginator.js +4 -0
  88. package/dist-es/pagination/GetPlanExecutionPaginator.js +4 -0
  89. package/dist-es/pagination/Interfaces.js +1 -0
  90. package/dist-es/pagination/ListPlanExecutionEventsPaginator.js +4 -0
  91. package/dist-es/pagination/ListPlanExecutionsPaginator.js +4 -0
  92. package/dist-es/pagination/ListPlansInRegionPaginator.js +4 -0
  93. package/dist-es/pagination/ListPlansPaginator.js +4 -0
  94. package/dist-es/pagination/ListRoute53HealthChecksPaginator.js +4 -0
  95. package/dist-es/pagination/index.js +8 -0
  96. package/dist-es/protocols/Aws_json1_0.js +876 -0
  97. package/dist-es/runtimeConfig.browser.js +34 -0
  98. package/dist-es/runtimeConfig.js +51 -0
  99. package/dist-es/runtimeConfig.native.js +11 -0
  100. package/dist-es/runtimeConfig.shared.js +30 -0
  101. package/dist-es/runtimeExtensions.js +9 -0
  102. package/dist-es/waiters/index.js +2 -0
  103. package/dist-es/waiters/waitForPlanEvaluationStatusPassed.js +49 -0
  104. package/dist-es/waiters/waitForPlanExecutionCompleted.js +67 -0
  105. package/dist-types/ARCRegionSwitch.d.ts +152 -0
  106. package/dist-types/ARCRegionSwitchClient.d.ts +207 -0
  107. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  108. package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
  109. package/dist-types/commands/ApprovePlanExecutionStepCommand.d.ts +80 -0
  110. package/dist-types/commands/CancelPlanExecutionCommand.d.ts +78 -0
  111. package/dist-types/commands/CreatePlanCommand.d.ts +697 -0
  112. package/dist-types/commands/DeletePlanCommand.d.ts +76 -0
  113. package/dist-types/commands/GetPlanCommand.d.ts +389 -0
  114. package/dist-types/commands/GetPlanEvaluationStatusCommand.d.ts +99 -0
  115. package/dist-types/commands/GetPlanExecutionCommand.d.ts +417 -0
  116. package/dist-types/commands/GetPlanInRegionCommand.d.ts +392 -0
  117. package/dist-types/commands/ListPlanExecutionEventsCommand.d.ts +97 -0
  118. package/dist-types/commands/ListPlanExecutionsCommand.d.ts +97 -0
  119. package/dist-types/commands/ListPlansCommand.d.ts +91 -0
  120. package/dist-types/commands/ListPlansInRegionCommand.d.ts +94 -0
  121. package/dist-types/commands/ListRoute53HealthChecksCommand.d.ts +93 -0
  122. package/dist-types/commands/ListTagsForResourceCommand.d.ts +80 -0
  123. package/dist-types/commands/StartPlanExecutionCommand.d.ts +93 -0
  124. package/dist-types/commands/TagResourceCommand.d.ts +79 -0
  125. package/dist-types/commands/UntagResourceCommand.d.ts +79 -0
  126. package/dist-types/commands/UpdatePlanCommand.d.ts +692 -0
  127. package/dist-types/commands/UpdatePlanExecutionCommand.d.ts +82 -0
  128. package/dist-types/commands/UpdatePlanExecutionStepCommand.d.ts +80 -0
  129. package/dist-types/commands/index.d.ts +20 -0
  130. package/dist-types/endpoint/EndpointParameters.d.ts +33 -0
  131. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  132. package/dist-types/endpoint/ruleset.d.ts +2 -0
  133. package/dist-types/extensionConfiguration.d.ts +9 -0
  134. package/dist-types/index.d.ts +15 -0
  135. package/dist-types/models/ARCRegionSwitchServiceException.d.ts +14 -0
  136. package/dist-types/models/index.d.ts +1 -0
  137. package/dist-types/models/models_0.d.ts +2370 -0
  138. package/dist-types/pagination/GetPlanEvaluationStatusPaginator.d.ts +7 -0
  139. package/dist-types/pagination/GetPlanExecutionPaginator.d.ts +7 -0
  140. package/dist-types/pagination/Interfaces.d.ts +8 -0
  141. package/dist-types/pagination/ListPlanExecutionEventsPaginator.d.ts +7 -0
  142. package/dist-types/pagination/ListPlanExecutionsPaginator.d.ts +7 -0
  143. package/dist-types/pagination/ListPlansInRegionPaginator.d.ts +7 -0
  144. package/dist-types/pagination/ListPlansPaginator.d.ts +7 -0
  145. package/dist-types/pagination/ListRoute53HealthChecksPaginator.d.ts +7 -0
  146. package/dist-types/pagination/index.d.ts +8 -0
  147. package/dist-types/protocols/Aws_json1_0.d.ts +182 -0
  148. package/dist-types/runtimeConfig.browser.d.ts +50 -0
  149. package/dist-types/runtimeConfig.d.ts +50 -0
  150. package/dist-types/runtimeConfig.native.d.ts +49 -0
  151. package/dist-types/runtimeConfig.shared.d.ts +21 -0
  152. package/dist-types/runtimeExtensions.d.ts +17 -0
  153. package/dist-types/ts3.4/ARCRegionSwitch.d.ts +349 -0
  154. package/dist-types/ts3.4/ARCRegionSwitchClient.d.ts +240 -0
  155. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  156. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
  157. package/dist-types/ts3.4/commands/ApprovePlanExecutionStepCommand.d.ts +51 -0
  158. package/dist-types/ts3.4/commands/CancelPlanExecutionCommand.d.ts +51 -0
  159. package/dist-types/ts3.4/commands/CreatePlanCommand.d.ts +47 -0
  160. package/dist-types/ts3.4/commands/DeletePlanCommand.d.ts +47 -0
  161. package/dist-types/ts3.4/commands/GetPlanCommand.d.ts +43 -0
  162. package/dist-types/ts3.4/commands/GetPlanEvaluationStatusCommand.d.ts +51 -0
  163. package/dist-types/ts3.4/commands/GetPlanExecutionCommand.d.ts +50 -0
  164. package/dist-types/ts3.4/commands/GetPlanInRegionCommand.d.ts +50 -0
  165. package/dist-types/ts3.4/commands/ListPlanExecutionEventsCommand.d.ts +51 -0
  166. package/dist-types/ts3.4/commands/ListPlanExecutionsCommand.d.ts +51 -0
  167. package/dist-types/ts3.4/commands/ListPlansCommand.d.ts +47 -0
  168. package/dist-types/ts3.4/commands/ListPlansInRegionCommand.d.ts +51 -0
  169. package/dist-types/ts3.4/commands/ListRoute53HealthChecksCommand.d.ts +51 -0
  170. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
  171. package/dist-types/ts3.4/commands/StartPlanExecutionCommand.d.ts +51 -0
  172. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +47 -0
  173. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +50 -0
  174. package/dist-types/ts3.4/commands/UpdatePlanCommand.d.ts +47 -0
  175. package/dist-types/ts3.4/commands/UpdatePlanExecutionCommand.d.ts +51 -0
  176. package/dist-types/ts3.4/commands/UpdatePlanExecutionStepCommand.d.ts +51 -0
  177. package/dist-types/ts3.4/commands/index.d.ts +20 -0
  178. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +46 -0
  179. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  180. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  181. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  182. package/dist-types/ts3.4/index.d.ts +10 -0
  183. package/dist-types/ts3.4/models/ARCRegionSwitchServiceException.d.ts +9 -0
  184. package/dist-types/ts3.4/models/index.d.ts +1 -0
  185. package/dist-types/ts3.4/models/models_0.d.ts +813 -0
  186. package/dist-types/ts3.4/pagination/GetPlanEvaluationStatusPaginator.d.ts +11 -0
  187. package/dist-types/ts3.4/pagination/GetPlanExecutionPaginator.d.ts +11 -0
  188. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  189. package/dist-types/ts3.4/pagination/ListPlanExecutionEventsPaginator.d.ts +11 -0
  190. package/dist-types/ts3.4/pagination/ListPlanExecutionsPaginator.d.ts +11 -0
  191. package/dist-types/ts3.4/pagination/ListPlansInRegionPaginator.d.ts +11 -0
  192. package/dist-types/ts3.4/pagination/ListPlansPaginator.d.ts +11 -0
  193. package/dist-types/ts3.4/pagination/ListRoute53HealthChecksPaginator.d.ts +11 -0
  194. package/dist-types/ts3.4/pagination/index.d.ts +8 -0
  195. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +245 -0
  196. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
  197. package/dist-types/ts3.4/runtimeConfig.d.ts +91 -0
  198. package/dist-types/ts3.4/runtimeConfig.native.d.ts +97 -0
  199. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +23 -0
  200. package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
  201. package/dist-types/ts3.4/waiters/index.d.ts +2 -0
  202. package/dist-types/ts3.4/waiters/waitForPlanEvaluationStatusPassed.d.ts +11 -0
  203. package/dist-types/ts3.4/waiters/waitForPlanExecutionCompleted.d.ts +11 -0
  204. package/dist-types/waiters/index.d.ts +2 -0
  205. package/dist-types/waiters/waitForPlanEvaluationStatusPassed.d.ts +14 -0
  206. package/dist-types/waiters/waitForPlanExecutionCompleted.d.ts +14 -0
  207. package/package.json +100 -0
@@ -0,0 +1,876 @@
1
+ import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
+ import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
+ import { ARCRegionSwitchServiceException as __BaseException } from "../models/ARCRegionSwitchServiceException";
5
+ import { AccessDeniedException, ExecutionBlockConfiguration, IllegalArgumentException, IllegalStateException, InternalServerException, ResourceNotFoundException, } from "../models/models_0";
6
+ export const se_ApprovePlanExecutionStepCommand = async (input, context) => {
7
+ const headers = sharedHeaders("ApprovePlanExecutionStep");
8
+ let body;
9
+ body = JSON.stringify(_json(input));
10
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
+ };
12
+ export const se_CancelPlanExecutionCommand = async (input, context) => {
13
+ const headers = sharedHeaders("CancelPlanExecution");
14
+ let body;
15
+ body = JSON.stringify(_json(input));
16
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
+ };
18
+ export const se_CreatePlanCommand = async (input, context) => {
19
+ const headers = sharedHeaders("CreatePlan");
20
+ let body;
21
+ body = JSON.stringify(se_CreatePlanRequest(input, context));
22
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
+ };
24
+ export const se_DeletePlanCommand = async (input, context) => {
25
+ const headers = sharedHeaders("DeletePlan");
26
+ let body;
27
+ body = JSON.stringify(_json(input));
28
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
+ };
30
+ export const se_GetPlanCommand = async (input, context) => {
31
+ const headers = sharedHeaders("GetPlan");
32
+ let body;
33
+ body = JSON.stringify(_json(input));
34
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
+ };
36
+ export const se_GetPlanEvaluationStatusCommand = async (input, context) => {
37
+ const headers = sharedHeaders("GetPlanEvaluationStatus");
38
+ let body;
39
+ body = JSON.stringify(_json(input));
40
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
+ };
42
+ export const se_GetPlanExecutionCommand = async (input, context) => {
43
+ const headers = sharedHeaders("GetPlanExecution");
44
+ let body;
45
+ body = JSON.stringify(_json(input));
46
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
+ };
48
+ export const se_GetPlanInRegionCommand = async (input, context) => {
49
+ const headers = sharedHeaders("GetPlanInRegion");
50
+ let body;
51
+ body = JSON.stringify(_json(input));
52
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
+ };
54
+ export const se_ListPlanExecutionEventsCommand = async (input, context) => {
55
+ const headers = sharedHeaders("ListPlanExecutionEvents");
56
+ let body;
57
+ body = JSON.stringify(_json(input));
58
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
+ };
60
+ export const se_ListPlanExecutionsCommand = async (input, context) => {
61
+ const headers = sharedHeaders("ListPlanExecutions");
62
+ let body;
63
+ body = JSON.stringify(_json(input));
64
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
+ };
66
+ export const se_ListPlansCommand = async (input, context) => {
67
+ const headers = sharedHeaders("ListPlans");
68
+ let body;
69
+ body = JSON.stringify(_json(input));
70
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
+ };
72
+ export const se_ListPlansInRegionCommand = async (input, context) => {
73
+ const headers = sharedHeaders("ListPlansInRegion");
74
+ let body;
75
+ body = JSON.stringify(_json(input));
76
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
+ };
78
+ export const se_ListRoute53HealthChecksCommand = async (input, context) => {
79
+ const headers = sharedHeaders("ListRoute53HealthChecks");
80
+ let body;
81
+ body = JSON.stringify(_json(input));
82
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
+ };
84
+ export const se_ListTagsForResourceCommand = async (input, context) => {
85
+ const headers = sharedHeaders("ListTagsForResource");
86
+ let body;
87
+ body = JSON.stringify(_json(input));
88
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
+ };
90
+ export const se_StartPlanExecutionCommand = async (input, context) => {
91
+ const headers = sharedHeaders("StartPlanExecution");
92
+ let body;
93
+ body = JSON.stringify(_json(input));
94
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
+ };
96
+ export const se_TagResourceCommand = async (input, context) => {
97
+ const headers = sharedHeaders("TagResource");
98
+ let body;
99
+ body = JSON.stringify(_json(input));
100
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
+ };
102
+ export const se_UntagResourceCommand = async (input, context) => {
103
+ const headers = sharedHeaders("UntagResource");
104
+ let body;
105
+ body = JSON.stringify(_json(input));
106
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
+ };
108
+ export const se_UpdatePlanCommand = async (input, context) => {
109
+ const headers = sharedHeaders("UpdatePlan");
110
+ let body;
111
+ body = JSON.stringify(se_UpdatePlanRequest(input, context));
112
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
+ };
114
+ export const se_UpdatePlanExecutionCommand = async (input, context) => {
115
+ const headers = sharedHeaders("UpdatePlanExecution");
116
+ let body;
117
+ body = JSON.stringify(_json(input));
118
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
+ };
120
+ export const se_UpdatePlanExecutionStepCommand = async (input, context) => {
121
+ const headers = sharedHeaders("UpdatePlanExecutionStep");
122
+ let body;
123
+ body = JSON.stringify(_json(input));
124
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
+ };
126
+ export const de_ApprovePlanExecutionStepCommand = async (output, context) => {
127
+ if (output.statusCode >= 300) {
128
+ return de_CommandError(output, context);
129
+ }
130
+ const data = await parseBody(output.body, context);
131
+ let contents = {};
132
+ contents = _json(data);
133
+ const response = {
134
+ $metadata: deserializeMetadata(output),
135
+ ...contents,
136
+ };
137
+ return response;
138
+ };
139
+ export const de_CancelPlanExecutionCommand = async (output, context) => {
140
+ if (output.statusCode >= 300) {
141
+ return de_CommandError(output, context);
142
+ }
143
+ const data = await parseBody(output.body, context);
144
+ let contents = {};
145
+ contents = _json(data);
146
+ const response = {
147
+ $metadata: deserializeMetadata(output),
148
+ ...contents,
149
+ };
150
+ return response;
151
+ };
152
+ export const de_CreatePlanCommand = async (output, context) => {
153
+ if (output.statusCode >= 300) {
154
+ return de_CommandError(output, context);
155
+ }
156
+ const data = await parseBody(output.body, context);
157
+ let contents = {};
158
+ contents = de_CreatePlanResponse(data, context);
159
+ const response = {
160
+ $metadata: deserializeMetadata(output),
161
+ ...contents,
162
+ };
163
+ return response;
164
+ };
165
+ export const de_DeletePlanCommand = async (output, context) => {
166
+ if (output.statusCode >= 300) {
167
+ return de_CommandError(output, context);
168
+ }
169
+ const data = await parseBody(output.body, context);
170
+ let contents = {};
171
+ contents = _json(data);
172
+ const response = {
173
+ $metadata: deserializeMetadata(output),
174
+ ...contents,
175
+ };
176
+ return response;
177
+ };
178
+ export const de_GetPlanCommand = async (output, context) => {
179
+ if (output.statusCode >= 300) {
180
+ return de_CommandError(output, context);
181
+ }
182
+ const data = await parseBody(output.body, context);
183
+ let contents = {};
184
+ contents = de_GetPlanResponse(data, context);
185
+ const response = {
186
+ $metadata: deserializeMetadata(output),
187
+ ...contents,
188
+ };
189
+ return response;
190
+ };
191
+ export const de_GetPlanEvaluationStatusCommand = async (output, context) => {
192
+ if (output.statusCode >= 300) {
193
+ return de_CommandError(output, context);
194
+ }
195
+ const data = await parseBody(output.body, context);
196
+ let contents = {};
197
+ contents = de_GetPlanEvaluationStatusResponse(data, context);
198
+ const response = {
199
+ $metadata: deserializeMetadata(output),
200
+ ...contents,
201
+ };
202
+ return response;
203
+ };
204
+ export const de_GetPlanExecutionCommand = async (output, context) => {
205
+ if (output.statusCode >= 300) {
206
+ return de_CommandError(output, context);
207
+ }
208
+ const data = await parseBody(output.body, context);
209
+ let contents = {};
210
+ contents = de_GetPlanExecutionResponse(data, context);
211
+ const response = {
212
+ $metadata: deserializeMetadata(output),
213
+ ...contents,
214
+ };
215
+ return response;
216
+ };
217
+ export const de_GetPlanInRegionCommand = async (output, context) => {
218
+ if (output.statusCode >= 300) {
219
+ return de_CommandError(output, context);
220
+ }
221
+ const data = await parseBody(output.body, context);
222
+ let contents = {};
223
+ contents = de_GetPlanInRegionResponse(data, context);
224
+ const response = {
225
+ $metadata: deserializeMetadata(output),
226
+ ...contents,
227
+ };
228
+ return response;
229
+ };
230
+ export const de_ListPlanExecutionEventsCommand = async (output, context) => {
231
+ if (output.statusCode >= 300) {
232
+ return de_CommandError(output, context);
233
+ }
234
+ const data = await parseBody(output.body, context);
235
+ let contents = {};
236
+ contents = de_ListPlanExecutionEventsResponse(data, context);
237
+ const response = {
238
+ $metadata: deserializeMetadata(output),
239
+ ...contents,
240
+ };
241
+ return response;
242
+ };
243
+ export const de_ListPlanExecutionsCommand = async (output, context) => {
244
+ if (output.statusCode >= 300) {
245
+ return de_CommandError(output, context);
246
+ }
247
+ const data = await parseBody(output.body, context);
248
+ let contents = {};
249
+ contents = de_ListPlanExecutionsResponse(data, context);
250
+ const response = {
251
+ $metadata: deserializeMetadata(output),
252
+ ...contents,
253
+ };
254
+ return response;
255
+ };
256
+ export const de_ListPlansCommand = async (output, context) => {
257
+ if (output.statusCode >= 300) {
258
+ return de_CommandError(output, context);
259
+ }
260
+ const data = await parseBody(output.body, context);
261
+ let contents = {};
262
+ contents = de_ListPlansResponse(data, context);
263
+ const response = {
264
+ $metadata: deserializeMetadata(output),
265
+ ...contents,
266
+ };
267
+ return response;
268
+ };
269
+ export const de_ListPlansInRegionCommand = async (output, context) => {
270
+ if (output.statusCode >= 300) {
271
+ return de_CommandError(output, context);
272
+ }
273
+ const data = await parseBody(output.body, context);
274
+ let contents = {};
275
+ contents = de_ListPlansInRegionResponse(data, context);
276
+ const response = {
277
+ $metadata: deserializeMetadata(output),
278
+ ...contents,
279
+ };
280
+ return response;
281
+ };
282
+ export const de_ListRoute53HealthChecksCommand = async (output, context) => {
283
+ if (output.statusCode >= 300) {
284
+ return de_CommandError(output, context);
285
+ }
286
+ const data = await parseBody(output.body, context);
287
+ let contents = {};
288
+ contents = _json(data);
289
+ const response = {
290
+ $metadata: deserializeMetadata(output),
291
+ ...contents,
292
+ };
293
+ return response;
294
+ };
295
+ export const de_ListTagsForResourceCommand = async (output, context) => {
296
+ if (output.statusCode >= 300) {
297
+ return de_CommandError(output, context);
298
+ }
299
+ const data = await parseBody(output.body, context);
300
+ let contents = {};
301
+ contents = _json(data);
302
+ const response = {
303
+ $metadata: deserializeMetadata(output),
304
+ ...contents,
305
+ };
306
+ return response;
307
+ };
308
+ export const de_StartPlanExecutionCommand = async (output, context) => {
309
+ if (output.statusCode >= 300) {
310
+ return de_CommandError(output, context);
311
+ }
312
+ const data = await parseBody(output.body, context);
313
+ let contents = {};
314
+ contents = _json(data);
315
+ const response = {
316
+ $metadata: deserializeMetadata(output),
317
+ ...contents,
318
+ };
319
+ return response;
320
+ };
321
+ export const de_TagResourceCommand = async (output, context) => {
322
+ if (output.statusCode >= 300) {
323
+ return de_CommandError(output, context);
324
+ }
325
+ const data = await parseBody(output.body, context);
326
+ let contents = {};
327
+ contents = _json(data);
328
+ const response = {
329
+ $metadata: deserializeMetadata(output),
330
+ ...contents,
331
+ };
332
+ return response;
333
+ };
334
+ export const de_UntagResourceCommand = async (output, context) => {
335
+ if (output.statusCode >= 300) {
336
+ return de_CommandError(output, context);
337
+ }
338
+ const data = await parseBody(output.body, context);
339
+ let contents = {};
340
+ contents = _json(data);
341
+ const response = {
342
+ $metadata: deserializeMetadata(output),
343
+ ...contents,
344
+ };
345
+ return response;
346
+ };
347
+ export const de_UpdatePlanCommand = async (output, context) => {
348
+ if (output.statusCode >= 300) {
349
+ return de_CommandError(output, context);
350
+ }
351
+ const data = await parseBody(output.body, context);
352
+ let contents = {};
353
+ contents = de_UpdatePlanResponse(data, context);
354
+ const response = {
355
+ $metadata: deserializeMetadata(output),
356
+ ...contents,
357
+ };
358
+ return response;
359
+ };
360
+ export const de_UpdatePlanExecutionCommand = async (output, context) => {
361
+ if (output.statusCode >= 300) {
362
+ return de_CommandError(output, context);
363
+ }
364
+ const data = await parseBody(output.body, context);
365
+ let contents = {};
366
+ contents = _json(data);
367
+ const response = {
368
+ $metadata: deserializeMetadata(output),
369
+ ...contents,
370
+ };
371
+ return response;
372
+ };
373
+ export const de_UpdatePlanExecutionStepCommand = async (output, context) => {
374
+ if (output.statusCode >= 300) {
375
+ return de_CommandError(output, context);
376
+ }
377
+ const data = await parseBody(output.body, context);
378
+ let contents = {};
379
+ contents = _json(data);
380
+ const response = {
381
+ $metadata: deserializeMetadata(output),
382
+ ...contents,
383
+ };
384
+ return response;
385
+ };
386
+ const de_CommandError = async (output, context) => {
387
+ const parsedOutput = {
388
+ ...output,
389
+ body: await parseErrorBody(output.body, context),
390
+ };
391
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
392
+ switch (errorCode) {
393
+ case "AccessDeniedException":
394
+ case "com.amazonaws.arcregionswitch#AccessDeniedException":
395
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
396
+ case "ResourceNotFoundException":
397
+ case "com.amazonaws.arcregionswitch#ResourceNotFoundException":
398
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
399
+ case "IllegalStateException":
400
+ case "com.amazonaws.arcregionswitch#IllegalStateException":
401
+ throw await de_IllegalStateExceptionRes(parsedOutput, context);
402
+ case "InternalServerException":
403
+ case "com.amazonaws.arcregionswitch#InternalServerException":
404
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
405
+ case "IllegalArgumentException":
406
+ case "com.amazonaws.arcregionswitch#IllegalArgumentException":
407
+ throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
408
+ default:
409
+ const parsedBody = parsedOutput.body;
410
+ return throwDefaultError({
411
+ output,
412
+ parsedBody,
413
+ errorCode,
414
+ });
415
+ }
416
+ };
417
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
418
+ const body = parsedOutput.body;
419
+ const deserialized = _json(body);
420
+ const exception = new AccessDeniedException({
421
+ $metadata: deserializeMetadata(parsedOutput),
422
+ ...deserialized,
423
+ });
424
+ return __decorateServiceException(exception, body);
425
+ };
426
+ const de_IllegalArgumentExceptionRes = async (parsedOutput, context) => {
427
+ const body = parsedOutput.body;
428
+ const deserialized = _json(body);
429
+ const exception = new IllegalArgumentException({
430
+ $metadata: deserializeMetadata(parsedOutput),
431
+ ...deserialized,
432
+ });
433
+ return __decorateServiceException(exception, body);
434
+ };
435
+ const de_IllegalStateExceptionRes = async (parsedOutput, context) => {
436
+ const body = parsedOutput.body;
437
+ const deserialized = _json(body);
438
+ const exception = new IllegalStateException({
439
+ $metadata: deserializeMetadata(parsedOutput),
440
+ ...deserialized,
441
+ });
442
+ return __decorateServiceException(exception, body);
443
+ };
444
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
445
+ const body = parsedOutput.body;
446
+ const deserialized = _json(body);
447
+ const exception = new InternalServerException({
448
+ $metadata: deserializeMetadata(parsedOutput),
449
+ ...deserialized,
450
+ });
451
+ return __decorateServiceException(exception, body);
452
+ };
453
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
454
+ const body = parsedOutput.body;
455
+ const deserialized = _json(body);
456
+ const exception = new ResourceNotFoundException({
457
+ $metadata: deserializeMetadata(parsedOutput),
458
+ ...deserialized,
459
+ });
460
+ return __decorateServiceException(exception, body);
461
+ };
462
+ const se_CreatePlanRequest = (input, context) => {
463
+ return take(input, {
464
+ associatedAlarms: _json,
465
+ description: [],
466
+ executionRole: [],
467
+ name: [],
468
+ primaryRegion: [],
469
+ recoveryApproach: [],
470
+ recoveryTimeObjectiveMinutes: [],
471
+ regions: _json,
472
+ tags: _json,
473
+ triggers: _json,
474
+ workflows: (_) => se_WorkflowList(_, context),
475
+ });
476
+ };
477
+ const se_CustomActionLambdaConfiguration = (input, context) => {
478
+ return take(input, {
479
+ lambdas: _json,
480
+ regionToRun: [],
481
+ retryIntervalMinutes: __serializeFloat,
482
+ timeoutMinutes: [],
483
+ ungraceful: _json,
484
+ });
485
+ };
486
+ const se_ExecutionBlockConfiguration = (input, context) => {
487
+ return ExecutionBlockConfiguration.visit(input, {
488
+ arcRoutingControlConfig: (value) => ({ arcRoutingControlConfig: _json(value) }),
489
+ customActionLambdaConfig: (value) => ({
490
+ customActionLambdaConfig: se_CustomActionLambdaConfiguration(value, context),
491
+ }),
492
+ ec2AsgCapacityIncreaseConfig: (value) => ({ ec2AsgCapacityIncreaseConfig: _json(value) }),
493
+ ecsCapacityIncreaseConfig: (value) => ({ ecsCapacityIncreaseConfig: _json(value) }),
494
+ eksResourceScalingConfig: (value) => ({ eksResourceScalingConfig: _json(value) }),
495
+ executionApprovalConfig: (value) => ({ executionApprovalConfig: _json(value) }),
496
+ globalAuroraConfig: (value) => ({ globalAuroraConfig: _json(value) }),
497
+ parallelConfig: (value) => ({ parallelConfig: se_ParallelExecutionBlockConfiguration(value, context) }),
498
+ regionSwitchPlanConfig: (value) => ({ regionSwitchPlanConfig: _json(value) }),
499
+ route53HealthCheckConfig: (value) => ({ route53HealthCheckConfig: _json(value) }),
500
+ _: (name, value) => ({ [name]: value }),
501
+ });
502
+ };
503
+ const se_ParallelExecutionBlockConfiguration = (input, context) => {
504
+ return take(input, {
505
+ steps: (_) => se_Steps(_, context),
506
+ });
507
+ };
508
+ const se_Step = (input, context) => {
509
+ return take(input, {
510
+ description: [],
511
+ executionBlockConfiguration: (_) => se_ExecutionBlockConfiguration(_, context),
512
+ executionBlockType: [],
513
+ name: [],
514
+ });
515
+ };
516
+ const se_Steps = (input, context) => {
517
+ return input
518
+ .filter((e) => e != null)
519
+ .map((entry) => {
520
+ return se_Step(entry, context);
521
+ });
522
+ };
523
+ const se_UpdatePlanRequest = (input, context) => {
524
+ return take(input, {
525
+ arn: [],
526
+ associatedAlarms: _json,
527
+ description: [],
528
+ executionRole: [],
529
+ recoveryTimeObjectiveMinutes: [],
530
+ triggers: _json,
531
+ workflows: (_) => se_WorkflowList(_, context),
532
+ });
533
+ };
534
+ const se_Workflow = (input, context) => {
535
+ return take(input, {
536
+ steps: (_) => se_Steps(_, context),
537
+ workflowDescription: [],
538
+ workflowTargetAction: [],
539
+ workflowTargetRegion: [],
540
+ });
541
+ };
542
+ const se_WorkflowList = (input, context) => {
543
+ return input
544
+ .filter((e) => e != null)
545
+ .map((entry) => {
546
+ return se_Workflow(entry, context);
547
+ });
548
+ };
549
+ const de_AbbreviatedExecution = (output, context) => {
550
+ return take(output, {
551
+ actualRecoveryTime: __expectString,
552
+ comment: __expectString,
553
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
554
+ executionAction: __expectString,
555
+ executionId: __expectString,
556
+ executionRegion: __expectString,
557
+ executionState: __expectString,
558
+ mode: __expectString,
559
+ planArn: __expectString,
560
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
561
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
562
+ version: __expectString,
563
+ });
564
+ };
565
+ const de_AbbreviatedExecutionsList = (output, context) => {
566
+ const retVal = (output || [])
567
+ .filter((e) => e != null)
568
+ .map((entry) => {
569
+ return de_AbbreviatedExecution(entry, context);
570
+ });
571
+ return retVal;
572
+ };
573
+ const de_AbbreviatedPlan = (output, context) => {
574
+ return take(output, {
575
+ activePlanExecution: __expectString,
576
+ arn: __expectString,
577
+ description: __expectString,
578
+ executionRole: __expectString,
579
+ name: __expectString,
580
+ owner: __expectString,
581
+ primaryRegion: __expectString,
582
+ recoveryApproach: __expectString,
583
+ recoveryTimeObjectiveMinutes: __expectInt32,
584
+ regions: _json,
585
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
586
+ version: __expectString,
587
+ });
588
+ };
589
+ const de_CreatePlanResponse = (output, context) => {
590
+ return take(output, {
591
+ plan: (_) => de_Plan(_, context),
592
+ });
593
+ };
594
+ const de_CustomActionLambdaConfiguration = (output, context) => {
595
+ return take(output, {
596
+ lambdas: _json,
597
+ regionToRun: __expectString,
598
+ retryIntervalMinutes: __limitedParseFloat32,
599
+ timeoutMinutes: __expectInt32,
600
+ ungraceful: _json,
601
+ });
602
+ };
603
+ const de_ExecutionBlockConfiguration = (output, context) => {
604
+ if (output.arcRoutingControlConfig != null) {
605
+ return {
606
+ arcRoutingControlConfig: _json(output.arcRoutingControlConfig),
607
+ };
608
+ }
609
+ if (output.customActionLambdaConfig != null) {
610
+ return {
611
+ customActionLambdaConfig: de_CustomActionLambdaConfiguration(output.customActionLambdaConfig, context),
612
+ };
613
+ }
614
+ if (output.ec2AsgCapacityIncreaseConfig != null) {
615
+ return {
616
+ ec2AsgCapacityIncreaseConfig: _json(output.ec2AsgCapacityIncreaseConfig),
617
+ };
618
+ }
619
+ if (output.ecsCapacityIncreaseConfig != null) {
620
+ return {
621
+ ecsCapacityIncreaseConfig: _json(output.ecsCapacityIncreaseConfig),
622
+ };
623
+ }
624
+ if (output.eksResourceScalingConfig != null) {
625
+ return {
626
+ eksResourceScalingConfig: _json(output.eksResourceScalingConfig),
627
+ };
628
+ }
629
+ if (output.executionApprovalConfig != null) {
630
+ return {
631
+ executionApprovalConfig: _json(output.executionApprovalConfig),
632
+ };
633
+ }
634
+ if (output.globalAuroraConfig != null) {
635
+ return {
636
+ globalAuroraConfig: _json(output.globalAuroraConfig),
637
+ };
638
+ }
639
+ if (output.parallelConfig != null) {
640
+ return {
641
+ parallelConfig: de_ParallelExecutionBlockConfiguration(output.parallelConfig, context),
642
+ };
643
+ }
644
+ if (output.regionSwitchPlanConfig != null) {
645
+ return {
646
+ regionSwitchPlanConfig: _json(output.regionSwitchPlanConfig),
647
+ };
648
+ }
649
+ if (output.route53HealthCheckConfig != null) {
650
+ return {
651
+ route53HealthCheckConfig: _json(output.route53HealthCheckConfig),
652
+ };
653
+ }
654
+ return { $unknown: Object.entries(output)[0] };
655
+ };
656
+ const de_ExecutionEvent = (output, context) => {
657
+ return take(output, {
658
+ description: __expectString,
659
+ error: __expectString,
660
+ eventId: __expectString,
661
+ executionBlockType: __expectString,
662
+ previousEventId: __expectString,
663
+ resources: _json,
664
+ stepName: __expectString,
665
+ timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
666
+ type: __expectString,
667
+ });
668
+ };
669
+ const de_ExecutionEventList = (output, context) => {
670
+ const retVal = (output || [])
671
+ .filter((e) => e != null)
672
+ .map((entry) => {
673
+ return de_ExecutionEvent(entry, context);
674
+ });
675
+ return retVal;
676
+ };
677
+ const de_GetPlanEvaluationStatusResponse = (output, context) => {
678
+ return take(output, {
679
+ evaluationState: __expectString,
680
+ lastEvaluatedVersion: __expectString,
681
+ lastEvaluationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
682
+ nextToken: __expectString,
683
+ planArn: __expectString,
684
+ region: __expectString,
685
+ warnings: (_) => de_PlanWarnings(_, context),
686
+ });
687
+ };
688
+ const de_GetPlanExecutionResponse = (output, context) => {
689
+ return take(output, {
690
+ actualRecoveryTime: __expectString,
691
+ comment: __expectString,
692
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
693
+ executionAction: __expectString,
694
+ executionId: __expectString,
695
+ executionRegion: __expectString,
696
+ executionState: __expectString,
697
+ mode: __expectString,
698
+ nextToken: __expectString,
699
+ plan: (_) => de_Plan(_, context),
700
+ planArn: __expectString,
701
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
702
+ stepStates: (_) => de_StepStates(_, context),
703
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
704
+ version: __expectString,
705
+ });
706
+ };
707
+ const de_GetPlanInRegionResponse = (output, context) => {
708
+ return take(output, {
709
+ plan: (_) => de_Plan(_, context),
710
+ });
711
+ };
712
+ const de_GetPlanResponse = (output, context) => {
713
+ return take(output, {
714
+ plan: (_) => de_Plan(_, context),
715
+ });
716
+ };
717
+ const de_ListPlanExecutionEventsResponse = (output, context) => {
718
+ return take(output, {
719
+ items: (_) => de_ExecutionEventList(_, context),
720
+ nextToken: __expectString,
721
+ });
722
+ };
723
+ const de_ListPlanExecutionsResponse = (output, context) => {
724
+ return take(output, {
725
+ items: (_) => de_AbbreviatedExecutionsList(_, context),
726
+ nextToken: __expectString,
727
+ });
728
+ };
729
+ const de_ListPlansInRegionResponse = (output, context) => {
730
+ return take(output, {
731
+ nextToken: __expectString,
732
+ plans: (_) => de_PlanList(_, context),
733
+ });
734
+ };
735
+ const de_ListPlansResponse = (output, context) => {
736
+ return take(output, {
737
+ nextToken: __expectString,
738
+ plans: (_) => de_PlanList(_, context),
739
+ });
740
+ };
741
+ const de_ParallelExecutionBlockConfiguration = (output, context) => {
742
+ return take(output, {
743
+ steps: (_) => de_Steps(_, context),
744
+ });
745
+ };
746
+ const de_Plan = (output, context) => {
747
+ return take(output, {
748
+ arn: __expectString,
749
+ associatedAlarms: _json,
750
+ description: __expectString,
751
+ executionRole: __expectString,
752
+ name: __expectString,
753
+ owner: __expectString,
754
+ primaryRegion: __expectString,
755
+ recoveryApproach: __expectString,
756
+ recoveryTimeObjectiveMinutes: __expectInt32,
757
+ regions: _json,
758
+ triggers: _json,
759
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
760
+ version: __expectString,
761
+ workflows: (_) => de_WorkflowList(_, context),
762
+ });
763
+ };
764
+ const de_PlanList = (output, context) => {
765
+ const retVal = (output || [])
766
+ .filter((e) => e != null)
767
+ .map((entry) => {
768
+ return de_AbbreviatedPlan(entry, context);
769
+ });
770
+ return retVal;
771
+ };
772
+ const de_PlanWarnings = (output, context) => {
773
+ const retVal = (output || [])
774
+ .filter((e) => e != null)
775
+ .map((entry) => {
776
+ return de_ResourceWarning(entry, context);
777
+ });
778
+ return retVal;
779
+ };
780
+ const de_ResourceWarning = (output, context) => {
781
+ return take(output, {
782
+ resourceArn: __expectString,
783
+ stepName: __expectString,
784
+ version: __expectString,
785
+ warningMessage: __expectString,
786
+ warningStatus: __expectString,
787
+ warningUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
788
+ workflow: _json,
789
+ });
790
+ };
791
+ const de_Step = (output, context) => {
792
+ return take(output, {
793
+ description: __expectString,
794
+ executionBlockConfiguration: (_) => de_ExecutionBlockConfiguration(__expectUnion(_), context),
795
+ executionBlockType: __expectString,
796
+ name: __expectString,
797
+ });
798
+ };
799
+ const de_Steps = (output, context) => {
800
+ const retVal = (output || [])
801
+ .filter((e) => e != null)
802
+ .map((entry) => {
803
+ return de_Step(entry, context);
804
+ });
805
+ return retVal;
806
+ };
807
+ const de_StepState = (output, context) => {
808
+ return take(output, {
809
+ endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
810
+ name: __expectString,
811
+ startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
812
+ status: __expectString,
813
+ stepMode: __expectString,
814
+ });
815
+ };
816
+ const de_StepStates = (output, context) => {
817
+ const retVal = (output || [])
818
+ .filter((e) => e != null)
819
+ .map((entry) => {
820
+ return de_StepState(entry, context);
821
+ });
822
+ return retVal;
823
+ };
824
+ const de_UpdatePlanResponse = (output, context) => {
825
+ return take(output, {
826
+ plan: (_) => de_Plan(_, context),
827
+ });
828
+ };
829
+ const de_Workflow = (output, context) => {
830
+ return take(output, {
831
+ steps: (_) => de_Steps(_, context),
832
+ workflowDescription: __expectString,
833
+ workflowTargetAction: __expectString,
834
+ workflowTargetRegion: __expectString,
835
+ });
836
+ };
837
+ const de_WorkflowList = (output, context) => {
838
+ const retVal = (output || [])
839
+ .filter((e) => e != null)
840
+ .map((entry) => {
841
+ return de_Workflow(entry, context);
842
+ });
843
+ return retVal;
844
+ };
845
+ const deserializeMetadata = (output) => ({
846
+ httpStatusCode: output.statusCode,
847
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
848
+ extendedRequestId: output.headers["x-amz-id-2"],
849
+ cfId: output.headers["x-amz-cf-id"],
850
+ });
851
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
852
+ const throwDefaultError = withBaseException(__BaseException);
853
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
854
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
855
+ const contents = {
856
+ protocol,
857
+ hostname,
858
+ port,
859
+ method: "POST",
860
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
861
+ headers,
862
+ };
863
+ if (resolvedHostname !== undefined) {
864
+ contents.hostname = resolvedHostname;
865
+ }
866
+ if (body !== undefined) {
867
+ contents.body = body;
868
+ }
869
+ return new __HttpRequest(contents);
870
+ };
871
+ function sharedHeaders(operation) {
872
+ return {
873
+ "content-type": "application/x-amz-json-1.0",
874
+ "x-amz-target": `ArcRegionSwitch.${operation}`,
875
+ };
876
+ }