@aws-sdk/client-acm-pca 3.35.0 → 3.36.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 (211) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist-cjs/ACMPCA.js +0 -1
  3. package/dist-cjs/ACMPCAClient.js +0 -1
  4. package/dist-cjs/commands/CreateCertificateAuthorityAuditReportCommand.js +0 -1
  5. package/dist-cjs/commands/CreateCertificateAuthorityCommand.js +0 -1
  6. package/dist-cjs/commands/CreatePermissionCommand.js +0 -1
  7. package/dist-cjs/commands/DeleteCertificateAuthorityCommand.js +0 -1
  8. package/dist-cjs/commands/DeletePermissionCommand.js +0 -1
  9. package/dist-cjs/commands/DeletePolicyCommand.js +0 -1
  10. package/dist-cjs/commands/DescribeCertificateAuthorityAuditReportCommand.js +0 -1
  11. package/dist-cjs/commands/DescribeCertificateAuthorityCommand.js +0 -1
  12. package/dist-cjs/commands/GetCertificateAuthorityCertificateCommand.js +0 -1
  13. package/dist-cjs/commands/GetCertificateAuthorityCsrCommand.js +0 -1
  14. package/dist-cjs/commands/GetCertificateCommand.js +0 -1
  15. package/dist-cjs/commands/GetPolicyCommand.js +0 -1
  16. package/dist-cjs/commands/ImportCertificateAuthorityCertificateCommand.js +0 -1
  17. package/dist-cjs/commands/IssueCertificateCommand.js +0 -1
  18. package/dist-cjs/commands/ListCertificateAuthoritiesCommand.js +0 -1
  19. package/dist-cjs/commands/ListPermissionsCommand.js +0 -1
  20. package/dist-cjs/commands/ListTagsCommand.js +0 -1
  21. package/dist-cjs/commands/PutPolicyCommand.js +0 -1
  22. package/dist-cjs/commands/RestoreCertificateAuthorityCommand.js +0 -1
  23. package/dist-cjs/commands/RevokeCertificateCommand.js +0 -1
  24. package/dist-cjs/commands/TagCertificateAuthorityCommand.js +0 -1
  25. package/dist-cjs/commands/UntagCertificateAuthorityCommand.js +0 -1
  26. package/dist-cjs/commands/UpdateCertificateAuthorityCommand.js +0 -1
  27. package/dist-cjs/endpoints.js +0 -1
  28. package/dist-cjs/index.js +0 -1
  29. package/dist-cjs/models/index.js +0 -1
  30. package/dist-cjs/models/models_0.js +0 -1
  31. package/dist-cjs/pagination/Interfaces.js +0 -1
  32. package/dist-cjs/pagination/ListCertificateAuthoritiesPaginator.js +0 -1
  33. package/dist-cjs/pagination/ListPermissionsPaginator.js +0 -1
  34. package/dist-cjs/pagination/ListTagsPaginator.js +0 -1
  35. package/dist-cjs/protocols/Aws_json1_1.js +0 -1
  36. package/dist-cjs/runtimeConfig.browser.js +2 -3
  37. package/dist-cjs/runtimeConfig.js +3 -4
  38. package/dist-cjs/runtimeConfig.native.js +0 -1
  39. package/dist-cjs/runtimeConfig.shared.js +0 -1
  40. package/dist-cjs/waiters/waitForAuditReportCreated.js +0 -1
  41. package/dist-cjs/waiters/waitForCertificateAuthorityCSRCreated.js +0 -1
  42. package/dist-cjs/waiters/waitForCertificateIssued.js +0 -1
  43. package/dist-es/ACMPCA.js +0 -1
  44. package/dist-es/ACMPCAClient.js +0 -1
  45. package/dist-es/commands/CreateCertificateAuthorityAuditReportCommand.js +0 -1
  46. package/dist-es/commands/CreateCertificateAuthorityCommand.js +0 -1
  47. package/dist-es/commands/CreatePermissionCommand.js +0 -1
  48. package/dist-es/commands/DeleteCertificateAuthorityCommand.js +0 -1
  49. package/dist-es/commands/DeletePermissionCommand.js +0 -1
  50. package/dist-es/commands/DeletePolicyCommand.js +0 -1
  51. package/dist-es/commands/DescribeCertificateAuthorityAuditReportCommand.js +0 -1
  52. package/dist-es/commands/DescribeCertificateAuthorityCommand.js +0 -1
  53. package/dist-es/commands/GetCertificateAuthorityCertificateCommand.js +0 -1
  54. package/dist-es/commands/GetCertificateAuthorityCsrCommand.js +0 -1
  55. package/dist-es/commands/GetCertificateCommand.js +0 -1
  56. package/dist-es/commands/GetPolicyCommand.js +0 -1
  57. package/dist-es/commands/ImportCertificateAuthorityCertificateCommand.js +0 -1
  58. package/dist-es/commands/IssueCertificateCommand.js +0 -1
  59. package/dist-es/commands/ListCertificateAuthoritiesCommand.js +0 -1
  60. package/dist-es/commands/ListPermissionsCommand.js +0 -1
  61. package/dist-es/commands/ListTagsCommand.js +0 -1
  62. package/dist-es/commands/PutPolicyCommand.js +0 -1
  63. package/dist-es/commands/RestoreCertificateAuthorityCommand.js +0 -1
  64. package/dist-es/commands/RevokeCertificateCommand.js +0 -1
  65. package/dist-es/commands/TagCertificateAuthorityCommand.js +0 -1
  66. package/dist-es/commands/UntagCertificateAuthorityCommand.js +0 -1
  67. package/dist-es/commands/UpdateCertificateAuthorityCommand.js +0 -1
  68. package/dist-es/endpoints.js +0 -1
  69. package/dist-es/index.js +0 -1
  70. package/dist-es/models/index.js +0 -1
  71. package/dist-es/models/models_0.js +0 -1
  72. package/dist-es/pagination/Interfaces.js +0 -1
  73. package/dist-es/pagination/ListCertificateAuthoritiesPaginator.js +0 -1
  74. package/dist-es/pagination/ListPermissionsPaginator.js +0 -1
  75. package/dist-es/pagination/ListTagsPaginator.js +0 -1
  76. package/dist-es/protocols/Aws_json1_1.js +0 -1
  77. package/dist-es/runtimeConfig.browser.js +1 -2
  78. package/dist-es/runtimeConfig.js +2 -3
  79. package/dist-es/runtimeConfig.native.js +0 -1
  80. package/dist-es/runtimeConfig.shared.js +0 -1
  81. package/dist-es/waiters/waitForAuditReportCreated.js +0 -1
  82. package/dist-es/waiters/waitForCertificateAuthorityCSRCreated.js +0 -1
  83. package/dist-es/waiters/waitForCertificateIssued.js +0 -1
  84. package/package.json +34 -31
  85. package/dist-cjs/ACMPCA.js.map +0 -1
  86. package/dist-cjs/ACMPCAClient.js.map +0 -1
  87. package/dist-cjs/commands/CreateCertificateAuthorityAuditReportCommand.js.map +0 -1
  88. package/dist-cjs/commands/CreateCertificateAuthorityCommand.js.map +0 -1
  89. package/dist-cjs/commands/CreatePermissionCommand.js.map +0 -1
  90. package/dist-cjs/commands/DeleteCertificateAuthorityCommand.js.map +0 -1
  91. package/dist-cjs/commands/DeletePermissionCommand.js.map +0 -1
  92. package/dist-cjs/commands/DeletePolicyCommand.js.map +0 -1
  93. package/dist-cjs/commands/DescribeCertificateAuthorityAuditReportCommand.js.map +0 -1
  94. package/dist-cjs/commands/DescribeCertificateAuthorityCommand.js.map +0 -1
  95. package/dist-cjs/commands/GetCertificateAuthorityCertificateCommand.js.map +0 -1
  96. package/dist-cjs/commands/GetCertificateAuthorityCsrCommand.js.map +0 -1
  97. package/dist-cjs/commands/GetCertificateCommand.js.map +0 -1
  98. package/dist-cjs/commands/GetPolicyCommand.js.map +0 -1
  99. package/dist-cjs/commands/ImportCertificateAuthorityCertificateCommand.js.map +0 -1
  100. package/dist-cjs/commands/IssueCertificateCommand.js.map +0 -1
  101. package/dist-cjs/commands/ListCertificateAuthoritiesCommand.js.map +0 -1
  102. package/dist-cjs/commands/ListPermissionsCommand.js.map +0 -1
  103. package/dist-cjs/commands/ListTagsCommand.js.map +0 -1
  104. package/dist-cjs/commands/PutPolicyCommand.js.map +0 -1
  105. package/dist-cjs/commands/RestoreCertificateAuthorityCommand.js.map +0 -1
  106. package/dist-cjs/commands/RevokeCertificateCommand.js.map +0 -1
  107. package/dist-cjs/commands/TagCertificateAuthorityCommand.js.map +0 -1
  108. package/dist-cjs/commands/UntagCertificateAuthorityCommand.js.map +0 -1
  109. package/dist-cjs/commands/UpdateCertificateAuthorityCommand.js.map +0 -1
  110. package/dist-cjs/endpoints.js.map +0 -1
  111. package/dist-cjs/index.js.map +0 -1
  112. package/dist-cjs/models/index.js.map +0 -1
  113. package/dist-cjs/models/models_0.js.map +0 -1
  114. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  115. package/dist-cjs/pagination/ListCertificateAuthoritiesPaginator.js.map +0 -1
  116. package/dist-cjs/pagination/ListPermissionsPaginator.js.map +0 -1
  117. package/dist-cjs/pagination/ListTagsPaginator.js.map +0 -1
  118. package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
  119. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  120. package/dist-cjs/runtimeConfig.js.map +0 -1
  121. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  122. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  123. package/dist-cjs/waiters/waitForAuditReportCreated.js.map +0 -1
  124. package/dist-cjs/waiters/waitForCertificateAuthorityCSRCreated.js.map +0 -1
  125. package/dist-cjs/waiters/waitForCertificateIssued.js.map +0 -1
  126. package/dist-es/ACMPCA.js.map +0 -1
  127. package/dist-es/ACMPCAClient.js.map +0 -1
  128. package/dist-es/commands/CreateCertificateAuthorityAuditReportCommand.js.map +0 -1
  129. package/dist-es/commands/CreateCertificateAuthorityCommand.js.map +0 -1
  130. package/dist-es/commands/CreatePermissionCommand.js.map +0 -1
  131. package/dist-es/commands/DeleteCertificateAuthorityCommand.js.map +0 -1
  132. package/dist-es/commands/DeletePermissionCommand.js.map +0 -1
  133. package/dist-es/commands/DeletePolicyCommand.js.map +0 -1
  134. package/dist-es/commands/DescribeCertificateAuthorityAuditReportCommand.js.map +0 -1
  135. package/dist-es/commands/DescribeCertificateAuthorityCommand.js.map +0 -1
  136. package/dist-es/commands/GetCertificateAuthorityCertificateCommand.js.map +0 -1
  137. package/dist-es/commands/GetCertificateAuthorityCsrCommand.js.map +0 -1
  138. package/dist-es/commands/GetCertificateCommand.js.map +0 -1
  139. package/dist-es/commands/GetPolicyCommand.js.map +0 -1
  140. package/dist-es/commands/ImportCertificateAuthorityCertificateCommand.js.map +0 -1
  141. package/dist-es/commands/IssueCertificateCommand.js.map +0 -1
  142. package/dist-es/commands/ListCertificateAuthoritiesCommand.js.map +0 -1
  143. package/dist-es/commands/ListPermissionsCommand.js.map +0 -1
  144. package/dist-es/commands/ListTagsCommand.js.map +0 -1
  145. package/dist-es/commands/PutPolicyCommand.js.map +0 -1
  146. package/dist-es/commands/RestoreCertificateAuthorityCommand.js.map +0 -1
  147. package/dist-es/commands/RevokeCertificateCommand.js.map +0 -1
  148. package/dist-es/commands/TagCertificateAuthorityCommand.js.map +0 -1
  149. package/dist-es/commands/UntagCertificateAuthorityCommand.js.map +0 -1
  150. package/dist-es/commands/UpdateCertificateAuthorityCommand.js.map +0 -1
  151. package/dist-es/endpoints.js.map +0 -1
  152. package/dist-es/index.js.map +0 -1
  153. package/dist-es/models/index.js.map +0 -1
  154. package/dist-es/models/models_0.js.map +0 -1
  155. package/dist-es/pagination/Interfaces.js.map +0 -1
  156. package/dist-es/pagination/ListCertificateAuthoritiesPaginator.js.map +0 -1
  157. package/dist-es/pagination/ListPermissionsPaginator.js.map +0 -1
  158. package/dist-es/pagination/ListTagsPaginator.js.map +0 -1
  159. package/dist-es/protocols/Aws_json1_1.js.map +0 -1
  160. package/dist-es/runtimeConfig.browser.js.map +0 -1
  161. package/dist-es/runtimeConfig.js.map +0 -1
  162. package/dist-es/runtimeConfig.native.js.map +0 -1
  163. package/dist-es/runtimeConfig.shared.js.map +0 -1
  164. package/dist-es/waiters/waitForAuditReportCreated.js.map +0 -1
  165. package/dist-es/waiters/waitForCertificateAuthorityCSRCreated.js.map +0 -1
  166. package/dist-es/waiters/waitForCertificateIssued.js.map +0 -1
  167. package/jest.config.js +0 -4
  168. package/src/ACMPCA.ts +0 -1323
  169. package/src/ACMPCAClient.ts +0 -361
  170. package/src/commands/CreateCertificateAuthorityAuditReportCommand.ts +0 -122
  171. package/src/commands/CreateCertificateAuthorityCommand.ts +0 -118
  172. package/src/commands/CreatePermissionCommand.ts +0 -121
  173. package/src/commands/DeleteCertificateAuthorityCommand.ts +0 -117
  174. package/src/commands/DeletePermissionCommand.ts +0 -123
  175. package/src/commands/DeletePolicyCommand.ts +0 -129
  176. package/src/commands/DescribeCertificateAuthorityAuditReportCommand.ts +0 -113
  177. package/src/commands/DescribeCertificateAuthorityCommand.ts +0 -140
  178. package/src/commands/GetCertificateAuthorityCertificateCommand.ts +0 -109
  179. package/src/commands/GetCertificateAuthorityCsrCommand.ts +0 -102
  180. package/src/commands/GetCertificateCommand.ts +0 -102
  181. package/src/commands/GetPolicyCommand.ts +0 -122
  182. package/src/commands/ImportCertificateAuthorityCertificateCommand.ts +0 -229
  183. package/src/commands/IssueCertificateCommand.ts +0 -102
  184. package/src/commands/ListCertificateAuthoritiesCommand.ts +0 -98
  185. package/src/commands/ListPermissionsCommand.ts +0 -122
  186. package/src/commands/ListTagsCommand.ts +0 -91
  187. package/src/commands/PutPolicyCommand.ts +0 -123
  188. package/src/commands/RestoreCertificateAuthorityCommand.ts +0 -108
  189. package/src/commands/RevokeCertificateCommand.ts +0 -114
  190. package/src/commands/TagCertificateAuthorityCommand.ts +0 -102
  191. package/src/commands/UntagCertificateAuthorityCommand.ts +0 -102
  192. package/src/commands/UpdateCertificateAuthorityCommand.ts +0 -108
  193. package/src/endpoints.ts +0 -91
  194. package/src/index.ts +0 -33
  195. package/src/models/index.ts +0 -1
  196. package/src/models/models_0.ts +0 -2571
  197. package/src/pagination/Interfaces.ts +0 -8
  198. package/src/pagination/ListCertificateAuthoritiesPaginator.ts +0 -59
  199. package/src/pagination/ListPermissionsPaginator.ts +0 -59
  200. package/src/pagination/ListTagsPaginator.ts +0 -55
  201. package/src/protocols/Aws_json1_1.ts +0 -3845
  202. package/src/runtimeConfig.browser.ts +0 -41
  203. package/src/runtimeConfig.native.ts +0 -17
  204. package/src/runtimeConfig.shared.ts +0 -17
  205. package/src/runtimeConfig.ts +0 -46
  206. package/src/waiters/waitForAuditReportCreated.ts +0 -61
  207. package/src/waiters/waitForCertificateAuthorityCSRCreated.ts +0 -49
  208. package/src/waiters/waitForCertificateIssued.ts +0 -43
  209. package/tsconfig.es.json +0 -10
  210. package/tsconfig.json +0 -33
  211. package/tsconfig.types.json +0 -9
