@aws-sdk/client-dataexchange 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.
- package/CHANGELOG.md +13 -0
- package/dist-cjs/DataExchange.js +0 -1
- package/dist-cjs/DataExchangeClient.js +0 -1
- package/dist-cjs/commands/CancelJobCommand.js +0 -1
- package/dist-cjs/commands/CreateDataSetCommand.js +0 -1
- package/dist-cjs/commands/CreateEventActionCommand.js +0 -1
- package/dist-cjs/commands/CreateJobCommand.js +0 -1
- package/dist-cjs/commands/CreateRevisionCommand.js +0 -1
- package/dist-cjs/commands/DeleteAssetCommand.js +0 -1
- package/dist-cjs/commands/DeleteDataSetCommand.js +0 -1
- package/dist-cjs/commands/DeleteEventActionCommand.js +0 -1
- package/dist-cjs/commands/DeleteRevisionCommand.js +0 -1
- package/dist-cjs/commands/GetAssetCommand.js +0 -1
- package/dist-cjs/commands/GetDataSetCommand.js +0 -1
- package/dist-cjs/commands/GetEventActionCommand.js +0 -1
- package/dist-cjs/commands/GetJobCommand.js +0 -1
- package/dist-cjs/commands/GetRevisionCommand.js +0 -1
- package/dist-cjs/commands/ListDataSetRevisionsCommand.js +0 -1
- package/dist-cjs/commands/ListDataSetsCommand.js +0 -1
- package/dist-cjs/commands/ListEventActionsCommand.js +0 -1
- package/dist-cjs/commands/ListJobsCommand.js +0 -1
- package/dist-cjs/commands/ListRevisionAssetsCommand.js +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-cjs/commands/StartJobCommand.js +0 -1
- package/dist-cjs/commands/TagResourceCommand.js +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js +0 -1
- package/dist-cjs/commands/UpdateAssetCommand.js +0 -1
- package/dist-cjs/commands/UpdateDataSetCommand.js +0 -1
- package/dist-cjs/commands/UpdateEventActionCommand.js +0 -1
- package/dist-cjs/commands/UpdateRevisionCommand.js +0 -1
- package/dist-cjs/endpoints.js +0 -1
- package/dist-cjs/index.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -1
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListDataSetRevisionsPaginator.js +0 -1
- package/dist-cjs/pagination/ListDataSetsPaginator.js +0 -1
- package/dist-cjs/pagination/ListEventActionsPaginator.js +0 -1
- package/dist-cjs/pagination/ListJobsPaginator.js +0 -1
- package/dist-cjs/pagination/ListRevisionAssetsPaginator.js +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js +0 -1
- package/dist-cjs/runtimeConfig.browser.js +2 -3
- package/dist-cjs/runtimeConfig.js +3 -4
- package/dist-cjs/runtimeConfig.native.js +0 -1
- package/dist-cjs/runtimeConfig.shared.js +0 -1
- package/dist-es/DataExchange.js +0 -1
- package/dist-es/DataExchangeClient.js +0 -1
- package/dist-es/commands/CancelJobCommand.js +0 -1
- package/dist-es/commands/CreateDataSetCommand.js +0 -1
- package/dist-es/commands/CreateEventActionCommand.js +0 -1
- package/dist-es/commands/CreateJobCommand.js +0 -1
- package/dist-es/commands/CreateRevisionCommand.js +0 -1
- package/dist-es/commands/DeleteAssetCommand.js +0 -1
- package/dist-es/commands/DeleteDataSetCommand.js +0 -1
- package/dist-es/commands/DeleteEventActionCommand.js +0 -1
- package/dist-es/commands/DeleteRevisionCommand.js +0 -1
- package/dist-es/commands/GetAssetCommand.js +0 -1
- package/dist-es/commands/GetDataSetCommand.js +0 -1
- package/dist-es/commands/GetEventActionCommand.js +0 -1
- package/dist-es/commands/GetJobCommand.js +0 -1
- package/dist-es/commands/GetRevisionCommand.js +0 -1
- package/dist-es/commands/ListDataSetRevisionsCommand.js +0 -1
- package/dist-es/commands/ListDataSetsCommand.js +0 -1
- package/dist-es/commands/ListEventActionsCommand.js +0 -1
- package/dist-es/commands/ListJobsCommand.js +0 -1
- package/dist-es/commands/ListRevisionAssetsCommand.js +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-es/commands/StartJobCommand.js +0 -1
- package/dist-es/commands/TagResourceCommand.js +0 -1
- package/dist-es/commands/UntagResourceCommand.js +0 -1
- package/dist-es/commands/UpdateAssetCommand.js +0 -1
- package/dist-es/commands/UpdateDataSetCommand.js +0 -1
- package/dist-es/commands/UpdateEventActionCommand.js +0 -1
- package/dist-es/commands/UpdateRevisionCommand.js +0 -1
- package/dist-es/endpoints.js +0 -1
- package/dist-es/index.js +0 -1
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListDataSetRevisionsPaginator.js +0 -1
- package/dist-es/pagination/ListDataSetsPaginator.js +0 -1
- package/dist-es/pagination/ListEventActionsPaginator.js +0 -1
- package/dist-es/pagination/ListJobsPaginator.js +0 -1
- package/dist-es/pagination/ListRevisionAssetsPaginator.js +0 -1
- package/dist-es/protocols/Aws_restJson1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/package.json +33 -30
- package/dist-cjs/DataExchange.js.map +0 -1
- package/dist-cjs/DataExchangeClient.js.map +0 -1
- package/dist-cjs/commands/CancelJobCommand.js.map +0 -1
- package/dist-cjs/commands/CreateDataSetCommand.js.map +0 -1
- package/dist-cjs/commands/CreateEventActionCommand.js.map +0 -1
- package/dist-cjs/commands/CreateJobCommand.js.map +0 -1
- package/dist-cjs/commands/CreateRevisionCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteAssetCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteDataSetCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteEventActionCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteRevisionCommand.js.map +0 -1
- package/dist-cjs/commands/GetAssetCommand.js.map +0 -1
- package/dist-cjs/commands/GetDataSetCommand.js.map +0 -1
- package/dist-cjs/commands/GetEventActionCommand.js.map +0 -1
- package/dist-cjs/commands/GetJobCommand.js.map +0 -1
- package/dist-cjs/commands/GetRevisionCommand.js.map +0 -1
- package/dist-cjs/commands/ListDataSetRevisionsCommand.js.map +0 -1
- package/dist-cjs/commands/ListDataSetsCommand.js.map +0 -1
- package/dist-cjs/commands/ListEventActionsCommand.js.map +0 -1
- package/dist-cjs/commands/ListJobsCommand.js.map +0 -1
- package/dist-cjs/commands/ListRevisionAssetsCommand.js.map +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-cjs/commands/StartJobCommand.js.map +0 -1
- package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateAssetCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateDataSetCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateEventActionCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateRevisionCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListDataSetRevisionsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListDataSetsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListEventActionsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListJobsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListRevisionAssetsPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/DataExchange.js.map +0 -1
- package/dist-es/DataExchangeClient.js.map +0 -1
- package/dist-es/commands/CancelJobCommand.js.map +0 -1
- package/dist-es/commands/CreateDataSetCommand.js.map +0 -1
- package/dist-es/commands/CreateEventActionCommand.js.map +0 -1
- package/dist-es/commands/CreateJobCommand.js.map +0 -1
- package/dist-es/commands/CreateRevisionCommand.js.map +0 -1
- package/dist-es/commands/DeleteAssetCommand.js.map +0 -1
- package/dist-es/commands/DeleteDataSetCommand.js.map +0 -1
- package/dist-es/commands/DeleteEventActionCommand.js.map +0 -1
- package/dist-es/commands/DeleteRevisionCommand.js.map +0 -1
- package/dist-es/commands/GetAssetCommand.js.map +0 -1
- package/dist-es/commands/GetDataSetCommand.js.map +0 -1
- package/dist-es/commands/GetEventActionCommand.js.map +0 -1
- package/dist-es/commands/GetJobCommand.js.map +0 -1
- package/dist-es/commands/GetRevisionCommand.js.map +0 -1
- package/dist-es/commands/ListDataSetRevisionsCommand.js.map +0 -1
- package/dist-es/commands/ListDataSetsCommand.js.map +0 -1
- package/dist-es/commands/ListEventActionsCommand.js.map +0 -1
- package/dist-es/commands/ListJobsCommand.js.map +0 -1
- package/dist-es/commands/ListRevisionAssetsCommand.js.map +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-es/commands/StartJobCommand.js.map +0 -1
- package/dist-es/commands/TagResourceCommand.js.map +0 -1
- package/dist-es/commands/UntagResourceCommand.js.map +0 -1
- package/dist-es/commands/UpdateAssetCommand.js.map +0 -1
- package/dist-es/commands/UpdateDataSetCommand.js.map +0 -1
- package/dist-es/commands/UpdateEventActionCommand.js.map +0 -1
- package/dist-es/commands/UpdateRevisionCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListDataSetRevisionsPaginator.js.map +0 -1
- package/dist-es/pagination/ListDataSetsPaginator.js.map +0 -1
- package/dist-es/pagination/ListEventActionsPaginator.js.map +0 -1
- package/dist-es/pagination/ListJobsPaginator.js.map +0 -1
- package/dist-es/pagination/ListRevisionAssetsPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_restJson1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/DataExchange.ts +0 -894
- package/src/DataExchangeClient.ts +0 -323
- package/src/commands/CancelJobCommand.ts +0 -95
- package/src/commands/CreateDataSetCommand.ts +0 -95
- package/src/commands/CreateEventActionCommand.ts +0 -95
- package/src/commands/CreateJobCommand.ts +0 -95
- package/src/commands/CreateRevisionCommand.ts +0 -95
- package/src/commands/DeleteAssetCommand.ts +0 -95
- package/src/commands/DeleteDataSetCommand.ts +0 -95
- package/src/commands/DeleteEventActionCommand.ts +0 -95
- package/src/commands/DeleteRevisionCommand.ts +0 -95
- package/src/commands/GetAssetCommand.ts +0 -95
- package/src/commands/GetDataSetCommand.ts +0 -95
- package/src/commands/GetEventActionCommand.ts +0 -95
- package/src/commands/GetJobCommand.ts +0 -88
- package/src/commands/GetRevisionCommand.ts +0 -95
- package/src/commands/ListDataSetRevisionsCommand.ts +0 -95
- package/src/commands/ListDataSetsCommand.ts +0 -95
- package/src/commands/ListEventActionsCommand.ts +0 -95
- package/src/commands/ListJobsCommand.ts +0 -95
- package/src/commands/ListRevisionAssetsCommand.ts +0 -95
- package/src/commands/ListTagsForResourceCommand.ts +0 -95
- package/src/commands/StartJobCommand.ts +0 -95
- package/src/commands/TagResourceCommand.ts +0 -95
- package/src/commands/UntagResourceCommand.ts +0 -95
- package/src/commands/UpdateAssetCommand.ts +0 -95
- package/src/commands/UpdateDataSetCommand.ts +0 -95
- package/src/commands/UpdateEventActionCommand.ts +0 -95
- package/src/commands/UpdateRevisionCommand.ts +0 -95
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -36
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -2753
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListDataSetRevisionsPaginator.ts +0 -59
- package/src/pagination/ListDataSetsPaginator.ts +0 -59
- package/src/pagination/ListEventActionsPaginator.ts +0 -59
- package/src/pagination/ListJobsPaginator.ts +0 -55
- package/src/pagination/ListRevisionAssetsPaginator.ts +0 -59
- package/src/protocols/Aws_restJson1.ts +0 -4522
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,4522 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
|
-
import {
|
|
3
|
-
expectBoolean as __expectBoolean,
|
|
4
|
-
expectNonNull as __expectNonNull,
|
|
5
|
-
expectObject as __expectObject,
|
|
6
|
-
expectString as __expectString,
|
|
7
|
-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
8
|
-
limitedParseDouble as __limitedParseDouble,
|
|
9
|
-
parseRfc3339DateTime as __parseRfc3339DateTime,
|
|
10
|
-
} from "@aws-sdk/smithy-client";
|
|
11
|
-
import {
|
|
12
|
-
Endpoint as __Endpoint,
|
|
13
|
-
MetadataBearer as __MetadataBearer,
|
|
14
|
-
ResponseMetadata as __ResponseMetadata,
|
|
15
|
-
SerdeContext as __SerdeContext,
|
|
16
|
-
SmithyException as __SmithyException,
|
|
17
|
-
} from "@aws-sdk/types";
|
|
18
|
-
|
|
19
|
-
import { CancelJobCommandInput, CancelJobCommandOutput } from "../commands/CancelJobCommand";
|
|
20
|
-
import { CreateDataSetCommandInput, CreateDataSetCommandOutput } from "../commands/CreateDataSetCommand";
|
|
21
|
-
import { CreateEventActionCommandInput, CreateEventActionCommandOutput } from "../commands/CreateEventActionCommand";
|
|
22
|
-
import { CreateJobCommandInput, CreateJobCommandOutput } from "../commands/CreateJobCommand";
|
|
23
|
-
import { CreateRevisionCommandInput, CreateRevisionCommandOutput } from "../commands/CreateRevisionCommand";
|
|
24
|
-
import { DeleteAssetCommandInput, DeleteAssetCommandOutput } from "../commands/DeleteAssetCommand";
|
|
25
|
-
import { DeleteDataSetCommandInput, DeleteDataSetCommandOutput } from "../commands/DeleteDataSetCommand";
|
|
26
|
-
import { DeleteEventActionCommandInput, DeleteEventActionCommandOutput } from "../commands/DeleteEventActionCommand";
|
|
27
|
-
import { DeleteRevisionCommandInput, DeleteRevisionCommandOutput } from "../commands/DeleteRevisionCommand";
|
|
28
|
-
import { GetAssetCommandInput, GetAssetCommandOutput } from "../commands/GetAssetCommand";
|
|
29
|
-
import { GetDataSetCommandInput, GetDataSetCommandOutput } from "../commands/GetDataSetCommand";
|
|
30
|
-
import { GetEventActionCommandInput, GetEventActionCommandOutput } from "../commands/GetEventActionCommand";
|
|
31
|
-
import { GetJobCommandInput, GetJobCommandOutput } from "../commands/GetJobCommand";
|
|
32
|
-
import { GetRevisionCommandInput, GetRevisionCommandOutput } from "../commands/GetRevisionCommand";
|
|
33
|
-
import {
|
|
34
|
-
ListDataSetRevisionsCommandInput,
|
|
35
|
-
ListDataSetRevisionsCommandOutput,
|
|
36
|
-
} from "../commands/ListDataSetRevisionsCommand";
|
|
37
|
-
import { ListDataSetsCommandInput, ListDataSetsCommandOutput } from "../commands/ListDataSetsCommand";
|
|
38
|
-
import { ListEventActionsCommandInput, ListEventActionsCommandOutput } from "../commands/ListEventActionsCommand";
|
|
39
|
-
import { ListJobsCommandInput, ListJobsCommandOutput } from "../commands/ListJobsCommand";
|
|
40
|
-
import { ListRevisionAssetsCommandInput, ListRevisionAssetsCommandOutput } from "../commands/ListRevisionAssetsCommand";
|
|
41
|
-
import {
|
|
42
|
-
ListTagsForResourceCommandInput,
|
|
43
|
-
ListTagsForResourceCommandOutput,
|
|
44
|
-
} from "../commands/ListTagsForResourceCommand";
|
|
45
|
-
import { StartJobCommandInput, StartJobCommandOutput } from "../commands/StartJobCommand";
|
|
46
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
47
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
48
|
-
import { UpdateAssetCommandInput, UpdateAssetCommandOutput } from "../commands/UpdateAssetCommand";
|
|
49
|
-
import { UpdateDataSetCommandInput, UpdateDataSetCommandOutput } from "../commands/UpdateDataSetCommand";
|
|
50
|
-
import { UpdateEventActionCommandInput, UpdateEventActionCommandOutput } from "../commands/UpdateEventActionCommand";
|
|
51
|
-
import { UpdateRevisionCommandInput, UpdateRevisionCommandOutput } from "../commands/UpdateRevisionCommand";
|
|
52
|
-
import {
|
|
53
|
-
AccessDeniedException,
|
|
54
|
-
Action,
|
|
55
|
-
AssetDestinationEntry,
|
|
56
|
-
AssetDetails,
|
|
57
|
-
AssetEntry,
|
|
58
|
-
AssetSourceEntry,
|
|
59
|
-
AutoExportRevisionDestinationEntry,
|
|
60
|
-
AutoExportRevisionToS3RequestDetails,
|
|
61
|
-
ConflictException,
|
|
62
|
-
DataSetEntry,
|
|
63
|
-
Details,
|
|
64
|
-
Event,
|
|
65
|
-
EventActionEntry,
|
|
66
|
-
ExportAssetsToS3RequestDetails,
|
|
67
|
-
ExportAssetsToS3ResponseDetails,
|
|
68
|
-
ExportAssetToSignedUrlRequestDetails,
|
|
69
|
-
ExportAssetToSignedUrlResponseDetails,
|
|
70
|
-
ExportRevisionsToS3RequestDetails,
|
|
71
|
-
ExportRevisionsToS3ResponseDetails,
|
|
72
|
-
ExportServerSideEncryption,
|
|
73
|
-
ImportAssetFromSignedUrlJobErrorDetails,
|
|
74
|
-
ImportAssetFromSignedUrlRequestDetails,
|
|
75
|
-
ImportAssetFromSignedUrlResponseDetails,
|
|
76
|
-
ImportAssetsFromS3RequestDetails,
|
|
77
|
-
ImportAssetsFromS3ResponseDetails,
|
|
78
|
-
InternalServerException,
|
|
79
|
-
JobEntry,
|
|
80
|
-
JobError,
|
|
81
|
-
OriginDetails,
|
|
82
|
-
RequestDetails,
|
|
83
|
-
ResourceNotFoundException,
|
|
84
|
-
ResponseDetails,
|
|
85
|
-
RevisionDestinationEntry,
|
|
86
|
-
RevisionEntry,
|
|
87
|
-
RevisionPublished,
|
|
88
|
-
S3SnapshotAsset,
|
|
89
|
-
ServiceLimitExceededException,
|
|
90
|
-
ThrottlingException,
|
|
91
|
-
ValidationException,
|
|
92
|
-
} from "../models/models_0";
|
|
93
|
-
|
|
94
|
-
export const serializeAws_restJson1CancelJobCommand = async (
|
|
95
|
-
input: CancelJobCommandInput,
|
|
96
|
-
context: __SerdeContext
|
|
97
|
-
): Promise<__HttpRequest> => {
|
|
98
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
99
|
-
const headers: any = {};
|
|
100
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs/{JobId}";
|
|
101
|
-
if (input.JobId !== undefined) {
|
|
102
|
-
const labelValue: string = input.JobId;
|
|
103
|
-
if (labelValue.length <= 0) {
|
|
104
|
-
throw new Error("Empty value provided for input HTTP label: JobId.");
|
|
105
|
-
}
|
|
106
|
-
resolvedPath = resolvedPath.replace("{JobId}", __extendedEncodeURIComponent(labelValue));
|
|
107
|
-
} else {
|
|
108
|
-
throw new Error("No value provided for input HTTP label: JobId.");
|
|
109
|
-
}
|
|
110
|
-
let body: any;
|
|
111
|
-
return new __HttpRequest({
|
|
112
|
-
protocol,
|
|
113
|
-
hostname,
|
|
114
|
-
port,
|
|
115
|
-
method: "DELETE",
|
|
116
|
-
headers,
|
|
117
|
-
path: resolvedPath,
|
|
118
|
-
body,
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export const serializeAws_restJson1CreateDataSetCommand = async (
|
|
123
|
-
input: CreateDataSetCommandInput,
|
|
124
|
-
context: __SerdeContext
|
|
125
|
-
): Promise<__HttpRequest> => {
|
|
126
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
127
|
-
const headers: any = {
|
|
128
|
-
"content-type": "application/json",
|
|
129
|
-
};
|
|
130
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets";
|
|
131
|
-
let body: any;
|
|
132
|
-
body = JSON.stringify({
|
|
133
|
-
...(input.AssetType !== undefined && input.AssetType !== null && { AssetType: input.AssetType }),
|
|
134
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
135
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
136
|
-
...(input.Tags !== undefined &&
|
|
137
|
-
input.Tags !== null && { Tags: serializeAws_restJson1MapOf__string(input.Tags, context) }),
|
|
138
|
-
});
|
|
139
|
-
return new __HttpRequest({
|
|
140
|
-
protocol,
|
|
141
|
-
hostname,
|
|
142
|
-
port,
|
|
143
|
-
method: "POST",
|
|
144
|
-
headers,
|
|
145
|
-
path: resolvedPath,
|
|
146
|
-
body,
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export const serializeAws_restJson1CreateEventActionCommand = async (
|
|
151
|
-
input: CreateEventActionCommandInput,
|
|
152
|
-
context: __SerdeContext
|
|
153
|
-
): Promise<__HttpRequest> => {
|
|
154
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
155
|
-
const headers: any = {
|
|
156
|
-
"content-type": "application/json",
|
|
157
|
-
};
|
|
158
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions";
|
|
159
|
-
let body: any;
|
|
160
|
-
body = JSON.stringify({
|
|
161
|
-
...(input.Action !== undefined &&
|
|
162
|
-
input.Action !== null && { Action: serializeAws_restJson1Action(input.Action, context) }),
|
|
163
|
-
...(input.Event !== undefined &&
|
|
164
|
-
input.Event !== null && { Event: serializeAws_restJson1Event(input.Event, context) }),
|
|
165
|
-
});
|
|
166
|
-
return new __HttpRequest({
|
|
167
|
-
protocol,
|
|
168
|
-
hostname,
|
|
169
|
-
port,
|
|
170
|
-
method: "POST",
|
|
171
|
-
headers,
|
|
172
|
-
path: resolvedPath,
|
|
173
|
-
body,
|
|
174
|
-
});
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
export const serializeAws_restJson1CreateJobCommand = async (
|
|
178
|
-
input: CreateJobCommandInput,
|
|
179
|
-
context: __SerdeContext
|
|
180
|
-
): Promise<__HttpRequest> => {
|
|
181
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
182
|
-
const headers: any = {
|
|
183
|
-
"content-type": "application/json",
|
|
184
|
-
};
|
|
185
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs";
|
|
186
|
-
let body: any;
|
|
187
|
-
body = JSON.stringify({
|
|
188
|
-
...(input.Details !== undefined &&
|
|
189
|
-
input.Details !== null && { Details: serializeAws_restJson1RequestDetails(input.Details, context) }),
|
|
190
|
-
...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
|
|
191
|
-
});
|
|
192
|
-
return new __HttpRequest({
|
|
193
|
-
protocol,
|
|
194
|
-
hostname,
|
|
195
|
-
port,
|
|
196
|
-
method: "POST",
|
|
197
|
-
headers,
|
|
198
|
-
path: resolvedPath,
|
|
199
|
-
body,
|
|
200
|
-
});
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
export const serializeAws_restJson1CreateRevisionCommand = async (
|
|
204
|
-
input: CreateRevisionCommandInput,
|
|
205
|
-
context: __SerdeContext
|
|
206
|
-
): Promise<__HttpRequest> => {
|
|
207
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
208
|
-
const headers: any = {
|
|
209
|
-
"content-type": "application/json",
|
|
210
|
-
};
|
|
211
|
-
let resolvedPath =
|
|
212
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}/revisions";
|
|
213
|
-
if (input.DataSetId !== undefined) {
|
|
214
|
-
const labelValue: string = input.DataSetId;
|
|
215
|
-
if (labelValue.length <= 0) {
|
|
216
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
217
|
-
}
|
|
218
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
219
|
-
} else {
|
|
220
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
221
|
-
}
|
|
222
|
-
let body: any;
|
|
223
|
-
body = JSON.stringify({
|
|
224
|
-
...(input.Comment !== undefined && input.Comment !== null && { Comment: input.Comment }),
|
|
225
|
-
...(input.Tags !== undefined &&
|
|
226
|
-
input.Tags !== null && { Tags: serializeAws_restJson1MapOf__string(input.Tags, context) }),
|
|
227
|
-
});
|
|
228
|
-
return new __HttpRequest({
|
|
229
|
-
protocol,
|
|
230
|
-
hostname,
|
|
231
|
-
port,
|
|
232
|
-
method: "POST",
|
|
233
|
-
headers,
|
|
234
|
-
path: resolvedPath,
|
|
235
|
-
body,
|
|
236
|
-
});
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
export const serializeAws_restJson1DeleteAssetCommand = async (
|
|
240
|
-
input: DeleteAssetCommandInput,
|
|
241
|
-
context: __SerdeContext
|
|
242
|
-
): Promise<__HttpRequest> => {
|
|
243
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
244
|
-
const headers: any = {};
|
|
245
|
-
let resolvedPath =
|
|
246
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
247
|
-
"/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}";
|
|
248
|
-
if (input.AssetId !== undefined) {
|
|
249
|
-
const labelValue: string = input.AssetId;
|
|
250
|
-
if (labelValue.length <= 0) {
|
|
251
|
-
throw new Error("Empty value provided for input HTTP label: AssetId.");
|
|
252
|
-
}
|
|
253
|
-
resolvedPath = resolvedPath.replace("{AssetId}", __extendedEncodeURIComponent(labelValue));
|
|
254
|
-
} else {
|
|
255
|
-
throw new Error("No value provided for input HTTP label: AssetId.");
|
|
256
|
-
}
|
|
257
|
-
if (input.DataSetId !== undefined) {
|
|
258
|
-
const labelValue: string = input.DataSetId;
|
|
259
|
-
if (labelValue.length <= 0) {
|
|
260
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
261
|
-
}
|
|
262
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
263
|
-
} else {
|
|
264
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
265
|
-
}
|
|
266
|
-
if (input.RevisionId !== undefined) {
|
|
267
|
-
const labelValue: string = input.RevisionId;
|
|
268
|
-
if (labelValue.length <= 0) {
|
|
269
|
-
throw new Error("Empty value provided for input HTTP label: RevisionId.");
|
|
270
|
-
}
|
|
271
|
-
resolvedPath = resolvedPath.replace("{RevisionId}", __extendedEncodeURIComponent(labelValue));
|
|
272
|
-
} else {
|
|
273
|
-
throw new Error("No value provided for input HTTP label: RevisionId.");
|
|
274
|
-
}
|
|
275
|
-
let body: any;
|
|
276
|
-
return new __HttpRequest({
|
|
277
|
-
protocol,
|
|
278
|
-
hostname,
|
|
279
|
-
port,
|
|
280
|
-
method: "DELETE",
|
|
281
|
-
headers,
|
|
282
|
-
path: resolvedPath,
|
|
283
|
-
body,
|
|
284
|
-
});
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
export const serializeAws_restJson1DeleteDataSetCommand = async (
|
|
288
|
-
input: DeleteDataSetCommandInput,
|
|
289
|
-
context: __SerdeContext
|
|
290
|
-
): Promise<__HttpRequest> => {
|
|
291
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
292
|
-
const headers: any = {};
|
|
293
|
-
let resolvedPath =
|
|
294
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}";
|
|
295
|
-
if (input.DataSetId !== undefined) {
|
|
296
|
-
const labelValue: string = input.DataSetId;
|
|
297
|
-
if (labelValue.length <= 0) {
|
|
298
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
299
|
-
}
|
|
300
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
301
|
-
} else {
|
|
302
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
303
|
-
}
|
|
304
|
-
let body: any;
|
|
305
|
-
return new __HttpRequest({
|
|
306
|
-
protocol,
|
|
307
|
-
hostname,
|
|
308
|
-
port,
|
|
309
|
-
method: "DELETE",
|
|
310
|
-
headers,
|
|
311
|
-
path: resolvedPath,
|
|
312
|
-
body,
|
|
313
|
-
});
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
export const serializeAws_restJson1DeleteEventActionCommand = async (
|
|
317
|
-
input: DeleteEventActionCommandInput,
|
|
318
|
-
context: __SerdeContext
|
|
319
|
-
): Promise<__HttpRequest> => {
|
|
320
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
321
|
-
const headers: any = {};
|
|
322
|
-
let resolvedPath =
|
|
323
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions/{EventActionId}";
|
|
324
|
-
if (input.EventActionId !== undefined) {
|
|
325
|
-
const labelValue: string = input.EventActionId;
|
|
326
|
-
if (labelValue.length <= 0) {
|
|
327
|
-
throw new Error("Empty value provided for input HTTP label: EventActionId.");
|
|
328
|
-
}
|
|
329
|
-
resolvedPath = resolvedPath.replace("{EventActionId}", __extendedEncodeURIComponent(labelValue));
|
|
330
|
-
} else {
|
|
331
|
-
throw new Error("No value provided for input HTTP label: EventActionId.");
|
|
332
|
-
}
|
|
333
|
-
let body: any;
|
|
334
|
-
return new __HttpRequest({
|
|
335
|
-
protocol,
|
|
336
|
-
hostname,
|
|
337
|
-
port,
|
|
338
|
-
method: "DELETE",
|
|
339
|
-
headers,
|
|
340
|
-
path: resolvedPath,
|
|
341
|
-
body,
|
|
342
|
-
});
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
export const serializeAws_restJson1DeleteRevisionCommand = async (
|
|
346
|
-
input: DeleteRevisionCommandInput,
|
|
347
|
-
context: __SerdeContext
|
|
348
|
-
): Promise<__HttpRequest> => {
|
|
349
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
350
|
-
const headers: any = {};
|
|
351
|
-
let resolvedPath =
|
|
352
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
353
|
-
"/v1/data-sets/{DataSetId}/revisions/{RevisionId}";
|
|
354
|
-
if (input.DataSetId !== undefined) {
|
|
355
|
-
const labelValue: string = input.DataSetId;
|
|
356
|
-
if (labelValue.length <= 0) {
|
|
357
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
358
|
-
}
|
|
359
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
360
|
-
} else {
|
|
361
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
362
|
-
}
|
|
363
|
-
if (input.RevisionId !== undefined) {
|
|
364
|
-
const labelValue: string = input.RevisionId;
|
|
365
|
-
if (labelValue.length <= 0) {
|
|
366
|
-
throw new Error("Empty value provided for input HTTP label: RevisionId.");
|
|
367
|
-
}
|
|
368
|
-
resolvedPath = resolvedPath.replace("{RevisionId}", __extendedEncodeURIComponent(labelValue));
|
|
369
|
-
} else {
|
|
370
|
-
throw new Error("No value provided for input HTTP label: RevisionId.");
|
|
371
|
-
}
|
|
372
|
-
let body: any;
|
|
373
|
-
return new __HttpRequest({
|
|
374
|
-
protocol,
|
|
375
|
-
hostname,
|
|
376
|
-
port,
|
|
377
|
-
method: "DELETE",
|
|
378
|
-
headers,
|
|
379
|
-
path: resolvedPath,
|
|
380
|
-
body,
|
|
381
|
-
});
|
|
382
|
-
};
|
|
383
|
-
|
|
384
|
-
export const serializeAws_restJson1GetAssetCommand = async (
|
|
385
|
-
input: GetAssetCommandInput,
|
|
386
|
-
context: __SerdeContext
|
|
387
|
-
): Promise<__HttpRequest> => {
|
|
388
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
389
|
-
const headers: any = {};
|
|
390
|
-
let resolvedPath =
|
|
391
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
392
|
-
"/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}";
|
|
393
|
-
if (input.AssetId !== undefined) {
|
|
394
|
-
const labelValue: string = input.AssetId;
|
|
395
|
-
if (labelValue.length <= 0) {
|
|
396
|
-
throw new Error("Empty value provided for input HTTP label: AssetId.");
|
|
397
|
-
}
|
|
398
|
-
resolvedPath = resolvedPath.replace("{AssetId}", __extendedEncodeURIComponent(labelValue));
|
|
399
|
-
} else {
|
|
400
|
-
throw new Error("No value provided for input HTTP label: AssetId.");
|
|
401
|
-
}
|
|
402
|
-
if (input.DataSetId !== undefined) {
|
|
403
|
-
const labelValue: string = input.DataSetId;
|
|
404
|
-
if (labelValue.length <= 0) {
|
|
405
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
406
|
-
}
|
|
407
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
408
|
-
} else {
|
|
409
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
410
|
-
}
|
|
411
|
-
if (input.RevisionId !== undefined) {
|
|
412
|
-
const labelValue: string = input.RevisionId;
|
|
413
|
-
if (labelValue.length <= 0) {
|
|
414
|
-
throw new Error("Empty value provided for input HTTP label: RevisionId.");
|
|
415
|
-
}
|
|
416
|
-
resolvedPath = resolvedPath.replace("{RevisionId}", __extendedEncodeURIComponent(labelValue));
|
|
417
|
-
} else {
|
|
418
|
-
throw new Error("No value provided for input HTTP label: RevisionId.");
|
|
419
|
-
}
|
|
420
|
-
let body: any;
|
|
421
|
-
return new __HttpRequest({
|
|
422
|
-
protocol,
|
|
423
|
-
hostname,
|
|
424
|
-
port,
|
|
425
|
-
method: "GET",
|
|
426
|
-
headers,
|
|
427
|
-
path: resolvedPath,
|
|
428
|
-
body,
|
|
429
|
-
});
|
|
430
|
-
};
|
|
431
|
-
|
|
432
|
-
export const serializeAws_restJson1GetDataSetCommand = async (
|
|
433
|
-
input: GetDataSetCommandInput,
|
|
434
|
-
context: __SerdeContext
|
|
435
|
-
): Promise<__HttpRequest> => {
|
|
436
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
437
|
-
const headers: any = {};
|
|
438
|
-
let resolvedPath =
|
|
439
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}";
|
|
440
|
-
if (input.DataSetId !== undefined) {
|
|
441
|
-
const labelValue: string = input.DataSetId;
|
|
442
|
-
if (labelValue.length <= 0) {
|
|
443
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
444
|
-
}
|
|
445
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
446
|
-
} else {
|
|
447
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
448
|
-
}
|
|
449
|
-
let body: any;
|
|
450
|
-
return new __HttpRequest({
|
|
451
|
-
protocol,
|
|
452
|
-
hostname,
|
|
453
|
-
port,
|
|
454
|
-
method: "GET",
|
|
455
|
-
headers,
|
|
456
|
-
path: resolvedPath,
|
|
457
|
-
body,
|
|
458
|
-
});
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
export const serializeAws_restJson1GetEventActionCommand = async (
|
|
462
|
-
input: GetEventActionCommandInput,
|
|
463
|
-
context: __SerdeContext
|
|
464
|
-
): Promise<__HttpRequest> => {
|
|
465
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
466
|
-
const headers: any = {};
|
|
467
|
-
let resolvedPath =
|
|
468
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions/{EventActionId}";
|
|
469
|
-
if (input.EventActionId !== undefined) {
|
|
470
|
-
const labelValue: string = input.EventActionId;
|
|
471
|
-
if (labelValue.length <= 0) {
|
|
472
|
-
throw new Error("Empty value provided for input HTTP label: EventActionId.");
|
|
473
|
-
}
|
|
474
|
-
resolvedPath = resolvedPath.replace("{EventActionId}", __extendedEncodeURIComponent(labelValue));
|
|
475
|
-
} else {
|
|
476
|
-
throw new Error("No value provided for input HTTP label: EventActionId.");
|
|
477
|
-
}
|
|
478
|
-
let body: any;
|
|
479
|
-
return new __HttpRequest({
|
|
480
|
-
protocol,
|
|
481
|
-
hostname,
|
|
482
|
-
port,
|
|
483
|
-
method: "GET",
|
|
484
|
-
headers,
|
|
485
|
-
path: resolvedPath,
|
|
486
|
-
body,
|
|
487
|
-
});
|
|
488
|
-
};
|
|
489
|
-
|
|
490
|
-
export const serializeAws_restJson1GetJobCommand = async (
|
|
491
|
-
input: GetJobCommandInput,
|
|
492
|
-
context: __SerdeContext
|
|
493
|
-
): Promise<__HttpRequest> => {
|
|
494
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
495
|
-
const headers: any = {};
|
|
496
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs/{JobId}";
|
|
497
|
-
if (input.JobId !== undefined) {
|
|
498
|
-
const labelValue: string = input.JobId;
|
|
499
|
-
if (labelValue.length <= 0) {
|
|
500
|
-
throw new Error("Empty value provided for input HTTP label: JobId.");
|
|
501
|
-
}
|
|
502
|
-
resolvedPath = resolvedPath.replace("{JobId}", __extendedEncodeURIComponent(labelValue));
|
|
503
|
-
} else {
|
|
504
|
-
throw new Error("No value provided for input HTTP label: JobId.");
|
|
505
|
-
}
|
|
506
|
-
let body: any;
|
|
507
|
-
return new __HttpRequest({
|
|
508
|
-
protocol,
|
|
509
|
-
hostname,
|
|
510
|
-
port,
|
|
511
|
-
method: "GET",
|
|
512
|
-
headers,
|
|
513
|
-
path: resolvedPath,
|
|
514
|
-
body,
|
|
515
|
-
});
|
|
516
|
-
};
|
|
517
|
-
|
|
518
|
-
export const serializeAws_restJson1GetRevisionCommand = async (
|
|
519
|
-
input: GetRevisionCommandInput,
|
|
520
|
-
context: __SerdeContext
|
|
521
|
-
): Promise<__HttpRequest> => {
|
|
522
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
523
|
-
const headers: any = {};
|
|
524
|
-
let resolvedPath =
|
|
525
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
526
|
-
"/v1/data-sets/{DataSetId}/revisions/{RevisionId}";
|
|
527
|
-
if (input.DataSetId !== undefined) {
|
|
528
|
-
const labelValue: string = input.DataSetId;
|
|
529
|
-
if (labelValue.length <= 0) {
|
|
530
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
531
|
-
}
|
|
532
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
533
|
-
} else {
|
|
534
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
535
|
-
}
|
|
536
|
-
if (input.RevisionId !== undefined) {
|
|
537
|
-
const labelValue: string = input.RevisionId;
|
|
538
|
-
if (labelValue.length <= 0) {
|
|
539
|
-
throw new Error("Empty value provided for input HTTP label: RevisionId.");
|
|
540
|
-
}
|
|
541
|
-
resolvedPath = resolvedPath.replace("{RevisionId}", __extendedEncodeURIComponent(labelValue));
|
|
542
|
-
} else {
|
|
543
|
-
throw new Error("No value provided for input HTTP label: RevisionId.");
|
|
544
|
-
}
|
|
545
|
-
let body: any;
|
|
546
|
-
return new __HttpRequest({
|
|
547
|
-
protocol,
|
|
548
|
-
hostname,
|
|
549
|
-
port,
|
|
550
|
-
method: "GET",
|
|
551
|
-
headers,
|
|
552
|
-
path: resolvedPath,
|
|
553
|
-
body,
|
|
554
|
-
});
|
|
555
|
-
};
|
|
556
|
-
|
|
557
|
-
export const serializeAws_restJson1ListDataSetRevisionsCommand = async (
|
|
558
|
-
input: ListDataSetRevisionsCommandInput,
|
|
559
|
-
context: __SerdeContext
|
|
560
|
-
): Promise<__HttpRequest> => {
|
|
561
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
562
|
-
const headers: any = {};
|
|
563
|
-
let resolvedPath =
|
|
564
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}/revisions";
|
|
565
|
-
if (input.DataSetId !== undefined) {
|
|
566
|
-
const labelValue: string = input.DataSetId;
|
|
567
|
-
if (labelValue.length <= 0) {
|
|
568
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
569
|
-
}
|
|
570
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
571
|
-
} else {
|
|
572
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
573
|
-
}
|
|
574
|
-
const query: any = {
|
|
575
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
576
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
577
|
-
};
|
|
578
|
-
let body: any;
|
|
579
|
-
return new __HttpRequest({
|
|
580
|
-
protocol,
|
|
581
|
-
hostname,
|
|
582
|
-
port,
|
|
583
|
-
method: "GET",
|
|
584
|
-
headers,
|
|
585
|
-
path: resolvedPath,
|
|
586
|
-
query,
|
|
587
|
-
body,
|
|
588
|
-
});
|
|
589
|
-
};
|
|
590
|
-
|
|
591
|
-
export const serializeAws_restJson1ListDataSetsCommand = async (
|
|
592
|
-
input: ListDataSetsCommandInput,
|
|
593
|
-
context: __SerdeContext
|
|
594
|
-
): Promise<__HttpRequest> => {
|
|
595
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
596
|
-
const headers: any = {};
|
|
597
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets";
|
|
598
|
-
const query: any = {
|
|
599
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
600
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
601
|
-
...(input.Origin !== undefined && { origin: input.Origin }),
|
|
602
|
-
};
|
|
603
|
-
let body: any;
|
|
604
|
-
return new __HttpRequest({
|
|
605
|
-
protocol,
|
|
606
|
-
hostname,
|
|
607
|
-
port,
|
|
608
|
-
method: "GET",
|
|
609
|
-
headers,
|
|
610
|
-
path: resolvedPath,
|
|
611
|
-
query,
|
|
612
|
-
body,
|
|
613
|
-
});
|
|
614
|
-
};
|
|
615
|
-
|
|
616
|
-
export const serializeAws_restJson1ListEventActionsCommand = async (
|
|
617
|
-
input: ListEventActionsCommandInput,
|
|
618
|
-
context: __SerdeContext
|
|
619
|
-
): Promise<__HttpRequest> => {
|
|
620
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
621
|
-
const headers: any = {};
|
|
622
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions";
|
|
623
|
-
const query: any = {
|
|
624
|
-
...(input.EventSourceId !== undefined && { eventSourceId: input.EventSourceId }),
|
|
625
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
626
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
627
|
-
};
|
|
628
|
-
let body: any;
|
|
629
|
-
return new __HttpRequest({
|
|
630
|
-
protocol,
|
|
631
|
-
hostname,
|
|
632
|
-
port,
|
|
633
|
-
method: "GET",
|
|
634
|
-
headers,
|
|
635
|
-
path: resolvedPath,
|
|
636
|
-
query,
|
|
637
|
-
body,
|
|
638
|
-
});
|
|
639
|
-
};
|
|
640
|
-
|
|
641
|
-
export const serializeAws_restJson1ListJobsCommand = async (
|
|
642
|
-
input: ListJobsCommandInput,
|
|
643
|
-
context: __SerdeContext
|
|
644
|
-
): Promise<__HttpRequest> => {
|
|
645
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
646
|
-
const headers: any = {};
|
|
647
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs";
|
|
648
|
-
const query: any = {
|
|
649
|
-
...(input.DataSetId !== undefined && { dataSetId: input.DataSetId }),
|
|
650
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
651
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
652
|
-
...(input.RevisionId !== undefined && { revisionId: input.RevisionId }),
|
|
653
|
-
};
|
|
654
|
-
let body: any;
|
|
655
|
-
return new __HttpRequest({
|
|
656
|
-
protocol,
|
|
657
|
-
hostname,
|
|
658
|
-
port,
|
|
659
|
-
method: "GET",
|
|
660
|
-
headers,
|
|
661
|
-
path: resolvedPath,
|
|
662
|
-
query,
|
|
663
|
-
body,
|
|
664
|
-
});
|
|
665
|
-
};
|
|
666
|
-
|
|
667
|
-
export const serializeAws_restJson1ListRevisionAssetsCommand = async (
|
|
668
|
-
input: ListRevisionAssetsCommandInput,
|
|
669
|
-
context: __SerdeContext
|
|
670
|
-
): Promise<__HttpRequest> => {
|
|
671
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
672
|
-
const headers: any = {};
|
|
673
|
-
let resolvedPath =
|
|
674
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
675
|
-
"/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets";
|
|
676
|
-
if (input.DataSetId !== undefined) {
|
|
677
|
-
const labelValue: string = input.DataSetId;
|
|
678
|
-
if (labelValue.length <= 0) {
|
|
679
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
680
|
-
}
|
|
681
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
682
|
-
} else {
|
|
683
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
684
|
-
}
|
|
685
|
-
if (input.RevisionId !== undefined) {
|
|
686
|
-
const labelValue: string = input.RevisionId;
|
|
687
|
-
if (labelValue.length <= 0) {
|
|
688
|
-
throw new Error("Empty value provided for input HTTP label: RevisionId.");
|
|
689
|
-
}
|
|
690
|
-
resolvedPath = resolvedPath.replace("{RevisionId}", __extendedEncodeURIComponent(labelValue));
|
|
691
|
-
} else {
|
|
692
|
-
throw new Error("No value provided for input HTTP label: RevisionId.");
|
|
693
|
-
}
|
|
694
|
-
const query: any = {
|
|
695
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
696
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
697
|
-
};
|
|
698
|
-
let body: any;
|
|
699
|
-
return new __HttpRequest({
|
|
700
|
-
protocol,
|
|
701
|
-
hostname,
|
|
702
|
-
port,
|
|
703
|
-
method: "GET",
|
|
704
|
-
headers,
|
|
705
|
-
path: resolvedPath,
|
|
706
|
-
query,
|
|
707
|
-
body,
|
|
708
|
-
});
|
|
709
|
-
};
|
|
710
|
-
|
|
711
|
-
export const serializeAws_restJson1ListTagsForResourceCommand = async (
|
|
712
|
-
input: ListTagsForResourceCommandInput,
|
|
713
|
-
context: __SerdeContext
|
|
714
|
-
): Promise<__HttpRequest> => {
|
|
715
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
716
|
-
const headers: any = {};
|
|
717
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
718
|
-
if (input.ResourceArn !== undefined) {
|
|
719
|
-
const labelValue: string = input.ResourceArn;
|
|
720
|
-
if (labelValue.length <= 0) {
|
|
721
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
722
|
-
}
|
|
723
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
724
|
-
} else {
|
|
725
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
726
|
-
}
|
|
727
|
-
let body: any;
|
|
728
|
-
return new __HttpRequest({
|
|
729
|
-
protocol,
|
|
730
|
-
hostname,
|
|
731
|
-
port,
|
|
732
|
-
method: "GET",
|
|
733
|
-
headers,
|
|
734
|
-
path: resolvedPath,
|
|
735
|
-
body,
|
|
736
|
-
});
|
|
737
|
-
};
|
|
738
|
-
|
|
739
|
-
export const serializeAws_restJson1StartJobCommand = async (
|
|
740
|
-
input: StartJobCommandInput,
|
|
741
|
-
context: __SerdeContext
|
|
742
|
-
): Promise<__HttpRequest> => {
|
|
743
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
744
|
-
const headers: any = {};
|
|
745
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs/{JobId}";
|
|
746
|
-
if (input.JobId !== undefined) {
|
|
747
|
-
const labelValue: string = input.JobId;
|
|
748
|
-
if (labelValue.length <= 0) {
|
|
749
|
-
throw new Error("Empty value provided for input HTTP label: JobId.");
|
|
750
|
-
}
|
|
751
|
-
resolvedPath = resolvedPath.replace("{JobId}", __extendedEncodeURIComponent(labelValue));
|
|
752
|
-
} else {
|
|
753
|
-
throw new Error("No value provided for input HTTP label: JobId.");
|
|
754
|
-
}
|
|
755
|
-
let body: any;
|
|
756
|
-
return new __HttpRequest({
|
|
757
|
-
protocol,
|
|
758
|
-
hostname,
|
|
759
|
-
port,
|
|
760
|
-
method: "PATCH",
|
|
761
|
-
headers,
|
|
762
|
-
path: resolvedPath,
|
|
763
|
-
body,
|
|
764
|
-
});
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
export const serializeAws_restJson1TagResourceCommand = async (
|
|
768
|
-
input: TagResourceCommandInput,
|
|
769
|
-
context: __SerdeContext
|
|
770
|
-
): Promise<__HttpRequest> => {
|
|
771
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
772
|
-
const headers: any = {
|
|
773
|
-
"content-type": "application/json",
|
|
774
|
-
};
|
|
775
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
776
|
-
if (input.ResourceArn !== undefined) {
|
|
777
|
-
const labelValue: string = input.ResourceArn;
|
|
778
|
-
if (labelValue.length <= 0) {
|
|
779
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
780
|
-
}
|
|
781
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
782
|
-
} else {
|
|
783
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
784
|
-
}
|
|
785
|
-
let body: any;
|
|
786
|
-
body = JSON.stringify({
|
|
787
|
-
...(input.Tags !== undefined &&
|
|
788
|
-
input.Tags !== null && { tags: serializeAws_restJson1MapOf__string(input.Tags, context) }),
|
|
789
|
-
});
|
|
790
|
-
return new __HttpRequest({
|
|
791
|
-
protocol,
|
|
792
|
-
hostname,
|
|
793
|
-
port,
|
|
794
|
-
method: "POST",
|
|
795
|
-
headers,
|
|
796
|
-
path: resolvedPath,
|
|
797
|
-
body,
|
|
798
|
-
});
|
|
799
|
-
};
|
|
800
|
-
|
|
801
|
-
export const serializeAws_restJson1UntagResourceCommand = async (
|
|
802
|
-
input: UntagResourceCommandInput,
|
|
803
|
-
context: __SerdeContext
|
|
804
|
-
): Promise<__HttpRequest> => {
|
|
805
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
806
|
-
const headers: any = {};
|
|
807
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
808
|
-
if (input.ResourceArn !== undefined) {
|
|
809
|
-
const labelValue: string = input.ResourceArn;
|
|
810
|
-
if (labelValue.length <= 0) {
|
|
811
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
812
|
-
}
|
|
813
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
814
|
-
} else {
|
|
815
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
816
|
-
}
|
|
817
|
-
const query: any = {
|
|
818
|
-
...(input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map((_entry) => _entry as any) }),
|
|
819
|
-
};
|
|
820
|
-
let body: any;
|
|
821
|
-
return new __HttpRequest({
|
|
822
|
-
protocol,
|
|
823
|
-
hostname,
|
|
824
|
-
port,
|
|
825
|
-
method: "DELETE",
|
|
826
|
-
headers,
|
|
827
|
-
path: resolvedPath,
|
|
828
|
-
query,
|
|
829
|
-
body,
|
|
830
|
-
});
|
|
831
|
-
};
|
|
832
|
-
|
|
833
|
-
export const serializeAws_restJson1UpdateAssetCommand = async (
|
|
834
|
-
input: UpdateAssetCommandInput,
|
|
835
|
-
context: __SerdeContext
|
|
836
|
-
): Promise<__HttpRequest> => {
|
|
837
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
838
|
-
const headers: any = {
|
|
839
|
-
"content-type": "application/json",
|
|
840
|
-
};
|
|
841
|
-
let resolvedPath =
|
|
842
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
843
|
-
"/v1/data-sets/{DataSetId}/revisions/{RevisionId}/assets/{AssetId}";
|
|
844
|
-
if (input.AssetId !== undefined) {
|
|
845
|
-
const labelValue: string = input.AssetId;
|
|
846
|
-
if (labelValue.length <= 0) {
|
|
847
|
-
throw new Error("Empty value provided for input HTTP label: AssetId.");
|
|
848
|
-
}
|
|
849
|
-
resolvedPath = resolvedPath.replace("{AssetId}", __extendedEncodeURIComponent(labelValue));
|
|
850
|
-
} else {
|
|
851
|
-
throw new Error("No value provided for input HTTP label: AssetId.");
|
|
852
|
-
}
|
|
853
|
-
if (input.DataSetId !== undefined) {
|
|
854
|
-
const labelValue: string = input.DataSetId;
|
|
855
|
-
if (labelValue.length <= 0) {
|
|
856
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
857
|
-
}
|
|
858
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
859
|
-
} else {
|
|
860
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
861
|
-
}
|
|
862
|
-
if (input.RevisionId !== undefined) {
|
|
863
|
-
const labelValue: string = input.RevisionId;
|
|
864
|
-
if (labelValue.length <= 0) {
|
|
865
|
-
throw new Error("Empty value provided for input HTTP label: RevisionId.");
|
|
866
|
-
}
|
|
867
|
-
resolvedPath = resolvedPath.replace("{RevisionId}", __extendedEncodeURIComponent(labelValue));
|
|
868
|
-
} else {
|
|
869
|
-
throw new Error("No value provided for input HTTP label: RevisionId.");
|
|
870
|
-
}
|
|
871
|
-
let body: any;
|
|
872
|
-
body = JSON.stringify({
|
|
873
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
874
|
-
});
|
|
875
|
-
return new __HttpRequest({
|
|
876
|
-
protocol,
|
|
877
|
-
hostname,
|
|
878
|
-
port,
|
|
879
|
-
method: "PATCH",
|
|
880
|
-
headers,
|
|
881
|
-
path: resolvedPath,
|
|
882
|
-
body,
|
|
883
|
-
});
|
|
884
|
-
};
|
|
885
|
-
|
|
886
|
-
export const serializeAws_restJson1UpdateDataSetCommand = async (
|
|
887
|
-
input: UpdateDataSetCommandInput,
|
|
888
|
-
context: __SerdeContext
|
|
889
|
-
): Promise<__HttpRequest> => {
|
|
890
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
891
|
-
const headers: any = {
|
|
892
|
-
"content-type": "application/json",
|
|
893
|
-
};
|
|
894
|
-
let resolvedPath =
|
|
895
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}";
|
|
896
|
-
if (input.DataSetId !== undefined) {
|
|
897
|
-
const labelValue: string = input.DataSetId;
|
|
898
|
-
if (labelValue.length <= 0) {
|
|
899
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
900
|
-
}
|
|
901
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
902
|
-
} else {
|
|
903
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
904
|
-
}
|
|
905
|
-
let body: any;
|
|
906
|
-
body = JSON.stringify({
|
|
907
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
908
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
909
|
-
});
|
|
910
|
-
return new __HttpRequest({
|
|
911
|
-
protocol,
|
|
912
|
-
hostname,
|
|
913
|
-
port,
|
|
914
|
-
method: "PATCH",
|
|
915
|
-
headers,
|
|
916
|
-
path: resolvedPath,
|
|
917
|
-
body,
|
|
918
|
-
});
|
|
919
|
-
};
|
|
920
|
-
|
|
921
|
-
export const serializeAws_restJson1UpdateEventActionCommand = async (
|
|
922
|
-
input: UpdateEventActionCommandInput,
|
|
923
|
-
context: __SerdeContext
|
|
924
|
-
): Promise<__HttpRequest> => {
|
|
925
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
926
|
-
const headers: any = {
|
|
927
|
-
"content-type": "application/json",
|
|
928
|
-
};
|
|
929
|
-
let resolvedPath =
|
|
930
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions/{EventActionId}";
|
|
931
|
-
if (input.EventActionId !== undefined) {
|
|
932
|
-
const labelValue: string = input.EventActionId;
|
|
933
|
-
if (labelValue.length <= 0) {
|
|
934
|
-
throw new Error("Empty value provided for input HTTP label: EventActionId.");
|
|
935
|
-
}
|
|
936
|
-
resolvedPath = resolvedPath.replace("{EventActionId}", __extendedEncodeURIComponent(labelValue));
|
|
937
|
-
} else {
|
|
938
|
-
throw new Error("No value provided for input HTTP label: EventActionId.");
|
|
939
|
-
}
|
|
940
|
-
let body: any;
|
|
941
|
-
body = JSON.stringify({
|
|
942
|
-
...(input.Action !== undefined &&
|
|
943
|
-
input.Action !== null && { Action: serializeAws_restJson1Action(input.Action, context) }),
|
|
944
|
-
});
|
|
945
|
-
return new __HttpRequest({
|
|
946
|
-
protocol,
|
|
947
|
-
hostname,
|
|
948
|
-
port,
|
|
949
|
-
method: "PATCH",
|
|
950
|
-
headers,
|
|
951
|
-
path: resolvedPath,
|
|
952
|
-
body,
|
|
953
|
-
});
|
|
954
|
-
};
|
|
955
|
-
|
|
956
|
-
export const serializeAws_restJson1UpdateRevisionCommand = async (
|
|
957
|
-
input: UpdateRevisionCommandInput,
|
|
958
|
-
context: __SerdeContext
|
|
959
|
-
): Promise<__HttpRequest> => {
|
|
960
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
961
|
-
const headers: any = {
|
|
962
|
-
"content-type": "application/json",
|
|
963
|
-
};
|
|
964
|
-
let resolvedPath =
|
|
965
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
966
|
-
"/v1/data-sets/{DataSetId}/revisions/{RevisionId}";
|
|
967
|
-
if (input.DataSetId !== undefined) {
|
|
968
|
-
const labelValue: string = input.DataSetId;
|
|
969
|
-
if (labelValue.length <= 0) {
|
|
970
|
-
throw new Error("Empty value provided for input HTTP label: DataSetId.");
|
|
971
|
-
}
|
|
972
|
-
resolvedPath = resolvedPath.replace("{DataSetId}", __extendedEncodeURIComponent(labelValue));
|
|
973
|
-
} else {
|
|
974
|
-
throw new Error("No value provided for input HTTP label: DataSetId.");
|
|
975
|
-
}
|
|
976
|
-
if (input.RevisionId !== undefined) {
|
|
977
|
-
const labelValue: string = input.RevisionId;
|
|
978
|
-
if (labelValue.length <= 0) {
|
|
979
|
-
throw new Error("Empty value provided for input HTTP label: RevisionId.");
|
|
980
|
-
}
|
|
981
|
-
resolvedPath = resolvedPath.replace("{RevisionId}", __extendedEncodeURIComponent(labelValue));
|
|
982
|
-
} else {
|
|
983
|
-
throw new Error("No value provided for input HTTP label: RevisionId.");
|
|
984
|
-
}
|
|
985
|
-
let body: any;
|
|
986
|
-
body = JSON.stringify({
|
|
987
|
-
...(input.Comment !== undefined && input.Comment !== null && { Comment: input.Comment }),
|
|
988
|
-
...(input.Finalized !== undefined && input.Finalized !== null && { Finalized: input.Finalized }),
|
|
989
|
-
});
|
|
990
|
-
return new __HttpRequest({
|
|
991
|
-
protocol,
|
|
992
|
-
hostname,
|
|
993
|
-
port,
|
|
994
|
-
method: "PATCH",
|
|
995
|
-
headers,
|
|
996
|
-
path: resolvedPath,
|
|
997
|
-
body,
|
|
998
|
-
});
|
|
999
|
-
};
|
|
1000
|
-
|
|
1001
|
-
export const deserializeAws_restJson1CancelJobCommand = async (
|
|
1002
|
-
output: __HttpResponse,
|
|
1003
|
-
context: __SerdeContext
|
|
1004
|
-
): Promise<CancelJobCommandOutput> => {
|
|
1005
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1006
|
-
return deserializeAws_restJson1CancelJobCommandError(output, context);
|
|
1007
|
-
}
|
|
1008
|
-
const contents: CancelJobCommandOutput = {
|
|
1009
|
-
$metadata: deserializeMetadata(output),
|
|
1010
|
-
};
|
|
1011
|
-
await collectBody(output.body, context);
|
|
1012
|
-
return Promise.resolve(contents);
|
|
1013
|
-
};
|
|
1014
|
-
|
|
1015
|
-
const deserializeAws_restJson1CancelJobCommandError = async (
|
|
1016
|
-
output: __HttpResponse,
|
|
1017
|
-
context: __SerdeContext
|
|
1018
|
-
): Promise<CancelJobCommandOutput> => {
|
|
1019
|
-
const parsedOutput: any = {
|
|
1020
|
-
...output,
|
|
1021
|
-
body: await parseBody(output.body, context),
|
|
1022
|
-
};
|
|
1023
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1024
|
-
let errorCode = "UnknownError";
|
|
1025
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1026
|
-
switch (errorCode) {
|
|
1027
|
-
case "ConflictException":
|
|
1028
|
-
case "com.amazonaws.dataexchange#ConflictException":
|
|
1029
|
-
response = {
|
|
1030
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1031
|
-
name: errorCode,
|
|
1032
|
-
$metadata: deserializeMetadata(output),
|
|
1033
|
-
};
|
|
1034
|
-
break;
|
|
1035
|
-
case "InternalServerException":
|
|
1036
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
1037
|
-
response = {
|
|
1038
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1039
|
-
name: errorCode,
|
|
1040
|
-
$metadata: deserializeMetadata(output),
|
|
1041
|
-
};
|
|
1042
|
-
break;
|
|
1043
|
-
case "ResourceNotFoundException":
|
|
1044
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
1045
|
-
response = {
|
|
1046
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1047
|
-
name: errorCode,
|
|
1048
|
-
$metadata: deserializeMetadata(output),
|
|
1049
|
-
};
|
|
1050
|
-
break;
|
|
1051
|
-
case "ThrottlingException":
|
|
1052
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
1053
|
-
response = {
|
|
1054
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1055
|
-
name: errorCode,
|
|
1056
|
-
$metadata: deserializeMetadata(output),
|
|
1057
|
-
};
|
|
1058
|
-
break;
|
|
1059
|
-
case "ValidationException":
|
|
1060
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
1061
|
-
response = {
|
|
1062
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1063
|
-
name: errorCode,
|
|
1064
|
-
$metadata: deserializeMetadata(output),
|
|
1065
|
-
};
|
|
1066
|
-
break;
|
|
1067
|
-
default:
|
|
1068
|
-
const parsedBody = parsedOutput.body;
|
|
1069
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1070
|
-
response = {
|
|
1071
|
-
...parsedBody,
|
|
1072
|
-
name: `${errorCode}`,
|
|
1073
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1074
|
-
$fault: "client",
|
|
1075
|
-
$metadata: deserializeMetadata(output),
|
|
1076
|
-
} as any;
|
|
1077
|
-
}
|
|
1078
|
-
const message = response.message || response.Message || errorCode;
|
|
1079
|
-
response.message = message;
|
|
1080
|
-
delete response.Message;
|
|
1081
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1082
|
-
};
|
|
1083
|
-
|
|
1084
|
-
export const deserializeAws_restJson1CreateDataSetCommand = async (
|
|
1085
|
-
output: __HttpResponse,
|
|
1086
|
-
context: __SerdeContext
|
|
1087
|
-
): Promise<CreateDataSetCommandOutput> => {
|
|
1088
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1089
|
-
return deserializeAws_restJson1CreateDataSetCommandError(output, context);
|
|
1090
|
-
}
|
|
1091
|
-
const contents: CreateDataSetCommandOutput = {
|
|
1092
|
-
$metadata: deserializeMetadata(output),
|
|
1093
|
-
Arn: undefined,
|
|
1094
|
-
AssetType: undefined,
|
|
1095
|
-
CreatedAt: undefined,
|
|
1096
|
-
Description: undefined,
|
|
1097
|
-
Id: undefined,
|
|
1098
|
-
Name: undefined,
|
|
1099
|
-
Origin: undefined,
|
|
1100
|
-
OriginDetails: undefined,
|
|
1101
|
-
SourceId: undefined,
|
|
1102
|
-
Tags: undefined,
|
|
1103
|
-
UpdatedAt: undefined,
|
|
1104
|
-
};
|
|
1105
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1106
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
1107
|
-
contents.Arn = __expectString(data.Arn);
|
|
1108
|
-
}
|
|
1109
|
-
if (data.AssetType !== undefined && data.AssetType !== null) {
|
|
1110
|
-
contents.AssetType = __expectString(data.AssetType);
|
|
1111
|
-
}
|
|
1112
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
1113
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
1114
|
-
}
|
|
1115
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
1116
|
-
contents.Description = __expectString(data.Description);
|
|
1117
|
-
}
|
|
1118
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
1119
|
-
contents.Id = __expectString(data.Id);
|
|
1120
|
-
}
|
|
1121
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
1122
|
-
contents.Name = __expectString(data.Name);
|
|
1123
|
-
}
|
|
1124
|
-
if (data.Origin !== undefined && data.Origin !== null) {
|
|
1125
|
-
contents.Origin = __expectString(data.Origin);
|
|
1126
|
-
}
|
|
1127
|
-
if (data.OriginDetails !== undefined && data.OriginDetails !== null) {
|
|
1128
|
-
contents.OriginDetails = deserializeAws_restJson1OriginDetails(data.OriginDetails, context);
|
|
1129
|
-
}
|
|
1130
|
-
if (data.SourceId !== undefined && data.SourceId !== null) {
|
|
1131
|
-
contents.SourceId = __expectString(data.SourceId);
|
|
1132
|
-
}
|
|
1133
|
-
if (data.Tags !== undefined && data.Tags !== null) {
|
|
1134
|
-
contents.Tags = deserializeAws_restJson1MapOf__string(data.Tags, context);
|
|
1135
|
-
}
|
|
1136
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
1137
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
1138
|
-
}
|
|
1139
|
-
return Promise.resolve(contents);
|
|
1140
|
-
};
|
|
1141
|
-
|
|
1142
|
-
const deserializeAws_restJson1CreateDataSetCommandError = async (
|
|
1143
|
-
output: __HttpResponse,
|
|
1144
|
-
context: __SerdeContext
|
|
1145
|
-
): Promise<CreateDataSetCommandOutput> => {
|
|
1146
|
-
const parsedOutput: any = {
|
|
1147
|
-
...output,
|
|
1148
|
-
body: await parseBody(output.body, context),
|
|
1149
|
-
};
|
|
1150
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1151
|
-
let errorCode = "UnknownError";
|
|
1152
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1153
|
-
switch (errorCode) {
|
|
1154
|
-
case "AccessDeniedException":
|
|
1155
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
1156
|
-
response = {
|
|
1157
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1158
|
-
name: errorCode,
|
|
1159
|
-
$metadata: deserializeMetadata(output),
|
|
1160
|
-
};
|
|
1161
|
-
break;
|
|
1162
|
-
case "InternalServerException":
|
|
1163
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
1164
|
-
response = {
|
|
1165
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1166
|
-
name: errorCode,
|
|
1167
|
-
$metadata: deserializeMetadata(output),
|
|
1168
|
-
};
|
|
1169
|
-
break;
|
|
1170
|
-
case "ServiceLimitExceededException":
|
|
1171
|
-
case "com.amazonaws.dataexchange#ServiceLimitExceededException":
|
|
1172
|
-
response = {
|
|
1173
|
-
...(await deserializeAws_restJson1ServiceLimitExceededExceptionResponse(parsedOutput, context)),
|
|
1174
|
-
name: errorCode,
|
|
1175
|
-
$metadata: deserializeMetadata(output),
|
|
1176
|
-
};
|
|
1177
|
-
break;
|
|
1178
|
-
case "ThrottlingException":
|
|
1179
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
1180
|
-
response = {
|
|
1181
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1182
|
-
name: errorCode,
|
|
1183
|
-
$metadata: deserializeMetadata(output),
|
|
1184
|
-
};
|
|
1185
|
-
break;
|
|
1186
|
-
case "ValidationException":
|
|
1187
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
1188
|
-
response = {
|
|
1189
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1190
|
-
name: errorCode,
|
|
1191
|
-
$metadata: deserializeMetadata(output),
|
|
1192
|
-
};
|
|
1193
|
-
break;
|
|
1194
|
-
default:
|
|
1195
|
-
const parsedBody = parsedOutput.body;
|
|
1196
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1197
|
-
response = {
|
|
1198
|
-
...parsedBody,
|
|
1199
|
-
name: `${errorCode}`,
|
|
1200
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1201
|
-
$fault: "client",
|
|
1202
|
-
$metadata: deserializeMetadata(output),
|
|
1203
|
-
} as any;
|
|
1204
|
-
}
|
|
1205
|
-
const message = response.message || response.Message || errorCode;
|
|
1206
|
-
response.message = message;
|
|
1207
|
-
delete response.Message;
|
|
1208
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1209
|
-
};
|
|
1210
|
-
|
|
1211
|
-
export const deserializeAws_restJson1CreateEventActionCommand = async (
|
|
1212
|
-
output: __HttpResponse,
|
|
1213
|
-
context: __SerdeContext
|
|
1214
|
-
): Promise<CreateEventActionCommandOutput> => {
|
|
1215
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1216
|
-
return deserializeAws_restJson1CreateEventActionCommandError(output, context);
|
|
1217
|
-
}
|
|
1218
|
-
const contents: CreateEventActionCommandOutput = {
|
|
1219
|
-
$metadata: deserializeMetadata(output),
|
|
1220
|
-
Action: undefined,
|
|
1221
|
-
Arn: undefined,
|
|
1222
|
-
CreatedAt: undefined,
|
|
1223
|
-
Event: undefined,
|
|
1224
|
-
Id: undefined,
|
|
1225
|
-
UpdatedAt: undefined,
|
|
1226
|
-
};
|
|
1227
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1228
|
-
if (data.Action !== undefined && data.Action !== null) {
|
|
1229
|
-
contents.Action = deserializeAws_restJson1Action(data.Action, context);
|
|
1230
|
-
}
|
|
1231
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
1232
|
-
contents.Arn = __expectString(data.Arn);
|
|
1233
|
-
}
|
|
1234
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
1235
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
1236
|
-
}
|
|
1237
|
-
if (data.Event !== undefined && data.Event !== null) {
|
|
1238
|
-
contents.Event = deserializeAws_restJson1Event(data.Event, context);
|
|
1239
|
-
}
|
|
1240
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
1241
|
-
contents.Id = __expectString(data.Id);
|
|
1242
|
-
}
|
|
1243
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
1244
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
1245
|
-
}
|
|
1246
|
-
return Promise.resolve(contents);
|
|
1247
|
-
};
|
|
1248
|
-
|
|
1249
|
-
const deserializeAws_restJson1CreateEventActionCommandError = async (
|
|
1250
|
-
output: __HttpResponse,
|
|
1251
|
-
context: __SerdeContext
|
|
1252
|
-
): Promise<CreateEventActionCommandOutput> => {
|
|
1253
|
-
const parsedOutput: any = {
|
|
1254
|
-
...output,
|
|
1255
|
-
body: await parseBody(output.body, context),
|
|
1256
|
-
};
|
|
1257
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1258
|
-
let errorCode = "UnknownError";
|
|
1259
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1260
|
-
switch (errorCode) {
|
|
1261
|
-
case "AccessDeniedException":
|
|
1262
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
1263
|
-
response = {
|
|
1264
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1265
|
-
name: errorCode,
|
|
1266
|
-
$metadata: deserializeMetadata(output),
|
|
1267
|
-
};
|
|
1268
|
-
break;
|
|
1269
|
-
case "InternalServerException":
|
|
1270
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
1271
|
-
response = {
|
|
1272
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1273
|
-
name: errorCode,
|
|
1274
|
-
$metadata: deserializeMetadata(output),
|
|
1275
|
-
};
|
|
1276
|
-
break;
|
|
1277
|
-
case "ServiceLimitExceededException":
|
|
1278
|
-
case "com.amazonaws.dataexchange#ServiceLimitExceededException":
|
|
1279
|
-
response = {
|
|
1280
|
-
...(await deserializeAws_restJson1ServiceLimitExceededExceptionResponse(parsedOutput, context)),
|
|
1281
|
-
name: errorCode,
|
|
1282
|
-
$metadata: deserializeMetadata(output),
|
|
1283
|
-
};
|
|
1284
|
-
break;
|
|
1285
|
-
case "ThrottlingException":
|
|
1286
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
1287
|
-
response = {
|
|
1288
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1289
|
-
name: errorCode,
|
|
1290
|
-
$metadata: deserializeMetadata(output),
|
|
1291
|
-
};
|
|
1292
|
-
break;
|
|
1293
|
-
case "ValidationException":
|
|
1294
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
1295
|
-
response = {
|
|
1296
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1297
|
-
name: errorCode,
|
|
1298
|
-
$metadata: deserializeMetadata(output),
|
|
1299
|
-
};
|
|
1300
|
-
break;
|
|
1301
|
-
default:
|
|
1302
|
-
const parsedBody = parsedOutput.body;
|
|
1303
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1304
|
-
response = {
|
|
1305
|
-
...parsedBody,
|
|
1306
|
-
name: `${errorCode}`,
|
|
1307
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1308
|
-
$fault: "client",
|
|
1309
|
-
$metadata: deserializeMetadata(output),
|
|
1310
|
-
} as any;
|
|
1311
|
-
}
|
|
1312
|
-
const message = response.message || response.Message || errorCode;
|
|
1313
|
-
response.message = message;
|
|
1314
|
-
delete response.Message;
|
|
1315
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1316
|
-
};
|
|
1317
|
-
|
|
1318
|
-
export const deserializeAws_restJson1CreateJobCommand = async (
|
|
1319
|
-
output: __HttpResponse,
|
|
1320
|
-
context: __SerdeContext
|
|
1321
|
-
): Promise<CreateJobCommandOutput> => {
|
|
1322
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1323
|
-
return deserializeAws_restJson1CreateJobCommandError(output, context);
|
|
1324
|
-
}
|
|
1325
|
-
const contents: CreateJobCommandOutput = {
|
|
1326
|
-
$metadata: deserializeMetadata(output),
|
|
1327
|
-
Arn: undefined,
|
|
1328
|
-
CreatedAt: undefined,
|
|
1329
|
-
Details: undefined,
|
|
1330
|
-
Errors: undefined,
|
|
1331
|
-
Id: undefined,
|
|
1332
|
-
State: undefined,
|
|
1333
|
-
Type: undefined,
|
|
1334
|
-
UpdatedAt: undefined,
|
|
1335
|
-
};
|
|
1336
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1337
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
1338
|
-
contents.Arn = __expectString(data.Arn);
|
|
1339
|
-
}
|
|
1340
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
1341
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
1342
|
-
}
|
|
1343
|
-
if (data.Details !== undefined && data.Details !== null) {
|
|
1344
|
-
contents.Details = deserializeAws_restJson1ResponseDetails(data.Details, context);
|
|
1345
|
-
}
|
|
1346
|
-
if (data.Errors !== undefined && data.Errors !== null) {
|
|
1347
|
-
contents.Errors = deserializeAws_restJson1ListOfJobError(data.Errors, context);
|
|
1348
|
-
}
|
|
1349
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
1350
|
-
contents.Id = __expectString(data.Id);
|
|
1351
|
-
}
|
|
1352
|
-
if (data.State !== undefined && data.State !== null) {
|
|
1353
|
-
contents.State = __expectString(data.State);
|
|
1354
|
-
}
|
|
1355
|
-
if (data.Type !== undefined && data.Type !== null) {
|
|
1356
|
-
contents.Type = __expectString(data.Type);
|
|
1357
|
-
}
|
|
1358
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
1359
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
1360
|
-
}
|
|
1361
|
-
return Promise.resolve(contents);
|
|
1362
|
-
};
|
|
1363
|
-
|
|
1364
|
-
const deserializeAws_restJson1CreateJobCommandError = async (
|
|
1365
|
-
output: __HttpResponse,
|
|
1366
|
-
context: __SerdeContext
|
|
1367
|
-
): Promise<CreateJobCommandOutput> => {
|
|
1368
|
-
const parsedOutput: any = {
|
|
1369
|
-
...output,
|
|
1370
|
-
body: await parseBody(output.body, context),
|
|
1371
|
-
};
|
|
1372
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1373
|
-
let errorCode = "UnknownError";
|
|
1374
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1375
|
-
switch (errorCode) {
|
|
1376
|
-
case "AccessDeniedException":
|
|
1377
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
1378
|
-
response = {
|
|
1379
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1380
|
-
name: errorCode,
|
|
1381
|
-
$metadata: deserializeMetadata(output),
|
|
1382
|
-
};
|
|
1383
|
-
break;
|
|
1384
|
-
case "InternalServerException":
|
|
1385
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
1386
|
-
response = {
|
|
1387
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1388
|
-
name: errorCode,
|
|
1389
|
-
$metadata: deserializeMetadata(output),
|
|
1390
|
-
};
|
|
1391
|
-
break;
|
|
1392
|
-
case "ResourceNotFoundException":
|
|
1393
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
1394
|
-
response = {
|
|
1395
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1396
|
-
name: errorCode,
|
|
1397
|
-
$metadata: deserializeMetadata(output),
|
|
1398
|
-
};
|
|
1399
|
-
break;
|
|
1400
|
-
case "ThrottlingException":
|
|
1401
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
1402
|
-
response = {
|
|
1403
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1404
|
-
name: errorCode,
|
|
1405
|
-
$metadata: deserializeMetadata(output),
|
|
1406
|
-
};
|
|
1407
|
-
break;
|
|
1408
|
-
case "ValidationException":
|
|
1409
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
1410
|
-
response = {
|
|
1411
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1412
|
-
name: errorCode,
|
|
1413
|
-
$metadata: deserializeMetadata(output),
|
|
1414
|
-
};
|
|
1415
|
-
break;
|
|
1416
|
-
default:
|
|
1417
|
-
const parsedBody = parsedOutput.body;
|
|
1418
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1419
|
-
response = {
|
|
1420
|
-
...parsedBody,
|
|
1421
|
-
name: `${errorCode}`,
|
|
1422
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1423
|
-
$fault: "client",
|
|
1424
|
-
$metadata: deserializeMetadata(output),
|
|
1425
|
-
} as any;
|
|
1426
|
-
}
|
|
1427
|
-
const message = response.message || response.Message || errorCode;
|
|
1428
|
-
response.message = message;
|
|
1429
|
-
delete response.Message;
|
|
1430
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1431
|
-
};
|
|
1432
|
-
|
|
1433
|
-
export const deserializeAws_restJson1CreateRevisionCommand = async (
|
|
1434
|
-
output: __HttpResponse,
|
|
1435
|
-
context: __SerdeContext
|
|
1436
|
-
): Promise<CreateRevisionCommandOutput> => {
|
|
1437
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1438
|
-
return deserializeAws_restJson1CreateRevisionCommandError(output, context);
|
|
1439
|
-
}
|
|
1440
|
-
const contents: CreateRevisionCommandOutput = {
|
|
1441
|
-
$metadata: deserializeMetadata(output),
|
|
1442
|
-
Arn: undefined,
|
|
1443
|
-
Comment: undefined,
|
|
1444
|
-
CreatedAt: undefined,
|
|
1445
|
-
DataSetId: undefined,
|
|
1446
|
-
Finalized: undefined,
|
|
1447
|
-
Id: undefined,
|
|
1448
|
-
SourceId: undefined,
|
|
1449
|
-
Tags: undefined,
|
|
1450
|
-
UpdatedAt: undefined,
|
|
1451
|
-
};
|
|
1452
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1453
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
1454
|
-
contents.Arn = __expectString(data.Arn);
|
|
1455
|
-
}
|
|
1456
|
-
if (data.Comment !== undefined && data.Comment !== null) {
|
|
1457
|
-
contents.Comment = __expectString(data.Comment);
|
|
1458
|
-
}
|
|
1459
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
1460
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
1461
|
-
}
|
|
1462
|
-
if (data.DataSetId !== undefined && data.DataSetId !== null) {
|
|
1463
|
-
contents.DataSetId = __expectString(data.DataSetId);
|
|
1464
|
-
}
|
|
1465
|
-
if (data.Finalized !== undefined && data.Finalized !== null) {
|
|
1466
|
-
contents.Finalized = __expectBoolean(data.Finalized);
|
|
1467
|
-
}
|
|
1468
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
1469
|
-
contents.Id = __expectString(data.Id);
|
|
1470
|
-
}
|
|
1471
|
-
if (data.SourceId !== undefined && data.SourceId !== null) {
|
|
1472
|
-
contents.SourceId = __expectString(data.SourceId);
|
|
1473
|
-
}
|
|
1474
|
-
if (data.Tags !== undefined && data.Tags !== null) {
|
|
1475
|
-
contents.Tags = deserializeAws_restJson1MapOf__string(data.Tags, context);
|
|
1476
|
-
}
|
|
1477
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
1478
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
1479
|
-
}
|
|
1480
|
-
return Promise.resolve(contents);
|
|
1481
|
-
};
|
|
1482
|
-
|
|
1483
|
-
const deserializeAws_restJson1CreateRevisionCommandError = async (
|
|
1484
|
-
output: __HttpResponse,
|
|
1485
|
-
context: __SerdeContext
|
|
1486
|
-
): Promise<CreateRevisionCommandOutput> => {
|
|
1487
|
-
const parsedOutput: any = {
|
|
1488
|
-
...output,
|
|
1489
|
-
body: await parseBody(output.body, context),
|
|
1490
|
-
};
|
|
1491
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1492
|
-
let errorCode = "UnknownError";
|
|
1493
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1494
|
-
switch (errorCode) {
|
|
1495
|
-
case "AccessDeniedException":
|
|
1496
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
1497
|
-
response = {
|
|
1498
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1499
|
-
name: errorCode,
|
|
1500
|
-
$metadata: deserializeMetadata(output),
|
|
1501
|
-
};
|
|
1502
|
-
break;
|
|
1503
|
-
case "InternalServerException":
|
|
1504
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
1505
|
-
response = {
|
|
1506
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1507
|
-
name: errorCode,
|
|
1508
|
-
$metadata: deserializeMetadata(output),
|
|
1509
|
-
};
|
|
1510
|
-
break;
|
|
1511
|
-
case "ResourceNotFoundException":
|
|
1512
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
1513
|
-
response = {
|
|
1514
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1515
|
-
name: errorCode,
|
|
1516
|
-
$metadata: deserializeMetadata(output),
|
|
1517
|
-
};
|
|
1518
|
-
break;
|
|
1519
|
-
case "ThrottlingException":
|
|
1520
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
1521
|
-
response = {
|
|
1522
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1523
|
-
name: errorCode,
|
|
1524
|
-
$metadata: deserializeMetadata(output),
|
|
1525
|
-
};
|
|
1526
|
-
break;
|
|
1527
|
-
case "ValidationException":
|
|
1528
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
1529
|
-
response = {
|
|
1530
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1531
|
-
name: errorCode,
|
|
1532
|
-
$metadata: deserializeMetadata(output),
|
|
1533
|
-
};
|
|
1534
|
-
break;
|
|
1535
|
-
default:
|
|
1536
|
-
const parsedBody = parsedOutput.body;
|
|
1537
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1538
|
-
response = {
|
|
1539
|
-
...parsedBody,
|
|
1540
|
-
name: `${errorCode}`,
|
|
1541
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1542
|
-
$fault: "client",
|
|
1543
|
-
$metadata: deserializeMetadata(output),
|
|
1544
|
-
} as any;
|
|
1545
|
-
}
|
|
1546
|
-
const message = response.message || response.Message || errorCode;
|
|
1547
|
-
response.message = message;
|
|
1548
|
-
delete response.Message;
|
|
1549
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1550
|
-
};
|
|
1551
|
-
|
|
1552
|
-
export const deserializeAws_restJson1DeleteAssetCommand = async (
|
|
1553
|
-
output: __HttpResponse,
|
|
1554
|
-
context: __SerdeContext
|
|
1555
|
-
): Promise<DeleteAssetCommandOutput> => {
|
|
1556
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1557
|
-
return deserializeAws_restJson1DeleteAssetCommandError(output, context);
|
|
1558
|
-
}
|
|
1559
|
-
const contents: DeleteAssetCommandOutput = {
|
|
1560
|
-
$metadata: deserializeMetadata(output),
|
|
1561
|
-
};
|
|
1562
|
-
await collectBody(output.body, context);
|
|
1563
|
-
return Promise.resolve(contents);
|
|
1564
|
-
};
|
|
1565
|
-
|
|
1566
|
-
const deserializeAws_restJson1DeleteAssetCommandError = async (
|
|
1567
|
-
output: __HttpResponse,
|
|
1568
|
-
context: __SerdeContext
|
|
1569
|
-
): Promise<DeleteAssetCommandOutput> => {
|
|
1570
|
-
const parsedOutput: any = {
|
|
1571
|
-
...output,
|
|
1572
|
-
body: await parseBody(output.body, context),
|
|
1573
|
-
};
|
|
1574
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1575
|
-
let errorCode = "UnknownError";
|
|
1576
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1577
|
-
switch (errorCode) {
|
|
1578
|
-
case "AccessDeniedException":
|
|
1579
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
1580
|
-
response = {
|
|
1581
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1582
|
-
name: errorCode,
|
|
1583
|
-
$metadata: deserializeMetadata(output),
|
|
1584
|
-
};
|
|
1585
|
-
break;
|
|
1586
|
-
case "ConflictException":
|
|
1587
|
-
case "com.amazonaws.dataexchange#ConflictException":
|
|
1588
|
-
response = {
|
|
1589
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1590
|
-
name: errorCode,
|
|
1591
|
-
$metadata: deserializeMetadata(output),
|
|
1592
|
-
};
|
|
1593
|
-
break;
|
|
1594
|
-
case "InternalServerException":
|
|
1595
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
1596
|
-
response = {
|
|
1597
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1598
|
-
name: errorCode,
|
|
1599
|
-
$metadata: deserializeMetadata(output),
|
|
1600
|
-
};
|
|
1601
|
-
break;
|
|
1602
|
-
case "ResourceNotFoundException":
|
|
1603
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
1604
|
-
response = {
|
|
1605
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1606
|
-
name: errorCode,
|
|
1607
|
-
$metadata: deserializeMetadata(output),
|
|
1608
|
-
};
|
|
1609
|
-
break;
|
|
1610
|
-
case "ThrottlingException":
|
|
1611
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
1612
|
-
response = {
|
|
1613
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1614
|
-
name: errorCode,
|
|
1615
|
-
$metadata: deserializeMetadata(output),
|
|
1616
|
-
};
|
|
1617
|
-
break;
|
|
1618
|
-
case "ValidationException":
|
|
1619
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
1620
|
-
response = {
|
|
1621
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1622
|
-
name: errorCode,
|
|
1623
|
-
$metadata: deserializeMetadata(output),
|
|
1624
|
-
};
|
|
1625
|
-
break;
|
|
1626
|
-
default:
|
|
1627
|
-
const parsedBody = parsedOutput.body;
|
|
1628
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1629
|
-
response = {
|
|
1630
|
-
...parsedBody,
|
|
1631
|
-
name: `${errorCode}`,
|
|
1632
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1633
|
-
$fault: "client",
|
|
1634
|
-
$metadata: deserializeMetadata(output),
|
|
1635
|
-
} as any;
|
|
1636
|
-
}
|
|
1637
|
-
const message = response.message || response.Message || errorCode;
|
|
1638
|
-
response.message = message;
|
|
1639
|
-
delete response.Message;
|
|
1640
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1641
|
-
};
|
|
1642
|
-
|
|
1643
|
-
export const deserializeAws_restJson1DeleteDataSetCommand = async (
|
|
1644
|
-
output: __HttpResponse,
|
|
1645
|
-
context: __SerdeContext
|
|
1646
|
-
): Promise<DeleteDataSetCommandOutput> => {
|
|
1647
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1648
|
-
return deserializeAws_restJson1DeleteDataSetCommandError(output, context);
|
|
1649
|
-
}
|
|
1650
|
-
const contents: DeleteDataSetCommandOutput = {
|
|
1651
|
-
$metadata: deserializeMetadata(output),
|
|
1652
|
-
};
|
|
1653
|
-
await collectBody(output.body, context);
|
|
1654
|
-
return Promise.resolve(contents);
|
|
1655
|
-
};
|
|
1656
|
-
|
|
1657
|
-
const deserializeAws_restJson1DeleteDataSetCommandError = async (
|
|
1658
|
-
output: __HttpResponse,
|
|
1659
|
-
context: __SerdeContext
|
|
1660
|
-
): Promise<DeleteDataSetCommandOutput> => {
|
|
1661
|
-
const parsedOutput: any = {
|
|
1662
|
-
...output,
|
|
1663
|
-
body: await parseBody(output.body, context),
|
|
1664
|
-
};
|
|
1665
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1666
|
-
let errorCode = "UnknownError";
|
|
1667
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1668
|
-
switch (errorCode) {
|
|
1669
|
-
case "AccessDeniedException":
|
|
1670
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
1671
|
-
response = {
|
|
1672
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1673
|
-
name: errorCode,
|
|
1674
|
-
$metadata: deserializeMetadata(output),
|
|
1675
|
-
};
|
|
1676
|
-
break;
|
|
1677
|
-
case "ConflictException":
|
|
1678
|
-
case "com.amazonaws.dataexchange#ConflictException":
|
|
1679
|
-
response = {
|
|
1680
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1681
|
-
name: errorCode,
|
|
1682
|
-
$metadata: deserializeMetadata(output),
|
|
1683
|
-
};
|
|
1684
|
-
break;
|
|
1685
|
-
case "InternalServerException":
|
|
1686
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
1687
|
-
response = {
|
|
1688
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1689
|
-
name: errorCode,
|
|
1690
|
-
$metadata: deserializeMetadata(output),
|
|
1691
|
-
};
|
|
1692
|
-
break;
|
|
1693
|
-
case "ResourceNotFoundException":
|
|
1694
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
1695
|
-
response = {
|
|
1696
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1697
|
-
name: errorCode,
|
|
1698
|
-
$metadata: deserializeMetadata(output),
|
|
1699
|
-
};
|
|
1700
|
-
break;
|
|
1701
|
-
case "ThrottlingException":
|
|
1702
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
1703
|
-
response = {
|
|
1704
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1705
|
-
name: errorCode,
|
|
1706
|
-
$metadata: deserializeMetadata(output),
|
|
1707
|
-
};
|
|
1708
|
-
break;
|
|
1709
|
-
case "ValidationException":
|
|
1710
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
1711
|
-
response = {
|
|
1712
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1713
|
-
name: errorCode,
|
|
1714
|
-
$metadata: deserializeMetadata(output),
|
|
1715
|
-
};
|
|
1716
|
-
break;
|
|
1717
|
-
default:
|
|
1718
|
-
const parsedBody = parsedOutput.body;
|
|
1719
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1720
|
-
response = {
|
|
1721
|
-
...parsedBody,
|
|
1722
|
-
name: `${errorCode}`,
|
|
1723
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1724
|
-
$fault: "client",
|
|
1725
|
-
$metadata: deserializeMetadata(output),
|
|
1726
|
-
} as any;
|
|
1727
|
-
}
|
|
1728
|
-
const message = response.message || response.Message || errorCode;
|
|
1729
|
-
response.message = message;
|
|
1730
|
-
delete response.Message;
|
|
1731
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1732
|
-
};
|
|
1733
|
-
|
|
1734
|
-
export const deserializeAws_restJson1DeleteEventActionCommand = async (
|
|
1735
|
-
output: __HttpResponse,
|
|
1736
|
-
context: __SerdeContext
|
|
1737
|
-
): Promise<DeleteEventActionCommandOutput> => {
|
|
1738
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1739
|
-
return deserializeAws_restJson1DeleteEventActionCommandError(output, context);
|
|
1740
|
-
}
|
|
1741
|
-
const contents: DeleteEventActionCommandOutput = {
|
|
1742
|
-
$metadata: deserializeMetadata(output),
|
|
1743
|
-
};
|
|
1744
|
-
await collectBody(output.body, context);
|
|
1745
|
-
return Promise.resolve(contents);
|
|
1746
|
-
};
|
|
1747
|
-
|
|
1748
|
-
const deserializeAws_restJson1DeleteEventActionCommandError = async (
|
|
1749
|
-
output: __HttpResponse,
|
|
1750
|
-
context: __SerdeContext
|
|
1751
|
-
): Promise<DeleteEventActionCommandOutput> => {
|
|
1752
|
-
const parsedOutput: any = {
|
|
1753
|
-
...output,
|
|
1754
|
-
body: await parseBody(output.body, context),
|
|
1755
|
-
};
|
|
1756
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1757
|
-
let errorCode = "UnknownError";
|
|
1758
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1759
|
-
switch (errorCode) {
|
|
1760
|
-
case "InternalServerException":
|
|
1761
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
1762
|
-
response = {
|
|
1763
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1764
|
-
name: errorCode,
|
|
1765
|
-
$metadata: deserializeMetadata(output),
|
|
1766
|
-
};
|
|
1767
|
-
break;
|
|
1768
|
-
case "ResourceNotFoundException":
|
|
1769
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
1770
|
-
response = {
|
|
1771
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1772
|
-
name: errorCode,
|
|
1773
|
-
$metadata: deserializeMetadata(output),
|
|
1774
|
-
};
|
|
1775
|
-
break;
|
|
1776
|
-
case "ThrottlingException":
|
|
1777
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
1778
|
-
response = {
|
|
1779
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1780
|
-
name: errorCode,
|
|
1781
|
-
$metadata: deserializeMetadata(output),
|
|
1782
|
-
};
|
|
1783
|
-
break;
|
|
1784
|
-
case "ValidationException":
|
|
1785
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
1786
|
-
response = {
|
|
1787
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1788
|
-
name: errorCode,
|
|
1789
|
-
$metadata: deserializeMetadata(output),
|
|
1790
|
-
};
|
|
1791
|
-
break;
|
|
1792
|
-
default:
|
|
1793
|
-
const parsedBody = parsedOutput.body;
|
|
1794
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1795
|
-
response = {
|
|
1796
|
-
...parsedBody,
|
|
1797
|
-
name: `${errorCode}`,
|
|
1798
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1799
|
-
$fault: "client",
|
|
1800
|
-
$metadata: deserializeMetadata(output),
|
|
1801
|
-
} as any;
|
|
1802
|
-
}
|
|
1803
|
-
const message = response.message || response.Message || errorCode;
|
|
1804
|
-
response.message = message;
|
|
1805
|
-
delete response.Message;
|
|
1806
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1807
|
-
};
|
|
1808
|
-
|
|
1809
|
-
export const deserializeAws_restJson1DeleteRevisionCommand = async (
|
|
1810
|
-
output: __HttpResponse,
|
|
1811
|
-
context: __SerdeContext
|
|
1812
|
-
): Promise<DeleteRevisionCommandOutput> => {
|
|
1813
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1814
|
-
return deserializeAws_restJson1DeleteRevisionCommandError(output, context);
|
|
1815
|
-
}
|
|
1816
|
-
const contents: DeleteRevisionCommandOutput = {
|
|
1817
|
-
$metadata: deserializeMetadata(output),
|
|
1818
|
-
};
|
|
1819
|
-
await collectBody(output.body, context);
|
|
1820
|
-
return Promise.resolve(contents);
|
|
1821
|
-
};
|
|
1822
|
-
|
|
1823
|
-
const deserializeAws_restJson1DeleteRevisionCommandError = async (
|
|
1824
|
-
output: __HttpResponse,
|
|
1825
|
-
context: __SerdeContext
|
|
1826
|
-
): Promise<DeleteRevisionCommandOutput> => {
|
|
1827
|
-
const parsedOutput: any = {
|
|
1828
|
-
...output,
|
|
1829
|
-
body: await parseBody(output.body, context),
|
|
1830
|
-
};
|
|
1831
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1832
|
-
let errorCode = "UnknownError";
|
|
1833
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1834
|
-
switch (errorCode) {
|
|
1835
|
-
case "AccessDeniedException":
|
|
1836
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
1837
|
-
response = {
|
|
1838
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1839
|
-
name: errorCode,
|
|
1840
|
-
$metadata: deserializeMetadata(output),
|
|
1841
|
-
};
|
|
1842
|
-
break;
|
|
1843
|
-
case "ConflictException":
|
|
1844
|
-
case "com.amazonaws.dataexchange#ConflictException":
|
|
1845
|
-
response = {
|
|
1846
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1847
|
-
name: errorCode,
|
|
1848
|
-
$metadata: deserializeMetadata(output),
|
|
1849
|
-
};
|
|
1850
|
-
break;
|
|
1851
|
-
case "InternalServerException":
|
|
1852
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
1853
|
-
response = {
|
|
1854
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1855
|
-
name: errorCode,
|
|
1856
|
-
$metadata: deserializeMetadata(output),
|
|
1857
|
-
};
|
|
1858
|
-
break;
|
|
1859
|
-
case "ResourceNotFoundException":
|
|
1860
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
1861
|
-
response = {
|
|
1862
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1863
|
-
name: errorCode,
|
|
1864
|
-
$metadata: deserializeMetadata(output),
|
|
1865
|
-
};
|
|
1866
|
-
break;
|
|
1867
|
-
case "ThrottlingException":
|
|
1868
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
1869
|
-
response = {
|
|
1870
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1871
|
-
name: errorCode,
|
|
1872
|
-
$metadata: deserializeMetadata(output),
|
|
1873
|
-
};
|
|
1874
|
-
break;
|
|
1875
|
-
case "ValidationException":
|
|
1876
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
1877
|
-
response = {
|
|
1878
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1879
|
-
name: errorCode,
|
|
1880
|
-
$metadata: deserializeMetadata(output),
|
|
1881
|
-
};
|
|
1882
|
-
break;
|
|
1883
|
-
default:
|
|
1884
|
-
const parsedBody = parsedOutput.body;
|
|
1885
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1886
|
-
response = {
|
|
1887
|
-
...parsedBody,
|
|
1888
|
-
name: `${errorCode}`,
|
|
1889
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1890
|
-
$fault: "client",
|
|
1891
|
-
$metadata: deserializeMetadata(output),
|
|
1892
|
-
} as any;
|
|
1893
|
-
}
|
|
1894
|
-
const message = response.message || response.Message || errorCode;
|
|
1895
|
-
response.message = message;
|
|
1896
|
-
delete response.Message;
|
|
1897
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1898
|
-
};
|
|
1899
|
-
|
|
1900
|
-
export const deserializeAws_restJson1GetAssetCommand = async (
|
|
1901
|
-
output: __HttpResponse,
|
|
1902
|
-
context: __SerdeContext
|
|
1903
|
-
): Promise<GetAssetCommandOutput> => {
|
|
1904
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1905
|
-
return deserializeAws_restJson1GetAssetCommandError(output, context);
|
|
1906
|
-
}
|
|
1907
|
-
const contents: GetAssetCommandOutput = {
|
|
1908
|
-
$metadata: deserializeMetadata(output),
|
|
1909
|
-
Arn: undefined,
|
|
1910
|
-
AssetDetails: undefined,
|
|
1911
|
-
AssetType: undefined,
|
|
1912
|
-
CreatedAt: undefined,
|
|
1913
|
-
DataSetId: undefined,
|
|
1914
|
-
Id: undefined,
|
|
1915
|
-
Name: undefined,
|
|
1916
|
-
RevisionId: undefined,
|
|
1917
|
-
SourceId: undefined,
|
|
1918
|
-
UpdatedAt: undefined,
|
|
1919
|
-
};
|
|
1920
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1921
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
1922
|
-
contents.Arn = __expectString(data.Arn);
|
|
1923
|
-
}
|
|
1924
|
-
if (data.AssetDetails !== undefined && data.AssetDetails !== null) {
|
|
1925
|
-
contents.AssetDetails = deserializeAws_restJson1AssetDetails(data.AssetDetails, context);
|
|
1926
|
-
}
|
|
1927
|
-
if (data.AssetType !== undefined && data.AssetType !== null) {
|
|
1928
|
-
contents.AssetType = __expectString(data.AssetType);
|
|
1929
|
-
}
|
|
1930
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
1931
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
1932
|
-
}
|
|
1933
|
-
if (data.DataSetId !== undefined && data.DataSetId !== null) {
|
|
1934
|
-
contents.DataSetId = __expectString(data.DataSetId);
|
|
1935
|
-
}
|
|
1936
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
1937
|
-
contents.Id = __expectString(data.Id);
|
|
1938
|
-
}
|
|
1939
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
1940
|
-
contents.Name = __expectString(data.Name);
|
|
1941
|
-
}
|
|
1942
|
-
if (data.RevisionId !== undefined && data.RevisionId !== null) {
|
|
1943
|
-
contents.RevisionId = __expectString(data.RevisionId);
|
|
1944
|
-
}
|
|
1945
|
-
if (data.SourceId !== undefined && data.SourceId !== null) {
|
|
1946
|
-
contents.SourceId = __expectString(data.SourceId);
|
|
1947
|
-
}
|
|
1948
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
1949
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
1950
|
-
}
|
|
1951
|
-
return Promise.resolve(contents);
|
|
1952
|
-
};
|
|
1953
|
-
|
|
1954
|
-
const deserializeAws_restJson1GetAssetCommandError = async (
|
|
1955
|
-
output: __HttpResponse,
|
|
1956
|
-
context: __SerdeContext
|
|
1957
|
-
): Promise<GetAssetCommandOutput> => {
|
|
1958
|
-
const parsedOutput: any = {
|
|
1959
|
-
...output,
|
|
1960
|
-
body: await parseBody(output.body, context),
|
|
1961
|
-
};
|
|
1962
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1963
|
-
let errorCode = "UnknownError";
|
|
1964
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1965
|
-
switch (errorCode) {
|
|
1966
|
-
case "InternalServerException":
|
|
1967
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
1968
|
-
response = {
|
|
1969
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1970
|
-
name: errorCode,
|
|
1971
|
-
$metadata: deserializeMetadata(output),
|
|
1972
|
-
};
|
|
1973
|
-
break;
|
|
1974
|
-
case "ResourceNotFoundException":
|
|
1975
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
1976
|
-
response = {
|
|
1977
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1978
|
-
name: errorCode,
|
|
1979
|
-
$metadata: deserializeMetadata(output),
|
|
1980
|
-
};
|
|
1981
|
-
break;
|
|
1982
|
-
case "ThrottlingException":
|
|
1983
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
1984
|
-
response = {
|
|
1985
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1986
|
-
name: errorCode,
|
|
1987
|
-
$metadata: deserializeMetadata(output),
|
|
1988
|
-
};
|
|
1989
|
-
break;
|
|
1990
|
-
case "ValidationException":
|
|
1991
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
1992
|
-
response = {
|
|
1993
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1994
|
-
name: errorCode,
|
|
1995
|
-
$metadata: deserializeMetadata(output),
|
|
1996
|
-
};
|
|
1997
|
-
break;
|
|
1998
|
-
default:
|
|
1999
|
-
const parsedBody = parsedOutput.body;
|
|
2000
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2001
|
-
response = {
|
|
2002
|
-
...parsedBody,
|
|
2003
|
-
name: `${errorCode}`,
|
|
2004
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2005
|
-
$fault: "client",
|
|
2006
|
-
$metadata: deserializeMetadata(output),
|
|
2007
|
-
} as any;
|
|
2008
|
-
}
|
|
2009
|
-
const message = response.message || response.Message || errorCode;
|
|
2010
|
-
response.message = message;
|
|
2011
|
-
delete response.Message;
|
|
2012
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2013
|
-
};
|
|
2014
|
-
|
|
2015
|
-
export const deserializeAws_restJson1GetDataSetCommand = async (
|
|
2016
|
-
output: __HttpResponse,
|
|
2017
|
-
context: __SerdeContext
|
|
2018
|
-
): Promise<GetDataSetCommandOutput> => {
|
|
2019
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2020
|
-
return deserializeAws_restJson1GetDataSetCommandError(output, context);
|
|
2021
|
-
}
|
|
2022
|
-
const contents: GetDataSetCommandOutput = {
|
|
2023
|
-
$metadata: deserializeMetadata(output),
|
|
2024
|
-
Arn: undefined,
|
|
2025
|
-
AssetType: undefined,
|
|
2026
|
-
CreatedAt: undefined,
|
|
2027
|
-
Description: undefined,
|
|
2028
|
-
Id: undefined,
|
|
2029
|
-
Name: undefined,
|
|
2030
|
-
Origin: undefined,
|
|
2031
|
-
OriginDetails: undefined,
|
|
2032
|
-
SourceId: undefined,
|
|
2033
|
-
Tags: undefined,
|
|
2034
|
-
UpdatedAt: undefined,
|
|
2035
|
-
};
|
|
2036
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2037
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
2038
|
-
contents.Arn = __expectString(data.Arn);
|
|
2039
|
-
}
|
|
2040
|
-
if (data.AssetType !== undefined && data.AssetType !== null) {
|
|
2041
|
-
contents.AssetType = __expectString(data.AssetType);
|
|
2042
|
-
}
|
|
2043
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
2044
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
2045
|
-
}
|
|
2046
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
2047
|
-
contents.Description = __expectString(data.Description);
|
|
2048
|
-
}
|
|
2049
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
2050
|
-
contents.Id = __expectString(data.Id);
|
|
2051
|
-
}
|
|
2052
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
2053
|
-
contents.Name = __expectString(data.Name);
|
|
2054
|
-
}
|
|
2055
|
-
if (data.Origin !== undefined && data.Origin !== null) {
|
|
2056
|
-
contents.Origin = __expectString(data.Origin);
|
|
2057
|
-
}
|
|
2058
|
-
if (data.OriginDetails !== undefined && data.OriginDetails !== null) {
|
|
2059
|
-
contents.OriginDetails = deserializeAws_restJson1OriginDetails(data.OriginDetails, context);
|
|
2060
|
-
}
|
|
2061
|
-
if (data.SourceId !== undefined && data.SourceId !== null) {
|
|
2062
|
-
contents.SourceId = __expectString(data.SourceId);
|
|
2063
|
-
}
|
|
2064
|
-
if (data.Tags !== undefined && data.Tags !== null) {
|
|
2065
|
-
contents.Tags = deserializeAws_restJson1MapOf__string(data.Tags, context);
|
|
2066
|
-
}
|
|
2067
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
2068
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
2069
|
-
}
|
|
2070
|
-
return Promise.resolve(contents);
|
|
2071
|
-
};
|
|
2072
|
-
|
|
2073
|
-
const deserializeAws_restJson1GetDataSetCommandError = async (
|
|
2074
|
-
output: __HttpResponse,
|
|
2075
|
-
context: __SerdeContext
|
|
2076
|
-
): Promise<GetDataSetCommandOutput> => {
|
|
2077
|
-
const parsedOutput: any = {
|
|
2078
|
-
...output,
|
|
2079
|
-
body: await parseBody(output.body, context),
|
|
2080
|
-
};
|
|
2081
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2082
|
-
let errorCode = "UnknownError";
|
|
2083
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2084
|
-
switch (errorCode) {
|
|
2085
|
-
case "InternalServerException":
|
|
2086
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
2087
|
-
response = {
|
|
2088
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2089
|
-
name: errorCode,
|
|
2090
|
-
$metadata: deserializeMetadata(output),
|
|
2091
|
-
};
|
|
2092
|
-
break;
|
|
2093
|
-
case "ResourceNotFoundException":
|
|
2094
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
2095
|
-
response = {
|
|
2096
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2097
|
-
name: errorCode,
|
|
2098
|
-
$metadata: deserializeMetadata(output),
|
|
2099
|
-
};
|
|
2100
|
-
break;
|
|
2101
|
-
case "ThrottlingException":
|
|
2102
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
2103
|
-
response = {
|
|
2104
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2105
|
-
name: errorCode,
|
|
2106
|
-
$metadata: deserializeMetadata(output),
|
|
2107
|
-
};
|
|
2108
|
-
break;
|
|
2109
|
-
case "ValidationException":
|
|
2110
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
2111
|
-
response = {
|
|
2112
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2113
|
-
name: errorCode,
|
|
2114
|
-
$metadata: deserializeMetadata(output),
|
|
2115
|
-
};
|
|
2116
|
-
break;
|
|
2117
|
-
default:
|
|
2118
|
-
const parsedBody = parsedOutput.body;
|
|
2119
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2120
|
-
response = {
|
|
2121
|
-
...parsedBody,
|
|
2122
|
-
name: `${errorCode}`,
|
|
2123
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2124
|
-
$fault: "client",
|
|
2125
|
-
$metadata: deserializeMetadata(output),
|
|
2126
|
-
} as any;
|
|
2127
|
-
}
|
|
2128
|
-
const message = response.message || response.Message || errorCode;
|
|
2129
|
-
response.message = message;
|
|
2130
|
-
delete response.Message;
|
|
2131
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2132
|
-
};
|
|
2133
|
-
|
|
2134
|
-
export const deserializeAws_restJson1GetEventActionCommand = async (
|
|
2135
|
-
output: __HttpResponse,
|
|
2136
|
-
context: __SerdeContext
|
|
2137
|
-
): Promise<GetEventActionCommandOutput> => {
|
|
2138
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2139
|
-
return deserializeAws_restJson1GetEventActionCommandError(output, context);
|
|
2140
|
-
}
|
|
2141
|
-
const contents: GetEventActionCommandOutput = {
|
|
2142
|
-
$metadata: deserializeMetadata(output),
|
|
2143
|
-
Action: undefined,
|
|
2144
|
-
Arn: undefined,
|
|
2145
|
-
CreatedAt: undefined,
|
|
2146
|
-
Event: undefined,
|
|
2147
|
-
Id: undefined,
|
|
2148
|
-
UpdatedAt: undefined,
|
|
2149
|
-
};
|
|
2150
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2151
|
-
if (data.Action !== undefined && data.Action !== null) {
|
|
2152
|
-
contents.Action = deserializeAws_restJson1Action(data.Action, context);
|
|
2153
|
-
}
|
|
2154
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
2155
|
-
contents.Arn = __expectString(data.Arn);
|
|
2156
|
-
}
|
|
2157
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
2158
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
2159
|
-
}
|
|
2160
|
-
if (data.Event !== undefined && data.Event !== null) {
|
|
2161
|
-
contents.Event = deserializeAws_restJson1Event(data.Event, context);
|
|
2162
|
-
}
|
|
2163
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
2164
|
-
contents.Id = __expectString(data.Id);
|
|
2165
|
-
}
|
|
2166
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
2167
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
2168
|
-
}
|
|
2169
|
-
return Promise.resolve(contents);
|
|
2170
|
-
};
|
|
2171
|
-
|
|
2172
|
-
const deserializeAws_restJson1GetEventActionCommandError = async (
|
|
2173
|
-
output: __HttpResponse,
|
|
2174
|
-
context: __SerdeContext
|
|
2175
|
-
): Promise<GetEventActionCommandOutput> => {
|
|
2176
|
-
const parsedOutput: any = {
|
|
2177
|
-
...output,
|
|
2178
|
-
body: await parseBody(output.body, context),
|
|
2179
|
-
};
|
|
2180
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2181
|
-
let errorCode = "UnknownError";
|
|
2182
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2183
|
-
switch (errorCode) {
|
|
2184
|
-
case "InternalServerException":
|
|
2185
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
2186
|
-
response = {
|
|
2187
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2188
|
-
name: errorCode,
|
|
2189
|
-
$metadata: deserializeMetadata(output),
|
|
2190
|
-
};
|
|
2191
|
-
break;
|
|
2192
|
-
case "ResourceNotFoundException":
|
|
2193
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
2194
|
-
response = {
|
|
2195
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2196
|
-
name: errorCode,
|
|
2197
|
-
$metadata: deserializeMetadata(output),
|
|
2198
|
-
};
|
|
2199
|
-
break;
|
|
2200
|
-
case "ThrottlingException":
|
|
2201
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
2202
|
-
response = {
|
|
2203
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2204
|
-
name: errorCode,
|
|
2205
|
-
$metadata: deserializeMetadata(output),
|
|
2206
|
-
};
|
|
2207
|
-
break;
|
|
2208
|
-
case "ValidationException":
|
|
2209
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
2210
|
-
response = {
|
|
2211
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2212
|
-
name: errorCode,
|
|
2213
|
-
$metadata: deserializeMetadata(output),
|
|
2214
|
-
};
|
|
2215
|
-
break;
|
|
2216
|
-
default:
|
|
2217
|
-
const parsedBody = parsedOutput.body;
|
|
2218
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2219
|
-
response = {
|
|
2220
|
-
...parsedBody,
|
|
2221
|
-
name: `${errorCode}`,
|
|
2222
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2223
|
-
$fault: "client",
|
|
2224
|
-
$metadata: deserializeMetadata(output),
|
|
2225
|
-
} as any;
|
|
2226
|
-
}
|
|
2227
|
-
const message = response.message || response.Message || errorCode;
|
|
2228
|
-
response.message = message;
|
|
2229
|
-
delete response.Message;
|
|
2230
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2231
|
-
};
|
|
2232
|
-
|
|
2233
|
-
export const deserializeAws_restJson1GetJobCommand = async (
|
|
2234
|
-
output: __HttpResponse,
|
|
2235
|
-
context: __SerdeContext
|
|
2236
|
-
): Promise<GetJobCommandOutput> => {
|
|
2237
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2238
|
-
return deserializeAws_restJson1GetJobCommandError(output, context);
|
|
2239
|
-
}
|
|
2240
|
-
const contents: GetJobCommandOutput = {
|
|
2241
|
-
$metadata: deserializeMetadata(output),
|
|
2242
|
-
Arn: undefined,
|
|
2243
|
-
CreatedAt: undefined,
|
|
2244
|
-
Details: undefined,
|
|
2245
|
-
Errors: undefined,
|
|
2246
|
-
Id: undefined,
|
|
2247
|
-
State: undefined,
|
|
2248
|
-
Type: undefined,
|
|
2249
|
-
UpdatedAt: undefined,
|
|
2250
|
-
};
|
|
2251
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2252
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
2253
|
-
contents.Arn = __expectString(data.Arn);
|
|
2254
|
-
}
|
|
2255
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
2256
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
2257
|
-
}
|
|
2258
|
-
if (data.Details !== undefined && data.Details !== null) {
|
|
2259
|
-
contents.Details = deserializeAws_restJson1ResponseDetails(data.Details, context);
|
|
2260
|
-
}
|
|
2261
|
-
if (data.Errors !== undefined && data.Errors !== null) {
|
|
2262
|
-
contents.Errors = deserializeAws_restJson1ListOfJobError(data.Errors, context);
|
|
2263
|
-
}
|
|
2264
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
2265
|
-
contents.Id = __expectString(data.Id);
|
|
2266
|
-
}
|
|
2267
|
-
if (data.State !== undefined && data.State !== null) {
|
|
2268
|
-
contents.State = __expectString(data.State);
|
|
2269
|
-
}
|
|
2270
|
-
if (data.Type !== undefined && data.Type !== null) {
|
|
2271
|
-
contents.Type = __expectString(data.Type);
|
|
2272
|
-
}
|
|
2273
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
2274
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
2275
|
-
}
|
|
2276
|
-
return Promise.resolve(contents);
|
|
2277
|
-
};
|
|
2278
|
-
|
|
2279
|
-
const deserializeAws_restJson1GetJobCommandError = async (
|
|
2280
|
-
output: __HttpResponse,
|
|
2281
|
-
context: __SerdeContext
|
|
2282
|
-
): Promise<GetJobCommandOutput> => {
|
|
2283
|
-
const parsedOutput: any = {
|
|
2284
|
-
...output,
|
|
2285
|
-
body: await parseBody(output.body, context),
|
|
2286
|
-
};
|
|
2287
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2288
|
-
let errorCode = "UnknownError";
|
|
2289
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2290
|
-
switch (errorCode) {
|
|
2291
|
-
case "InternalServerException":
|
|
2292
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
2293
|
-
response = {
|
|
2294
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2295
|
-
name: errorCode,
|
|
2296
|
-
$metadata: deserializeMetadata(output),
|
|
2297
|
-
};
|
|
2298
|
-
break;
|
|
2299
|
-
case "ResourceNotFoundException":
|
|
2300
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
2301
|
-
response = {
|
|
2302
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2303
|
-
name: errorCode,
|
|
2304
|
-
$metadata: deserializeMetadata(output),
|
|
2305
|
-
};
|
|
2306
|
-
break;
|
|
2307
|
-
case "ThrottlingException":
|
|
2308
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
2309
|
-
response = {
|
|
2310
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2311
|
-
name: errorCode,
|
|
2312
|
-
$metadata: deserializeMetadata(output),
|
|
2313
|
-
};
|
|
2314
|
-
break;
|
|
2315
|
-
case "ValidationException":
|
|
2316
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
2317
|
-
response = {
|
|
2318
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2319
|
-
name: errorCode,
|
|
2320
|
-
$metadata: deserializeMetadata(output),
|
|
2321
|
-
};
|
|
2322
|
-
break;
|
|
2323
|
-
default:
|
|
2324
|
-
const parsedBody = parsedOutput.body;
|
|
2325
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2326
|
-
response = {
|
|
2327
|
-
...parsedBody,
|
|
2328
|
-
name: `${errorCode}`,
|
|
2329
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2330
|
-
$fault: "client",
|
|
2331
|
-
$metadata: deserializeMetadata(output),
|
|
2332
|
-
} as any;
|
|
2333
|
-
}
|
|
2334
|
-
const message = response.message || response.Message || errorCode;
|
|
2335
|
-
response.message = message;
|
|
2336
|
-
delete response.Message;
|
|
2337
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2338
|
-
};
|
|
2339
|
-
|
|
2340
|
-
export const deserializeAws_restJson1GetRevisionCommand = async (
|
|
2341
|
-
output: __HttpResponse,
|
|
2342
|
-
context: __SerdeContext
|
|
2343
|
-
): Promise<GetRevisionCommandOutput> => {
|
|
2344
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2345
|
-
return deserializeAws_restJson1GetRevisionCommandError(output, context);
|
|
2346
|
-
}
|
|
2347
|
-
const contents: GetRevisionCommandOutput = {
|
|
2348
|
-
$metadata: deserializeMetadata(output),
|
|
2349
|
-
Arn: undefined,
|
|
2350
|
-
Comment: undefined,
|
|
2351
|
-
CreatedAt: undefined,
|
|
2352
|
-
DataSetId: undefined,
|
|
2353
|
-
Finalized: undefined,
|
|
2354
|
-
Id: undefined,
|
|
2355
|
-
SourceId: undefined,
|
|
2356
|
-
Tags: undefined,
|
|
2357
|
-
UpdatedAt: undefined,
|
|
2358
|
-
};
|
|
2359
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2360
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
2361
|
-
contents.Arn = __expectString(data.Arn);
|
|
2362
|
-
}
|
|
2363
|
-
if (data.Comment !== undefined && data.Comment !== null) {
|
|
2364
|
-
contents.Comment = __expectString(data.Comment);
|
|
2365
|
-
}
|
|
2366
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
2367
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
2368
|
-
}
|
|
2369
|
-
if (data.DataSetId !== undefined && data.DataSetId !== null) {
|
|
2370
|
-
contents.DataSetId = __expectString(data.DataSetId);
|
|
2371
|
-
}
|
|
2372
|
-
if (data.Finalized !== undefined && data.Finalized !== null) {
|
|
2373
|
-
contents.Finalized = __expectBoolean(data.Finalized);
|
|
2374
|
-
}
|
|
2375
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
2376
|
-
contents.Id = __expectString(data.Id);
|
|
2377
|
-
}
|
|
2378
|
-
if (data.SourceId !== undefined && data.SourceId !== null) {
|
|
2379
|
-
contents.SourceId = __expectString(data.SourceId);
|
|
2380
|
-
}
|
|
2381
|
-
if (data.Tags !== undefined && data.Tags !== null) {
|
|
2382
|
-
contents.Tags = deserializeAws_restJson1MapOf__string(data.Tags, context);
|
|
2383
|
-
}
|
|
2384
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
2385
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
2386
|
-
}
|
|
2387
|
-
return Promise.resolve(contents);
|
|
2388
|
-
};
|
|
2389
|
-
|
|
2390
|
-
const deserializeAws_restJson1GetRevisionCommandError = async (
|
|
2391
|
-
output: __HttpResponse,
|
|
2392
|
-
context: __SerdeContext
|
|
2393
|
-
): Promise<GetRevisionCommandOutput> => {
|
|
2394
|
-
const parsedOutput: any = {
|
|
2395
|
-
...output,
|
|
2396
|
-
body: await parseBody(output.body, context),
|
|
2397
|
-
};
|
|
2398
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2399
|
-
let errorCode = "UnknownError";
|
|
2400
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2401
|
-
switch (errorCode) {
|
|
2402
|
-
case "InternalServerException":
|
|
2403
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
2404
|
-
response = {
|
|
2405
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2406
|
-
name: errorCode,
|
|
2407
|
-
$metadata: deserializeMetadata(output),
|
|
2408
|
-
};
|
|
2409
|
-
break;
|
|
2410
|
-
case "ResourceNotFoundException":
|
|
2411
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
2412
|
-
response = {
|
|
2413
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2414
|
-
name: errorCode,
|
|
2415
|
-
$metadata: deserializeMetadata(output),
|
|
2416
|
-
};
|
|
2417
|
-
break;
|
|
2418
|
-
case "ThrottlingException":
|
|
2419
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
2420
|
-
response = {
|
|
2421
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2422
|
-
name: errorCode,
|
|
2423
|
-
$metadata: deserializeMetadata(output),
|
|
2424
|
-
};
|
|
2425
|
-
break;
|
|
2426
|
-
case "ValidationException":
|
|
2427
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
2428
|
-
response = {
|
|
2429
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2430
|
-
name: errorCode,
|
|
2431
|
-
$metadata: deserializeMetadata(output),
|
|
2432
|
-
};
|
|
2433
|
-
break;
|
|
2434
|
-
default:
|
|
2435
|
-
const parsedBody = parsedOutput.body;
|
|
2436
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2437
|
-
response = {
|
|
2438
|
-
...parsedBody,
|
|
2439
|
-
name: `${errorCode}`,
|
|
2440
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2441
|
-
$fault: "client",
|
|
2442
|
-
$metadata: deserializeMetadata(output),
|
|
2443
|
-
} as any;
|
|
2444
|
-
}
|
|
2445
|
-
const message = response.message || response.Message || errorCode;
|
|
2446
|
-
response.message = message;
|
|
2447
|
-
delete response.Message;
|
|
2448
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2449
|
-
};
|
|
2450
|
-
|
|
2451
|
-
export const deserializeAws_restJson1ListDataSetRevisionsCommand = async (
|
|
2452
|
-
output: __HttpResponse,
|
|
2453
|
-
context: __SerdeContext
|
|
2454
|
-
): Promise<ListDataSetRevisionsCommandOutput> => {
|
|
2455
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2456
|
-
return deserializeAws_restJson1ListDataSetRevisionsCommandError(output, context);
|
|
2457
|
-
}
|
|
2458
|
-
const contents: ListDataSetRevisionsCommandOutput = {
|
|
2459
|
-
$metadata: deserializeMetadata(output),
|
|
2460
|
-
NextToken: undefined,
|
|
2461
|
-
Revisions: undefined,
|
|
2462
|
-
};
|
|
2463
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2464
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2465
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2466
|
-
}
|
|
2467
|
-
if (data.Revisions !== undefined && data.Revisions !== null) {
|
|
2468
|
-
contents.Revisions = deserializeAws_restJson1ListOfRevisionEntry(data.Revisions, context);
|
|
2469
|
-
}
|
|
2470
|
-
return Promise.resolve(contents);
|
|
2471
|
-
};
|
|
2472
|
-
|
|
2473
|
-
const deserializeAws_restJson1ListDataSetRevisionsCommandError = async (
|
|
2474
|
-
output: __HttpResponse,
|
|
2475
|
-
context: __SerdeContext
|
|
2476
|
-
): Promise<ListDataSetRevisionsCommandOutput> => {
|
|
2477
|
-
const parsedOutput: any = {
|
|
2478
|
-
...output,
|
|
2479
|
-
body: await parseBody(output.body, context),
|
|
2480
|
-
};
|
|
2481
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2482
|
-
let errorCode = "UnknownError";
|
|
2483
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2484
|
-
switch (errorCode) {
|
|
2485
|
-
case "InternalServerException":
|
|
2486
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
2487
|
-
response = {
|
|
2488
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2489
|
-
name: errorCode,
|
|
2490
|
-
$metadata: deserializeMetadata(output),
|
|
2491
|
-
};
|
|
2492
|
-
break;
|
|
2493
|
-
case "ResourceNotFoundException":
|
|
2494
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
2495
|
-
response = {
|
|
2496
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2497
|
-
name: errorCode,
|
|
2498
|
-
$metadata: deserializeMetadata(output),
|
|
2499
|
-
};
|
|
2500
|
-
break;
|
|
2501
|
-
case "ThrottlingException":
|
|
2502
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
2503
|
-
response = {
|
|
2504
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2505
|
-
name: errorCode,
|
|
2506
|
-
$metadata: deserializeMetadata(output),
|
|
2507
|
-
};
|
|
2508
|
-
break;
|
|
2509
|
-
case "ValidationException":
|
|
2510
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
2511
|
-
response = {
|
|
2512
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2513
|
-
name: errorCode,
|
|
2514
|
-
$metadata: deserializeMetadata(output),
|
|
2515
|
-
};
|
|
2516
|
-
break;
|
|
2517
|
-
default:
|
|
2518
|
-
const parsedBody = parsedOutput.body;
|
|
2519
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2520
|
-
response = {
|
|
2521
|
-
...parsedBody,
|
|
2522
|
-
name: `${errorCode}`,
|
|
2523
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2524
|
-
$fault: "client",
|
|
2525
|
-
$metadata: deserializeMetadata(output),
|
|
2526
|
-
} as any;
|
|
2527
|
-
}
|
|
2528
|
-
const message = response.message || response.Message || errorCode;
|
|
2529
|
-
response.message = message;
|
|
2530
|
-
delete response.Message;
|
|
2531
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2532
|
-
};
|
|
2533
|
-
|
|
2534
|
-
export const deserializeAws_restJson1ListDataSetsCommand = async (
|
|
2535
|
-
output: __HttpResponse,
|
|
2536
|
-
context: __SerdeContext
|
|
2537
|
-
): Promise<ListDataSetsCommandOutput> => {
|
|
2538
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2539
|
-
return deserializeAws_restJson1ListDataSetsCommandError(output, context);
|
|
2540
|
-
}
|
|
2541
|
-
const contents: ListDataSetsCommandOutput = {
|
|
2542
|
-
$metadata: deserializeMetadata(output),
|
|
2543
|
-
DataSets: undefined,
|
|
2544
|
-
NextToken: undefined,
|
|
2545
|
-
};
|
|
2546
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2547
|
-
if (data.DataSets !== undefined && data.DataSets !== null) {
|
|
2548
|
-
contents.DataSets = deserializeAws_restJson1ListOfDataSetEntry(data.DataSets, context);
|
|
2549
|
-
}
|
|
2550
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2551
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2552
|
-
}
|
|
2553
|
-
return Promise.resolve(contents);
|
|
2554
|
-
};
|
|
2555
|
-
|
|
2556
|
-
const deserializeAws_restJson1ListDataSetsCommandError = async (
|
|
2557
|
-
output: __HttpResponse,
|
|
2558
|
-
context: __SerdeContext
|
|
2559
|
-
): Promise<ListDataSetsCommandOutput> => {
|
|
2560
|
-
const parsedOutput: any = {
|
|
2561
|
-
...output,
|
|
2562
|
-
body: await parseBody(output.body, context),
|
|
2563
|
-
};
|
|
2564
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2565
|
-
let errorCode = "UnknownError";
|
|
2566
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2567
|
-
switch (errorCode) {
|
|
2568
|
-
case "InternalServerException":
|
|
2569
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
2570
|
-
response = {
|
|
2571
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2572
|
-
name: errorCode,
|
|
2573
|
-
$metadata: deserializeMetadata(output),
|
|
2574
|
-
};
|
|
2575
|
-
break;
|
|
2576
|
-
case "ResourceNotFoundException":
|
|
2577
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
2578
|
-
response = {
|
|
2579
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2580
|
-
name: errorCode,
|
|
2581
|
-
$metadata: deserializeMetadata(output),
|
|
2582
|
-
};
|
|
2583
|
-
break;
|
|
2584
|
-
case "ThrottlingException":
|
|
2585
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
2586
|
-
response = {
|
|
2587
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2588
|
-
name: errorCode,
|
|
2589
|
-
$metadata: deserializeMetadata(output),
|
|
2590
|
-
};
|
|
2591
|
-
break;
|
|
2592
|
-
case "ValidationException":
|
|
2593
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
2594
|
-
response = {
|
|
2595
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2596
|
-
name: errorCode,
|
|
2597
|
-
$metadata: deserializeMetadata(output),
|
|
2598
|
-
};
|
|
2599
|
-
break;
|
|
2600
|
-
default:
|
|
2601
|
-
const parsedBody = parsedOutput.body;
|
|
2602
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2603
|
-
response = {
|
|
2604
|
-
...parsedBody,
|
|
2605
|
-
name: `${errorCode}`,
|
|
2606
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2607
|
-
$fault: "client",
|
|
2608
|
-
$metadata: deserializeMetadata(output),
|
|
2609
|
-
} as any;
|
|
2610
|
-
}
|
|
2611
|
-
const message = response.message || response.Message || errorCode;
|
|
2612
|
-
response.message = message;
|
|
2613
|
-
delete response.Message;
|
|
2614
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2615
|
-
};
|
|
2616
|
-
|
|
2617
|
-
export const deserializeAws_restJson1ListEventActionsCommand = async (
|
|
2618
|
-
output: __HttpResponse,
|
|
2619
|
-
context: __SerdeContext
|
|
2620
|
-
): Promise<ListEventActionsCommandOutput> => {
|
|
2621
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2622
|
-
return deserializeAws_restJson1ListEventActionsCommandError(output, context);
|
|
2623
|
-
}
|
|
2624
|
-
const contents: ListEventActionsCommandOutput = {
|
|
2625
|
-
$metadata: deserializeMetadata(output),
|
|
2626
|
-
EventActions: undefined,
|
|
2627
|
-
NextToken: undefined,
|
|
2628
|
-
};
|
|
2629
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2630
|
-
if (data.EventActions !== undefined && data.EventActions !== null) {
|
|
2631
|
-
contents.EventActions = deserializeAws_restJson1ListOfEventActionEntry(data.EventActions, context);
|
|
2632
|
-
}
|
|
2633
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2634
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2635
|
-
}
|
|
2636
|
-
return Promise.resolve(contents);
|
|
2637
|
-
};
|
|
2638
|
-
|
|
2639
|
-
const deserializeAws_restJson1ListEventActionsCommandError = async (
|
|
2640
|
-
output: __HttpResponse,
|
|
2641
|
-
context: __SerdeContext
|
|
2642
|
-
): Promise<ListEventActionsCommandOutput> => {
|
|
2643
|
-
const parsedOutput: any = {
|
|
2644
|
-
...output,
|
|
2645
|
-
body: await parseBody(output.body, context),
|
|
2646
|
-
};
|
|
2647
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2648
|
-
let errorCode = "UnknownError";
|
|
2649
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2650
|
-
switch (errorCode) {
|
|
2651
|
-
case "InternalServerException":
|
|
2652
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
2653
|
-
response = {
|
|
2654
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2655
|
-
name: errorCode,
|
|
2656
|
-
$metadata: deserializeMetadata(output),
|
|
2657
|
-
};
|
|
2658
|
-
break;
|
|
2659
|
-
case "ResourceNotFoundException":
|
|
2660
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
2661
|
-
response = {
|
|
2662
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2663
|
-
name: errorCode,
|
|
2664
|
-
$metadata: deserializeMetadata(output),
|
|
2665
|
-
};
|
|
2666
|
-
break;
|
|
2667
|
-
case "ThrottlingException":
|
|
2668
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
2669
|
-
response = {
|
|
2670
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2671
|
-
name: errorCode,
|
|
2672
|
-
$metadata: deserializeMetadata(output),
|
|
2673
|
-
};
|
|
2674
|
-
break;
|
|
2675
|
-
case "ValidationException":
|
|
2676
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
2677
|
-
response = {
|
|
2678
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2679
|
-
name: errorCode,
|
|
2680
|
-
$metadata: deserializeMetadata(output),
|
|
2681
|
-
};
|
|
2682
|
-
break;
|
|
2683
|
-
default:
|
|
2684
|
-
const parsedBody = parsedOutput.body;
|
|
2685
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2686
|
-
response = {
|
|
2687
|
-
...parsedBody,
|
|
2688
|
-
name: `${errorCode}`,
|
|
2689
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2690
|
-
$fault: "client",
|
|
2691
|
-
$metadata: deserializeMetadata(output),
|
|
2692
|
-
} as any;
|
|
2693
|
-
}
|
|
2694
|
-
const message = response.message || response.Message || errorCode;
|
|
2695
|
-
response.message = message;
|
|
2696
|
-
delete response.Message;
|
|
2697
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2698
|
-
};
|
|
2699
|
-
|
|
2700
|
-
export const deserializeAws_restJson1ListJobsCommand = async (
|
|
2701
|
-
output: __HttpResponse,
|
|
2702
|
-
context: __SerdeContext
|
|
2703
|
-
): Promise<ListJobsCommandOutput> => {
|
|
2704
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2705
|
-
return deserializeAws_restJson1ListJobsCommandError(output, context);
|
|
2706
|
-
}
|
|
2707
|
-
const contents: ListJobsCommandOutput = {
|
|
2708
|
-
$metadata: deserializeMetadata(output),
|
|
2709
|
-
Jobs: undefined,
|
|
2710
|
-
NextToken: undefined,
|
|
2711
|
-
};
|
|
2712
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2713
|
-
if (data.Jobs !== undefined && data.Jobs !== null) {
|
|
2714
|
-
contents.Jobs = deserializeAws_restJson1ListOfJobEntry(data.Jobs, context);
|
|
2715
|
-
}
|
|
2716
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2717
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2718
|
-
}
|
|
2719
|
-
return Promise.resolve(contents);
|
|
2720
|
-
};
|
|
2721
|
-
|
|
2722
|
-
const deserializeAws_restJson1ListJobsCommandError = async (
|
|
2723
|
-
output: __HttpResponse,
|
|
2724
|
-
context: __SerdeContext
|
|
2725
|
-
): Promise<ListJobsCommandOutput> => {
|
|
2726
|
-
const parsedOutput: any = {
|
|
2727
|
-
...output,
|
|
2728
|
-
body: await parseBody(output.body, context),
|
|
2729
|
-
};
|
|
2730
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2731
|
-
let errorCode = "UnknownError";
|
|
2732
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2733
|
-
switch (errorCode) {
|
|
2734
|
-
case "InternalServerException":
|
|
2735
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
2736
|
-
response = {
|
|
2737
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2738
|
-
name: errorCode,
|
|
2739
|
-
$metadata: deserializeMetadata(output),
|
|
2740
|
-
};
|
|
2741
|
-
break;
|
|
2742
|
-
case "ResourceNotFoundException":
|
|
2743
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
2744
|
-
response = {
|
|
2745
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2746
|
-
name: errorCode,
|
|
2747
|
-
$metadata: deserializeMetadata(output),
|
|
2748
|
-
};
|
|
2749
|
-
break;
|
|
2750
|
-
case "ThrottlingException":
|
|
2751
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
2752
|
-
response = {
|
|
2753
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2754
|
-
name: errorCode,
|
|
2755
|
-
$metadata: deserializeMetadata(output),
|
|
2756
|
-
};
|
|
2757
|
-
break;
|
|
2758
|
-
case "ValidationException":
|
|
2759
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
2760
|
-
response = {
|
|
2761
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2762
|
-
name: errorCode,
|
|
2763
|
-
$metadata: deserializeMetadata(output),
|
|
2764
|
-
};
|
|
2765
|
-
break;
|
|
2766
|
-
default:
|
|
2767
|
-
const parsedBody = parsedOutput.body;
|
|
2768
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2769
|
-
response = {
|
|
2770
|
-
...parsedBody,
|
|
2771
|
-
name: `${errorCode}`,
|
|
2772
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2773
|
-
$fault: "client",
|
|
2774
|
-
$metadata: deserializeMetadata(output),
|
|
2775
|
-
} as any;
|
|
2776
|
-
}
|
|
2777
|
-
const message = response.message || response.Message || errorCode;
|
|
2778
|
-
response.message = message;
|
|
2779
|
-
delete response.Message;
|
|
2780
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2781
|
-
};
|
|
2782
|
-
|
|
2783
|
-
export const deserializeAws_restJson1ListRevisionAssetsCommand = async (
|
|
2784
|
-
output: __HttpResponse,
|
|
2785
|
-
context: __SerdeContext
|
|
2786
|
-
): Promise<ListRevisionAssetsCommandOutput> => {
|
|
2787
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2788
|
-
return deserializeAws_restJson1ListRevisionAssetsCommandError(output, context);
|
|
2789
|
-
}
|
|
2790
|
-
const contents: ListRevisionAssetsCommandOutput = {
|
|
2791
|
-
$metadata: deserializeMetadata(output),
|
|
2792
|
-
Assets: undefined,
|
|
2793
|
-
NextToken: undefined,
|
|
2794
|
-
};
|
|
2795
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2796
|
-
if (data.Assets !== undefined && data.Assets !== null) {
|
|
2797
|
-
contents.Assets = deserializeAws_restJson1ListOfAssetEntry(data.Assets, context);
|
|
2798
|
-
}
|
|
2799
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2800
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2801
|
-
}
|
|
2802
|
-
return Promise.resolve(contents);
|
|
2803
|
-
};
|
|
2804
|
-
|
|
2805
|
-
const deserializeAws_restJson1ListRevisionAssetsCommandError = async (
|
|
2806
|
-
output: __HttpResponse,
|
|
2807
|
-
context: __SerdeContext
|
|
2808
|
-
): Promise<ListRevisionAssetsCommandOutput> => {
|
|
2809
|
-
const parsedOutput: any = {
|
|
2810
|
-
...output,
|
|
2811
|
-
body: await parseBody(output.body, context),
|
|
2812
|
-
};
|
|
2813
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2814
|
-
let errorCode = "UnknownError";
|
|
2815
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2816
|
-
switch (errorCode) {
|
|
2817
|
-
case "InternalServerException":
|
|
2818
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
2819
|
-
response = {
|
|
2820
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2821
|
-
name: errorCode,
|
|
2822
|
-
$metadata: deserializeMetadata(output),
|
|
2823
|
-
};
|
|
2824
|
-
break;
|
|
2825
|
-
case "ResourceNotFoundException":
|
|
2826
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
2827
|
-
response = {
|
|
2828
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2829
|
-
name: errorCode,
|
|
2830
|
-
$metadata: deserializeMetadata(output),
|
|
2831
|
-
};
|
|
2832
|
-
break;
|
|
2833
|
-
case "ThrottlingException":
|
|
2834
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
2835
|
-
response = {
|
|
2836
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2837
|
-
name: errorCode,
|
|
2838
|
-
$metadata: deserializeMetadata(output),
|
|
2839
|
-
};
|
|
2840
|
-
break;
|
|
2841
|
-
case "ValidationException":
|
|
2842
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
2843
|
-
response = {
|
|
2844
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2845
|
-
name: errorCode,
|
|
2846
|
-
$metadata: deserializeMetadata(output),
|
|
2847
|
-
};
|
|
2848
|
-
break;
|
|
2849
|
-
default:
|
|
2850
|
-
const parsedBody = parsedOutput.body;
|
|
2851
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2852
|
-
response = {
|
|
2853
|
-
...parsedBody,
|
|
2854
|
-
name: `${errorCode}`,
|
|
2855
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2856
|
-
$fault: "client",
|
|
2857
|
-
$metadata: deserializeMetadata(output),
|
|
2858
|
-
} as any;
|
|
2859
|
-
}
|
|
2860
|
-
const message = response.message || response.Message || errorCode;
|
|
2861
|
-
response.message = message;
|
|
2862
|
-
delete response.Message;
|
|
2863
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2864
|
-
};
|
|
2865
|
-
|
|
2866
|
-
export const deserializeAws_restJson1ListTagsForResourceCommand = async (
|
|
2867
|
-
output: __HttpResponse,
|
|
2868
|
-
context: __SerdeContext
|
|
2869
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2870
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2871
|
-
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
2872
|
-
}
|
|
2873
|
-
const contents: ListTagsForResourceCommandOutput = {
|
|
2874
|
-
$metadata: deserializeMetadata(output),
|
|
2875
|
-
Tags: undefined,
|
|
2876
|
-
};
|
|
2877
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2878
|
-
if (data.tags !== undefined && data.tags !== null) {
|
|
2879
|
-
contents.Tags = deserializeAws_restJson1MapOf__string(data.tags, context);
|
|
2880
|
-
}
|
|
2881
|
-
return Promise.resolve(contents);
|
|
2882
|
-
};
|
|
2883
|
-
|
|
2884
|
-
const deserializeAws_restJson1ListTagsForResourceCommandError = async (
|
|
2885
|
-
output: __HttpResponse,
|
|
2886
|
-
context: __SerdeContext
|
|
2887
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2888
|
-
const parsedOutput: any = {
|
|
2889
|
-
...output,
|
|
2890
|
-
body: await parseBody(output.body, context),
|
|
2891
|
-
};
|
|
2892
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2893
|
-
let errorCode = "UnknownError";
|
|
2894
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2895
|
-
switch (errorCode) {
|
|
2896
|
-
default:
|
|
2897
|
-
const parsedBody = parsedOutput.body;
|
|
2898
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2899
|
-
response = {
|
|
2900
|
-
...parsedBody,
|
|
2901
|
-
name: `${errorCode}`,
|
|
2902
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2903
|
-
$fault: "client",
|
|
2904
|
-
$metadata: deserializeMetadata(output),
|
|
2905
|
-
} as any;
|
|
2906
|
-
}
|
|
2907
|
-
const message = response.message || response.Message || errorCode;
|
|
2908
|
-
response.message = message;
|
|
2909
|
-
delete response.Message;
|
|
2910
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2911
|
-
};
|
|
2912
|
-
|
|
2913
|
-
export const deserializeAws_restJson1StartJobCommand = async (
|
|
2914
|
-
output: __HttpResponse,
|
|
2915
|
-
context: __SerdeContext
|
|
2916
|
-
): Promise<StartJobCommandOutput> => {
|
|
2917
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
2918
|
-
return deserializeAws_restJson1StartJobCommandError(output, context);
|
|
2919
|
-
}
|
|
2920
|
-
const contents: StartJobCommandOutput = {
|
|
2921
|
-
$metadata: deserializeMetadata(output),
|
|
2922
|
-
};
|
|
2923
|
-
await collectBody(output.body, context);
|
|
2924
|
-
return Promise.resolve(contents);
|
|
2925
|
-
};
|
|
2926
|
-
|
|
2927
|
-
const deserializeAws_restJson1StartJobCommandError = async (
|
|
2928
|
-
output: __HttpResponse,
|
|
2929
|
-
context: __SerdeContext
|
|
2930
|
-
): Promise<StartJobCommandOutput> => {
|
|
2931
|
-
const parsedOutput: any = {
|
|
2932
|
-
...output,
|
|
2933
|
-
body: await parseBody(output.body, context),
|
|
2934
|
-
};
|
|
2935
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2936
|
-
let errorCode = "UnknownError";
|
|
2937
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2938
|
-
switch (errorCode) {
|
|
2939
|
-
case "AccessDeniedException":
|
|
2940
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
2941
|
-
response = {
|
|
2942
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2943
|
-
name: errorCode,
|
|
2944
|
-
$metadata: deserializeMetadata(output),
|
|
2945
|
-
};
|
|
2946
|
-
break;
|
|
2947
|
-
case "ConflictException":
|
|
2948
|
-
case "com.amazonaws.dataexchange#ConflictException":
|
|
2949
|
-
response = {
|
|
2950
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
2951
|
-
name: errorCode,
|
|
2952
|
-
$metadata: deserializeMetadata(output),
|
|
2953
|
-
};
|
|
2954
|
-
break;
|
|
2955
|
-
case "InternalServerException":
|
|
2956
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
2957
|
-
response = {
|
|
2958
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2959
|
-
name: errorCode,
|
|
2960
|
-
$metadata: deserializeMetadata(output),
|
|
2961
|
-
};
|
|
2962
|
-
break;
|
|
2963
|
-
case "ResourceNotFoundException":
|
|
2964
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
2965
|
-
response = {
|
|
2966
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2967
|
-
name: errorCode,
|
|
2968
|
-
$metadata: deserializeMetadata(output),
|
|
2969
|
-
};
|
|
2970
|
-
break;
|
|
2971
|
-
case "ThrottlingException":
|
|
2972
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
2973
|
-
response = {
|
|
2974
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2975
|
-
name: errorCode,
|
|
2976
|
-
$metadata: deserializeMetadata(output),
|
|
2977
|
-
};
|
|
2978
|
-
break;
|
|
2979
|
-
case "ValidationException":
|
|
2980
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
2981
|
-
response = {
|
|
2982
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2983
|
-
name: errorCode,
|
|
2984
|
-
$metadata: deserializeMetadata(output),
|
|
2985
|
-
};
|
|
2986
|
-
break;
|
|
2987
|
-
default:
|
|
2988
|
-
const parsedBody = parsedOutput.body;
|
|
2989
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2990
|
-
response = {
|
|
2991
|
-
...parsedBody,
|
|
2992
|
-
name: `${errorCode}`,
|
|
2993
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2994
|
-
$fault: "client",
|
|
2995
|
-
$metadata: deserializeMetadata(output),
|
|
2996
|
-
} as any;
|
|
2997
|
-
}
|
|
2998
|
-
const message = response.message || response.Message || errorCode;
|
|
2999
|
-
response.message = message;
|
|
3000
|
-
delete response.Message;
|
|
3001
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3002
|
-
};
|
|
3003
|
-
|
|
3004
|
-
export const deserializeAws_restJson1TagResourceCommand = async (
|
|
3005
|
-
output: __HttpResponse,
|
|
3006
|
-
context: __SerdeContext
|
|
3007
|
-
): Promise<TagResourceCommandOutput> => {
|
|
3008
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3009
|
-
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
3010
|
-
}
|
|
3011
|
-
const contents: TagResourceCommandOutput = {
|
|
3012
|
-
$metadata: deserializeMetadata(output),
|
|
3013
|
-
};
|
|
3014
|
-
await collectBody(output.body, context);
|
|
3015
|
-
return Promise.resolve(contents);
|
|
3016
|
-
};
|
|
3017
|
-
|
|
3018
|
-
const deserializeAws_restJson1TagResourceCommandError = async (
|
|
3019
|
-
output: __HttpResponse,
|
|
3020
|
-
context: __SerdeContext
|
|
3021
|
-
): Promise<TagResourceCommandOutput> => {
|
|
3022
|
-
const parsedOutput: any = {
|
|
3023
|
-
...output,
|
|
3024
|
-
body: await parseBody(output.body, context),
|
|
3025
|
-
};
|
|
3026
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3027
|
-
let errorCode = "UnknownError";
|
|
3028
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3029
|
-
switch (errorCode) {
|
|
3030
|
-
default:
|
|
3031
|
-
const parsedBody = parsedOutput.body;
|
|
3032
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3033
|
-
response = {
|
|
3034
|
-
...parsedBody,
|
|
3035
|
-
name: `${errorCode}`,
|
|
3036
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3037
|
-
$fault: "client",
|
|
3038
|
-
$metadata: deserializeMetadata(output),
|
|
3039
|
-
} as any;
|
|
3040
|
-
}
|
|
3041
|
-
const message = response.message || response.Message || errorCode;
|
|
3042
|
-
response.message = message;
|
|
3043
|
-
delete response.Message;
|
|
3044
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3045
|
-
};
|
|
3046
|
-
|
|
3047
|
-
export const deserializeAws_restJson1UntagResourceCommand = async (
|
|
3048
|
-
output: __HttpResponse,
|
|
3049
|
-
context: __SerdeContext
|
|
3050
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
3051
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3052
|
-
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
3053
|
-
}
|
|
3054
|
-
const contents: UntagResourceCommandOutput = {
|
|
3055
|
-
$metadata: deserializeMetadata(output),
|
|
3056
|
-
};
|
|
3057
|
-
await collectBody(output.body, context);
|
|
3058
|
-
return Promise.resolve(contents);
|
|
3059
|
-
};
|
|
3060
|
-
|
|
3061
|
-
const deserializeAws_restJson1UntagResourceCommandError = async (
|
|
3062
|
-
output: __HttpResponse,
|
|
3063
|
-
context: __SerdeContext
|
|
3064
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
3065
|
-
const parsedOutput: any = {
|
|
3066
|
-
...output,
|
|
3067
|
-
body: await parseBody(output.body, context),
|
|
3068
|
-
};
|
|
3069
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3070
|
-
let errorCode = "UnknownError";
|
|
3071
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3072
|
-
switch (errorCode) {
|
|
3073
|
-
default:
|
|
3074
|
-
const parsedBody = parsedOutput.body;
|
|
3075
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3076
|
-
response = {
|
|
3077
|
-
...parsedBody,
|
|
3078
|
-
name: `${errorCode}`,
|
|
3079
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3080
|
-
$fault: "client",
|
|
3081
|
-
$metadata: deserializeMetadata(output),
|
|
3082
|
-
} as any;
|
|
3083
|
-
}
|
|
3084
|
-
const message = response.message || response.Message || errorCode;
|
|
3085
|
-
response.message = message;
|
|
3086
|
-
delete response.Message;
|
|
3087
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3088
|
-
};
|
|
3089
|
-
|
|
3090
|
-
export const deserializeAws_restJson1UpdateAssetCommand = async (
|
|
3091
|
-
output: __HttpResponse,
|
|
3092
|
-
context: __SerdeContext
|
|
3093
|
-
): Promise<UpdateAssetCommandOutput> => {
|
|
3094
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3095
|
-
return deserializeAws_restJson1UpdateAssetCommandError(output, context);
|
|
3096
|
-
}
|
|
3097
|
-
const contents: UpdateAssetCommandOutput = {
|
|
3098
|
-
$metadata: deserializeMetadata(output),
|
|
3099
|
-
Arn: undefined,
|
|
3100
|
-
AssetDetails: undefined,
|
|
3101
|
-
AssetType: undefined,
|
|
3102
|
-
CreatedAt: undefined,
|
|
3103
|
-
DataSetId: undefined,
|
|
3104
|
-
Id: undefined,
|
|
3105
|
-
Name: undefined,
|
|
3106
|
-
RevisionId: undefined,
|
|
3107
|
-
SourceId: undefined,
|
|
3108
|
-
UpdatedAt: undefined,
|
|
3109
|
-
};
|
|
3110
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3111
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
3112
|
-
contents.Arn = __expectString(data.Arn);
|
|
3113
|
-
}
|
|
3114
|
-
if (data.AssetDetails !== undefined && data.AssetDetails !== null) {
|
|
3115
|
-
contents.AssetDetails = deserializeAws_restJson1AssetDetails(data.AssetDetails, context);
|
|
3116
|
-
}
|
|
3117
|
-
if (data.AssetType !== undefined && data.AssetType !== null) {
|
|
3118
|
-
contents.AssetType = __expectString(data.AssetType);
|
|
3119
|
-
}
|
|
3120
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
3121
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
3122
|
-
}
|
|
3123
|
-
if (data.DataSetId !== undefined && data.DataSetId !== null) {
|
|
3124
|
-
contents.DataSetId = __expectString(data.DataSetId);
|
|
3125
|
-
}
|
|
3126
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
3127
|
-
contents.Id = __expectString(data.Id);
|
|
3128
|
-
}
|
|
3129
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
3130
|
-
contents.Name = __expectString(data.Name);
|
|
3131
|
-
}
|
|
3132
|
-
if (data.RevisionId !== undefined && data.RevisionId !== null) {
|
|
3133
|
-
contents.RevisionId = __expectString(data.RevisionId);
|
|
3134
|
-
}
|
|
3135
|
-
if (data.SourceId !== undefined && data.SourceId !== null) {
|
|
3136
|
-
contents.SourceId = __expectString(data.SourceId);
|
|
3137
|
-
}
|
|
3138
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
3139
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
3140
|
-
}
|
|
3141
|
-
return Promise.resolve(contents);
|
|
3142
|
-
};
|
|
3143
|
-
|
|
3144
|
-
const deserializeAws_restJson1UpdateAssetCommandError = async (
|
|
3145
|
-
output: __HttpResponse,
|
|
3146
|
-
context: __SerdeContext
|
|
3147
|
-
): Promise<UpdateAssetCommandOutput> => {
|
|
3148
|
-
const parsedOutput: any = {
|
|
3149
|
-
...output,
|
|
3150
|
-
body: await parseBody(output.body, context),
|
|
3151
|
-
};
|
|
3152
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3153
|
-
let errorCode = "UnknownError";
|
|
3154
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3155
|
-
switch (errorCode) {
|
|
3156
|
-
case "AccessDeniedException":
|
|
3157
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
3158
|
-
response = {
|
|
3159
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3160
|
-
name: errorCode,
|
|
3161
|
-
$metadata: deserializeMetadata(output),
|
|
3162
|
-
};
|
|
3163
|
-
break;
|
|
3164
|
-
case "ConflictException":
|
|
3165
|
-
case "com.amazonaws.dataexchange#ConflictException":
|
|
3166
|
-
response = {
|
|
3167
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
3168
|
-
name: errorCode,
|
|
3169
|
-
$metadata: deserializeMetadata(output),
|
|
3170
|
-
};
|
|
3171
|
-
break;
|
|
3172
|
-
case "InternalServerException":
|
|
3173
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
3174
|
-
response = {
|
|
3175
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3176
|
-
name: errorCode,
|
|
3177
|
-
$metadata: deserializeMetadata(output),
|
|
3178
|
-
};
|
|
3179
|
-
break;
|
|
3180
|
-
case "ResourceNotFoundException":
|
|
3181
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
3182
|
-
response = {
|
|
3183
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3184
|
-
name: errorCode,
|
|
3185
|
-
$metadata: deserializeMetadata(output),
|
|
3186
|
-
};
|
|
3187
|
-
break;
|
|
3188
|
-
case "ThrottlingException":
|
|
3189
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
3190
|
-
response = {
|
|
3191
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3192
|
-
name: errorCode,
|
|
3193
|
-
$metadata: deserializeMetadata(output),
|
|
3194
|
-
};
|
|
3195
|
-
break;
|
|
3196
|
-
case "ValidationException":
|
|
3197
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
3198
|
-
response = {
|
|
3199
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
3200
|
-
name: errorCode,
|
|
3201
|
-
$metadata: deserializeMetadata(output),
|
|
3202
|
-
};
|
|
3203
|
-
break;
|
|
3204
|
-
default:
|
|
3205
|
-
const parsedBody = parsedOutput.body;
|
|
3206
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3207
|
-
response = {
|
|
3208
|
-
...parsedBody,
|
|
3209
|
-
name: `${errorCode}`,
|
|
3210
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3211
|
-
$fault: "client",
|
|
3212
|
-
$metadata: deserializeMetadata(output),
|
|
3213
|
-
} as any;
|
|
3214
|
-
}
|
|
3215
|
-
const message = response.message || response.Message || errorCode;
|
|
3216
|
-
response.message = message;
|
|
3217
|
-
delete response.Message;
|
|
3218
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3219
|
-
};
|
|
3220
|
-
|
|
3221
|
-
export const deserializeAws_restJson1UpdateDataSetCommand = async (
|
|
3222
|
-
output: __HttpResponse,
|
|
3223
|
-
context: __SerdeContext
|
|
3224
|
-
): Promise<UpdateDataSetCommandOutput> => {
|
|
3225
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3226
|
-
return deserializeAws_restJson1UpdateDataSetCommandError(output, context);
|
|
3227
|
-
}
|
|
3228
|
-
const contents: UpdateDataSetCommandOutput = {
|
|
3229
|
-
$metadata: deserializeMetadata(output),
|
|
3230
|
-
Arn: undefined,
|
|
3231
|
-
AssetType: undefined,
|
|
3232
|
-
CreatedAt: undefined,
|
|
3233
|
-
Description: undefined,
|
|
3234
|
-
Id: undefined,
|
|
3235
|
-
Name: undefined,
|
|
3236
|
-
Origin: undefined,
|
|
3237
|
-
OriginDetails: undefined,
|
|
3238
|
-
SourceId: undefined,
|
|
3239
|
-
UpdatedAt: undefined,
|
|
3240
|
-
};
|
|
3241
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3242
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
3243
|
-
contents.Arn = __expectString(data.Arn);
|
|
3244
|
-
}
|
|
3245
|
-
if (data.AssetType !== undefined && data.AssetType !== null) {
|
|
3246
|
-
contents.AssetType = __expectString(data.AssetType);
|
|
3247
|
-
}
|
|
3248
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
3249
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
3250
|
-
}
|
|
3251
|
-
if (data.Description !== undefined && data.Description !== null) {
|
|
3252
|
-
contents.Description = __expectString(data.Description);
|
|
3253
|
-
}
|
|
3254
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
3255
|
-
contents.Id = __expectString(data.Id);
|
|
3256
|
-
}
|
|
3257
|
-
if (data.Name !== undefined && data.Name !== null) {
|
|
3258
|
-
contents.Name = __expectString(data.Name);
|
|
3259
|
-
}
|
|
3260
|
-
if (data.Origin !== undefined && data.Origin !== null) {
|
|
3261
|
-
contents.Origin = __expectString(data.Origin);
|
|
3262
|
-
}
|
|
3263
|
-
if (data.OriginDetails !== undefined && data.OriginDetails !== null) {
|
|
3264
|
-
contents.OriginDetails = deserializeAws_restJson1OriginDetails(data.OriginDetails, context);
|
|
3265
|
-
}
|
|
3266
|
-
if (data.SourceId !== undefined && data.SourceId !== null) {
|
|
3267
|
-
contents.SourceId = __expectString(data.SourceId);
|
|
3268
|
-
}
|
|
3269
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
3270
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
3271
|
-
}
|
|
3272
|
-
return Promise.resolve(contents);
|
|
3273
|
-
};
|
|
3274
|
-
|
|
3275
|
-
const deserializeAws_restJson1UpdateDataSetCommandError = async (
|
|
3276
|
-
output: __HttpResponse,
|
|
3277
|
-
context: __SerdeContext
|
|
3278
|
-
): Promise<UpdateDataSetCommandOutput> => {
|
|
3279
|
-
const parsedOutput: any = {
|
|
3280
|
-
...output,
|
|
3281
|
-
body: await parseBody(output.body, context),
|
|
3282
|
-
};
|
|
3283
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3284
|
-
let errorCode = "UnknownError";
|
|
3285
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3286
|
-
switch (errorCode) {
|
|
3287
|
-
case "AccessDeniedException":
|
|
3288
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
3289
|
-
response = {
|
|
3290
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3291
|
-
name: errorCode,
|
|
3292
|
-
$metadata: deserializeMetadata(output),
|
|
3293
|
-
};
|
|
3294
|
-
break;
|
|
3295
|
-
case "InternalServerException":
|
|
3296
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
3297
|
-
response = {
|
|
3298
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3299
|
-
name: errorCode,
|
|
3300
|
-
$metadata: deserializeMetadata(output),
|
|
3301
|
-
};
|
|
3302
|
-
break;
|
|
3303
|
-
case "ResourceNotFoundException":
|
|
3304
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
3305
|
-
response = {
|
|
3306
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3307
|
-
name: errorCode,
|
|
3308
|
-
$metadata: deserializeMetadata(output),
|
|
3309
|
-
};
|
|
3310
|
-
break;
|
|
3311
|
-
case "ThrottlingException":
|
|
3312
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
3313
|
-
response = {
|
|
3314
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3315
|
-
name: errorCode,
|
|
3316
|
-
$metadata: deserializeMetadata(output),
|
|
3317
|
-
};
|
|
3318
|
-
break;
|
|
3319
|
-
case "ValidationException":
|
|
3320
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
3321
|
-
response = {
|
|
3322
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
3323
|
-
name: errorCode,
|
|
3324
|
-
$metadata: deserializeMetadata(output),
|
|
3325
|
-
};
|
|
3326
|
-
break;
|
|
3327
|
-
default:
|
|
3328
|
-
const parsedBody = parsedOutput.body;
|
|
3329
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3330
|
-
response = {
|
|
3331
|
-
...parsedBody,
|
|
3332
|
-
name: `${errorCode}`,
|
|
3333
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3334
|
-
$fault: "client",
|
|
3335
|
-
$metadata: deserializeMetadata(output),
|
|
3336
|
-
} as any;
|
|
3337
|
-
}
|
|
3338
|
-
const message = response.message || response.Message || errorCode;
|
|
3339
|
-
response.message = message;
|
|
3340
|
-
delete response.Message;
|
|
3341
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3342
|
-
};
|
|
3343
|
-
|
|
3344
|
-
export const deserializeAws_restJson1UpdateEventActionCommand = async (
|
|
3345
|
-
output: __HttpResponse,
|
|
3346
|
-
context: __SerdeContext
|
|
3347
|
-
): Promise<UpdateEventActionCommandOutput> => {
|
|
3348
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3349
|
-
return deserializeAws_restJson1UpdateEventActionCommandError(output, context);
|
|
3350
|
-
}
|
|
3351
|
-
const contents: UpdateEventActionCommandOutput = {
|
|
3352
|
-
$metadata: deserializeMetadata(output),
|
|
3353
|
-
Action: undefined,
|
|
3354
|
-
Arn: undefined,
|
|
3355
|
-
CreatedAt: undefined,
|
|
3356
|
-
Event: undefined,
|
|
3357
|
-
Id: undefined,
|
|
3358
|
-
UpdatedAt: undefined,
|
|
3359
|
-
};
|
|
3360
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3361
|
-
if (data.Action !== undefined && data.Action !== null) {
|
|
3362
|
-
contents.Action = deserializeAws_restJson1Action(data.Action, context);
|
|
3363
|
-
}
|
|
3364
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
3365
|
-
contents.Arn = __expectString(data.Arn);
|
|
3366
|
-
}
|
|
3367
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
3368
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
3369
|
-
}
|
|
3370
|
-
if (data.Event !== undefined && data.Event !== null) {
|
|
3371
|
-
contents.Event = deserializeAws_restJson1Event(data.Event, context);
|
|
3372
|
-
}
|
|
3373
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
3374
|
-
contents.Id = __expectString(data.Id);
|
|
3375
|
-
}
|
|
3376
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
3377
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
3378
|
-
}
|
|
3379
|
-
return Promise.resolve(contents);
|
|
3380
|
-
};
|
|
3381
|
-
|
|
3382
|
-
const deserializeAws_restJson1UpdateEventActionCommandError = async (
|
|
3383
|
-
output: __HttpResponse,
|
|
3384
|
-
context: __SerdeContext
|
|
3385
|
-
): Promise<UpdateEventActionCommandOutput> => {
|
|
3386
|
-
const parsedOutput: any = {
|
|
3387
|
-
...output,
|
|
3388
|
-
body: await parseBody(output.body, context),
|
|
3389
|
-
};
|
|
3390
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3391
|
-
let errorCode = "UnknownError";
|
|
3392
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3393
|
-
switch (errorCode) {
|
|
3394
|
-
case "AccessDeniedException":
|
|
3395
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
3396
|
-
response = {
|
|
3397
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3398
|
-
name: errorCode,
|
|
3399
|
-
$metadata: deserializeMetadata(output),
|
|
3400
|
-
};
|
|
3401
|
-
break;
|
|
3402
|
-
case "InternalServerException":
|
|
3403
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
3404
|
-
response = {
|
|
3405
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3406
|
-
name: errorCode,
|
|
3407
|
-
$metadata: deserializeMetadata(output),
|
|
3408
|
-
};
|
|
3409
|
-
break;
|
|
3410
|
-
case "ResourceNotFoundException":
|
|
3411
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
3412
|
-
response = {
|
|
3413
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3414
|
-
name: errorCode,
|
|
3415
|
-
$metadata: deserializeMetadata(output),
|
|
3416
|
-
};
|
|
3417
|
-
break;
|
|
3418
|
-
case "ThrottlingException":
|
|
3419
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
3420
|
-
response = {
|
|
3421
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3422
|
-
name: errorCode,
|
|
3423
|
-
$metadata: deserializeMetadata(output),
|
|
3424
|
-
};
|
|
3425
|
-
break;
|
|
3426
|
-
case "ValidationException":
|
|
3427
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
3428
|
-
response = {
|
|
3429
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
3430
|
-
name: errorCode,
|
|
3431
|
-
$metadata: deserializeMetadata(output),
|
|
3432
|
-
};
|
|
3433
|
-
break;
|
|
3434
|
-
default:
|
|
3435
|
-
const parsedBody = parsedOutput.body;
|
|
3436
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3437
|
-
response = {
|
|
3438
|
-
...parsedBody,
|
|
3439
|
-
name: `${errorCode}`,
|
|
3440
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3441
|
-
$fault: "client",
|
|
3442
|
-
$metadata: deserializeMetadata(output),
|
|
3443
|
-
} as any;
|
|
3444
|
-
}
|
|
3445
|
-
const message = response.message || response.Message || errorCode;
|
|
3446
|
-
response.message = message;
|
|
3447
|
-
delete response.Message;
|
|
3448
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3449
|
-
};
|
|
3450
|
-
|
|
3451
|
-
export const deserializeAws_restJson1UpdateRevisionCommand = async (
|
|
3452
|
-
output: __HttpResponse,
|
|
3453
|
-
context: __SerdeContext
|
|
3454
|
-
): Promise<UpdateRevisionCommandOutput> => {
|
|
3455
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3456
|
-
return deserializeAws_restJson1UpdateRevisionCommandError(output, context);
|
|
3457
|
-
}
|
|
3458
|
-
const contents: UpdateRevisionCommandOutput = {
|
|
3459
|
-
$metadata: deserializeMetadata(output),
|
|
3460
|
-
Arn: undefined,
|
|
3461
|
-
Comment: undefined,
|
|
3462
|
-
CreatedAt: undefined,
|
|
3463
|
-
DataSetId: undefined,
|
|
3464
|
-
Finalized: undefined,
|
|
3465
|
-
Id: undefined,
|
|
3466
|
-
SourceId: undefined,
|
|
3467
|
-
UpdatedAt: undefined,
|
|
3468
|
-
};
|
|
3469
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3470
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
3471
|
-
contents.Arn = __expectString(data.Arn);
|
|
3472
|
-
}
|
|
3473
|
-
if (data.Comment !== undefined && data.Comment !== null) {
|
|
3474
|
-
contents.Comment = __expectString(data.Comment);
|
|
3475
|
-
}
|
|
3476
|
-
if (data.CreatedAt !== undefined && data.CreatedAt !== null) {
|
|
3477
|
-
contents.CreatedAt = __expectNonNull(__parseRfc3339DateTime(data.CreatedAt));
|
|
3478
|
-
}
|
|
3479
|
-
if (data.DataSetId !== undefined && data.DataSetId !== null) {
|
|
3480
|
-
contents.DataSetId = __expectString(data.DataSetId);
|
|
3481
|
-
}
|
|
3482
|
-
if (data.Finalized !== undefined && data.Finalized !== null) {
|
|
3483
|
-
contents.Finalized = __expectBoolean(data.Finalized);
|
|
3484
|
-
}
|
|
3485
|
-
if (data.Id !== undefined && data.Id !== null) {
|
|
3486
|
-
contents.Id = __expectString(data.Id);
|
|
3487
|
-
}
|
|
3488
|
-
if (data.SourceId !== undefined && data.SourceId !== null) {
|
|
3489
|
-
contents.SourceId = __expectString(data.SourceId);
|
|
3490
|
-
}
|
|
3491
|
-
if (data.UpdatedAt !== undefined && data.UpdatedAt !== null) {
|
|
3492
|
-
contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTime(data.UpdatedAt));
|
|
3493
|
-
}
|
|
3494
|
-
return Promise.resolve(contents);
|
|
3495
|
-
};
|
|
3496
|
-
|
|
3497
|
-
const deserializeAws_restJson1UpdateRevisionCommandError = async (
|
|
3498
|
-
output: __HttpResponse,
|
|
3499
|
-
context: __SerdeContext
|
|
3500
|
-
): Promise<UpdateRevisionCommandOutput> => {
|
|
3501
|
-
const parsedOutput: any = {
|
|
3502
|
-
...output,
|
|
3503
|
-
body: await parseBody(output.body, context),
|
|
3504
|
-
};
|
|
3505
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
3506
|
-
let errorCode = "UnknownError";
|
|
3507
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3508
|
-
switch (errorCode) {
|
|
3509
|
-
case "AccessDeniedException":
|
|
3510
|
-
case "com.amazonaws.dataexchange#AccessDeniedException":
|
|
3511
|
-
response = {
|
|
3512
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3513
|
-
name: errorCode,
|
|
3514
|
-
$metadata: deserializeMetadata(output),
|
|
3515
|
-
};
|
|
3516
|
-
break;
|
|
3517
|
-
case "ConflictException":
|
|
3518
|
-
case "com.amazonaws.dataexchange#ConflictException":
|
|
3519
|
-
response = {
|
|
3520
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
3521
|
-
name: errorCode,
|
|
3522
|
-
$metadata: deserializeMetadata(output),
|
|
3523
|
-
};
|
|
3524
|
-
break;
|
|
3525
|
-
case "InternalServerException":
|
|
3526
|
-
case "com.amazonaws.dataexchange#InternalServerException":
|
|
3527
|
-
response = {
|
|
3528
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3529
|
-
name: errorCode,
|
|
3530
|
-
$metadata: deserializeMetadata(output),
|
|
3531
|
-
};
|
|
3532
|
-
break;
|
|
3533
|
-
case "ResourceNotFoundException":
|
|
3534
|
-
case "com.amazonaws.dataexchange#ResourceNotFoundException":
|
|
3535
|
-
response = {
|
|
3536
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3537
|
-
name: errorCode,
|
|
3538
|
-
$metadata: deserializeMetadata(output),
|
|
3539
|
-
};
|
|
3540
|
-
break;
|
|
3541
|
-
case "ThrottlingException":
|
|
3542
|
-
case "com.amazonaws.dataexchange#ThrottlingException":
|
|
3543
|
-
response = {
|
|
3544
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3545
|
-
name: errorCode,
|
|
3546
|
-
$metadata: deserializeMetadata(output),
|
|
3547
|
-
};
|
|
3548
|
-
break;
|
|
3549
|
-
case "ValidationException":
|
|
3550
|
-
case "com.amazonaws.dataexchange#ValidationException":
|
|
3551
|
-
response = {
|
|
3552
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
3553
|
-
name: errorCode,
|
|
3554
|
-
$metadata: deserializeMetadata(output),
|
|
3555
|
-
};
|
|
3556
|
-
break;
|
|
3557
|
-
default:
|
|
3558
|
-
const parsedBody = parsedOutput.body;
|
|
3559
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3560
|
-
response = {
|
|
3561
|
-
...parsedBody,
|
|
3562
|
-
name: `${errorCode}`,
|
|
3563
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3564
|
-
$fault: "client",
|
|
3565
|
-
$metadata: deserializeMetadata(output),
|
|
3566
|
-
} as any;
|
|
3567
|
-
}
|
|
3568
|
-
const message = response.message || response.Message || errorCode;
|
|
3569
|
-
response.message = message;
|
|
3570
|
-
delete response.Message;
|
|
3571
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3572
|
-
};
|
|
3573
|
-
|
|
3574
|
-
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (
|
|
3575
|
-
parsedOutput: any,
|
|
3576
|
-
context: __SerdeContext
|
|
3577
|
-
): Promise<AccessDeniedException> => {
|
|
3578
|
-
const contents: AccessDeniedException = {
|
|
3579
|
-
name: "AccessDeniedException",
|
|
3580
|
-
$fault: "client",
|
|
3581
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3582
|
-
Message: undefined,
|
|
3583
|
-
};
|
|
3584
|
-
const data: any = parsedOutput.body;
|
|
3585
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3586
|
-
contents.Message = __expectString(data.Message);
|
|
3587
|
-
}
|
|
3588
|
-
return contents;
|
|
3589
|
-
};
|
|
3590
|
-
|
|
3591
|
-
const deserializeAws_restJson1ConflictExceptionResponse = async (
|
|
3592
|
-
parsedOutput: any,
|
|
3593
|
-
context: __SerdeContext
|
|
3594
|
-
): Promise<ConflictException> => {
|
|
3595
|
-
const contents: ConflictException = {
|
|
3596
|
-
name: "ConflictException",
|
|
3597
|
-
$fault: "client",
|
|
3598
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3599
|
-
Message: undefined,
|
|
3600
|
-
ResourceId: undefined,
|
|
3601
|
-
ResourceType: undefined,
|
|
3602
|
-
};
|
|
3603
|
-
const data: any = parsedOutput.body;
|
|
3604
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3605
|
-
contents.Message = __expectString(data.Message);
|
|
3606
|
-
}
|
|
3607
|
-
if (data.ResourceId !== undefined && data.ResourceId !== null) {
|
|
3608
|
-
contents.ResourceId = __expectString(data.ResourceId);
|
|
3609
|
-
}
|
|
3610
|
-
if (data.ResourceType !== undefined && data.ResourceType !== null) {
|
|
3611
|
-
contents.ResourceType = __expectString(data.ResourceType);
|
|
3612
|
-
}
|
|
3613
|
-
return contents;
|
|
3614
|
-
};
|
|
3615
|
-
|
|
3616
|
-
const deserializeAws_restJson1InternalServerExceptionResponse = async (
|
|
3617
|
-
parsedOutput: any,
|
|
3618
|
-
context: __SerdeContext
|
|
3619
|
-
): Promise<InternalServerException> => {
|
|
3620
|
-
const contents: InternalServerException = {
|
|
3621
|
-
name: "InternalServerException",
|
|
3622
|
-
$fault: "server",
|
|
3623
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3624
|
-
Message: undefined,
|
|
3625
|
-
};
|
|
3626
|
-
const data: any = parsedOutput.body;
|
|
3627
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3628
|
-
contents.Message = __expectString(data.Message);
|
|
3629
|
-
}
|
|
3630
|
-
return contents;
|
|
3631
|
-
};
|
|
3632
|
-
|
|
3633
|
-
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (
|
|
3634
|
-
parsedOutput: any,
|
|
3635
|
-
context: __SerdeContext
|
|
3636
|
-
): Promise<ResourceNotFoundException> => {
|
|
3637
|
-
const contents: ResourceNotFoundException = {
|
|
3638
|
-
name: "ResourceNotFoundException",
|
|
3639
|
-
$fault: "client",
|
|
3640
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3641
|
-
Message: undefined,
|
|
3642
|
-
ResourceId: undefined,
|
|
3643
|
-
ResourceType: undefined,
|
|
3644
|
-
};
|
|
3645
|
-
const data: any = parsedOutput.body;
|
|
3646
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3647
|
-
contents.Message = __expectString(data.Message);
|
|
3648
|
-
}
|
|
3649
|
-
if (data.ResourceId !== undefined && data.ResourceId !== null) {
|
|
3650
|
-
contents.ResourceId = __expectString(data.ResourceId);
|
|
3651
|
-
}
|
|
3652
|
-
if (data.ResourceType !== undefined && data.ResourceType !== null) {
|
|
3653
|
-
contents.ResourceType = __expectString(data.ResourceType);
|
|
3654
|
-
}
|
|
3655
|
-
return contents;
|
|
3656
|
-
};
|
|
3657
|
-
|
|
3658
|
-
const deserializeAws_restJson1ServiceLimitExceededExceptionResponse = async (
|
|
3659
|
-
parsedOutput: any,
|
|
3660
|
-
context: __SerdeContext
|
|
3661
|
-
): Promise<ServiceLimitExceededException> => {
|
|
3662
|
-
const contents: ServiceLimitExceededException = {
|
|
3663
|
-
name: "ServiceLimitExceededException",
|
|
3664
|
-
$fault: "client",
|
|
3665
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3666
|
-
LimitName: undefined,
|
|
3667
|
-
LimitValue: undefined,
|
|
3668
|
-
Message: undefined,
|
|
3669
|
-
};
|
|
3670
|
-
const data: any = parsedOutput.body;
|
|
3671
|
-
if (data.LimitName !== undefined && data.LimitName !== null) {
|
|
3672
|
-
contents.LimitName = __expectString(data.LimitName);
|
|
3673
|
-
}
|
|
3674
|
-
if (data.LimitValue !== undefined && data.LimitValue !== null) {
|
|
3675
|
-
contents.LimitValue = __limitedParseDouble(data.LimitValue);
|
|
3676
|
-
}
|
|
3677
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3678
|
-
contents.Message = __expectString(data.Message);
|
|
3679
|
-
}
|
|
3680
|
-
return contents;
|
|
3681
|
-
};
|
|
3682
|
-
|
|
3683
|
-
const deserializeAws_restJson1ThrottlingExceptionResponse = async (
|
|
3684
|
-
parsedOutput: any,
|
|
3685
|
-
context: __SerdeContext
|
|
3686
|
-
): Promise<ThrottlingException> => {
|
|
3687
|
-
const contents: ThrottlingException = {
|
|
3688
|
-
name: "ThrottlingException",
|
|
3689
|
-
$fault: "client",
|
|
3690
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3691
|
-
Message: undefined,
|
|
3692
|
-
};
|
|
3693
|
-
const data: any = parsedOutput.body;
|
|
3694
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3695
|
-
contents.Message = __expectString(data.Message);
|
|
3696
|
-
}
|
|
3697
|
-
return contents;
|
|
3698
|
-
};
|
|
3699
|
-
|
|
3700
|
-
const deserializeAws_restJson1ValidationExceptionResponse = async (
|
|
3701
|
-
parsedOutput: any,
|
|
3702
|
-
context: __SerdeContext
|
|
3703
|
-
): Promise<ValidationException> => {
|
|
3704
|
-
const contents: ValidationException = {
|
|
3705
|
-
name: "ValidationException",
|
|
3706
|
-
$fault: "client",
|
|
3707
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3708
|
-
ExceptionCause: undefined,
|
|
3709
|
-
Message: undefined,
|
|
3710
|
-
};
|
|
3711
|
-
const data: any = parsedOutput.body;
|
|
3712
|
-
if (data.ExceptionCause !== undefined && data.ExceptionCause !== null) {
|
|
3713
|
-
contents.ExceptionCause = __expectString(data.ExceptionCause);
|
|
3714
|
-
}
|
|
3715
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3716
|
-
contents.Message = __expectString(data.Message);
|
|
3717
|
-
}
|
|
3718
|
-
return contents;
|
|
3719
|
-
};
|
|
3720
|
-
|
|
3721
|
-
const serializeAws_restJson1Action = (input: Action, context: __SerdeContext): any => {
|
|
3722
|
-
return {
|
|
3723
|
-
...(input.ExportRevisionToS3 !== undefined &&
|
|
3724
|
-
input.ExportRevisionToS3 !== null && {
|
|
3725
|
-
ExportRevisionToS3: serializeAws_restJson1AutoExportRevisionToS3RequestDetails(
|
|
3726
|
-
input.ExportRevisionToS3,
|
|
3727
|
-
context
|
|
3728
|
-
),
|
|
3729
|
-
}),
|
|
3730
|
-
};
|
|
3731
|
-
};
|
|
3732
|
-
|
|
3733
|
-
const serializeAws_restJson1AssetDestinationEntry = (input: AssetDestinationEntry, context: __SerdeContext): any => {
|
|
3734
|
-
return {
|
|
3735
|
-
...(input.AssetId !== undefined && input.AssetId !== null && { AssetId: input.AssetId }),
|
|
3736
|
-
...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
|
|
3737
|
-
...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
|
|
3738
|
-
};
|
|
3739
|
-
};
|
|
3740
|
-
|
|
3741
|
-
const serializeAws_restJson1AssetSourceEntry = (input: AssetSourceEntry, context: __SerdeContext): any => {
|
|
3742
|
-
return {
|
|
3743
|
-
...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
|
|
3744
|
-
...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
|
|
3745
|
-
};
|
|
3746
|
-
};
|
|
3747
|
-
|
|
3748
|
-
const serializeAws_restJson1AutoExportRevisionDestinationEntry = (
|
|
3749
|
-
input: AutoExportRevisionDestinationEntry,
|
|
3750
|
-
context: __SerdeContext
|
|
3751
|
-
): any => {
|
|
3752
|
-
return {
|
|
3753
|
-
...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
|
|
3754
|
-
...(input.KeyPattern !== undefined && input.KeyPattern !== null && { KeyPattern: input.KeyPattern }),
|
|
3755
|
-
};
|
|
3756
|
-
};
|
|
3757
|
-
|
|
3758
|
-
const serializeAws_restJson1AutoExportRevisionToS3RequestDetails = (
|
|
3759
|
-
input: AutoExportRevisionToS3RequestDetails,
|
|
3760
|
-
context: __SerdeContext
|
|
3761
|
-
): any => {
|
|
3762
|
-
return {
|
|
3763
|
-
...(input.Encryption !== undefined &&
|
|
3764
|
-
input.Encryption !== null && {
|
|
3765
|
-
Encryption: serializeAws_restJson1ExportServerSideEncryption(input.Encryption, context),
|
|
3766
|
-
}),
|
|
3767
|
-
...(input.RevisionDestination !== undefined &&
|
|
3768
|
-
input.RevisionDestination !== null && {
|
|
3769
|
-
RevisionDestination: serializeAws_restJson1AutoExportRevisionDestinationEntry(
|
|
3770
|
-
input.RevisionDestination,
|
|
3771
|
-
context
|
|
3772
|
-
),
|
|
3773
|
-
}),
|
|
3774
|
-
};
|
|
3775
|
-
};
|
|
3776
|
-
|
|
3777
|
-
const serializeAws_restJson1Event = (input: Event, context: __SerdeContext): any => {
|
|
3778
|
-
return {
|
|
3779
|
-
...(input.RevisionPublished !== undefined &&
|
|
3780
|
-
input.RevisionPublished !== null && {
|
|
3781
|
-
RevisionPublished: serializeAws_restJson1RevisionPublished(input.RevisionPublished, context),
|
|
3782
|
-
}),
|
|
3783
|
-
};
|
|
3784
|
-
};
|
|
3785
|
-
|
|
3786
|
-
const serializeAws_restJson1ExportAssetsToS3RequestDetails = (
|
|
3787
|
-
input: ExportAssetsToS3RequestDetails,
|
|
3788
|
-
context: __SerdeContext
|
|
3789
|
-
): any => {
|
|
3790
|
-
return {
|
|
3791
|
-
...(input.AssetDestinations !== undefined &&
|
|
3792
|
-
input.AssetDestinations !== null && {
|
|
3793
|
-
AssetDestinations: serializeAws_restJson1ListOfAssetDestinationEntry(input.AssetDestinations, context),
|
|
3794
|
-
}),
|
|
3795
|
-
...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
|
|
3796
|
-
...(input.Encryption !== undefined &&
|
|
3797
|
-
input.Encryption !== null && {
|
|
3798
|
-
Encryption: serializeAws_restJson1ExportServerSideEncryption(input.Encryption, context),
|
|
3799
|
-
}),
|
|
3800
|
-
...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
|
|
3801
|
-
};
|
|
3802
|
-
};
|
|
3803
|
-
|
|
3804
|
-
const serializeAws_restJson1ExportAssetToSignedUrlRequestDetails = (
|
|
3805
|
-
input: ExportAssetToSignedUrlRequestDetails,
|
|
3806
|
-
context: __SerdeContext
|
|
3807
|
-
): any => {
|
|
3808
|
-
return {
|
|
3809
|
-
...(input.AssetId !== undefined && input.AssetId !== null && { AssetId: input.AssetId }),
|
|
3810
|
-
...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
|
|
3811
|
-
...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
|
|
3812
|
-
};
|
|
3813
|
-
};
|
|
3814
|
-
|
|
3815
|
-
const serializeAws_restJson1ExportRevisionsToS3RequestDetails = (
|
|
3816
|
-
input: ExportRevisionsToS3RequestDetails,
|
|
3817
|
-
context: __SerdeContext
|
|
3818
|
-
): any => {
|
|
3819
|
-
return {
|
|
3820
|
-
...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
|
|
3821
|
-
...(input.Encryption !== undefined &&
|
|
3822
|
-
input.Encryption !== null && {
|
|
3823
|
-
Encryption: serializeAws_restJson1ExportServerSideEncryption(input.Encryption, context),
|
|
3824
|
-
}),
|
|
3825
|
-
...(input.RevisionDestinations !== undefined &&
|
|
3826
|
-
input.RevisionDestinations !== null && {
|
|
3827
|
-
RevisionDestinations: serializeAws_restJson1ListOfRevisionDestinationEntry(input.RevisionDestinations, context),
|
|
3828
|
-
}),
|
|
3829
|
-
};
|
|
3830
|
-
};
|
|
3831
|
-
|
|
3832
|
-
const serializeAws_restJson1ExportServerSideEncryption = (
|
|
3833
|
-
input: ExportServerSideEncryption,
|
|
3834
|
-
context: __SerdeContext
|
|
3835
|
-
): any => {
|
|
3836
|
-
return {
|
|
3837
|
-
...(input.KmsKeyArn !== undefined && input.KmsKeyArn !== null && { KmsKeyArn: input.KmsKeyArn }),
|
|
3838
|
-
...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
|
|
3839
|
-
};
|
|
3840
|
-
};
|
|
3841
|
-
|
|
3842
|
-
const serializeAws_restJson1ImportAssetFromSignedUrlRequestDetails = (
|
|
3843
|
-
input: ImportAssetFromSignedUrlRequestDetails,
|
|
3844
|
-
context: __SerdeContext
|
|
3845
|
-
): any => {
|
|
3846
|
-
return {
|
|
3847
|
-
...(input.AssetName !== undefined && input.AssetName !== null && { AssetName: input.AssetName }),
|
|
3848
|
-
...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
|
|
3849
|
-
...(input.Md5Hash !== undefined && input.Md5Hash !== null && { Md5Hash: input.Md5Hash }),
|
|
3850
|
-
...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
|
|
3851
|
-
};
|
|
3852
|
-
};
|
|
3853
|
-
|
|
3854
|
-
const serializeAws_restJson1ImportAssetsFromS3RequestDetails = (
|
|
3855
|
-
input: ImportAssetsFromS3RequestDetails,
|
|
3856
|
-
context: __SerdeContext
|
|
3857
|
-
): any => {
|
|
3858
|
-
return {
|
|
3859
|
-
...(input.AssetSources !== undefined &&
|
|
3860
|
-
input.AssetSources !== null && {
|
|
3861
|
-
AssetSources: serializeAws_restJson1ListOfAssetSourceEntry(input.AssetSources, context),
|
|
3862
|
-
}),
|
|
3863
|
-
...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
|
|
3864
|
-
...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
|
|
3865
|
-
};
|
|
3866
|
-
};
|
|
3867
|
-
|
|
3868
|
-
const serializeAws_restJson1ListOfAssetDestinationEntry = (
|
|
3869
|
-
input: AssetDestinationEntry[],
|
|
3870
|
-
context: __SerdeContext
|
|
3871
|
-
): any => {
|
|
3872
|
-
return input
|
|
3873
|
-
.filter((e: any) => e != null)
|
|
3874
|
-
.map((entry) => {
|
|
3875
|
-
if (entry === null) {
|
|
3876
|
-
return null as any;
|
|
3877
|
-
}
|
|
3878
|
-
return serializeAws_restJson1AssetDestinationEntry(entry, context);
|
|
3879
|
-
});
|
|
3880
|
-
};
|
|
3881
|
-
|
|
3882
|
-
const serializeAws_restJson1ListOfAssetSourceEntry = (input: AssetSourceEntry[], context: __SerdeContext): any => {
|
|
3883
|
-
return input
|
|
3884
|
-
.filter((e: any) => e != null)
|
|
3885
|
-
.map((entry) => {
|
|
3886
|
-
if (entry === null) {
|
|
3887
|
-
return null as any;
|
|
3888
|
-
}
|
|
3889
|
-
return serializeAws_restJson1AssetSourceEntry(entry, context);
|
|
3890
|
-
});
|
|
3891
|
-
};
|
|
3892
|
-
|
|
3893
|
-
const serializeAws_restJson1ListOfRevisionDestinationEntry = (
|
|
3894
|
-
input: RevisionDestinationEntry[],
|
|
3895
|
-
context: __SerdeContext
|
|
3896
|
-
): any => {
|
|
3897
|
-
return input
|
|
3898
|
-
.filter((e: any) => e != null)
|
|
3899
|
-
.map((entry) => {
|
|
3900
|
-
if (entry === null) {
|
|
3901
|
-
return null as any;
|
|
3902
|
-
}
|
|
3903
|
-
return serializeAws_restJson1RevisionDestinationEntry(entry, context);
|
|
3904
|
-
});
|
|
3905
|
-
};
|
|
3906
|
-
|
|
3907
|
-
const serializeAws_restJson1MapOf__string = (input: { [key: string]: string }, context: __SerdeContext): any => {
|
|
3908
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
3909
|
-
if (value === null) {
|
|
3910
|
-
return acc;
|
|
3911
|
-
}
|
|
3912
|
-
return {
|
|
3913
|
-
...acc,
|
|
3914
|
-
[key]: value,
|
|
3915
|
-
};
|
|
3916
|
-
}, {});
|
|
3917
|
-
};
|
|
3918
|
-
|
|
3919
|
-
const serializeAws_restJson1RequestDetails = (input: RequestDetails, context: __SerdeContext): any => {
|
|
3920
|
-
return {
|
|
3921
|
-
...(input.ExportAssetToSignedUrl !== undefined &&
|
|
3922
|
-
input.ExportAssetToSignedUrl !== null && {
|
|
3923
|
-
ExportAssetToSignedUrl: serializeAws_restJson1ExportAssetToSignedUrlRequestDetails(
|
|
3924
|
-
input.ExportAssetToSignedUrl,
|
|
3925
|
-
context
|
|
3926
|
-
),
|
|
3927
|
-
}),
|
|
3928
|
-
...(input.ExportAssetsToS3 !== undefined &&
|
|
3929
|
-
input.ExportAssetsToS3 !== null && {
|
|
3930
|
-
ExportAssetsToS3: serializeAws_restJson1ExportAssetsToS3RequestDetails(input.ExportAssetsToS3, context),
|
|
3931
|
-
}),
|
|
3932
|
-
...(input.ExportRevisionsToS3 !== undefined &&
|
|
3933
|
-
input.ExportRevisionsToS3 !== null && {
|
|
3934
|
-
ExportRevisionsToS3: serializeAws_restJson1ExportRevisionsToS3RequestDetails(
|
|
3935
|
-
input.ExportRevisionsToS3,
|
|
3936
|
-
context
|
|
3937
|
-
),
|
|
3938
|
-
}),
|
|
3939
|
-
...(input.ImportAssetFromSignedUrl !== undefined &&
|
|
3940
|
-
input.ImportAssetFromSignedUrl !== null && {
|
|
3941
|
-
ImportAssetFromSignedUrl: serializeAws_restJson1ImportAssetFromSignedUrlRequestDetails(
|
|
3942
|
-
input.ImportAssetFromSignedUrl,
|
|
3943
|
-
context
|
|
3944
|
-
),
|
|
3945
|
-
}),
|
|
3946
|
-
...(input.ImportAssetsFromS3 !== undefined &&
|
|
3947
|
-
input.ImportAssetsFromS3 !== null && {
|
|
3948
|
-
ImportAssetsFromS3: serializeAws_restJson1ImportAssetsFromS3RequestDetails(input.ImportAssetsFromS3, context),
|
|
3949
|
-
}),
|
|
3950
|
-
};
|
|
3951
|
-
};
|
|
3952
|
-
|
|
3953
|
-
const serializeAws_restJson1RevisionDestinationEntry = (
|
|
3954
|
-
input: RevisionDestinationEntry,
|
|
3955
|
-
context: __SerdeContext
|
|
3956
|
-
): any => {
|
|
3957
|
-
return {
|
|
3958
|
-
...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
|
|
3959
|
-
...(input.KeyPattern !== undefined && input.KeyPattern !== null && { KeyPattern: input.KeyPattern }),
|
|
3960
|
-
...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
|
|
3961
|
-
};
|
|
3962
|
-
};
|
|
3963
|
-
|
|
3964
|
-
const serializeAws_restJson1RevisionPublished = (input: RevisionPublished, context: __SerdeContext): any => {
|
|
3965
|
-
return {
|
|
3966
|
-
...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
|
|
3967
|
-
};
|
|
3968
|
-
};
|
|
3969
|
-
|
|
3970
|
-
const deserializeAws_restJson1Action = (output: any, context: __SerdeContext): Action => {
|
|
3971
|
-
return {
|
|
3972
|
-
ExportRevisionToS3:
|
|
3973
|
-
output.ExportRevisionToS3 !== undefined && output.ExportRevisionToS3 !== null
|
|
3974
|
-
? deserializeAws_restJson1AutoExportRevisionToS3RequestDetails(output.ExportRevisionToS3, context)
|
|
3975
|
-
: undefined,
|
|
3976
|
-
} as any;
|
|
3977
|
-
};
|
|
3978
|
-
|
|
3979
|
-
const deserializeAws_restJson1AssetDestinationEntry = (output: any, context: __SerdeContext): AssetDestinationEntry => {
|
|
3980
|
-
return {
|
|
3981
|
-
AssetId: __expectString(output.AssetId),
|
|
3982
|
-
Bucket: __expectString(output.Bucket),
|
|
3983
|
-
Key: __expectString(output.Key),
|
|
3984
|
-
} as any;
|
|
3985
|
-
};
|
|
3986
|
-
|
|
3987
|
-
const deserializeAws_restJson1AssetDetails = (output: any, context: __SerdeContext): AssetDetails => {
|
|
3988
|
-
return {
|
|
3989
|
-
S3SnapshotAsset:
|
|
3990
|
-
output.S3SnapshotAsset !== undefined && output.S3SnapshotAsset !== null
|
|
3991
|
-
? deserializeAws_restJson1S3SnapshotAsset(output.S3SnapshotAsset, context)
|
|
3992
|
-
: undefined,
|
|
3993
|
-
} as any;
|
|
3994
|
-
};
|
|
3995
|
-
|
|
3996
|
-
const deserializeAws_restJson1AssetEntry = (output: any, context: __SerdeContext): AssetEntry => {
|
|
3997
|
-
return {
|
|
3998
|
-
Arn: __expectString(output.Arn),
|
|
3999
|
-
AssetDetails:
|
|
4000
|
-
output.AssetDetails !== undefined && output.AssetDetails !== null
|
|
4001
|
-
? deserializeAws_restJson1AssetDetails(output.AssetDetails, context)
|
|
4002
|
-
: undefined,
|
|
4003
|
-
AssetType: __expectString(output.AssetType),
|
|
4004
|
-
CreatedAt:
|
|
4005
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
4006
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreatedAt))
|
|
4007
|
-
: undefined,
|
|
4008
|
-
DataSetId: __expectString(output.DataSetId),
|
|
4009
|
-
Id: __expectString(output.Id),
|
|
4010
|
-
Name: __expectString(output.Name),
|
|
4011
|
-
RevisionId: __expectString(output.RevisionId),
|
|
4012
|
-
SourceId: __expectString(output.SourceId),
|
|
4013
|
-
UpdatedAt:
|
|
4014
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
4015
|
-
? __expectNonNull(__parseRfc3339DateTime(output.UpdatedAt))
|
|
4016
|
-
: undefined,
|
|
4017
|
-
} as any;
|
|
4018
|
-
};
|
|
4019
|
-
|
|
4020
|
-
const deserializeAws_restJson1AssetSourceEntry = (output: any, context: __SerdeContext): AssetSourceEntry => {
|
|
4021
|
-
return {
|
|
4022
|
-
Bucket: __expectString(output.Bucket),
|
|
4023
|
-
Key: __expectString(output.Key),
|
|
4024
|
-
} as any;
|
|
4025
|
-
};
|
|
4026
|
-
|
|
4027
|
-
const deserializeAws_restJson1AutoExportRevisionDestinationEntry = (
|
|
4028
|
-
output: any,
|
|
4029
|
-
context: __SerdeContext
|
|
4030
|
-
): AutoExportRevisionDestinationEntry => {
|
|
4031
|
-
return {
|
|
4032
|
-
Bucket: __expectString(output.Bucket),
|
|
4033
|
-
KeyPattern: __expectString(output.KeyPattern),
|
|
4034
|
-
} as any;
|
|
4035
|
-
};
|
|
4036
|
-
|
|
4037
|
-
const deserializeAws_restJson1AutoExportRevisionToS3RequestDetails = (
|
|
4038
|
-
output: any,
|
|
4039
|
-
context: __SerdeContext
|
|
4040
|
-
): AutoExportRevisionToS3RequestDetails => {
|
|
4041
|
-
return {
|
|
4042
|
-
Encryption:
|
|
4043
|
-
output.Encryption !== undefined && output.Encryption !== null
|
|
4044
|
-
? deserializeAws_restJson1ExportServerSideEncryption(output.Encryption, context)
|
|
4045
|
-
: undefined,
|
|
4046
|
-
RevisionDestination:
|
|
4047
|
-
output.RevisionDestination !== undefined && output.RevisionDestination !== null
|
|
4048
|
-
? deserializeAws_restJson1AutoExportRevisionDestinationEntry(output.RevisionDestination, context)
|
|
4049
|
-
: undefined,
|
|
4050
|
-
} as any;
|
|
4051
|
-
};
|
|
4052
|
-
|
|
4053
|
-
const deserializeAws_restJson1DataSetEntry = (output: any, context: __SerdeContext): DataSetEntry => {
|
|
4054
|
-
return {
|
|
4055
|
-
Arn: __expectString(output.Arn),
|
|
4056
|
-
AssetType: __expectString(output.AssetType),
|
|
4057
|
-
CreatedAt:
|
|
4058
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
4059
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreatedAt))
|
|
4060
|
-
: undefined,
|
|
4061
|
-
Description: __expectString(output.Description),
|
|
4062
|
-
Id: __expectString(output.Id),
|
|
4063
|
-
Name: __expectString(output.Name),
|
|
4064
|
-
Origin: __expectString(output.Origin),
|
|
4065
|
-
OriginDetails:
|
|
4066
|
-
output.OriginDetails !== undefined && output.OriginDetails !== null
|
|
4067
|
-
? deserializeAws_restJson1OriginDetails(output.OriginDetails, context)
|
|
4068
|
-
: undefined,
|
|
4069
|
-
SourceId: __expectString(output.SourceId),
|
|
4070
|
-
UpdatedAt:
|
|
4071
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
4072
|
-
? __expectNonNull(__parseRfc3339DateTime(output.UpdatedAt))
|
|
4073
|
-
: undefined,
|
|
4074
|
-
} as any;
|
|
4075
|
-
};
|
|
4076
|
-
|
|
4077
|
-
const deserializeAws_restJson1Details = (output: any, context: __SerdeContext): Details => {
|
|
4078
|
-
return {
|
|
4079
|
-
ImportAssetFromSignedUrlJobErrorDetails:
|
|
4080
|
-
output.ImportAssetFromSignedUrlJobErrorDetails !== undefined &&
|
|
4081
|
-
output.ImportAssetFromSignedUrlJobErrorDetails !== null
|
|
4082
|
-
? deserializeAws_restJson1ImportAssetFromSignedUrlJobErrorDetails(
|
|
4083
|
-
output.ImportAssetFromSignedUrlJobErrorDetails,
|
|
4084
|
-
context
|
|
4085
|
-
)
|
|
4086
|
-
: undefined,
|
|
4087
|
-
ImportAssetsFromS3JobErrorDetails:
|
|
4088
|
-
output.ImportAssetsFromS3JobErrorDetails !== undefined && output.ImportAssetsFromS3JobErrorDetails !== null
|
|
4089
|
-
? deserializeAws_restJson1ListOfAssetSourceEntry(output.ImportAssetsFromS3JobErrorDetails, context)
|
|
4090
|
-
: undefined,
|
|
4091
|
-
} as any;
|
|
4092
|
-
};
|
|
4093
|
-
|
|
4094
|
-
const deserializeAws_restJson1Event = (output: any, context: __SerdeContext): Event => {
|
|
4095
|
-
return {
|
|
4096
|
-
RevisionPublished:
|
|
4097
|
-
output.RevisionPublished !== undefined && output.RevisionPublished !== null
|
|
4098
|
-
? deserializeAws_restJson1RevisionPublished(output.RevisionPublished, context)
|
|
4099
|
-
: undefined,
|
|
4100
|
-
} as any;
|
|
4101
|
-
};
|
|
4102
|
-
|
|
4103
|
-
const deserializeAws_restJson1EventActionEntry = (output: any, context: __SerdeContext): EventActionEntry => {
|
|
4104
|
-
return {
|
|
4105
|
-
Action:
|
|
4106
|
-
output.Action !== undefined && output.Action !== null
|
|
4107
|
-
? deserializeAws_restJson1Action(output.Action, context)
|
|
4108
|
-
: undefined,
|
|
4109
|
-
Arn: __expectString(output.Arn),
|
|
4110
|
-
CreatedAt:
|
|
4111
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
4112
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreatedAt))
|
|
4113
|
-
: undefined,
|
|
4114
|
-
Event:
|
|
4115
|
-
output.Event !== undefined && output.Event !== null
|
|
4116
|
-
? deserializeAws_restJson1Event(output.Event, context)
|
|
4117
|
-
: undefined,
|
|
4118
|
-
Id: __expectString(output.Id),
|
|
4119
|
-
UpdatedAt:
|
|
4120
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
4121
|
-
? __expectNonNull(__parseRfc3339DateTime(output.UpdatedAt))
|
|
4122
|
-
: undefined,
|
|
4123
|
-
} as any;
|
|
4124
|
-
};
|
|
4125
|
-
|
|
4126
|
-
const deserializeAws_restJson1ExportAssetsToS3ResponseDetails = (
|
|
4127
|
-
output: any,
|
|
4128
|
-
context: __SerdeContext
|
|
4129
|
-
): ExportAssetsToS3ResponseDetails => {
|
|
4130
|
-
return {
|
|
4131
|
-
AssetDestinations:
|
|
4132
|
-
output.AssetDestinations !== undefined && output.AssetDestinations !== null
|
|
4133
|
-
? deserializeAws_restJson1ListOfAssetDestinationEntry(output.AssetDestinations, context)
|
|
4134
|
-
: undefined,
|
|
4135
|
-
DataSetId: __expectString(output.DataSetId),
|
|
4136
|
-
Encryption:
|
|
4137
|
-
output.Encryption !== undefined && output.Encryption !== null
|
|
4138
|
-
? deserializeAws_restJson1ExportServerSideEncryption(output.Encryption, context)
|
|
4139
|
-
: undefined,
|
|
4140
|
-
RevisionId: __expectString(output.RevisionId),
|
|
4141
|
-
} as any;
|
|
4142
|
-
};
|
|
4143
|
-
|
|
4144
|
-
const deserializeAws_restJson1ExportAssetToSignedUrlResponseDetails = (
|
|
4145
|
-
output: any,
|
|
4146
|
-
context: __SerdeContext
|
|
4147
|
-
): ExportAssetToSignedUrlResponseDetails => {
|
|
4148
|
-
return {
|
|
4149
|
-
AssetId: __expectString(output.AssetId),
|
|
4150
|
-
DataSetId: __expectString(output.DataSetId),
|
|
4151
|
-
RevisionId: __expectString(output.RevisionId),
|
|
4152
|
-
SignedUrl: __expectString(output.SignedUrl),
|
|
4153
|
-
SignedUrlExpiresAt:
|
|
4154
|
-
output.SignedUrlExpiresAt !== undefined && output.SignedUrlExpiresAt !== null
|
|
4155
|
-
? __expectNonNull(__parseRfc3339DateTime(output.SignedUrlExpiresAt))
|
|
4156
|
-
: undefined,
|
|
4157
|
-
} as any;
|
|
4158
|
-
};
|
|
4159
|
-
|
|
4160
|
-
const deserializeAws_restJson1ExportRevisionsToS3ResponseDetails = (
|
|
4161
|
-
output: any,
|
|
4162
|
-
context: __SerdeContext
|
|
4163
|
-
): ExportRevisionsToS3ResponseDetails => {
|
|
4164
|
-
return {
|
|
4165
|
-
DataSetId: __expectString(output.DataSetId),
|
|
4166
|
-
Encryption:
|
|
4167
|
-
output.Encryption !== undefined && output.Encryption !== null
|
|
4168
|
-
? deserializeAws_restJson1ExportServerSideEncryption(output.Encryption, context)
|
|
4169
|
-
: undefined,
|
|
4170
|
-
RevisionDestinations:
|
|
4171
|
-
output.RevisionDestinations !== undefined && output.RevisionDestinations !== null
|
|
4172
|
-
? deserializeAws_restJson1ListOfRevisionDestinationEntry(output.RevisionDestinations, context)
|
|
4173
|
-
: undefined,
|
|
4174
|
-
} as any;
|
|
4175
|
-
};
|
|
4176
|
-
|
|
4177
|
-
const deserializeAws_restJson1ExportServerSideEncryption = (
|
|
4178
|
-
output: any,
|
|
4179
|
-
context: __SerdeContext
|
|
4180
|
-
): ExportServerSideEncryption => {
|
|
4181
|
-
return {
|
|
4182
|
-
KmsKeyArn: __expectString(output.KmsKeyArn),
|
|
4183
|
-
Type: __expectString(output.Type),
|
|
4184
|
-
} as any;
|
|
4185
|
-
};
|
|
4186
|
-
|
|
4187
|
-
const deserializeAws_restJson1ImportAssetFromSignedUrlJobErrorDetails = (
|
|
4188
|
-
output: any,
|
|
4189
|
-
context: __SerdeContext
|
|
4190
|
-
): ImportAssetFromSignedUrlJobErrorDetails => {
|
|
4191
|
-
return {
|
|
4192
|
-
AssetName: __expectString(output.AssetName),
|
|
4193
|
-
} as any;
|
|
4194
|
-
};
|
|
4195
|
-
|
|
4196
|
-
const deserializeAws_restJson1ImportAssetFromSignedUrlResponseDetails = (
|
|
4197
|
-
output: any,
|
|
4198
|
-
context: __SerdeContext
|
|
4199
|
-
): ImportAssetFromSignedUrlResponseDetails => {
|
|
4200
|
-
return {
|
|
4201
|
-
AssetName: __expectString(output.AssetName),
|
|
4202
|
-
DataSetId: __expectString(output.DataSetId),
|
|
4203
|
-
Md5Hash: __expectString(output.Md5Hash),
|
|
4204
|
-
RevisionId: __expectString(output.RevisionId),
|
|
4205
|
-
SignedUrl: __expectString(output.SignedUrl),
|
|
4206
|
-
SignedUrlExpiresAt:
|
|
4207
|
-
output.SignedUrlExpiresAt !== undefined && output.SignedUrlExpiresAt !== null
|
|
4208
|
-
? __expectNonNull(__parseRfc3339DateTime(output.SignedUrlExpiresAt))
|
|
4209
|
-
: undefined,
|
|
4210
|
-
} as any;
|
|
4211
|
-
};
|
|
4212
|
-
|
|
4213
|
-
const deserializeAws_restJson1ImportAssetsFromS3ResponseDetails = (
|
|
4214
|
-
output: any,
|
|
4215
|
-
context: __SerdeContext
|
|
4216
|
-
): ImportAssetsFromS3ResponseDetails => {
|
|
4217
|
-
return {
|
|
4218
|
-
AssetSources:
|
|
4219
|
-
output.AssetSources !== undefined && output.AssetSources !== null
|
|
4220
|
-
? deserializeAws_restJson1ListOfAssetSourceEntry(output.AssetSources, context)
|
|
4221
|
-
: undefined,
|
|
4222
|
-
DataSetId: __expectString(output.DataSetId),
|
|
4223
|
-
RevisionId: __expectString(output.RevisionId),
|
|
4224
|
-
} as any;
|
|
4225
|
-
};
|
|
4226
|
-
|
|
4227
|
-
const deserializeAws_restJson1JobEntry = (output: any, context: __SerdeContext): JobEntry => {
|
|
4228
|
-
return {
|
|
4229
|
-
Arn: __expectString(output.Arn),
|
|
4230
|
-
CreatedAt:
|
|
4231
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
4232
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreatedAt))
|
|
4233
|
-
: undefined,
|
|
4234
|
-
Details:
|
|
4235
|
-
output.Details !== undefined && output.Details !== null
|
|
4236
|
-
? deserializeAws_restJson1ResponseDetails(output.Details, context)
|
|
4237
|
-
: undefined,
|
|
4238
|
-
Errors:
|
|
4239
|
-
output.Errors !== undefined && output.Errors !== null
|
|
4240
|
-
? deserializeAws_restJson1ListOfJobError(output.Errors, context)
|
|
4241
|
-
: undefined,
|
|
4242
|
-
Id: __expectString(output.Id),
|
|
4243
|
-
State: __expectString(output.State),
|
|
4244
|
-
Type: __expectString(output.Type),
|
|
4245
|
-
UpdatedAt:
|
|
4246
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
4247
|
-
? __expectNonNull(__parseRfc3339DateTime(output.UpdatedAt))
|
|
4248
|
-
: undefined,
|
|
4249
|
-
} as any;
|
|
4250
|
-
};
|
|
4251
|
-
|
|
4252
|
-
const deserializeAws_restJson1JobError = (output: any, context: __SerdeContext): JobError => {
|
|
4253
|
-
return {
|
|
4254
|
-
Code: __expectString(output.Code),
|
|
4255
|
-
Details:
|
|
4256
|
-
output.Details !== undefined && output.Details !== null
|
|
4257
|
-
? deserializeAws_restJson1Details(output.Details, context)
|
|
4258
|
-
: undefined,
|
|
4259
|
-
LimitName: __expectString(output.LimitName),
|
|
4260
|
-
LimitValue: __limitedParseDouble(output.LimitValue),
|
|
4261
|
-
Message: __expectString(output.Message),
|
|
4262
|
-
ResourceId: __expectString(output.ResourceId),
|
|
4263
|
-
ResourceType: __expectString(output.ResourceType),
|
|
4264
|
-
} as any;
|
|
4265
|
-
};
|
|
4266
|
-
|
|
4267
|
-
const deserializeAws_restJson1ListOfAssetDestinationEntry = (
|
|
4268
|
-
output: any,
|
|
4269
|
-
context: __SerdeContext
|
|
4270
|
-
): AssetDestinationEntry[] => {
|
|
4271
|
-
return (output || [])
|
|
4272
|
-
.filter((e: any) => e != null)
|
|
4273
|
-
.map((entry: any) => {
|
|
4274
|
-
if (entry === null) {
|
|
4275
|
-
return null as any;
|
|
4276
|
-
}
|
|
4277
|
-
return deserializeAws_restJson1AssetDestinationEntry(entry, context);
|
|
4278
|
-
});
|
|
4279
|
-
};
|
|
4280
|
-
|
|
4281
|
-
const deserializeAws_restJson1ListOfAssetEntry = (output: any, context: __SerdeContext): AssetEntry[] => {
|
|
4282
|
-
return (output || [])
|
|
4283
|
-
.filter((e: any) => e != null)
|
|
4284
|
-
.map((entry: any) => {
|
|
4285
|
-
if (entry === null) {
|
|
4286
|
-
return null as any;
|
|
4287
|
-
}
|
|
4288
|
-
return deserializeAws_restJson1AssetEntry(entry, context);
|
|
4289
|
-
});
|
|
4290
|
-
};
|
|
4291
|
-
|
|
4292
|
-
const deserializeAws_restJson1ListOfAssetSourceEntry = (output: any, context: __SerdeContext): AssetSourceEntry[] => {
|
|
4293
|
-
return (output || [])
|
|
4294
|
-
.filter((e: any) => e != null)
|
|
4295
|
-
.map((entry: any) => {
|
|
4296
|
-
if (entry === null) {
|
|
4297
|
-
return null as any;
|
|
4298
|
-
}
|
|
4299
|
-
return deserializeAws_restJson1AssetSourceEntry(entry, context);
|
|
4300
|
-
});
|
|
4301
|
-
};
|
|
4302
|
-
|
|
4303
|
-
const deserializeAws_restJson1ListOfDataSetEntry = (output: any, context: __SerdeContext): DataSetEntry[] => {
|
|
4304
|
-
return (output || [])
|
|
4305
|
-
.filter((e: any) => e != null)
|
|
4306
|
-
.map((entry: any) => {
|
|
4307
|
-
if (entry === null) {
|
|
4308
|
-
return null as any;
|
|
4309
|
-
}
|
|
4310
|
-
return deserializeAws_restJson1DataSetEntry(entry, context);
|
|
4311
|
-
});
|
|
4312
|
-
};
|
|
4313
|
-
|
|
4314
|
-
const deserializeAws_restJson1ListOfEventActionEntry = (output: any, context: __SerdeContext): EventActionEntry[] => {
|
|
4315
|
-
return (output || [])
|
|
4316
|
-
.filter((e: any) => e != null)
|
|
4317
|
-
.map((entry: any) => {
|
|
4318
|
-
if (entry === null) {
|
|
4319
|
-
return null as any;
|
|
4320
|
-
}
|
|
4321
|
-
return deserializeAws_restJson1EventActionEntry(entry, context);
|
|
4322
|
-
});
|
|
4323
|
-
};
|
|
4324
|
-
|
|
4325
|
-
const deserializeAws_restJson1ListOfJobEntry = (output: any, context: __SerdeContext): JobEntry[] => {
|
|
4326
|
-
return (output || [])
|
|
4327
|
-
.filter((e: any) => e != null)
|
|
4328
|
-
.map((entry: any) => {
|
|
4329
|
-
if (entry === null) {
|
|
4330
|
-
return null as any;
|
|
4331
|
-
}
|
|
4332
|
-
return deserializeAws_restJson1JobEntry(entry, context);
|
|
4333
|
-
});
|
|
4334
|
-
};
|
|
4335
|
-
|
|
4336
|
-
const deserializeAws_restJson1ListOfJobError = (output: any, context: __SerdeContext): JobError[] => {
|
|
4337
|
-
return (output || [])
|
|
4338
|
-
.filter((e: any) => e != null)
|
|
4339
|
-
.map((entry: any) => {
|
|
4340
|
-
if (entry === null) {
|
|
4341
|
-
return null as any;
|
|
4342
|
-
}
|
|
4343
|
-
return deserializeAws_restJson1JobError(entry, context);
|
|
4344
|
-
});
|
|
4345
|
-
};
|
|
4346
|
-
|
|
4347
|
-
const deserializeAws_restJson1ListOfRevisionDestinationEntry = (
|
|
4348
|
-
output: any,
|
|
4349
|
-
context: __SerdeContext
|
|
4350
|
-
): RevisionDestinationEntry[] => {
|
|
4351
|
-
return (output || [])
|
|
4352
|
-
.filter((e: any) => e != null)
|
|
4353
|
-
.map((entry: any) => {
|
|
4354
|
-
if (entry === null) {
|
|
4355
|
-
return null as any;
|
|
4356
|
-
}
|
|
4357
|
-
return deserializeAws_restJson1RevisionDestinationEntry(entry, context);
|
|
4358
|
-
});
|
|
4359
|
-
};
|
|
4360
|
-
|
|
4361
|
-
const deserializeAws_restJson1ListOfRevisionEntry = (output: any, context: __SerdeContext): RevisionEntry[] => {
|
|
4362
|
-
return (output || [])
|
|
4363
|
-
.filter((e: any) => e != null)
|
|
4364
|
-
.map((entry: any) => {
|
|
4365
|
-
if (entry === null) {
|
|
4366
|
-
return null as any;
|
|
4367
|
-
}
|
|
4368
|
-
return deserializeAws_restJson1RevisionEntry(entry, context);
|
|
4369
|
-
});
|
|
4370
|
-
};
|
|
4371
|
-
|
|
4372
|
-
const deserializeAws_restJson1MapOf__string = (output: any, context: __SerdeContext): { [key: string]: string } => {
|
|
4373
|
-
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
4374
|
-
if (value === null) {
|
|
4375
|
-
return acc;
|
|
4376
|
-
}
|
|
4377
|
-
return {
|
|
4378
|
-
...acc,
|
|
4379
|
-
[key]: __expectString(value) as any,
|
|
4380
|
-
};
|
|
4381
|
-
}, {});
|
|
4382
|
-
};
|
|
4383
|
-
|
|
4384
|
-
const deserializeAws_restJson1OriginDetails = (output: any, context: __SerdeContext): OriginDetails => {
|
|
4385
|
-
return {
|
|
4386
|
-
ProductId: __expectString(output.ProductId),
|
|
4387
|
-
} as any;
|
|
4388
|
-
};
|
|
4389
|
-
|
|
4390
|
-
const deserializeAws_restJson1ResponseDetails = (output: any, context: __SerdeContext): ResponseDetails => {
|
|
4391
|
-
return {
|
|
4392
|
-
ExportAssetToSignedUrl:
|
|
4393
|
-
output.ExportAssetToSignedUrl !== undefined && output.ExportAssetToSignedUrl !== null
|
|
4394
|
-
? deserializeAws_restJson1ExportAssetToSignedUrlResponseDetails(output.ExportAssetToSignedUrl, context)
|
|
4395
|
-
: undefined,
|
|
4396
|
-
ExportAssetsToS3:
|
|
4397
|
-
output.ExportAssetsToS3 !== undefined && output.ExportAssetsToS3 !== null
|
|
4398
|
-
? deserializeAws_restJson1ExportAssetsToS3ResponseDetails(output.ExportAssetsToS3, context)
|
|
4399
|
-
: undefined,
|
|
4400
|
-
ExportRevisionsToS3:
|
|
4401
|
-
output.ExportRevisionsToS3 !== undefined && output.ExportRevisionsToS3 !== null
|
|
4402
|
-
? deserializeAws_restJson1ExportRevisionsToS3ResponseDetails(output.ExportRevisionsToS3, context)
|
|
4403
|
-
: undefined,
|
|
4404
|
-
ImportAssetFromSignedUrl:
|
|
4405
|
-
output.ImportAssetFromSignedUrl !== undefined && output.ImportAssetFromSignedUrl !== null
|
|
4406
|
-
? deserializeAws_restJson1ImportAssetFromSignedUrlResponseDetails(output.ImportAssetFromSignedUrl, context)
|
|
4407
|
-
: undefined,
|
|
4408
|
-
ImportAssetsFromS3:
|
|
4409
|
-
output.ImportAssetsFromS3 !== undefined && output.ImportAssetsFromS3 !== null
|
|
4410
|
-
? deserializeAws_restJson1ImportAssetsFromS3ResponseDetails(output.ImportAssetsFromS3, context)
|
|
4411
|
-
: undefined,
|
|
4412
|
-
} as any;
|
|
4413
|
-
};
|
|
4414
|
-
|
|
4415
|
-
const deserializeAws_restJson1RevisionDestinationEntry = (
|
|
4416
|
-
output: any,
|
|
4417
|
-
context: __SerdeContext
|
|
4418
|
-
): RevisionDestinationEntry => {
|
|
4419
|
-
return {
|
|
4420
|
-
Bucket: __expectString(output.Bucket),
|
|
4421
|
-
KeyPattern: __expectString(output.KeyPattern),
|
|
4422
|
-
RevisionId: __expectString(output.RevisionId),
|
|
4423
|
-
} as any;
|
|
4424
|
-
};
|
|
4425
|
-
|
|
4426
|
-
const deserializeAws_restJson1RevisionEntry = (output: any, context: __SerdeContext): RevisionEntry => {
|
|
4427
|
-
return {
|
|
4428
|
-
Arn: __expectString(output.Arn),
|
|
4429
|
-
Comment: __expectString(output.Comment),
|
|
4430
|
-
CreatedAt:
|
|
4431
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
4432
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreatedAt))
|
|
4433
|
-
: undefined,
|
|
4434
|
-
DataSetId: __expectString(output.DataSetId),
|
|
4435
|
-
Finalized: __expectBoolean(output.Finalized),
|
|
4436
|
-
Id: __expectString(output.Id),
|
|
4437
|
-
SourceId: __expectString(output.SourceId),
|
|
4438
|
-
UpdatedAt:
|
|
4439
|
-
output.UpdatedAt !== undefined && output.UpdatedAt !== null
|
|
4440
|
-
? __expectNonNull(__parseRfc3339DateTime(output.UpdatedAt))
|
|
4441
|
-
: undefined,
|
|
4442
|
-
} as any;
|
|
4443
|
-
};
|
|
4444
|
-
|
|
4445
|
-
const deserializeAws_restJson1RevisionPublished = (output: any, context: __SerdeContext): RevisionPublished => {
|
|
4446
|
-
return {
|
|
4447
|
-
DataSetId: __expectString(output.DataSetId),
|
|
4448
|
-
} as any;
|
|
4449
|
-
};
|
|
4450
|
-
|
|
4451
|
-
const deserializeAws_restJson1S3SnapshotAsset = (output: any, context: __SerdeContext): S3SnapshotAsset => {
|
|
4452
|
-
return {
|
|
4453
|
-
Size: __limitedParseDouble(output.Size),
|
|
4454
|
-
} as any;
|
|
4455
|
-
};
|
|
4456
|
-
|
|
4457
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
4458
|
-
httpStatusCode: output.statusCode,
|
|
4459
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
4460
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
4461
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
4462
|
-
});
|
|
4463
|
-
|
|
4464
|
-
// Collect low-level response body stream to Uint8Array.
|
|
4465
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
4466
|
-
if (streamBody instanceof Uint8Array) {
|
|
4467
|
-
return Promise.resolve(streamBody);
|
|
4468
|
-
}
|
|
4469
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
4470
|
-
};
|
|
4471
|
-
|
|
4472
|
-
// Encode Uint8Array data into string with utf-8.
|
|
4473
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
4474
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
4475
|
-
|
|
4476
|
-
const isSerializableHeaderValue = (value: any): boolean =>
|
|
4477
|
-
value !== undefined &&
|
|
4478
|
-
value !== null &&
|
|
4479
|
-
value !== "" &&
|
|
4480
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
4481
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
4482
|
-
|
|
4483
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
4484
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
4485
|
-
if (encoded.length) {
|
|
4486
|
-
return JSON.parse(encoded);
|
|
4487
|
-
}
|
|
4488
|
-
return {};
|
|
4489
|
-
});
|
|
4490
|
-
|
|
4491
|
-
/**
|
|
4492
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
4493
|
-
*/
|
|
4494
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
4495
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
4496
|
-
|
|
4497
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
4498
|
-
let cleanValue = rawValue;
|
|
4499
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
4500
|
-
cleanValue = cleanValue.split(":")[0];
|
|
4501
|
-
}
|
|
4502
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
4503
|
-
cleanValue = cleanValue.split("#")[1];
|
|
4504
|
-
}
|
|
4505
|
-
return cleanValue;
|
|
4506
|
-
};
|
|
4507
|
-
|
|
4508
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
4509
|
-
if (headerKey !== undefined) {
|
|
4510
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
4511
|
-
}
|
|
4512
|
-
|
|
4513
|
-
if (data.code !== undefined) {
|
|
4514
|
-
return sanitizeErrorCode(data.code);
|
|
4515
|
-
}
|
|
4516
|
-
|
|
4517
|
-
if (data["__type"] !== undefined) {
|
|
4518
|
-
return sanitizeErrorCode(data["__type"]);
|
|
4519
|
-
}
|
|
4520
|
-
|
|
4521
|
-
return "";
|
|
4522
|
-
};
|