@aws-sdk/client-timestream-write 3.35.0 → 3.38.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 +47 -0
- package/dist-cjs/TimestreamWrite.js +0 -4
- package/dist-cjs/TimestreamWriteClient.js +0 -9
- package/dist-cjs/commands/CreateDatabaseCommand.js +0 -28
- package/dist-cjs/commands/CreateTableCommand.js +0 -32
- package/dist-cjs/commands/DeleteDatabaseCommand.js +0 -33
- package/dist-cjs/commands/DeleteTableCommand.js +0 -30
- package/dist-cjs/commands/DescribeDatabaseCommand.js +0 -27
- package/dist-cjs/commands/DescribeEndpointsCommand.js +0 -38
- package/dist-cjs/commands/DescribeTableCommand.js +0 -28
- package/dist-cjs/commands/ListDatabasesCommand.js +0 -27
- package/dist-cjs/commands/ListTablesCommand.js +0 -26
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -27
- package/dist-cjs/commands/TagResourceCommand.js +0 -29
- package/dist-cjs/commands/UntagResourceCommand.js +0 -27
- package/dist-cjs/commands/UpdateDatabaseCommand.js +0 -29
- package/dist-cjs/commands/UpdateTableCommand.js +0 -31
- package/dist-cjs/commands/WriteRecordsCommand.js +0 -38
- package/dist-cjs/commands/index.js +18 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +4 -21
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -133
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListDatabasesPaginator.js +0 -11
- package/dist-cjs/pagination/ListTablesPaginator.js +0 -11
- package/dist-cjs/pagination/index.js +6 -0
- package/dist-cjs/protocols/Aws_json1_0.js +0 -6
- package/dist-cjs/runtimeConfig.browser.js +1 -6
- package/dist-cjs/runtimeConfig.js +2 -7
- package/dist-cjs/runtimeConfig.native.js +0 -4
- package/dist-cjs/runtimeConfig.shared.js +0 -4
- package/dist-es/TimestreamWrite.js +0 -1
- package/dist-es/TimestreamWriteClient.js +0 -1
- package/dist-es/commands/CreateDatabaseCommand.js +0 -1
- package/dist-es/commands/CreateTableCommand.js +0 -1
- package/dist-es/commands/DeleteDatabaseCommand.js +0 -1
- package/dist-es/commands/DeleteTableCommand.js +0 -1
- package/dist-es/commands/DescribeDatabaseCommand.js +0 -1
- package/dist-es/commands/DescribeEndpointsCommand.js +0 -1
- package/dist-es/commands/DescribeTableCommand.js +0 -1
- package/dist-es/commands/ListDatabasesCommand.js +0 -1
- package/dist-es/commands/ListTablesCommand.js +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-es/commands/TagResourceCommand.js +0 -1
- package/dist-es/commands/UntagResourceCommand.js +0 -1
- package/dist-es/commands/UpdateDatabaseCommand.js +0 -1
- package/dist-es/commands/UpdateTableCommand.js +0 -1
- package/dist-es/commands/WriteRecordsCommand.js +0 -1
- package/dist-es/commands/index.js +15 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +4 -21
- 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/ListDatabasesPaginator.js +0 -1
- package/dist-es/pagination/ListTablesPaginator.js +0 -1
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_json1_0.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/dist-types/commands/index.d.ts +15 -0
- package/dist-types/index.d.ts +4 -20
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/TimestreamWrite.d.ts +16 -123
- package/dist-types/ts3.4/TimestreamWriteClient.d.ts +25 -94
- package/dist-types/ts3.4/commands/CreateDatabaseCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/CreateTableCommand.d.ts +2 -27
- package/dist-types/ts3.4/commands/DeleteDatabaseCommand.d.ts +2 -28
- package/dist-types/ts3.4/commands/DeleteTableCommand.d.ts +2 -25
- package/dist-types/ts3.4/commands/DescribeDatabaseCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/DescribeEndpointsCommand.d.ts +2 -33
- package/dist-types/ts3.4/commands/DescribeTableCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/ListDatabasesCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/ListTablesCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +2 -24
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/UpdateDatabaseCommand.d.ts +2 -24
- package/dist-types/ts3.4/commands/UpdateTableCommand.d.ts +2 -26
- package/dist-types/ts3.4/commands/WriteRecordsCommand.d.ts +2 -33
- package/dist-types/ts3.4/commands/index.d.ts +15 -0
- package/dist-types/ts3.4/index.d.ts +4 -20
- package/dist-types/ts3.4/models/models_0.d.ts +137 -581
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +34 -31
- package/dist-cjs/TimestreamWrite.js.map +0 -1
- package/dist-cjs/TimestreamWriteClient.js.map +0 -1
- package/dist-cjs/commands/CreateDatabaseCommand.js.map +0 -1
- package/dist-cjs/commands/CreateTableCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteDatabaseCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteTableCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeDatabaseCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeEndpointsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeTableCommand.js.map +0 -1
- package/dist-cjs/commands/ListDatabasesCommand.js.map +0 -1
- package/dist-cjs/commands/ListTablesCommand.js.map +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.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/UpdateDatabaseCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateTableCommand.js.map +0 -1
- package/dist-cjs/commands/WriteRecordsCommand.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/ListDatabasesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListTablesPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_json1_0.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/TimestreamWrite.js.map +0 -1
- package/dist-es/TimestreamWriteClient.js.map +0 -1
- package/dist-es/commands/CreateDatabaseCommand.js.map +0 -1
- package/dist-es/commands/CreateTableCommand.js.map +0 -1
- package/dist-es/commands/DeleteDatabaseCommand.js.map +0 -1
- package/dist-es/commands/DeleteTableCommand.js.map +0 -1
- package/dist-es/commands/DescribeDatabaseCommand.js.map +0 -1
- package/dist-es/commands/DescribeEndpointsCommand.js.map +0 -1
- package/dist-es/commands/DescribeTableCommand.js.map +0 -1
- package/dist-es/commands/ListDatabasesCommand.js.map +0 -1
- package/dist-es/commands/ListTablesCommand.js.map +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.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/UpdateDatabaseCommand.js.map +0 -1
- package/dist-es/commands/UpdateTableCommand.js.map +0 -1
- package/dist-es/commands/WriteRecordsCommand.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/ListDatabasesPaginator.js.map +0 -1
- package/dist-es/pagination/ListTablesPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_json1_0.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/TimestreamWrite.ts +0 -585
- package/src/TimestreamWriteClient.ts +0 -305
- package/src/commands/CreateDatabaseCommand.ts +0 -102
- package/src/commands/CreateTableCommand.ts +0 -106
- package/src/commands/DeleteDatabaseCommand.ts +0 -107
- package/src/commands/DeleteTableCommand.ts +0 -104
- package/src/commands/DescribeDatabaseCommand.ts +0 -101
- package/src/commands/DescribeEndpointsCommand.ts +0 -108
- package/src/commands/DescribeTableCommand.ts +0 -102
- package/src/commands/ListDatabasesCommand.ts +0 -101
- package/src/commands/ListTablesCommand.ts +0 -100
- package/src/commands/ListTagsForResourceCommand.ts +0 -101
- package/src/commands/TagResourceCommand.ts +0 -103
- package/src/commands/UntagResourceCommand.ts +0 -101
- package/src/commands/UpdateDatabaseCommand.ts +0 -103
- package/src/commands/UpdateTableCommand.ts +0 -105
- package/src/commands/WriteRecordsCommand.ts +0 -112
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -21
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -1146
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListDatabasesPaginator.ts +0 -59
- package/src/pagination/ListTablesPaginator.ts +0 -55
- package/src/protocols/Aws_json1_0.ts +0 -2388
- package/src/runtimeConfig.browser.ts +0 -42
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -49
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,2388 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
|
-
import {
|
|
3
|
-
expectInt32 as __expectInt32,
|
|
4
|
-
expectLong as __expectLong,
|
|
5
|
-
expectNonNull as __expectNonNull,
|
|
6
|
-
expectNumber as __expectNumber,
|
|
7
|
-
expectString as __expectString,
|
|
8
|
-
parseEpochTimestamp as __parseEpochTimestamp,
|
|
9
|
-
} from "@aws-sdk/smithy-client";
|
|
10
|
-
import {
|
|
11
|
-
Endpoint as __Endpoint,
|
|
12
|
-
HeaderBag as __HeaderBag,
|
|
13
|
-
MetadataBearer as __MetadataBearer,
|
|
14
|
-
ResponseMetadata as __ResponseMetadata,
|
|
15
|
-
SerdeContext as __SerdeContext,
|
|
16
|
-
SmithyException as __SmithyException,
|
|
17
|
-
} from "@aws-sdk/types";
|
|
18
|
-
|
|
19
|
-
import { CreateDatabaseCommandInput, CreateDatabaseCommandOutput } from "../commands/CreateDatabaseCommand";
|
|
20
|
-
import { CreateTableCommandInput, CreateTableCommandOutput } from "../commands/CreateTableCommand";
|
|
21
|
-
import { DeleteDatabaseCommandInput, DeleteDatabaseCommandOutput } from "../commands/DeleteDatabaseCommand";
|
|
22
|
-
import { DeleteTableCommandInput, DeleteTableCommandOutput } from "../commands/DeleteTableCommand";
|
|
23
|
-
import { DescribeDatabaseCommandInput, DescribeDatabaseCommandOutput } from "../commands/DescribeDatabaseCommand";
|
|
24
|
-
import { DescribeEndpointsCommandInput, DescribeEndpointsCommandOutput } from "../commands/DescribeEndpointsCommand";
|
|
25
|
-
import { DescribeTableCommandInput, DescribeTableCommandOutput } from "../commands/DescribeTableCommand";
|
|
26
|
-
import { ListDatabasesCommandInput, ListDatabasesCommandOutput } from "../commands/ListDatabasesCommand";
|
|
27
|
-
import { ListTablesCommandInput, ListTablesCommandOutput } from "../commands/ListTablesCommand";
|
|
28
|
-
import {
|
|
29
|
-
ListTagsForResourceCommandInput,
|
|
30
|
-
ListTagsForResourceCommandOutput,
|
|
31
|
-
} from "../commands/ListTagsForResourceCommand";
|
|
32
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
33
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
34
|
-
import { UpdateDatabaseCommandInput, UpdateDatabaseCommandOutput } from "../commands/UpdateDatabaseCommand";
|
|
35
|
-
import { UpdateTableCommandInput, UpdateTableCommandOutput } from "../commands/UpdateTableCommand";
|
|
36
|
-
import { WriteRecordsCommandInput, WriteRecordsCommandOutput } from "../commands/WriteRecordsCommand";
|
|
37
|
-
import {
|
|
38
|
-
_Record,
|
|
39
|
-
AccessDeniedException,
|
|
40
|
-
ConflictException,
|
|
41
|
-
CreateDatabaseRequest,
|
|
42
|
-
CreateDatabaseResponse,
|
|
43
|
-
CreateTableRequest,
|
|
44
|
-
CreateTableResponse,
|
|
45
|
-
Database,
|
|
46
|
-
DeleteDatabaseRequest,
|
|
47
|
-
DeleteTableRequest,
|
|
48
|
-
DescribeDatabaseRequest,
|
|
49
|
-
DescribeDatabaseResponse,
|
|
50
|
-
DescribeEndpointsRequest,
|
|
51
|
-
DescribeEndpointsResponse,
|
|
52
|
-
DescribeTableRequest,
|
|
53
|
-
DescribeTableResponse,
|
|
54
|
-
Dimension,
|
|
55
|
-
Endpoint,
|
|
56
|
-
InternalServerException,
|
|
57
|
-
InvalidEndpointException,
|
|
58
|
-
ListDatabasesRequest,
|
|
59
|
-
ListDatabasesResponse,
|
|
60
|
-
ListTablesRequest,
|
|
61
|
-
ListTablesResponse,
|
|
62
|
-
ListTagsForResourceRequest,
|
|
63
|
-
ListTagsForResourceResponse,
|
|
64
|
-
RejectedRecord,
|
|
65
|
-
RejectedRecordsException,
|
|
66
|
-
ResourceNotFoundException,
|
|
67
|
-
RetentionProperties,
|
|
68
|
-
ServiceQuotaExceededException,
|
|
69
|
-
Table,
|
|
70
|
-
Tag,
|
|
71
|
-
TagResourceRequest,
|
|
72
|
-
TagResourceResponse,
|
|
73
|
-
ThrottlingException,
|
|
74
|
-
UntagResourceRequest,
|
|
75
|
-
UntagResourceResponse,
|
|
76
|
-
UpdateDatabaseRequest,
|
|
77
|
-
UpdateDatabaseResponse,
|
|
78
|
-
UpdateTableRequest,
|
|
79
|
-
UpdateTableResponse,
|
|
80
|
-
ValidationException,
|
|
81
|
-
WriteRecordsRequest,
|
|
82
|
-
} from "../models/models_0";
|
|
83
|
-
|
|
84
|
-
export const serializeAws_json1_0CreateDatabaseCommand = async (
|
|
85
|
-
input: CreateDatabaseCommandInput,
|
|
86
|
-
context: __SerdeContext
|
|
87
|
-
): Promise<__HttpRequest> => {
|
|
88
|
-
const headers: __HeaderBag = {
|
|
89
|
-
"content-type": "application/x-amz-json-1.0",
|
|
90
|
-
"x-amz-target": "Timestream_20181101.CreateDatabase",
|
|
91
|
-
};
|
|
92
|
-
let body: any;
|
|
93
|
-
body = JSON.stringify(serializeAws_json1_0CreateDatabaseRequest(input, context));
|
|
94
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export const serializeAws_json1_0CreateTableCommand = async (
|
|
98
|
-
input: CreateTableCommandInput,
|
|
99
|
-
context: __SerdeContext
|
|
100
|
-
): Promise<__HttpRequest> => {
|
|
101
|
-
const headers: __HeaderBag = {
|
|
102
|
-
"content-type": "application/x-amz-json-1.0",
|
|
103
|
-
"x-amz-target": "Timestream_20181101.CreateTable",
|
|
104
|
-
};
|
|
105
|
-
let body: any;
|
|
106
|
-
body = JSON.stringify(serializeAws_json1_0CreateTableRequest(input, context));
|
|
107
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export const serializeAws_json1_0DeleteDatabaseCommand = async (
|
|
111
|
-
input: DeleteDatabaseCommandInput,
|
|
112
|
-
context: __SerdeContext
|
|
113
|
-
): Promise<__HttpRequest> => {
|
|
114
|
-
const headers: __HeaderBag = {
|
|
115
|
-
"content-type": "application/x-amz-json-1.0",
|
|
116
|
-
"x-amz-target": "Timestream_20181101.DeleteDatabase",
|
|
117
|
-
};
|
|
118
|
-
let body: any;
|
|
119
|
-
body = JSON.stringify(serializeAws_json1_0DeleteDatabaseRequest(input, context));
|
|
120
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export const serializeAws_json1_0DeleteTableCommand = async (
|
|
124
|
-
input: DeleteTableCommandInput,
|
|
125
|
-
context: __SerdeContext
|
|
126
|
-
): Promise<__HttpRequest> => {
|
|
127
|
-
const headers: __HeaderBag = {
|
|
128
|
-
"content-type": "application/x-amz-json-1.0",
|
|
129
|
-
"x-amz-target": "Timestream_20181101.DeleteTable",
|
|
130
|
-
};
|
|
131
|
-
let body: any;
|
|
132
|
-
body = JSON.stringify(serializeAws_json1_0DeleteTableRequest(input, context));
|
|
133
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export const serializeAws_json1_0DescribeDatabaseCommand = async (
|
|
137
|
-
input: DescribeDatabaseCommandInput,
|
|
138
|
-
context: __SerdeContext
|
|
139
|
-
): Promise<__HttpRequest> => {
|
|
140
|
-
const headers: __HeaderBag = {
|
|
141
|
-
"content-type": "application/x-amz-json-1.0",
|
|
142
|
-
"x-amz-target": "Timestream_20181101.DescribeDatabase",
|
|
143
|
-
};
|
|
144
|
-
let body: any;
|
|
145
|
-
body = JSON.stringify(serializeAws_json1_0DescribeDatabaseRequest(input, context));
|
|
146
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export const serializeAws_json1_0DescribeEndpointsCommand = async (
|
|
150
|
-
input: DescribeEndpointsCommandInput,
|
|
151
|
-
context: __SerdeContext
|
|
152
|
-
): Promise<__HttpRequest> => {
|
|
153
|
-
const headers: __HeaderBag = {
|
|
154
|
-
"content-type": "application/x-amz-json-1.0",
|
|
155
|
-
"x-amz-target": "Timestream_20181101.DescribeEndpoints",
|
|
156
|
-
};
|
|
157
|
-
let body: any;
|
|
158
|
-
body = JSON.stringify(serializeAws_json1_0DescribeEndpointsRequest(input, context));
|
|
159
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export const serializeAws_json1_0DescribeTableCommand = async (
|
|
163
|
-
input: DescribeTableCommandInput,
|
|
164
|
-
context: __SerdeContext
|
|
165
|
-
): Promise<__HttpRequest> => {
|
|
166
|
-
const headers: __HeaderBag = {
|
|
167
|
-
"content-type": "application/x-amz-json-1.0",
|
|
168
|
-
"x-amz-target": "Timestream_20181101.DescribeTable",
|
|
169
|
-
};
|
|
170
|
-
let body: any;
|
|
171
|
-
body = JSON.stringify(serializeAws_json1_0DescribeTableRequest(input, context));
|
|
172
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
export const serializeAws_json1_0ListDatabasesCommand = async (
|
|
176
|
-
input: ListDatabasesCommandInput,
|
|
177
|
-
context: __SerdeContext
|
|
178
|
-
): Promise<__HttpRequest> => {
|
|
179
|
-
const headers: __HeaderBag = {
|
|
180
|
-
"content-type": "application/x-amz-json-1.0",
|
|
181
|
-
"x-amz-target": "Timestream_20181101.ListDatabases",
|
|
182
|
-
};
|
|
183
|
-
let body: any;
|
|
184
|
-
body = JSON.stringify(serializeAws_json1_0ListDatabasesRequest(input, context));
|
|
185
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
export const serializeAws_json1_0ListTablesCommand = async (
|
|
189
|
-
input: ListTablesCommandInput,
|
|
190
|
-
context: __SerdeContext
|
|
191
|
-
): Promise<__HttpRequest> => {
|
|
192
|
-
const headers: __HeaderBag = {
|
|
193
|
-
"content-type": "application/x-amz-json-1.0",
|
|
194
|
-
"x-amz-target": "Timestream_20181101.ListTables",
|
|
195
|
-
};
|
|
196
|
-
let body: any;
|
|
197
|
-
body = JSON.stringify(serializeAws_json1_0ListTablesRequest(input, context));
|
|
198
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
export const serializeAws_json1_0ListTagsForResourceCommand = async (
|
|
202
|
-
input: ListTagsForResourceCommandInput,
|
|
203
|
-
context: __SerdeContext
|
|
204
|
-
): Promise<__HttpRequest> => {
|
|
205
|
-
const headers: __HeaderBag = {
|
|
206
|
-
"content-type": "application/x-amz-json-1.0",
|
|
207
|
-
"x-amz-target": "Timestream_20181101.ListTagsForResource",
|
|
208
|
-
};
|
|
209
|
-
let body: any;
|
|
210
|
-
body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context));
|
|
211
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
export const serializeAws_json1_0TagResourceCommand = async (
|
|
215
|
-
input: TagResourceCommandInput,
|
|
216
|
-
context: __SerdeContext
|
|
217
|
-
): Promise<__HttpRequest> => {
|
|
218
|
-
const headers: __HeaderBag = {
|
|
219
|
-
"content-type": "application/x-amz-json-1.0",
|
|
220
|
-
"x-amz-target": "Timestream_20181101.TagResource",
|
|
221
|
-
};
|
|
222
|
-
let body: any;
|
|
223
|
-
body = JSON.stringify(serializeAws_json1_0TagResourceRequest(input, context));
|
|
224
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
export const serializeAws_json1_0UntagResourceCommand = async (
|
|
228
|
-
input: UntagResourceCommandInput,
|
|
229
|
-
context: __SerdeContext
|
|
230
|
-
): Promise<__HttpRequest> => {
|
|
231
|
-
const headers: __HeaderBag = {
|
|
232
|
-
"content-type": "application/x-amz-json-1.0",
|
|
233
|
-
"x-amz-target": "Timestream_20181101.UntagResource",
|
|
234
|
-
};
|
|
235
|
-
let body: any;
|
|
236
|
-
body = JSON.stringify(serializeAws_json1_0UntagResourceRequest(input, context));
|
|
237
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
export const serializeAws_json1_0UpdateDatabaseCommand = async (
|
|
241
|
-
input: UpdateDatabaseCommandInput,
|
|
242
|
-
context: __SerdeContext
|
|
243
|
-
): Promise<__HttpRequest> => {
|
|
244
|
-
const headers: __HeaderBag = {
|
|
245
|
-
"content-type": "application/x-amz-json-1.0",
|
|
246
|
-
"x-amz-target": "Timestream_20181101.UpdateDatabase",
|
|
247
|
-
};
|
|
248
|
-
let body: any;
|
|
249
|
-
body = JSON.stringify(serializeAws_json1_0UpdateDatabaseRequest(input, context));
|
|
250
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
export const serializeAws_json1_0UpdateTableCommand = async (
|
|
254
|
-
input: UpdateTableCommandInput,
|
|
255
|
-
context: __SerdeContext
|
|
256
|
-
): Promise<__HttpRequest> => {
|
|
257
|
-
const headers: __HeaderBag = {
|
|
258
|
-
"content-type": "application/x-amz-json-1.0",
|
|
259
|
-
"x-amz-target": "Timestream_20181101.UpdateTable",
|
|
260
|
-
};
|
|
261
|
-
let body: any;
|
|
262
|
-
body = JSON.stringify(serializeAws_json1_0UpdateTableRequest(input, context));
|
|
263
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
export const serializeAws_json1_0WriteRecordsCommand = async (
|
|
267
|
-
input: WriteRecordsCommandInput,
|
|
268
|
-
context: __SerdeContext
|
|
269
|
-
): Promise<__HttpRequest> => {
|
|
270
|
-
const headers: __HeaderBag = {
|
|
271
|
-
"content-type": "application/x-amz-json-1.0",
|
|
272
|
-
"x-amz-target": "Timestream_20181101.WriteRecords",
|
|
273
|
-
};
|
|
274
|
-
let body: any;
|
|
275
|
-
body = JSON.stringify(serializeAws_json1_0WriteRecordsRequest(input, context));
|
|
276
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
export const deserializeAws_json1_0CreateDatabaseCommand = async (
|
|
280
|
-
output: __HttpResponse,
|
|
281
|
-
context: __SerdeContext
|
|
282
|
-
): Promise<CreateDatabaseCommandOutput> => {
|
|
283
|
-
if (output.statusCode >= 300) {
|
|
284
|
-
return deserializeAws_json1_0CreateDatabaseCommandError(output, context);
|
|
285
|
-
}
|
|
286
|
-
const data: any = await parseBody(output.body, context);
|
|
287
|
-
let contents: any = {};
|
|
288
|
-
contents = deserializeAws_json1_0CreateDatabaseResponse(data, context);
|
|
289
|
-
const response: CreateDatabaseCommandOutput = {
|
|
290
|
-
$metadata: deserializeMetadata(output),
|
|
291
|
-
...contents,
|
|
292
|
-
};
|
|
293
|
-
return Promise.resolve(response);
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
const deserializeAws_json1_0CreateDatabaseCommandError = async (
|
|
297
|
-
output: __HttpResponse,
|
|
298
|
-
context: __SerdeContext
|
|
299
|
-
): Promise<CreateDatabaseCommandOutput> => {
|
|
300
|
-
const parsedOutput: any = {
|
|
301
|
-
...output,
|
|
302
|
-
body: await parseBody(output.body, context),
|
|
303
|
-
};
|
|
304
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
305
|
-
let errorCode = "UnknownError";
|
|
306
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
307
|
-
switch (errorCode) {
|
|
308
|
-
case "AccessDeniedException":
|
|
309
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
310
|
-
response = {
|
|
311
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
312
|
-
name: errorCode,
|
|
313
|
-
$metadata: deserializeMetadata(output),
|
|
314
|
-
};
|
|
315
|
-
break;
|
|
316
|
-
case "ConflictException":
|
|
317
|
-
case "com.amazonaws.timestreamwrite#ConflictException":
|
|
318
|
-
response = {
|
|
319
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
320
|
-
name: errorCode,
|
|
321
|
-
$metadata: deserializeMetadata(output),
|
|
322
|
-
};
|
|
323
|
-
break;
|
|
324
|
-
case "InternalServerException":
|
|
325
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
326
|
-
response = {
|
|
327
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
328
|
-
name: errorCode,
|
|
329
|
-
$metadata: deserializeMetadata(output),
|
|
330
|
-
};
|
|
331
|
-
break;
|
|
332
|
-
case "InvalidEndpointException":
|
|
333
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
334
|
-
response = {
|
|
335
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
336
|
-
name: errorCode,
|
|
337
|
-
$metadata: deserializeMetadata(output),
|
|
338
|
-
};
|
|
339
|
-
break;
|
|
340
|
-
case "ServiceQuotaExceededException":
|
|
341
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
342
|
-
response = {
|
|
343
|
-
...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
344
|
-
name: errorCode,
|
|
345
|
-
$metadata: deserializeMetadata(output),
|
|
346
|
-
};
|
|
347
|
-
break;
|
|
348
|
-
case "ThrottlingException":
|
|
349
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
350
|
-
response = {
|
|
351
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
352
|
-
name: errorCode,
|
|
353
|
-
$metadata: deserializeMetadata(output),
|
|
354
|
-
};
|
|
355
|
-
break;
|
|
356
|
-
case "ValidationException":
|
|
357
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
358
|
-
response = {
|
|
359
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
360
|
-
name: errorCode,
|
|
361
|
-
$metadata: deserializeMetadata(output),
|
|
362
|
-
};
|
|
363
|
-
break;
|
|
364
|
-
default:
|
|
365
|
-
const parsedBody = parsedOutput.body;
|
|
366
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
367
|
-
response = {
|
|
368
|
-
...parsedBody,
|
|
369
|
-
name: `${errorCode}`,
|
|
370
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
371
|
-
$fault: "client",
|
|
372
|
-
$metadata: deserializeMetadata(output),
|
|
373
|
-
} as any;
|
|
374
|
-
}
|
|
375
|
-
const message = response.message || response.Message || errorCode;
|
|
376
|
-
response.message = message;
|
|
377
|
-
delete response.Message;
|
|
378
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
379
|
-
};
|
|
380
|
-
|
|
381
|
-
export const deserializeAws_json1_0CreateTableCommand = async (
|
|
382
|
-
output: __HttpResponse,
|
|
383
|
-
context: __SerdeContext
|
|
384
|
-
): Promise<CreateTableCommandOutput> => {
|
|
385
|
-
if (output.statusCode >= 300) {
|
|
386
|
-
return deserializeAws_json1_0CreateTableCommandError(output, context);
|
|
387
|
-
}
|
|
388
|
-
const data: any = await parseBody(output.body, context);
|
|
389
|
-
let contents: any = {};
|
|
390
|
-
contents = deserializeAws_json1_0CreateTableResponse(data, context);
|
|
391
|
-
const response: CreateTableCommandOutput = {
|
|
392
|
-
$metadata: deserializeMetadata(output),
|
|
393
|
-
...contents,
|
|
394
|
-
};
|
|
395
|
-
return Promise.resolve(response);
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
const deserializeAws_json1_0CreateTableCommandError = async (
|
|
399
|
-
output: __HttpResponse,
|
|
400
|
-
context: __SerdeContext
|
|
401
|
-
): Promise<CreateTableCommandOutput> => {
|
|
402
|
-
const parsedOutput: any = {
|
|
403
|
-
...output,
|
|
404
|
-
body: await parseBody(output.body, context),
|
|
405
|
-
};
|
|
406
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
407
|
-
let errorCode = "UnknownError";
|
|
408
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
409
|
-
switch (errorCode) {
|
|
410
|
-
case "AccessDeniedException":
|
|
411
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
412
|
-
response = {
|
|
413
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
414
|
-
name: errorCode,
|
|
415
|
-
$metadata: deserializeMetadata(output),
|
|
416
|
-
};
|
|
417
|
-
break;
|
|
418
|
-
case "ConflictException":
|
|
419
|
-
case "com.amazonaws.timestreamwrite#ConflictException":
|
|
420
|
-
response = {
|
|
421
|
-
...(await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)),
|
|
422
|
-
name: errorCode,
|
|
423
|
-
$metadata: deserializeMetadata(output),
|
|
424
|
-
};
|
|
425
|
-
break;
|
|
426
|
-
case "InternalServerException":
|
|
427
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
428
|
-
response = {
|
|
429
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
430
|
-
name: errorCode,
|
|
431
|
-
$metadata: deserializeMetadata(output),
|
|
432
|
-
};
|
|
433
|
-
break;
|
|
434
|
-
case "InvalidEndpointException":
|
|
435
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
436
|
-
response = {
|
|
437
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
438
|
-
name: errorCode,
|
|
439
|
-
$metadata: deserializeMetadata(output),
|
|
440
|
-
};
|
|
441
|
-
break;
|
|
442
|
-
case "ResourceNotFoundException":
|
|
443
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
444
|
-
response = {
|
|
445
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
446
|
-
name: errorCode,
|
|
447
|
-
$metadata: deserializeMetadata(output),
|
|
448
|
-
};
|
|
449
|
-
break;
|
|
450
|
-
case "ServiceQuotaExceededException":
|
|
451
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
452
|
-
response = {
|
|
453
|
-
...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
454
|
-
name: errorCode,
|
|
455
|
-
$metadata: deserializeMetadata(output),
|
|
456
|
-
};
|
|
457
|
-
break;
|
|
458
|
-
case "ThrottlingException":
|
|
459
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
460
|
-
response = {
|
|
461
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
462
|
-
name: errorCode,
|
|
463
|
-
$metadata: deserializeMetadata(output),
|
|
464
|
-
};
|
|
465
|
-
break;
|
|
466
|
-
case "ValidationException":
|
|
467
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
468
|
-
response = {
|
|
469
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
470
|
-
name: errorCode,
|
|
471
|
-
$metadata: deserializeMetadata(output),
|
|
472
|
-
};
|
|
473
|
-
break;
|
|
474
|
-
default:
|
|
475
|
-
const parsedBody = parsedOutput.body;
|
|
476
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
477
|
-
response = {
|
|
478
|
-
...parsedBody,
|
|
479
|
-
name: `${errorCode}`,
|
|
480
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
481
|
-
$fault: "client",
|
|
482
|
-
$metadata: deserializeMetadata(output),
|
|
483
|
-
} as any;
|
|
484
|
-
}
|
|
485
|
-
const message = response.message || response.Message || errorCode;
|
|
486
|
-
response.message = message;
|
|
487
|
-
delete response.Message;
|
|
488
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
489
|
-
};
|
|
490
|
-
|
|
491
|
-
export const deserializeAws_json1_0DeleteDatabaseCommand = async (
|
|
492
|
-
output: __HttpResponse,
|
|
493
|
-
context: __SerdeContext
|
|
494
|
-
): Promise<DeleteDatabaseCommandOutput> => {
|
|
495
|
-
if (output.statusCode >= 300) {
|
|
496
|
-
return deserializeAws_json1_0DeleteDatabaseCommandError(output, context);
|
|
497
|
-
}
|
|
498
|
-
await collectBody(output.body, context);
|
|
499
|
-
const response: DeleteDatabaseCommandOutput = {
|
|
500
|
-
$metadata: deserializeMetadata(output),
|
|
501
|
-
};
|
|
502
|
-
return Promise.resolve(response);
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
const deserializeAws_json1_0DeleteDatabaseCommandError = async (
|
|
506
|
-
output: __HttpResponse,
|
|
507
|
-
context: __SerdeContext
|
|
508
|
-
): Promise<DeleteDatabaseCommandOutput> => {
|
|
509
|
-
const parsedOutput: any = {
|
|
510
|
-
...output,
|
|
511
|
-
body: await parseBody(output.body, context),
|
|
512
|
-
};
|
|
513
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
514
|
-
let errorCode = "UnknownError";
|
|
515
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
516
|
-
switch (errorCode) {
|
|
517
|
-
case "AccessDeniedException":
|
|
518
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
519
|
-
response = {
|
|
520
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
521
|
-
name: errorCode,
|
|
522
|
-
$metadata: deserializeMetadata(output),
|
|
523
|
-
};
|
|
524
|
-
break;
|
|
525
|
-
case "InternalServerException":
|
|
526
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
527
|
-
response = {
|
|
528
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
529
|
-
name: errorCode,
|
|
530
|
-
$metadata: deserializeMetadata(output),
|
|
531
|
-
};
|
|
532
|
-
break;
|
|
533
|
-
case "InvalidEndpointException":
|
|
534
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
535
|
-
response = {
|
|
536
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
537
|
-
name: errorCode,
|
|
538
|
-
$metadata: deserializeMetadata(output),
|
|
539
|
-
};
|
|
540
|
-
break;
|
|
541
|
-
case "ResourceNotFoundException":
|
|
542
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
543
|
-
response = {
|
|
544
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
545
|
-
name: errorCode,
|
|
546
|
-
$metadata: deserializeMetadata(output),
|
|
547
|
-
};
|
|
548
|
-
break;
|
|
549
|
-
case "ThrottlingException":
|
|
550
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
551
|
-
response = {
|
|
552
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
553
|
-
name: errorCode,
|
|
554
|
-
$metadata: deserializeMetadata(output),
|
|
555
|
-
};
|
|
556
|
-
break;
|
|
557
|
-
case "ValidationException":
|
|
558
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
559
|
-
response = {
|
|
560
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
561
|
-
name: errorCode,
|
|
562
|
-
$metadata: deserializeMetadata(output),
|
|
563
|
-
};
|
|
564
|
-
break;
|
|
565
|
-
default:
|
|
566
|
-
const parsedBody = parsedOutput.body;
|
|
567
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
568
|
-
response = {
|
|
569
|
-
...parsedBody,
|
|
570
|
-
name: `${errorCode}`,
|
|
571
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
572
|
-
$fault: "client",
|
|
573
|
-
$metadata: deserializeMetadata(output),
|
|
574
|
-
} as any;
|
|
575
|
-
}
|
|
576
|
-
const message = response.message || response.Message || errorCode;
|
|
577
|
-
response.message = message;
|
|
578
|
-
delete response.Message;
|
|
579
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
580
|
-
};
|
|
581
|
-
|
|
582
|
-
export const deserializeAws_json1_0DeleteTableCommand = async (
|
|
583
|
-
output: __HttpResponse,
|
|
584
|
-
context: __SerdeContext
|
|
585
|
-
): Promise<DeleteTableCommandOutput> => {
|
|
586
|
-
if (output.statusCode >= 300) {
|
|
587
|
-
return deserializeAws_json1_0DeleteTableCommandError(output, context);
|
|
588
|
-
}
|
|
589
|
-
await collectBody(output.body, context);
|
|
590
|
-
const response: DeleteTableCommandOutput = {
|
|
591
|
-
$metadata: deserializeMetadata(output),
|
|
592
|
-
};
|
|
593
|
-
return Promise.resolve(response);
|
|
594
|
-
};
|
|
595
|
-
|
|
596
|
-
const deserializeAws_json1_0DeleteTableCommandError = async (
|
|
597
|
-
output: __HttpResponse,
|
|
598
|
-
context: __SerdeContext
|
|
599
|
-
): Promise<DeleteTableCommandOutput> => {
|
|
600
|
-
const parsedOutput: any = {
|
|
601
|
-
...output,
|
|
602
|
-
body: await parseBody(output.body, context),
|
|
603
|
-
};
|
|
604
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
605
|
-
let errorCode = "UnknownError";
|
|
606
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
607
|
-
switch (errorCode) {
|
|
608
|
-
case "AccessDeniedException":
|
|
609
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
610
|
-
response = {
|
|
611
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
612
|
-
name: errorCode,
|
|
613
|
-
$metadata: deserializeMetadata(output),
|
|
614
|
-
};
|
|
615
|
-
break;
|
|
616
|
-
case "InternalServerException":
|
|
617
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
618
|
-
response = {
|
|
619
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
620
|
-
name: errorCode,
|
|
621
|
-
$metadata: deserializeMetadata(output),
|
|
622
|
-
};
|
|
623
|
-
break;
|
|
624
|
-
case "InvalidEndpointException":
|
|
625
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
626
|
-
response = {
|
|
627
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
628
|
-
name: errorCode,
|
|
629
|
-
$metadata: deserializeMetadata(output),
|
|
630
|
-
};
|
|
631
|
-
break;
|
|
632
|
-
case "ResourceNotFoundException":
|
|
633
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
634
|
-
response = {
|
|
635
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
636
|
-
name: errorCode,
|
|
637
|
-
$metadata: deserializeMetadata(output),
|
|
638
|
-
};
|
|
639
|
-
break;
|
|
640
|
-
case "ThrottlingException":
|
|
641
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
642
|
-
response = {
|
|
643
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
644
|
-
name: errorCode,
|
|
645
|
-
$metadata: deserializeMetadata(output),
|
|
646
|
-
};
|
|
647
|
-
break;
|
|
648
|
-
case "ValidationException":
|
|
649
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
650
|
-
response = {
|
|
651
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
652
|
-
name: errorCode,
|
|
653
|
-
$metadata: deserializeMetadata(output),
|
|
654
|
-
};
|
|
655
|
-
break;
|
|
656
|
-
default:
|
|
657
|
-
const parsedBody = parsedOutput.body;
|
|
658
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
659
|
-
response = {
|
|
660
|
-
...parsedBody,
|
|
661
|
-
name: `${errorCode}`,
|
|
662
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
663
|
-
$fault: "client",
|
|
664
|
-
$metadata: deserializeMetadata(output),
|
|
665
|
-
} as any;
|
|
666
|
-
}
|
|
667
|
-
const message = response.message || response.Message || errorCode;
|
|
668
|
-
response.message = message;
|
|
669
|
-
delete response.Message;
|
|
670
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
671
|
-
};
|
|
672
|
-
|
|
673
|
-
export const deserializeAws_json1_0DescribeDatabaseCommand = async (
|
|
674
|
-
output: __HttpResponse,
|
|
675
|
-
context: __SerdeContext
|
|
676
|
-
): Promise<DescribeDatabaseCommandOutput> => {
|
|
677
|
-
if (output.statusCode >= 300) {
|
|
678
|
-
return deserializeAws_json1_0DescribeDatabaseCommandError(output, context);
|
|
679
|
-
}
|
|
680
|
-
const data: any = await parseBody(output.body, context);
|
|
681
|
-
let contents: any = {};
|
|
682
|
-
contents = deserializeAws_json1_0DescribeDatabaseResponse(data, context);
|
|
683
|
-
const response: DescribeDatabaseCommandOutput = {
|
|
684
|
-
$metadata: deserializeMetadata(output),
|
|
685
|
-
...contents,
|
|
686
|
-
};
|
|
687
|
-
return Promise.resolve(response);
|
|
688
|
-
};
|
|
689
|
-
|
|
690
|
-
const deserializeAws_json1_0DescribeDatabaseCommandError = async (
|
|
691
|
-
output: __HttpResponse,
|
|
692
|
-
context: __SerdeContext
|
|
693
|
-
): Promise<DescribeDatabaseCommandOutput> => {
|
|
694
|
-
const parsedOutput: any = {
|
|
695
|
-
...output,
|
|
696
|
-
body: await parseBody(output.body, context),
|
|
697
|
-
};
|
|
698
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
699
|
-
let errorCode = "UnknownError";
|
|
700
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
701
|
-
switch (errorCode) {
|
|
702
|
-
case "AccessDeniedException":
|
|
703
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
704
|
-
response = {
|
|
705
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
706
|
-
name: errorCode,
|
|
707
|
-
$metadata: deserializeMetadata(output),
|
|
708
|
-
};
|
|
709
|
-
break;
|
|
710
|
-
case "InternalServerException":
|
|
711
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
712
|
-
response = {
|
|
713
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
714
|
-
name: errorCode,
|
|
715
|
-
$metadata: deserializeMetadata(output),
|
|
716
|
-
};
|
|
717
|
-
break;
|
|
718
|
-
case "InvalidEndpointException":
|
|
719
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
720
|
-
response = {
|
|
721
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
722
|
-
name: errorCode,
|
|
723
|
-
$metadata: deserializeMetadata(output),
|
|
724
|
-
};
|
|
725
|
-
break;
|
|
726
|
-
case "ResourceNotFoundException":
|
|
727
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
728
|
-
response = {
|
|
729
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
730
|
-
name: errorCode,
|
|
731
|
-
$metadata: deserializeMetadata(output),
|
|
732
|
-
};
|
|
733
|
-
break;
|
|
734
|
-
case "ThrottlingException":
|
|
735
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
736
|
-
response = {
|
|
737
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
738
|
-
name: errorCode,
|
|
739
|
-
$metadata: deserializeMetadata(output),
|
|
740
|
-
};
|
|
741
|
-
break;
|
|
742
|
-
case "ValidationException":
|
|
743
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
744
|
-
response = {
|
|
745
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
746
|
-
name: errorCode,
|
|
747
|
-
$metadata: deserializeMetadata(output),
|
|
748
|
-
};
|
|
749
|
-
break;
|
|
750
|
-
default:
|
|
751
|
-
const parsedBody = parsedOutput.body;
|
|
752
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
753
|
-
response = {
|
|
754
|
-
...parsedBody,
|
|
755
|
-
name: `${errorCode}`,
|
|
756
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
757
|
-
$fault: "client",
|
|
758
|
-
$metadata: deserializeMetadata(output),
|
|
759
|
-
} as any;
|
|
760
|
-
}
|
|
761
|
-
const message = response.message || response.Message || errorCode;
|
|
762
|
-
response.message = message;
|
|
763
|
-
delete response.Message;
|
|
764
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
export const deserializeAws_json1_0DescribeEndpointsCommand = async (
|
|
768
|
-
output: __HttpResponse,
|
|
769
|
-
context: __SerdeContext
|
|
770
|
-
): Promise<DescribeEndpointsCommandOutput> => {
|
|
771
|
-
if (output.statusCode >= 300) {
|
|
772
|
-
return deserializeAws_json1_0DescribeEndpointsCommandError(output, context);
|
|
773
|
-
}
|
|
774
|
-
const data: any = await parseBody(output.body, context);
|
|
775
|
-
let contents: any = {};
|
|
776
|
-
contents = deserializeAws_json1_0DescribeEndpointsResponse(data, context);
|
|
777
|
-
const response: DescribeEndpointsCommandOutput = {
|
|
778
|
-
$metadata: deserializeMetadata(output),
|
|
779
|
-
...contents,
|
|
780
|
-
};
|
|
781
|
-
return Promise.resolve(response);
|
|
782
|
-
};
|
|
783
|
-
|
|
784
|
-
const deserializeAws_json1_0DescribeEndpointsCommandError = async (
|
|
785
|
-
output: __HttpResponse,
|
|
786
|
-
context: __SerdeContext
|
|
787
|
-
): Promise<DescribeEndpointsCommandOutput> => {
|
|
788
|
-
const parsedOutput: any = {
|
|
789
|
-
...output,
|
|
790
|
-
body: await parseBody(output.body, context),
|
|
791
|
-
};
|
|
792
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
793
|
-
let errorCode = "UnknownError";
|
|
794
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
795
|
-
switch (errorCode) {
|
|
796
|
-
case "InternalServerException":
|
|
797
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
798
|
-
response = {
|
|
799
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
800
|
-
name: errorCode,
|
|
801
|
-
$metadata: deserializeMetadata(output),
|
|
802
|
-
};
|
|
803
|
-
break;
|
|
804
|
-
case "ThrottlingException":
|
|
805
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
806
|
-
response = {
|
|
807
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
808
|
-
name: errorCode,
|
|
809
|
-
$metadata: deserializeMetadata(output),
|
|
810
|
-
};
|
|
811
|
-
break;
|
|
812
|
-
case "ValidationException":
|
|
813
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
814
|
-
response = {
|
|
815
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
816
|
-
name: errorCode,
|
|
817
|
-
$metadata: deserializeMetadata(output),
|
|
818
|
-
};
|
|
819
|
-
break;
|
|
820
|
-
default:
|
|
821
|
-
const parsedBody = parsedOutput.body;
|
|
822
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
823
|
-
response = {
|
|
824
|
-
...parsedBody,
|
|
825
|
-
name: `${errorCode}`,
|
|
826
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
827
|
-
$fault: "client",
|
|
828
|
-
$metadata: deserializeMetadata(output),
|
|
829
|
-
} as any;
|
|
830
|
-
}
|
|
831
|
-
const message = response.message || response.Message || errorCode;
|
|
832
|
-
response.message = message;
|
|
833
|
-
delete response.Message;
|
|
834
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
835
|
-
};
|
|
836
|
-
|
|
837
|
-
export const deserializeAws_json1_0DescribeTableCommand = async (
|
|
838
|
-
output: __HttpResponse,
|
|
839
|
-
context: __SerdeContext
|
|
840
|
-
): Promise<DescribeTableCommandOutput> => {
|
|
841
|
-
if (output.statusCode >= 300) {
|
|
842
|
-
return deserializeAws_json1_0DescribeTableCommandError(output, context);
|
|
843
|
-
}
|
|
844
|
-
const data: any = await parseBody(output.body, context);
|
|
845
|
-
let contents: any = {};
|
|
846
|
-
contents = deserializeAws_json1_0DescribeTableResponse(data, context);
|
|
847
|
-
const response: DescribeTableCommandOutput = {
|
|
848
|
-
$metadata: deserializeMetadata(output),
|
|
849
|
-
...contents,
|
|
850
|
-
};
|
|
851
|
-
return Promise.resolve(response);
|
|
852
|
-
};
|
|
853
|
-
|
|
854
|
-
const deserializeAws_json1_0DescribeTableCommandError = async (
|
|
855
|
-
output: __HttpResponse,
|
|
856
|
-
context: __SerdeContext
|
|
857
|
-
): Promise<DescribeTableCommandOutput> => {
|
|
858
|
-
const parsedOutput: any = {
|
|
859
|
-
...output,
|
|
860
|
-
body: await parseBody(output.body, context),
|
|
861
|
-
};
|
|
862
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
863
|
-
let errorCode = "UnknownError";
|
|
864
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
865
|
-
switch (errorCode) {
|
|
866
|
-
case "AccessDeniedException":
|
|
867
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
868
|
-
response = {
|
|
869
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
870
|
-
name: errorCode,
|
|
871
|
-
$metadata: deserializeMetadata(output),
|
|
872
|
-
};
|
|
873
|
-
break;
|
|
874
|
-
case "InternalServerException":
|
|
875
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
876
|
-
response = {
|
|
877
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
878
|
-
name: errorCode,
|
|
879
|
-
$metadata: deserializeMetadata(output),
|
|
880
|
-
};
|
|
881
|
-
break;
|
|
882
|
-
case "InvalidEndpointException":
|
|
883
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
884
|
-
response = {
|
|
885
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
886
|
-
name: errorCode,
|
|
887
|
-
$metadata: deserializeMetadata(output),
|
|
888
|
-
};
|
|
889
|
-
break;
|
|
890
|
-
case "ResourceNotFoundException":
|
|
891
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
892
|
-
response = {
|
|
893
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
894
|
-
name: errorCode,
|
|
895
|
-
$metadata: deserializeMetadata(output),
|
|
896
|
-
};
|
|
897
|
-
break;
|
|
898
|
-
case "ThrottlingException":
|
|
899
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
900
|
-
response = {
|
|
901
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
902
|
-
name: errorCode,
|
|
903
|
-
$metadata: deserializeMetadata(output),
|
|
904
|
-
};
|
|
905
|
-
break;
|
|
906
|
-
case "ValidationException":
|
|
907
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
908
|
-
response = {
|
|
909
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
910
|
-
name: errorCode,
|
|
911
|
-
$metadata: deserializeMetadata(output),
|
|
912
|
-
};
|
|
913
|
-
break;
|
|
914
|
-
default:
|
|
915
|
-
const parsedBody = parsedOutput.body;
|
|
916
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
917
|
-
response = {
|
|
918
|
-
...parsedBody,
|
|
919
|
-
name: `${errorCode}`,
|
|
920
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
921
|
-
$fault: "client",
|
|
922
|
-
$metadata: deserializeMetadata(output),
|
|
923
|
-
} as any;
|
|
924
|
-
}
|
|
925
|
-
const message = response.message || response.Message || errorCode;
|
|
926
|
-
response.message = message;
|
|
927
|
-
delete response.Message;
|
|
928
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
929
|
-
};
|
|
930
|
-
|
|
931
|
-
export const deserializeAws_json1_0ListDatabasesCommand = async (
|
|
932
|
-
output: __HttpResponse,
|
|
933
|
-
context: __SerdeContext
|
|
934
|
-
): Promise<ListDatabasesCommandOutput> => {
|
|
935
|
-
if (output.statusCode >= 300) {
|
|
936
|
-
return deserializeAws_json1_0ListDatabasesCommandError(output, context);
|
|
937
|
-
}
|
|
938
|
-
const data: any = await parseBody(output.body, context);
|
|
939
|
-
let contents: any = {};
|
|
940
|
-
contents = deserializeAws_json1_0ListDatabasesResponse(data, context);
|
|
941
|
-
const response: ListDatabasesCommandOutput = {
|
|
942
|
-
$metadata: deserializeMetadata(output),
|
|
943
|
-
...contents,
|
|
944
|
-
};
|
|
945
|
-
return Promise.resolve(response);
|
|
946
|
-
};
|
|
947
|
-
|
|
948
|
-
const deserializeAws_json1_0ListDatabasesCommandError = async (
|
|
949
|
-
output: __HttpResponse,
|
|
950
|
-
context: __SerdeContext
|
|
951
|
-
): Promise<ListDatabasesCommandOutput> => {
|
|
952
|
-
const parsedOutput: any = {
|
|
953
|
-
...output,
|
|
954
|
-
body: await parseBody(output.body, context),
|
|
955
|
-
};
|
|
956
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
957
|
-
let errorCode = "UnknownError";
|
|
958
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
959
|
-
switch (errorCode) {
|
|
960
|
-
case "AccessDeniedException":
|
|
961
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
962
|
-
response = {
|
|
963
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
964
|
-
name: errorCode,
|
|
965
|
-
$metadata: deserializeMetadata(output),
|
|
966
|
-
};
|
|
967
|
-
break;
|
|
968
|
-
case "InternalServerException":
|
|
969
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
970
|
-
response = {
|
|
971
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
972
|
-
name: errorCode,
|
|
973
|
-
$metadata: deserializeMetadata(output),
|
|
974
|
-
};
|
|
975
|
-
break;
|
|
976
|
-
case "InvalidEndpointException":
|
|
977
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
978
|
-
response = {
|
|
979
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
980
|
-
name: errorCode,
|
|
981
|
-
$metadata: deserializeMetadata(output),
|
|
982
|
-
};
|
|
983
|
-
break;
|
|
984
|
-
case "ThrottlingException":
|
|
985
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
986
|
-
response = {
|
|
987
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
988
|
-
name: errorCode,
|
|
989
|
-
$metadata: deserializeMetadata(output),
|
|
990
|
-
};
|
|
991
|
-
break;
|
|
992
|
-
case "ValidationException":
|
|
993
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
994
|
-
response = {
|
|
995
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
996
|
-
name: errorCode,
|
|
997
|
-
$metadata: deserializeMetadata(output),
|
|
998
|
-
};
|
|
999
|
-
break;
|
|
1000
|
-
default:
|
|
1001
|
-
const parsedBody = parsedOutput.body;
|
|
1002
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1003
|
-
response = {
|
|
1004
|
-
...parsedBody,
|
|
1005
|
-
name: `${errorCode}`,
|
|
1006
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1007
|
-
$fault: "client",
|
|
1008
|
-
$metadata: deserializeMetadata(output),
|
|
1009
|
-
} as any;
|
|
1010
|
-
}
|
|
1011
|
-
const message = response.message || response.Message || errorCode;
|
|
1012
|
-
response.message = message;
|
|
1013
|
-
delete response.Message;
|
|
1014
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1015
|
-
};
|
|
1016
|
-
|
|
1017
|
-
export const deserializeAws_json1_0ListTablesCommand = async (
|
|
1018
|
-
output: __HttpResponse,
|
|
1019
|
-
context: __SerdeContext
|
|
1020
|
-
): Promise<ListTablesCommandOutput> => {
|
|
1021
|
-
if (output.statusCode >= 300) {
|
|
1022
|
-
return deserializeAws_json1_0ListTablesCommandError(output, context);
|
|
1023
|
-
}
|
|
1024
|
-
const data: any = await parseBody(output.body, context);
|
|
1025
|
-
let contents: any = {};
|
|
1026
|
-
contents = deserializeAws_json1_0ListTablesResponse(data, context);
|
|
1027
|
-
const response: ListTablesCommandOutput = {
|
|
1028
|
-
$metadata: deserializeMetadata(output),
|
|
1029
|
-
...contents,
|
|
1030
|
-
};
|
|
1031
|
-
return Promise.resolve(response);
|
|
1032
|
-
};
|
|
1033
|
-
|
|
1034
|
-
const deserializeAws_json1_0ListTablesCommandError = async (
|
|
1035
|
-
output: __HttpResponse,
|
|
1036
|
-
context: __SerdeContext
|
|
1037
|
-
): Promise<ListTablesCommandOutput> => {
|
|
1038
|
-
const parsedOutput: any = {
|
|
1039
|
-
...output,
|
|
1040
|
-
body: await parseBody(output.body, context),
|
|
1041
|
-
};
|
|
1042
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1043
|
-
let errorCode = "UnknownError";
|
|
1044
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1045
|
-
switch (errorCode) {
|
|
1046
|
-
case "AccessDeniedException":
|
|
1047
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
1048
|
-
response = {
|
|
1049
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1050
|
-
name: errorCode,
|
|
1051
|
-
$metadata: deserializeMetadata(output),
|
|
1052
|
-
};
|
|
1053
|
-
break;
|
|
1054
|
-
case "InternalServerException":
|
|
1055
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
1056
|
-
response = {
|
|
1057
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1058
|
-
name: errorCode,
|
|
1059
|
-
$metadata: deserializeMetadata(output),
|
|
1060
|
-
};
|
|
1061
|
-
break;
|
|
1062
|
-
case "InvalidEndpointException":
|
|
1063
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
1064
|
-
response = {
|
|
1065
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
1066
|
-
name: errorCode,
|
|
1067
|
-
$metadata: deserializeMetadata(output),
|
|
1068
|
-
};
|
|
1069
|
-
break;
|
|
1070
|
-
case "ResourceNotFoundException":
|
|
1071
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
1072
|
-
response = {
|
|
1073
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1074
|
-
name: errorCode,
|
|
1075
|
-
$metadata: deserializeMetadata(output),
|
|
1076
|
-
};
|
|
1077
|
-
break;
|
|
1078
|
-
case "ThrottlingException":
|
|
1079
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
1080
|
-
response = {
|
|
1081
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1082
|
-
name: errorCode,
|
|
1083
|
-
$metadata: deserializeMetadata(output),
|
|
1084
|
-
};
|
|
1085
|
-
break;
|
|
1086
|
-
case "ValidationException":
|
|
1087
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
1088
|
-
response = {
|
|
1089
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1090
|
-
name: errorCode,
|
|
1091
|
-
$metadata: deserializeMetadata(output),
|
|
1092
|
-
};
|
|
1093
|
-
break;
|
|
1094
|
-
default:
|
|
1095
|
-
const parsedBody = parsedOutput.body;
|
|
1096
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1097
|
-
response = {
|
|
1098
|
-
...parsedBody,
|
|
1099
|
-
name: `${errorCode}`,
|
|
1100
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1101
|
-
$fault: "client",
|
|
1102
|
-
$metadata: deserializeMetadata(output),
|
|
1103
|
-
} as any;
|
|
1104
|
-
}
|
|
1105
|
-
const message = response.message || response.Message || errorCode;
|
|
1106
|
-
response.message = message;
|
|
1107
|
-
delete response.Message;
|
|
1108
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1109
|
-
};
|
|
1110
|
-
|
|
1111
|
-
export const deserializeAws_json1_0ListTagsForResourceCommand = async (
|
|
1112
|
-
output: __HttpResponse,
|
|
1113
|
-
context: __SerdeContext
|
|
1114
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
1115
|
-
if (output.statusCode >= 300) {
|
|
1116
|
-
return deserializeAws_json1_0ListTagsForResourceCommandError(output, context);
|
|
1117
|
-
}
|
|
1118
|
-
const data: any = await parseBody(output.body, context);
|
|
1119
|
-
let contents: any = {};
|
|
1120
|
-
contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context);
|
|
1121
|
-
const response: ListTagsForResourceCommandOutput = {
|
|
1122
|
-
$metadata: deserializeMetadata(output),
|
|
1123
|
-
...contents,
|
|
1124
|
-
};
|
|
1125
|
-
return Promise.resolve(response);
|
|
1126
|
-
};
|
|
1127
|
-
|
|
1128
|
-
const deserializeAws_json1_0ListTagsForResourceCommandError = async (
|
|
1129
|
-
output: __HttpResponse,
|
|
1130
|
-
context: __SerdeContext
|
|
1131
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
1132
|
-
const parsedOutput: any = {
|
|
1133
|
-
...output,
|
|
1134
|
-
body: await parseBody(output.body, context),
|
|
1135
|
-
};
|
|
1136
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1137
|
-
let errorCode = "UnknownError";
|
|
1138
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1139
|
-
switch (errorCode) {
|
|
1140
|
-
case "InvalidEndpointException":
|
|
1141
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
1142
|
-
response = {
|
|
1143
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
1144
|
-
name: errorCode,
|
|
1145
|
-
$metadata: deserializeMetadata(output),
|
|
1146
|
-
};
|
|
1147
|
-
break;
|
|
1148
|
-
case "ResourceNotFoundException":
|
|
1149
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
1150
|
-
response = {
|
|
1151
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1152
|
-
name: errorCode,
|
|
1153
|
-
$metadata: deserializeMetadata(output),
|
|
1154
|
-
};
|
|
1155
|
-
break;
|
|
1156
|
-
case "ThrottlingException":
|
|
1157
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
1158
|
-
response = {
|
|
1159
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1160
|
-
name: errorCode,
|
|
1161
|
-
$metadata: deserializeMetadata(output),
|
|
1162
|
-
};
|
|
1163
|
-
break;
|
|
1164
|
-
case "ValidationException":
|
|
1165
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
1166
|
-
response = {
|
|
1167
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1168
|
-
name: errorCode,
|
|
1169
|
-
$metadata: deserializeMetadata(output),
|
|
1170
|
-
};
|
|
1171
|
-
break;
|
|
1172
|
-
default:
|
|
1173
|
-
const parsedBody = parsedOutput.body;
|
|
1174
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1175
|
-
response = {
|
|
1176
|
-
...parsedBody,
|
|
1177
|
-
name: `${errorCode}`,
|
|
1178
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1179
|
-
$fault: "client",
|
|
1180
|
-
$metadata: deserializeMetadata(output),
|
|
1181
|
-
} as any;
|
|
1182
|
-
}
|
|
1183
|
-
const message = response.message || response.Message || errorCode;
|
|
1184
|
-
response.message = message;
|
|
1185
|
-
delete response.Message;
|
|
1186
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1187
|
-
};
|
|
1188
|
-
|
|
1189
|
-
export const deserializeAws_json1_0TagResourceCommand = async (
|
|
1190
|
-
output: __HttpResponse,
|
|
1191
|
-
context: __SerdeContext
|
|
1192
|
-
): Promise<TagResourceCommandOutput> => {
|
|
1193
|
-
if (output.statusCode >= 300) {
|
|
1194
|
-
return deserializeAws_json1_0TagResourceCommandError(output, context);
|
|
1195
|
-
}
|
|
1196
|
-
const data: any = await parseBody(output.body, context);
|
|
1197
|
-
let contents: any = {};
|
|
1198
|
-
contents = deserializeAws_json1_0TagResourceResponse(data, context);
|
|
1199
|
-
const response: TagResourceCommandOutput = {
|
|
1200
|
-
$metadata: deserializeMetadata(output),
|
|
1201
|
-
...contents,
|
|
1202
|
-
};
|
|
1203
|
-
return Promise.resolve(response);
|
|
1204
|
-
};
|
|
1205
|
-
|
|
1206
|
-
const deserializeAws_json1_0TagResourceCommandError = async (
|
|
1207
|
-
output: __HttpResponse,
|
|
1208
|
-
context: __SerdeContext
|
|
1209
|
-
): Promise<TagResourceCommandOutput> => {
|
|
1210
|
-
const parsedOutput: any = {
|
|
1211
|
-
...output,
|
|
1212
|
-
body: await parseBody(output.body, context),
|
|
1213
|
-
};
|
|
1214
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1215
|
-
let errorCode = "UnknownError";
|
|
1216
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1217
|
-
switch (errorCode) {
|
|
1218
|
-
case "InvalidEndpointException":
|
|
1219
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
1220
|
-
response = {
|
|
1221
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
1222
|
-
name: errorCode,
|
|
1223
|
-
$metadata: deserializeMetadata(output),
|
|
1224
|
-
};
|
|
1225
|
-
break;
|
|
1226
|
-
case "ResourceNotFoundException":
|
|
1227
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
1228
|
-
response = {
|
|
1229
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1230
|
-
name: errorCode,
|
|
1231
|
-
$metadata: deserializeMetadata(output),
|
|
1232
|
-
};
|
|
1233
|
-
break;
|
|
1234
|
-
case "ServiceQuotaExceededException":
|
|
1235
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
1236
|
-
response = {
|
|
1237
|
-
...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1238
|
-
name: errorCode,
|
|
1239
|
-
$metadata: deserializeMetadata(output),
|
|
1240
|
-
};
|
|
1241
|
-
break;
|
|
1242
|
-
case "ThrottlingException":
|
|
1243
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
1244
|
-
response = {
|
|
1245
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1246
|
-
name: errorCode,
|
|
1247
|
-
$metadata: deserializeMetadata(output),
|
|
1248
|
-
};
|
|
1249
|
-
break;
|
|
1250
|
-
case "ValidationException":
|
|
1251
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
1252
|
-
response = {
|
|
1253
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1254
|
-
name: errorCode,
|
|
1255
|
-
$metadata: deserializeMetadata(output),
|
|
1256
|
-
};
|
|
1257
|
-
break;
|
|
1258
|
-
default:
|
|
1259
|
-
const parsedBody = parsedOutput.body;
|
|
1260
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1261
|
-
response = {
|
|
1262
|
-
...parsedBody,
|
|
1263
|
-
name: `${errorCode}`,
|
|
1264
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1265
|
-
$fault: "client",
|
|
1266
|
-
$metadata: deserializeMetadata(output),
|
|
1267
|
-
} as any;
|
|
1268
|
-
}
|
|
1269
|
-
const message = response.message || response.Message || errorCode;
|
|
1270
|
-
response.message = message;
|
|
1271
|
-
delete response.Message;
|
|
1272
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1273
|
-
};
|
|
1274
|
-
|
|
1275
|
-
export const deserializeAws_json1_0UntagResourceCommand = async (
|
|
1276
|
-
output: __HttpResponse,
|
|
1277
|
-
context: __SerdeContext
|
|
1278
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
1279
|
-
if (output.statusCode >= 300) {
|
|
1280
|
-
return deserializeAws_json1_0UntagResourceCommandError(output, context);
|
|
1281
|
-
}
|
|
1282
|
-
const data: any = await parseBody(output.body, context);
|
|
1283
|
-
let contents: any = {};
|
|
1284
|
-
contents = deserializeAws_json1_0UntagResourceResponse(data, context);
|
|
1285
|
-
const response: UntagResourceCommandOutput = {
|
|
1286
|
-
$metadata: deserializeMetadata(output),
|
|
1287
|
-
...contents,
|
|
1288
|
-
};
|
|
1289
|
-
return Promise.resolve(response);
|
|
1290
|
-
};
|
|
1291
|
-
|
|
1292
|
-
const deserializeAws_json1_0UntagResourceCommandError = async (
|
|
1293
|
-
output: __HttpResponse,
|
|
1294
|
-
context: __SerdeContext
|
|
1295
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
1296
|
-
const parsedOutput: any = {
|
|
1297
|
-
...output,
|
|
1298
|
-
body: await parseBody(output.body, context),
|
|
1299
|
-
};
|
|
1300
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1301
|
-
let errorCode = "UnknownError";
|
|
1302
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1303
|
-
switch (errorCode) {
|
|
1304
|
-
case "InvalidEndpointException":
|
|
1305
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
1306
|
-
response = {
|
|
1307
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
1308
|
-
name: errorCode,
|
|
1309
|
-
$metadata: deserializeMetadata(output),
|
|
1310
|
-
};
|
|
1311
|
-
break;
|
|
1312
|
-
case "ResourceNotFoundException":
|
|
1313
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
1314
|
-
response = {
|
|
1315
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1316
|
-
name: errorCode,
|
|
1317
|
-
$metadata: deserializeMetadata(output),
|
|
1318
|
-
};
|
|
1319
|
-
break;
|
|
1320
|
-
case "ServiceQuotaExceededException":
|
|
1321
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
1322
|
-
response = {
|
|
1323
|
-
...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1324
|
-
name: errorCode,
|
|
1325
|
-
$metadata: deserializeMetadata(output),
|
|
1326
|
-
};
|
|
1327
|
-
break;
|
|
1328
|
-
case "ThrottlingException":
|
|
1329
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
1330
|
-
response = {
|
|
1331
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1332
|
-
name: errorCode,
|
|
1333
|
-
$metadata: deserializeMetadata(output),
|
|
1334
|
-
};
|
|
1335
|
-
break;
|
|
1336
|
-
case "ValidationException":
|
|
1337
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
1338
|
-
response = {
|
|
1339
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1340
|
-
name: errorCode,
|
|
1341
|
-
$metadata: deserializeMetadata(output),
|
|
1342
|
-
};
|
|
1343
|
-
break;
|
|
1344
|
-
default:
|
|
1345
|
-
const parsedBody = parsedOutput.body;
|
|
1346
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1347
|
-
response = {
|
|
1348
|
-
...parsedBody,
|
|
1349
|
-
name: `${errorCode}`,
|
|
1350
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1351
|
-
$fault: "client",
|
|
1352
|
-
$metadata: deserializeMetadata(output),
|
|
1353
|
-
} as any;
|
|
1354
|
-
}
|
|
1355
|
-
const message = response.message || response.Message || errorCode;
|
|
1356
|
-
response.message = message;
|
|
1357
|
-
delete response.Message;
|
|
1358
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1359
|
-
};
|
|
1360
|
-
|
|
1361
|
-
export const deserializeAws_json1_0UpdateDatabaseCommand = async (
|
|
1362
|
-
output: __HttpResponse,
|
|
1363
|
-
context: __SerdeContext
|
|
1364
|
-
): Promise<UpdateDatabaseCommandOutput> => {
|
|
1365
|
-
if (output.statusCode >= 300) {
|
|
1366
|
-
return deserializeAws_json1_0UpdateDatabaseCommandError(output, context);
|
|
1367
|
-
}
|
|
1368
|
-
const data: any = await parseBody(output.body, context);
|
|
1369
|
-
let contents: any = {};
|
|
1370
|
-
contents = deserializeAws_json1_0UpdateDatabaseResponse(data, context);
|
|
1371
|
-
const response: UpdateDatabaseCommandOutput = {
|
|
1372
|
-
$metadata: deserializeMetadata(output),
|
|
1373
|
-
...contents,
|
|
1374
|
-
};
|
|
1375
|
-
return Promise.resolve(response);
|
|
1376
|
-
};
|
|
1377
|
-
|
|
1378
|
-
const deserializeAws_json1_0UpdateDatabaseCommandError = async (
|
|
1379
|
-
output: __HttpResponse,
|
|
1380
|
-
context: __SerdeContext
|
|
1381
|
-
): Promise<UpdateDatabaseCommandOutput> => {
|
|
1382
|
-
const parsedOutput: any = {
|
|
1383
|
-
...output,
|
|
1384
|
-
body: await parseBody(output.body, context),
|
|
1385
|
-
};
|
|
1386
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1387
|
-
let errorCode = "UnknownError";
|
|
1388
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1389
|
-
switch (errorCode) {
|
|
1390
|
-
case "AccessDeniedException":
|
|
1391
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
1392
|
-
response = {
|
|
1393
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1394
|
-
name: errorCode,
|
|
1395
|
-
$metadata: deserializeMetadata(output),
|
|
1396
|
-
};
|
|
1397
|
-
break;
|
|
1398
|
-
case "InternalServerException":
|
|
1399
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
1400
|
-
response = {
|
|
1401
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1402
|
-
name: errorCode,
|
|
1403
|
-
$metadata: deserializeMetadata(output),
|
|
1404
|
-
};
|
|
1405
|
-
break;
|
|
1406
|
-
case "InvalidEndpointException":
|
|
1407
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
1408
|
-
response = {
|
|
1409
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
1410
|
-
name: errorCode,
|
|
1411
|
-
$metadata: deserializeMetadata(output),
|
|
1412
|
-
};
|
|
1413
|
-
break;
|
|
1414
|
-
case "ResourceNotFoundException":
|
|
1415
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
1416
|
-
response = {
|
|
1417
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1418
|
-
name: errorCode,
|
|
1419
|
-
$metadata: deserializeMetadata(output),
|
|
1420
|
-
};
|
|
1421
|
-
break;
|
|
1422
|
-
case "ServiceQuotaExceededException":
|
|
1423
|
-
case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
|
|
1424
|
-
response = {
|
|
1425
|
-
...(await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1426
|
-
name: errorCode,
|
|
1427
|
-
$metadata: deserializeMetadata(output),
|
|
1428
|
-
};
|
|
1429
|
-
break;
|
|
1430
|
-
case "ThrottlingException":
|
|
1431
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
1432
|
-
response = {
|
|
1433
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1434
|
-
name: errorCode,
|
|
1435
|
-
$metadata: deserializeMetadata(output),
|
|
1436
|
-
};
|
|
1437
|
-
break;
|
|
1438
|
-
case "ValidationException":
|
|
1439
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
1440
|
-
response = {
|
|
1441
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1442
|
-
name: errorCode,
|
|
1443
|
-
$metadata: deserializeMetadata(output),
|
|
1444
|
-
};
|
|
1445
|
-
break;
|
|
1446
|
-
default:
|
|
1447
|
-
const parsedBody = parsedOutput.body;
|
|
1448
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1449
|
-
response = {
|
|
1450
|
-
...parsedBody,
|
|
1451
|
-
name: `${errorCode}`,
|
|
1452
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1453
|
-
$fault: "client",
|
|
1454
|
-
$metadata: deserializeMetadata(output),
|
|
1455
|
-
} as any;
|
|
1456
|
-
}
|
|
1457
|
-
const message = response.message || response.Message || errorCode;
|
|
1458
|
-
response.message = message;
|
|
1459
|
-
delete response.Message;
|
|
1460
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1461
|
-
};
|
|
1462
|
-
|
|
1463
|
-
export const deserializeAws_json1_0UpdateTableCommand = async (
|
|
1464
|
-
output: __HttpResponse,
|
|
1465
|
-
context: __SerdeContext
|
|
1466
|
-
): Promise<UpdateTableCommandOutput> => {
|
|
1467
|
-
if (output.statusCode >= 300) {
|
|
1468
|
-
return deserializeAws_json1_0UpdateTableCommandError(output, context);
|
|
1469
|
-
}
|
|
1470
|
-
const data: any = await parseBody(output.body, context);
|
|
1471
|
-
let contents: any = {};
|
|
1472
|
-
contents = deserializeAws_json1_0UpdateTableResponse(data, context);
|
|
1473
|
-
const response: UpdateTableCommandOutput = {
|
|
1474
|
-
$metadata: deserializeMetadata(output),
|
|
1475
|
-
...contents,
|
|
1476
|
-
};
|
|
1477
|
-
return Promise.resolve(response);
|
|
1478
|
-
};
|
|
1479
|
-
|
|
1480
|
-
const deserializeAws_json1_0UpdateTableCommandError = async (
|
|
1481
|
-
output: __HttpResponse,
|
|
1482
|
-
context: __SerdeContext
|
|
1483
|
-
): Promise<UpdateTableCommandOutput> => {
|
|
1484
|
-
const parsedOutput: any = {
|
|
1485
|
-
...output,
|
|
1486
|
-
body: await parseBody(output.body, context),
|
|
1487
|
-
};
|
|
1488
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1489
|
-
let errorCode = "UnknownError";
|
|
1490
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1491
|
-
switch (errorCode) {
|
|
1492
|
-
case "AccessDeniedException":
|
|
1493
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
1494
|
-
response = {
|
|
1495
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1496
|
-
name: errorCode,
|
|
1497
|
-
$metadata: deserializeMetadata(output),
|
|
1498
|
-
};
|
|
1499
|
-
break;
|
|
1500
|
-
case "InternalServerException":
|
|
1501
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
1502
|
-
response = {
|
|
1503
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1504
|
-
name: errorCode,
|
|
1505
|
-
$metadata: deserializeMetadata(output),
|
|
1506
|
-
};
|
|
1507
|
-
break;
|
|
1508
|
-
case "InvalidEndpointException":
|
|
1509
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
1510
|
-
response = {
|
|
1511
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
1512
|
-
name: errorCode,
|
|
1513
|
-
$metadata: deserializeMetadata(output),
|
|
1514
|
-
};
|
|
1515
|
-
break;
|
|
1516
|
-
case "ResourceNotFoundException":
|
|
1517
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
1518
|
-
response = {
|
|
1519
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1520
|
-
name: errorCode,
|
|
1521
|
-
$metadata: deserializeMetadata(output),
|
|
1522
|
-
};
|
|
1523
|
-
break;
|
|
1524
|
-
case "ThrottlingException":
|
|
1525
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
1526
|
-
response = {
|
|
1527
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1528
|
-
name: errorCode,
|
|
1529
|
-
$metadata: deserializeMetadata(output),
|
|
1530
|
-
};
|
|
1531
|
-
break;
|
|
1532
|
-
case "ValidationException":
|
|
1533
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
1534
|
-
response = {
|
|
1535
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1536
|
-
name: errorCode,
|
|
1537
|
-
$metadata: deserializeMetadata(output),
|
|
1538
|
-
};
|
|
1539
|
-
break;
|
|
1540
|
-
default:
|
|
1541
|
-
const parsedBody = parsedOutput.body;
|
|
1542
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1543
|
-
response = {
|
|
1544
|
-
...parsedBody,
|
|
1545
|
-
name: `${errorCode}`,
|
|
1546
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1547
|
-
$fault: "client",
|
|
1548
|
-
$metadata: deserializeMetadata(output),
|
|
1549
|
-
} as any;
|
|
1550
|
-
}
|
|
1551
|
-
const message = response.message || response.Message || errorCode;
|
|
1552
|
-
response.message = message;
|
|
1553
|
-
delete response.Message;
|
|
1554
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1555
|
-
};
|
|
1556
|
-
|
|
1557
|
-
export const deserializeAws_json1_0WriteRecordsCommand = async (
|
|
1558
|
-
output: __HttpResponse,
|
|
1559
|
-
context: __SerdeContext
|
|
1560
|
-
): Promise<WriteRecordsCommandOutput> => {
|
|
1561
|
-
if (output.statusCode >= 300) {
|
|
1562
|
-
return deserializeAws_json1_0WriteRecordsCommandError(output, context);
|
|
1563
|
-
}
|
|
1564
|
-
await collectBody(output.body, context);
|
|
1565
|
-
const response: WriteRecordsCommandOutput = {
|
|
1566
|
-
$metadata: deserializeMetadata(output),
|
|
1567
|
-
};
|
|
1568
|
-
return Promise.resolve(response);
|
|
1569
|
-
};
|
|
1570
|
-
|
|
1571
|
-
const deserializeAws_json1_0WriteRecordsCommandError = async (
|
|
1572
|
-
output: __HttpResponse,
|
|
1573
|
-
context: __SerdeContext
|
|
1574
|
-
): Promise<WriteRecordsCommandOutput> => {
|
|
1575
|
-
const parsedOutput: any = {
|
|
1576
|
-
...output,
|
|
1577
|
-
body: await parseBody(output.body, context),
|
|
1578
|
-
};
|
|
1579
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1580
|
-
let errorCode = "UnknownError";
|
|
1581
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1582
|
-
switch (errorCode) {
|
|
1583
|
-
case "AccessDeniedException":
|
|
1584
|
-
case "com.amazonaws.timestreamwrite#AccessDeniedException":
|
|
1585
|
-
response = {
|
|
1586
|
-
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1587
|
-
name: errorCode,
|
|
1588
|
-
$metadata: deserializeMetadata(output),
|
|
1589
|
-
};
|
|
1590
|
-
break;
|
|
1591
|
-
case "InternalServerException":
|
|
1592
|
-
case "com.amazonaws.timestreamwrite#InternalServerException":
|
|
1593
|
-
response = {
|
|
1594
|
-
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1595
|
-
name: errorCode,
|
|
1596
|
-
$metadata: deserializeMetadata(output),
|
|
1597
|
-
};
|
|
1598
|
-
break;
|
|
1599
|
-
case "InvalidEndpointException":
|
|
1600
|
-
case "com.amazonaws.timestreamwrite#InvalidEndpointException":
|
|
1601
|
-
response = {
|
|
1602
|
-
...(await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)),
|
|
1603
|
-
name: errorCode,
|
|
1604
|
-
$metadata: deserializeMetadata(output),
|
|
1605
|
-
};
|
|
1606
|
-
break;
|
|
1607
|
-
case "RejectedRecordsException":
|
|
1608
|
-
case "com.amazonaws.timestreamwrite#RejectedRecordsException":
|
|
1609
|
-
response = {
|
|
1610
|
-
...(await deserializeAws_json1_0RejectedRecordsExceptionResponse(parsedOutput, context)),
|
|
1611
|
-
name: errorCode,
|
|
1612
|
-
$metadata: deserializeMetadata(output),
|
|
1613
|
-
};
|
|
1614
|
-
break;
|
|
1615
|
-
case "ResourceNotFoundException":
|
|
1616
|
-
case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
|
|
1617
|
-
response = {
|
|
1618
|
-
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1619
|
-
name: errorCode,
|
|
1620
|
-
$metadata: deserializeMetadata(output),
|
|
1621
|
-
};
|
|
1622
|
-
break;
|
|
1623
|
-
case "ThrottlingException":
|
|
1624
|
-
case "com.amazonaws.timestreamwrite#ThrottlingException":
|
|
1625
|
-
response = {
|
|
1626
|
-
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1627
|
-
name: errorCode,
|
|
1628
|
-
$metadata: deserializeMetadata(output),
|
|
1629
|
-
};
|
|
1630
|
-
break;
|
|
1631
|
-
case "ValidationException":
|
|
1632
|
-
case "com.amazonaws.timestreamwrite#ValidationException":
|
|
1633
|
-
response = {
|
|
1634
|
-
...(await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)),
|
|
1635
|
-
name: errorCode,
|
|
1636
|
-
$metadata: deserializeMetadata(output),
|
|
1637
|
-
};
|
|
1638
|
-
break;
|
|
1639
|
-
default:
|
|
1640
|
-
const parsedBody = parsedOutput.body;
|
|
1641
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1642
|
-
response = {
|
|
1643
|
-
...parsedBody,
|
|
1644
|
-
name: `${errorCode}`,
|
|
1645
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1646
|
-
$fault: "client",
|
|
1647
|
-
$metadata: deserializeMetadata(output),
|
|
1648
|
-
} as any;
|
|
1649
|
-
}
|
|
1650
|
-
const message = response.message || response.Message || errorCode;
|
|
1651
|
-
response.message = message;
|
|
1652
|
-
delete response.Message;
|
|
1653
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1654
|
-
};
|
|
1655
|
-
|
|
1656
|
-
const deserializeAws_json1_0AccessDeniedExceptionResponse = async (
|
|
1657
|
-
parsedOutput: any,
|
|
1658
|
-
context: __SerdeContext
|
|
1659
|
-
): Promise<AccessDeniedException> => {
|
|
1660
|
-
const body = parsedOutput.body;
|
|
1661
|
-
const deserialized: any = deserializeAws_json1_0AccessDeniedException(body, context);
|
|
1662
|
-
const contents: AccessDeniedException = {
|
|
1663
|
-
name: "AccessDeniedException",
|
|
1664
|
-
$fault: "client",
|
|
1665
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1666
|
-
...deserialized,
|
|
1667
|
-
};
|
|
1668
|
-
return contents;
|
|
1669
|
-
};
|
|
1670
|
-
|
|
1671
|
-
const deserializeAws_json1_0ConflictExceptionResponse = async (
|
|
1672
|
-
parsedOutput: any,
|
|
1673
|
-
context: __SerdeContext
|
|
1674
|
-
): Promise<ConflictException> => {
|
|
1675
|
-
const body = parsedOutput.body;
|
|
1676
|
-
const deserialized: any = deserializeAws_json1_0ConflictException(body, context);
|
|
1677
|
-
const contents: ConflictException = {
|
|
1678
|
-
name: "ConflictException",
|
|
1679
|
-
$fault: "client",
|
|
1680
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1681
|
-
...deserialized,
|
|
1682
|
-
};
|
|
1683
|
-
return contents;
|
|
1684
|
-
};
|
|
1685
|
-
|
|
1686
|
-
const deserializeAws_json1_0InternalServerExceptionResponse = async (
|
|
1687
|
-
parsedOutput: any,
|
|
1688
|
-
context: __SerdeContext
|
|
1689
|
-
): Promise<InternalServerException> => {
|
|
1690
|
-
const body = parsedOutput.body;
|
|
1691
|
-
const deserialized: any = deserializeAws_json1_0InternalServerException(body, context);
|
|
1692
|
-
const contents: InternalServerException = {
|
|
1693
|
-
name: "InternalServerException",
|
|
1694
|
-
$fault: "server",
|
|
1695
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1696
|
-
...deserialized,
|
|
1697
|
-
};
|
|
1698
|
-
return contents;
|
|
1699
|
-
};
|
|
1700
|
-
|
|
1701
|
-
const deserializeAws_json1_0InvalidEndpointExceptionResponse = async (
|
|
1702
|
-
parsedOutput: any,
|
|
1703
|
-
context: __SerdeContext
|
|
1704
|
-
): Promise<InvalidEndpointException> => {
|
|
1705
|
-
const body = parsedOutput.body;
|
|
1706
|
-
const deserialized: any = deserializeAws_json1_0InvalidEndpointException(body, context);
|
|
1707
|
-
const contents: InvalidEndpointException = {
|
|
1708
|
-
name: "InvalidEndpointException",
|
|
1709
|
-
$fault: "client",
|
|
1710
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1711
|
-
...deserialized,
|
|
1712
|
-
};
|
|
1713
|
-
return contents;
|
|
1714
|
-
};
|
|
1715
|
-
|
|
1716
|
-
const deserializeAws_json1_0RejectedRecordsExceptionResponse = async (
|
|
1717
|
-
parsedOutput: any,
|
|
1718
|
-
context: __SerdeContext
|
|
1719
|
-
): Promise<RejectedRecordsException> => {
|
|
1720
|
-
const body = parsedOutput.body;
|
|
1721
|
-
const deserialized: any = deserializeAws_json1_0RejectedRecordsException(body, context);
|
|
1722
|
-
const contents: RejectedRecordsException = {
|
|
1723
|
-
name: "RejectedRecordsException",
|
|
1724
|
-
$fault: "client",
|
|
1725
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1726
|
-
...deserialized,
|
|
1727
|
-
};
|
|
1728
|
-
return contents;
|
|
1729
|
-
};
|
|
1730
|
-
|
|
1731
|
-
const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (
|
|
1732
|
-
parsedOutput: any,
|
|
1733
|
-
context: __SerdeContext
|
|
1734
|
-
): Promise<ResourceNotFoundException> => {
|
|
1735
|
-
const body = parsedOutput.body;
|
|
1736
|
-
const deserialized: any = deserializeAws_json1_0ResourceNotFoundException(body, context);
|
|
1737
|
-
const contents: ResourceNotFoundException = {
|
|
1738
|
-
name: "ResourceNotFoundException",
|
|
1739
|
-
$fault: "client",
|
|
1740
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1741
|
-
...deserialized,
|
|
1742
|
-
};
|
|
1743
|
-
return contents;
|
|
1744
|
-
};
|
|
1745
|
-
|
|
1746
|
-
const deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = async (
|
|
1747
|
-
parsedOutput: any,
|
|
1748
|
-
context: __SerdeContext
|
|
1749
|
-
): Promise<ServiceQuotaExceededException> => {
|
|
1750
|
-
const body = parsedOutput.body;
|
|
1751
|
-
const deserialized: any = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
|
|
1752
|
-
const contents: ServiceQuotaExceededException = {
|
|
1753
|
-
name: "ServiceQuotaExceededException",
|
|
1754
|
-
$fault: "client",
|
|
1755
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1756
|
-
...deserialized,
|
|
1757
|
-
};
|
|
1758
|
-
return contents;
|
|
1759
|
-
};
|
|
1760
|
-
|
|
1761
|
-
const deserializeAws_json1_0ThrottlingExceptionResponse = async (
|
|
1762
|
-
parsedOutput: any,
|
|
1763
|
-
context: __SerdeContext
|
|
1764
|
-
): Promise<ThrottlingException> => {
|
|
1765
|
-
const body = parsedOutput.body;
|
|
1766
|
-
const deserialized: any = deserializeAws_json1_0ThrottlingException(body, context);
|
|
1767
|
-
const contents: ThrottlingException = {
|
|
1768
|
-
name: "ThrottlingException",
|
|
1769
|
-
$fault: "client",
|
|
1770
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1771
|
-
...deserialized,
|
|
1772
|
-
};
|
|
1773
|
-
return contents;
|
|
1774
|
-
};
|
|
1775
|
-
|
|
1776
|
-
const deserializeAws_json1_0ValidationExceptionResponse = async (
|
|
1777
|
-
parsedOutput: any,
|
|
1778
|
-
context: __SerdeContext
|
|
1779
|
-
): Promise<ValidationException> => {
|
|
1780
|
-
const body = parsedOutput.body;
|
|
1781
|
-
const deserialized: any = deserializeAws_json1_0ValidationException(body, context);
|
|
1782
|
-
const contents: ValidationException = {
|
|
1783
|
-
name: "ValidationException",
|
|
1784
|
-
$fault: "client",
|
|
1785
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1786
|
-
...deserialized,
|
|
1787
|
-
};
|
|
1788
|
-
return contents;
|
|
1789
|
-
};
|
|
1790
|
-
|
|
1791
|
-
const serializeAws_json1_0CreateDatabaseRequest = (input: CreateDatabaseRequest, context: __SerdeContext): any => {
|
|
1792
|
-
return {
|
|
1793
|
-
...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }),
|
|
1794
|
-
...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }),
|
|
1795
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
|
|
1796
|
-
};
|
|
1797
|
-
};
|
|
1798
|
-
|
|
1799
|
-
const serializeAws_json1_0CreateTableRequest = (input: CreateTableRequest, context: __SerdeContext): any => {
|
|
1800
|
-
return {
|
|
1801
|
-
...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }),
|
|
1802
|
-
...(input.RetentionProperties !== undefined &&
|
|
1803
|
-
input.RetentionProperties !== null && {
|
|
1804
|
-
RetentionProperties: serializeAws_json1_0RetentionProperties(input.RetentionProperties, context),
|
|
1805
|
-
}),
|
|
1806
|
-
...(input.TableName !== undefined && input.TableName !== null && { TableName: input.TableName }),
|
|
1807
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
|
|
1808
|
-
};
|
|
1809
|
-
};
|
|
1810
|
-
|
|
1811
|
-
const serializeAws_json1_0DeleteDatabaseRequest = (input: DeleteDatabaseRequest, context: __SerdeContext): any => {
|
|
1812
|
-
return {
|
|
1813
|
-
...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }),
|
|
1814
|
-
};
|
|
1815
|
-
};
|
|
1816
|
-
|
|
1817
|
-
const serializeAws_json1_0DeleteTableRequest = (input: DeleteTableRequest, context: __SerdeContext): any => {
|
|
1818
|
-
return {
|
|
1819
|
-
...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }),
|
|
1820
|
-
...(input.TableName !== undefined && input.TableName !== null && { TableName: input.TableName }),
|
|
1821
|
-
};
|
|
1822
|
-
};
|
|
1823
|
-
|
|
1824
|
-
const serializeAws_json1_0DescribeDatabaseRequest = (input: DescribeDatabaseRequest, context: __SerdeContext): any => {
|
|
1825
|
-
return {
|
|
1826
|
-
...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }),
|
|
1827
|
-
};
|
|
1828
|
-
};
|
|
1829
|
-
|
|
1830
|
-
const serializeAws_json1_0DescribeEndpointsRequest = (
|
|
1831
|
-
input: DescribeEndpointsRequest,
|
|
1832
|
-
context: __SerdeContext
|
|
1833
|
-
): any => {
|
|
1834
|
-
return {};
|
|
1835
|
-
};
|
|
1836
|
-
|
|
1837
|
-
const serializeAws_json1_0DescribeTableRequest = (input: DescribeTableRequest, context: __SerdeContext): any => {
|
|
1838
|
-
return {
|
|
1839
|
-
...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }),
|
|
1840
|
-
...(input.TableName !== undefined && input.TableName !== null && { TableName: input.TableName }),
|
|
1841
|
-
};
|
|
1842
|
-
};
|
|
1843
|
-
|
|
1844
|
-
const serializeAws_json1_0Dimension = (input: Dimension, context: __SerdeContext): any => {
|
|
1845
|
-
return {
|
|
1846
|
-
...(input.DimensionValueType !== undefined &&
|
|
1847
|
-
input.DimensionValueType !== null && { DimensionValueType: input.DimensionValueType }),
|
|
1848
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
1849
|
-
...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
|
|
1850
|
-
};
|
|
1851
|
-
};
|
|
1852
|
-
|
|
1853
|
-
const serializeAws_json1_0Dimensions = (input: Dimension[], context: __SerdeContext): any => {
|
|
1854
|
-
return input
|
|
1855
|
-
.filter((e: any) => e != null)
|
|
1856
|
-
.map((entry) => {
|
|
1857
|
-
if (entry === null) {
|
|
1858
|
-
return null as any;
|
|
1859
|
-
}
|
|
1860
|
-
return serializeAws_json1_0Dimension(entry, context);
|
|
1861
|
-
});
|
|
1862
|
-
};
|
|
1863
|
-
|
|
1864
|
-
const serializeAws_json1_0ListDatabasesRequest = (input: ListDatabasesRequest, context: __SerdeContext): any => {
|
|
1865
|
-
return {
|
|
1866
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
1867
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
1868
|
-
};
|
|
1869
|
-
};
|
|
1870
|
-
|
|
1871
|
-
const serializeAws_json1_0ListTablesRequest = (input: ListTablesRequest, context: __SerdeContext): any => {
|
|
1872
|
-
return {
|
|
1873
|
-
...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }),
|
|
1874
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
1875
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
1876
|
-
};
|
|
1877
|
-
};
|
|
1878
|
-
|
|
1879
|
-
const serializeAws_json1_0ListTagsForResourceRequest = (
|
|
1880
|
-
input: ListTagsForResourceRequest,
|
|
1881
|
-
context: __SerdeContext
|
|
1882
|
-
): any => {
|
|
1883
|
-
return {
|
|
1884
|
-
...(input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }),
|
|
1885
|
-
};
|
|
1886
|
-
};
|
|
1887
|
-
|
|
1888
|
-
const serializeAws_json1_0_Record = (input: _Record, context: __SerdeContext): any => {
|
|
1889
|
-
return {
|
|
1890
|
-
...(input.Dimensions !== undefined &&
|
|
1891
|
-
input.Dimensions !== null && { Dimensions: serializeAws_json1_0Dimensions(input.Dimensions, context) }),
|
|
1892
|
-
...(input.MeasureName !== undefined && input.MeasureName !== null && { MeasureName: input.MeasureName }),
|
|
1893
|
-
...(input.MeasureValue !== undefined && input.MeasureValue !== null && { MeasureValue: input.MeasureValue }),
|
|
1894
|
-
...(input.MeasureValueType !== undefined &&
|
|
1895
|
-
input.MeasureValueType !== null && { MeasureValueType: input.MeasureValueType }),
|
|
1896
|
-
...(input.Time !== undefined && input.Time !== null && { Time: input.Time }),
|
|
1897
|
-
...(input.TimeUnit !== undefined && input.TimeUnit !== null && { TimeUnit: input.TimeUnit }),
|
|
1898
|
-
...(input.Version !== undefined && input.Version !== null && { Version: input.Version }),
|
|
1899
|
-
};
|
|
1900
|
-
};
|
|
1901
|
-
|
|
1902
|
-
const serializeAws_json1_0Records = (input: _Record[], context: __SerdeContext): any => {
|
|
1903
|
-
return input
|
|
1904
|
-
.filter((e: any) => e != null)
|
|
1905
|
-
.map((entry) => {
|
|
1906
|
-
if (entry === null) {
|
|
1907
|
-
return null as any;
|
|
1908
|
-
}
|
|
1909
|
-
return serializeAws_json1_0_Record(entry, context);
|
|
1910
|
-
});
|
|
1911
|
-
};
|
|
1912
|
-
|
|
1913
|
-
const serializeAws_json1_0RetentionProperties = (input: RetentionProperties, context: __SerdeContext): any => {
|
|
1914
|
-
return {
|
|
1915
|
-
...(input.MagneticStoreRetentionPeriodInDays !== undefined &&
|
|
1916
|
-
input.MagneticStoreRetentionPeriodInDays !== null && {
|
|
1917
|
-
MagneticStoreRetentionPeriodInDays: input.MagneticStoreRetentionPeriodInDays,
|
|
1918
|
-
}),
|
|
1919
|
-
...(input.MemoryStoreRetentionPeriodInHours !== undefined &&
|
|
1920
|
-
input.MemoryStoreRetentionPeriodInHours !== null && {
|
|
1921
|
-
MemoryStoreRetentionPeriodInHours: input.MemoryStoreRetentionPeriodInHours,
|
|
1922
|
-
}),
|
|
1923
|
-
};
|
|
1924
|
-
};
|
|
1925
|
-
|
|
1926
|
-
const serializeAws_json1_0Tag = (input: Tag, context: __SerdeContext): any => {
|
|
1927
|
-
return {
|
|
1928
|
-
...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
|
|
1929
|
-
...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
|
|
1930
|
-
};
|
|
1931
|
-
};
|
|
1932
|
-
|
|
1933
|
-
const serializeAws_json1_0TagKeyList = (input: string[], context: __SerdeContext): any => {
|
|
1934
|
-
return input
|
|
1935
|
-
.filter((e: any) => e != null)
|
|
1936
|
-
.map((entry) => {
|
|
1937
|
-
if (entry === null) {
|
|
1938
|
-
return null as any;
|
|
1939
|
-
}
|
|
1940
|
-
return entry;
|
|
1941
|
-
});
|
|
1942
|
-
};
|
|
1943
|
-
|
|
1944
|
-
const serializeAws_json1_0TagList = (input: Tag[], context: __SerdeContext): any => {
|
|
1945
|
-
return input
|
|
1946
|
-
.filter((e: any) => e != null)
|
|
1947
|
-
.map((entry) => {
|
|
1948
|
-
if (entry === null) {
|
|
1949
|
-
return null as any;
|
|
1950
|
-
}
|
|
1951
|
-
return serializeAws_json1_0Tag(entry, context);
|
|
1952
|
-
});
|
|
1953
|
-
};
|
|
1954
|
-
|
|
1955
|
-
const serializeAws_json1_0TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => {
|
|
1956
|
-
return {
|
|
1957
|
-
...(input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }),
|
|
1958
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
|
|
1959
|
-
};
|
|
1960
|
-
};
|
|
1961
|
-
|
|
1962
|
-
const serializeAws_json1_0UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => {
|
|
1963
|
-
return {
|
|
1964
|
-
...(input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }),
|
|
1965
|
-
...(input.TagKeys !== undefined &&
|
|
1966
|
-
input.TagKeys !== null && { TagKeys: serializeAws_json1_0TagKeyList(input.TagKeys, context) }),
|
|
1967
|
-
};
|
|
1968
|
-
};
|
|
1969
|
-
|
|
1970
|
-
const serializeAws_json1_0UpdateDatabaseRequest = (input: UpdateDatabaseRequest, context: __SerdeContext): any => {
|
|
1971
|
-
return {
|
|
1972
|
-
...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }),
|
|
1973
|
-
...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }),
|
|
1974
|
-
};
|
|
1975
|
-
};
|
|
1976
|
-
|
|
1977
|
-
const serializeAws_json1_0UpdateTableRequest = (input: UpdateTableRequest, context: __SerdeContext): any => {
|
|
1978
|
-
return {
|
|
1979
|
-
...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }),
|
|
1980
|
-
...(input.RetentionProperties !== undefined &&
|
|
1981
|
-
input.RetentionProperties !== null && {
|
|
1982
|
-
RetentionProperties: serializeAws_json1_0RetentionProperties(input.RetentionProperties, context),
|
|
1983
|
-
}),
|
|
1984
|
-
...(input.TableName !== undefined && input.TableName !== null && { TableName: input.TableName }),
|
|
1985
|
-
};
|
|
1986
|
-
};
|
|
1987
|
-
|
|
1988
|
-
const serializeAws_json1_0WriteRecordsRequest = (input: WriteRecordsRequest, context: __SerdeContext): any => {
|
|
1989
|
-
return {
|
|
1990
|
-
...(input.CommonAttributes !== undefined &&
|
|
1991
|
-
input.CommonAttributes !== null && {
|
|
1992
|
-
CommonAttributes: serializeAws_json1_0_Record(input.CommonAttributes, context),
|
|
1993
|
-
}),
|
|
1994
|
-
...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }),
|
|
1995
|
-
...(input.Records !== undefined &&
|
|
1996
|
-
input.Records !== null && { Records: serializeAws_json1_0Records(input.Records, context) }),
|
|
1997
|
-
...(input.TableName !== undefined && input.TableName !== null && { TableName: input.TableName }),
|
|
1998
|
-
};
|
|
1999
|
-
};
|
|
2000
|
-
|
|
2001
|
-
const deserializeAws_json1_0AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => {
|
|
2002
|
-
return {
|
|
2003
|
-
Message: __expectString(output.Message),
|
|
2004
|
-
} as any;
|
|
2005
|
-
};
|
|
2006
|
-
|
|
2007
|
-
const deserializeAws_json1_0ConflictException = (output: any, context: __SerdeContext): ConflictException => {
|
|
2008
|
-
return {
|
|
2009
|
-
Message: __expectString(output.Message),
|
|
2010
|
-
} as any;
|
|
2011
|
-
};
|
|
2012
|
-
|
|
2013
|
-
const deserializeAws_json1_0CreateDatabaseResponse = (output: any, context: __SerdeContext): CreateDatabaseResponse => {
|
|
2014
|
-
return {
|
|
2015
|
-
Database:
|
|
2016
|
-
output.Database !== undefined && output.Database !== null
|
|
2017
|
-
? deserializeAws_json1_0Database(output.Database, context)
|
|
2018
|
-
: undefined,
|
|
2019
|
-
} as any;
|
|
2020
|
-
};
|
|
2021
|
-
|
|
2022
|
-
const deserializeAws_json1_0CreateTableResponse = (output: any, context: __SerdeContext): CreateTableResponse => {
|
|
2023
|
-
return {
|
|
2024
|
-
Table:
|
|
2025
|
-
output.Table !== undefined && output.Table !== null
|
|
2026
|
-
? deserializeAws_json1_0Table(output.Table, context)
|
|
2027
|
-
: undefined,
|
|
2028
|
-
} as any;
|
|
2029
|
-
};
|
|
2030
|
-
|
|
2031
|
-
const deserializeAws_json1_0Database = (output: any, context: __SerdeContext): Database => {
|
|
2032
|
-
return {
|
|
2033
|
-
Arn: __expectString(output.Arn),
|
|
2034
|
-
CreationTime:
|
|
2035
|
-
output.CreationTime !== undefined && output.CreationTime !== null
|
|
2036
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
|
|
2037
|
-
: undefined,
|
|
2038
|
-
DatabaseName: __expectString(output.DatabaseName),
|
|
2039
|
-
KmsKeyId: __expectString(output.KmsKeyId),
|
|
2040
|
-
LastUpdatedTime:
|
|
2041
|
-
output.LastUpdatedTime !== undefined && output.LastUpdatedTime !== null
|
|
2042
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime)))
|
|
2043
|
-
: undefined,
|
|
2044
|
-
TableCount: __expectLong(output.TableCount),
|
|
2045
|
-
} as any;
|
|
2046
|
-
};
|
|
2047
|
-
|
|
2048
|
-
const deserializeAws_json1_0DatabaseList = (output: any, context: __SerdeContext): Database[] => {
|
|
2049
|
-
return (output || [])
|
|
2050
|
-
.filter((e: any) => e != null)
|
|
2051
|
-
.map((entry: any) => {
|
|
2052
|
-
if (entry === null) {
|
|
2053
|
-
return null as any;
|
|
2054
|
-
}
|
|
2055
|
-
return deserializeAws_json1_0Database(entry, context);
|
|
2056
|
-
});
|
|
2057
|
-
};
|
|
2058
|
-
|
|
2059
|
-
const deserializeAws_json1_0DescribeDatabaseResponse = (
|
|
2060
|
-
output: any,
|
|
2061
|
-
context: __SerdeContext
|
|
2062
|
-
): DescribeDatabaseResponse => {
|
|
2063
|
-
return {
|
|
2064
|
-
Database:
|
|
2065
|
-
output.Database !== undefined && output.Database !== null
|
|
2066
|
-
? deserializeAws_json1_0Database(output.Database, context)
|
|
2067
|
-
: undefined,
|
|
2068
|
-
} as any;
|
|
2069
|
-
};
|
|
2070
|
-
|
|
2071
|
-
const deserializeAws_json1_0DescribeEndpointsResponse = (
|
|
2072
|
-
output: any,
|
|
2073
|
-
context: __SerdeContext
|
|
2074
|
-
): DescribeEndpointsResponse => {
|
|
2075
|
-
return {
|
|
2076
|
-
Endpoints:
|
|
2077
|
-
output.Endpoints !== undefined && output.Endpoints !== null
|
|
2078
|
-
? deserializeAws_json1_0Endpoints(output.Endpoints, context)
|
|
2079
|
-
: undefined,
|
|
2080
|
-
} as any;
|
|
2081
|
-
};
|
|
2082
|
-
|
|
2083
|
-
const deserializeAws_json1_0DescribeTableResponse = (output: any, context: __SerdeContext): DescribeTableResponse => {
|
|
2084
|
-
return {
|
|
2085
|
-
Table:
|
|
2086
|
-
output.Table !== undefined && output.Table !== null
|
|
2087
|
-
? deserializeAws_json1_0Table(output.Table, context)
|
|
2088
|
-
: undefined,
|
|
2089
|
-
} as any;
|
|
2090
|
-
};
|
|
2091
|
-
|
|
2092
|
-
const deserializeAws_json1_0Endpoint = (output: any, context: __SerdeContext): Endpoint => {
|
|
2093
|
-
return {
|
|
2094
|
-
Address: __expectString(output.Address),
|
|
2095
|
-
CachePeriodInMinutes: __expectLong(output.CachePeriodInMinutes),
|
|
2096
|
-
} as any;
|
|
2097
|
-
};
|
|
2098
|
-
|
|
2099
|
-
const deserializeAws_json1_0Endpoints = (output: any, context: __SerdeContext): Endpoint[] => {
|
|
2100
|
-
return (output || [])
|
|
2101
|
-
.filter((e: any) => e != null)
|
|
2102
|
-
.map((entry: any) => {
|
|
2103
|
-
if (entry === null) {
|
|
2104
|
-
return null as any;
|
|
2105
|
-
}
|
|
2106
|
-
return deserializeAws_json1_0Endpoint(entry, context);
|
|
2107
|
-
});
|
|
2108
|
-
};
|
|
2109
|
-
|
|
2110
|
-
const deserializeAws_json1_0InternalServerException = (
|
|
2111
|
-
output: any,
|
|
2112
|
-
context: __SerdeContext
|
|
2113
|
-
): InternalServerException => {
|
|
2114
|
-
return {
|
|
2115
|
-
Message: __expectString(output.Message),
|
|
2116
|
-
} as any;
|
|
2117
|
-
};
|
|
2118
|
-
|
|
2119
|
-
const deserializeAws_json1_0InvalidEndpointException = (
|
|
2120
|
-
output: any,
|
|
2121
|
-
context: __SerdeContext
|
|
2122
|
-
): InvalidEndpointException => {
|
|
2123
|
-
return {
|
|
2124
|
-
Message: __expectString(output.Message),
|
|
2125
|
-
} as any;
|
|
2126
|
-
};
|
|
2127
|
-
|
|
2128
|
-
const deserializeAws_json1_0ListDatabasesResponse = (output: any, context: __SerdeContext): ListDatabasesResponse => {
|
|
2129
|
-
return {
|
|
2130
|
-
Databases:
|
|
2131
|
-
output.Databases !== undefined && output.Databases !== null
|
|
2132
|
-
? deserializeAws_json1_0DatabaseList(output.Databases, context)
|
|
2133
|
-
: undefined,
|
|
2134
|
-
NextToken: __expectString(output.NextToken),
|
|
2135
|
-
} as any;
|
|
2136
|
-
};
|
|
2137
|
-
|
|
2138
|
-
const deserializeAws_json1_0ListTablesResponse = (output: any, context: __SerdeContext): ListTablesResponse => {
|
|
2139
|
-
return {
|
|
2140
|
-
NextToken: __expectString(output.NextToken),
|
|
2141
|
-
Tables:
|
|
2142
|
-
output.Tables !== undefined && output.Tables !== null
|
|
2143
|
-
? deserializeAws_json1_0TableList(output.Tables, context)
|
|
2144
|
-
: undefined,
|
|
2145
|
-
} as any;
|
|
2146
|
-
};
|
|
2147
|
-
|
|
2148
|
-
const deserializeAws_json1_0ListTagsForResourceResponse = (
|
|
2149
|
-
output: any,
|
|
2150
|
-
context: __SerdeContext
|
|
2151
|
-
): ListTagsForResourceResponse => {
|
|
2152
|
-
return {
|
|
2153
|
-
Tags:
|
|
2154
|
-
output.Tags !== undefined && output.Tags !== null
|
|
2155
|
-
? deserializeAws_json1_0TagList(output.Tags, context)
|
|
2156
|
-
: undefined,
|
|
2157
|
-
} as any;
|
|
2158
|
-
};
|
|
2159
|
-
|
|
2160
|
-
const deserializeAws_json1_0RejectedRecord = (output: any, context: __SerdeContext): RejectedRecord => {
|
|
2161
|
-
return {
|
|
2162
|
-
ExistingVersion: __expectLong(output.ExistingVersion),
|
|
2163
|
-
Reason: __expectString(output.Reason),
|
|
2164
|
-
RecordIndex: __expectInt32(output.RecordIndex),
|
|
2165
|
-
} as any;
|
|
2166
|
-
};
|
|
2167
|
-
|
|
2168
|
-
const deserializeAws_json1_0RejectedRecords = (output: any, context: __SerdeContext): RejectedRecord[] => {
|
|
2169
|
-
return (output || [])
|
|
2170
|
-
.filter((e: any) => e != null)
|
|
2171
|
-
.map((entry: any) => {
|
|
2172
|
-
if (entry === null) {
|
|
2173
|
-
return null as any;
|
|
2174
|
-
}
|
|
2175
|
-
return deserializeAws_json1_0RejectedRecord(entry, context);
|
|
2176
|
-
});
|
|
2177
|
-
};
|
|
2178
|
-
|
|
2179
|
-
const deserializeAws_json1_0RejectedRecordsException = (
|
|
2180
|
-
output: any,
|
|
2181
|
-
context: __SerdeContext
|
|
2182
|
-
): RejectedRecordsException => {
|
|
2183
|
-
return {
|
|
2184
|
-
Message: __expectString(output.Message),
|
|
2185
|
-
RejectedRecords:
|
|
2186
|
-
output.RejectedRecords !== undefined && output.RejectedRecords !== null
|
|
2187
|
-
? deserializeAws_json1_0RejectedRecords(output.RejectedRecords, context)
|
|
2188
|
-
: undefined,
|
|
2189
|
-
} as any;
|
|
2190
|
-
};
|
|
2191
|
-
|
|
2192
|
-
const deserializeAws_json1_0ResourceNotFoundException = (
|
|
2193
|
-
output: any,
|
|
2194
|
-
context: __SerdeContext
|
|
2195
|
-
): ResourceNotFoundException => {
|
|
2196
|
-
return {
|
|
2197
|
-
Message: __expectString(output.Message),
|
|
2198
|
-
} as any;
|
|
2199
|
-
};
|
|
2200
|
-
|
|
2201
|
-
const deserializeAws_json1_0RetentionProperties = (output: any, context: __SerdeContext): RetentionProperties => {
|
|
2202
|
-
return {
|
|
2203
|
-
MagneticStoreRetentionPeriodInDays: __expectLong(output.MagneticStoreRetentionPeriodInDays),
|
|
2204
|
-
MemoryStoreRetentionPeriodInHours: __expectLong(output.MemoryStoreRetentionPeriodInHours),
|
|
2205
|
-
} as any;
|
|
2206
|
-
};
|
|
2207
|
-
|
|
2208
|
-
const deserializeAws_json1_0ServiceQuotaExceededException = (
|
|
2209
|
-
output: any,
|
|
2210
|
-
context: __SerdeContext
|
|
2211
|
-
): ServiceQuotaExceededException => {
|
|
2212
|
-
return {
|
|
2213
|
-
Message: __expectString(output.Message),
|
|
2214
|
-
} as any;
|
|
2215
|
-
};
|
|
2216
|
-
|
|
2217
|
-
const deserializeAws_json1_0Table = (output: any, context: __SerdeContext): Table => {
|
|
2218
|
-
return {
|
|
2219
|
-
Arn: __expectString(output.Arn),
|
|
2220
|
-
CreationTime:
|
|
2221
|
-
output.CreationTime !== undefined && output.CreationTime !== null
|
|
2222
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
|
|
2223
|
-
: undefined,
|
|
2224
|
-
DatabaseName: __expectString(output.DatabaseName),
|
|
2225
|
-
LastUpdatedTime:
|
|
2226
|
-
output.LastUpdatedTime !== undefined && output.LastUpdatedTime !== null
|
|
2227
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime)))
|
|
2228
|
-
: undefined,
|
|
2229
|
-
RetentionProperties:
|
|
2230
|
-
output.RetentionProperties !== undefined && output.RetentionProperties !== null
|
|
2231
|
-
? deserializeAws_json1_0RetentionProperties(output.RetentionProperties, context)
|
|
2232
|
-
: undefined,
|
|
2233
|
-
TableName: __expectString(output.TableName),
|
|
2234
|
-
TableStatus: __expectString(output.TableStatus),
|
|
2235
|
-
} as any;
|
|
2236
|
-
};
|
|
2237
|
-
|
|
2238
|
-
const deserializeAws_json1_0TableList = (output: any, context: __SerdeContext): Table[] => {
|
|
2239
|
-
return (output || [])
|
|
2240
|
-
.filter((e: any) => e != null)
|
|
2241
|
-
.map((entry: any) => {
|
|
2242
|
-
if (entry === null) {
|
|
2243
|
-
return null as any;
|
|
2244
|
-
}
|
|
2245
|
-
return deserializeAws_json1_0Table(entry, context);
|
|
2246
|
-
});
|
|
2247
|
-
};
|
|
2248
|
-
|
|
2249
|
-
const deserializeAws_json1_0Tag = (output: any, context: __SerdeContext): Tag => {
|
|
2250
|
-
return {
|
|
2251
|
-
Key: __expectString(output.Key),
|
|
2252
|
-
Value: __expectString(output.Value),
|
|
2253
|
-
} as any;
|
|
2254
|
-
};
|
|
2255
|
-
|
|
2256
|
-
const deserializeAws_json1_0TagList = (output: any, context: __SerdeContext): Tag[] => {
|
|
2257
|
-
return (output || [])
|
|
2258
|
-
.filter((e: any) => e != null)
|
|
2259
|
-
.map((entry: any) => {
|
|
2260
|
-
if (entry === null) {
|
|
2261
|
-
return null as any;
|
|
2262
|
-
}
|
|
2263
|
-
return deserializeAws_json1_0Tag(entry, context);
|
|
2264
|
-
});
|
|
2265
|
-
};
|
|
2266
|
-
|
|
2267
|
-
const deserializeAws_json1_0TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => {
|
|
2268
|
-
return {} as any;
|
|
2269
|
-
};
|
|
2270
|
-
|
|
2271
|
-
const deserializeAws_json1_0ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => {
|
|
2272
|
-
return {
|
|
2273
|
-
Message: __expectString(output.Message),
|
|
2274
|
-
} as any;
|
|
2275
|
-
};
|
|
2276
|
-
|
|
2277
|
-
const deserializeAws_json1_0UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => {
|
|
2278
|
-
return {} as any;
|
|
2279
|
-
};
|
|
2280
|
-
|
|
2281
|
-
const deserializeAws_json1_0UpdateDatabaseResponse = (output: any, context: __SerdeContext): UpdateDatabaseResponse => {
|
|
2282
|
-
return {
|
|
2283
|
-
Database:
|
|
2284
|
-
output.Database !== undefined && output.Database !== null
|
|
2285
|
-
? deserializeAws_json1_0Database(output.Database, context)
|
|
2286
|
-
: undefined,
|
|
2287
|
-
} as any;
|
|
2288
|
-
};
|
|
2289
|
-
|
|
2290
|
-
const deserializeAws_json1_0UpdateTableResponse = (output: any, context: __SerdeContext): UpdateTableResponse => {
|
|
2291
|
-
return {
|
|
2292
|
-
Table:
|
|
2293
|
-
output.Table !== undefined && output.Table !== null
|
|
2294
|
-
? deserializeAws_json1_0Table(output.Table, context)
|
|
2295
|
-
: undefined,
|
|
2296
|
-
} as any;
|
|
2297
|
-
};
|
|
2298
|
-
|
|
2299
|
-
const deserializeAws_json1_0ValidationException = (output: any, context: __SerdeContext): ValidationException => {
|
|
2300
|
-
return {
|
|
2301
|
-
Message: __expectString(output.Message),
|
|
2302
|
-
} as any;
|
|
2303
|
-
};
|
|
2304
|
-
|
|
2305
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
2306
|
-
httpStatusCode: output.statusCode,
|
|
2307
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
2308
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2309
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
2310
|
-
});
|
|
2311
|
-
|
|
2312
|
-
// Collect low-level response body stream to Uint8Array.
|
|
2313
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
2314
|
-
if (streamBody instanceof Uint8Array) {
|
|
2315
|
-
return Promise.resolve(streamBody);
|
|
2316
|
-
}
|
|
2317
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2318
|
-
};
|
|
2319
|
-
|
|
2320
|
-
// Encode Uint8Array data into string with utf-8.
|
|
2321
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
2322
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2323
|
-
|
|
2324
|
-
const buildHttpRpcRequest = async (
|
|
2325
|
-
context: __SerdeContext,
|
|
2326
|
-
headers: __HeaderBag,
|
|
2327
|
-
path: string,
|
|
2328
|
-
resolvedHostname: string | undefined,
|
|
2329
|
-
body: any
|
|
2330
|
-
): Promise<__HttpRequest> => {
|
|
2331
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2332
|
-
const contents: any = {
|
|
2333
|
-
protocol,
|
|
2334
|
-
hostname,
|
|
2335
|
-
port,
|
|
2336
|
-
method: "POST",
|
|
2337
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
2338
|
-
headers,
|
|
2339
|
-
};
|
|
2340
|
-
if (resolvedHostname !== undefined) {
|
|
2341
|
-
contents.hostname = resolvedHostname;
|
|
2342
|
-
}
|
|
2343
|
-
if (body !== undefined) {
|
|
2344
|
-
contents.body = body;
|
|
2345
|
-
}
|
|
2346
|
-
return new __HttpRequest(contents);
|
|
2347
|
-
};
|
|
2348
|
-
|
|
2349
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
2350
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
2351
|
-
if (encoded.length) {
|
|
2352
|
-
return JSON.parse(encoded);
|
|
2353
|
-
}
|
|
2354
|
-
return {};
|
|
2355
|
-
});
|
|
2356
|
-
|
|
2357
|
-
/**
|
|
2358
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
2359
|
-
*/
|
|
2360
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
2361
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2362
|
-
|
|
2363
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
2364
|
-
let cleanValue = rawValue;
|
|
2365
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2366
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2367
|
-
}
|
|
2368
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2369
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2370
|
-
}
|
|
2371
|
-
return cleanValue;
|
|
2372
|
-
};
|
|
2373
|
-
|
|
2374
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2375
|
-
if (headerKey !== undefined) {
|
|
2376
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
if (data.code !== undefined) {
|
|
2380
|
-
return sanitizeErrorCode(data.code);
|
|
2381
|
-
}
|
|
2382
|
-
|
|
2383
|
-
if (data["__type"] !== undefined) {
|
|
2384
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2385
|
-
}
|
|
2386
|
-
|
|
2387
|
-
return "";
|
|
2388
|
-
};
|