@@ -1,3845 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
2
- import {
3
- expectBoolean as __expectBoolean,
4
- expectInt32 as __expectInt32,
5
- expectNonNull as __expectNonNull,
6
- expectNumber as __expectNumber,
7
- expectString as __expectString,
8
- parseEpochTimestamp as __parseEpochTimestamp,
9
- } from "@aws-sdk/smithy-client";
10
- import {
11
- Endpoint as __Endpoint,
12
- HeaderBag as __HeaderBag,
13
- MetadataBearer as __MetadataBearer,
14
- ResponseMetadata as __ResponseMetadata,
15
- SerdeContext as __SerdeContext,
16
- SmithyException as __SmithyException,
17
- } from "@aws-sdk/types";
18
-
19
- import {
20
- CreateCertificateAuthorityAuditReportCommandInput,
21
- CreateCertificateAuthorityAuditReportCommandOutput,
22
- } from "../commands/CreateCertificateAuthorityAuditReportCommand";
23
- import {
24
- CreateCertificateAuthorityCommandInput,
25
- CreateCertificateAuthorityCommandOutput,
26
- } from "../commands/CreateCertificateAuthorityCommand";
27
- import { CreatePermissionCommandInput, CreatePermissionCommandOutput } from "../commands/CreatePermissionCommand";
28
- import {
29
- DeleteCertificateAuthorityCommandInput,
30
- DeleteCertificateAuthorityCommandOutput,
31
- } from "../commands/DeleteCertificateAuthorityCommand";
32
- import { DeletePermissionCommandInput, DeletePermissionCommandOutput } from "../commands/DeletePermissionCommand";
33
- import { DeletePolicyCommandInput, DeletePolicyCommandOutput } from "../commands/DeletePolicyCommand";
34
- import {
35
- DescribeCertificateAuthorityAuditReportCommandInput,
36
- DescribeCertificateAuthorityAuditReportCommandOutput,
37
- } from "../commands/DescribeCertificateAuthorityAuditReportCommand";
38
- import {
39
- DescribeCertificateAuthorityCommandInput,
40
- DescribeCertificateAuthorityCommandOutput,
41
- } from "../commands/DescribeCertificateAuthorityCommand";
42
- import {
43
- GetCertificateAuthorityCertificateCommandInput,
44
- GetCertificateAuthorityCertificateCommandOutput,
45
- } from "../commands/GetCertificateAuthorityCertificateCommand";
46
- import {
47
- GetCertificateAuthorityCsrCommandInput,
48
- GetCertificateAuthorityCsrCommandOutput,
49
- } from "../commands/GetCertificateAuthorityCsrCommand";
50
- import { GetCertificateCommandInput, GetCertificateCommandOutput } from "../commands/GetCertificateCommand";
51
- import { GetPolicyCommandInput, GetPolicyCommandOutput } from "../commands/GetPolicyCommand";
52
- import {
53
- ImportCertificateAuthorityCertificateCommandInput,
54
- ImportCertificateAuthorityCertificateCommandOutput,
55
- } from "../commands/ImportCertificateAuthorityCertificateCommand";
56
- import { IssueCertificateCommandInput, IssueCertificateCommandOutput } from "../commands/IssueCertificateCommand";
57
- import {
58
- ListCertificateAuthoritiesCommandInput,
59
- ListCertificateAuthoritiesCommandOutput,
60
- } from "../commands/ListCertificateAuthoritiesCommand";
61
- import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "../commands/ListPermissionsCommand";
62
- import { ListTagsCommandInput, ListTagsCommandOutput } from "../commands/ListTagsCommand";
63
- import { PutPolicyCommandInput, PutPolicyCommandOutput } from "../commands/PutPolicyCommand";
64
- import {
65
- RestoreCertificateAuthorityCommandInput,
66
- RestoreCertificateAuthorityCommandOutput,
67
- } from "../commands/RestoreCertificateAuthorityCommand";
68
- import { RevokeCertificateCommandInput, RevokeCertificateCommandOutput } from "../commands/RevokeCertificateCommand";
69
- import {
70
- TagCertificateAuthorityCommandInput,
71
- TagCertificateAuthorityCommandOutput,
72
- } from "../commands/TagCertificateAuthorityCommand";
73
- import {
74
- UntagCertificateAuthorityCommandInput,
75
- UntagCertificateAuthorityCommandOutput,
76
- } from "../commands/UntagCertificateAuthorityCommand";
77
- import {
78
- UpdateCertificateAuthorityCommandInput,
79
- UpdateCertificateAuthorityCommandOutput,
80
- } from "../commands/UpdateCertificateAuthorityCommand";
81
- import {
82
- AccessDescription,
83
- AccessMethod,
84
- ActionType,
85
- ApiPassthrough,
86
- ASN1Subject,
87
- CertificateAuthority,
88
- CertificateAuthorityConfiguration,
89
- CertificateMismatchException,
90
- ConcurrentModificationException,
91
- CreateCertificateAuthorityAuditReportRequest,
92
- CreateCertificateAuthorityAuditReportResponse,
93
- CreateCertificateAuthorityRequest,
94
- CreateCertificateAuthorityResponse,
95
- CreatePermissionRequest,
96
- CrlConfiguration,
97
- CsrExtensions,
98
- DeleteCertificateAuthorityRequest,
99
- DeletePermissionRequest,
100
- DeletePolicyRequest,
101
- DescribeCertificateAuthorityAuditReportRequest,
102
- DescribeCertificateAuthorityAuditReportResponse,
103
- DescribeCertificateAuthorityRequest,
104
- DescribeCertificateAuthorityResponse,
105
- EdiPartyName,
106
- ExtendedKeyUsage,
107
- Extensions,
108
- GeneralName,
109
- GetCertificateAuthorityCertificateRequest,
110
- GetCertificateAuthorityCertificateResponse,
111
- GetCertificateAuthorityCsrRequest,
112
- GetCertificateAuthorityCsrResponse,
113
- GetCertificateRequest,
114
- GetCertificateResponse,
115
- GetPolicyRequest,
116
- GetPolicyResponse,
117
- ImportCertificateAuthorityCertificateRequest,
118
- InvalidArgsException,
119
- InvalidArnException,
120
- InvalidNextTokenException,
121
- InvalidPolicyException,
122
- InvalidRequestException,
123
- InvalidStateException,
124
- InvalidTagException,
125
- IssueCertificateRequest,
126
- IssueCertificateResponse,
127
- KeyUsage,
128
- LimitExceededException,
129
- ListCertificateAuthoritiesRequest,
130
- ListCertificateAuthoritiesResponse,
131
- ListPermissionsRequest,
132
- ListPermissionsResponse,
133
- ListTagsRequest,
134
- ListTagsResponse,
135
- LockoutPreventedException,
136
- MalformedCertificateException,
137
- MalformedCSRException,
138
- OcspConfiguration,
139
- OtherName,
140
- Permission,
141
- PermissionAlreadyExistsException,
142
- PolicyInformation,
143
- PolicyQualifierInfo,
144
- PutPolicyRequest,
145
- Qualifier,
146
- RequestAlreadyProcessedException,
147
- RequestFailedException,
148
- RequestInProgressException,
149
- ResourceNotFoundException,
150
- RestoreCertificateAuthorityRequest,
151
- RevocationConfiguration,
152
- RevokeCertificateRequest,
153
- Tag,
154
- TagCertificateAuthorityRequest,
155
- TooManyTagsException,
156
- UntagCertificateAuthorityRequest,
157
- UpdateCertificateAuthorityRequest,
158
- Validity,
159
- } from "../models/models_0";
160
-
161
- export const serializeAws_json1_1CreateCertificateAuthorityCommand = async (
162
- input: CreateCertificateAuthorityCommandInput,
163
- context: __SerdeContext
164
- ): Promise<__HttpRequest> => {
165
- const headers: __HeaderBag = {
166
- "content-type": "application/x-amz-json-1.1",
167
- "x-amz-target": "ACMPrivateCA.CreateCertificateAuthority",
168
- };
169
- let body: any;
170
- body = JSON.stringify(serializeAws_json1_1CreateCertificateAuthorityRequest(input, context));
171
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
172
- };
173
-
174
- export const serializeAws_json1_1CreateCertificateAuthorityAuditReportCommand = async (
175
- input: CreateCertificateAuthorityAuditReportCommandInput,
176
- context: __SerdeContext
177
- ): Promise<__HttpRequest> => {
178
- const headers: __HeaderBag = {
179
- "content-type": "application/x-amz-json-1.1",
180
- "x-amz-target": "ACMPrivateCA.CreateCertificateAuthorityAuditReport",
181
- };
182
- let body: any;
183
- body = JSON.stringify(serializeAws_json1_1CreateCertificateAuthorityAuditReportRequest(input, context));
184
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
- };
186
-
187
- export const serializeAws_json1_1CreatePermissionCommand = async (
188
- input: CreatePermissionCommandInput,
189
- context: __SerdeContext
190
- ): Promise<__HttpRequest> => {
191
- const headers: __HeaderBag = {
192
- "content-type": "application/x-amz-json-1.1",
193
- "x-amz-target": "ACMPrivateCA.CreatePermission",
194
- };
195
- let body: any;
196
- body = JSON.stringify(serializeAws_json1_1CreatePermissionRequest(input, context));
197
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
198
- };
199
-
200
- export const serializeAws_json1_1DeleteCertificateAuthorityCommand = async (
201
- input: DeleteCertificateAuthorityCommandInput,
202
- context: __SerdeContext
203
- ): Promise<__HttpRequest> => {
204
- const headers: __HeaderBag = {
205
- "content-type": "application/x-amz-json-1.1",
206
- "x-amz-target": "ACMPrivateCA.DeleteCertificateAuthority",
207
- };
208
- let body: any;
209
- body = JSON.stringify(serializeAws_json1_1DeleteCertificateAuthorityRequest(input, context));
210
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
- };
212
-
213
- export const serializeAws_json1_1DeletePermissionCommand = async (
214
- input: DeletePermissionCommandInput,
215
- context: __SerdeContext
216
- ): Promise<__HttpRequest> => {
217
- const headers: __HeaderBag = {
218
- "content-type": "application/x-amz-json-1.1",
219
- "x-amz-target": "ACMPrivateCA.DeletePermission",
220
- };
221
- let body: any;
222
- body = JSON.stringify(serializeAws_json1_1DeletePermissionRequest(input, context));
223
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
224
- };
225
-
226
- export const serializeAws_json1_1DeletePolicyCommand = async (
227
- input: DeletePolicyCommandInput,
228
- context: __SerdeContext
229
- ): Promise<__HttpRequest> => {
230
- const headers: __HeaderBag = {
231
- "content-type": "application/x-amz-json-1.1",
232
- "x-amz-target": "ACMPrivateCA.DeletePolicy",
233
- };
234
- let body: any;
235
- body = JSON.stringify(serializeAws_json1_1DeletePolicyRequest(input, context));
236
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
237
- };
238
-
239
- export const serializeAws_json1_1DescribeCertificateAuthorityCommand = async (
240
- input: DescribeCertificateAuthorityCommandInput,
241
- context: __SerdeContext
242
- ): Promise<__HttpRequest> => {
243
- const headers: __HeaderBag = {
244
- "content-type": "application/x-amz-json-1.1",
245
- "x-amz-target": "ACMPrivateCA.DescribeCertificateAuthority",
246
- };
247
- let body: any;
248
- body = JSON.stringify(serializeAws_json1_1DescribeCertificateAuthorityRequest(input, context));
249
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
250
- };
251
-
252
- export const serializeAws_json1_1DescribeCertificateAuthorityAuditReportCommand = async (
253
- input: DescribeCertificateAuthorityAuditReportCommandInput,
254
- context: __SerdeContext
255
- ): Promise<__HttpRequest> => {
256
- const headers: __HeaderBag = {
257
- "content-type": "application/x-amz-json-1.1",
258
- "x-amz-target": "ACMPrivateCA.DescribeCertificateAuthorityAuditReport",
259
- };
260
- let body: any;
261
- body = JSON.stringify(serializeAws_json1_1DescribeCertificateAuthorityAuditReportRequest(input, context));
262
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
263
- };
264
-
265
- export const serializeAws_json1_1GetCertificateCommand = async (
266
- input: GetCertificateCommandInput,
267
- context: __SerdeContext
268
- ): Promise<__HttpRequest> => {
269
- const headers: __HeaderBag = {
270
- "content-type": "application/x-amz-json-1.1",
271
- "x-amz-target": "ACMPrivateCA.GetCertificate",
272
- };
273
- let body: any;
274
- body = JSON.stringify(serializeAws_json1_1GetCertificateRequest(input, context));
275
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
276
- };
277
-
278
- export const serializeAws_json1_1GetCertificateAuthorityCertificateCommand = async (
279
- input: GetCertificateAuthorityCertificateCommandInput,
280
- context: __SerdeContext
281
- ): Promise<__HttpRequest> => {
282
- const headers: __HeaderBag = {
283
- "content-type": "application/x-amz-json-1.1",
284
- "x-amz-target": "ACMPrivateCA.GetCertificateAuthorityCertificate",
285
- };
286
- let body: any;
287
- body = JSON.stringify(serializeAws_json1_1GetCertificateAuthorityCertificateRequest(input, context));
288
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
289
- };
290
-
291
- export const serializeAws_json1_1GetCertificateAuthorityCsrCommand = async (
292
- input: GetCertificateAuthorityCsrCommandInput,
293
- context: __SerdeContext
294
- ): Promise<__HttpRequest> => {
295
- const headers: __HeaderBag = {
296
- "content-type": "application/x-amz-json-1.1",
297
- "x-amz-target": "ACMPrivateCA.GetCertificateAuthorityCsr",
298
- };
299
- let body: any;
300
- body = JSON.stringify(serializeAws_json1_1GetCertificateAuthorityCsrRequest(input, context));
301
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
302
- };
303
-
304
- export const serializeAws_json1_1GetPolicyCommand = async (
305
- input: GetPolicyCommandInput,
306
- context: __SerdeContext
307
- ): Promise<__HttpRequest> => {
308
- const headers: __HeaderBag = {
309
- "content-type": "application/x-amz-json-1.1",
310
- "x-amz-target": "ACMPrivateCA.GetPolicy",
311
- };
312
- let body: any;
313
- body = JSON.stringify(serializeAws_json1_1GetPolicyRequest(input, context));
314
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
315
- };
316
-
317
- export const serializeAws_json1_1ImportCertificateAuthorityCertificateCommand = async (
318
- input: ImportCertificateAuthorityCertificateCommandInput,
319
- context: __SerdeContext
320
- ): Promise<__HttpRequest> => {
321
- const headers: __HeaderBag = {
322
- "content-type": "application/x-amz-json-1.1",
323
- "x-amz-target": "ACMPrivateCA.ImportCertificateAuthorityCertificate",
324
- };
325
- let body: any;
326
- body = JSON.stringify(serializeAws_json1_1ImportCertificateAuthorityCertificateRequest(input, context));
327
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
328
- };
329
-
330
- export const serializeAws_json1_1IssueCertificateCommand = async (
331
- input: IssueCertificateCommandInput,
332
- context: __SerdeContext
333
- ): Promise<__HttpRequest> => {
334
- const headers: __HeaderBag = {
335
- "content-type": "application/x-amz-json-1.1",
336
- "x-amz-target": "ACMPrivateCA.IssueCertificate",
337
- };
338
- let body: any;
339
- body = JSON.stringify(serializeAws_json1_1IssueCertificateRequest(input, context));
340
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
341
- };
342
-
343
- export const serializeAws_json1_1ListCertificateAuthoritiesCommand = async (
344
- input: ListCertificateAuthoritiesCommandInput,
345
- context: __SerdeContext
346
- ): Promise<__HttpRequest> => {
347
- const headers: __HeaderBag = {
348
- "content-type": "application/x-amz-json-1.1",
349
- "x-amz-target": "ACMPrivateCA.ListCertificateAuthorities",
350
- };
351
- let body: any;
352
- body = JSON.stringify(serializeAws_json1_1ListCertificateAuthoritiesRequest(input, context));
353
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
354
- };
355
-
356
- export const serializeAws_json1_1ListPermissionsCommand = async (
357
- input: ListPermissionsCommandInput,
358
- context: __SerdeContext
359
- ): Promise<__HttpRequest> => {
360
- const headers: __HeaderBag = {
361
- "content-type": "application/x-amz-json-1.1",
362
- "x-amz-target": "ACMPrivateCA.ListPermissions",
363
- };
364
- let body: any;
365
- body = JSON.stringify(serializeAws_json1_1ListPermissionsRequest(input, context));
366
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
367
- };
368
-
369
- export const serializeAws_json1_1ListTagsCommand = async (
370
- input: ListTagsCommandInput,
371
- context: __SerdeContext
372
- ): Promise<__HttpRequest> => {
373
- const headers: __HeaderBag = {
374
- "content-type": "application/x-amz-json-1.1",
375
- "x-amz-target": "ACMPrivateCA.ListTags",
376
- };
377
- let body: any;
378
- body = JSON.stringify(serializeAws_json1_1ListTagsRequest(input, context));
379
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
380
- };
381
-
382
- export const serializeAws_json1_1PutPolicyCommand = async (
383
- input: PutPolicyCommandInput,
384
- context: __SerdeContext
385
- ): Promise<__HttpRequest> => {
386
- const headers: __HeaderBag = {
387
- "content-type": "application/x-amz-json-1.1",
388
- "x-amz-target": "ACMPrivateCA.PutPolicy",
389
- };
390
- let body: any;
391
- body = JSON.stringify(serializeAws_json1_1PutPolicyRequest(input, context));
392
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
393
- };
394
-
395
- export const serializeAws_json1_1RestoreCertificateAuthorityCommand = async (
396
- input: RestoreCertificateAuthorityCommandInput,
397
- context: __SerdeContext
398
- ): Promise<__HttpRequest> => {
399
- const headers: __HeaderBag = {
400
- "content-type": "application/x-amz-json-1.1",
401
- "x-amz-target": "ACMPrivateCA.RestoreCertificateAuthority",
402
- };
403
- let body: any;
404
- body = JSON.stringify(serializeAws_json1_1RestoreCertificateAuthorityRequest(input, context));
405
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
406
- };
407
-
408
- export const serializeAws_json1_1RevokeCertificateCommand = async (
409
- input: RevokeCertificateCommandInput,
410
- context: __SerdeContext
411
- ): Promise<__HttpRequest> => {
412
- const headers: __HeaderBag = {
413
- "content-type": "application/x-amz-json-1.1",
414
- "x-amz-target": "ACMPrivateCA.RevokeCertificate",
415
- };
416
- let body: any;
417
- body = JSON.stringify(serializeAws_json1_1RevokeCertificateRequest(input, context));
418
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
419
- };
420
-
421
- export const serializeAws_json1_1TagCertificateAuthorityCommand = async (
422
- input: TagCertificateAuthorityCommandInput,
423
- context: __SerdeContext
424
- ): Promise<__HttpRequest> => {
425
- const headers: __HeaderBag = {
426
- "content-type": "application/x-amz-json-1.1",
427
- "x-amz-target": "ACMPrivateCA.TagCertificateAuthority",
428
- };
429
- let body: any;
430
- body = JSON.stringify(serializeAws_json1_1TagCertificateAuthorityRequest(input, context));
431
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
432
- };
433
-
434
- export const serializeAws_json1_1UntagCertificateAuthorityCommand = async (
435
- input: UntagCertificateAuthorityCommandInput,
436
- context: __SerdeContext
437
- ): Promise<__HttpRequest> => {
438
- const headers: __HeaderBag = {
439
- "content-type": "application/x-amz-json-1.1",
440
- "x-amz-target": "ACMPrivateCA.UntagCertificateAuthority",
441
- };
442
- let body: any;
443
- body = JSON.stringify(serializeAws_json1_1UntagCertificateAuthorityRequest(input, context));
444
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
445
- };
446
-
447
- export const serializeAws_json1_1UpdateCertificateAuthorityCommand = async (
448
- input: UpdateCertificateAuthorityCommandInput,
449
- context: __SerdeContext
450
- ): Promise<__HttpRequest> => {
451
- const headers: __HeaderBag = {
452
- "content-type": "application/x-amz-json-1.1",
453
- "x-amz-target": "ACMPrivateCA.UpdateCertificateAuthority",
454
- };
455
- let body: any;
456
- body = JSON.stringify(serializeAws_json1_1UpdateCertificateAuthorityRequest(input, context));
457
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
458
- };
459
-
460
- export const deserializeAws_json1_1CreateCertificateAuthorityCommand = async (
461
- output: __HttpResponse,
462
- context: __SerdeContext
463
- ): Promise<CreateCertificateAuthorityCommandOutput> => {
464
- if (output.statusCode >= 300) {
465
- return deserializeAws_json1_1CreateCertificateAuthorityCommandError(output, context);
466
- }
467
- const data: any = await parseBody(output.body, context);
468
- let contents: any = {};
469
- contents = deserializeAws_json1_1CreateCertificateAuthorityResponse(data, context);
470
- const response: CreateCertificateAuthorityCommandOutput = {
471
- $metadata: deserializeMetadata(output),
472
- ...contents,
473
- };
474
- return Promise.resolve(response);
475
- };
476
-
477
- const deserializeAws_json1_1CreateCertificateAuthorityCommandError = async (
478
- output: __HttpResponse,
479
- context: __SerdeContext
480
- ): Promise<CreateCertificateAuthorityCommandOutput> => {
481
- const parsedOutput: any = {
482
- ...output,
483
- body: await parseBody(output.body, context),
484
- };
485
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
486
- let errorCode = "UnknownError";
487
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
488
- switch (errorCode) {
489
- case "InvalidArgsException":
490
- case "com.amazonaws.acmpca#InvalidArgsException":
491
- response = {
492
- ...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
493
- name: errorCode,
494
- $metadata: deserializeMetadata(output),
495
- };
496
- break;
497
- case "InvalidPolicyException":
498
- case "com.amazonaws.acmpca#InvalidPolicyException":
499
- response = {
500
- ...(await deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context)),
501
- name: errorCode,
502
- $metadata: deserializeMetadata(output),
503
- };
504
- break;
505
- case "InvalidTagException":
506
- case "com.amazonaws.acmpca#InvalidTagException":
507
- response = {
508
- ...(await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)),
509
- name: errorCode,
510
- $metadata: deserializeMetadata(output),
511
- };
512
- break;
513
- case "LimitExceededException":
514
- case "com.amazonaws.acmpca#LimitExceededException":
515
- response = {
516
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
517
- name: errorCode,
518
- $metadata: deserializeMetadata(output),
519
- };
520
- break;
521
- default:
522
- const parsedBody = parsedOutput.body;
523
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
524
- response = {
525
- ...parsedBody,
526
- name: `${errorCode}`,
527
- message: parsedBody.message || parsedBody.Message || errorCode,
528
- $fault: "client",
529
- $metadata: deserializeMetadata(output),
530
- } as any;
531
- }
532
- const message = response.message || response.Message || errorCode;
533
- response.message = message;
534
- delete response.Message;
535
- return Promise.reject(Object.assign(new Error(message), response));
536
- };
537
-
538
- export const deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommand = async (
539
- output: __HttpResponse,
540
- context: __SerdeContext
541
- ): Promise<CreateCertificateAuthorityAuditReportCommandOutput> => {
542
- if (output.statusCode >= 300) {
543
- return deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommandError(output, context);
544
- }
545
- const data: any = await parseBody(output.body, context);
546
- let contents: any = {};
547
- contents = deserializeAws_json1_1CreateCertificateAuthorityAuditReportResponse(data, context);
548
- const response: CreateCertificateAuthorityAuditReportCommandOutput = {
549
- $metadata: deserializeMetadata(output),
550
- ...contents,
551
- };
552
- return Promise.resolve(response);
553
- };
554
-
555
- const deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommandError = async (
556
- output: __HttpResponse,
557
- context: __SerdeContext
558
- ): Promise<CreateCertificateAuthorityAuditReportCommandOutput> => {
559
- const parsedOutput: any = {
560
- ...output,
561
- body: await parseBody(output.body, context),
562
- };
563
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
564
- let errorCode = "UnknownError";
565
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
566
- switch (errorCode) {
567
- case "InvalidArgsException":
568
- case "com.amazonaws.acmpca#InvalidArgsException":
569
- response = {
570
- ...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
571
- name: errorCode,
572
- $metadata: deserializeMetadata(output),
573
- };
574
- break;
575
- case "InvalidArnException":
576
- case "com.amazonaws.acmpca#InvalidArnException":
577
- response = {
578
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
579
- name: errorCode,
580
- $metadata: deserializeMetadata(output),
581
- };
582
- break;
583
- case "InvalidStateException":
584
- case "com.amazonaws.acmpca#InvalidStateException":
585
- response = {
586
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
587
- name: errorCode,
588
- $metadata: deserializeMetadata(output),
589
- };
590
- break;
591
- case "RequestFailedException":
592
- case "com.amazonaws.acmpca#RequestFailedException":
593
- response = {
594
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
595
- name: errorCode,
596
- $metadata: deserializeMetadata(output),
597
- };
598
- break;
599
- case "RequestInProgressException":
600
- case "com.amazonaws.acmpca#RequestInProgressException":
601
- response = {
602
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
603
- name: errorCode,
604
- $metadata: deserializeMetadata(output),
605
- };
606
- break;
607
- case "ResourceNotFoundException":
608
- case "com.amazonaws.acmpca#ResourceNotFoundException":
609
- response = {
610
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
611
- name: errorCode,
612
- $metadata: deserializeMetadata(output),
613
- };
614
- break;
615
- default:
616
- const parsedBody = parsedOutput.body;
617
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
618
- response = {
619
- ...parsedBody,
620
- name: `${errorCode}`,
621
- message: parsedBody.message || parsedBody.Message || errorCode,
622
- $fault: "client",
623
- $metadata: deserializeMetadata(output),
624
- } as any;
625
- }
626
- const message = response.message || response.Message || errorCode;
627
- response.message = message;
628
- delete response.Message;
629
- return Promise.reject(Object.assign(new Error(message), response));
630
- };
631
-
632
- export const deserializeAws_json1_1CreatePermissionCommand = async (
633
- output: __HttpResponse,
634
- context: __SerdeContext
635
- ): Promise<CreatePermissionCommandOutput> => {
636
- if (output.statusCode >= 300) {
637
- return deserializeAws_json1_1CreatePermissionCommandError(output, context);
638
- }
639
- await collectBody(output.body, context);
640
- const response: CreatePermissionCommandOutput = {
641
- $metadata: deserializeMetadata(output),
642
- };
643
- return Promise.resolve(response);
644
- };
645
-
646
- const deserializeAws_json1_1CreatePermissionCommandError = async (
647
- output: __HttpResponse,
648
- context: __SerdeContext
649
- ): Promise<CreatePermissionCommandOutput> => {
650
- const parsedOutput: any = {
651
- ...output,
652
- body: await parseBody(output.body, context),
653
- };
654
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
655
- let errorCode = "UnknownError";
656
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
657
- switch (errorCode) {
658
- case "InvalidArnException":
659
- case "com.amazonaws.acmpca#InvalidArnException":
660
- response = {
661
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
662
- name: errorCode,
663
- $metadata: deserializeMetadata(output),
664
- };
665
- break;
666
- case "InvalidStateException":
667
- case "com.amazonaws.acmpca#InvalidStateException":
668
- response = {
669
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
670
- name: errorCode,
671
- $metadata: deserializeMetadata(output),
672
- };
673
- break;
674
- case "LimitExceededException":
675
- case "com.amazonaws.acmpca#LimitExceededException":
676
- response = {
677
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
678
- name: errorCode,
679
- $metadata: deserializeMetadata(output),
680
- };
681
- break;
682
- case "PermissionAlreadyExistsException":
683
- case "com.amazonaws.acmpca#PermissionAlreadyExistsException":
684
- response = {
685
- ...(await deserializeAws_json1_1PermissionAlreadyExistsExceptionResponse(parsedOutput, context)),
686
- name: errorCode,
687
- $metadata: deserializeMetadata(output),
688
- };
689
- break;
690
- case "RequestFailedException":
691
- case "com.amazonaws.acmpca#RequestFailedException":
692
- response = {
693
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
694
- name: errorCode,
695
- $metadata: deserializeMetadata(output),
696
- };
697
- break;
698
- case "ResourceNotFoundException":
699
- case "com.amazonaws.acmpca#ResourceNotFoundException":
700
- response = {
701
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
702
- name: errorCode,
703
- $metadata: deserializeMetadata(output),
704
- };
705
- break;
706
- default:
707
- const parsedBody = parsedOutput.body;
708
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
709
- response = {
710
- ...parsedBody,
711
- name: `${errorCode}`,
712
- message: parsedBody.message || parsedBody.Message || errorCode,
713
- $fault: "client",
714
- $metadata: deserializeMetadata(output),
715
- } as any;
716
- }
717
- const message = response.message || response.Message || errorCode;
718
- response.message = message;
719
- delete response.Message;
720
- return Promise.reject(Object.assign(new Error(message), response));
721
- };
722
-
723
- export const deserializeAws_json1_1DeleteCertificateAuthorityCommand = async (
724
- output: __HttpResponse,
725
- context: __SerdeContext
726
- ): Promise<DeleteCertificateAuthorityCommandOutput> => {
727
- if (output.statusCode >= 300) {
728
- return deserializeAws_json1_1DeleteCertificateAuthorityCommandError(output, context);
729
- }
730
- await collectBody(output.body, context);
731
- const response: DeleteCertificateAuthorityCommandOutput = {
732
- $metadata: deserializeMetadata(output),
733
- };
734
- return Promise.resolve(response);
735
- };
736
-
737
- const deserializeAws_json1_1DeleteCertificateAuthorityCommandError = async (
738
- output: __HttpResponse,
739
- context: __SerdeContext
740
- ): Promise<DeleteCertificateAuthorityCommandOutput> => {
741
- const parsedOutput: any = {
742
- ...output,
743
- body: await parseBody(output.body, context),
744
- };
745
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
746
- let errorCode = "UnknownError";
747
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
748
- switch (errorCode) {
749
- case "ConcurrentModificationException":
750
- case "com.amazonaws.acmpca#ConcurrentModificationException":
751
- response = {
752
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
753
- name: errorCode,
754
- $metadata: deserializeMetadata(output),
755
- };
756
- break;
757
- case "InvalidArnException":
758
- case "com.amazonaws.acmpca#InvalidArnException":
759
- response = {
760
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
761
- name: errorCode,
762
- $metadata: deserializeMetadata(output),
763
- };
764
- break;
765
- case "InvalidStateException":
766
- case "com.amazonaws.acmpca#InvalidStateException":
767
- response = {
768
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
769
- name: errorCode,
770
- $metadata: deserializeMetadata(output),
771
- };
772
- break;
773
- case "ResourceNotFoundException":
774
- case "com.amazonaws.acmpca#ResourceNotFoundException":
775
- response = {
776
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
777
- name: errorCode,
778
- $metadata: deserializeMetadata(output),
779
- };
780
- break;
781
- default:
782
- const parsedBody = parsedOutput.body;
783
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
784
- response = {
785
- ...parsedBody,
786
- name: `${errorCode}`,
787
- message: parsedBody.message || parsedBody.Message || errorCode,
788
- $fault: "client",
789
- $metadata: deserializeMetadata(output),
790
- } as any;
791
- }
792
- const message = response.message || response.Message || errorCode;
793
- response.message = message;
794
- delete response.Message;
795
- return Promise.reject(Object.assign(new Error(message), response));
796
- };
797
-
798
- export const deserializeAws_json1_1DeletePermissionCommand = async (
799
- output: __HttpResponse,
800
- context: __SerdeContext
801
- ): Promise<DeletePermissionCommandOutput> => {
802
- if (output.statusCode >= 300) {
803
- return deserializeAws_json1_1DeletePermissionCommandError(output, context);
804
- }
805
- await collectBody(output.body, context);
806
- const response: DeletePermissionCommandOutput = {
807
- $metadata: deserializeMetadata(output),
808
- };
809
- return Promise.resolve(response);
810
- };
811
-
812
- const deserializeAws_json1_1DeletePermissionCommandError = async (
813
- output: __HttpResponse,
814
- context: __SerdeContext
815
- ): Promise<DeletePermissionCommandOutput> => {
816
- const parsedOutput: any = {
817
- ...output,
818
- body: await parseBody(output.body, context),
819
- };
820
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
821
- let errorCode = "UnknownError";
822
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
823
- switch (errorCode) {
824
- case "InvalidArnException":
825
- case "com.amazonaws.acmpca#InvalidArnException":
826
- response = {
827
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
828
- name: errorCode,
829
- $metadata: deserializeMetadata(output),
830
- };
831
- break;
832
- case "InvalidStateException":
833
- case "com.amazonaws.acmpca#InvalidStateException":
834
- response = {
835
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
836
- name: errorCode,
837
- $metadata: deserializeMetadata(output),
838
- };
839
- break;
840
- case "RequestFailedException":
841
- case "com.amazonaws.acmpca#RequestFailedException":
842
- response = {
843
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
844
- name: errorCode,
845
- $metadata: deserializeMetadata(output),
846
- };
847
- break;
848
- case "ResourceNotFoundException":
849
- case "com.amazonaws.acmpca#ResourceNotFoundException":
850
- response = {
851
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
852
- name: errorCode,
853
- $metadata: deserializeMetadata(output),
854
- };
855
- break;
856
- default:
857
- const parsedBody = parsedOutput.body;
858
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
859
- response = {
860
- ...parsedBody,
861
- name: `${errorCode}`,
862
- message: parsedBody.message || parsedBody.Message || errorCode,
863
- $fault: "client",
864
- $metadata: deserializeMetadata(output),
865
- } as any;
866
- }
867
- const message = response.message || response.Message || errorCode;
868
- response.message = message;
869
- delete response.Message;
870
- return Promise.reject(Object.assign(new Error(message), response));
871
- };
872
-
873
- export const deserializeAws_json1_1DeletePolicyCommand = async (
874
- output: __HttpResponse,
875
- context: __SerdeContext
876
- ): Promise<DeletePolicyCommandOutput> => {
877
- if (output.statusCode >= 300) {
878
- return deserializeAws_json1_1DeletePolicyCommandError(output, context);
879
- }
880
- await collectBody(output.body, context);
881
- const response: DeletePolicyCommandOutput = {
882
- $metadata: deserializeMetadata(output),
883
- };
884
- return Promise.resolve(response);
885
- };
886
-
887
- const deserializeAws_json1_1DeletePolicyCommandError = async (
888
- output: __HttpResponse,
889
- context: __SerdeContext
890
- ): Promise<DeletePolicyCommandOutput> => {
891
- const parsedOutput: any = {
892
- ...output,
893
- body: await parseBody(output.body, context),
894
- };
895
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
896
- let errorCode = "UnknownError";
897
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
898
- switch (errorCode) {
899
- case "ConcurrentModificationException":
900
- case "com.amazonaws.acmpca#ConcurrentModificationException":
901
- response = {
902
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
903
- name: errorCode,
904
- $metadata: deserializeMetadata(output),
905
- };
906
- break;
907
- case "InvalidArnException":
908
- case "com.amazonaws.acmpca#InvalidArnException":
909
- response = {
910
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
911
- name: errorCode,
912
- $metadata: deserializeMetadata(output),
913
- };
914
- break;
915
- case "InvalidStateException":
916
- case "com.amazonaws.acmpca#InvalidStateException":
917
- response = {
918
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
919
- name: errorCode,
920
- $metadata: deserializeMetadata(output),
921
- };
922
- break;
923
- case "LockoutPreventedException":
924
- case "com.amazonaws.acmpca#LockoutPreventedException":
925
- response = {
926
- ...(await deserializeAws_json1_1LockoutPreventedExceptionResponse(parsedOutput, context)),
927
- name: errorCode,
928
- $metadata: deserializeMetadata(output),
929
- };
930
- break;
931
- case "RequestFailedException":
932
- case "com.amazonaws.acmpca#RequestFailedException":
933
- response = {
934
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
935
- name: errorCode,
936
- $metadata: deserializeMetadata(output),
937
- };
938
- break;
939
- case "ResourceNotFoundException":
940
- case "com.amazonaws.acmpca#ResourceNotFoundException":
941
- response = {
942
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
943
- name: errorCode,
944
- $metadata: deserializeMetadata(output),
945
- };
946
- break;
947
- default:
948
- const parsedBody = parsedOutput.body;
949
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
950
- response = {
951
- ...parsedBody,
952
- name: `${errorCode}`,
953
- message: parsedBody.message || parsedBody.Message || errorCode,
954
- $fault: "client",
955
- $metadata: deserializeMetadata(output),
956
- } as any;
957
- }
958
- const message = response.message || response.Message || errorCode;
959
- response.message = message;
960
- delete response.Message;
961
- return Promise.reject(Object.assign(new Error(message), response));
962
- };
963
-
964
- export const deserializeAws_json1_1DescribeCertificateAuthorityCommand = async (
965
- output: __HttpResponse,
966
- context: __SerdeContext
967
- ): Promise<DescribeCertificateAuthorityCommandOutput> => {
968
- if (output.statusCode >= 300) {
969
- return deserializeAws_json1_1DescribeCertificateAuthorityCommandError(output, context);
970
- }
971
- const data: any = await parseBody(output.body, context);
972
- let contents: any = {};
973
- contents = deserializeAws_json1_1DescribeCertificateAuthorityResponse(data, context);
974
- const response: DescribeCertificateAuthorityCommandOutput = {
975
- $metadata: deserializeMetadata(output),
976
- ...contents,
977
- };
978
- return Promise.resolve(response);
979
- };
980
-
981
- const deserializeAws_json1_1DescribeCertificateAuthorityCommandError = async (
982
- output: __HttpResponse,
983
- context: __SerdeContext
984
- ): Promise<DescribeCertificateAuthorityCommandOutput> => {
985
- const parsedOutput: any = {
986
- ...output,
987
- body: await parseBody(output.body, context),
988
- };
989
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
990
- let errorCode = "UnknownError";
991
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
992
- switch (errorCode) {
993
- case "InvalidArnException":
994
- case "com.amazonaws.acmpca#InvalidArnException":
995
- response = {
996
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
997
- name: errorCode,
998
- $metadata: deserializeMetadata(output),
999
- };
1000
- break;
1001
- case "ResourceNotFoundException":
1002
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1003
- response = {
1004
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1005
- name: errorCode,
1006
- $metadata: deserializeMetadata(output),
1007
- };
1008
- break;
1009
- default:
1010
- const parsedBody = parsedOutput.body;
1011
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1012
- response = {
1013
- ...parsedBody,
1014
- name: `${errorCode}`,
1015
- message: parsedBody.message || parsedBody.Message || errorCode,
1016
- $fault: "client",
1017
- $metadata: deserializeMetadata(output),
1018
- } as any;
1019
- }
1020
- const message = response.message || response.Message || errorCode;
1021
- response.message = message;
1022
- delete response.Message;
1023
- return Promise.reject(Object.assign(new Error(message), response));
1024
- };
1025
-
1026
- export const deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommand = async (
1027
- output: __HttpResponse,
1028
- context: __SerdeContext
1029
- ): Promise<DescribeCertificateAuthorityAuditReportCommandOutput> => {
1030
- if (output.statusCode >= 300) {
1031
- return deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommandError(output, context);
1032
- }
1033
- const data: any = await parseBody(output.body, context);
1034
- let contents: any = {};
1035
- contents = deserializeAws_json1_1DescribeCertificateAuthorityAuditReportResponse(data, context);
1036
- const response: DescribeCertificateAuthorityAuditReportCommandOutput = {
1037
- $metadata: deserializeMetadata(output),
1038
- ...contents,
1039
- };
1040
- return Promise.resolve(response);
1041
- };
1042
-
1043
- const deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommandError = async (
1044
- output: __HttpResponse,
1045
- context: __SerdeContext
1046
- ): Promise<DescribeCertificateAuthorityAuditReportCommandOutput> => {
1047
- const parsedOutput: any = {
1048
- ...output,
1049
- body: await parseBody(output.body, context),
1050
- };
1051
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1052
- let errorCode = "UnknownError";
1053
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1054
- switch (errorCode) {
1055
- case "InvalidArgsException":
1056
- case "com.amazonaws.acmpca#InvalidArgsException":
1057
- response = {
1058
- ...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
1059
- name: errorCode,
1060
- $metadata: deserializeMetadata(output),
1061
- };
1062
- break;
1063
- case "InvalidArnException":
1064
- case "com.amazonaws.acmpca#InvalidArnException":
1065
- response = {
1066
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1067
- name: errorCode,
1068
- $metadata: deserializeMetadata(output),
1069
- };
1070
- break;
1071
- case "ResourceNotFoundException":
1072
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1073
- response = {
1074
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1075
- name: errorCode,
1076
- $metadata: deserializeMetadata(output),
1077
- };
1078
- break;
1079
- default:
1080
- const parsedBody = parsedOutput.body;
1081
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1082
- response = {
1083
- ...parsedBody,
1084
- name: `${errorCode}`,
1085
- message: parsedBody.message || parsedBody.Message || errorCode,
1086
- $fault: "client",
1087
- $metadata: deserializeMetadata(output),
1088
- } as any;
1089
- }
1090
- const message = response.message || response.Message || errorCode;
1091
- response.message = message;
1092
- delete response.Message;
1093
- return Promise.reject(Object.assign(new Error(message), response));
1094
- };
1095
-
1096
- export const deserializeAws_json1_1GetCertificateCommand = async (
1097
- output: __HttpResponse,
1098
- context: __SerdeContext
1099
- ): Promise<GetCertificateCommandOutput> => {
1100
- if (output.statusCode >= 300) {
1101
- return deserializeAws_json1_1GetCertificateCommandError(output, context);
1102
- }
1103
- const data: any = await parseBody(output.body, context);
1104
- let contents: any = {};
1105
- contents = deserializeAws_json1_1GetCertificateResponse(data, context);
1106
- const response: GetCertificateCommandOutput = {
1107
- $metadata: deserializeMetadata(output),
1108
- ...contents,
1109
- };
1110
- return Promise.resolve(response);
1111
- };
1112
-
1113
- const deserializeAws_json1_1GetCertificateCommandError = async (
1114
- output: __HttpResponse,
1115
- context: __SerdeContext
1116
- ): Promise<GetCertificateCommandOutput> => {
1117
- const parsedOutput: any = {
1118
- ...output,
1119
- body: await parseBody(output.body, context),
1120
- };
1121
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1122
- let errorCode = "UnknownError";
1123
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1124
- switch (errorCode) {
1125
- case "InvalidArnException":
1126
- case "com.amazonaws.acmpca#InvalidArnException":
1127
- response = {
1128
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1129
- name: errorCode,
1130
- $metadata: deserializeMetadata(output),
1131
- };
1132
- break;
1133
- case "InvalidStateException":
1134
- case "com.amazonaws.acmpca#InvalidStateException":
1135
- response = {
1136
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1137
- name: errorCode,
1138
- $metadata: deserializeMetadata(output),
1139
- };
1140
- break;
1141
- case "RequestFailedException":
1142
- case "com.amazonaws.acmpca#RequestFailedException":
1143
- response = {
1144
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1145
- name: errorCode,
1146
- $metadata: deserializeMetadata(output),
1147
- };
1148
- break;
1149
- case "RequestInProgressException":
1150
- case "com.amazonaws.acmpca#RequestInProgressException":
1151
- response = {
1152
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
1153
- name: errorCode,
1154
- $metadata: deserializeMetadata(output),
1155
- };
1156
- break;
1157
- case "ResourceNotFoundException":
1158
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1159
- response = {
1160
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1161
- name: errorCode,
1162
- $metadata: deserializeMetadata(output),
1163
- };
1164
- break;
1165
- default:
1166
- const parsedBody = parsedOutput.body;
1167
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1168
- response = {
1169
- ...parsedBody,
1170
- name: `${errorCode}`,
1171
- message: parsedBody.message || parsedBody.Message || errorCode,
1172
- $fault: "client",
1173
- $metadata: deserializeMetadata(output),
1174
- } as any;
1175
- }
1176
- const message = response.message || response.Message || errorCode;
1177
- response.message = message;
1178
- delete response.Message;
1179
- return Promise.reject(Object.assign(new Error(message), response));
1180
- };
1181
-
1182
- export const deserializeAws_json1_1GetCertificateAuthorityCertificateCommand = async (
1183
- output: __HttpResponse,
1184
- context: __SerdeContext
1185
- ): Promise<GetCertificateAuthorityCertificateCommandOutput> => {
1186
- if (output.statusCode >= 300) {
1187
- return deserializeAws_json1_1GetCertificateAuthorityCertificateCommandError(output, context);
1188
- }
1189
- const data: any = await parseBody(output.body, context);
1190
- let contents: any = {};
1191
- contents = deserializeAws_json1_1GetCertificateAuthorityCertificateResponse(data, context);
1192
- const response: GetCertificateAuthorityCertificateCommandOutput = {
1193
- $metadata: deserializeMetadata(output),
1194
- ...contents,
1195
- };
1196
- return Promise.resolve(response);
1197
- };
1198
-
1199
- const deserializeAws_json1_1GetCertificateAuthorityCertificateCommandError = async (
1200
- output: __HttpResponse,
1201
- context: __SerdeContext
1202
- ): Promise<GetCertificateAuthorityCertificateCommandOutput> => {
1203
- const parsedOutput: any = {
1204
- ...output,
1205
- body: await parseBody(output.body, context),
1206
- };
1207
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1208
- let errorCode = "UnknownError";
1209
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1210
- switch (errorCode) {
1211
- case "InvalidArnException":
1212
- case "com.amazonaws.acmpca#InvalidArnException":
1213
- response = {
1214
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1215
- name: errorCode,
1216
- $metadata: deserializeMetadata(output),
1217
- };
1218
- break;
1219
- case "InvalidStateException":
1220
- case "com.amazonaws.acmpca#InvalidStateException":
1221
- response = {
1222
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1223
- name: errorCode,
1224
- $metadata: deserializeMetadata(output),
1225
- };
1226
- break;
1227
- case "ResourceNotFoundException":
1228
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1229
- response = {
1230
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1231
- name: errorCode,
1232
- $metadata: deserializeMetadata(output),
1233
- };
1234
- break;
1235
- default:
1236
- const parsedBody = parsedOutput.body;
1237
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1238
- response = {
1239
- ...parsedBody,
1240
- name: `${errorCode}`,
1241
- message: parsedBody.message || parsedBody.Message || errorCode,
1242
- $fault: "client",
1243
- $metadata: deserializeMetadata(output),
1244
- } as any;
1245
- }
1246
- const message = response.message || response.Message || errorCode;
1247
- response.message = message;
1248
- delete response.Message;
1249
- return Promise.reject(Object.assign(new Error(message), response));
1250
- };
1251
-
1252
- export const deserializeAws_json1_1GetCertificateAuthorityCsrCommand = async (
1253
- output: __HttpResponse,
1254
- context: __SerdeContext
1255
- ): Promise<GetCertificateAuthorityCsrCommandOutput> => {
1256
- if (output.statusCode >= 300) {
1257
- return deserializeAws_json1_1GetCertificateAuthorityCsrCommandError(output, context);
1258
- }
1259
- const data: any = await parseBody(output.body, context);
1260
- let contents: any = {};
1261
- contents = deserializeAws_json1_1GetCertificateAuthorityCsrResponse(data, context);
1262
- const response: GetCertificateAuthorityCsrCommandOutput = {
1263
- $metadata: deserializeMetadata(output),
1264
- ...contents,
1265
- };
1266
- return Promise.resolve(response);
1267
- };
1268
-
1269
- const deserializeAws_json1_1GetCertificateAuthorityCsrCommandError = async (
1270
- output: __HttpResponse,
1271
- context: __SerdeContext
1272
- ): Promise<GetCertificateAuthorityCsrCommandOutput> => {
1273
- const parsedOutput: any = {
1274
- ...output,
1275
- body: await parseBody(output.body, context),
1276
- };
1277
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1278
- let errorCode = "UnknownError";
1279
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1280
- switch (errorCode) {
1281
- case "InvalidArnException":
1282
- case "com.amazonaws.acmpca#InvalidArnException":
1283
- response = {
1284
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1285
- name: errorCode,
1286
- $metadata: deserializeMetadata(output),
1287
- };
1288
- break;
1289
- case "InvalidStateException":
1290
- case "com.amazonaws.acmpca#InvalidStateException":
1291
- response = {
1292
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1293
- name: errorCode,
1294
- $metadata: deserializeMetadata(output),
1295
- };
1296
- break;
1297
- case "RequestFailedException":
1298
- case "com.amazonaws.acmpca#RequestFailedException":
1299
- response = {
1300
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1301
- name: errorCode,
1302
- $metadata: deserializeMetadata(output),
1303
- };
1304
- break;
1305
- case "RequestInProgressException":
1306
- case "com.amazonaws.acmpca#RequestInProgressException":
1307
- response = {
1308
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
1309
- name: errorCode,
1310
- $metadata: deserializeMetadata(output),
1311
- };
1312
- break;
1313
- case "ResourceNotFoundException":
1314
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1315
- response = {
1316
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1317
- name: errorCode,
1318
- $metadata: deserializeMetadata(output),
1319
- };
1320
- break;
1321
- default:
1322
- const parsedBody = parsedOutput.body;
1323
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1324
- response = {
1325
- ...parsedBody,
1326
- name: `${errorCode}`,
1327
- message: parsedBody.message || parsedBody.Message || errorCode,
1328
- $fault: "client",
1329
- $metadata: deserializeMetadata(output),
1330
- } as any;
1331
- }
1332
- const message = response.message || response.Message || errorCode;
1333
- response.message = message;
1334
- delete response.Message;
1335
- return Promise.reject(Object.assign(new Error(message), response));
1336
- };
1337
-
1338
- export const deserializeAws_json1_1GetPolicyCommand = async (
1339
- output: __HttpResponse,
1340
- context: __SerdeContext
1341
- ): Promise<GetPolicyCommandOutput> => {
1342
- if (output.statusCode >= 300) {
1343
- return deserializeAws_json1_1GetPolicyCommandError(output, context);
1344
- }
1345
- const data: any = await parseBody(output.body, context);
1346
- let contents: any = {};
1347
- contents = deserializeAws_json1_1GetPolicyResponse(data, context);
1348
- const response: GetPolicyCommandOutput = {
1349
- $metadata: deserializeMetadata(output),
1350
- ...contents,
1351
- };
1352
- return Promise.resolve(response);
1353
- };
1354
-
1355
- const deserializeAws_json1_1GetPolicyCommandError = async (
1356
- output: __HttpResponse,
1357
- context: __SerdeContext
1358
- ): Promise<GetPolicyCommandOutput> => {
1359
- const parsedOutput: any = {
1360
- ...output,
1361
- body: await parseBody(output.body, context),
1362
- };
1363
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1364
- let errorCode = "UnknownError";
1365
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1366
- switch (errorCode) {
1367
- case "InvalidArnException":
1368
- case "com.amazonaws.acmpca#InvalidArnException":
1369
- response = {
1370
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1371
- name: errorCode,
1372
- $metadata: deserializeMetadata(output),
1373
- };
1374
- break;
1375
- case "InvalidStateException":
1376
- case "com.amazonaws.acmpca#InvalidStateException":
1377
- response = {
1378
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1379
- name: errorCode,
1380
- $metadata: deserializeMetadata(output),
1381
- };
1382
- break;
1383
- case "RequestFailedException":
1384
- case "com.amazonaws.acmpca#RequestFailedException":
1385
- response = {
1386
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1387
- name: errorCode,
1388
- $metadata: deserializeMetadata(output),
1389
- };
1390
- break;
1391
- case "ResourceNotFoundException":
1392
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1393
- response = {
1394
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1395
- name: errorCode,
1396
- $metadata: deserializeMetadata(output),
1397
- };
1398
- break;
1399
- default:
1400
- const parsedBody = parsedOutput.body;
1401
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1402
- response = {
1403
- ...parsedBody,
1404
- name: `${errorCode}`,
1405
- message: parsedBody.message || parsedBody.Message || errorCode,
1406
- $fault: "client",
1407
- $metadata: deserializeMetadata(output),
1408
- } as any;
1409
- }
1410
- const message = response.message || response.Message || errorCode;
1411
- response.message = message;
1412
- delete response.Message;
1413
- return Promise.reject(Object.assign(new Error(message), response));
1414
- };
1415
-
1416
- export const deserializeAws_json1_1ImportCertificateAuthorityCertificateCommand = async (
1417
- output: __HttpResponse,
1418
- context: __SerdeContext
1419
- ): Promise<ImportCertificateAuthorityCertificateCommandOutput> => {
1420
- if (output.statusCode >= 300) {
1421
- return deserializeAws_json1_1ImportCertificateAuthorityCertificateCommandError(output, context);
1422
- }
1423
- await collectBody(output.body, context);
1424
- const response: ImportCertificateAuthorityCertificateCommandOutput = {
1425
- $metadata: deserializeMetadata(output),
1426
- };
1427
- return Promise.resolve(response);
1428
- };
1429
-
1430
- const deserializeAws_json1_1ImportCertificateAuthorityCertificateCommandError = async (
1431
- output: __HttpResponse,
1432
- context: __SerdeContext
1433
- ): Promise<ImportCertificateAuthorityCertificateCommandOutput> => {
1434
- const parsedOutput: any = {
1435
- ...output,
1436
- body: await parseBody(output.body, context),
1437
- };
1438
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1439
- let errorCode = "UnknownError";
1440
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1441
- switch (errorCode) {
1442
- case "CertificateMismatchException":
1443
- case "com.amazonaws.acmpca#CertificateMismatchException":
1444
- response = {
1445
- ...(await deserializeAws_json1_1CertificateMismatchExceptionResponse(parsedOutput, context)),
1446
- name: errorCode,
1447
- $metadata: deserializeMetadata(output),
1448
- };
1449
- break;
1450
- case "ConcurrentModificationException":
1451
- case "com.amazonaws.acmpca#ConcurrentModificationException":
1452
- response = {
1453
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
1454
- name: errorCode,
1455
- $metadata: deserializeMetadata(output),
1456
- };
1457
- break;
1458
- case "InvalidArnException":
1459
- case "com.amazonaws.acmpca#InvalidArnException":
1460
- response = {
1461
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1462
- name: errorCode,
1463
- $metadata: deserializeMetadata(output),
1464
- };
1465
- break;
1466
- case "InvalidRequestException":
1467
- case "com.amazonaws.acmpca#InvalidRequestException":
1468
- response = {
1469
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1470
- name: errorCode,
1471
- $metadata: deserializeMetadata(output),
1472
- };
1473
- break;
1474
- case "InvalidStateException":
1475
- case "com.amazonaws.acmpca#InvalidStateException":
1476
- response = {
1477
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1478
- name: errorCode,
1479
- $metadata: deserializeMetadata(output),
1480
- };
1481
- break;
1482
- case "MalformedCertificateException":
1483
- case "com.amazonaws.acmpca#MalformedCertificateException":
1484
- response = {
1485
- ...(await deserializeAws_json1_1MalformedCertificateExceptionResponse(parsedOutput, context)),
1486
- name: errorCode,
1487
- $metadata: deserializeMetadata(output),
1488
- };
1489
- break;
1490
- case "RequestFailedException":
1491
- case "com.amazonaws.acmpca#RequestFailedException":
1492
- response = {
1493
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1494
- name: errorCode,
1495
- $metadata: deserializeMetadata(output),
1496
- };
1497
- break;
1498
- case "RequestInProgressException":
1499
- case "com.amazonaws.acmpca#RequestInProgressException":
1500
- response = {
1501
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
1502
- name: errorCode,
1503
- $metadata: deserializeMetadata(output),
1504
- };
1505
- break;
1506
- case "ResourceNotFoundException":
1507
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1508
- response = {
1509
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1510
- name: errorCode,
1511
- $metadata: deserializeMetadata(output),
1512
- };
1513
- break;
1514
- default:
1515
- const parsedBody = parsedOutput.body;
1516
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1517
- response = {
1518
- ...parsedBody,
1519
- name: `${errorCode}`,
1520
- message: parsedBody.message || parsedBody.Message || errorCode,
1521
- $fault: "client",
1522
- $metadata: deserializeMetadata(output),
1523
- } as any;
1524
- }
1525
- const message = response.message || response.Message || errorCode;
1526
- response.message = message;
1527
- delete response.Message;
1528
- return Promise.reject(Object.assign(new Error(message), response));
1529
- };
1530
-
1531
- export const deserializeAws_json1_1IssueCertificateCommand = async (
1532
- output: __HttpResponse,
1533
- context: __SerdeContext
1534
- ): Promise<IssueCertificateCommandOutput> => {
1535
- if (output.statusCode >= 300) {
1536
- return deserializeAws_json1_1IssueCertificateCommandError(output, context);
1537
- }
1538
- const data: any = await parseBody(output.body, context);
1539
- let contents: any = {};
1540
- contents = deserializeAws_json1_1IssueCertificateResponse(data, context);
1541
- const response: IssueCertificateCommandOutput = {
1542
- $metadata: deserializeMetadata(output),
1543
- ...contents,
1544
- };
1545
- return Promise.resolve(response);
1546
- };
1547
-
1548
- const deserializeAws_json1_1IssueCertificateCommandError = async (
1549
- output: __HttpResponse,
1550
- context: __SerdeContext
1551
- ): Promise<IssueCertificateCommandOutput> => {
1552
- const parsedOutput: any = {
1553
- ...output,
1554
- body: await parseBody(output.body, context),
1555
- };
1556
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1557
- let errorCode = "UnknownError";
1558
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1559
- switch (errorCode) {
1560
- case "InvalidArgsException":
1561
- case "com.amazonaws.acmpca#InvalidArgsException":
1562
- response = {
1563
- ...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
1564
- name: errorCode,
1565
- $metadata: deserializeMetadata(output),
1566
- };
1567
- break;
1568
- case "InvalidArnException":
1569
- case "com.amazonaws.acmpca#InvalidArnException":
1570
- response = {
1571
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1572
- name: errorCode,
1573
- $metadata: deserializeMetadata(output),
1574
- };
1575
- break;
1576
- case "InvalidStateException":
1577
- case "com.amazonaws.acmpca#InvalidStateException":
1578
- response = {
1579
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1580
- name: errorCode,
1581
- $metadata: deserializeMetadata(output),
1582
- };
1583
- break;
1584
- case "LimitExceededException":
1585
- case "com.amazonaws.acmpca#LimitExceededException":
1586
- response = {
1587
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
1588
- name: errorCode,
1589
- $metadata: deserializeMetadata(output),
1590
- };
1591
- break;
1592
- case "MalformedCSRException":
1593
- case "com.amazonaws.acmpca#MalformedCSRException":
1594
- response = {
1595
- ...(await deserializeAws_json1_1MalformedCSRExceptionResponse(parsedOutput, context)),
1596
- name: errorCode,
1597
- $metadata: deserializeMetadata(output),
1598
- };
1599
- break;
1600
- case "ResourceNotFoundException":
1601
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1602
- response = {
1603
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1604
- name: errorCode,
1605
- $metadata: deserializeMetadata(output),
1606
- };
1607
- break;
1608
- default:
1609
- const parsedBody = parsedOutput.body;
1610
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1611
- response = {
1612
- ...parsedBody,
1613
- name: `${errorCode}`,
1614
- message: parsedBody.message || parsedBody.Message || errorCode,
1615
- $fault: "client",
1616
- $metadata: deserializeMetadata(output),
1617
- } as any;
1618
- }
1619
- const message = response.message || response.Message || errorCode;
1620
- response.message = message;
1621
- delete response.Message;
1622
- return Promise.reject(Object.assign(new Error(message), response));
1623
- };
1624
-
1625
- export const deserializeAws_json1_1ListCertificateAuthoritiesCommand = async (
1626
- output: __HttpResponse,
1627
- context: __SerdeContext
1628
- ): Promise<ListCertificateAuthoritiesCommandOutput> => {
1629
- if (output.statusCode >= 300) {
1630
- return deserializeAws_json1_1ListCertificateAuthoritiesCommandError(output, context);
1631
- }
1632
- const data: any = await parseBody(output.body, context);
1633
- let contents: any = {};
1634
- contents = deserializeAws_json1_1ListCertificateAuthoritiesResponse(data, context);
1635
- const response: ListCertificateAuthoritiesCommandOutput = {
1636
- $metadata: deserializeMetadata(output),
1637
- ...contents,
1638
- };
1639
- return Promise.resolve(response);
1640
- };
1641
-
1642
- const deserializeAws_json1_1ListCertificateAuthoritiesCommandError = async (
1643
- output: __HttpResponse,
1644
- context: __SerdeContext
1645
- ): Promise<ListCertificateAuthoritiesCommandOutput> => {
1646
- const parsedOutput: any = {
1647
- ...output,
1648
- body: await parseBody(output.body, context),
1649
- };
1650
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1651
- let errorCode = "UnknownError";
1652
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1653
- switch (errorCode) {
1654
- case "InvalidNextTokenException":
1655
- case "com.amazonaws.acmpca#InvalidNextTokenException":
1656
- response = {
1657
- ...(await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)),
1658
- name: errorCode,
1659
- $metadata: deserializeMetadata(output),
1660
- };
1661
- break;
1662
- default:
1663
- const parsedBody = parsedOutput.body;
1664
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1665
- response = {
1666
- ...parsedBody,
1667
- name: `${errorCode}`,
1668
- message: parsedBody.message || parsedBody.Message || errorCode,
1669
- $fault: "client",
1670
- $metadata: deserializeMetadata(output),
1671
- } as any;
1672
- }
1673
- const message = response.message || response.Message || errorCode;
1674
- response.message = message;
1675
- delete response.Message;
1676
- return Promise.reject(Object.assign(new Error(message), response));
1677
- };
1678
-
1679
- export const deserializeAws_json1_1ListPermissionsCommand = async (
1680
- output: __HttpResponse,
1681
- context: __SerdeContext
1682
- ): Promise<ListPermissionsCommandOutput> => {
1683
- if (output.statusCode >= 300) {
1684
- return deserializeAws_json1_1ListPermissionsCommandError(output, context);
1685
- }
1686
- const data: any = await parseBody(output.body, context);
1687
- let contents: any = {};
1688
- contents = deserializeAws_json1_1ListPermissionsResponse(data, context);
1689
- const response: ListPermissionsCommandOutput = {
1690
- $metadata: deserializeMetadata(output),
1691
- ...contents,
1692
- };
1693
- return Promise.resolve(response);
1694
- };
1695
-
1696
- const deserializeAws_json1_1ListPermissionsCommandError = async (
1697
- output: __HttpResponse,
1698
- context: __SerdeContext
1699
- ): Promise<ListPermissionsCommandOutput> => {
1700
- const parsedOutput: any = {
1701
- ...output,
1702
- body: await parseBody(output.body, context),
1703
- };
1704
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1705
- let errorCode = "UnknownError";
1706
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1707
- switch (errorCode) {
1708
- case "InvalidArnException":
1709
- case "com.amazonaws.acmpca#InvalidArnException":
1710
- response = {
1711
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1712
- name: errorCode,
1713
- $metadata: deserializeMetadata(output),
1714
- };
1715
- break;
1716
- case "InvalidNextTokenException":
1717
- case "com.amazonaws.acmpca#InvalidNextTokenException":
1718
- response = {
1719
- ...(await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)),
1720
- name: errorCode,
1721
- $metadata: deserializeMetadata(output),
1722
- };
1723
- break;
1724
- case "InvalidStateException":
1725
- case "com.amazonaws.acmpca#InvalidStateException":
1726
- response = {
1727
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1728
- name: errorCode,
1729
- $metadata: deserializeMetadata(output),
1730
- };
1731
- break;
1732
- case "RequestFailedException":
1733
- case "com.amazonaws.acmpca#RequestFailedException":
1734
- response = {
1735
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1736
- name: errorCode,
1737
- $metadata: deserializeMetadata(output),
1738
- };
1739
- break;
1740
- case "ResourceNotFoundException":
1741
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1742
- response = {
1743
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1744
- name: errorCode,
1745
- $metadata: deserializeMetadata(output),
1746
- };
1747
- break;
1748
- default:
1749
- const parsedBody = parsedOutput.body;
1750
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1751
- response = {
1752
- ...parsedBody,
1753
- name: `${errorCode}`,
1754
- message: parsedBody.message || parsedBody.Message || errorCode,
1755
- $fault: "client",
1756
- $metadata: deserializeMetadata(output),
1757
- } as any;
1758
- }
1759
- const message = response.message || response.Message || errorCode;
1760
- response.message = message;
1761
- delete response.Message;
1762
- return Promise.reject(Object.assign(new Error(message), response));
1763
- };
1764
-
1765
- export const deserializeAws_json1_1ListTagsCommand = async (
1766
- output: __HttpResponse,
1767
- context: __SerdeContext
1768
- ): Promise<ListTagsCommandOutput> => {
1769
- if (output.statusCode >= 300) {
1770
- return deserializeAws_json1_1ListTagsCommandError(output, context);
1771
- }
1772
- const data: any = await parseBody(output.body, context);
1773
- let contents: any = {};
1774
- contents = deserializeAws_json1_1ListTagsResponse(data, context);
1775
- const response: ListTagsCommandOutput = {
1776
- $metadata: deserializeMetadata(output),
1777
- ...contents,
1778
- };
1779
- return Promise.resolve(response);
1780
- };
1781
-
1782
- const deserializeAws_json1_1ListTagsCommandError = async (
1783
- output: __HttpResponse,
1784
- context: __SerdeContext
1785
- ): Promise<ListTagsCommandOutput> => {
1786
- const parsedOutput: any = {
1787
- ...output,
1788
- body: await parseBody(output.body, context),
1789
- };
1790
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1791
- let errorCode = "UnknownError";
1792
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1793
- switch (errorCode) {
1794
- case "InvalidArnException":
1795
- case "com.amazonaws.acmpca#InvalidArnException":
1796
- response = {
1797
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1798
- name: errorCode,
1799
- $metadata: deserializeMetadata(output),
1800
- };
1801
- break;
1802
- case "InvalidStateException":
1803
- case "com.amazonaws.acmpca#InvalidStateException":
1804
- response = {
1805
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1806
- name: errorCode,
1807
- $metadata: deserializeMetadata(output),
1808
- };
1809
- break;
1810
- case "ResourceNotFoundException":
1811
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1812
- response = {
1813
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1814
- name: errorCode,
1815
- $metadata: deserializeMetadata(output),
1816
- };
1817
- break;
1818
- default:
1819
- const parsedBody = parsedOutput.body;
1820
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1821
- response = {
1822
- ...parsedBody,
1823
- name: `${errorCode}`,
1824
- message: parsedBody.message || parsedBody.Message || errorCode,
1825
- $fault: "client",
1826
- $metadata: deserializeMetadata(output),
1827
- } as any;
1828
- }
1829
- const message = response.message || response.Message || errorCode;
1830
- response.message = message;
1831
- delete response.Message;
1832
- return Promise.reject(Object.assign(new Error(message), response));
1833
- };
1834
-
1835
- export const deserializeAws_json1_1PutPolicyCommand = async (
1836
- output: __HttpResponse,
1837
- context: __SerdeContext
1838
- ): Promise<PutPolicyCommandOutput> => {
1839
- if (output.statusCode >= 300) {
1840
- return deserializeAws_json1_1PutPolicyCommandError(output, context);
1841
- }
1842
- await collectBody(output.body, context);
1843
- const response: PutPolicyCommandOutput = {
1844
- $metadata: deserializeMetadata(output),
1845
- };
1846
- return Promise.resolve(response);
1847
- };
1848
-
1849
- const deserializeAws_json1_1PutPolicyCommandError = async (
1850
- output: __HttpResponse,
1851
- context: __SerdeContext
1852
- ): Promise<PutPolicyCommandOutput> => {
1853
- const parsedOutput: any = {
1854
- ...output,
1855
- body: await parseBody(output.body, context),
1856
- };
1857
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1858
- let errorCode = "UnknownError";
1859
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1860
- switch (errorCode) {
1861
- case "ConcurrentModificationException":
1862
- case "com.amazonaws.acmpca#ConcurrentModificationException":
1863
- response = {
1864
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
1865
- name: errorCode,
1866
- $metadata: deserializeMetadata(output),
1867
- };
1868
- break;
1869
- case "InvalidArnException":
1870
- case "com.amazonaws.acmpca#InvalidArnException":
1871
- response = {
1872
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1873
- name: errorCode,
1874
- $metadata: deserializeMetadata(output),
1875
- };
1876
- break;
1877
- case "InvalidPolicyException":
1878
- case "com.amazonaws.acmpca#InvalidPolicyException":
1879
- response = {
1880
- ...(await deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context)),
1881
- name: errorCode,
1882
- $metadata: deserializeMetadata(output),
1883
- };
1884
- break;
1885
- case "InvalidStateException":
1886
- case "com.amazonaws.acmpca#InvalidStateException":
1887
- response = {
1888
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1889
- name: errorCode,
1890
- $metadata: deserializeMetadata(output),
1891
- };
1892
- break;
1893
- case "LockoutPreventedException":
1894
- case "com.amazonaws.acmpca#LockoutPreventedException":
1895
- response = {
1896
- ...(await deserializeAws_json1_1LockoutPreventedExceptionResponse(parsedOutput, context)),
1897
- name: errorCode,
1898
- $metadata: deserializeMetadata(output),
1899
- };
1900
- break;
1901
- case "RequestFailedException":
1902
- case "com.amazonaws.acmpca#RequestFailedException":
1903
- response = {
1904
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1905
- name: errorCode,
1906
- $metadata: deserializeMetadata(output),
1907
- };
1908
- break;
1909
- case "ResourceNotFoundException":
1910
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1911
- response = {
1912
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1913
- name: errorCode,
1914
- $metadata: deserializeMetadata(output),
1915
- };
1916
- break;
1917
- default:
1918
- const parsedBody = parsedOutput.body;
1919
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1920
- response = {
1921
- ...parsedBody,
1922
- name: `${errorCode}`,
1923
- message: parsedBody.message || parsedBody.Message || errorCode,
1924
- $fault: "client",
1925
- $metadata: deserializeMetadata(output),
1926
- } as any;
1927
- }
1928
- const message = response.message || response.Message || errorCode;
1929
- response.message = message;
1930
- delete response.Message;
1931
- return Promise.reject(Object.assign(new Error(message), response));
1932
- };
1933
-
1934
- export const deserializeAws_json1_1RestoreCertificateAuthorityCommand = async (
1935
- output: __HttpResponse,
1936
- context: __SerdeContext
1937
- ): Promise<RestoreCertificateAuthorityCommandOutput> => {
1938
- if (output.statusCode >= 300) {
1939
- return deserializeAws_json1_1RestoreCertificateAuthorityCommandError(output, context);
1940
- }
1941
- await collectBody(output.body, context);
1942
- const response: RestoreCertificateAuthorityCommandOutput = {
1943
- $metadata: deserializeMetadata(output),
1944
- };
1945
- return Promise.resolve(response);
1946
- };
1947
-
1948
- const deserializeAws_json1_1RestoreCertificateAuthorityCommandError = async (
1949
- output: __HttpResponse,
1950
- context: __SerdeContext
1951
- ): Promise<RestoreCertificateAuthorityCommandOutput> => {
1952
- const parsedOutput: any = {
1953
- ...output,
1954
- body: await parseBody(output.body, context),
1955
- };
1956
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1957
- let errorCode = "UnknownError";
1958
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1959
- switch (errorCode) {
1960
- case "InvalidArnException":
1961
- case "com.amazonaws.acmpca#InvalidArnException":
1962
- response = {
1963
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1964
- name: errorCode,
1965
- $metadata: deserializeMetadata(output),
1966
- };
1967
- break;
1968
- case "InvalidStateException":
1969
- case "com.amazonaws.acmpca#InvalidStateException":
1970
- response = {
1971
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1972
- name: errorCode,
1973
- $metadata: deserializeMetadata(output),
1974
- };
1975
- break;
1976
- case "ResourceNotFoundException":
1977
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1978
- response = {
1979
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1980
- name: errorCode,
1981
- $metadata: deserializeMetadata(output),
1982
- };
1983
- break;
1984
- default:
1985
- const parsedBody = parsedOutput.body;
1986
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1987
- response = {
1988
- ...parsedBody,
1989
- name: `${errorCode}`,
1990
- message: parsedBody.message || parsedBody.Message || errorCode,
1991
- $fault: "client",
1992
- $metadata: deserializeMetadata(output),
1993
- } as any;
1994
- }
1995
- const message = response.message || response.Message || errorCode;
1996
- response.message = message;
1997
- delete response.Message;
1998
- return Promise.reject(Object.assign(new Error(message), response));
1999
- };
2000
-
2001
- export const deserializeAws_json1_1RevokeCertificateCommand = async (
2002
- output: __HttpResponse,
2003
- context: __SerdeContext
2004
- ): Promise<RevokeCertificateCommandOutput> => {
2005
- if (output.statusCode >= 300) {
2006
- return deserializeAws_json1_1RevokeCertificateCommandError(output, context);
2007
- }
2008
- await collectBody(output.body, context);
2009
- const response: RevokeCertificateCommandOutput = {
2010
- $metadata: deserializeMetadata(output),
2011
- };
2012
- return Promise.resolve(response);
2013
- };
2014
-
2015
- const deserializeAws_json1_1RevokeCertificateCommandError = async (
2016
- output: __HttpResponse,
2017
- context: __SerdeContext
2018
- ): Promise<RevokeCertificateCommandOutput> => {
2019
- const parsedOutput: any = {
2020
- ...output,
2021
- body: await parseBody(output.body, context),
2022
- };
2023
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2024
- let errorCode = "UnknownError";
2025
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2026
- switch (errorCode) {
2027
- case "ConcurrentModificationException":
2028
- case "com.amazonaws.acmpca#ConcurrentModificationException":
2029
- response = {
2030
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
2031
- name: errorCode,
2032
- $metadata: deserializeMetadata(output),
2033
- };
2034
- break;
2035
- case "InvalidArnException":
2036
- case "com.amazonaws.acmpca#InvalidArnException":
2037
- response = {
2038
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
2039
- name: errorCode,
2040
- $metadata: deserializeMetadata(output),
2041
- };
2042
- break;
2043
- case "InvalidRequestException":
2044
- case "com.amazonaws.acmpca#InvalidRequestException":
2045
- response = {
2046
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2047
- name: errorCode,
2048
- $metadata: deserializeMetadata(output),
2049
- };
2050
- break;
2051
- case "InvalidStateException":
2052
- case "com.amazonaws.acmpca#InvalidStateException":
2053
- response = {
2054
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
2055
- name: errorCode,
2056
- $metadata: deserializeMetadata(output),
2057
- };
2058
- break;
2059
- case "LimitExceededException":
2060
- case "com.amazonaws.acmpca#LimitExceededException":
2061
- response = {
2062
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
2063
- name: errorCode,
2064
- $metadata: deserializeMetadata(output),
2065
- };
2066
- break;
2067
- case "RequestAlreadyProcessedException":
2068
- case "com.amazonaws.acmpca#RequestAlreadyProcessedException":
2069
- response = {
2070
- ...(await deserializeAws_json1_1RequestAlreadyProcessedExceptionResponse(parsedOutput, context)),
2071
- name: errorCode,
2072
- $metadata: deserializeMetadata(output),
2073
- };
2074
- break;
2075
- case "RequestFailedException":
2076
- case "com.amazonaws.acmpca#RequestFailedException":
2077
- response = {
2078
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
2079
- name: errorCode,
2080
- $metadata: deserializeMetadata(output),
2081
- };
2082
- break;
2083
- case "RequestInProgressException":
2084
- case "com.amazonaws.acmpca#RequestInProgressException":
2085
- response = {
2086
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
2087
- name: errorCode,
2088
- $metadata: deserializeMetadata(output),
2089
- };
2090
- break;
2091
- case "ResourceNotFoundException":
2092
- case "com.amazonaws.acmpca#ResourceNotFoundException":
2093
- response = {
2094
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2095
- name: errorCode,
2096
- $metadata: deserializeMetadata(output),
2097
- };
2098
- break;
2099
- default:
2100
- const parsedBody = parsedOutput.body;
2101
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2102
- response = {
2103
- ...parsedBody,
2104
- name: `${errorCode}`,
2105
- message: parsedBody.message || parsedBody.Message || errorCode,
2106
- $fault: "client",
2107
- $metadata: deserializeMetadata(output),
2108
- } as any;
2109
- }
2110
- const message = response.message || response.Message || errorCode;
2111
- response.message = message;
2112
- delete response.Message;
2113
- return Promise.reject(Object.assign(new Error(message), response));
2114
- };
2115
-
2116
- export const deserializeAws_json1_1TagCertificateAuthorityCommand = async (
2117
- output: __HttpResponse,
2118
- context: __SerdeContext
2119
- ): Promise<TagCertificateAuthorityCommandOutput> => {
2120
- if (output.statusCode >= 300) {
2121
- return deserializeAws_json1_1TagCertificateAuthorityCommandError(output, context);
2122
- }
2123
- await collectBody(output.body, context);
2124
- const response: TagCertificateAuthorityCommandOutput = {
2125
- $metadata: deserializeMetadata(output),
2126
- };
2127
- return Promise.resolve(response);
2128
- };
2129
-
2130
- const deserializeAws_json1_1TagCertificateAuthorityCommandError = async (
2131
- output: __HttpResponse,
2132
- context: __SerdeContext
2133
- ): Promise<TagCertificateAuthorityCommandOutput> => {
2134
- const parsedOutput: any = {
2135
- ...output,
2136
- body: await parseBody(output.body, context),
2137
- };
2138
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2139
- let errorCode = "UnknownError";
2140
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2141
- switch (errorCode) {
2142
- case "InvalidArnException":
2143
- case "com.amazonaws.acmpca#InvalidArnException":
2144
- response = {
2145
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
2146
- name: errorCode,
2147
- $metadata: deserializeMetadata(output),
2148
- };
2149
- break;
2150
- case "InvalidStateException":
2151
- case "com.amazonaws.acmpca#InvalidStateException":
2152
- response = {
2153
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
2154
- name: errorCode,
2155
- $metadata: deserializeMetadata(output),
2156
- };
2157
- break;
2158
- case "InvalidTagException":
2159
- case "com.amazonaws.acmpca#InvalidTagException":
2160
- response = {
2161
- ...(await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)),
2162
- name: errorCode,
2163
- $metadata: deserializeMetadata(output),
2164
- };
2165
- break;
2166
- case "ResourceNotFoundException":
2167
- case "com.amazonaws.acmpca#ResourceNotFoundException":
2168
- response = {
2169
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2170
- name: errorCode,
2171
- $metadata: deserializeMetadata(output),
2172
- };
2173
- break;
2174
- case "TooManyTagsException":
2175
- case "com.amazonaws.acmpca#TooManyTagsException":
2176
- response = {
2177
- ...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)),
2178
- name: errorCode,
2179
- $metadata: deserializeMetadata(output),
2180
- };
2181
- break;
2182
- default:
2183
- const parsedBody = parsedOutput.body;
2184
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2185
- response = {
2186
- ...parsedBody,
2187
- name: `${errorCode}`,
2188
- message: parsedBody.message || parsedBody.Message || errorCode,
2189
- $fault: "client",
2190
- $metadata: deserializeMetadata(output),
2191
- } as any;
2192
- }
2193
- const message = response.message || response.Message || errorCode;
2194
- response.message = message;
2195
- delete response.Message;
2196
- return Promise.reject(Object.assign(new Error(message), response));
2197
- };
2198
-
2199
- export const deserializeAws_json1_1UntagCertificateAuthorityCommand = async (
2200
- output: __HttpResponse,
2201
- context: __SerdeContext
2202
- ): Promise<UntagCertificateAuthorityCommandOutput> => {
2203
- if (output.statusCode >= 300) {
2204
- return deserializeAws_json1_1UntagCertificateAuthorityCommandError(output, context);
2205
- }
2206
- await collectBody(output.body, context);
2207
- const response: UntagCertificateAuthorityCommandOutput = {
2208
- $metadata: deserializeMetadata(output),
2209
- };
2210
- return Promise.resolve(response);
2211
- };
2212
-
2213
- const deserializeAws_json1_1UntagCertificateAuthorityCommandError = async (
2214
- output: __HttpResponse,
2215
- context: __SerdeContext
2216
- ): Promise<UntagCertificateAuthorityCommandOutput> => {
2217
- const parsedOutput: any = {
2218
- ...output,
2219
- body: await parseBody(output.body, context),
2220
- };
2221
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2222
- let errorCode = "UnknownError";
2223
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2224
- switch (errorCode) {
2225
- case "InvalidArnException":
2226
- case "com.amazonaws.acmpca#InvalidArnException":
2227
- response = {
2228
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
2229
- name: errorCode,
2230
- $metadata: deserializeMetadata(output),
2231
- };
2232
- break;
2233
- case "InvalidStateException":
2234
- case "com.amazonaws.acmpca#InvalidStateException":
2235
- response = {
2236
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
2237
- name: errorCode,
2238
- $metadata: deserializeMetadata(output),
2239
- };
2240
- break;
2241
- case "InvalidTagException":
2242
- case "com.amazonaws.acmpca#InvalidTagException":
2243
- response = {
2244
- ...(await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)),
2245
- name: errorCode,
2246
- $metadata: deserializeMetadata(output),
2247
- };
2248
- break;
2249
- case "ResourceNotFoundException":
2250
- case "com.amazonaws.acmpca#ResourceNotFoundException":
2251
- response = {
2252
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2253
- name: errorCode,
2254
- $metadata: deserializeMetadata(output),
2255
- };
2256
- break;
2257
- default:
2258
- const parsedBody = parsedOutput.body;
2259
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2260
- response = {
2261
- ...parsedBody,
2262
- name: `${errorCode}`,
2263
- message: parsedBody.message || parsedBody.Message || errorCode,
2264
- $fault: "client",
2265
- $metadata: deserializeMetadata(output),
2266
- } as any;
2267
- }
2268
- const message = response.message || response.Message || errorCode;
2269
- response.message = message;
2270
- delete response.Message;
2271
- return Promise.reject(Object.assign(new Error(message), response));
2272
- };
2273
-
2274
- export const deserializeAws_json1_1UpdateCertificateAuthorityCommand = async (
2275
- output: __HttpResponse,
2276
- context: __SerdeContext
2277
- ): Promise<UpdateCertificateAuthorityCommandOutput> => {
2278
- if (output.statusCode >= 300) {
2279
- return deserializeAws_json1_1UpdateCertificateAuthorityCommandError(output, context);
2280
- }
2281
- await collectBody(output.body, context);
2282
- const response: UpdateCertificateAuthorityCommandOutput = {
2283
- $metadata: deserializeMetadata(output),
2284
- };
2285
- return Promise.resolve(response);
2286
- };
2287
-
2288
- const deserializeAws_json1_1UpdateCertificateAuthorityCommandError = async (
2289
- output: __HttpResponse,
2290
- context: __SerdeContext
2291
- ): Promise<UpdateCertificateAuthorityCommandOutput> => {
2292
- const parsedOutput: any = {
2293
- ...output,
2294
- body: await parseBody(output.body, context),
2295
- };
2296
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2297
- let errorCode = "UnknownError";
2298
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2299
- switch (errorCode) {
2300
- case "ConcurrentModificationException":
2301
- case "com.amazonaws.acmpca#ConcurrentModificationException":
2302
- response = {
2303
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
2304
- name: errorCode,
2305
- $metadata: deserializeMetadata(output),
2306
- };
2307
- break;
2308
- case "InvalidArgsException":
2309
- case "com.amazonaws.acmpca#InvalidArgsException":
2310
- response = {
2311
- ...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
2312
- name: errorCode,
2313
- $metadata: deserializeMetadata(output),
2314
- };
2315
- break;
2316
- case "InvalidArnException":
2317
- case "com.amazonaws.acmpca#InvalidArnException":
2318
- response = {
2319
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
2320
- name: errorCode,
2321
- $metadata: deserializeMetadata(output),
2322
- };
2323
- break;
2324
- case "InvalidPolicyException":
2325
- case "com.amazonaws.acmpca#InvalidPolicyException":
2326
- response = {
2327
- ...(await deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context)),
2328
- name: errorCode,
2329
- $metadata: deserializeMetadata(output),
2330
- };
2331
- break;
2332
- case "InvalidStateException":
2333
- case "com.amazonaws.acmpca#InvalidStateException":
2334
- response = {
2335
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
2336
- name: errorCode,
2337
- $metadata: deserializeMetadata(output),
2338
- };
2339
- break;
2340
- case "ResourceNotFoundException":
2341
- case "com.amazonaws.acmpca#ResourceNotFoundException":
2342
- response = {
2343
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2344
- name: errorCode,
2345
- $metadata: deserializeMetadata(output),
2346
- };
2347
- break;
2348
- default:
2349
- const parsedBody = parsedOutput.body;
2350
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2351
- response = {
2352
- ...parsedBody,
2353
- name: `${errorCode}`,
2354
- message: parsedBody.message || parsedBody.Message || errorCode,
2355
- $fault: "client",
2356
- $metadata: deserializeMetadata(output),
2357
- } as any;
2358
- }
2359
- const message = response.message || response.Message || errorCode;
2360
- response.message = message;
2361
- delete response.Message;
2362
- return Promise.reject(Object.assign(new Error(message), response));
2363
- };
2364
-
2365
- const deserializeAws_json1_1CertificateMismatchExceptionResponse = async (
2366
- parsedOutput: any,
2367
- context: __SerdeContext
2368
- ): Promise<CertificateMismatchException> => {
2369
- const body = parsedOutput.body;
2370
- const deserialized: any = deserializeAws_json1_1CertificateMismatchException(body, context);
2371
- const contents: CertificateMismatchException = {
2372
- name: "CertificateMismatchException",
2373
- $fault: "client",
2374
- $metadata: deserializeMetadata(parsedOutput),
2375
- ...deserialized,
2376
- };
2377
- return contents;
2378
- };
2379
-
2380
- const deserializeAws_json1_1ConcurrentModificationExceptionResponse = async (
2381
- parsedOutput: any,
2382
- context: __SerdeContext
2383
- ): Promise<ConcurrentModificationException> => {
2384
- const body = parsedOutput.body;
2385
- const deserialized: any = deserializeAws_json1_1ConcurrentModificationException(body, context);
2386
- const contents: ConcurrentModificationException = {
2387
- name: "ConcurrentModificationException",
2388
- $fault: "client",
2389
- $metadata: deserializeMetadata(parsedOutput),
2390
- ...deserialized,
2391
- };
2392
- return contents;
2393
- };
2394
-
2395
- const deserializeAws_json1_1InvalidArgsExceptionResponse = async (
2396
- parsedOutput: any,
2397
- context: __SerdeContext
2398
- ): Promise<InvalidArgsException> => {
2399
- const body = parsedOutput.body;
2400
- const deserialized: any = deserializeAws_json1_1InvalidArgsException(body, context);
2401
- const contents: InvalidArgsException = {
2402
- name: "InvalidArgsException",
2403
- $fault: "client",
2404
- $metadata: deserializeMetadata(parsedOutput),
2405
- ...deserialized,
2406
- };
2407
- return contents;
2408
- };
2409
-
2410
- const deserializeAws_json1_1InvalidArnExceptionResponse = async (
2411
- parsedOutput: any,
2412
- context: __SerdeContext
2413
- ): Promise<InvalidArnException> => {
2414
- const body = parsedOutput.body;
2415
- const deserialized: any = deserializeAws_json1_1InvalidArnException(body, context);
2416
- const contents: InvalidArnException = {
2417
- name: "InvalidArnException",
2418
- $fault: "client",
2419
- $metadata: deserializeMetadata(parsedOutput),
2420
- ...deserialized,
2421
- };
2422
- return contents;
2423
- };
2424
-
2425
- const deserializeAws_json1_1InvalidNextTokenExceptionResponse = async (
2426
- parsedOutput: any,
2427
- context: __SerdeContext
2428
- ): Promise<InvalidNextTokenException> => {
2429
- const body = parsedOutput.body;
2430
- const deserialized: any = deserializeAws_json1_1InvalidNextTokenException(body, context);
2431
- const contents: InvalidNextTokenException = {
2432
- name: "InvalidNextTokenException",
2433
- $fault: "client",
2434
- $metadata: deserializeMetadata(parsedOutput),
2435
- ...deserialized,
2436
- };
2437
- return contents;
2438
- };
2439
-
2440
- const deserializeAws_json1_1InvalidPolicyExceptionResponse = async (
2441
- parsedOutput: any,
2442
- context: __SerdeContext
2443
- ): Promise<InvalidPolicyException> => {
2444
- const body = parsedOutput.body;
2445
- const deserialized: any = deserializeAws_json1_1InvalidPolicyException(body, context);
2446
- const contents: InvalidPolicyException = {
2447
- name: "InvalidPolicyException",
2448
- $fault: "client",
2449
- $metadata: deserializeMetadata(parsedOutput),
2450
- ...deserialized,
2451
- };
2452
- return contents;
2453
- };
2454
-
2455
- const deserializeAws_json1_1InvalidRequestExceptionResponse = async (
2456
- parsedOutput: any,
2457
- context: __SerdeContext
2458
- ): Promise<InvalidRequestException> => {
2459
- const body = parsedOutput.body;
2460
- const deserialized: any = deserializeAws_json1_1InvalidRequestException(body, context);
2461
- const contents: InvalidRequestException = {
2462
- name: "InvalidRequestException",
2463
- $fault: "client",
2464
- $metadata: deserializeMetadata(parsedOutput),
2465
- ...deserialized,
2466
- };
2467
- return contents;
2468
- };
2469
-
2470
- const deserializeAws_json1_1InvalidStateExceptionResponse = async (
2471
- parsedOutput: any,
2472
- context: __SerdeContext
2473
- ): Promise<InvalidStateException> => {
2474
- const body = parsedOutput.body;
2475
- const deserialized: any = deserializeAws_json1_1InvalidStateException(body, context);
2476
- const contents: InvalidStateException = {
2477
- name: "InvalidStateException",
2478
- $fault: "client",
2479
- $metadata: deserializeMetadata(parsedOutput),
2480
- ...deserialized,
2481
- };
2482
- return contents;
2483
- };
2484
-
2485
- const deserializeAws_json1_1InvalidTagExceptionResponse = async (
2486
- parsedOutput: any,
2487
- context: __SerdeContext
2488
- ): Promise<InvalidTagException> => {
2489
- const body = parsedOutput.body;
2490
- const deserialized: any = deserializeAws_json1_1InvalidTagException(body, context);
2491
- const contents: InvalidTagException = {
2492
- name: "InvalidTagException",
2493
- $fault: "client",
2494
- $metadata: deserializeMetadata(parsedOutput),
2495
- ...deserialized,
2496
- };
2497
- return contents;
2498
- };
2499
-
2500
- const deserializeAws_json1_1LimitExceededExceptionResponse = async (
2501
- parsedOutput: any,
2502
- context: __SerdeContext
2503
- ): Promise<LimitExceededException> => {
2504
- const body = parsedOutput.body;
2505
- const deserialized: any = deserializeAws_json1_1LimitExceededException(body, context);
2506
- const contents: LimitExceededException = {
2507
- name: "LimitExceededException",
2508
- $fault: "client",
2509
- $metadata: deserializeMetadata(parsedOutput),
2510
- ...deserialized,
2511
- };
2512
- return contents;
2513
- };
2514
-
2515
- const deserializeAws_json1_1LockoutPreventedExceptionResponse = async (
2516
- parsedOutput: any,
2517
- context: __SerdeContext
2518
- ): Promise<LockoutPreventedException> => {
2519
- const body = parsedOutput.body;
2520
- const deserialized: any = deserializeAws_json1_1LockoutPreventedException(body, context);
2521
- const contents: LockoutPreventedException = {
2522
- name: "LockoutPreventedException",
2523
- $fault: "client",
2524
- $metadata: deserializeMetadata(parsedOutput),
2525
- ...deserialized,
2526
- };
2527
- return contents;
2528
- };
2529
-
2530
- const deserializeAws_json1_1MalformedCertificateExceptionResponse = async (
2531
- parsedOutput: any,
2532
- context: __SerdeContext
2533
- ): Promise<MalformedCertificateException> => {
2534
- const body = parsedOutput.body;
2535
- const deserialized: any = deserializeAws_json1_1MalformedCertificateException(body, context);
2536
- const contents: MalformedCertificateException = {
2537
- name: "MalformedCertificateException",
2538
- $fault: "client",
2539
- $metadata: deserializeMetadata(parsedOutput),
2540
- ...deserialized,
2541
- };
2542
- return contents;
2543
- };
2544
-
2545
- const deserializeAws_json1_1MalformedCSRExceptionResponse = async (
2546
- parsedOutput: any,
2547
- context: __SerdeContext
2548
- ): Promise<MalformedCSRException> => {
2549
- const body = parsedOutput.body;
2550
- const deserialized: any = deserializeAws_json1_1MalformedCSRException(body, context);
2551
- const contents: MalformedCSRException = {
2552
- name: "MalformedCSRException",
2553
- $fault: "client",
2554
- $metadata: deserializeMetadata(parsedOutput),
2555
- ...deserialized,
2556
- };
2557
- return contents;
2558
- };
2559
-
2560
- const deserializeAws_json1_1PermissionAlreadyExistsExceptionResponse = async (
2561
- parsedOutput: any,
2562
- context: __SerdeContext
2563
- ): Promise<PermissionAlreadyExistsException> => {
2564
- const body = parsedOutput.body;
2565
- const deserialized: any = deserializeAws_json1_1PermissionAlreadyExistsException(body, context);
2566
- const contents: PermissionAlreadyExistsException = {
2567
- name: "PermissionAlreadyExistsException",
2568
- $fault: "client",
2569
- $metadata: deserializeMetadata(parsedOutput),
2570
- ...deserialized,
2571
- };
2572
- return contents;
2573
- };
2574
-
2575
- const deserializeAws_json1_1RequestAlreadyProcessedExceptionResponse = async (
2576
- parsedOutput: any,
2577
- context: __SerdeContext
2578
- ): Promise<RequestAlreadyProcessedException> => {
2579
- const body = parsedOutput.body;
2580
- const deserialized: any = deserializeAws_json1_1RequestAlreadyProcessedException(body, context);
2581
- const contents: RequestAlreadyProcessedException = {
2582
- name: "RequestAlreadyProcessedException",
2583
- $fault: "client",
2584
- $metadata: deserializeMetadata(parsedOutput),
2585
- ...deserialized,
2586
- };
2587
- return contents;
2588
- };
2589
-
2590
- const deserializeAws_json1_1RequestFailedExceptionResponse = async (
2591
- parsedOutput: any,
2592
- context: __SerdeContext
2593
- ): Promise<RequestFailedException> => {
2594
- const body = parsedOutput.body;
2595
- const deserialized: any = deserializeAws_json1_1RequestFailedException(body, context);
2596
- const contents: RequestFailedException = {
2597
- name: "RequestFailedException",
2598
- $fault: "client",
2599
- $metadata: deserializeMetadata(parsedOutput),
2600
- ...deserialized,
2601
- };
2602
- return contents;
2603
- };
2604
-
2605
- const deserializeAws_json1_1RequestInProgressExceptionResponse = async (
2606
- parsedOutput: any,
2607
- context: __SerdeContext
2608
- ): Promise<RequestInProgressException> => {
2609
- const body = parsedOutput.body;
2610
- const deserialized: any = deserializeAws_json1_1RequestInProgressException(body, context);
2611
- const contents: RequestInProgressException = {
2612
- name: "RequestInProgressException",
2613
- $fault: "client",
2614
- $metadata: deserializeMetadata(parsedOutput),
2615
- ...deserialized,
2616
- };
2617
- return contents;
2618
- };
2619
-
2620
- const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (
2621
- parsedOutput: any,
2622
- context: __SerdeContext
2623
- ): Promise<ResourceNotFoundException> => {
2624
- const body = parsedOutput.body;
2625
- const deserialized: any = deserializeAws_json1_1ResourceNotFoundException(body, context);
2626
- const contents: ResourceNotFoundException = {
2627
- name: "ResourceNotFoundException",
2628
- $fault: "client",
2629
- $metadata: deserializeMetadata(parsedOutput),
2630
- ...deserialized,
2631
- };
2632
- return contents;
2633
- };
2634
-
2635
- const deserializeAws_json1_1TooManyTagsExceptionResponse = async (
2636
- parsedOutput: any,
2637
- context: __SerdeContext
2638
- ): Promise<TooManyTagsException> => {
2639
- const body = parsedOutput.body;
2640
- const deserialized: any = deserializeAws_json1_1TooManyTagsException(body, context);
2641
- const contents: TooManyTagsException = {
2642
- name: "TooManyTagsException",
2643
- $fault: "client",
2644
- $metadata: deserializeMetadata(parsedOutput),
2645
- ...deserialized,
2646
- };
2647
- return contents;
2648
- };
2649
-
2650
- const serializeAws_json1_1AccessDescription = (input: AccessDescription, context: __SerdeContext): any => {
2651
- return {
2652
- ...(input.AccessLocation !== undefined &&
2653
- input.AccessLocation !== null && {
2654
- AccessLocation: serializeAws_json1_1GeneralName(input.AccessLocation, context),
2655
- }),
2656
- ...(input.AccessMethod !== undefined &&
2657
- input.AccessMethod !== null && { AccessMethod: serializeAws_json1_1AccessMethod(input.AccessMethod, context) }),
2658
- };
2659
- };
2660
-
2661
- const serializeAws_json1_1AccessDescriptionList = (input: AccessDescription[], context: __SerdeContext): any => {
2662
- return input
2663
- .filter((e: any) => e != null)
2664
- .map((entry) => {
2665
- if (entry === null) {
2666
- return null as any;
2667
- }
2668
- return serializeAws_json1_1AccessDescription(entry, context);
2669
- });
2670
- };
2671
-
2672
- const serializeAws_json1_1AccessMethod = (input: AccessMethod, context: __SerdeContext): any => {
2673
- return {
2674
- ...(input.AccessMethodType !== undefined &&
2675
- input.AccessMethodType !== null && { AccessMethodType: input.AccessMethodType }),
2676
- ...(input.CustomObjectIdentifier !== undefined &&
2677
- input.CustomObjectIdentifier !== null && { CustomObjectIdentifier: input.CustomObjectIdentifier }),
2678
- };
2679
- };
2680
-
2681
- const serializeAws_json1_1ActionList = (input: (ActionType | string)[], context: __SerdeContext): any => {
2682
- return input
2683
- .filter((e: any) => e != null)
2684
- .map((entry) => {
2685
- if (entry === null) {
2686
- return null as any;
2687
- }
2688
- return entry;
2689
- });
2690
- };
2691
-
2692
- const serializeAws_json1_1ApiPassthrough = (input: ApiPassthrough, context: __SerdeContext): any => {
2693
- return {
2694
- ...(input.Extensions !== undefined &&
2695
- input.Extensions !== null && { Extensions: serializeAws_json1_1Extensions(input.Extensions, context) }),
2696
- ...(input.Subject !== undefined &&
2697
- input.Subject !== null && { Subject: serializeAws_json1_1ASN1Subject(input.Subject, context) }),
2698
- };
2699
- };
2700
-
2701
- const serializeAws_json1_1ASN1Subject = (input: ASN1Subject, context: __SerdeContext): any => {
2702
- return {
2703
- ...(input.CommonName !== undefined && input.CommonName !== null && { CommonName: input.CommonName }),
2704
- ...(input.Country !== undefined && input.Country !== null && { Country: input.Country }),
2705
- ...(input.DistinguishedNameQualifier !== undefined &&
2706
- input.DistinguishedNameQualifier !== null && { DistinguishedNameQualifier: input.DistinguishedNameQualifier }),
2707
- ...(input.GenerationQualifier !== undefined &&
2708
- input.GenerationQualifier !== null && { GenerationQualifier: input.GenerationQualifier }),
2709
- ...(input.GivenName !== undefined && input.GivenName !== null && { GivenName: input.GivenName }),
2710
- ...(input.Initials !== undefined && input.Initials !== null && { Initials: input.Initials }),
2711
- ...(input.Locality !== undefined && input.Locality !== null && { Locality: input.Locality }),
2712
- ...(input.Organization !== undefined && input.Organization !== null && { Organization: input.Organization }),
2713
- ...(input.OrganizationalUnit !== undefined &&
2714
- input.OrganizationalUnit !== null && { OrganizationalUnit: input.OrganizationalUnit }),
2715
- ...(input.Pseudonym !== undefined && input.Pseudonym !== null && { Pseudonym: input.Pseudonym }),
2716
- ...(input.SerialNumber !== undefined && input.SerialNumber !== null && { SerialNumber: input.SerialNumber }),
2717
- ...(input.State !== undefined && input.State !== null && { State: input.State }),
2718
- ...(input.Surname !== undefined && input.Surname !== null && { Surname: input.Surname }),
2719
- ...(input.Title !== undefined && input.Title !== null && { Title: input.Title }),
2720
- };
2721
- };
2722
-
2723
- const serializeAws_json1_1CertificateAuthorityConfiguration = (
2724
- input: CertificateAuthorityConfiguration,
2725
- context: __SerdeContext
2726
- ): any => {
2727
- return {
2728
- ...(input.CsrExtensions !== undefined &&
2729
- input.CsrExtensions !== null && {
2730
- CsrExtensions: serializeAws_json1_1CsrExtensions(input.CsrExtensions, context),
2731
- }),
2732
- ...(input.KeyAlgorithm !== undefined && input.KeyAlgorithm !== null && { KeyAlgorithm: input.KeyAlgorithm }),
2733
- ...(input.SigningAlgorithm !== undefined &&
2734
- input.SigningAlgorithm !== null && { SigningAlgorithm: input.SigningAlgorithm }),
2735
- ...(input.Subject !== undefined &&
2736
- input.Subject !== null && { Subject: serializeAws_json1_1ASN1Subject(input.Subject, context) }),
2737
- };
2738
- };
2739
-
2740
- const serializeAws_json1_1CertificatePolicyList = (input: PolicyInformation[], context: __SerdeContext): any => {
2741
- return input
2742
- .filter((e: any) => e != null)
2743
- .map((entry) => {
2744
- if (entry === null) {
2745
- return null as any;
2746
- }
2747
- return serializeAws_json1_1PolicyInformation(entry, context);
2748
- });
2749
- };
2750
-
2751
- const serializeAws_json1_1CreateCertificateAuthorityAuditReportRequest = (
2752
- input: CreateCertificateAuthorityAuditReportRequest,
2753
- context: __SerdeContext
2754
- ): any => {
2755
- return {
2756
- ...(input.AuditReportResponseFormat !== undefined &&
2757
- input.AuditReportResponseFormat !== null && { AuditReportResponseFormat: input.AuditReportResponseFormat }),
2758
- ...(input.CertificateAuthorityArn !== undefined &&
2759
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2760
- ...(input.S3BucketName !== undefined && input.S3BucketName !== null && { S3BucketName: input.S3BucketName }),
2761
- };
2762
- };
2763
-
2764
- const serializeAws_json1_1CreateCertificateAuthorityRequest = (
2765
- input: CreateCertificateAuthorityRequest,
2766
- context: __SerdeContext
2767
- ): any => {
2768
- return {
2769
- ...(input.CertificateAuthorityConfiguration !== undefined &&
2770
- input.CertificateAuthorityConfiguration !== null && {
2771
- CertificateAuthorityConfiguration: serializeAws_json1_1CertificateAuthorityConfiguration(
2772
- input.CertificateAuthorityConfiguration,
2773
- context
2774
- ),
2775
- }),
2776
- ...(input.CertificateAuthorityType !== undefined &&
2777
- input.CertificateAuthorityType !== null && { CertificateAuthorityType: input.CertificateAuthorityType }),
2778
- ...(input.IdempotencyToken !== undefined &&
2779
- input.IdempotencyToken !== null && { IdempotencyToken: input.IdempotencyToken }),
2780
- ...(input.KeyStorageSecurityStandard !== undefined &&
2781
- input.KeyStorageSecurityStandard !== null && { KeyStorageSecurityStandard: input.KeyStorageSecurityStandard }),
2782
- ...(input.RevocationConfiguration !== undefined &&
2783
- input.RevocationConfiguration !== null && {
2784
- RevocationConfiguration: serializeAws_json1_1RevocationConfiguration(input.RevocationConfiguration, context),
2785
- }),
2786
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
2787
- };
2788
- };
2789
-
2790
- const serializeAws_json1_1CreatePermissionRequest = (input: CreatePermissionRequest, context: __SerdeContext): any => {
2791
- return {
2792
- ...(input.Actions !== undefined &&
2793
- input.Actions !== null && { Actions: serializeAws_json1_1ActionList(input.Actions, context) }),
2794
- ...(input.CertificateAuthorityArn !== undefined &&
2795
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2796
- ...(input.Principal !== undefined && input.Principal !== null && { Principal: input.Principal }),
2797
- ...(input.SourceAccount !== undefined && input.SourceAccount !== null && { SourceAccount: input.SourceAccount }),
2798
- };
2799
- };
2800
-
2801
- const serializeAws_json1_1CrlConfiguration = (input: CrlConfiguration, context: __SerdeContext): any => {
2802
- return {
2803
- ...(input.CustomCname !== undefined && input.CustomCname !== null && { CustomCname: input.CustomCname }),
2804
- ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
2805
- ...(input.ExpirationInDays !== undefined &&
2806
- input.ExpirationInDays !== null && { ExpirationInDays: input.ExpirationInDays }),
2807
- ...(input.S3BucketName !== undefined && input.S3BucketName !== null && { S3BucketName: input.S3BucketName }),
2808
- ...(input.S3ObjectAcl !== undefined && input.S3ObjectAcl !== null && { S3ObjectAcl: input.S3ObjectAcl }),
2809
- };
2810
- };
2811
-
2812
- const serializeAws_json1_1CsrExtensions = (input: CsrExtensions, context: __SerdeContext): any => {
2813
- return {
2814
- ...(input.KeyUsage !== undefined &&
2815
- input.KeyUsage !== null && { KeyUsage: serializeAws_json1_1KeyUsage(input.KeyUsage, context) }),
2816
- ...(input.SubjectInformationAccess !== undefined &&
2817
- input.SubjectInformationAccess !== null && {
2818
- SubjectInformationAccess: serializeAws_json1_1AccessDescriptionList(input.SubjectInformationAccess, context),
2819
- }),
2820
- };
2821
- };
2822
-
2823
- const serializeAws_json1_1DeleteCertificateAuthorityRequest = (
2824
- input: DeleteCertificateAuthorityRequest,
2825
- context: __SerdeContext
2826
- ): any => {
2827
- return {
2828
- ...(input.CertificateAuthorityArn !== undefined &&
2829
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2830
- ...(input.PermanentDeletionTimeInDays !== undefined &&
2831
- input.PermanentDeletionTimeInDays !== null && { PermanentDeletionTimeInDays: input.PermanentDeletionTimeInDays }),
2832
- };
2833
- };
2834
-
2835
- const serializeAws_json1_1DeletePermissionRequest = (input: DeletePermissionRequest, context: __SerdeContext): any => {
2836
- return {
2837
- ...(input.CertificateAuthorityArn !== undefined &&
2838
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2839
- ...(input.Principal !== undefined && input.Principal !== null && { Principal: input.Principal }),
2840
- ...(input.SourceAccount !== undefined && input.SourceAccount !== null && { SourceAccount: input.SourceAccount }),
2841
- };
2842
- };
2843
-
2844
- const serializeAws_json1_1DeletePolicyRequest = (input: DeletePolicyRequest, context: __SerdeContext): any => {
2845
- return {
2846
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2847
- };
2848
- };
2849
-
2850
- const serializeAws_json1_1DescribeCertificateAuthorityAuditReportRequest = (
2851
- input: DescribeCertificateAuthorityAuditReportRequest,
2852
- context: __SerdeContext
2853
- ): any => {
2854
- return {
2855
- ...(input.AuditReportId !== undefined && input.AuditReportId !== null && { AuditReportId: input.AuditReportId }),
2856
- ...(input.CertificateAuthorityArn !== undefined &&
2857
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2858
- };
2859
- };
2860
-
2861
- const serializeAws_json1_1DescribeCertificateAuthorityRequest = (
2862
- input: DescribeCertificateAuthorityRequest,
2863
- context: __SerdeContext
2864
- ): any => {
2865
- return {
2866
- ...(input.CertificateAuthorityArn !== undefined &&
2867
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2868
- };
2869
- };
2870
-
2871
- const serializeAws_json1_1EdiPartyName = (input: EdiPartyName, context: __SerdeContext): any => {
2872
- return {
2873
- ...(input.NameAssigner !== undefined && input.NameAssigner !== null && { NameAssigner: input.NameAssigner }),
2874
- ...(input.PartyName !== undefined && input.PartyName !== null && { PartyName: input.PartyName }),
2875
- };
2876
- };
2877
-
2878
- const serializeAws_json1_1ExtendedKeyUsage = (input: ExtendedKeyUsage, context: __SerdeContext): any => {
2879
- return {
2880
- ...(input.ExtendedKeyUsageObjectIdentifier !== undefined &&
2881
- input.ExtendedKeyUsageObjectIdentifier !== null && {
2882
- ExtendedKeyUsageObjectIdentifier: input.ExtendedKeyUsageObjectIdentifier,
2883
- }),
2884
- ...(input.ExtendedKeyUsageType !== undefined &&
2885
- input.ExtendedKeyUsageType !== null && { ExtendedKeyUsageType: input.ExtendedKeyUsageType }),
2886
- };
2887
- };
2888
-
2889
- const serializeAws_json1_1ExtendedKeyUsageList = (input: ExtendedKeyUsage[], context: __SerdeContext): any => {
2890
- return input
2891
- .filter((e: any) => e != null)
2892
- .map((entry) => {
2893
- if (entry === null) {
2894
- return null as any;
2895
- }
2896
- return serializeAws_json1_1ExtendedKeyUsage(entry, context);
2897
- });
2898
- };
2899
-
2900
- const serializeAws_json1_1Extensions = (input: Extensions, context: __SerdeContext): any => {
2901
- return {
2902
- ...(input.CertificatePolicies !== undefined &&
2903
- input.CertificatePolicies !== null && {
2904
- CertificatePolicies: serializeAws_json1_1CertificatePolicyList(input.CertificatePolicies, context),
2905
- }),
2906
- ...(input.ExtendedKeyUsage !== undefined &&
2907
- input.ExtendedKeyUsage !== null && {
2908
- ExtendedKeyUsage: serializeAws_json1_1ExtendedKeyUsageList(input.ExtendedKeyUsage, context),
2909
- }),
2910
- ...(input.KeyUsage !== undefined &&
2911
- input.KeyUsage !== null && { KeyUsage: serializeAws_json1_1KeyUsage(input.KeyUsage, context) }),
2912
- ...(input.SubjectAlternativeNames !== undefined &&
2913
- input.SubjectAlternativeNames !== null && {
2914
- SubjectAlternativeNames: serializeAws_json1_1GeneralNameList(input.SubjectAlternativeNames, context),
2915
- }),
2916
- };
2917
- };
2918
-
2919
- const serializeAws_json1_1GeneralName = (input: GeneralName, context: __SerdeContext): any => {
2920
- return {
2921
- ...(input.DirectoryName !== undefined &&
2922
- input.DirectoryName !== null && { DirectoryName: serializeAws_json1_1ASN1Subject(input.DirectoryName, context) }),
2923
- ...(input.DnsName !== undefined && input.DnsName !== null && { DnsName: input.DnsName }),
2924
- ...(input.EdiPartyName !== undefined &&
2925
- input.EdiPartyName !== null && { EdiPartyName: serializeAws_json1_1EdiPartyName(input.EdiPartyName, context) }),
2926
- ...(input.IpAddress !== undefined && input.IpAddress !== null && { IpAddress: input.IpAddress }),
2927
- ...(input.OtherName !== undefined &&
2928
- input.OtherName !== null && { OtherName: serializeAws_json1_1OtherName(input.OtherName, context) }),
2929
- ...(input.RegisteredId !== undefined && input.RegisteredId !== null && { RegisteredId: input.RegisteredId }),
2930
- ...(input.Rfc822Name !== undefined && input.Rfc822Name !== null && { Rfc822Name: input.Rfc822Name }),
2931
- ...(input.UniformResourceIdentifier !== undefined &&
2932
- input.UniformResourceIdentifier !== null && { UniformResourceIdentifier: input.UniformResourceIdentifier }),
2933
- };
2934
- };
2935
-
2936
- const serializeAws_json1_1GeneralNameList = (input: GeneralName[], context: __SerdeContext): any => {
2937
- return input
2938
- .filter((e: any) => e != null)
2939
- .map((entry) => {
2940
- if (entry === null) {
2941
- return null as any;
2942
- }
2943
- return serializeAws_json1_1GeneralName(entry, context);
2944
- });
2945
- };
2946
-
2947
- const serializeAws_json1_1GetCertificateAuthorityCertificateRequest = (
2948
- input: GetCertificateAuthorityCertificateRequest,
2949
- context: __SerdeContext
2950
- ): any => {
2951
- return {
2952
- ...(input.CertificateAuthorityArn !== undefined &&
2953
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2954
- };
2955
- };
2956
-
2957
- const serializeAws_json1_1GetCertificateAuthorityCsrRequest = (
2958
- input: GetCertificateAuthorityCsrRequest,
2959
- context: __SerdeContext
2960
- ): any => {
2961
- return {
2962
- ...(input.CertificateAuthorityArn !== undefined &&
2963
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2964
- };
2965
- };
2966
-
2967
- const serializeAws_json1_1GetCertificateRequest = (input: GetCertificateRequest, context: __SerdeContext): any => {
2968
- return {
2969
- ...(input.CertificateArn !== undefined &&
2970
- input.CertificateArn !== null && { CertificateArn: input.CertificateArn }),
2971
- ...(input.CertificateAuthorityArn !== undefined &&
2972
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2973
- };
2974
- };
2975
-
2976
- const serializeAws_json1_1GetPolicyRequest = (input: GetPolicyRequest, context: __SerdeContext): any => {
2977
- return {
2978
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2979
- };
2980
- };
2981
-
2982
- const serializeAws_json1_1ImportCertificateAuthorityCertificateRequest = (
2983
- input: ImportCertificateAuthorityCertificateRequest,
2984
- context: __SerdeContext
2985
- ): any => {
2986
- return {
2987
- ...(input.Certificate !== undefined &&
2988
- input.Certificate !== null && { Certificate: context.base64Encoder(input.Certificate) }),
2989
- ...(input.CertificateAuthorityArn !== undefined &&
2990
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2991
- ...(input.CertificateChain !== undefined &&
2992
- input.CertificateChain !== null && { CertificateChain: context.base64Encoder(input.CertificateChain) }),
2993
- };
2994
- };
2995
-
2996
- const serializeAws_json1_1IssueCertificateRequest = (input: IssueCertificateRequest, context: __SerdeContext): any => {
2997
- return {
2998
- ...(input.ApiPassthrough !== undefined &&
2999
- input.ApiPassthrough !== null && {
3000
- ApiPassthrough: serializeAws_json1_1ApiPassthrough(input.ApiPassthrough, context),
3001
- }),
3002
- ...(input.CertificateAuthorityArn !== undefined &&
3003
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3004
- ...(input.Csr !== undefined && input.Csr !== null && { Csr: context.base64Encoder(input.Csr) }),
3005
- ...(input.IdempotencyToken !== undefined &&
3006
- input.IdempotencyToken !== null && { IdempotencyToken: input.IdempotencyToken }),
3007
- ...(input.SigningAlgorithm !== undefined &&
3008
- input.SigningAlgorithm !== null && { SigningAlgorithm: input.SigningAlgorithm }),
3009
- ...(input.TemplateArn !== undefined && input.TemplateArn !== null && { TemplateArn: input.TemplateArn }),
3010
- ...(input.Validity !== undefined &&
3011
- input.Validity !== null && { Validity: serializeAws_json1_1Validity(input.Validity, context) }),
3012
- ...(input.ValidityNotBefore !== undefined &&
3013
- input.ValidityNotBefore !== null && {
3014
- ValidityNotBefore: serializeAws_json1_1Validity(input.ValidityNotBefore, context),
3015
- }),
3016
- };
3017
- };
3018
-
3019
- const serializeAws_json1_1KeyUsage = (input: KeyUsage, context: __SerdeContext): any => {
3020
- return {
3021
- ...(input.CRLSign !== undefined && input.CRLSign !== null && { CRLSign: input.CRLSign }),
3022
- ...(input.DataEncipherment !== undefined &&
3023
- input.DataEncipherment !== null && { DataEncipherment: input.DataEncipherment }),
3024
- ...(input.DecipherOnly !== undefined && input.DecipherOnly !== null && { DecipherOnly: input.DecipherOnly }),
3025
- ...(input.DigitalSignature !== undefined &&
3026
- input.DigitalSignature !== null && { DigitalSignature: input.DigitalSignature }),
3027
- ...(input.EncipherOnly !== undefined && input.EncipherOnly !== null && { EncipherOnly: input.EncipherOnly }),
3028
- ...(input.KeyAgreement !== undefined && input.KeyAgreement !== null && { KeyAgreement: input.KeyAgreement }),
3029
- ...(input.KeyCertSign !== undefined && input.KeyCertSign !== null && { KeyCertSign: input.KeyCertSign }),
3030
- ...(input.KeyEncipherment !== undefined &&
3031
- input.KeyEncipherment !== null && { KeyEncipherment: input.KeyEncipherment }),
3032
- ...(input.NonRepudiation !== undefined &&
3033
- input.NonRepudiation !== null && { NonRepudiation: input.NonRepudiation }),
3034
- };
3035
- };
3036
-
3037
- const serializeAws_json1_1ListCertificateAuthoritiesRequest = (
3038
- input: ListCertificateAuthoritiesRequest,
3039
- context: __SerdeContext
3040
- ): any => {
3041
- return {
3042
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
3043
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
3044
- ...(input.ResourceOwner !== undefined && input.ResourceOwner !== null && { ResourceOwner: input.ResourceOwner }),
3045
- };
3046
- };
3047
-
3048
- const serializeAws_json1_1ListPermissionsRequest = (input: ListPermissionsRequest, context: __SerdeContext): any => {
3049
- return {
3050
- ...(input.CertificateAuthorityArn !== undefined &&
3051
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3052
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
3053
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
3054
- };
3055
- };
3056
-
3057
- const serializeAws_json1_1ListTagsRequest = (input: ListTagsRequest, context: __SerdeContext): any => {
3058
- return {
3059
- ...(input.CertificateAuthorityArn !== undefined &&
3060
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3061
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
3062
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
3063
- };
3064
- };
3065
-
3066
- const serializeAws_json1_1OcspConfiguration = (input: OcspConfiguration, context: __SerdeContext): any => {
3067
- return {
3068
- ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
3069
- ...(input.OcspCustomCname !== undefined &&
3070
- input.OcspCustomCname !== null && { OcspCustomCname: input.OcspCustomCname }),
3071
- };
3072
- };
3073
-
3074
- const serializeAws_json1_1OtherName = (input: OtherName, context: __SerdeContext): any => {
3075
- return {
3076
- ...(input.TypeId !== undefined && input.TypeId !== null && { TypeId: input.TypeId }),
3077
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
3078
- };
3079
- };
3080
-
3081
- const serializeAws_json1_1PolicyInformation = (input: PolicyInformation, context: __SerdeContext): any => {
3082
- return {
3083
- ...(input.CertPolicyId !== undefined && input.CertPolicyId !== null && { CertPolicyId: input.CertPolicyId }),
3084
- ...(input.PolicyQualifiers !== undefined &&
3085
- input.PolicyQualifiers !== null && {
3086
- PolicyQualifiers: serializeAws_json1_1PolicyQualifierInfoList(input.PolicyQualifiers, context),
3087
- }),
3088
- };
3089
- };
3090
-
3091
- const serializeAws_json1_1PolicyQualifierInfo = (input: PolicyQualifierInfo, context: __SerdeContext): any => {
3092
- return {
3093
- ...(input.PolicyQualifierId !== undefined &&
3094
- input.PolicyQualifierId !== null && { PolicyQualifierId: input.PolicyQualifierId }),
3095
- ...(input.Qualifier !== undefined &&
3096
- input.Qualifier !== null && { Qualifier: serializeAws_json1_1Qualifier(input.Qualifier, context) }),
3097
- };
3098
- };
3099
-
3100
- const serializeAws_json1_1PolicyQualifierInfoList = (input: PolicyQualifierInfo[], context: __SerdeContext): any => {
3101
- return input
3102
- .filter((e: any) => e != null)
3103
- .map((entry) => {
3104
- if (entry === null) {
3105
- return null as any;
3106
- }
3107
- return serializeAws_json1_1PolicyQualifierInfo(entry, context);
3108
- });
3109
- };
3110
-
3111
- const serializeAws_json1_1PutPolicyRequest = (input: PutPolicyRequest, context: __SerdeContext): any => {
3112
- return {
3113
- ...(input.Policy !== undefined && input.Policy !== null && { Policy: input.Policy }),
3114
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
3115
- };
3116
- };
3117
-
3118
- const serializeAws_json1_1Qualifier = (input: Qualifier, context: __SerdeContext): any => {
3119
- return {
3120
- ...(input.CpsUri !== undefined && input.CpsUri !== null && { CpsUri: input.CpsUri }),
3121
- };
3122
- };
3123
-
3124
- const serializeAws_json1_1RestoreCertificateAuthorityRequest = (
3125
- input: RestoreCertificateAuthorityRequest,
3126
- context: __SerdeContext
3127
- ): any => {
3128
- return {
3129
- ...(input.CertificateAuthorityArn !== undefined &&
3130
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3131
- };
3132
- };
3133
-
3134
- const serializeAws_json1_1RevocationConfiguration = (input: RevocationConfiguration, context: __SerdeContext): any => {
3135
- return {
3136
- ...(input.CrlConfiguration !== undefined &&
3137
- input.CrlConfiguration !== null && {
3138
- CrlConfiguration: serializeAws_json1_1CrlConfiguration(input.CrlConfiguration, context),
3139
- }),
3140
- ...(input.OcspConfiguration !== undefined &&
3141
- input.OcspConfiguration !== null && {
3142
- OcspConfiguration: serializeAws_json1_1OcspConfiguration(input.OcspConfiguration, context),
3143
- }),
3144
- };
3145
- };
3146
-
3147
- const serializeAws_json1_1RevokeCertificateRequest = (
3148
- input: RevokeCertificateRequest,
3149
- context: __SerdeContext
3150
- ): any => {
3151
- return {
3152
- ...(input.CertificateAuthorityArn !== undefined &&
3153
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3154
- ...(input.CertificateSerial !== undefined &&
3155
- input.CertificateSerial !== null && { CertificateSerial: input.CertificateSerial }),
3156
- ...(input.RevocationReason !== undefined &&
3157
- input.RevocationReason !== null && { RevocationReason: input.RevocationReason }),
3158
- };
3159
- };
3160
-
3161
- const serializeAws_json1_1Tag = (input: Tag, context: __SerdeContext): any => {
3162
- return {
3163
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
3164
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
3165
- };
3166
- };
3167
-
3168
- const serializeAws_json1_1TagCertificateAuthorityRequest = (
3169
- input: TagCertificateAuthorityRequest,
3170
- context: __SerdeContext
3171
- ): any => {
3172
- return {
3173
- ...(input.CertificateAuthorityArn !== undefined &&
3174
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3175
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
3176
- };
3177
- };
3178
-
3179
- const serializeAws_json1_1TagList = (input: Tag[], context: __SerdeContext): any => {
3180
- return input
3181
- .filter((e: any) => e != null)
3182
- .map((entry) => {
3183
- if (entry === null) {
3184
- return null as any;
3185
- }
3186
- return serializeAws_json1_1Tag(entry, context);
3187
- });
3188
- };
3189
-
3190
- const serializeAws_json1_1UntagCertificateAuthorityRequest = (
3191
- input: UntagCertificateAuthorityRequest,
3192
- context: __SerdeContext
3193
- ): any => {
3194
- return {
3195
- ...(input.CertificateAuthorityArn !== undefined &&
3196
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3197
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
3198
- };
3199
- };
3200
-
3201
- const serializeAws_json1_1UpdateCertificateAuthorityRequest = (
3202
- input: UpdateCertificateAuthorityRequest,
3203
- context: __SerdeContext
3204
- ): any => {
3205
- return {
3206
- ...(input.CertificateAuthorityArn !== undefined &&
3207
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3208
- ...(input.RevocationConfiguration !== undefined &&
3209
- input.RevocationConfiguration !== null && {
3210
- RevocationConfiguration: serializeAws_json1_1RevocationConfiguration(input.RevocationConfiguration, context),
3211
- }),
3212
- ...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
3213
- };
3214
- };
3215
-
3216
- const serializeAws_json1_1Validity = (input: Validity, context: __SerdeContext): any => {
3217
- return {
3218
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
3219
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
3220
- };
3221
- };
3222
-
3223
- const deserializeAws_json1_1AccessDescription = (output: any, context: __SerdeContext): AccessDescription => {
3224
- return {
3225
- AccessLocation:
3226
- output.AccessLocation !== undefined && output.AccessLocation !== null
3227
- ? deserializeAws_json1_1GeneralName(output.AccessLocation, context)
3228
- : undefined,
3229
- AccessMethod:
3230
- output.AccessMethod !== undefined && output.AccessMethod !== null
3231
- ? deserializeAws_json1_1AccessMethod(output.AccessMethod, context)
3232
- : undefined,
3233
- } as any;
3234
- };
3235
-
3236
- const deserializeAws_json1_1AccessDescriptionList = (output: any, context: __SerdeContext): AccessDescription[] => {
3237
- return (output || [])
3238
- .filter((e: any) => e != null)
3239
- .map((entry: any) => {
3240
- if (entry === null) {
3241
- return null as any;
3242
- }
3243
- return deserializeAws_json1_1AccessDescription(entry, context);
3244
- });
3245
- };
3246
-
3247
- const deserializeAws_json1_1AccessMethod = (output: any, context: __SerdeContext): AccessMethod => {
3248
- return {
3249
- AccessMethodType: __expectString(output.AccessMethodType),
3250
- CustomObjectIdentifier: __expectString(output.CustomObjectIdentifier),
3251
- } as any;
3252
- };
3253
-
3254
- const deserializeAws_json1_1ActionList = (output: any, context: __SerdeContext): (ActionType | string)[] => {
3255
- return (output || [])
3256
- .filter((e: any) => e != null)
3257
- .map((entry: any) => {
3258
- if (entry === null) {
3259
- return null as any;
3260
- }
3261
- return __expectString(entry) as any;
3262
- });
3263
- };
3264
-
3265
- const deserializeAws_json1_1ASN1Subject = (output: any, context: __SerdeContext): ASN1Subject => {
3266
- return {
3267
- CommonName: __expectString(output.CommonName),
3268
- Country: __expectString(output.Country),
3269
- DistinguishedNameQualifier: __expectString(output.DistinguishedNameQualifier),
3270
- GenerationQualifier: __expectString(output.GenerationQualifier),
3271
- GivenName: __expectString(output.GivenName),
3272
- Initials: __expectString(output.Initials),
3273
- Locality: __expectString(output.Locality),
3274
- Organization: __expectString(output.Organization),
3275
- OrganizationalUnit: __expectString(output.OrganizationalUnit),
3276
- Pseudonym: __expectString(output.Pseudonym),
3277
- SerialNumber: __expectString(output.SerialNumber),
3278
- State: __expectString(output.State),
3279
- Surname: __expectString(output.Surname),
3280
- Title: __expectString(output.Title),
3281
- } as any;
3282
- };
3283
-
3284
- const deserializeAws_json1_1CertificateAuthorities = (output: any, context: __SerdeContext): CertificateAuthority[] => {
3285
- return (output || [])
3286
- .filter((e: any) => e != null)
3287
- .map((entry: any) => {
3288
- if (entry === null) {
3289
- return null as any;
3290
- }
3291
- return deserializeAws_json1_1CertificateAuthority(entry, context);
3292
- });
3293
- };
3294
-
3295
- const deserializeAws_json1_1CertificateAuthority = (output: any, context: __SerdeContext): CertificateAuthority => {
3296
- return {
3297
- Arn: __expectString(output.Arn),
3298
- CertificateAuthorityConfiguration:
3299
- output.CertificateAuthorityConfiguration !== undefined && output.CertificateAuthorityConfiguration !== null
3300
- ? deserializeAws_json1_1CertificateAuthorityConfiguration(output.CertificateAuthorityConfiguration, context)
3301
- : undefined,
3302
- CreatedAt:
3303
- output.CreatedAt !== undefined && output.CreatedAt !== null
3304
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3305
- : undefined,
3306
- FailureReason: __expectString(output.FailureReason),
3307
- KeyStorageSecurityStandard: __expectString(output.KeyStorageSecurityStandard),
3308
- LastStateChangeAt:
3309
- output.LastStateChangeAt !== undefined && output.LastStateChangeAt !== null
3310
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastStateChangeAt)))
3311
- : undefined,
3312
- NotAfter:
3313
- output.NotAfter !== undefined && output.NotAfter !== null
3314
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotAfter)))
3315
- : undefined,
3316
- NotBefore:
3317
- output.NotBefore !== undefined && output.NotBefore !== null
3318
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotBefore)))
3319
- : undefined,
3320
- OwnerAccount: __expectString(output.OwnerAccount),
3321
- RestorableUntil:
3322
- output.RestorableUntil !== undefined && output.RestorableUntil !== null
3323
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RestorableUntil)))
3324
- : undefined,
3325
- RevocationConfiguration:
3326
- output.RevocationConfiguration !== undefined && output.RevocationConfiguration !== null
3327
- ? deserializeAws_json1_1RevocationConfiguration(output.RevocationConfiguration, context)
3328
- : undefined,
3329
- Serial: __expectString(output.Serial),
3330
- Status: __expectString(output.Status),
3331
- Type: __expectString(output.Type),
3332
- } as any;
3333
- };
3334
-
3335
- const deserializeAws_json1_1CertificateAuthorityConfiguration = (
3336
- output: any,
3337
- context: __SerdeContext
3338
- ): CertificateAuthorityConfiguration => {
3339
- return {
3340
- CsrExtensions:
3341
- output.CsrExtensions !== undefined && output.CsrExtensions !== null
3342
- ? deserializeAws_json1_1CsrExtensions(output.CsrExtensions, context)
3343
- : undefined,
3344
- KeyAlgorithm: __expectString(output.KeyAlgorithm),
3345
- SigningAlgorithm: __expectString(output.SigningAlgorithm),
3346
- Subject:
3347
- output.Subject !== undefined && output.Subject !== null
3348
- ? deserializeAws_json1_1ASN1Subject(output.Subject, context)
3349
- : undefined,
3350
- } as any;
3351
- };
3352
-
3353
- const deserializeAws_json1_1CertificateMismatchException = (
3354
- output: any,
3355
- context: __SerdeContext
3356
- ): CertificateMismatchException => {
3357
- return {
3358
- message: __expectString(output.message),
3359
- } as any;
3360
- };
3361
-
3362
- const deserializeAws_json1_1ConcurrentModificationException = (
3363
- output: any,
3364
- context: __SerdeContext
3365
- ): ConcurrentModificationException => {
3366
- return {
3367
- message: __expectString(output.message),
3368
- } as any;
3369
- };
3370
-
3371
- const deserializeAws_json1_1CreateCertificateAuthorityAuditReportResponse = (
3372
- output: any,
3373
- context: __SerdeContext
3374
- ): CreateCertificateAuthorityAuditReportResponse => {
3375
- return {
3376
- AuditReportId: __expectString(output.AuditReportId),
3377
- S3Key: __expectString(output.S3Key),
3378
- } as any;
3379
- };
3380
-
3381
- const deserializeAws_json1_1CreateCertificateAuthorityResponse = (
3382
- output: any,
3383
- context: __SerdeContext
3384
- ): CreateCertificateAuthorityResponse => {
3385
- return {
3386
- CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn),
3387
- } as any;
3388
- };
3389
-
3390
- const deserializeAws_json1_1CrlConfiguration = (output: any, context: __SerdeContext): CrlConfiguration => {
3391
- return {
3392
- CustomCname: __expectString(output.CustomCname),
3393
- Enabled: __expectBoolean(output.Enabled),
3394
- ExpirationInDays: __expectInt32(output.ExpirationInDays),
3395
- S3BucketName: __expectString(output.S3BucketName),
3396
- S3ObjectAcl: __expectString(output.S3ObjectAcl),
3397
- } as any;
3398
- };
3399
-
3400
- const deserializeAws_json1_1CsrExtensions = (output: any, context: __SerdeContext): CsrExtensions => {
3401
- return {
3402
- KeyUsage:
3403
- output.KeyUsage !== undefined && output.KeyUsage !== null
3404
- ? deserializeAws_json1_1KeyUsage(output.KeyUsage, context)
3405
- : undefined,
3406
- SubjectInformationAccess:
3407
- output.SubjectInformationAccess !== undefined && output.SubjectInformationAccess !== null
3408
- ? deserializeAws_json1_1AccessDescriptionList(output.SubjectInformationAccess, context)
3409
- : undefined,
3410
- } as any;
3411
- };
3412
-
3413
- const deserializeAws_json1_1DescribeCertificateAuthorityAuditReportResponse = (
3414
- output: any,
3415
- context: __SerdeContext
3416
- ): DescribeCertificateAuthorityAuditReportResponse => {
3417
- return {
3418
- AuditReportStatus: __expectString(output.AuditReportStatus),
3419
- CreatedAt:
3420
- output.CreatedAt !== undefined && output.CreatedAt !== null
3421
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3422
- : undefined,
3423
- S3BucketName: __expectString(output.S3BucketName),
3424
- S3Key: __expectString(output.S3Key),
3425
- } as any;
3426
- };
3427
-
3428
- const deserializeAws_json1_1DescribeCertificateAuthorityResponse = (
3429
- output: any,
3430
- context: __SerdeContext
3431
- ): DescribeCertificateAuthorityResponse => {
3432
- return {
3433
- CertificateAuthority:
3434
- output.CertificateAuthority !== undefined && output.CertificateAuthority !== null
3435
- ? deserializeAws_json1_1CertificateAuthority(output.CertificateAuthority, context)
3436
- : undefined,
3437
- } as any;
3438
- };
3439
-
3440
- const deserializeAws_json1_1EdiPartyName = (output: any, context: __SerdeContext): EdiPartyName => {
3441
- return {
3442
- NameAssigner: __expectString(output.NameAssigner),
3443
- PartyName: __expectString(output.PartyName),
3444
- } as any;
3445
- };
3446
-
3447
- const deserializeAws_json1_1GeneralName = (output: any, context: __SerdeContext): GeneralName => {
3448
- return {
3449
- DirectoryName:
3450
- output.DirectoryName !== undefined && output.DirectoryName !== null
3451
- ? deserializeAws_json1_1ASN1Subject(output.DirectoryName, context)
3452
- : undefined,
3453
- DnsName: __expectString(output.DnsName),
3454
- EdiPartyName:
3455
- output.EdiPartyName !== undefined && output.EdiPartyName !== null
3456
- ? deserializeAws_json1_1EdiPartyName(output.EdiPartyName, context)
3457
- : undefined,
3458
- IpAddress: __expectString(output.IpAddress),
3459
- OtherName:
3460
- output.OtherName !== undefined && output.OtherName !== null
3461
- ? deserializeAws_json1_1OtherName(output.OtherName, context)
3462
- : undefined,
3463
- RegisteredId: __expectString(output.RegisteredId),
3464
- Rfc822Name: __expectString(output.Rfc822Name),
3465
- UniformResourceIdentifier: __expectString(output.UniformResourceIdentifier),
3466
- } as any;
3467
- };
3468
-
3469
- const deserializeAws_json1_1GetCertificateAuthorityCertificateResponse = (
3470
- output: any,
3471
- context: __SerdeContext
3472
- ): GetCertificateAuthorityCertificateResponse => {
3473
- return {
3474
- Certificate: __expectString(output.Certificate),
3475
- CertificateChain: __expectString(output.CertificateChain),
3476
- } as any;
3477
- };
3478
-
3479
- const deserializeAws_json1_1GetCertificateAuthorityCsrResponse = (
3480
- output: any,
3481
- context: __SerdeContext
3482
- ): GetCertificateAuthorityCsrResponse => {
3483
- return {
3484
- Csr: __expectString(output.Csr),
3485
- } as any;
3486
- };
3487
-
3488
- const deserializeAws_json1_1GetCertificateResponse = (output: any, context: __SerdeContext): GetCertificateResponse => {
3489
- return {
3490
- Certificate: __expectString(output.Certificate),
3491
- CertificateChain: __expectString(output.CertificateChain),
3492
- } as any;
3493
- };
3494
-
3495
- const deserializeAws_json1_1GetPolicyResponse = (output: any, context: __SerdeContext): GetPolicyResponse => {
3496
- return {
3497
- Policy: __expectString(output.Policy),
3498
- } as any;
3499
- };
3500
-
3501
- const deserializeAws_json1_1InvalidArgsException = (output: any, context: __SerdeContext): InvalidArgsException => {
3502
- return {
3503
- message: __expectString(output.message),
3504
- } as any;
3505
- };
3506
-
3507
- const deserializeAws_json1_1InvalidArnException = (output: any, context: __SerdeContext): InvalidArnException => {
3508
- return {
3509
- message: __expectString(output.message),
3510
- } as any;
3511
- };
3512
-
3513
- const deserializeAws_json1_1InvalidNextTokenException = (
3514
- output: any,
3515
- context: __SerdeContext
3516
- ): InvalidNextTokenException => {
3517
- return {
3518
- message: __expectString(output.message),
3519
- } as any;
3520
- };
3521
-
3522
- const deserializeAws_json1_1InvalidPolicyException = (output: any, context: __SerdeContext): InvalidPolicyException => {
3523
- return {
3524
- message: __expectString(output.message),
3525
- } as any;
3526
- };
3527
-
3528
- const deserializeAws_json1_1InvalidRequestException = (
3529
- output: any,
3530
- context: __SerdeContext
3531
- ): InvalidRequestException => {
3532
- return {
3533
- message: __expectString(output.message),
3534
- } as any;
3535
- };
3536
-
3537
- const deserializeAws_json1_1InvalidStateException = (output: any, context: __SerdeContext): InvalidStateException => {
3538
- return {
3539
- message: __expectString(output.message),
3540
- } as any;
3541
- };
3542
-
3543
- const deserializeAws_json1_1InvalidTagException = (output: any, context: __SerdeContext): InvalidTagException => {
3544
- return {
3545
- message: __expectString(output.message),
3546
- } as any;
3547
- };
3548
-
3549
- const deserializeAws_json1_1IssueCertificateResponse = (
3550
- output: any,
3551
- context: __SerdeContext
3552
- ): IssueCertificateResponse => {
3553
- return {
3554
- CertificateArn: __expectString(output.CertificateArn),
3555
- } as any;
3556
- };
3557
-
3558
- const deserializeAws_json1_1KeyUsage = (output: any, context: __SerdeContext): KeyUsage => {
3559
- return {
3560
- CRLSign: __expectBoolean(output.CRLSign),
3561
- DataEncipherment: __expectBoolean(output.DataEncipherment),
3562
- DecipherOnly: __expectBoolean(output.DecipherOnly),
3563
- DigitalSignature: __expectBoolean(output.DigitalSignature),
3564
- EncipherOnly: __expectBoolean(output.EncipherOnly),
3565
- KeyAgreement: __expectBoolean(output.KeyAgreement),
3566
- KeyCertSign: __expectBoolean(output.KeyCertSign),
3567
- KeyEncipherment: __expectBoolean(output.KeyEncipherment),
3568
- NonRepudiation: __expectBoolean(output.NonRepudiation),
3569
- } as any;
3570
- };
3571
-
3572
- const deserializeAws_json1_1LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => {
3573
- return {
3574
- message: __expectString(output.message),
3575
- } as any;
3576
- };
3577
-
3578
- const deserializeAws_json1_1ListCertificateAuthoritiesResponse = (
3579
- output: any,
3580
- context: __SerdeContext
3581
- ): ListCertificateAuthoritiesResponse => {
3582
- return {
3583
- CertificateAuthorities:
3584
- output.CertificateAuthorities !== undefined && output.CertificateAuthorities !== null
3585
- ? deserializeAws_json1_1CertificateAuthorities(output.CertificateAuthorities, context)
3586
- : undefined,
3587
- NextToken: __expectString(output.NextToken),
3588
- } as any;
3589
- };
3590
-
3591
- const deserializeAws_json1_1ListPermissionsResponse = (
3592
- output: any,
3593
- context: __SerdeContext
3594
- ): ListPermissionsResponse => {
3595
- return {
3596
- NextToken: __expectString(output.NextToken),
3597
- Permissions:
3598
- output.Permissions !== undefined && output.Permissions !== null
3599
- ? deserializeAws_json1_1PermissionList(output.Permissions, context)
3600
- : undefined,
3601
- } as any;
3602
- };
3603
-
3604
- const deserializeAws_json1_1ListTagsResponse = (output: any, context: __SerdeContext): ListTagsResponse => {
3605
- return {
3606
- NextToken: __expectString(output.NextToken),
3607
- Tags:
3608
- output.Tags !== undefined && output.Tags !== null
3609
- ? deserializeAws_json1_1TagList(output.Tags, context)
3610
- : undefined,
3611
- } as any;
3612
- };
3613
-
3614
- const deserializeAws_json1_1LockoutPreventedException = (
3615
- output: any,
3616
- context: __SerdeContext
3617
- ): LockoutPreventedException => {
3618
- return {
3619
- message: __expectString(output.message),
3620
- } as any;
3621
- };
3622
-
3623
- const deserializeAws_json1_1MalformedCertificateException = (
3624
- output: any,
3625
- context: __SerdeContext
3626
- ): MalformedCertificateException => {
3627
- return {
3628
- message: __expectString(output.message),
3629
- } as any;
3630
- };
3631
-
3632
- const deserializeAws_json1_1MalformedCSRException = (output: any, context: __SerdeContext): MalformedCSRException => {
3633
- return {
3634
- message: __expectString(output.message),
3635
- } as any;
3636
- };
3637
-
3638
- const deserializeAws_json1_1OcspConfiguration = (output: any, context: __SerdeContext): OcspConfiguration => {
3639
- return {
3640
- Enabled: __expectBoolean(output.Enabled),
3641
- OcspCustomCname: __expectString(output.OcspCustomCname),
3642
- } as any;
3643
- };
3644
-
3645
- const deserializeAws_json1_1OtherName = (output: any, context: __SerdeContext): OtherName => {
3646
- return {
3647
- TypeId: __expectString(output.TypeId),
3648
- Value: __expectString(output.Value),
3649
- } as any;
3650
- };
3651
-
3652
- const deserializeAws_json1_1Permission = (output: any, context: __SerdeContext): Permission => {
3653
- return {
3654
- Actions:
3655
- output.Actions !== undefined && output.Actions !== null
3656
- ? deserializeAws_json1_1ActionList(output.Actions, context)
3657
- : undefined,
3658
- CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn),
3659
- CreatedAt:
3660
- output.CreatedAt !== undefined && output.CreatedAt !== null
3661
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3662
- : undefined,
3663
- Policy: __expectString(output.Policy),
3664
- Principal: __expectString(output.Principal),
3665
- SourceAccount: __expectString(output.SourceAccount),
3666
- } as any;
3667
- };
3668
-
3669
- const deserializeAws_json1_1PermissionAlreadyExistsException = (
3670
- output: any,
3671
- context: __SerdeContext
3672
- ): PermissionAlreadyExistsException => {
3673
- return {
3674
- message: __expectString(output.message),
3675
- } as any;
3676
- };
3677
-
3678
- const deserializeAws_json1_1PermissionList = (output: any, context: __SerdeContext): Permission[] => {
3679
- return (output || [])
3680
- .filter((e: any) => e != null)
3681
- .map((entry: any) => {
3682
- if (entry === null) {
3683
- return null as any;
3684
- }
3685
- return deserializeAws_json1_1Permission(entry, context);
3686
- });
3687
- };
3688
-
3689
- const deserializeAws_json1_1RequestAlreadyProcessedException = (
3690
- output: any,
3691
- context: __SerdeContext
3692
- ): RequestAlreadyProcessedException => {
3693
- return {
3694
- message: __expectString(output.message),
3695
- } as any;
3696
- };
3697
-
3698
- const deserializeAws_json1_1RequestFailedException = (output: any, context: __SerdeContext): RequestFailedException => {
3699
- return {
3700
- message: __expectString(output.message),
3701
- } as any;
3702
- };
3703
-
3704
- const deserializeAws_json1_1RequestInProgressException = (
3705
- output: any,
3706
- context: __SerdeContext
3707
- ): RequestInProgressException => {
3708
- return {
3709
- message: __expectString(output.message),
3710
- } as any;
3711
- };
3712
-
3713
- const deserializeAws_json1_1ResourceNotFoundException = (
3714
- output: any,
3715
- context: __SerdeContext
3716
- ): ResourceNotFoundException => {
3717
- return {
3718
- message: __expectString(output.message),
3719
- } as any;
3720
- };
3721
-
3722
- const deserializeAws_json1_1RevocationConfiguration = (
3723
- output: any,
3724
- context: __SerdeContext
3725
- ): RevocationConfiguration => {
3726
- return {
3727
- CrlConfiguration:
3728
- output.CrlConfiguration !== undefined && output.CrlConfiguration !== null
3729
- ? deserializeAws_json1_1CrlConfiguration(output.CrlConfiguration, context)
3730
- : undefined,
3731
- OcspConfiguration:
3732
- output.OcspConfiguration !== undefined && output.OcspConfiguration !== null
3733
- ? deserializeAws_json1_1OcspConfiguration(output.OcspConfiguration, context)
3734
- : undefined,
3735
- } as any;
3736
- };
3737
-
3738
- const deserializeAws_json1_1Tag = (output: any, context: __SerdeContext): Tag => {
3739
- return {
3740
- Key: __expectString(output.Key),
3741
- Value: __expectString(output.Value),
3742
- } as any;
3743
- };
3744
-
3745
- const deserializeAws_json1_1TagList = (output: any, context: __SerdeContext): Tag[] => {
3746
- return (output || [])
3747
- .filter((e: any) => e != null)
3748
- .map((entry: any) => {
3749
- if (entry === null) {
3750
- return null as any;
3751
- }
3752
- return deserializeAws_json1_1Tag(entry, context);
3753
- });
3754
- };
3755
-
3756
- const deserializeAws_json1_1TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => {
3757
- return {
3758
- message: __expectString(output.message),
3759
- } as any;
3760
- };
3761
-
3762
- const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
3763
- httpStatusCode: output.statusCode,
3764
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
3765
- extendedRequestId: output.headers["x-amz-id-2"],
3766
- cfId: output.headers["x-amz-cf-id"],
3767
- });
3768
-
3769
- // Collect low-level response body stream to Uint8Array.
3770
- const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
3771
- if (streamBody instanceof Uint8Array) {
3772
- return Promise.resolve(streamBody);
3773
- }
3774
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3775
- };
3776
-
3777
- // Encode Uint8Array data into string with utf-8.
3778
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
3779
- collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
3780
-
3781
- const buildHttpRpcRequest = async (
3782
- context: __SerdeContext,
3783
- headers: __HeaderBag,
3784
- path: string,
3785
- resolvedHostname: string | undefined,
3786
- body: any
3787
- ): Promise<__HttpRequest> => {
3788
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3789
- const contents: any = {
3790
- protocol,
3791
- hostname,
3792
- port,
3793
- method: "POST",
3794
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
3795
- headers,
3796
- };
3797
- if (resolvedHostname !== undefined) {
3798
- contents.hostname = resolvedHostname;
3799
- }
3800
- if (body !== undefined) {
3801
- contents.body = body;
3802
- }
3803
- return new __HttpRequest(contents);
3804
- };
3805
-
3806
- const parseBody = (streamBody: any, context: __SerdeContext): any =>
3807
- collectBodyString(streamBody, context).then((encoded) => {
3808
- if (encoded.length) {
3809
- return JSON.parse(encoded);
3810
- }
3811
- return {};
3812
- });
3813
-
3814
- /**
3815
- * Load an error code for the aws.rest-json-1.1 protocol.
3816
- */
3817
- const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
3818
- const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3819
-
3820
- const sanitizeErrorCode = (rawValue: string): string => {
3821
- let cleanValue = rawValue;
3822
- if (cleanValue.indexOf(":") >= 0) {
3823
- cleanValue = cleanValue.split(":")[0];
3824
- }
3825
- if (cleanValue.indexOf("#") >= 0) {
3826
- cleanValue = cleanValue.split("#")[1];
3827
- }
3828
- return cleanValue;
3829
- };
3830
-
3831
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3832
- if (headerKey !== undefined) {
3833
- return sanitizeErrorCode(output.headers[headerKey]);
3834
- }
3835
-
3836
- if (data.code !== undefined) {
3837
- return sanitizeErrorCode(data.code);
3838
- }
3839
-
3840
- if (data["__type"] !== undefined) {
3841
- return sanitizeErrorCode(data["__type"]);
3842
- }
3843
-
3844
- return "";
3845
- };