@aws-sdk/client-payment-cryptography 3.349.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.
- package/LICENSE +201 -0
- package/README.md +369 -0
- package/dist-cjs/PaymentCryptography.js +51 -0
- package/dist-cjs/PaymentCryptographyClient.js +41 -0
- package/dist-cjs/commands/CreateAliasCommand.js +46 -0
- package/dist-cjs/commands/CreateKeyCommand.js +46 -0
- package/dist-cjs/commands/DeleteAliasCommand.js +46 -0
- package/dist-cjs/commands/DeleteKeyCommand.js +46 -0
- package/dist-cjs/commands/ExportKeyCommand.js +47 -0
- package/dist-cjs/commands/GetAliasCommand.js +46 -0
- package/dist-cjs/commands/GetKeyCommand.js +46 -0
- package/dist-cjs/commands/GetParametersForExportCommand.js +47 -0
- package/dist-cjs/commands/GetParametersForImportCommand.js +47 -0
- package/dist-cjs/commands/GetPublicKeyCertificateCommand.js +47 -0
- package/dist-cjs/commands/ImportKeyCommand.js +47 -0
- package/dist-cjs/commands/ListAliasesCommand.js +46 -0
- package/dist-cjs/commands/ListKeysCommand.js +46 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
- package/dist-cjs/commands/RestoreKeyCommand.js +46 -0
- package/dist-cjs/commands/StartKeyUsageCommand.js +46 -0
- package/dist-cjs/commands/StopKeyUsageCommand.js +46 -0
- package/dist-cjs/commands/TagResourceCommand.js +46 -0
- package/dist-cjs/commands/UntagResourceCommand.js +46 -0
- package/dist-cjs/commands/UpdateAliasCommand.js +46 -0
- package/dist-cjs/commands/index.js +23 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/PaymentCryptographyServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +291 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListAliasesPaginator.js +29 -0
- package/dist-cjs/pagination/ListKeysPaginator.js +29 -0
- package/dist-cjs/pagination/ListTagsForResourcePaginator.js +29 -0
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_json1_0.js +1396 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +48 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +21 -0
- package/dist-es/PaymentCryptography.js +47 -0
- package/dist-es/PaymentCryptographyClient.js +37 -0
- package/dist-es/commands/CreateAliasCommand.js +42 -0
- package/dist-es/commands/CreateKeyCommand.js +42 -0
- package/dist-es/commands/DeleteAliasCommand.js +42 -0
- package/dist-es/commands/DeleteKeyCommand.js +42 -0
- package/dist-es/commands/ExportKeyCommand.js +43 -0
- package/dist-es/commands/GetAliasCommand.js +42 -0
- package/dist-es/commands/GetKeyCommand.js +42 -0
- package/dist-es/commands/GetParametersForExportCommand.js +43 -0
- package/dist-es/commands/GetParametersForImportCommand.js +43 -0
- package/dist-es/commands/GetPublicKeyCertificateCommand.js +43 -0
- package/dist-es/commands/ImportKeyCommand.js +43 -0
- package/dist-es/commands/ListAliasesCommand.js +42 -0
- package/dist-es/commands/ListKeysCommand.js +42 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
- package/dist-es/commands/RestoreKeyCommand.js +42 -0
- package/dist-es/commands/StartKeyUsageCommand.js +42 -0
- package/dist-es/commands/StopKeyUsageCommand.js +42 -0
- package/dist-es/commands/TagResourceCommand.js +42 -0
- package/dist-es/commands/UntagResourceCommand.js +42 -0
- package/dist-es/commands/UpdateAliasCommand.js +42 -0
- package/dist-es/commands/index.js +20 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/PaymentCryptographyServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +267 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListAliasesPaginator.js +25 -0
- package/dist-es/pagination/ListKeysPaginator.js +25 -0
- package/dist-es/pagination/ListTagsForResourcePaginator.js +25 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_json1_0.js +1353 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +43 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +17 -0
- package/dist-types/PaymentCryptography.d.ts +154 -0
- package/dist-types/PaymentCryptographyClient.d.ts +186 -0
- package/dist-types/commands/CreateAliasCommand.d.ts +130 -0
- package/dist-types/commands/CreateKeyCommand.d.ts +175 -0
- package/dist-types/commands/DeleteAliasCommand.d.ts +120 -0
- package/dist-types/commands/DeleteKeyCommand.d.ts +149 -0
- package/dist-types/commands/ExportKeyCommand.d.ts +153 -0
- package/dist-types/commands/GetAliasCommand.d.ts +121 -0
- package/dist-types/commands/GetKeyCommand.d.ts +142 -0
- package/dist-types/commands/GetParametersForExportCommand.d.ts +120 -0
- package/dist-types/commands/GetParametersForImportCommand.d.ts +120 -0
- package/dist-types/commands/GetPublicKeyCertificateCommand.d.ts +95 -0
- package/dist-types/commands/ImportKeyCommand.d.ts +301 -0
- package/dist-types/commands/ListAliasesCommand.d.ts +127 -0
- package/dist-types/commands/ListKeysCommand.d.ts +143 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +119 -0
- package/dist-types/commands/RestoreKeyCommand.d.ts +150 -0
- package/dist-types/commands/StartKeyUsageCommand.d.ts +138 -0
- package/dist-types/commands/StopKeyUsageCommand.d.ts +144 -0
- package/dist-types/commands/TagResourceCommand.d.ts +122 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +115 -0
- package/dist-types/commands/UpdateAliasCommand.d.ts +125 -0
- package/dist-types/commands/index.d.ts +20 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +20 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/index.d.ts +15 -0
- package/dist-types/models/PaymentCryptographyServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1222 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListAliasesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListKeysPaginator.d.ts +7 -0
- package/dist-types/pagination/ListTagsForResourcePaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/protocols/Aws_json1_0.d.ts +182 -0
- package/dist-types/runtimeConfig.browser.d.ts +42 -0
- package/dist-types/runtimeConfig.d.ts +42 -0
- package/dist-types/runtimeConfig.native.d.ts +41 -0
- package/dist-types/runtimeConfig.shared.d.ts +18 -0
- package/dist-types/ts3.4/PaymentCryptography.d.ts +347 -0
- package/dist-types/ts3.4/PaymentCryptographyClient.d.ts +235 -0
- package/dist-types/ts3.4/commands/CreateAliasCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/CreateKeyCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/DeleteAliasCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/DeleteKeyCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ExportKeyCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetAliasCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetKeyCommand.d.ts +33 -0
- package/dist-types/ts3.4/commands/GetParametersForExportCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetParametersForImportCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetPublicKeyCertificateCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ImportKeyCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListAliasesCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListKeysCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/RestoreKeyCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/StartKeyUsageCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/StopKeyUsageCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UpdateAliasCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/index.d.ts +20 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +32 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/PaymentCryptographyServiceException.d.ts +8 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +490 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListAliasesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListKeysPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListTagsForResourcePaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +245 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +96 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +93 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +87 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +20 -0
- package/package.json +99 -0
|
@@ -0,0 +1,1353 @@
|
|
|
1
|
+
import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
+
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ServiceUnavailableException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
4
|
+
import { PaymentCryptographyServiceException as __BaseException } from "../models/PaymentCryptographyServiceException";
|
|
5
|
+
export const se_CreateAliasCommand = async (input, context) => {
|
|
6
|
+
const headers = sharedHeaders("CreateAlias");
|
|
7
|
+
let body;
|
|
8
|
+
body = JSON.stringify(_json(input));
|
|
9
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
10
|
+
};
|
|
11
|
+
export const se_CreateKeyCommand = async (input, context) => {
|
|
12
|
+
const headers = sharedHeaders("CreateKey");
|
|
13
|
+
let body;
|
|
14
|
+
body = JSON.stringify(_json(input));
|
|
15
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
16
|
+
};
|
|
17
|
+
export const se_DeleteAliasCommand = async (input, context) => {
|
|
18
|
+
const headers = sharedHeaders("DeleteAlias");
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify(_json(input));
|
|
21
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
+
};
|
|
23
|
+
export const se_DeleteKeyCommand = async (input, context) => {
|
|
24
|
+
const headers = sharedHeaders("DeleteKey");
|
|
25
|
+
let body;
|
|
26
|
+
body = JSON.stringify(_json(input));
|
|
27
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
28
|
+
};
|
|
29
|
+
export const se_ExportKeyCommand = async (input, context) => {
|
|
30
|
+
const headers = sharedHeaders("ExportKey");
|
|
31
|
+
let body;
|
|
32
|
+
body = JSON.stringify(_json(input));
|
|
33
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
|
+
};
|
|
35
|
+
export const se_GetAliasCommand = async (input, context) => {
|
|
36
|
+
const headers = sharedHeaders("GetAlias");
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify(_json(input));
|
|
39
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
+
};
|
|
41
|
+
export const se_GetKeyCommand = async (input, context) => {
|
|
42
|
+
const headers = sharedHeaders("GetKey");
|
|
43
|
+
let body;
|
|
44
|
+
body = JSON.stringify(_json(input));
|
|
45
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
46
|
+
};
|
|
47
|
+
export const se_GetParametersForExportCommand = async (input, context) => {
|
|
48
|
+
const headers = sharedHeaders("GetParametersForExport");
|
|
49
|
+
let body;
|
|
50
|
+
body = JSON.stringify(_json(input));
|
|
51
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
52
|
+
};
|
|
53
|
+
export const se_GetParametersForImportCommand = async (input, context) => {
|
|
54
|
+
const headers = sharedHeaders("GetParametersForImport");
|
|
55
|
+
let body;
|
|
56
|
+
body = JSON.stringify(_json(input));
|
|
57
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
|
+
};
|
|
59
|
+
export const se_GetPublicKeyCertificateCommand = async (input, context) => {
|
|
60
|
+
const headers = sharedHeaders("GetPublicKeyCertificate");
|
|
61
|
+
let body;
|
|
62
|
+
body = JSON.stringify(_json(input));
|
|
63
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
64
|
+
};
|
|
65
|
+
export const se_ImportKeyCommand = async (input, context) => {
|
|
66
|
+
const headers = sharedHeaders("ImportKey");
|
|
67
|
+
let body;
|
|
68
|
+
body = JSON.stringify(_json(input));
|
|
69
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
70
|
+
};
|
|
71
|
+
export const se_ListAliasesCommand = async (input, context) => {
|
|
72
|
+
const headers = sharedHeaders("ListAliases");
|
|
73
|
+
let body;
|
|
74
|
+
body = JSON.stringify(_json(input));
|
|
75
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
+
};
|
|
77
|
+
export const se_ListKeysCommand = async (input, context) => {
|
|
78
|
+
const headers = sharedHeaders("ListKeys");
|
|
79
|
+
let body;
|
|
80
|
+
body = JSON.stringify(_json(input));
|
|
81
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
82
|
+
};
|
|
83
|
+
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
84
|
+
const headers = sharedHeaders("ListTagsForResource");
|
|
85
|
+
let body;
|
|
86
|
+
body = JSON.stringify(_json(input));
|
|
87
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
88
|
+
};
|
|
89
|
+
export const se_RestoreKeyCommand = async (input, context) => {
|
|
90
|
+
const headers = sharedHeaders("RestoreKey");
|
|
91
|
+
let body;
|
|
92
|
+
body = JSON.stringify(_json(input));
|
|
93
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
94
|
+
};
|
|
95
|
+
export const se_StartKeyUsageCommand = async (input, context) => {
|
|
96
|
+
const headers = sharedHeaders("StartKeyUsage");
|
|
97
|
+
let body;
|
|
98
|
+
body = JSON.stringify(_json(input));
|
|
99
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
100
|
+
};
|
|
101
|
+
export const se_StopKeyUsageCommand = async (input, context) => {
|
|
102
|
+
const headers = sharedHeaders("StopKeyUsage");
|
|
103
|
+
let body;
|
|
104
|
+
body = JSON.stringify(_json(input));
|
|
105
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
106
|
+
};
|
|
107
|
+
export const se_TagResourceCommand = async (input, context) => {
|
|
108
|
+
const headers = sharedHeaders("TagResource");
|
|
109
|
+
let body;
|
|
110
|
+
body = JSON.stringify(_json(input));
|
|
111
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
112
|
+
};
|
|
113
|
+
export const se_UntagResourceCommand = async (input, context) => {
|
|
114
|
+
const headers = sharedHeaders("UntagResource");
|
|
115
|
+
let body;
|
|
116
|
+
body = JSON.stringify(_json(input));
|
|
117
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
118
|
+
};
|
|
119
|
+
export const se_UpdateAliasCommand = async (input, context) => {
|
|
120
|
+
const headers = sharedHeaders("UpdateAlias");
|
|
121
|
+
let body;
|
|
122
|
+
body = JSON.stringify(_json(input));
|
|
123
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
124
|
+
};
|
|
125
|
+
export const de_CreateAliasCommand = async (output, context) => {
|
|
126
|
+
if (output.statusCode >= 300) {
|
|
127
|
+
return de_CreateAliasCommandError(output, context);
|
|
128
|
+
}
|
|
129
|
+
const data = await parseBody(output.body, context);
|
|
130
|
+
let contents = {};
|
|
131
|
+
contents = _json(data);
|
|
132
|
+
const response = {
|
|
133
|
+
$metadata: deserializeMetadata(output),
|
|
134
|
+
...contents,
|
|
135
|
+
};
|
|
136
|
+
return response;
|
|
137
|
+
};
|
|
138
|
+
const de_CreateAliasCommandError = async (output, context) => {
|
|
139
|
+
const parsedOutput = {
|
|
140
|
+
...output,
|
|
141
|
+
body: await parseErrorBody(output.body, context),
|
|
142
|
+
};
|
|
143
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
144
|
+
switch (errorCode) {
|
|
145
|
+
case "AccessDeniedException":
|
|
146
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
147
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
148
|
+
case "ConflictException":
|
|
149
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
150
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
151
|
+
case "InternalServerException":
|
|
152
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
153
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
154
|
+
case "ResourceNotFoundException":
|
|
155
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
156
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
157
|
+
case "ServiceQuotaExceededException":
|
|
158
|
+
case "com.amazonaws.paymentcryptography#ServiceQuotaExceededException":
|
|
159
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
160
|
+
case "ServiceUnavailableException":
|
|
161
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
162
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
163
|
+
case "ThrottlingException":
|
|
164
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
165
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
166
|
+
case "ValidationException":
|
|
167
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
168
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
169
|
+
default:
|
|
170
|
+
const parsedBody = parsedOutput.body;
|
|
171
|
+
return throwDefaultError({
|
|
172
|
+
output,
|
|
173
|
+
parsedBody,
|
|
174
|
+
errorCode,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
export const de_CreateKeyCommand = async (output, context) => {
|
|
179
|
+
if (output.statusCode >= 300) {
|
|
180
|
+
return de_CreateKeyCommandError(output, context);
|
|
181
|
+
}
|
|
182
|
+
const data = await parseBody(output.body, context);
|
|
183
|
+
let contents = {};
|
|
184
|
+
contents = de_CreateKeyOutput(data, context);
|
|
185
|
+
const response = {
|
|
186
|
+
$metadata: deserializeMetadata(output),
|
|
187
|
+
...contents,
|
|
188
|
+
};
|
|
189
|
+
return response;
|
|
190
|
+
};
|
|
191
|
+
const de_CreateKeyCommandError = async (output, context) => {
|
|
192
|
+
const parsedOutput = {
|
|
193
|
+
...output,
|
|
194
|
+
body: await parseErrorBody(output.body, context),
|
|
195
|
+
};
|
|
196
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
197
|
+
switch (errorCode) {
|
|
198
|
+
case "AccessDeniedException":
|
|
199
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
200
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
201
|
+
case "ConflictException":
|
|
202
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
203
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
204
|
+
case "InternalServerException":
|
|
205
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
206
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
207
|
+
case "ResourceNotFoundException":
|
|
208
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
209
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
210
|
+
case "ServiceQuotaExceededException":
|
|
211
|
+
case "com.amazonaws.paymentcryptography#ServiceQuotaExceededException":
|
|
212
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
213
|
+
case "ServiceUnavailableException":
|
|
214
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
215
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
216
|
+
case "ThrottlingException":
|
|
217
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
218
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
219
|
+
case "ValidationException":
|
|
220
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
221
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
222
|
+
default:
|
|
223
|
+
const parsedBody = parsedOutput.body;
|
|
224
|
+
return throwDefaultError({
|
|
225
|
+
output,
|
|
226
|
+
parsedBody,
|
|
227
|
+
errorCode,
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
export const de_DeleteAliasCommand = async (output, context) => {
|
|
232
|
+
if (output.statusCode >= 300) {
|
|
233
|
+
return de_DeleteAliasCommandError(output, context);
|
|
234
|
+
}
|
|
235
|
+
const data = await parseBody(output.body, context);
|
|
236
|
+
let contents = {};
|
|
237
|
+
contents = _json(data);
|
|
238
|
+
const response = {
|
|
239
|
+
$metadata: deserializeMetadata(output),
|
|
240
|
+
...contents,
|
|
241
|
+
};
|
|
242
|
+
return response;
|
|
243
|
+
};
|
|
244
|
+
const de_DeleteAliasCommandError = async (output, context) => {
|
|
245
|
+
const parsedOutput = {
|
|
246
|
+
...output,
|
|
247
|
+
body: await parseErrorBody(output.body, context),
|
|
248
|
+
};
|
|
249
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
250
|
+
switch (errorCode) {
|
|
251
|
+
case "AccessDeniedException":
|
|
252
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
253
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
254
|
+
case "ConflictException":
|
|
255
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
256
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
257
|
+
case "InternalServerException":
|
|
258
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
259
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
260
|
+
case "ResourceNotFoundException":
|
|
261
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
262
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
263
|
+
case "ServiceUnavailableException":
|
|
264
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
265
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
266
|
+
case "ThrottlingException":
|
|
267
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
268
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
269
|
+
case "ValidationException":
|
|
270
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
271
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
272
|
+
default:
|
|
273
|
+
const parsedBody = parsedOutput.body;
|
|
274
|
+
return throwDefaultError({
|
|
275
|
+
output,
|
|
276
|
+
parsedBody,
|
|
277
|
+
errorCode,
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
export const de_DeleteKeyCommand = async (output, context) => {
|
|
282
|
+
if (output.statusCode >= 300) {
|
|
283
|
+
return de_DeleteKeyCommandError(output, context);
|
|
284
|
+
}
|
|
285
|
+
const data = await parseBody(output.body, context);
|
|
286
|
+
let contents = {};
|
|
287
|
+
contents = de_DeleteKeyOutput(data, context);
|
|
288
|
+
const response = {
|
|
289
|
+
$metadata: deserializeMetadata(output),
|
|
290
|
+
...contents,
|
|
291
|
+
};
|
|
292
|
+
return response;
|
|
293
|
+
};
|
|
294
|
+
const de_DeleteKeyCommandError = async (output, context) => {
|
|
295
|
+
const parsedOutput = {
|
|
296
|
+
...output,
|
|
297
|
+
body: await parseErrorBody(output.body, context),
|
|
298
|
+
};
|
|
299
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
300
|
+
switch (errorCode) {
|
|
301
|
+
case "AccessDeniedException":
|
|
302
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
303
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
304
|
+
case "ConflictException":
|
|
305
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
306
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
307
|
+
case "InternalServerException":
|
|
308
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
309
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
310
|
+
case "ResourceNotFoundException":
|
|
311
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
312
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
313
|
+
case "ServiceUnavailableException":
|
|
314
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
315
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
316
|
+
case "ThrottlingException":
|
|
317
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
318
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
319
|
+
case "ValidationException":
|
|
320
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
321
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
322
|
+
default:
|
|
323
|
+
const parsedBody = parsedOutput.body;
|
|
324
|
+
return throwDefaultError({
|
|
325
|
+
output,
|
|
326
|
+
parsedBody,
|
|
327
|
+
errorCode,
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
export const de_ExportKeyCommand = async (output, context) => {
|
|
332
|
+
if (output.statusCode >= 300) {
|
|
333
|
+
return de_ExportKeyCommandError(output, context);
|
|
334
|
+
}
|
|
335
|
+
const data = await parseBody(output.body, context);
|
|
336
|
+
let contents = {};
|
|
337
|
+
contents = _json(data);
|
|
338
|
+
const response = {
|
|
339
|
+
$metadata: deserializeMetadata(output),
|
|
340
|
+
...contents,
|
|
341
|
+
};
|
|
342
|
+
return response;
|
|
343
|
+
};
|
|
344
|
+
const de_ExportKeyCommandError = async (output, context) => {
|
|
345
|
+
const parsedOutput = {
|
|
346
|
+
...output,
|
|
347
|
+
body: await parseErrorBody(output.body, context),
|
|
348
|
+
};
|
|
349
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
350
|
+
switch (errorCode) {
|
|
351
|
+
case "AccessDeniedException":
|
|
352
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
353
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
354
|
+
case "ConflictException":
|
|
355
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
356
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
357
|
+
case "InternalServerException":
|
|
358
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
359
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
360
|
+
case "ResourceNotFoundException":
|
|
361
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
362
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
363
|
+
case "ServiceUnavailableException":
|
|
364
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
365
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
366
|
+
case "ThrottlingException":
|
|
367
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
368
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
369
|
+
case "ValidationException":
|
|
370
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
371
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
372
|
+
default:
|
|
373
|
+
const parsedBody = parsedOutput.body;
|
|
374
|
+
return throwDefaultError({
|
|
375
|
+
output,
|
|
376
|
+
parsedBody,
|
|
377
|
+
errorCode,
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
export const de_GetAliasCommand = async (output, context) => {
|
|
382
|
+
if (output.statusCode >= 300) {
|
|
383
|
+
return de_GetAliasCommandError(output, context);
|
|
384
|
+
}
|
|
385
|
+
const data = await parseBody(output.body, context);
|
|
386
|
+
let contents = {};
|
|
387
|
+
contents = _json(data);
|
|
388
|
+
const response = {
|
|
389
|
+
$metadata: deserializeMetadata(output),
|
|
390
|
+
...contents,
|
|
391
|
+
};
|
|
392
|
+
return response;
|
|
393
|
+
};
|
|
394
|
+
const de_GetAliasCommandError = async (output, context) => {
|
|
395
|
+
const parsedOutput = {
|
|
396
|
+
...output,
|
|
397
|
+
body: await parseErrorBody(output.body, context),
|
|
398
|
+
};
|
|
399
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
400
|
+
switch (errorCode) {
|
|
401
|
+
case "AccessDeniedException":
|
|
402
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
403
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
404
|
+
case "InternalServerException":
|
|
405
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
406
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
407
|
+
case "ResourceNotFoundException":
|
|
408
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
409
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
410
|
+
case "ServiceUnavailableException":
|
|
411
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
412
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
413
|
+
case "ThrottlingException":
|
|
414
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
415
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
416
|
+
case "ValidationException":
|
|
417
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
418
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
419
|
+
default:
|
|
420
|
+
const parsedBody = parsedOutput.body;
|
|
421
|
+
return throwDefaultError({
|
|
422
|
+
output,
|
|
423
|
+
parsedBody,
|
|
424
|
+
errorCode,
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
export const de_GetKeyCommand = async (output, context) => {
|
|
429
|
+
if (output.statusCode >= 300) {
|
|
430
|
+
return de_GetKeyCommandError(output, context);
|
|
431
|
+
}
|
|
432
|
+
const data = await parseBody(output.body, context);
|
|
433
|
+
let contents = {};
|
|
434
|
+
contents = de_GetKeyOutput(data, context);
|
|
435
|
+
const response = {
|
|
436
|
+
$metadata: deserializeMetadata(output),
|
|
437
|
+
...contents,
|
|
438
|
+
};
|
|
439
|
+
return response;
|
|
440
|
+
};
|
|
441
|
+
const de_GetKeyCommandError = async (output, context) => {
|
|
442
|
+
const parsedOutput = {
|
|
443
|
+
...output,
|
|
444
|
+
body: await parseErrorBody(output.body, context),
|
|
445
|
+
};
|
|
446
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
447
|
+
switch (errorCode) {
|
|
448
|
+
case "AccessDeniedException":
|
|
449
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
450
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
451
|
+
case "InternalServerException":
|
|
452
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
453
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
454
|
+
case "ResourceNotFoundException":
|
|
455
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
456
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
457
|
+
case "ServiceUnavailableException":
|
|
458
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
459
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
460
|
+
case "ThrottlingException":
|
|
461
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
462
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
463
|
+
case "ValidationException":
|
|
464
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
465
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
466
|
+
default:
|
|
467
|
+
const parsedBody = parsedOutput.body;
|
|
468
|
+
return throwDefaultError({
|
|
469
|
+
output,
|
|
470
|
+
parsedBody,
|
|
471
|
+
errorCode,
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
export const de_GetParametersForExportCommand = async (output, context) => {
|
|
476
|
+
if (output.statusCode >= 300) {
|
|
477
|
+
return de_GetParametersForExportCommandError(output, context);
|
|
478
|
+
}
|
|
479
|
+
const data = await parseBody(output.body, context);
|
|
480
|
+
let contents = {};
|
|
481
|
+
contents = de_GetParametersForExportOutput(data, context);
|
|
482
|
+
const response = {
|
|
483
|
+
$metadata: deserializeMetadata(output),
|
|
484
|
+
...contents,
|
|
485
|
+
};
|
|
486
|
+
return response;
|
|
487
|
+
};
|
|
488
|
+
const de_GetParametersForExportCommandError = async (output, context) => {
|
|
489
|
+
const parsedOutput = {
|
|
490
|
+
...output,
|
|
491
|
+
body: await parseErrorBody(output.body, context),
|
|
492
|
+
};
|
|
493
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
494
|
+
switch (errorCode) {
|
|
495
|
+
case "AccessDeniedException":
|
|
496
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
497
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
498
|
+
case "ConflictException":
|
|
499
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
500
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
501
|
+
case "InternalServerException":
|
|
502
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
503
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
504
|
+
case "ResourceNotFoundException":
|
|
505
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
506
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
507
|
+
case "ServiceQuotaExceededException":
|
|
508
|
+
case "com.amazonaws.paymentcryptography#ServiceQuotaExceededException":
|
|
509
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
510
|
+
case "ServiceUnavailableException":
|
|
511
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
512
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
513
|
+
case "ThrottlingException":
|
|
514
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
515
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
516
|
+
case "ValidationException":
|
|
517
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
518
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
519
|
+
default:
|
|
520
|
+
const parsedBody = parsedOutput.body;
|
|
521
|
+
return throwDefaultError({
|
|
522
|
+
output,
|
|
523
|
+
parsedBody,
|
|
524
|
+
errorCode,
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
export const de_GetParametersForImportCommand = async (output, context) => {
|
|
529
|
+
if (output.statusCode >= 300) {
|
|
530
|
+
return de_GetParametersForImportCommandError(output, context);
|
|
531
|
+
}
|
|
532
|
+
const data = await parseBody(output.body, context);
|
|
533
|
+
let contents = {};
|
|
534
|
+
contents = de_GetParametersForImportOutput(data, context);
|
|
535
|
+
const response = {
|
|
536
|
+
$metadata: deserializeMetadata(output),
|
|
537
|
+
...contents,
|
|
538
|
+
};
|
|
539
|
+
return response;
|
|
540
|
+
};
|
|
541
|
+
const de_GetParametersForImportCommandError = async (output, context) => {
|
|
542
|
+
const parsedOutput = {
|
|
543
|
+
...output,
|
|
544
|
+
body: await parseErrorBody(output.body, context),
|
|
545
|
+
};
|
|
546
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
547
|
+
switch (errorCode) {
|
|
548
|
+
case "AccessDeniedException":
|
|
549
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
550
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
551
|
+
case "ConflictException":
|
|
552
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
553
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
554
|
+
case "InternalServerException":
|
|
555
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
556
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
557
|
+
case "ResourceNotFoundException":
|
|
558
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
559
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
560
|
+
case "ServiceQuotaExceededException":
|
|
561
|
+
case "com.amazonaws.paymentcryptography#ServiceQuotaExceededException":
|
|
562
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
563
|
+
case "ServiceUnavailableException":
|
|
564
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
565
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
566
|
+
case "ThrottlingException":
|
|
567
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
568
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
569
|
+
case "ValidationException":
|
|
570
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
571
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
572
|
+
default:
|
|
573
|
+
const parsedBody = parsedOutput.body;
|
|
574
|
+
return throwDefaultError({
|
|
575
|
+
output,
|
|
576
|
+
parsedBody,
|
|
577
|
+
errorCode,
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
export const de_GetPublicKeyCertificateCommand = async (output, context) => {
|
|
582
|
+
if (output.statusCode >= 300) {
|
|
583
|
+
return de_GetPublicKeyCertificateCommandError(output, context);
|
|
584
|
+
}
|
|
585
|
+
const data = await parseBody(output.body, context);
|
|
586
|
+
let contents = {};
|
|
587
|
+
contents = _json(data);
|
|
588
|
+
const response = {
|
|
589
|
+
$metadata: deserializeMetadata(output),
|
|
590
|
+
...contents,
|
|
591
|
+
};
|
|
592
|
+
return response;
|
|
593
|
+
};
|
|
594
|
+
const de_GetPublicKeyCertificateCommandError = async (output, context) => {
|
|
595
|
+
const parsedOutput = {
|
|
596
|
+
...output,
|
|
597
|
+
body: await parseErrorBody(output.body, context),
|
|
598
|
+
};
|
|
599
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
600
|
+
switch (errorCode) {
|
|
601
|
+
case "AccessDeniedException":
|
|
602
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
603
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
604
|
+
case "InternalServerException":
|
|
605
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
606
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
607
|
+
case "ResourceNotFoundException":
|
|
608
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
609
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
610
|
+
case "ServiceUnavailableException":
|
|
611
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
612
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
613
|
+
case "ThrottlingException":
|
|
614
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
615
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
616
|
+
case "ValidationException":
|
|
617
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
618
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
619
|
+
default:
|
|
620
|
+
const parsedBody = parsedOutput.body;
|
|
621
|
+
return throwDefaultError({
|
|
622
|
+
output,
|
|
623
|
+
parsedBody,
|
|
624
|
+
errorCode,
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
export const de_ImportKeyCommand = async (output, context) => {
|
|
629
|
+
if (output.statusCode >= 300) {
|
|
630
|
+
return de_ImportKeyCommandError(output, context);
|
|
631
|
+
}
|
|
632
|
+
const data = await parseBody(output.body, context);
|
|
633
|
+
let contents = {};
|
|
634
|
+
contents = de_ImportKeyOutput(data, context);
|
|
635
|
+
const response = {
|
|
636
|
+
$metadata: deserializeMetadata(output),
|
|
637
|
+
...contents,
|
|
638
|
+
};
|
|
639
|
+
return response;
|
|
640
|
+
};
|
|
641
|
+
const de_ImportKeyCommandError = async (output, context) => {
|
|
642
|
+
const parsedOutput = {
|
|
643
|
+
...output,
|
|
644
|
+
body: await parseErrorBody(output.body, context),
|
|
645
|
+
};
|
|
646
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
647
|
+
switch (errorCode) {
|
|
648
|
+
case "AccessDeniedException":
|
|
649
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
650
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
651
|
+
case "ConflictException":
|
|
652
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
653
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
654
|
+
case "InternalServerException":
|
|
655
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
656
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
657
|
+
case "ResourceNotFoundException":
|
|
658
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
659
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
660
|
+
case "ServiceQuotaExceededException":
|
|
661
|
+
case "com.amazonaws.paymentcryptography#ServiceQuotaExceededException":
|
|
662
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
663
|
+
case "ServiceUnavailableException":
|
|
664
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
665
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
666
|
+
case "ThrottlingException":
|
|
667
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
668
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
669
|
+
case "ValidationException":
|
|
670
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
671
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
672
|
+
default:
|
|
673
|
+
const parsedBody = parsedOutput.body;
|
|
674
|
+
return throwDefaultError({
|
|
675
|
+
output,
|
|
676
|
+
parsedBody,
|
|
677
|
+
errorCode,
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
export const de_ListAliasesCommand = async (output, context) => {
|
|
682
|
+
if (output.statusCode >= 300) {
|
|
683
|
+
return de_ListAliasesCommandError(output, context);
|
|
684
|
+
}
|
|
685
|
+
const data = await parseBody(output.body, context);
|
|
686
|
+
let contents = {};
|
|
687
|
+
contents = _json(data);
|
|
688
|
+
const response = {
|
|
689
|
+
$metadata: deserializeMetadata(output),
|
|
690
|
+
...contents,
|
|
691
|
+
};
|
|
692
|
+
return response;
|
|
693
|
+
};
|
|
694
|
+
const de_ListAliasesCommandError = async (output, context) => {
|
|
695
|
+
const parsedOutput = {
|
|
696
|
+
...output,
|
|
697
|
+
body: await parseErrorBody(output.body, context),
|
|
698
|
+
};
|
|
699
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
700
|
+
switch (errorCode) {
|
|
701
|
+
case "AccessDeniedException":
|
|
702
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
703
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
704
|
+
case "InternalServerException":
|
|
705
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
706
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
707
|
+
case "ResourceNotFoundException":
|
|
708
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
709
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
710
|
+
case "ServiceUnavailableException":
|
|
711
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
712
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
713
|
+
case "ThrottlingException":
|
|
714
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
715
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
716
|
+
case "ValidationException":
|
|
717
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
718
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
719
|
+
default:
|
|
720
|
+
const parsedBody = parsedOutput.body;
|
|
721
|
+
return throwDefaultError({
|
|
722
|
+
output,
|
|
723
|
+
parsedBody,
|
|
724
|
+
errorCode,
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
};
|
|
728
|
+
export const de_ListKeysCommand = async (output, context) => {
|
|
729
|
+
if (output.statusCode >= 300) {
|
|
730
|
+
return de_ListKeysCommandError(output, context);
|
|
731
|
+
}
|
|
732
|
+
const data = await parseBody(output.body, context);
|
|
733
|
+
let contents = {};
|
|
734
|
+
contents = _json(data);
|
|
735
|
+
const response = {
|
|
736
|
+
$metadata: deserializeMetadata(output),
|
|
737
|
+
...contents,
|
|
738
|
+
};
|
|
739
|
+
return response;
|
|
740
|
+
};
|
|
741
|
+
const de_ListKeysCommandError = async (output, context) => {
|
|
742
|
+
const parsedOutput = {
|
|
743
|
+
...output,
|
|
744
|
+
body: await parseErrorBody(output.body, context),
|
|
745
|
+
};
|
|
746
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
747
|
+
switch (errorCode) {
|
|
748
|
+
case "AccessDeniedException":
|
|
749
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
750
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
751
|
+
case "InternalServerException":
|
|
752
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
753
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
754
|
+
case "ResourceNotFoundException":
|
|
755
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
756
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
757
|
+
case "ServiceUnavailableException":
|
|
758
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
759
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
760
|
+
case "ThrottlingException":
|
|
761
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
762
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
763
|
+
case "ValidationException":
|
|
764
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
765
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
766
|
+
default:
|
|
767
|
+
const parsedBody = parsedOutput.body;
|
|
768
|
+
return throwDefaultError({
|
|
769
|
+
output,
|
|
770
|
+
parsedBody,
|
|
771
|
+
errorCode,
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
776
|
+
if (output.statusCode >= 300) {
|
|
777
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
778
|
+
}
|
|
779
|
+
const data = await parseBody(output.body, context);
|
|
780
|
+
let contents = {};
|
|
781
|
+
contents = _json(data);
|
|
782
|
+
const response = {
|
|
783
|
+
$metadata: deserializeMetadata(output),
|
|
784
|
+
...contents,
|
|
785
|
+
};
|
|
786
|
+
return response;
|
|
787
|
+
};
|
|
788
|
+
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
789
|
+
const parsedOutput = {
|
|
790
|
+
...output,
|
|
791
|
+
body: await parseErrorBody(output.body, context),
|
|
792
|
+
};
|
|
793
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
794
|
+
switch (errorCode) {
|
|
795
|
+
case "AccessDeniedException":
|
|
796
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
797
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
798
|
+
case "InternalServerException":
|
|
799
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
800
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
801
|
+
case "ResourceNotFoundException":
|
|
802
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
803
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
804
|
+
case "ServiceUnavailableException":
|
|
805
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
806
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
807
|
+
case "ThrottlingException":
|
|
808
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
809
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
810
|
+
case "ValidationException":
|
|
811
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
812
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
813
|
+
default:
|
|
814
|
+
const parsedBody = parsedOutput.body;
|
|
815
|
+
return throwDefaultError({
|
|
816
|
+
output,
|
|
817
|
+
parsedBody,
|
|
818
|
+
errorCode,
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
export const de_RestoreKeyCommand = async (output, context) => {
|
|
823
|
+
if (output.statusCode >= 300) {
|
|
824
|
+
return de_RestoreKeyCommandError(output, context);
|
|
825
|
+
}
|
|
826
|
+
const data = await parseBody(output.body, context);
|
|
827
|
+
let contents = {};
|
|
828
|
+
contents = de_RestoreKeyOutput(data, context);
|
|
829
|
+
const response = {
|
|
830
|
+
$metadata: deserializeMetadata(output),
|
|
831
|
+
...contents,
|
|
832
|
+
};
|
|
833
|
+
return response;
|
|
834
|
+
};
|
|
835
|
+
const de_RestoreKeyCommandError = async (output, context) => {
|
|
836
|
+
const parsedOutput = {
|
|
837
|
+
...output,
|
|
838
|
+
body: await parseErrorBody(output.body, context),
|
|
839
|
+
};
|
|
840
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
841
|
+
switch (errorCode) {
|
|
842
|
+
case "AccessDeniedException":
|
|
843
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
844
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
845
|
+
case "ConflictException":
|
|
846
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
847
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
848
|
+
case "InternalServerException":
|
|
849
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
850
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
851
|
+
case "ResourceNotFoundException":
|
|
852
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
853
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
854
|
+
case "ServiceQuotaExceededException":
|
|
855
|
+
case "com.amazonaws.paymentcryptography#ServiceQuotaExceededException":
|
|
856
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
857
|
+
case "ServiceUnavailableException":
|
|
858
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
859
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
860
|
+
case "ThrottlingException":
|
|
861
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
862
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
863
|
+
case "ValidationException":
|
|
864
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
865
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
866
|
+
default:
|
|
867
|
+
const parsedBody = parsedOutput.body;
|
|
868
|
+
return throwDefaultError({
|
|
869
|
+
output,
|
|
870
|
+
parsedBody,
|
|
871
|
+
errorCode,
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
};
|
|
875
|
+
export const de_StartKeyUsageCommand = async (output, context) => {
|
|
876
|
+
if (output.statusCode >= 300) {
|
|
877
|
+
return de_StartKeyUsageCommandError(output, context);
|
|
878
|
+
}
|
|
879
|
+
const data = await parseBody(output.body, context);
|
|
880
|
+
let contents = {};
|
|
881
|
+
contents = de_StartKeyUsageOutput(data, context);
|
|
882
|
+
const response = {
|
|
883
|
+
$metadata: deserializeMetadata(output),
|
|
884
|
+
...contents,
|
|
885
|
+
};
|
|
886
|
+
return response;
|
|
887
|
+
};
|
|
888
|
+
const de_StartKeyUsageCommandError = async (output, context) => {
|
|
889
|
+
const parsedOutput = {
|
|
890
|
+
...output,
|
|
891
|
+
body: await parseErrorBody(output.body, context),
|
|
892
|
+
};
|
|
893
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
894
|
+
switch (errorCode) {
|
|
895
|
+
case "AccessDeniedException":
|
|
896
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
897
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
898
|
+
case "ConflictException":
|
|
899
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
900
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
901
|
+
case "InternalServerException":
|
|
902
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
903
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
904
|
+
case "ResourceNotFoundException":
|
|
905
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
906
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
907
|
+
case "ServiceQuotaExceededException":
|
|
908
|
+
case "com.amazonaws.paymentcryptography#ServiceQuotaExceededException":
|
|
909
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
910
|
+
case "ServiceUnavailableException":
|
|
911
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
912
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
913
|
+
case "ThrottlingException":
|
|
914
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
915
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
916
|
+
case "ValidationException":
|
|
917
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
918
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
919
|
+
default:
|
|
920
|
+
const parsedBody = parsedOutput.body;
|
|
921
|
+
return throwDefaultError({
|
|
922
|
+
output,
|
|
923
|
+
parsedBody,
|
|
924
|
+
errorCode,
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
export const de_StopKeyUsageCommand = async (output, context) => {
|
|
929
|
+
if (output.statusCode >= 300) {
|
|
930
|
+
return de_StopKeyUsageCommandError(output, context);
|
|
931
|
+
}
|
|
932
|
+
const data = await parseBody(output.body, context);
|
|
933
|
+
let contents = {};
|
|
934
|
+
contents = de_StopKeyUsageOutput(data, context);
|
|
935
|
+
const response = {
|
|
936
|
+
$metadata: deserializeMetadata(output),
|
|
937
|
+
...contents,
|
|
938
|
+
};
|
|
939
|
+
return response;
|
|
940
|
+
};
|
|
941
|
+
const de_StopKeyUsageCommandError = async (output, context) => {
|
|
942
|
+
const parsedOutput = {
|
|
943
|
+
...output,
|
|
944
|
+
body: await parseErrorBody(output.body, context),
|
|
945
|
+
};
|
|
946
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
947
|
+
switch (errorCode) {
|
|
948
|
+
case "AccessDeniedException":
|
|
949
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
950
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
951
|
+
case "ConflictException":
|
|
952
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
953
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
954
|
+
case "InternalServerException":
|
|
955
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
956
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
957
|
+
case "ResourceNotFoundException":
|
|
958
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
959
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
960
|
+
case "ServiceQuotaExceededException":
|
|
961
|
+
case "com.amazonaws.paymentcryptography#ServiceQuotaExceededException":
|
|
962
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
963
|
+
case "ServiceUnavailableException":
|
|
964
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
965
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
966
|
+
case "ThrottlingException":
|
|
967
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
968
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
969
|
+
case "ValidationException":
|
|
970
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
971
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
972
|
+
default:
|
|
973
|
+
const parsedBody = parsedOutput.body;
|
|
974
|
+
return throwDefaultError({
|
|
975
|
+
output,
|
|
976
|
+
parsedBody,
|
|
977
|
+
errorCode,
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
};
|
|
981
|
+
export const de_TagResourceCommand = async (output, context) => {
|
|
982
|
+
if (output.statusCode >= 300) {
|
|
983
|
+
return de_TagResourceCommandError(output, context);
|
|
984
|
+
}
|
|
985
|
+
const data = await parseBody(output.body, context);
|
|
986
|
+
let contents = {};
|
|
987
|
+
contents = _json(data);
|
|
988
|
+
const response = {
|
|
989
|
+
$metadata: deserializeMetadata(output),
|
|
990
|
+
...contents,
|
|
991
|
+
};
|
|
992
|
+
return response;
|
|
993
|
+
};
|
|
994
|
+
const de_TagResourceCommandError = async (output, context) => {
|
|
995
|
+
const parsedOutput = {
|
|
996
|
+
...output,
|
|
997
|
+
body: await parseErrorBody(output.body, context),
|
|
998
|
+
};
|
|
999
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1000
|
+
switch (errorCode) {
|
|
1001
|
+
case "AccessDeniedException":
|
|
1002
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
1003
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1004
|
+
case "ConflictException":
|
|
1005
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
1006
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1007
|
+
case "InternalServerException":
|
|
1008
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
1009
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1010
|
+
case "ResourceNotFoundException":
|
|
1011
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
1012
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1013
|
+
case "ServiceQuotaExceededException":
|
|
1014
|
+
case "com.amazonaws.paymentcryptography#ServiceQuotaExceededException":
|
|
1015
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1016
|
+
case "ServiceUnavailableException":
|
|
1017
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
1018
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1019
|
+
case "ThrottlingException":
|
|
1020
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
1021
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1022
|
+
case "ValidationException":
|
|
1023
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
1024
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1025
|
+
default:
|
|
1026
|
+
const parsedBody = parsedOutput.body;
|
|
1027
|
+
return throwDefaultError({
|
|
1028
|
+
output,
|
|
1029
|
+
parsedBody,
|
|
1030
|
+
errorCode,
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
};
|
|
1034
|
+
export const de_UntagResourceCommand = async (output, context) => {
|
|
1035
|
+
if (output.statusCode >= 300) {
|
|
1036
|
+
return de_UntagResourceCommandError(output, context);
|
|
1037
|
+
}
|
|
1038
|
+
const data = await parseBody(output.body, context);
|
|
1039
|
+
let contents = {};
|
|
1040
|
+
contents = _json(data);
|
|
1041
|
+
const response = {
|
|
1042
|
+
$metadata: deserializeMetadata(output),
|
|
1043
|
+
...contents,
|
|
1044
|
+
};
|
|
1045
|
+
return response;
|
|
1046
|
+
};
|
|
1047
|
+
const de_UntagResourceCommandError = async (output, context) => {
|
|
1048
|
+
const parsedOutput = {
|
|
1049
|
+
...output,
|
|
1050
|
+
body: await parseErrorBody(output.body, context),
|
|
1051
|
+
};
|
|
1052
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1053
|
+
switch (errorCode) {
|
|
1054
|
+
case "AccessDeniedException":
|
|
1055
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
1056
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1057
|
+
case "ConflictException":
|
|
1058
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
1059
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1060
|
+
case "InternalServerException":
|
|
1061
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
1062
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1063
|
+
case "ResourceNotFoundException":
|
|
1064
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
1065
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1066
|
+
case "ServiceUnavailableException":
|
|
1067
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
1068
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1069
|
+
case "ThrottlingException":
|
|
1070
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
1071
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1072
|
+
case "ValidationException":
|
|
1073
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
1074
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1075
|
+
default:
|
|
1076
|
+
const parsedBody = parsedOutput.body;
|
|
1077
|
+
return throwDefaultError({
|
|
1078
|
+
output,
|
|
1079
|
+
parsedBody,
|
|
1080
|
+
errorCode,
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
export const de_UpdateAliasCommand = async (output, context) => {
|
|
1085
|
+
if (output.statusCode >= 300) {
|
|
1086
|
+
return de_UpdateAliasCommandError(output, context);
|
|
1087
|
+
}
|
|
1088
|
+
const data = await parseBody(output.body, context);
|
|
1089
|
+
let contents = {};
|
|
1090
|
+
contents = _json(data);
|
|
1091
|
+
const response = {
|
|
1092
|
+
$metadata: deserializeMetadata(output),
|
|
1093
|
+
...contents,
|
|
1094
|
+
};
|
|
1095
|
+
return response;
|
|
1096
|
+
};
|
|
1097
|
+
const de_UpdateAliasCommandError = async (output, context) => {
|
|
1098
|
+
const parsedOutput = {
|
|
1099
|
+
...output,
|
|
1100
|
+
body: await parseErrorBody(output.body, context),
|
|
1101
|
+
};
|
|
1102
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1103
|
+
switch (errorCode) {
|
|
1104
|
+
case "AccessDeniedException":
|
|
1105
|
+
case "com.amazonaws.paymentcryptography#AccessDeniedException":
|
|
1106
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1107
|
+
case "ConflictException":
|
|
1108
|
+
case "com.amazonaws.paymentcryptography#ConflictException":
|
|
1109
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1110
|
+
case "InternalServerException":
|
|
1111
|
+
case "com.amazonaws.paymentcryptography#InternalServerException":
|
|
1112
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1113
|
+
case "ResourceNotFoundException":
|
|
1114
|
+
case "com.amazonaws.paymentcryptography#ResourceNotFoundException":
|
|
1115
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1116
|
+
case "ServiceUnavailableException":
|
|
1117
|
+
case "com.amazonaws.paymentcryptography#ServiceUnavailableException":
|
|
1118
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1119
|
+
case "ThrottlingException":
|
|
1120
|
+
case "com.amazonaws.paymentcryptography#ThrottlingException":
|
|
1121
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1122
|
+
case "ValidationException":
|
|
1123
|
+
case "com.amazonaws.paymentcryptography#ValidationException":
|
|
1124
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1125
|
+
default:
|
|
1126
|
+
const parsedBody = parsedOutput.body;
|
|
1127
|
+
return throwDefaultError({
|
|
1128
|
+
output,
|
|
1129
|
+
parsedBody,
|
|
1130
|
+
errorCode,
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
};
|
|
1134
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1135
|
+
const body = parsedOutput.body;
|
|
1136
|
+
const deserialized = _json(body);
|
|
1137
|
+
const exception = new AccessDeniedException({
|
|
1138
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1139
|
+
...deserialized,
|
|
1140
|
+
});
|
|
1141
|
+
return __decorateServiceException(exception, body);
|
|
1142
|
+
};
|
|
1143
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1144
|
+
const body = parsedOutput.body;
|
|
1145
|
+
const deserialized = _json(body);
|
|
1146
|
+
const exception = new ConflictException({
|
|
1147
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1148
|
+
...deserialized,
|
|
1149
|
+
});
|
|
1150
|
+
return __decorateServiceException(exception, body);
|
|
1151
|
+
};
|
|
1152
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1153
|
+
const body = parsedOutput.body;
|
|
1154
|
+
const deserialized = _json(body);
|
|
1155
|
+
const exception = new InternalServerException({
|
|
1156
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1157
|
+
...deserialized,
|
|
1158
|
+
});
|
|
1159
|
+
return __decorateServiceException(exception, body);
|
|
1160
|
+
};
|
|
1161
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1162
|
+
const body = parsedOutput.body;
|
|
1163
|
+
const deserialized = _json(body);
|
|
1164
|
+
const exception = new ResourceNotFoundException({
|
|
1165
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1166
|
+
...deserialized,
|
|
1167
|
+
});
|
|
1168
|
+
return __decorateServiceException(exception, body);
|
|
1169
|
+
};
|
|
1170
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1171
|
+
const body = parsedOutput.body;
|
|
1172
|
+
const deserialized = _json(body);
|
|
1173
|
+
const exception = new ServiceQuotaExceededException({
|
|
1174
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1175
|
+
...deserialized,
|
|
1176
|
+
});
|
|
1177
|
+
return __decorateServiceException(exception, body);
|
|
1178
|
+
};
|
|
1179
|
+
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
1180
|
+
const body = parsedOutput.body;
|
|
1181
|
+
const deserialized = _json(body);
|
|
1182
|
+
const exception = new ServiceUnavailableException({
|
|
1183
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1184
|
+
...deserialized,
|
|
1185
|
+
});
|
|
1186
|
+
return __decorateServiceException(exception, body);
|
|
1187
|
+
};
|
|
1188
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1189
|
+
const body = parsedOutput.body;
|
|
1190
|
+
const deserialized = _json(body);
|
|
1191
|
+
const exception = new ThrottlingException({
|
|
1192
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1193
|
+
...deserialized,
|
|
1194
|
+
});
|
|
1195
|
+
return __decorateServiceException(exception, body);
|
|
1196
|
+
};
|
|
1197
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1198
|
+
const body = parsedOutput.body;
|
|
1199
|
+
const deserialized = _json(body);
|
|
1200
|
+
const exception = new ValidationException({
|
|
1201
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1202
|
+
...deserialized,
|
|
1203
|
+
});
|
|
1204
|
+
return __decorateServiceException(exception, body);
|
|
1205
|
+
};
|
|
1206
|
+
const de_CreateKeyOutput = (output, context) => {
|
|
1207
|
+
return take(output, {
|
|
1208
|
+
Key: (_) => de_Key(_, context),
|
|
1209
|
+
});
|
|
1210
|
+
};
|
|
1211
|
+
const de_DeleteKeyOutput = (output, context) => {
|
|
1212
|
+
return take(output, {
|
|
1213
|
+
Key: (_) => de_Key(_, context),
|
|
1214
|
+
});
|
|
1215
|
+
};
|
|
1216
|
+
const de_GetKeyOutput = (output, context) => {
|
|
1217
|
+
return take(output, {
|
|
1218
|
+
Key: (_) => de_Key(_, context),
|
|
1219
|
+
});
|
|
1220
|
+
};
|
|
1221
|
+
const de_GetParametersForExportOutput = (output, context) => {
|
|
1222
|
+
return take(output, {
|
|
1223
|
+
ExportToken: __expectString,
|
|
1224
|
+
ParametersValidUntilTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1225
|
+
SigningKeyAlgorithm: __expectString,
|
|
1226
|
+
SigningKeyCertificate: __expectString,
|
|
1227
|
+
SigningKeyCertificateChain: __expectString,
|
|
1228
|
+
});
|
|
1229
|
+
};
|
|
1230
|
+
const de_GetParametersForImportOutput = (output, context) => {
|
|
1231
|
+
return take(output, {
|
|
1232
|
+
ImportToken: __expectString,
|
|
1233
|
+
ParametersValidUntilTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1234
|
+
WrappingKeyAlgorithm: __expectString,
|
|
1235
|
+
WrappingKeyCertificate: __expectString,
|
|
1236
|
+
WrappingKeyCertificateChain: __expectString,
|
|
1237
|
+
});
|
|
1238
|
+
};
|
|
1239
|
+
const de_ImportKeyOutput = (output, context) => {
|
|
1240
|
+
return take(output, {
|
|
1241
|
+
Key: (_) => de_Key(_, context),
|
|
1242
|
+
});
|
|
1243
|
+
};
|
|
1244
|
+
const de_Key = (output, context) => {
|
|
1245
|
+
return take(output, {
|
|
1246
|
+
CreateTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1247
|
+
DeletePendingTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1248
|
+
DeleteTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1249
|
+
Enabled: __expectBoolean,
|
|
1250
|
+
Exportable: __expectBoolean,
|
|
1251
|
+
KeyArn: __expectString,
|
|
1252
|
+
KeyAttributes: _json,
|
|
1253
|
+
KeyCheckValue: __expectString,
|
|
1254
|
+
KeyCheckValueAlgorithm: __expectString,
|
|
1255
|
+
KeyOrigin: __expectString,
|
|
1256
|
+
KeyState: __expectString,
|
|
1257
|
+
UsageStartTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1258
|
+
UsageStopTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1259
|
+
});
|
|
1260
|
+
};
|
|
1261
|
+
const de_RestoreKeyOutput = (output, context) => {
|
|
1262
|
+
return take(output, {
|
|
1263
|
+
Key: (_) => de_Key(_, context),
|
|
1264
|
+
});
|
|
1265
|
+
};
|
|
1266
|
+
const de_StartKeyUsageOutput = (output, context) => {
|
|
1267
|
+
return take(output, {
|
|
1268
|
+
Key: (_) => de_Key(_, context),
|
|
1269
|
+
});
|
|
1270
|
+
};
|
|
1271
|
+
const de_StopKeyUsageOutput = (output, context) => {
|
|
1272
|
+
return take(output, {
|
|
1273
|
+
Key: (_) => de_Key(_, context),
|
|
1274
|
+
});
|
|
1275
|
+
};
|
|
1276
|
+
const deserializeMetadata = (output) => ({
|
|
1277
|
+
httpStatusCode: output.statusCode,
|
|
1278
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1279
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1280
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1281
|
+
});
|
|
1282
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1283
|
+
if (streamBody instanceof Uint8Array) {
|
|
1284
|
+
return Promise.resolve(streamBody);
|
|
1285
|
+
}
|
|
1286
|
+
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1287
|
+
};
|
|
1288
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1289
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
1290
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1291
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1292
|
+
const contents = {
|
|
1293
|
+
protocol,
|
|
1294
|
+
hostname,
|
|
1295
|
+
port,
|
|
1296
|
+
method: "POST",
|
|
1297
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1298
|
+
headers,
|
|
1299
|
+
};
|
|
1300
|
+
if (resolvedHostname !== undefined) {
|
|
1301
|
+
contents.hostname = resolvedHostname;
|
|
1302
|
+
}
|
|
1303
|
+
if (body !== undefined) {
|
|
1304
|
+
contents.body = body;
|
|
1305
|
+
}
|
|
1306
|
+
return new __HttpRequest(contents);
|
|
1307
|
+
};
|
|
1308
|
+
function sharedHeaders(operation) {
|
|
1309
|
+
return {
|
|
1310
|
+
"content-type": "application/x-amz-json-1.0",
|
|
1311
|
+
"x-amz-target": `PaymentCryptographyControlPlane.${operation}`,
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
1314
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1315
|
+
if (encoded.length) {
|
|
1316
|
+
return JSON.parse(encoded);
|
|
1317
|
+
}
|
|
1318
|
+
return {};
|
|
1319
|
+
});
|
|
1320
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1321
|
+
const value = await parseBody(errorBody, context);
|
|
1322
|
+
value.message = value.message ?? value.Message;
|
|
1323
|
+
return value;
|
|
1324
|
+
};
|
|
1325
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1326
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1327
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1328
|
+
let cleanValue = rawValue;
|
|
1329
|
+
if (typeof cleanValue === "number") {
|
|
1330
|
+
cleanValue = cleanValue.toString();
|
|
1331
|
+
}
|
|
1332
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
1333
|
+
cleanValue = cleanValue.split(",")[0];
|
|
1334
|
+
}
|
|
1335
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
1336
|
+
cleanValue = cleanValue.split(":")[0];
|
|
1337
|
+
}
|
|
1338
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
1339
|
+
cleanValue = cleanValue.split("#")[1];
|
|
1340
|
+
}
|
|
1341
|
+
return cleanValue;
|
|
1342
|
+
};
|
|
1343
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1344
|
+
if (headerKey !== undefined) {
|
|
1345
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1346
|
+
}
|
|
1347
|
+
if (data.code !== undefined) {
|
|
1348
|
+
return sanitizeErrorCode(data.code);
|
|
1349
|
+
}
|
|
1350
|
+
if (data["__type"] !== undefined) {
|
|
1351
|
+
return sanitizeErrorCode(data["__type"]);
|
|
1352
|
+
}
|
|
1353
|
+
};
|