@aws-sdk/client-b2bi 3.459.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 (203) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +431 -0
  3. package/dist-cjs/B2bi.js +65 -0
  4. package/dist-cjs/B2biClient.js +43 -0
  5. package/dist-cjs/commands/CreateCapabilityCommand.js +51 -0
  6. package/dist-cjs/commands/CreatePartnershipCommand.js +52 -0
  7. package/dist-cjs/commands/CreateProfileCommand.js +52 -0
  8. package/dist-cjs/commands/CreateTransformerCommand.js +51 -0
  9. package/dist-cjs/commands/DeleteCapabilityCommand.js +51 -0
  10. package/dist-cjs/commands/DeletePartnershipCommand.js +51 -0
  11. package/dist-cjs/commands/DeleteProfileCommand.js +51 -0
  12. package/dist-cjs/commands/DeleteTransformerCommand.js +51 -0
  13. package/dist-cjs/commands/GetCapabilityCommand.js +51 -0
  14. package/dist-cjs/commands/GetPartnershipCommand.js +52 -0
  15. package/dist-cjs/commands/GetProfileCommand.js +52 -0
  16. package/dist-cjs/commands/GetTransformerCommand.js +51 -0
  17. package/dist-cjs/commands/GetTransformerJobCommand.js +51 -0
  18. package/dist-cjs/commands/ListCapabilitiesCommand.js +51 -0
  19. package/dist-cjs/commands/ListPartnershipsCommand.js +51 -0
  20. package/dist-cjs/commands/ListProfilesCommand.js +51 -0
  21. package/dist-cjs/commands/ListTagsForResourceCommand.js +51 -0
  22. package/dist-cjs/commands/ListTransformersCommand.js +51 -0
  23. package/dist-cjs/commands/StartTransformerJobCommand.js +51 -0
  24. package/dist-cjs/commands/TagResourceCommand.js +51 -0
  25. package/dist-cjs/commands/TestMappingCommand.js +51 -0
  26. package/dist-cjs/commands/TestParsingCommand.js +51 -0
  27. package/dist-cjs/commands/UntagResourceCommand.js +51 -0
  28. package/dist-cjs/commands/UpdateCapabilityCommand.js +51 -0
  29. package/dist-cjs/commands/UpdatePartnershipCommand.js +52 -0
  30. package/dist-cjs/commands/UpdateProfileCommand.js +52 -0
  31. package/dist-cjs/commands/UpdateTransformerCommand.js +51 -0
  32. package/dist-cjs/commands/index.js +30 -0
  33. package/dist-cjs/endpoint/EndpointParameters.js +12 -0
  34. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  35. package/dist-cjs/endpoint/ruleset.js +7 -0
  36. package/dist-cjs/extensionConfiguration.js +2 -0
  37. package/dist-cjs/index.js +12 -0
  38. package/dist-cjs/models/B2biServiceException.js +12 -0
  39. package/dist-cjs/models/index.js +4 -0
  40. package/dist-cjs/models/models_0.js +227 -0
  41. package/dist-cjs/pagination/Interfaces.js +2 -0
  42. package/dist-cjs/pagination/ListCapabilitiesPaginator.js +29 -0
  43. package/dist-cjs/pagination/ListPartnershipsPaginator.js +29 -0
  44. package/dist-cjs/pagination/ListProfilesPaginator.js +29 -0
  45. package/dist-cjs/pagination/ListTransformersPaginator.js +29 -0
  46. package/dist-cjs/pagination/index.js +8 -0
  47. package/dist-cjs/protocols/Aws_json1_0.js +1822 -0
  48. package/dist-cjs/runtimeConfig.browser.js +39 -0
  49. package/dist-cjs/runtimeConfig.js +50 -0
  50. package/dist-cjs/runtimeConfig.native.js +15 -0
  51. package/dist-cjs/runtimeConfig.shared.js +24 -0
  52. package/dist-cjs/runtimeExtensions.js +22 -0
  53. package/dist-es/B2bi.js +61 -0
  54. package/dist-es/B2biClient.js +39 -0
  55. package/dist-es/commands/CreateCapabilityCommand.js +47 -0
  56. package/dist-es/commands/CreatePartnershipCommand.js +48 -0
  57. package/dist-es/commands/CreateProfileCommand.js +48 -0
  58. package/dist-es/commands/CreateTransformerCommand.js +47 -0
  59. package/dist-es/commands/DeleteCapabilityCommand.js +47 -0
  60. package/dist-es/commands/DeletePartnershipCommand.js +47 -0
  61. package/dist-es/commands/DeleteProfileCommand.js +47 -0
  62. package/dist-es/commands/DeleteTransformerCommand.js +47 -0
  63. package/dist-es/commands/GetCapabilityCommand.js +47 -0
  64. package/dist-es/commands/GetPartnershipCommand.js +48 -0
  65. package/dist-es/commands/GetProfileCommand.js +48 -0
  66. package/dist-es/commands/GetTransformerCommand.js +47 -0
  67. package/dist-es/commands/GetTransformerJobCommand.js +47 -0
  68. package/dist-es/commands/ListCapabilitiesCommand.js +47 -0
  69. package/dist-es/commands/ListPartnershipsCommand.js +47 -0
  70. package/dist-es/commands/ListProfilesCommand.js +47 -0
  71. package/dist-es/commands/ListTagsForResourceCommand.js +47 -0
  72. package/dist-es/commands/ListTransformersCommand.js +47 -0
  73. package/dist-es/commands/StartTransformerJobCommand.js +47 -0
  74. package/dist-es/commands/TagResourceCommand.js +47 -0
  75. package/dist-es/commands/TestMappingCommand.js +47 -0
  76. package/dist-es/commands/TestParsingCommand.js +47 -0
  77. package/dist-es/commands/UntagResourceCommand.js +47 -0
  78. package/dist-es/commands/UpdateCapabilityCommand.js +47 -0
  79. package/dist-es/commands/UpdatePartnershipCommand.js +48 -0
  80. package/dist-es/commands/UpdateProfileCommand.js +48 -0
  81. package/dist-es/commands/UpdateTransformerCommand.js +47 -0
  82. package/dist-es/commands/index.js +27 -0
  83. package/dist-es/endpoint/EndpointParameters.js +8 -0
  84. package/dist-es/endpoint/endpointResolver.js +8 -0
  85. package/dist-es/endpoint/ruleset.js +4 -0
  86. package/dist-es/extensionConfiguration.js +1 -0
  87. package/dist-es/index.js +7 -0
  88. package/dist-es/models/B2biServiceException.js +8 -0
  89. package/dist-es/models/index.js +1 -0
  90. package/dist-es/models/models_0.js +208 -0
  91. package/dist-es/pagination/Interfaces.js +1 -0
  92. package/dist-es/pagination/ListCapabilitiesPaginator.js +25 -0
  93. package/dist-es/pagination/ListPartnershipsPaginator.js +25 -0
  94. package/dist-es/pagination/ListProfilesPaginator.js +25 -0
  95. package/dist-es/pagination/ListTransformersPaginator.js +25 -0
  96. package/dist-es/pagination/index.js +5 -0
  97. package/dist-es/protocols/Aws_json1_0.js +1764 -0
  98. package/dist-es/runtimeConfig.browser.js +34 -0
  99. package/dist-es/runtimeConfig.js +45 -0
  100. package/dist-es/runtimeConfig.native.js +11 -0
  101. package/dist-es/runtimeConfig.shared.js +20 -0
  102. package/dist-es/runtimeExtensions.js +18 -0
  103. package/dist-types/B2bi.d.ts +209 -0
  104. package/dist-types/B2biClient.d.ts +206 -0
  105. package/dist-types/commands/CreateCapabilityCommand.d.ts +156 -0
  106. package/dist-types/commands/CreatePartnershipCommand.d.ts +117 -0
  107. package/dist-types/commands/CreateProfileCommand.d.ts +113 -0
  108. package/dist-types/commands/CreateTransformerCommand.d.ts +123 -0
  109. package/dist-types/commands/DeleteCapabilityCommand.d.ts +89 -0
  110. package/dist-types/commands/DeletePartnershipCommand.d.ts +89 -0
  111. package/dist-types/commands/DeleteProfileCommand.d.ts +89 -0
  112. package/dist-types/commands/DeleteTransformerCommand.d.ts +89 -0
  113. package/dist-types/commands/GetCapabilityCommand.d.ts +118 -0
  114. package/dist-types/commands/GetPartnershipCommand.d.ts +99 -0
  115. package/dist-types/commands/GetProfileCommand.d.ts +97 -0
  116. package/dist-types/commands/GetTransformerCommand.d.ts +102 -0
  117. package/dist-types/commands/GetTransformerJobCommand.d.ts +96 -0
  118. package/dist-types/commands/ListCapabilitiesCommand.d.ts +83 -0
  119. package/dist-types/commands/ListPartnershipsCommand.d.ts +103 -0
  120. package/dist-types/commands/ListProfilesCommand.d.ts +85 -0
  121. package/dist-types/commands/ListTagsForResourceCommand.d.ts +84 -0
  122. package/dist-types/commands/ListTransformersCommand.d.ts +92 -0
  123. package/dist-types/commands/StartTransformerJobCommand.d.ts +97 -0
  124. package/dist-types/commands/TagResourceCommand.d.ts +87 -0
  125. package/dist-types/commands/TestMappingCommand.d.ts +90 -0
  126. package/dist-types/commands/TestParsingCommand.d.ts +98 -0
  127. package/dist-types/commands/UntagResourceCommand.d.ts +80 -0
  128. package/dist-types/commands/UpdateCapabilityCommand.d.ts +151 -0
  129. package/dist-types/commands/UpdatePartnershipCommand.d.ts +109 -0
  130. package/dist-types/commands/UpdateProfileCommand.d.ts +107 -0
  131. package/dist-types/commands/UpdateTransformerCommand.d.ts +119 -0
  132. package/dist-types/commands/index.d.ts +27 -0
  133. package/dist-types/endpoint/EndpointParameters.d.ts +22 -0
  134. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  135. package/dist-types/endpoint/ruleset.d.ts +2 -0
  136. package/dist-types/extensionConfiguration.d.ts +8 -0
  137. package/dist-types/index.d.ts +25 -0
  138. package/dist-types/models/B2biServiceException.d.ts +13 -0
  139. package/dist-types/models/index.d.ts +1 -0
  140. package/dist-types/models/models_0.d.ts +1859 -0
  141. package/dist-types/pagination/Interfaces.d.ts +8 -0
  142. package/dist-types/pagination/ListCapabilitiesPaginator.d.ts +7 -0
  143. package/dist-types/pagination/ListPartnershipsPaginator.d.ts +7 -0
  144. package/dist-types/pagination/ListProfilesPaginator.d.ts +7 -0
  145. package/dist-types/pagination/ListTransformersPaginator.d.ts +7 -0
  146. package/dist-types/pagination/index.d.ts +5 -0
  147. package/dist-types/protocols/Aws_json1_0.d.ts +245 -0
  148. package/dist-types/runtimeConfig.browser.d.ts +46 -0
  149. package/dist-types/runtimeConfig.d.ts +46 -0
  150. package/dist-types/runtimeConfig.native.d.ts +45 -0
  151. package/dist-types/runtimeConfig.shared.d.ts +19 -0
  152. package/dist-types/runtimeExtensions.d.ts +17 -0
  153. package/dist-types/ts3.4/B2bi.d.ts +464 -0
  154. package/dist-types/ts3.4/B2biClient.d.ts +280 -0
  155. package/dist-types/ts3.4/commands/CreateCapabilityCommand.d.ts +38 -0
  156. package/dist-types/ts3.4/commands/CreatePartnershipCommand.d.ts +39 -0
  157. package/dist-types/ts3.4/commands/CreateProfileCommand.d.ts +38 -0
  158. package/dist-types/ts3.4/commands/CreateTransformerCommand.d.ts +39 -0
  159. package/dist-types/ts3.4/commands/DeleteCapabilityCommand.d.ts +33 -0
  160. package/dist-types/ts3.4/commands/DeletePartnershipCommand.d.ts +34 -0
  161. package/dist-types/ts3.4/commands/DeleteProfileCommand.d.ts +33 -0
  162. package/dist-types/ts3.4/commands/DeleteTransformerCommand.d.ts +34 -0
  163. package/dist-types/ts3.4/commands/GetCapabilityCommand.d.ts +38 -0
  164. package/dist-types/ts3.4/commands/GetPartnershipCommand.d.ts +38 -0
  165. package/dist-types/ts3.4/commands/GetProfileCommand.d.ts +35 -0
  166. package/dist-types/ts3.4/commands/GetTransformerCommand.d.ts +38 -0
  167. package/dist-types/ts3.4/commands/GetTransformerJobCommand.d.ts +39 -0
  168. package/dist-types/ts3.4/commands/ListCapabilitiesCommand.d.ts +38 -0
  169. package/dist-types/ts3.4/commands/ListPartnershipsCommand.d.ts +38 -0
  170. package/dist-types/ts3.4/commands/ListProfilesCommand.d.ts +35 -0
  171. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
  172. package/dist-types/ts3.4/commands/ListTransformersCommand.d.ts +38 -0
  173. package/dist-types/ts3.4/commands/StartTransformerJobCommand.d.ts +39 -0
  174. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +33 -0
  175. package/dist-types/ts3.4/commands/TestMappingCommand.d.ts +35 -0
  176. package/dist-types/ts3.4/commands/TestParsingCommand.d.ts +35 -0
  177. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +33 -0
  178. package/dist-types/ts3.4/commands/UpdateCapabilityCommand.d.ts +38 -0
  179. package/dist-types/ts3.4/commands/UpdatePartnershipCommand.d.ts +39 -0
  180. package/dist-types/ts3.4/commands/UpdateProfileCommand.d.ts +38 -0
  181. package/dist-types/ts3.4/commands/UpdateTransformerCommand.d.ts +39 -0
  182. package/dist-types/ts3.4/commands/index.d.ts +27 -0
  183. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
  184. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  185. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  186. package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
  187. package/dist-types/ts3.4/index.d.ts +10 -0
  188. package/dist-types/ts3.4/models/B2biServiceException.d.ts +8 -0
  189. package/dist-types/ts3.4/models/index.d.ts +1 -0
  190. package/dist-types/ts3.4/models/models_0.d.ts +537 -0
  191. package/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
  192. package/dist-types/ts3.4/pagination/ListCapabilitiesPaginator.d.ts +11 -0
  193. package/dist-types/ts3.4/pagination/ListPartnershipsPaginator.d.ts +11 -0
  194. package/dist-types/ts3.4/pagination/ListProfilesPaginator.d.ts +11 -0
  195. package/dist-types/ts3.4/pagination/ListTransformersPaginator.d.ts +11 -0
  196. package/dist-types/ts3.4/pagination/index.d.ts +5 -0
  197. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +329 -0
  198. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +97 -0
  199. package/dist-types/ts3.4/runtimeConfig.d.ts +97 -0
  200. package/dist-types/ts3.4/runtimeConfig.native.d.ts +88 -0
  201. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +19 -0
  202. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  203. package/package.json +104 -0
@@ -0,0 +1,1764 @@
1
+ import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
+ import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
4
+ import { v4 as generateIdempotencyToken } from "uuid";
5
+ import { B2biServiceException as __BaseException } from "../models/B2biServiceException";
6
+ import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
7
+ export const se_CreateCapabilityCommand = async (input, context) => {
8
+ const headers = sharedHeaders("CreateCapability");
9
+ let body;
10
+ body = JSON.stringify(se_CreateCapabilityRequest(input, context));
11
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
12
+ };
13
+ export const se_CreatePartnershipCommand = async (input, context) => {
14
+ const headers = sharedHeaders("CreatePartnership");
15
+ let body;
16
+ body = JSON.stringify(se_CreatePartnershipRequest(input, context));
17
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
18
+ };
19
+ export const se_CreateProfileCommand = async (input, context) => {
20
+ const headers = sharedHeaders("CreateProfile");
21
+ let body;
22
+ body = JSON.stringify(se_CreateProfileRequest(input, context));
23
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
24
+ };
25
+ export const se_CreateTransformerCommand = async (input, context) => {
26
+ const headers = sharedHeaders("CreateTransformer");
27
+ let body;
28
+ body = JSON.stringify(se_CreateTransformerRequest(input, context));
29
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
30
+ };
31
+ export const se_DeleteCapabilityCommand = async (input, context) => {
32
+ const headers = sharedHeaders("DeleteCapability");
33
+ let body;
34
+ body = JSON.stringify(_json(input));
35
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
+ };
37
+ export const se_DeletePartnershipCommand = async (input, context) => {
38
+ const headers = sharedHeaders("DeletePartnership");
39
+ let body;
40
+ body = JSON.stringify(_json(input));
41
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
+ };
43
+ export const se_DeleteProfileCommand = async (input, context) => {
44
+ const headers = sharedHeaders("DeleteProfile");
45
+ let body;
46
+ body = JSON.stringify(_json(input));
47
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
+ };
49
+ export const se_DeleteTransformerCommand = async (input, context) => {
50
+ const headers = sharedHeaders("DeleteTransformer");
51
+ let body;
52
+ body = JSON.stringify(_json(input));
53
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
54
+ };
55
+ export const se_GetCapabilityCommand = async (input, context) => {
56
+ const headers = sharedHeaders("GetCapability");
57
+ let body;
58
+ body = JSON.stringify(_json(input));
59
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
60
+ };
61
+ export const se_GetPartnershipCommand = async (input, context) => {
62
+ const headers = sharedHeaders("GetPartnership");
63
+ let body;
64
+ body = JSON.stringify(_json(input));
65
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
66
+ };
67
+ export const se_GetProfileCommand = async (input, context) => {
68
+ const headers = sharedHeaders("GetProfile");
69
+ let body;
70
+ body = JSON.stringify(_json(input));
71
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
72
+ };
73
+ export const se_GetTransformerCommand = async (input, context) => {
74
+ const headers = sharedHeaders("GetTransformer");
75
+ let body;
76
+ body = JSON.stringify(_json(input));
77
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
+ };
79
+ export const se_GetTransformerJobCommand = async (input, context) => {
80
+ const headers = sharedHeaders("GetTransformerJob");
81
+ let body;
82
+ body = JSON.stringify(_json(input));
83
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
+ };
85
+ export const se_ListCapabilitiesCommand = async (input, context) => {
86
+ const headers = sharedHeaders("ListCapabilities");
87
+ let body;
88
+ body = JSON.stringify(_json(input));
89
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
90
+ };
91
+ export const se_ListPartnershipsCommand = async (input, context) => {
92
+ const headers = sharedHeaders("ListPartnerships");
93
+ let body;
94
+ body = JSON.stringify(_json(input));
95
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
96
+ };
97
+ export const se_ListProfilesCommand = async (input, context) => {
98
+ const headers = sharedHeaders("ListProfiles");
99
+ let body;
100
+ body = JSON.stringify(_json(input));
101
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
102
+ };
103
+ export const se_ListTagsForResourceCommand = async (input, context) => {
104
+ const headers = sharedHeaders("ListTagsForResource");
105
+ let body;
106
+ body = JSON.stringify(_json(input));
107
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
108
+ };
109
+ export const se_ListTransformersCommand = async (input, context) => {
110
+ const headers = sharedHeaders("ListTransformers");
111
+ let body;
112
+ body = JSON.stringify(_json(input));
113
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
114
+ };
115
+ export const se_StartTransformerJobCommand = async (input, context) => {
116
+ const headers = sharedHeaders("StartTransformerJob");
117
+ let body;
118
+ body = JSON.stringify(se_StartTransformerJobRequest(input, context));
119
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
120
+ };
121
+ export const se_TagResourceCommand = async (input, context) => {
122
+ const headers = sharedHeaders("TagResource");
123
+ let body;
124
+ body = JSON.stringify(_json(input));
125
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
+ };
127
+ export const se_TestMappingCommand = async (input, context) => {
128
+ const headers = sharedHeaders("TestMapping");
129
+ let body;
130
+ body = JSON.stringify(_json(input));
131
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
132
+ };
133
+ export const se_TestParsingCommand = async (input, context) => {
134
+ const headers = sharedHeaders("TestParsing");
135
+ let body;
136
+ body = JSON.stringify(_json(input));
137
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
138
+ };
139
+ export const se_UntagResourceCommand = async (input, context) => {
140
+ const headers = sharedHeaders("UntagResource");
141
+ let body;
142
+ body = JSON.stringify(_json(input));
143
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
144
+ };
145
+ export const se_UpdateCapabilityCommand = async (input, context) => {
146
+ const headers = sharedHeaders("UpdateCapability");
147
+ let body;
148
+ body = JSON.stringify(_json(input));
149
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
150
+ };
151
+ export const se_UpdatePartnershipCommand = async (input, context) => {
152
+ const headers = sharedHeaders("UpdatePartnership");
153
+ let body;
154
+ body = JSON.stringify(_json(input));
155
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
156
+ };
157
+ export const se_UpdateProfileCommand = async (input, context) => {
158
+ const headers = sharedHeaders("UpdateProfile");
159
+ let body;
160
+ body = JSON.stringify(_json(input));
161
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
162
+ };
163
+ export const se_UpdateTransformerCommand = async (input, context) => {
164
+ const headers = sharedHeaders("UpdateTransformer");
165
+ let body;
166
+ body = JSON.stringify(_json(input));
167
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
+ };
169
+ export const de_CreateCapabilityCommand = async (output, context) => {
170
+ if (output.statusCode >= 300) {
171
+ return de_CreateCapabilityCommandError(output, context);
172
+ }
173
+ const data = await parseBody(output.body, context);
174
+ let contents = {};
175
+ contents = de_CreateCapabilityResponse(data, context);
176
+ const response = {
177
+ $metadata: deserializeMetadata(output),
178
+ ...contents,
179
+ };
180
+ return response;
181
+ };
182
+ const de_CreateCapabilityCommandError = async (output, context) => {
183
+ const parsedOutput = {
184
+ ...output,
185
+ body: await parseErrorBody(output.body, context),
186
+ };
187
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
188
+ switch (errorCode) {
189
+ case "AccessDeniedException":
190
+ case "com.amazonaws.b2bi#AccessDeniedException":
191
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
192
+ case "ConflictException":
193
+ case "com.amazonaws.b2bi#ConflictException":
194
+ throw await de_ConflictExceptionRes(parsedOutput, context);
195
+ case "InternalServerException":
196
+ case "com.amazonaws.b2bi#InternalServerException":
197
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
198
+ case "ResourceNotFoundException":
199
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
200
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
201
+ case "ServiceQuotaExceededException":
202
+ case "com.amazonaws.b2bi#ServiceQuotaExceededException":
203
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
204
+ case "ThrottlingException":
205
+ case "com.amazonaws.b2bi#ThrottlingException":
206
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
207
+ case "ValidationException":
208
+ case "com.amazonaws.b2bi#ValidationException":
209
+ throw await de_ValidationExceptionRes(parsedOutput, context);
210
+ default:
211
+ const parsedBody = parsedOutput.body;
212
+ return throwDefaultError({
213
+ output,
214
+ parsedBody,
215
+ errorCode,
216
+ });
217
+ }
218
+ };
219
+ export const de_CreatePartnershipCommand = async (output, context) => {
220
+ if (output.statusCode >= 300) {
221
+ return de_CreatePartnershipCommandError(output, context);
222
+ }
223
+ const data = await parseBody(output.body, context);
224
+ let contents = {};
225
+ contents = de_CreatePartnershipResponse(data, context);
226
+ const response = {
227
+ $metadata: deserializeMetadata(output),
228
+ ...contents,
229
+ };
230
+ return response;
231
+ };
232
+ const de_CreatePartnershipCommandError = async (output, context) => {
233
+ const parsedOutput = {
234
+ ...output,
235
+ body: await parseErrorBody(output.body, context),
236
+ };
237
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
238
+ switch (errorCode) {
239
+ case "AccessDeniedException":
240
+ case "com.amazonaws.b2bi#AccessDeniedException":
241
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
242
+ case "ConflictException":
243
+ case "com.amazonaws.b2bi#ConflictException":
244
+ throw await de_ConflictExceptionRes(parsedOutput, context);
245
+ case "InternalServerException":
246
+ case "com.amazonaws.b2bi#InternalServerException":
247
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
248
+ case "ResourceNotFoundException":
249
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
250
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
251
+ case "ServiceQuotaExceededException":
252
+ case "com.amazonaws.b2bi#ServiceQuotaExceededException":
253
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
254
+ case "ThrottlingException":
255
+ case "com.amazonaws.b2bi#ThrottlingException":
256
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
257
+ case "ValidationException":
258
+ case "com.amazonaws.b2bi#ValidationException":
259
+ throw await de_ValidationExceptionRes(parsedOutput, context);
260
+ default:
261
+ const parsedBody = parsedOutput.body;
262
+ return throwDefaultError({
263
+ output,
264
+ parsedBody,
265
+ errorCode,
266
+ });
267
+ }
268
+ };
269
+ export const de_CreateProfileCommand = async (output, context) => {
270
+ if (output.statusCode >= 300) {
271
+ return de_CreateProfileCommandError(output, context);
272
+ }
273
+ const data = await parseBody(output.body, context);
274
+ let contents = {};
275
+ contents = de_CreateProfileResponse(data, context);
276
+ const response = {
277
+ $metadata: deserializeMetadata(output),
278
+ ...contents,
279
+ };
280
+ return response;
281
+ };
282
+ const de_CreateProfileCommandError = async (output, context) => {
283
+ const parsedOutput = {
284
+ ...output,
285
+ body: await parseErrorBody(output.body, context),
286
+ };
287
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
288
+ switch (errorCode) {
289
+ case "AccessDeniedException":
290
+ case "com.amazonaws.b2bi#AccessDeniedException":
291
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
292
+ case "ConflictException":
293
+ case "com.amazonaws.b2bi#ConflictException":
294
+ throw await de_ConflictExceptionRes(parsedOutput, context);
295
+ case "InternalServerException":
296
+ case "com.amazonaws.b2bi#InternalServerException":
297
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
298
+ case "ResourceNotFoundException":
299
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
300
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
301
+ case "ServiceQuotaExceededException":
302
+ case "com.amazonaws.b2bi#ServiceQuotaExceededException":
303
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
304
+ case "ThrottlingException":
305
+ case "com.amazonaws.b2bi#ThrottlingException":
306
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
307
+ case "ValidationException":
308
+ case "com.amazonaws.b2bi#ValidationException":
309
+ throw await de_ValidationExceptionRes(parsedOutput, context);
310
+ default:
311
+ const parsedBody = parsedOutput.body;
312
+ return throwDefaultError({
313
+ output,
314
+ parsedBody,
315
+ errorCode,
316
+ });
317
+ }
318
+ };
319
+ export const de_CreateTransformerCommand = async (output, context) => {
320
+ if (output.statusCode >= 300) {
321
+ return de_CreateTransformerCommandError(output, context);
322
+ }
323
+ const data = await parseBody(output.body, context);
324
+ let contents = {};
325
+ contents = de_CreateTransformerResponse(data, context);
326
+ const response = {
327
+ $metadata: deserializeMetadata(output),
328
+ ...contents,
329
+ };
330
+ return response;
331
+ };
332
+ const de_CreateTransformerCommandError = async (output, context) => {
333
+ const parsedOutput = {
334
+ ...output,
335
+ body: await parseErrorBody(output.body, context),
336
+ };
337
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
338
+ switch (errorCode) {
339
+ case "AccessDeniedException":
340
+ case "com.amazonaws.b2bi#AccessDeniedException":
341
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
342
+ case "ConflictException":
343
+ case "com.amazonaws.b2bi#ConflictException":
344
+ throw await de_ConflictExceptionRes(parsedOutput, context);
345
+ case "InternalServerException":
346
+ case "com.amazonaws.b2bi#InternalServerException":
347
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
348
+ case "ResourceNotFoundException":
349
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
350
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
351
+ case "ServiceQuotaExceededException":
352
+ case "com.amazonaws.b2bi#ServiceQuotaExceededException":
353
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
354
+ case "ThrottlingException":
355
+ case "com.amazonaws.b2bi#ThrottlingException":
356
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
357
+ case "ValidationException":
358
+ case "com.amazonaws.b2bi#ValidationException":
359
+ throw await de_ValidationExceptionRes(parsedOutput, context);
360
+ default:
361
+ const parsedBody = parsedOutput.body;
362
+ return throwDefaultError({
363
+ output,
364
+ parsedBody,
365
+ errorCode,
366
+ });
367
+ }
368
+ };
369
+ export const de_DeleteCapabilityCommand = async (output, context) => {
370
+ if (output.statusCode >= 300) {
371
+ return de_DeleteCapabilityCommandError(output, context);
372
+ }
373
+ await collectBody(output.body, context);
374
+ const response = {
375
+ $metadata: deserializeMetadata(output),
376
+ };
377
+ return response;
378
+ };
379
+ const de_DeleteCapabilityCommandError = async (output, context) => {
380
+ const parsedOutput = {
381
+ ...output,
382
+ body: await parseErrorBody(output.body, context),
383
+ };
384
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
385
+ switch (errorCode) {
386
+ case "AccessDeniedException":
387
+ case "com.amazonaws.b2bi#AccessDeniedException":
388
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
389
+ case "ConflictException":
390
+ case "com.amazonaws.b2bi#ConflictException":
391
+ throw await de_ConflictExceptionRes(parsedOutput, context);
392
+ case "InternalServerException":
393
+ case "com.amazonaws.b2bi#InternalServerException":
394
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
395
+ case "ResourceNotFoundException":
396
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
397
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
398
+ case "ThrottlingException":
399
+ case "com.amazonaws.b2bi#ThrottlingException":
400
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
401
+ case "ValidationException":
402
+ case "com.amazonaws.b2bi#ValidationException":
403
+ throw await de_ValidationExceptionRes(parsedOutput, context);
404
+ default:
405
+ const parsedBody = parsedOutput.body;
406
+ return throwDefaultError({
407
+ output,
408
+ parsedBody,
409
+ errorCode,
410
+ });
411
+ }
412
+ };
413
+ export const de_DeletePartnershipCommand = async (output, context) => {
414
+ if (output.statusCode >= 300) {
415
+ return de_DeletePartnershipCommandError(output, context);
416
+ }
417
+ await collectBody(output.body, context);
418
+ const response = {
419
+ $metadata: deserializeMetadata(output),
420
+ };
421
+ return response;
422
+ };
423
+ const de_DeletePartnershipCommandError = async (output, context) => {
424
+ const parsedOutput = {
425
+ ...output,
426
+ body: await parseErrorBody(output.body, context),
427
+ };
428
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
429
+ switch (errorCode) {
430
+ case "AccessDeniedException":
431
+ case "com.amazonaws.b2bi#AccessDeniedException":
432
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
433
+ case "ConflictException":
434
+ case "com.amazonaws.b2bi#ConflictException":
435
+ throw await de_ConflictExceptionRes(parsedOutput, context);
436
+ case "InternalServerException":
437
+ case "com.amazonaws.b2bi#InternalServerException":
438
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
439
+ case "ResourceNotFoundException":
440
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
441
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
442
+ case "ThrottlingException":
443
+ case "com.amazonaws.b2bi#ThrottlingException":
444
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
445
+ case "ValidationException":
446
+ case "com.amazonaws.b2bi#ValidationException":
447
+ throw await de_ValidationExceptionRes(parsedOutput, context);
448
+ default:
449
+ const parsedBody = parsedOutput.body;
450
+ return throwDefaultError({
451
+ output,
452
+ parsedBody,
453
+ errorCode,
454
+ });
455
+ }
456
+ };
457
+ export const de_DeleteProfileCommand = async (output, context) => {
458
+ if (output.statusCode >= 300) {
459
+ return de_DeleteProfileCommandError(output, context);
460
+ }
461
+ await collectBody(output.body, context);
462
+ const response = {
463
+ $metadata: deserializeMetadata(output),
464
+ };
465
+ return response;
466
+ };
467
+ const de_DeleteProfileCommandError = async (output, context) => {
468
+ const parsedOutput = {
469
+ ...output,
470
+ body: await parseErrorBody(output.body, context),
471
+ };
472
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
473
+ switch (errorCode) {
474
+ case "AccessDeniedException":
475
+ case "com.amazonaws.b2bi#AccessDeniedException":
476
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
477
+ case "ConflictException":
478
+ case "com.amazonaws.b2bi#ConflictException":
479
+ throw await de_ConflictExceptionRes(parsedOutput, context);
480
+ case "InternalServerException":
481
+ case "com.amazonaws.b2bi#InternalServerException":
482
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
483
+ case "ResourceNotFoundException":
484
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
485
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
486
+ case "ThrottlingException":
487
+ case "com.amazonaws.b2bi#ThrottlingException":
488
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
489
+ case "ValidationException":
490
+ case "com.amazonaws.b2bi#ValidationException":
491
+ throw await de_ValidationExceptionRes(parsedOutput, context);
492
+ default:
493
+ const parsedBody = parsedOutput.body;
494
+ return throwDefaultError({
495
+ output,
496
+ parsedBody,
497
+ errorCode,
498
+ });
499
+ }
500
+ };
501
+ export const de_DeleteTransformerCommand = async (output, context) => {
502
+ if (output.statusCode >= 300) {
503
+ return de_DeleteTransformerCommandError(output, context);
504
+ }
505
+ await collectBody(output.body, context);
506
+ const response = {
507
+ $metadata: deserializeMetadata(output),
508
+ };
509
+ return response;
510
+ };
511
+ const de_DeleteTransformerCommandError = async (output, context) => {
512
+ const parsedOutput = {
513
+ ...output,
514
+ body: await parseErrorBody(output.body, context),
515
+ };
516
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
517
+ switch (errorCode) {
518
+ case "AccessDeniedException":
519
+ case "com.amazonaws.b2bi#AccessDeniedException":
520
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
521
+ case "ConflictException":
522
+ case "com.amazonaws.b2bi#ConflictException":
523
+ throw await de_ConflictExceptionRes(parsedOutput, context);
524
+ case "InternalServerException":
525
+ case "com.amazonaws.b2bi#InternalServerException":
526
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
527
+ case "ResourceNotFoundException":
528
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
529
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
530
+ case "ThrottlingException":
531
+ case "com.amazonaws.b2bi#ThrottlingException":
532
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
533
+ case "ValidationException":
534
+ case "com.amazonaws.b2bi#ValidationException":
535
+ throw await de_ValidationExceptionRes(parsedOutput, context);
536
+ default:
537
+ const parsedBody = parsedOutput.body;
538
+ return throwDefaultError({
539
+ output,
540
+ parsedBody,
541
+ errorCode,
542
+ });
543
+ }
544
+ };
545
+ export const de_GetCapabilityCommand = async (output, context) => {
546
+ if (output.statusCode >= 300) {
547
+ return de_GetCapabilityCommandError(output, context);
548
+ }
549
+ const data = await parseBody(output.body, context);
550
+ let contents = {};
551
+ contents = de_GetCapabilityResponse(data, context);
552
+ const response = {
553
+ $metadata: deserializeMetadata(output),
554
+ ...contents,
555
+ };
556
+ return response;
557
+ };
558
+ const de_GetCapabilityCommandError = async (output, context) => {
559
+ const parsedOutput = {
560
+ ...output,
561
+ body: await parseErrorBody(output.body, context),
562
+ };
563
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
564
+ switch (errorCode) {
565
+ case "AccessDeniedException":
566
+ case "com.amazonaws.b2bi#AccessDeniedException":
567
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
568
+ case "InternalServerException":
569
+ case "com.amazonaws.b2bi#InternalServerException":
570
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
571
+ case "ResourceNotFoundException":
572
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
573
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
574
+ case "ThrottlingException":
575
+ case "com.amazonaws.b2bi#ThrottlingException":
576
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
577
+ case "ValidationException":
578
+ case "com.amazonaws.b2bi#ValidationException":
579
+ throw await de_ValidationExceptionRes(parsedOutput, context);
580
+ default:
581
+ const parsedBody = parsedOutput.body;
582
+ return throwDefaultError({
583
+ output,
584
+ parsedBody,
585
+ errorCode,
586
+ });
587
+ }
588
+ };
589
+ export const de_GetPartnershipCommand = async (output, context) => {
590
+ if (output.statusCode >= 300) {
591
+ return de_GetPartnershipCommandError(output, context);
592
+ }
593
+ const data = await parseBody(output.body, context);
594
+ let contents = {};
595
+ contents = de_GetPartnershipResponse(data, context);
596
+ const response = {
597
+ $metadata: deserializeMetadata(output),
598
+ ...contents,
599
+ };
600
+ return response;
601
+ };
602
+ const de_GetPartnershipCommandError = async (output, context) => {
603
+ const parsedOutput = {
604
+ ...output,
605
+ body: await parseErrorBody(output.body, context),
606
+ };
607
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
608
+ switch (errorCode) {
609
+ case "AccessDeniedException":
610
+ case "com.amazonaws.b2bi#AccessDeniedException":
611
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
612
+ case "InternalServerException":
613
+ case "com.amazonaws.b2bi#InternalServerException":
614
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
615
+ case "ResourceNotFoundException":
616
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
617
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
618
+ case "ThrottlingException":
619
+ case "com.amazonaws.b2bi#ThrottlingException":
620
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
621
+ case "ValidationException":
622
+ case "com.amazonaws.b2bi#ValidationException":
623
+ throw await de_ValidationExceptionRes(parsedOutput, context);
624
+ default:
625
+ const parsedBody = parsedOutput.body;
626
+ return throwDefaultError({
627
+ output,
628
+ parsedBody,
629
+ errorCode,
630
+ });
631
+ }
632
+ };
633
+ export const de_GetProfileCommand = async (output, context) => {
634
+ if (output.statusCode >= 300) {
635
+ return de_GetProfileCommandError(output, context);
636
+ }
637
+ const data = await parseBody(output.body, context);
638
+ let contents = {};
639
+ contents = de_GetProfileResponse(data, context);
640
+ const response = {
641
+ $metadata: deserializeMetadata(output),
642
+ ...contents,
643
+ };
644
+ return response;
645
+ };
646
+ const de_GetProfileCommandError = async (output, context) => {
647
+ const parsedOutput = {
648
+ ...output,
649
+ body: await parseErrorBody(output.body, context),
650
+ };
651
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
652
+ switch (errorCode) {
653
+ case "AccessDeniedException":
654
+ case "com.amazonaws.b2bi#AccessDeniedException":
655
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
656
+ case "InternalServerException":
657
+ case "com.amazonaws.b2bi#InternalServerException":
658
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
659
+ case "ResourceNotFoundException":
660
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
661
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
662
+ case "ThrottlingException":
663
+ case "com.amazonaws.b2bi#ThrottlingException":
664
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
665
+ case "ValidationException":
666
+ case "com.amazonaws.b2bi#ValidationException":
667
+ throw await de_ValidationExceptionRes(parsedOutput, context);
668
+ default:
669
+ const parsedBody = parsedOutput.body;
670
+ return throwDefaultError({
671
+ output,
672
+ parsedBody,
673
+ errorCode,
674
+ });
675
+ }
676
+ };
677
+ export const de_GetTransformerCommand = async (output, context) => {
678
+ if (output.statusCode >= 300) {
679
+ return de_GetTransformerCommandError(output, context);
680
+ }
681
+ const data = await parseBody(output.body, context);
682
+ let contents = {};
683
+ contents = de_GetTransformerResponse(data, context);
684
+ const response = {
685
+ $metadata: deserializeMetadata(output),
686
+ ...contents,
687
+ };
688
+ return response;
689
+ };
690
+ const de_GetTransformerCommandError = async (output, context) => {
691
+ const parsedOutput = {
692
+ ...output,
693
+ body: await parseErrorBody(output.body, context),
694
+ };
695
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
696
+ switch (errorCode) {
697
+ case "AccessDeniedException":
698
+ case "com.amazonaws.b2bi#AccessDeniedException":
699
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
700
+ case "InternalServerException":
701
+ case "com.amazonaws.b2bi#InternalServerException":
702
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
703
+ case "ResourceNotFoundException":
704
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
705
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
706
+ case "ThrottlingException":
707
+ case "com.amazonaws.b2bi#ThrottlingException":
708
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
709
+ case "ValidationException":
710
+ case "com.amazonaws.b2bi#ValidationException":
711
+ throw await de_ValidationExceptionRes(parsedOutput, context);
712
+ default:
713
+ const parsedBody = parsedOutput.body;
714
+ return throwDefaultError({
715
+ output,
716
+ parsedBody,
717
+ errorCode,
718
+ });
719
+ }
720
+ };
721
+ export const de_GetTransformerJobCommand = async (output, context) => {
722
+ if (output.statusCode >= 300) {
723
+ return de_GetTransformerJobCommandError(output, context);
724
+ }
725
+ const data = await parseBody(output.body, context);
726
+ let contents = {};
727
+ contents = _json(data);
728
+ const response = {
729
+ $metadata: deserializeMetadata(output),
730
+ ...contents,
731
+ };
732
+ return response;
733
+ };
734
+ const de_GetTransformerJobCommandError = async (output, context) => {
735
+ const parsedOutput = {
736
+ ...output,
737
+ body: await parseErrorBody(output.body, context),
738
+ };
739
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
740
+ switch (errorCode) {
741
+ case "AccessDeniedException":
742
+ case "com.amazonaws.b2bi#AccessDeniedException":
743
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
744
+ case "InternalServerException":
745
+ case "com.amazonaws.b2bi#InternalServerException":
746
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
747
+ case "ResourceNotFoundException":
748
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
749
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
750
+ case "ThrottlingException":
751
+ case "com.amazonaws.b2bi#ThrottlingException":
752
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
753
+ case "ValidationException":
754
+ case "com.amazonaws.b2bi#ValidationException":
755
+ throw await de_ValidationExceptionRes(parsedOutput, context);
756
+ default:
757
+ const parsedBody = parsedOutput.body;
758
+ return throwDefaultError({
759
+ output,
760
+ parsedBody,
761
+ errorCode,
762
+ });
763
+ }
764
+ };
765
+ export const de_ListCapabilitiesCommand = async (output, context) => {
766
+ if (output.statusCode >= 300) {
767
+ return de_ListCapabilitiesCommandError(output, context);
768
+ }
769
+ const data = await parseBody(output.body, context);
770
+ let contents = {};
771
+ contents = de_ListCapabilitiesResponse(data, context);
772
+ const response = {
773
+ $metadata: deserializeMetadata(output),
774
+ ...contents,
775
+ };
776
+ return response;
777
+ };
778
+ const de_ListCapabilitiesCommandError = async (output, context) => {
779
+ const parsedOutput = {
780
+ ...output,
781
+ body: await parseErrorBody(output.body, context),
782
+ };
783
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
784
+ const parsedBody = parsedOutput.body;
785
+ return throwDefaultError({
786
+ output,
787
+ parsedBody,
788
+ errorCode,
789
+ });
790
+ };
791
+ export const de_ListPartnershipsCommand = async (output, context) => {
792
+ if (output.statusCode >= 300) {
793
+ return de_ListPartnershipsCommandError(output, context);
794
+ }
795
+ const data = await parseBody(output.body, context);
796
+ let contents = {};
797
+ contents = de_ListPartnershipsResponse(data, context);
798
+ const response = {
799
+ $metadata: deserializeMetadata(output),
800
+ ...contents,
801
+ };
802
+ return response;
803
+ };
804
+ const de_ListPartnershipsCommandError = async (output, context) => {
805
+ const parsedOutput = {
806
+ ...output,
807
+ body: await parseErrorBody(output.body, context),
808
+ };
809
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
810
+ switch (errorCode) {
811
+ case "AccessDeniedException":
812
+ case "com.amazonaws.b2bi#AccessDeniedException":
813
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
814
+ case "InternalServerException":
815
+ case "com.amazonaws.b2bi#InternalServerException":
816
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
817
+ case "ResourceNotFoundException":
818
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
819
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
820
+ case "ThrottlingException":
821
+ case "com.amazonaws.b2bi#ThrottlingException":
822
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
823
+ case "ValidationException":
824
+ case "com.amazonaws.b2bi#ValidationException":
825
+ throw await de_ValidationExceptionRes(parsedOutput, context);
826
+ default:
827
+ const parsedBody = parsedOutput.body;
828
+ return throwDefaultError({
829
+ output,
830
+ parsedBody,
831
+ errorCode,
832
+ });
833
+ }
834
+ };
835
+ export const de_ListProfilesCommand = async (output, context) => {
836
+ if (output.statusCode >= 300) {
837
+ return de_ListProfilesCommandError(output, context);
838
+ }
839
+ const data = await parseBody(output.body, context);
840
+ let contents = {};
841
+ contents = de_ListProfilesResponse(data, context);
842
+ const response = {
843
+ $metadata: deserializeMetadata(output),
844
+ ...contents,
845
+ };
846
+ return response;
847
+ };
848
+ const de_ListProfilesCommandError = async (output, context) => {
849
+ const parsedOutput = {
850
+ ...output,
851
+ body: await parseErrorBody(output.body, context),
852
+ };
853
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
854
+ const parsedBody = parsedOutput.body;
855
+ return throwDefaultError({
856
+ output,
857
+ parsedBody,
858
+ errorCode,
859
+ });
860
+ };
861
+ export const de_ListTagsForResourceCommand = async (output, context) => {
862
+ if (output.statusCode >= 300) {
863
+ return de_ListTagsForResourceCommandError(output, context);
864
+ }
865
+ const data = await parseBody(output.body, context);
866
+ let contents = {};
867
+ contents = _json(data);
868
+ const response = {
869
+ $metadata: deserializeMetadata(output),
870
+ ...contents,
871
+ };
872
+ return response;
873
+ };
874
+ const de_ListTagsForResourceCommandError = async (output, context) => {
875
+ const parsedOutput = {
876
+ ...output,
877
+ body: await parseErrorBody(output.body, context),
878
+ };
879
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
880
+ switch (errorCode) {
881
+ case "ResourceNotFoundException":
882
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
883
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
884
+ case "ValidationException":
885
+ case "com.amazonaws.b2bi#ValidationException":
886
+ throw await de_ValidationExceptionRes(parsedOutput, context);
887
+ default:
888
+ const parsedBody = parsedOutput.body;
889
+ return throwDefaultError({
890
+ output,
891
+ parsedBody,
892
+ errorCode,
893
+ });
894
+ }
895
+ };
896
+ export const de_ListTransformersCommand = async (output, context) => {
897
+ if (output.statusCode >= 300) {
898
+ return de_ListTransformersCommandError(output, context);
899
+ }
900
+ const data = await parseBody(output.body, context);
901
+ let contents = {};
902
+ contents = de_ListTransformersResponse(data, context);
903
+ const response = {
904
+ $metadata: deserializeMetadata(output),
905
+ ...contents,
906
+ };
907
+ return response;
908
+ };
909
+ const de_ListTransformersCommandError = async (output, context) => {
910
+ const parsedOutput = {
911
+ ...output,
912
+ body: await parseErrorBody(output.body, context),
913
+ };
914
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
915
+ const parsedBody = parsedOutput.body;
916
+ return throwDefaultError({
917
+ output,
918
+ parsedBody,
919
+ errorCode,
920
+ });
921
+ };
922
+ export const de_StartTransformerJobCommand = async (output, context) => {
923
+ if (output.statusCode >= 300) {
924
+ return de_StartTransformerJobCommandError(output, context);
925
+ }
926
+ const data = await parseBody(output.body, context);
927
+ let contents = {};
928
+ contents = _json(data);
929
+ const response = {
930
+ $metadata: deserializeMetadata(output),
931
+ ...contents,
932
+ };
933
+ return response;
934
+ };
935
+ const de_StartTransformerJobCommandError = async (output, context) => {
936
+ const parsedOutput = {
937
+ ...output,
938
+ body: await parseErrorBody(output.body, context),
939
+ };
940
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
941
+ switch (errorCode) {
942
+ case "AccessDeniedException":
943
+ case "com.amazonaws.b2bi#AccessDeniedException":
944
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
945
+ case "InternalServerException":
946
+ case "com.amazonaws.b2bi#InternalServerException":
947
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
948
+ case "ResourceNotFoundException":
949
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
950
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
951
+ case "ThrottlingException":
952
+ case "com.amazonaws.b2bi#ThrottlingException":
953
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
954
+ case "ValidationException":
955
+ case "com.amazonaws.b2bi#ValidationException":
956
+ throw await de_ValidationExceptionRes(parsedOutput, context);
957
+ default:
958
+ const parsedBody = parsedOutput.body;
959
+ return throwDefaultError({
960
+ output,
961
+ parsedBody,
962
+ errorCode,
963
+ });
964
+ }
965
+ };
966
+ export const de_TagResourceCommand = async (output, context) => {
967
+ if (output.statusCode >= 300) {
968
+ return de_TagResourceCommandError(output, context);
969
+ }
970
+ await collectBody(output.body, context);
971
+ const response = {
972
+ $metadata: deserializeMetadata(output),
973
+ };
974
+ return response;
975
+ };
976
+ const de_TagResourceCommandError = async (output, context) => {
977
+ const parsedOutput = {
978
+ ...output,
979
+ body: await parseErrorBody(output.body, context),
980
+ };
981
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
982
+ switch (errorCode) {
983
+ case "ResourceNotFoundException":
984
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
985
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
986
+ case "ThrottlingException":
987
+ case "com.amazonaws.b2bi#ThrottlingException":
988
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
989
+ case "ValidationException":
990
+ case "com.amazonaws.b2bi#ValidationException":
991
+ throw await de_ValidationExceptionRes(parsedOutput, context);
992
+ default:
993
+ const parsedBody = parsedOutput.body;
994
+ return throwDefaultError({
995
+ output,
996
+ parsedBody,
997
+ errorCode,
998
+ });
999
+ }
1000
+ };
1001
+ export const de_TestMappingCommand = async (output, context) => {
1002
+ if (output.statusCode >= 300) {
1003
+ return de_TestMappingCommandError(output, context);
1004
+ }
1005
+ const data = await parseBody(output.body, context);
1006
+ let contents = {};
1007
+ contents = _json(data);
1008
+ const response = {
1009
+ $metadata: deserializeMetadata(output),
1010
+ ...contents,
1011
+ };
1012
+ return response;
1013
+ };
1014
+ const de_TestMappingCommandError = async (output, context) => {
1015
+ const parsedOutput = {
1016
+ ...output,
1017
+ body: await parseErrorBody(output.body, context),
1018
+ };
1019
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1020
+ switch (errorCode) {
1021
+ case "AccessDeniedException":
1022
+ case "com.amazonaws.b2bi#AccessDeniedException":
1023
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1024
+ case "InternalServerException":
1025
+ case "com.amazonaws.b2bi#InternalServerException":
1026
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1027
+ case "ResourceNotFoundException":
1028
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
1029
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1030
+ case "ThrottlingException":
1031
+ case "com.amazonaws.b2bi#ThrottlingException":
1032
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1033
+ case "ValidationException":
1034
+ case "com.amazonaws.b2bi#ValidationException":
1035
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1036
+ default:
1037
+ const parsedBody = parsedOutput.body;
1038
+ return throwDefaultError({
1039
+ output,
1040
+ parsedBody,
1041
+ errorCode,
1042
+ });
1043
+ }
1044
+ };
1045
+ export const de_TestParsingCommand = async (output, context) => {
1046
+ if (output.statusCode >= 300) {
1047
+ return de_TestParsingCommandError(output, context);
1048
+ }
1049
+ const data = await parseBody(output.body, context);
1050
+ let contents = {};
1051
+ contents = _json(data);
1052
+ const response = {
1053
+ $metadata: deserializeMetadata(output),
1054
+ ...contents,
1055
+ };
1056
+ return response;
1057
+ };
1058
+ const de_TestParsingCommandError = async (output, context) => {
1059
+ const parsedOutput = {
1060
+ ...output,
1061
+ body: await parseErrorBody(output.body, context),
1062
+ };
1063
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1064
+ switch (errorCode) {
1065
+ case "AccessDeniedException":
1066
+ case "com.amazonaws.b2bi#AccessDeniedException":
1067
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1068
+ case "InternalServerException":
1069
+ case "com.amazonaws.b2bi#InternalServerException":
1070
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1071
+ case "ResourceNotFoundException":
1072
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
1073
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1074
+ case "ThrottlingException":
1075
+ case "com.amazonaws.b2bi#ThrottlingException":
1076
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1077
+ case "ValidationException":
1078
+ case "com.amazonaws.b2bi#ValidationException":
1079
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1080
+ default:
1081
+ const parsedBody = parsedOutput.body;
1082
+ return throwDefaultError({
1083
+ output,
1084
+ parsedBody,
1085
+ errorCode,
1086
+ });
1087
+ }
1088
+ };
1089
+ export const de_UntagResourceCommand = async (output, context) => {
1090
+ if (output.statusCode >= 300) {
1091
+ return de_UntagResourceCommandError(output, context);
1092
+ }
1093
+ await collectBody(output.body, context);
1094
+ const response = {
1095
+ $metadata: deserializeMetadata(output),
1096
+ };
1097
+ return response;
1098
+ };
1099
+ const de_UntagResourceCommandError = async (output, context) => {
1100
+ const parsedOutput = {
1101
+ ...output,
1102
+ body: await parseErrorBody(output.body, context),
1103
+ };
1104
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1105
+ switch (errorCode) {
1106
+ case "ResourceNotFoundException":
1107
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
1108
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1109
+ case "ValidationException":
1110
+ case "com.amazonaws.b2bi#ValidationException":
1111
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1112
+ default:
1113
+ const parsedBody = parsedOutput.body;
1114
+ return throwDefaultError({
1115
+ output,
1116
+ parsedBody,
1117
+ errorCode,
1118
+ });
1119
+ }
1120
+ };
1121
+ export const de_UpdateCapabilityCommand = async (output, context) => {
1122
+ if (output.statusCode >= 300) {
1123
+ return de_UpdateCapabilityCommandError(output, context);
1124
+ }
1125
+ const data = await parseBody(output.body, context);
1126
+ let contents = {};
1127
+ contents = de_UpdateCapabilityResponse(data, context);
1128
+ const response = {
1129
+ $metadata: deserializeMetadata(output),
1130
+ ...contents,
1131
+ };
1132
+ return response;
1133
+ };
1134
+ const de_UpdateCapabilityCommandError = async (output, context) => {
1135
+ const parsedOutput = {
1136
+ ...output,
1137
+ body: await parseErrorBody(output.body, context),
1138
+ };
1139
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1140
+ switch (errorCode) {
1141
+ case "AccessDeniedException":
1142
+ case "com.amazonaws.b2bi#AccessDeniedException":
1143
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1144
+ case "ConflictException":
1145
+ case "com.amazonaws.b2bi#ConflictException":
1146
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1147
+ case "InternalServerException":
1148
+ case "com.amazonaws.b2bi#InternalServerException":
1149
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1150
+ case "ResourceNotFoundException":
1151
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
1152
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1153
+ case "ServiceQuotaExceededException":
1154
+ case "com.amazonaws.b2bi#ServiceQuotaExceededException":
1155
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1156
+ case "ThrottlingException":
1157
+ case "com.amazonaws.b2bi#ThrottlingException":
1158
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1159
+ case "ValidationException":
1160
+ case "com.amazonaws.b2bi#ValidationException":
1161
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1162
+ default:
1163
+ const parsedBody = parsedOutput.body;
1164
+ return throwDefaultError({
1165
+ output,
1166
+ parsedBody,
1167
+ errorCode,
1168
+ });
1169
+ }
1170
+ };
1171
+ export const de_UpdatePartnershipCommand = async (output, context) => {
1172
+ if (output.statusCode >= 300) {
1173
+ return de_UpdatePartnershipCommandError(output, context);
1174
+ }
1175
+ const data = await parseBody(output.body, context);
1176
+ let contents = {};
1177
+ contents = de_UpdatePartnershipResponse(data, context);
1178
+ const response = {
1179
+ $metadata: deserializeMetadata(output),
1180
+ ...contents,
1181
+ };
1182
+ return response;
1183
+ };
1184
+ const de_UpdatePartnershipCommandError = async (output, context) => {
1185
+ const parsedOutput = {
1186
+ ...output,
1187
+ body: await parseErrorBody(output.body, context),
1188
+ };
1189
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1190
+ switch (errorCode) {
1191
+ case "AccessDeniedException":
1192
+ case "com.amazonaws.b2bi#AccessDeniedException":
1193
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1194
+ case "ConflictException":
1195
+ case "com.amazonaws.b2bi#ConflictException":
1196
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1197
+ case "InternalServerException":
1198
+ case "com.amazonaws.b2bi#InternalServerException":
1199
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1200
+ case "ResourceNotFoundException":
1201
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
1202
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1203
+ case "ServiceQuotaExceededException":
1204
+ case "com.amazonaws.b2bi#ServiceQuotaExceededException":
1205
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1206
+ case "ThrottlingException":
1207
+ case "com.amazonaws.b2bi#ThrottlingException":
1208
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1209
+ case "ValidationException":
1210
+ case "com.amazonaws.b2bi#ValidationException":
1211
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1212
+ default:
1213
+ const parsedBody = parsedOutput.body;
1214
+ return throwDefaultError({
1215
+ output,
1216
+ parsedBody,
1217
+ errorCode,
1218
+ });
1219
+ }
1220
+ };
1221
+ export const de_UpdateProfileCommand = async (output, context) => {
1222
+ if (output.statusCode >= 300) {
1223
+ return de_UpdateProfileCommandError(output, context);
1224
+ }
1225
+ const data = await parseBody(output.body, context);
1226
+ let contents = {};
1227
+ contents = de_UpdateProfileResponse(data, context);
1228
+ const response = {
1229
+ $metadata: deserializeMetadata(output),
1230
+ ...contents,
1231
+ };
1232
+ return response;
1233
+ };
1234
+ const de_UpdateProfileCommandError = async (output, context) => {
1235
+ const parsedOutput = {
1236
+ ...output,
1237
+ body: await parseErrorBody(output.body, context),
1238
+ };
1239
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1240
+ switch (errorCode) {
1241
+ case "AccessDeniedException":
1242
+ case "com.amazonaws.b2bi#AccessDeniedException":
1243
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1244
+ case "ConflictException":
1245
+ case "com.amazonaws.b2bi#ConflictException":
1246
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1247
+ case "InternalServerException":
1248
+ case "com.amazonaws.b2bi#InternalServerException":
1249
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1250
+ case "ResourceNotFoundException":
1251
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
1252
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1253
+ case "ServiceQuotaExceededException":
1254
+ case "com.amazonaws.b2bi#ServiceQuotaExceededException":
1255
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1256
+ case "ThrottlingException":
1257
+ case "com.amazonaws.b2bi#ThrottlingException":
1258
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1259
+ case "ValidationException":
1260
+ case "com.amazonaws.b2bi#ValidationException":
1261
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1262
+ default:
1263
+ const parsedBody = parsedOutput.body;
1264
+ return throwDefaultError({
1265
+ output,
1266
+ parsedBody,
1267
+ errorCode,
1268
+ });
1269
+ }
1270
+ };
1271
+ export const de_UpdateTransformerCommand = async (output, context) => {
1272
+ if (output.statusCode >= 300) {
1273
+ return de_UpdateTransformerCommandError(output, context);
1274
+ }
1275
+ const data = await parseBody(output.body, context);
1276
+ let contents = {};
1277
+ contents = de_UpdateTransformerResponse(data, context);
1278
+ const response = {
1279
+ $metadata: deserializeMetadata(output),
1280
+ ...contents,
1281
+ };
1282
+ return response;
1283
+ };
1284
+ const de_UpdateTransformerCommandError = async (output, context) => {
1285
+ const parsedOutput = {
1286
+ ...output,
1287
+ body: await parseErrorBody(output.body, context),
1288
+ };
1289
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1290
+ switch (errorCode) {
1291
+ case "AccessDeniedException":
1292
+ case "com.amazonaws.b2bi#AccessDeniedException":
1293
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1294
+ case "ConflictException":
1295
+ case "com.amazonaws.b2bi#ConflictException":
1296
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1297
+ case "InternalServerException":
1298
+ case "com.amazonaws.b2bi#InternalServerException":
1299
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1300
+ case "ResourceNotFoundException":
1301
+ case "com.amazonaws.b2bi#ResourceNotFoundException":
1302
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1303
+ case "ServiceQuotaExceededException":
1304
+ case "com.amazonaws.b2bi#ServiceQuotaExceededException":
1305
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1306
+ case "ThrottlingException":
1307
+ case "com.amazonaws.b2bi#ThrottlingException":
1308
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1309
+ case "ValidationException":
1310
+ case "com.amazonaws.b2bi#ValidationException":
1311
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1312
+ default:
1313
+ const parsedBody = parsedOutput.body;
1314
+ return throwDefaultError({
1315
+ output,
1316
+ parsedBody,
1317
+ errorCode,
1318
+ });
1319
+ }
1320
+ };
1321
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1322
+ const body = parsedOutput.body;
1323
+ const deserialized = _json(body);
1324
+ const exception = new AccessDeniedException({
1325
+ $metadata: deserializeMetadata(parsedOutput),
1326
+ ...deserialized,
1327
+ });
1328
+ return __decorateServiceException(exception, body);
1329
+ };
1330
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1331
+ const body = parsedOutput.body;
1332
+ const deserialized = _json(body);
1333
+ const exception = new ConflictException({
1334
+ $metadata: deserializeMetadata(parsedOutput),
1335
+ ...deserialized,
1336
+ });
1337
+ return __decorateServiceException(exception, body);
1338
+ };
1339
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1340
+ const body = parsedOutput.body;
1341
+ const deserialized = _json(body);
1342
+ const exception = new InternalServerException({
1343
+ $metadata: deserializeMetadata(parsedOutput),
1344
+ ...deserialized,
1345
+ });
1346
+ return __decorateServiceException(exception, body);
1347
+ };
1348
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1349
+ const body = parsedOutput.body;
1350
+ const deserialized = _json(body);
1351
+ const exception = new ResourceNotFoundException({
1352
+ $metadata: deserializeMetadata(parsedOutput),
1353
+ ...deserialized,
1354
+ });
1355
+ return __decorateServiceException(exception, body);
1356
+ };
1357
+ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1358
+ const body = parsedOutput.body;
1359
+ const deserialized = _json(body);
1360
+ const exception = new ServiceQuotaExceededException({
1361
+ $metadata: deserializeMetadata(parsedOutput),
1362
+ ...deserialized,
1363
+ });
1364
+ return __decorateServiceException(exception, body);
1365
+ };
1366
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1367
+ const body = parsedOutput.body;
1368
+ const deserialized = _json(body);
1369
+ const exception = new ThrottlingException({
1370
+ $metadata: deserializeMetadata(parsedOutput),
1371
+ ...deserialized,
1372
+ });
1373
+ return __decorateServiceException(exception, body);
1374
+ };
1375
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
1376
+ const body = parsedOutput.body;
1377
+ const deserialized = _json(body);
1378
+ const exception = new ValidationException({
1379
+ $metadata: deserializeMetadata(parsedOutput),
1380
+ ...deserialized,
1381
+ });
1382
+ return __decorateServiceException(exception, body);
1383
+ };
1384
+ const se_CreateCapabilityRequest = (input, context) => {
1385
+ return take(input, {
1386
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
1387
+ configuration: _json,
1388
+ instructionsDocuments: _json,
1389
+ name: [],
1390
+ tags: _json,
1391
+ type: [],
1392
+ });
1393
+ };
1394
+ const se_CreatePartnershipRequest = (input, context) => {
1395
+ return take(input, {
1396
+ capabilities: _json,
1397
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
1398
+ email: [],
1399
+ name: [],
1400
+ phone: [],
1401
+ profileId: [],
1402
+ tags: _json,
1403
+ });
1404
+ };
1405
+ const se_CreateProfileRequest = (input, context) => {
1406
+ return take(input, {
1407
+ businessName: [],
1408
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
1409
+ email: [],
1410
+ logging: [],
1411
+ name: [],
1412
+ phone: [],
1413
+ tags: _json,
1414
+ });
1415
+ };
1416
+ const se_CreateTransformerRequest = (input, context) => {
1417
+ return take(input, {
1418
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
1419
+ ediType: _json,
1420
+ fileFormat: [],
1421
+ mappingTemplate: [],
1422
+ name: [],
1423
+ sampleDocument: [],
1424
+ tags: _json,
1425
+ });
1426
+ };
1427
+ const se_StartTransformerJobRequest = (input, context) => {
1428
+ return take(input, {
1429
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
1430
+ inputFile: _json,
1431
+ outputLocation: _json,
1432
+ transformerId: [],
1433
+ });
1434
+ };
1435
+ const de_CapabilityList = (output, context) => {
1436
+ const retVal = (output || [])
1437
+ .filter((e) => e != null)
1438
+ .map((entry) => {
1439
+ return de_CapabilitySummary(entry, context);
1440
+ });
1441
+ return retVal;
1442
+ };
1443
+ const de_CapabilitySummary = (output, context) => {
1444
+ return take(output, {
1445
+ capabilityId: __expectString,
1446
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1447
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1448
+ name: __expectString,
1449
+ type: __expectString,
1450
+ });
1451
+ };
1452
+ const de_CreateCapabilityResponse = (output, context) => {
1453
+ return take(output, {
1454
+ capabilityArn: __expectString,
1455
+ capabilityId: __expectString,
1456
+ configuration: (_) => _json(__expectUnion(_)),
1457
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1458
+ instructionsDocuments: _json,
1459
+ name: __expectString,
1460
+ type: __expectString,
1461
+ });
1462
+ };
1463
+ const de_CreatePartnershipResponse = (output, context) => {
1464
+ return take(output, {
1465
+ capabilities: _json,
1466
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1467
+ email: __expectString,
1468
+ name: __expectString,
1469
+ partnershipArn: __expectString,
1470
+ partnershipId: __expectString,
1471
+ phone: __expectString,
1472
+ profileId: __expectString,
1473
+ tradingPartnerId: __expectString,
1474
+ });
1475
+ };
1476
+ const de_CreateProfileResponse = (output, context) => {
1477
+ return take(output, {
1478
+ businessName: __expectString,
1479
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1480
+ email: __expectString,
1481
+ logGroupName: __expectString,
1482
+ logging: __expectString,
1483
+ name: __expectString,
1484
+ phone: __expectString,
1485
+ profileArn: __expectString,
1486
+ profileId: __expectString,
1487
+ });
1488
+ };
1489
+ const de_CreateTransformerResponse = (output, context) => {
1490
+ return take(output, {
1491
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1492
+ ediType: (_) => _json(__expectUnion(_)),
1493
+ fileFormat: __expectString,
1494
+ mappingTemplate: __expectString,
1495
+ name: __expectString,
1496
+ sampleDocument: __expectString,
1497
+ status: __expectString,
1498
+ transformerArn: __expectString,
1499
+ transformerId: __expectString,
1500
+ });
1501
+ };
1502
+ const de_GetCapabilityResponse = (output, context) => {
1503
+ return take(output, {
1504
+ capabilityArn: __expectString,
1505
+ capabilityId: __expectString,
1506
+ configuration: (_) => _json(__expectUnion(_)),
1507
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1508
+ instructionsDocuments: _json,
1509
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1510
+ name: __expectString,
1511
+ type: __expectString,
1512
+ });
1513
+ };
1514
+ const de_GetPartnershipResponse = (output, context) => {
1515
+ return take(output, {
1516
+ capabilities: _json,
1517
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1518
+ email: __expectString,
1519
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1520
+ name: __expectString,
1521
+ partnershipArn: __expectString,
1522
+ partnershipId: __expectString,
1523
+ phone: __expectString,
1524
+ profileId: __expectString,
1525
+ tradingPartnerId: __expectString,
1526
+ });
1527
+ };
1528
+ const de_GetProfileResponse = (output, context) => {
1529
+ return take(output, {
1530
+ businessName: __expectString,
1531
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1532
+ email: __expectString,
1533
+ logGroupName: __expectString,
1534
+ logging: __expectString,
1535
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1536
+ name: __expectString,
1537
+ phone: __expectString,
1538
+ profileArn: __expectString,
1539
+ profileId: __expectString,
1540
+ });
1541
+ };
1542
+ const de_GetTransformerResponse = (output, context) => {
1543
+ return take(output, {
1544
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1545
+ ediType: (_) => _json(__expectUnion(_)),
1546
+ fileFormat: __expectString,
1547
+ mappingTemplate: __expectString,
1548
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1549
+ name: __expectString,
1550
+ sampleDocument: __expectString,
1551
+ status: __expectString,
1552
+ transformerArn: __expectString,
1553
+ transformerId: __expectString,
1554
+ });
1555
+ };
1556
+ const de_ListCapabilitiesResponse = (output, context) => {
1557
+ return take(output, {
1558
+ capabilities: (_) => de_CapabilityList(_, context),
1559
+ nextToken: __expectString,
1560
+ });
1561
+ };
1562
+ const de_ListPartnershipsResponse = (output, context) => {
1563
+ return take(output, {
1564
+ nextToken: __expectString,
1565
+ partnerships: (_) => de_PartnershipList(_, context),
1566
+ });
1567
+ };
1568
+ const de_ListProfilesResponse = (output, context) => {
1569
+ return take(output, {
1570
+ nextToken: __expectString,
1571
+ profiles: (_) => de_ProfileList(_, context),
1572
+ });
1573
+ };
1574
+ const de_ListTransformersResponse = (output, context) => {
1575
+ return take(output, {
1576
+ nextToken: __expectString,
1577
+ transformers: (_) => de_TransformerList(_, context),
1578
+ });
1579
+ };
1580
+ const de_PartnershipList = (output, context) => {
1581
+ const retVal = (output || [])
1582
+ .filter((e) => e != null)
1583
+ .map((entry) => {
1584
+ return de_PartnershipSummary(entry, context);
1585
+ });
1586
+ return retVal;
1587
+ };
1588
+ const de_PartnershipSummary = (output, context) => {
1589
+ return take(output, {
1590
+ capabilities: _json,
1591
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1592
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1593
+ name: __expectString,
1594
+ partnershipId: __expectString,
1595
+ profileId: __expectString,
1596
+ tradingPartnerId: __expectString,
1597
+ });
1598
+ };
1599
+ const de_ProfileList = (output, context) => {
1600
+ const retVal = (output || [])
1601
+ .filter((e) => e != null)
1602
+ .map((entry) => {
1603
+ return de_ProfileSummary(entry, context);
1604
+ });
1605
+ return retVal;
1606
+ };
1607
+ const de_ProfileSummary = (output, context) => {
1608
+ return take(output, {
1609
+ businessName: __expectString,
1610
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1611
+ logGroupName: __expectString,
1612
+ logging: __expectString,
1613
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1614
+ name: __expectString,
1615
+ profileId: __expectString,
1616
+ });
1617
+ };
1618
+ const de_TransformerList = (output, context) => {
1619
+ const retVal = (output || [])
1620
+ .filter((e) => e != null)
1621
+ .map((entry) => {
1622
+ return de_TransformerSummary(entry, context);
1623
+ });
1624
+ return retVal;
1625
+ };
1626
+ const de_TransformerSummary = (output, context) => {
1627
+ return take(output, {
1628
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1629
+ ediType: (_) => _json(__expectUnion(_)),
1630
+ fileFormat: __expectString,
1631
+ mappingTemplate: __expectString,
1632
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1633
+ name: __expectString,
1634
+ sampleDocument: __expectString,
1635
+ status: __expectString,
1636
+ transformerId: __expectString,
1637
+ });
1638
+ };
1639
+ const de_UpdateCapabilityResponse = (output, context) => {
1640
+ return take(output, {
1641
+ capabilityArn: __expectString,
1642
+ capabilityId: __expectString,
1643
+ configuration: (_) => _json(__expectUnion(_)),
1644
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1645
+ instructionsDocuments: _json,
1646
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1647
+ name: __expectString,
1648
+ type: __expectString,
1649
+ });
1650
+ };
1651
+ const de_UpdatePartnershipResponse = (output, context) => {
1652
+ return take(output, {
1653
+ capabilities: _json,
1654
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1655
+ email: __expectString,
1656
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1657
+ name: __expectString,
1658
+ partnershipArn: __expectString,
1659
+ partnershipId: __expectString,
1660
+ phone: __expectString,
1661
+ profileId: __expectString,
1662
+ tradingPartnerId: __expectString,
1663
+ });
1664
+ };
1665
+ const de_UpdateProfileResponse = (output, context) => {
1666
+ return take(output, {
1667
+ businessName: __expectString,
1668
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1669
+ email: __expectString,
1670
+ logGroupName: __expectString,
1671
+ logging: __expectString,
1672
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1673
+ name: __expectString,
1674
+ phone: __expectString,
1675
+ profileArn: __expectString,
1676
+ profileId: __expectString,
1677
+ });
1678
+ };
1679
+ const de_UpdateTransformerResponse = (output, context) => {
1680
+ return take(output, {
1681
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1682
+ ediType: (_) => _json(__expectUnion(_)),
1683
+ fileFormat: __expectString,
1684
+ mappingTemplate: __expectString,
1685
+ modifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1686
+ name: __expectString,
1687
+ sampleDocument: __expectString,
1688
+ status: __expectString,
1689
+ transformerArn: __expectString,
1690
+ transformerId: __expectString,
1691
+ });
1692
+ };
1693
+ const deserializeMetadata = (output) => ({
1694
+ httpStatusCode: output.statusCode,
1695
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1696
+ extendedRequestId: output.headers["x-amz-id-2"],
1697
+ cfId: output.headers["x-amz-cf-id"],
1698
+ });
1699
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1700
+ const throwDefaultError = withBaseException(__BaseException);
1701
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1702
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1703
+ const contents = {
1704
+ protocol,
1705
+ hostname,
1706
+ port,
1707
+ method: "POST",
1708
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1709
+ headers,
1710
+ };
1711
+ if (resolvedHostname !== undefined) {
1712
+ contents.hostname = resolvedHostname;
1713
+ }
1714
+ if (body !== undefined) {
1715
+ contents.body = body;
1716
+ }
1717
+ return new __HttpRequest(contents);
1718
+ };
1719
+ function sharedHeaders(operation) {
1720
+ return {
1721
+ "content-type": "application/x-amz-json-1.0",
1722
+ "x-amz-target": `B2BI.${operation}`,
1723
+ };
1724
+ }
1725
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1726
+ if (encoded.length) {
1727
+ return JSON.parse(encoded);
1728
+ }
1729
+ return {};
1730
+ });
1731
+ const parseErrorBody = async (errorBody, context) => {
1732
+ const value = await parseBody(errorBody, context);
1733
+ value.message = value.message ?? value.Message;
1734
+ return value;
1735
+ };
1736
+ const loadRestJsonErrorCode = (output, data) => {
1737
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1738
+ const sanitizeErrorCode = (rawValue) => {
1739
+ let cleanValue = rawValue;
1740
+ if (typeof cleanValue === "number") {
1741
+ cleanValue = cleanValue.toString();
1742
+ }
1743
+ if (cleanValue.indexOf(",") >= 0) {
1744
+ cleanValue = cleanValue.split(",")[0];
1745
+ }
1746
+ if (cleanValue.indexOf(":") >= 0) {
1747
+ cleanValue = cleanValue.split(":")[0];
1748
+ }
1749
+ if (cleanValue.indexOf("#") >= 0) {
1750
+ cleanValue = cleanValue.split("#")[1];
1751
+ }
1752
+ return cleanValue;
1753
+ };
1754
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
1755
+ if (headerKey !== undefined) {
1756
+ return sanitizeErrorCode(output.headers[headerKey]);
1757
+ }
1758
+ if (data.code !== undefined) {
1759
+ return sanitizeErrorCode(data.code);
1760
+ }
1761
+ if (data["__type"] !== undefined) {
1762
+ return sanitizeErrorCode(data["__type"]);
1763
+ }
1764
+ };