@aws-sdk/client-chime-sdk-messaging 3.141.0 → 3.149.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 +30 -0
- package/dist-cjs/ChimeSDKMessaging.js +15 -0
- package/dist-cjs/commands/ListSubChannelsCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +36 -18
- package/dist-cjs/pagination/ListSubChannelsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +895 -1364
- package/dist-es/ChimeSDKMessaging.js +15 -0
- package/dist-es/commands/ListSubChannelsCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +18 -14
- package/dist-es/pagination/ListSubChannelsPaginator.js +75 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +1134 -1311
- package/dist-types/ChimeSDKMessaging.d.ts +7 -0
- package/dist-types/ChimeSDKMessagingClient.d.ts +3 -2
- package/dist-types/commands/ListSubChannelsCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +232 -13
- package/dist-types/pagination/ListSubChannelsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/ChimeSDKMessaging.d.ts +5 -0
- package/dist-types/ts3.4/ChimeSDKMessagingClient.d.ts +3 -2
- package/dist-types/ts3.4/commands/ListSubChannelsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +105 -9
- package/dist-types/ts3.4/pagination/ListSubChannelsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
- package/package.json +11 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.deserializeAws_restJson1UpdateChannelReadMarkerCommand = exports.deserializeAws_restJson1UpdateChannelMessageCommand = exports.deserializeAws_restJson1UpdateChannelFlowCommand = exports.deserializeAws_restJson1UpdateChannelCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SendChannelMessageCommand = exports.deserializeAws_restJson1SearchChannelsCommand = exports.deserializeAws_restJson1RedactChannelMessageCommand = exports.deserializeAws_restJson1PutChannelMembershipPreferencesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = exports.deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = exports.deserializeAws_restJson1ListChannelsCommand = exports.deserializeAws_restJson1ListChannelModeratorsCommand = exports.deserializeAws_restJson1ListChannelMessagesCommand = exports.deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = exports.deserializeAws_restJson1ListChannelMembershipsCommand = exports.deserializeAws_restJson1ListChannelFlowsCommand = exports.deserializeAws_restJson1ListChannelBansCommand = exports.deserializeAws_restJson1GetMessagingSessionEndpointCommand = exports.deserializeAws_restJson1GetChannelMessageStatusCommand = exports.deserializeAws_restJson1GetChannelMessageCommand = exports.deserializeAws_restJson1GetChannelMembershipPreferencesCommand = exports.deserializeAws_restJson1DisassociateChannelFlowCommand = exports.deserializeAws_restJson1DescribeChannelModeratorCommand = exports.deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = exports.deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand = exports.deserializeAws_restJson1DescribeChannelMembershipCommand = exports.deserializeAws_restJson1DescribeChannelFlowCommand = exports.deserializeAws_restJson1DescribeChannelBanCommand = exports.deserializeAws_restJson1DescribeChannelCommand = exports.deserializeAws_restJson1DeleteChannelModeratorCommand = exports.deserializeAws_restJson1DeleteChannelMessageCommand = exports.deserializeAws_restJson1DeleteChannelMembershipCommand = exports.deserializeAws_restJson1DeleteChannelFlowCommand = exports.deserializeAws_restJson1DeleteChannelBanCommand = exports.deserializeAws_restJson1DeleteChannelCommand = exports.deserializeAws_restJson1CreateChannelModeratorCommand = exports.deserializeAws_restJson1CreateChannelMembershipCommand = exports.deserializeAws_restJson1CreateChannelFlowCommand = exports.deserializeAws_restJson1CreateChannelBanCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1ChannelFlowCallbackCommand = exports.deserializeAws_restJson1BatchCreateChannelMembershipCommand = exports.deserializeAws_restJson1AssociateChannelFlowCommand = exports.serializeAws_restJson1UpdateChannelReadMarkerCommand = exports.serializeAws_restJson1UpdateChannelMessageCommand = exports.serializeAws_restJson1UpdateChannelFlowCommand = exports.serializeAws_restJson1UpdateChannelCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1SendChannelMessageCommand = exports.serializeAws_restJson1SearchChannelsCommand = exports.serializeAws_restJson1RedactChannelMessageCommand = exports.serializeAws_restJson1PutChannelMembershipPreferencesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListSubChannelsCommand = exports.serializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = exports.serializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = exports.serializeAws_restJson1ListChannelsCommand = exports.serializeAws_restJson1ListChannelModeratorsCommand = exports.serializeAws_restJson1ListChannelMessagesCommand = exports.serializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = exports.serializeAws_restJson1ListChannelMembershipsCommand = exports.serializeAws_restJson1ListChannelFlowsCommand = exports.serializeAws_restJson1ListChannelBansCommand = exports.serializeAws_restJson1GetMessagingSessionEndpointCommand = exports.serializeAws_restJson1GetChannelMessageStatusCommand = exports.serializeAws_restJson1GetChannelMessageCommand = exports.serializeAws_restJson1GetChannelMembershipPreferencesCommand = exports.serializeAws_restJson1DisassociateChannelFlowCommand = exports.serializeAws_restJson1DescribeChannelModeratorCommand = exports.serializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = exports.serializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand = exports.serializeAws_restJson1DescribeChannelMembershipCommand = exports.serializeAws_restJson1DescribeChannelFlowCommand = exports.serializeAws_restJson1DescribeChannelBanCommand = exports.serializeAws_restJson1DescribeChannelCommand = exports.serializeAws_restJson1DeleteChannelModeratorCommand = exports.serializeAws_restJson1DeleteChannelMessageCommand = exports.serializeAws_restJson1DeleteChannelMembershipCommand = exports.serializeAws_restJson1DeleteChannelFlowCommand = exports.serializeAws_restJson1DeleteChannelBanCommand = exports.serializeAws_restJson1DeleteChannelCommand = exports.serializeAws_restJson1CreateChannelModeratorCommand = exports.serializeAws_restJson1CreateChannelMembershipCommand = exports.serializeAws_restJson1CreateChannelFlowCommand = exports.serializeAws_restJson1CreateChannelBanCommand = exports.serializeAws_restJson1CreateChannelCommand = exports.serializeAws_restJson1ChannelFlowCallbackCommand = exports.serializeAws_restJson1BatchCreateChannelMembershipCommand = exports.serializeAws_restJson1AssociateChannelFlowCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1UpdateChannelReadMarkerCommand = exports.deserializeAws_restJson1UpdateChannelMessageCommand = exports.deserializeAws_restJson1UpdateChannelFlowCommand = exports.deserializeAws_restJson1UpdateChannelCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SendChannelMessageCommand = exports.deserializeAws_restJson1SearchChannelsCommand = exports.deserializeAws_restJson1RedactChannelMessageCommand = exports.deserializeAws_restJson1PutChannelMembershipPreferencesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListSubChannelsCommand = exports.deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = exports.deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = exports.deserializeAws_restJson1ListChannelsCommand = exports.deserializeAws_restJson1ListChannelModeratorsCommand = exports.deserializeAws_restJson1ListChannelMessagesCommand = exports.deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = exports.deserializeAws_restJson1ListChannelMembershipsCommand = exports.deserializeAws_restJson1ListChannelFlowsCommand = exports.deserializeAws_restJson1ListChannelBansCommand = exports.deserializeAws_restJson1GetMessagingSessionEndpointCommand = exports.deserializeAws_restJson1GetChannelMessageStatusCommand = exports.deserializeAws_restJson1GetChannelMessageCommand = exports.deserializeAws_restJson1GetChannelMembershipPreferencesCommand = exports.deserializeAws_restJson1DisassociateChannelFlowCommand = exports.deserializeAws_restJson1DescribeChannelModeratorCommand = exports.deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = exports.deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand = exports.deserializeAws_restJson1DescribeChannelMembershipCommand = exports.deserializeAws_restJson1DescribeChannelFlowCommand = exports.deserializeAws_restJson1DescribeChannelBanCommand = exports.deserializeAws_restJson1DescribeChannelCommand = exports.deserializeAws_restJson1DeleteChannelModeratorCommand = exports.deserializeAws_restJson1DeleteChannelMessageCommand = exports.deserializeAws_restJson1DeleteChannelMembershipCommand = exports.deserializeAws_restJson1DeleteChannelFlowCommand = exports.deserializeAws_restJson1DeleteChannelBanCommand = exports.deserializeAws_restJson1DeleteChannelCommand = exports.deserializeAws_restJson1CreateChannelModeratorCommand = exports.deserializeAws_restJson1CreateChannelMembershipCommand = exports.deserializeAws_restJson1CreateChannelFlowCommand = exports.deserializeAws_restJson1CreateChannelBanCommand = exports.deserializeAws_restJson1CreateChannelCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const uuid_1 = require("uuid");
|
|
@@ -9,21 +9,12 @@ const ChimeSDKMessagingServiceException_1 = require("../models/ChimeSDKMessaging
|
|
|
9
9
|
const models_0_1 = require("../models/models_0");
|
|
10
10
|
const serializeAws_restJson1AssociateChannelFlowCommand = async (input, context) => {
|
|
11
11
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
12
|
-
const headers = {
|
|
12
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
13
13
|
"content-type": "application/json",
|
|
14
|
-
|
|
15
|
-
};
|
|
14
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
15
|
+
});
|
|
16
16
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/channel-flow";
|
|
17
|
-
|
|
18
|
-
const labelValue = input.ChannelArn;
|
|
19
|
-
if (labelValue.length <= 0) {
|
|
20
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
21
|
-
}
|
|
22
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
26
|
-
}
|
|
17
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
27
18
|
let body;
|
|
28
19
|
body = JSON.stringify({
|
|
29
20
|
...(input.ChannelFlowArn != null && { ChannelFlowArn: input.ChannelFlowArn }),
|
|
@@ -41,27 +32,19 @@ const serializeAws_restJson1AssociateChannelFlowCommand = async (input, context)
|
|
|
41
32
|
exports.serializeAws_restJson1AssociateChannelFlowCommand = serializeAws_restJson1AssociateChannelFlowCommand;
|
|
42
33
|
const serializeAws_restJson1BatchCreateChannelMembershipCommand = async (input, context) => {
|
|
43
34
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
44
|
-
const headers = {
|
|
35
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
45
36
|
"content-type": "application/json",
|
|
46
|
-
|
|
47
|
-
};
|
|
37
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
38
|
+
});
|
|
48
39
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
58
|
-
}
|
|
59
|
-
const query = {
|
|
60
|
-
operation: "batch-create",
|
|
61
|
-
};
|
|
40
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
41
|
+
const query = map({
|
|
42
|
+
operation: [, "batch-create"],
|
|
43
|
+
});
|
|
62
44
|
let body;
|
|
63
45
|
body = JSON.stringify({
|
|
64
46
|
...(input.MemberArns != null && { MemberArns: serializeAws_restJson1MemberArns(input.MemberArns, context) }),
|
|
47
|
+
...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }),
|
|
65
48
|
...(input.Type != null && { Type: input.Type }),
|
|
66
49
|
});
|
|
67
50
|
return new protocol_http_1.HttpRequest({
|
|
@@ -83,19 +66,10 @@ const serializeAws_restJson1ChannelFlowCallbackCommand = async (input, context)
|
|
|
83
66
|
"content-type": "application/json",
|
|
84
67
|
};
|
|
85
68
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
95
|
-
}
|
|
96
|
-
const query = {
|
|
97
|
-
operation: "channel-flow-callback",
|
|
98
|
-
};
|
|
69
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
70
|
+
const query = map({
|
|
71
|
+
operation: [, "channel-flow-callback"],
|
|
72
|
+
});
|
|
99
73
|
let body;
|
|
100
74
|
body = JSON.stringify({
|
|
101
75
|
CallbackId: (_a = input.CallbackId) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
@@ -119,16 +93,19 @@ exports.serializeAws_restJson1ChannelFlowCallbackCommand = serializeAws_restJson
|
|
|
119
93
|
const serializeAws_restJson1CreateChannelCommand = async (input, context) => {
|
|
120
94
|
var _a;
|
|
121
95
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
122
|
-
const headers = {
|
|
96
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
123
97
|
"content-type": "application/json",
|
|
124
|
-
|
|
125
|
-
};
|
|
98
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
99
|
+
});
|
|
126
100
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
|
|
127
101
|
let body;
|
|
128
102
|
body = JSON.stringify({
|
|
129
103
|
...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }),
|
|
130
104
|
...(input.ChannelId != null && { ChannelId: input.ChannelId }),
|
|
131
105
|
ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
106
|
+
...(input.ElasticChannelConfiguration != null && {
|
|
107
|
+
ElasticChannelConfiguration: serializeAws_restJson1ElasticChannelConfiguration(input.ElasticChannelConfiguration, context),
|
|
108
|
+
}),
|
|
132
109
|
...(input.MemberArns != null && { MemberArns: serializeAws_restJson1ChannelMemberArns(input.MemberArns, context) }),
|
|
133
110
|
...(input.Metadata != null && { Metadata: input.Metadata }),
|
|
134
111
|
...(input.Mode != null && { Mode: input.Mode }),
|
|
@@ -152,21 +129,12 @@ const serializeAws_restJson1CreateChannelCommand = async (input, context) => {
|
|
|
152
129
|
exports.serializeAws_restJson1CreateChannelCommand = serializeAws_restJson1CreateChannelCommand;
|
|
153
130
|
const serializeAws_restJson1CreateChannelBanCommand = async (input, context) => {
|
|
154
131
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
155
|
-
const headers = {
|
|
132
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
156
133
|
"content-type": "application/json",
|
|
157
|
-
|
|
158
|
-
};
|
|
134
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
135
|
+
});
|
|
159
136
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans";
|
|
160
|
-
|
|
161
|
-
const labelValue = input.ChannelArn;
|
|
162
|
-
if (labelValue.length <= 0) {
|
|
163
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
164
|
-
}
|
|
165
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
169
|
-
}
|
|
137
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
170
138
|
let body;
|
|
171
139
|
body = JSON.stringify({
|
|
172
140
|
...(input.MemberArn != null && { MemberArn: input.MemberArn }),
|
|
@@ -209,24 +177,16 @@ const serializeAws_restJson1CreateChannelFlowCommand = async (input, context) =>
|
|
|
209
177
|
exports.serializeAws_restJson1CreateChannelFlowCommand = serializeAws_restJson1CreateChannelFlowCommand;
|
|
210
178
|
const serializeAws_restJson1CreateChannelMembershipCommand = async (input, context) => {
|
|
211
179
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
212
|
-
const headers = {
|
|
180
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
213
181
|
"content-type": "application/json",
|
|
214
|
-
|
|
215
|
-
};
|
|
182
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
183
|
+
});
|
|
216
184
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
|
|
217
|
-
|
|
218
|
-
const labelValue = input.ChannelArn;
|
|
219
|
-
if (labelValue.length <= 0) {
|
|
220
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
221
|
-
}
|
|
222
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
226
|
-
}
|
|
185
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
227
186
|
let body;
|
|
228
187
|
body = JSON.stringify({
|
|
229
188
|
...(input.MemberArn != null && { MemberArn: input.MemberArn }),
|
|
189
|
+
...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }),
|
|
230
190
|
...(input.Type != null && { Type: input.Type }),
|
|
231
191
|
});
|
|
232
192
|
return new protocol_http_1.HttpRequest({
|
|
@@ -242,21 +202,12 @@ const serializeAws_restJson1CreateChannelMembershipCommand = async (input, conte
|
|
|
242
202
|
exports.serializeAws_restJson1CreateChannelMembershipCommand = serializeAws_restJson1CreateChannelMembershipCommand;
|
|
243
203
|
const serializeAws_restJson1CreateChannelModeratorCommand = async (input, context) => {
|
|
244
204
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
245
|
-
const headers = {
|
|
205
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
246
206
|
"content-type": "application/json",
|
|
247
|
-
|
|
248
|
-
};
|
|
207
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
208
|
+
});
|
|
249
209
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators";
|
|
250
|
-
|
|
251
|
-
const labelValue = input.ChannelArn;
|
|
252
|
-
if (labelValue.length <= 0) {
|
|
253
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
254
|
-
}
|
|
255
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
259
|
-
}
|
|
210
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
260
211
|
let body;
|
|
261
212
|
body = JSON.stringify({
|
|
262
213
|
...(input.ChannelModeratorArn != null && { ChannelModeratorArn: input.ChannelModeratorArn }),
|
|
@@ -274,20 +225,14 @@ const serializeAws_restJson1CreateChannelModeratorCommand = async (input, contex
|
|
|
274
225
|
exports.serializeAws_restJson1CreateChannelModeratorCommand = serializeAws_restJson1CreateChannelModeratorCommand;
|
|
275
226
|
const serializeAws_restJson1DeleteChannelCommand = async (input, context) => {
|
|
276
227
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
277
|
-
const headers = {
|
|
278
|
-
|
|
279
|
-
};
|
|
228
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
229
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
230
|
+
});
|
|
280
231
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
287
|
-
}
|
|
288
|
-
else {
|
|
289
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
290
|
-
}
|
|
232
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
233
|
+
const query = map({
|
|
234
|
+
"sub-channel-id": [, input.SubChannelId],
|
|
235
|
+
});
|
|
291
236
|
let body;
|
|
292
237
|
return new protocol_http_1.HttpRequest({
|
|
293
238
|
protocol,
|
|
@@ -296,36 +241,19 @@ const serializeAws_restJson1DeleteChannelCommand = async (input, context) => {
|
|
|
296
241
|
method: "DELETE",
|
|
297
242
|
headers,
|
|
298
243
|
path: resolvedPath,
|
|
244
|
+
query,
|
|
299
245
|
body,
|
|
300
246
|
});
|
|
301
247
|
};
|
|
302
248
|
exports.serializeAws_restJson1DeleteChannelCommand = serializeAws_restJson1DeleteChannelCommand;
|
|
303
249
|
const serializeAws_restJson1DeleteChannelBanCommand = async (input, context) => {
|
|
304
250
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
305
|
-
const headers = {
|
|
306
|
-
|
|
307
|
-
};
|
|
251
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
252
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
253
|
+
});
|
|
308
254
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans/{MemberArn}";
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
if (labelValue.length <= 0) {
|
|
312
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
313
|
-
}
|
|
314
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
317
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
318
|
-
}
|
|
319
|
-
if (input.MemberArn !== undefined) {
|
|
320
|
-
const labelValue = input.MemberArn;
|
|
321
|
-
if (labelValue.length <= 0) {
|
|
322
|
-
throw new Error("Empty value provided for input HTTP label: MemberArn.");
|
|
323
|
-
}
|
|
324
|
-
resolvedPath = resolvedPath.replace("{MemberArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
325
|
-
}
|
|
326
|
-
else {
|
|
327
|
-
throw new Error("No value provided for input HTTP label: MemberArn.");
|
|
328
|
-
}
|
|
255
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
256
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
|
|
329
257
|
let body;
|
|
330
258
|
return new protocol_http_1.HttpRequest({
|
|
331
259
|
protocol,
|
|
@@ -342,16 +270,7 @@ const serializeAws_restJson1DeleteChannelFlowCommand = async (input, context) =>
|
|
|
342
270
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
343
271
|
const headers = {};
|
|
344
272
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows/{ChannelFlowArn}";
|
|
345
|
-
|
|
346
|
-
const labelValue = input.ChannelFlowArn;
|
|
347
|
-
if (labelValue.length <= 0) {
|
|
348
|
-
throw new Error("Empty value provided for input HTTP label: ChannelFlowArn.");
|
|
349
|
-
}
|
|
350
|
-
resolvedPath = resolvedPath.replace("{ChannelFlowArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
throw new Error("No value provided for input HTTP label: ChannelFlowArn.");
|
|
354
|
-
}
|
|
273
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelFlowArn", () => input.ChannelFlowArn, "{ChannelFlowArn}", false);
|
|
355
274
|
let body;
|
|
356
275
|
return new protocol_http_1.HttpRequest({
|
|
357
276
|
protocol,
|
|
@@ -366,31 +285,16 @@ const serializeAws_restJson1DeleteChannelFlowCommand = async (input, context) =>
|
|
|
366
285
|
exports.serializeAws_restJson1DeleteChannelFlowCommand = serializeAws_restJson1DeleteChannelFlowCommand;
|
|
367
286
|
const serializeAws_restJson1DeleteChannelMembershipCommand = async (input, context) => {
|
|
368
287
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
369
|
-
const headers = {
|
|
370
|
-
|
|
371
|
-
};
|
|
288
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
289
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
290
|
+
});
|
|
372
291
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
373
292
|
"/channels/{ChannelArn}/memberships/{MemberArn}";
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
380
|
-
}
|
|
381
|
-
else {
|
|
382
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
383
|
-
}
|
|
384
|
-
if (input.MemberArn !== undefined) {
|
|
385
|
-
const labelValue = input.MemberArn;
|
|
386
|
-
if (labelValue.length <= 0) {
|
|
387
|
-
throw new Error("Empty value provided for input HTTP label: MemberArn.");
|
|
388
|
-
}
|
|
389
|
-
resolvedPath = resolvedPath.replace("{MemberArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
390
|
-
}
|
|
391
|
-
else {
|
|
392
|
-
throw new Error("No value provided for input HTTP label: MemberArn.");
|
|
393
|
-
}
|
|
293
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
294
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
|
|
295
|
+
const query = map({
|
|
296
|
+
"sub-channel-id": [, input.SubChannelId],
|
|
297
|
+
});
|
|
394
298
|
let body;
|
|
395
299
|
return new protocol_http_1.HttpRequest({
|
|
396
300
|
protocol,
|
|
@@ -399,37 +303,23 @@ const serializeAws_restJson1DeleteChannelMembershipCommand = async (input, conte
|
|
|
399
303
|
method: "DELETE",
|
|
400
304
|
headers,
|
|
401
305
|
path: resolvedPath,
|
|
306
|
+
query,
|
|
402
307
|
body,
|
|
403
308
|
});
|
|
404
309
|
};
|
|
405
310
|
exports.serializeAws_restJson1DeleteChannelMembershipCommand = serializeAws_restJson1DeleteChannelMembershipCommand;
|
|
406
311
|
const serializeAws_restJson1DeleteChannelMessageCommand = async (input, context) => {
|
|
407
312
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
408
|
-
const headers = {
|
|
409
|
-
|
|
410
|
-
};
|
|
313
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
314
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
315
|
+
});
|
|
411
316
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
412
317
|
"/channels/{ChannelArn}/messages/{MessageId}";
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
419
|
-
}
|
|
420
|
-
else {
|
|
421
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
422
|
-
}
|
|
423
|
-
if (input.MessageId !== undefined) {
|
|
424
|
-
const labelValue = input.MessageId;
|
|
425
|
-
if (labelValue.length <= 0) {
|
|
426
|
-
throw new Error("Empty value provided for input HTTP label: MessageId.");
|
|
427
|
-
}
|
|
428
|
-
resolvedPath = resolvedPath.replace("{MessageId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
429
|
-
}
|
|
430
|
-
else {
|
|
431
|
-
throw new Error("No value provided for input HTTP label: MessageId.");
|
|
432
|
-
}
|
|
318
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
319
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
|
|
320
|
+
const query = map({
|
|
321
|
+
"sub-channel-id": [, input.SubChannelId],
|
|
322
|
+
});
|
|
433
323
|
let body;
|
|
434
324
|
return new protocol_http_1.HttpRequest({
|
|
435
325
|
protocol,
|
|
@@ -438,37 +328,20 @@ const serializeAws_restJson1DeleteChannelMessageCommand = async (input, context)
|
|
|
438
328
|
method: "DELETE",
|
|
439
329
|
headers,
|
|
440
330
|
path: resolvedPath,
|
|
331
|
+
query,
|
|
441
332
|
body,
|
|
442
333
|
});
|
|
443
334
|
};
|
|
444
335
|
exports.serializeAws_restJson1DeleteChannelMessageCommand = serializeAws_restJson1DeleteChannelMessageCommand;
|
|
445
336
|
const serializeAws_restJson1DeleteChannelModeratorCommand = async (input, context) => {
|
|
446
337
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
447
|
-
const headers = {
|
|
448
|
-
|
|
449
|
-
};
|
|
338
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
339
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
340
|
+
});
|
|
450
341
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
451
342
|
"/channels/{ChannelArn}/moderators/{ChannelModeratorArn}";
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
if (labelValue.length <= 0) {
|
|
455
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
456
|
-
}
|
|
457
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
458
|
-
}
|
|
459
|
-
else {
|
|
460
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
461
|
-
}
|
|
462
|
-
if (input.ChannelModeratorArn !== undefined) {
|
|
463
|
-
const labelValue = input.ChannelModeratorArn;
|
|
464
|
-
if (labelValue.length <= 0) {
|
|
465
|
-
throw new Error("Empty value provided for input HTTP label: ChannelModeratorArn.");
|
|
466
|
-
}
|
|
467
|
-
resolvedPath = resolvedPath.replace("{ChannelModeratorArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
468
|
-
}
|
|
469
|
-
else {
|
|
470
|
-
throw new Error("No value provided for input HTTP label: ChannelModeratorArn.");
|
|
471
|
-
}
|
|
343
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
344
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelModeratorArn", () => input.ChannelModeratorArn, "{ChannelModeratorArn}", false);
|
|
472
345
|
let body;
|
|
473
346
|
return new protocol_http_1.HttpRequest({
|
|
474
347
|
protocol,
|
|
@@ -483,20 +356,11 @@ const serializeAws_restJson1DeleteChannelModeratorCommand = async (input, contex
|
|
|
483
356
|
exports.serializeAws_restJson1DeleteChannelModeratorCommand = serializeAws_restJson1DeleteChannelModeratorCommand;
|
|
484
357
|
const serializeAws_restJson1DescribeChannelCommand = async (input, context) => {
|
|
485
358
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
486
|
-
const headers = {
|
|
487
|
-
|
|
488
|
-
};
|
|
359
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
360
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
361
|
+
});
|
|
489
362
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
|
|
490
|
-
|
|
491
|
-
const labelValue = input.ChannelArn;
|
|
492
|
-
if (labelValue.length <= 0) {
|
|
493
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
494
|
-
}
|
|
495
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
496
|
-
}
|
|
497
|
-
else {
|
|
498
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
499
|
-
}
|
|
363
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
500
364
|
let body;
|
|
501
365
|
return new protocol_http_1.HttpRequest({
|
|
502
366
|
protocol,
|
|
@@ -511,30 +375,12 @@ const serializeAws_restJson1DescribeChannelCommand = async (input, context) => {
|
|
|
511
375
|
exports.serializeAws_restJson1DescribeChannelCommand = serializeAws_restJson1DescribeChannelCommand;
|
|
512
376
|
const serializeAws_restJson1DescribeChannelBanCommand = async (input, context) => {
|
|
513
377
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
514
|
-
const headers = {
|
|
515
|
-
|
|
516
|
-
};
|
|
378
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
379
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
380
|
+
});
|
|
517
381
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans/{MemberArn}";
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
if (labelValue.length <= 0) {
|
|
521
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
522
|
-
}
|
|
523
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
524
|
-
}
|
|
525
|
-
else {
|
|
526
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
527
|
-
}
|
|
528
|
-
if (input.MemberArn !== undefined) {
|
|
529
|
-
const labelValue = input.MemberArn;
|
|
530
|
-
if (labelValue.length <= 0) {
|
|
531
|
-
throw new Error("Empty value provided for input HTTP label: MemberArn.");
|
|
532
|
-
}
|
|
533
|
-
resolvedPath = resolvedPath.replace("{MemberArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
534
|
-
}
|
|
535
|
-
else {
|
|
536
|
-
throw new Error("No value provided for input HTTP label: MemberArn.");
|
|
537
|
-
}
|
|
382
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
383
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
|
|
538
384
|
let body;
|
|
539
385
|
return new protocol_http_1.HttpRequest({
|
|
540
386
|
protocol,
|
|
@@ -551,16 +397,7 @@ const serializeAws_restJson1DescribeChannelFlowCommand = async (input, context)
|
|
|
551
397
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
552
398
|
const headers = {};
|
|
553
399
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows/{ChannelFlowArn}";
|
|
554
|
-
|
|
555
|
-
const labelValue = input.ChannelFlowArn;
|
|
556
|
-
if (labelValue.length <= 0) {
|
|
557
|
-
throw new Error("Empty value provided for input HTTP label: ChannelFlowArn.");
|
|
558
|
-
}
|
|
559
|
-
resolvedPath = resolvedPath.replace("{ChannelFlowArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
560
|
-
}
|
|
561
|
-
else {
|
|
562
|
-
throw new Error("No value provided for input HTTP label: ChannelFlowArn.");
|
|
563
|
-
}
|
|
400
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelFlowArn", () => input.ChannelFlowArn, "{ChannelFlowArn}", false);
|
|
564
401
|
let body;
|
|
565
402
|
return new protocol_http_1.HttpRequest({
|
|
566
403
|
protocol,
|
|
@@ -575,31 +412,16 @@ const serializeAws_restJson1DescribeChannelFlowCommand = async (input, context)
|
|
|
575
412
|
exports.serializeAws_restJson1DescribeChannelFlowCommand = serializeAws_restJson1DescribeChannelFlowCommand;
|
|
576
413
|
const serializeAws_restJson1DescribeChannelMembershipCommand = async (input, context) => {
|
|
577
414
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
578
|
-
const headers = {
|
|
579
|
-
|
|
580
|
-
};
|
|
415
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
416
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
417
|
+
});
|
|
581
418
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
582
419
|
"/channels/{ChannelArn}/memberships/{MemberArn}";
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
589
|
-
}
|
|
590
|
-
else {
|
|
591
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
592
|
-
}
|
|
593
|
-
if (input.MemberArn !== undefined) {
|
|
594
|
-
const labelValue = input.MemberArn;
|
|
595
|
-
if (labelValue.length <= 0) {
|
|
596
|
-
throw new Error("Empty value provided for input HTTP label: MemberArn.");
|
|
597
|
-
}
|
|
598
|
-
resolvedPath = resolvedPath.replace("{MemberArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
599
|
-
}
|
|
600
|
-
else {
|
|
601
|
-
throw new Error("No value provided for input HTTP label: MemberArn.");
|
|
602
|
-
}
|
|
420
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
421
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
|
|
422
|
+
const query = map({
|
|
423
|
+
"sub-channel-id": [, input.SubChannelId],
|
|
424
|
+
});
|
|
603
425
|
let body;
|
|
604
426
|
return new protocol_http_1.HttpRequest({
|
|
605
427
|
protocol,
|
|
@@ -608,30 +430,22 @@ const serializeAws_restJson1DescribeChannelMembershipCommand = async (input, con
|
|
|
608
430
|
method: "GET",
|
|
609
431
|
headers,
|
|
610
432
|
path: resolvedPath,
|
|
433
|
+
query,
|
|
611
434
|
body,
|
|
612
435
|
});
|
|
613
436
|
};
|
|
614
437
|
exports.serializeAws_restJson1DescribeChannelMembershipCommand = serializeAws_restJson1DescribeChannelMembershipCommand;
|
|
615
438
|
const serializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand = async (input, context) => {
|
|
616
439
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
617
|
-
const headers = {
|
|
618
|
-
|
|
619
|
-
};
|
|
440
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
441
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
442
|
+
});
|
|
620
443
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
627
|
-
}
|
|
628
|
-
else {
|
|
629
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
630
|
-
}
|
|
631
|
-
const query = {
|
|
632
|
-
scope: "app-instance-user-membership",
|
|
633
|
-
...(input.AppInstanceUserArn !== undefined && { "app-instance-user-arn": input.AppInstanceUserArn }),
|
|
634
|
-
};
|
|
444
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
445
|
+
const query = map({
|
|
446
|
+
scope: [, "app-instance-user-membership"],
|
|
447
|
+
"app-instance-user-arn": [, input.AppInstanceUserArn],
|
|
448
|
+
});
|
|
635
449
|
let body;
|
|
636
450
|
return new protocol_http_1.HttpRequest({
|
|
637
451
|
protocol,
|
|
@@ -647,24 +461,15 @@ const serializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand =
|
|
|
647
461
|
exports.serializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand = serializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand;
|
|
648
462
|
const serializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = async (input, context) => {
|
|
649
463
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
650
|
-
const headers = {
|
|
651
|
-
|
|
652
|
-
};
|
|
464
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
465
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
466
|
+
});
|
|
653
467
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
660
|
-
}
|
|
661
|
-
else {
|
|
662
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
663
|
-
}
|
|
664
|
-
const query = {
|
|
665
|
-
scope: "app-instance-user-moderated-channel",
|
|
666
|
-
...(input.AppInstanceUserArn !== undefined && { "app-instance-user-arn": input.AppInstanceUserArn }),
|
|
667
|
-
};
|
|
468
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
469
|
+
const query = map({
|
|
470
|
+
scope: [, "app-instance-user-moderated-channel"],
|
|
471
|
+
"app-instance-user-arn": [, input.AppInstanceUserArn],
|
|
472
|
+
});
|
|
668
473
|
let body;
|
|
669
474
|
return new protocol_http_1.HttpRequest({
|
|
670
475
|
protocol,
|
|
@@ -680,31 +485,13 @@ const serializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = a
|
|
|
680
485
|
exports.serializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = serializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand;
|
|
681
486
|
const serializeAws_restJson1DescribeChannelModeratorCommand = async (input, context) => {
|
|
682
487
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
683
|
-
const headers = {
|
|
684
|
-
|
|
685
|
-
};
|
|
488
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
489
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
490
|
+
});
|
|
686
491
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
687
492
|
"/channels/{ChannelArn}/moderators/{ChannelModeratorArn}";
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
if (labelValue.length <= 0) {
|
|
691
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
692
|
-
}
|
|
693
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
694
|
-
}
|
|
695
|
-
else {
|
|
696
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
697
|
-
}
|
|
698
|
-
if (input.ChannelModeratorArn !== undefined) {
|
|
699
|
-
const labelValue = input.ChannelModeratorArn;
|
|
700
|
-
if (labelValue.length <= 0) {
|
|
701
|
-
throw new Error("Empty value provided for input HTTP label: ChannelModeratorArn.");
|
|
702
|
-
}
|
|
703
|
-
resolvedPath = resolvedPath.replace("{ChannelModeratorArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
704
|
-
}
|
|
705
|
-
else {
|
|
706
|
-
throw new Error("No value provided for input HTTP label: ChannelModeratorArn.");
|
|
707
|
-
}
|
|
493
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
494
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelModeratorArn", () => input.ChannelModeratorArn, "{ChannelModeratorArn}", false);
|
|
708
495
|
let body;
|
|
709
496
|
return new protocol_http_1.HttpRequest({
|
|
710
497
|
protocol,
|
|
@@ -719,31 +506,13 @@ const serializeAws_restJson1DescribeChannelModeratorCommand = async (input, cont
|
|
|
719
506
|
exports.serializeAws_restJson1DescribeChannelModeratorCommand = serializeAws_restJson1DescribeChannelModeratorCommand;
|
|
720
507
|
const serializeAws_restJson1DisassociateChannelFlowCommand = async (input, context) => {
|
|
721
508
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
722
|
-
const headers = {
|
|
723
|
-
|
|
724
|
-
};
|
|
509
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
510
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
511
|
+
});
|
|
725
512
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
726
513
|
"/channels/{ChannelArn}/channel-flow/{ChannelFlowArn}";
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
if (labelValue.length <= 0) {
|
|
730
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
731
|
-
}
|
|
732
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
733
|
-
}
|
|
734
|
-
else {
|
|
735
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
736
|
-
}
|
|
737
|
-
if (input.ChannelFlowArn !== undefined) {
|
|
738
|
-
const labelValue = input.ChannelFlowArn;
|
|
739
|
-
if (labelValue.length <= 0) {
|
|
740
|
-
throw new Error("Empty value provided for input HTTP label: ChannelFlowArn.");
|
|
741
|
-
}
|
|
742
|
-
resolvedPath = resolvedPath.replace("{ChannelFlowArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
743
|
-
}
|
|
744
|
-
else {
|
|
745
|
-
throw new Error("No value provided for input HTTP label: ChannelFlowArn.");
|
|
746
|
-
}
|
|
514
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
515
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelFlowArn", () => input.ChannelFlowArn, "{ChannelFlowArn}", false);
|
|
747
516
|
let body;
|
|
748
517
|
return new protocol_http_1.HttpRequest({
|
|
749
518
|
protocol,
|
|
@@ -758,31 +527,13 @@ const serializeAws_restJson1DisassociateChannelFlowCommand = async (input, conte
|
|
|
758
527
|
exports.serializeAws_restJson1DisassociateChannelFlowCommand = serializeAws_restJson1DisassociateChannelFlowCommand;
|
|
759
528
|
const serializeAws_restJson1GetChannelMembershipPreferencesCommand = async (input, context) => {
|
|
760
529
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
761
|
-
const headers = {
|
|
762
|
-
|
|
763
|
-
};
|
|
530
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
531
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
532
|
+
});
|
|
764
533
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
765
534
|
"/channels/{ChannelArn}/memberships/{MemberArn}/preferences";
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
if (labelValue.length <= 0) {
|
|
769
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
770
|
-
}
|
|
771
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
772
|
-
}
|
|
773
|
-
else {
|
|
774
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
775
|
-
}
|
|
776
|
-
if (input.MemberArn !== undefined) {
|
|
777
|
-
const labelValue = input.MemberArn;
|
|
778
|
-
if (labelValue.length <= 0) {
|
|
779
|
-
throw new Error("Empty value provided for input HTTP label: MemberArn.");
|
|
780
|
-
}
|
|
781
|
-
resolvedPath = resolvedPath.replace("{MemberArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
782
|
-
}
|
|
783
|
-
else {
|
|
784
|
-
throw new Error("No value provided for input HTTP label: MemberArn.");
|
|
785
|
-
}
|
|
535
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
536
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
|
|
786
537
|
let body;
|
|
787
538
|
return new protocol_http_1.HttpRequest({
|
|
788
539
|
protocol,
|
|
@@ -797,31 +548,16 @@ const serializeAws_restJson1GetChannelMembershipPreferencesCommand = async (inpu
|
|
|
797
548
|
exports.serializeAws_restJson1GetChannelMembershipPreferencesCommand = serializeAws_restJson1GetChannelMembershipPreferencesCommand;
|
|
798
549
|
const serializeAws_restJson1GetChannelMessageCommand = async (input, context) => {
|
|
799
550
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
800
|
-
const headers = {
|
|
801
|
-
|
|
802
|
-
};
|
|
551
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
552
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
553
|
+
});
|
|
803
554
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
804
555
|
"/channels/{ChannelArn}/messages/{MessageId}";
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
811
|
-
}
|
|
812
|
-
else {
|
|
813
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
814
|
-
}
|
|
815
|
-
if (input.MessageId !== undefined) {
|
|
816
|
-
const labelValue = input.MessageId;
|
|
817
|
-
if (labelValue.length <= 0) {
|
|
818
|
-
throw new Error("Empty value provided for input HTTP label: MessageId.");
|
|
819
|
-
}
|
|
820
|
-
resolvedPath = resolvedPath.replace("{MessageId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
821
|
-
}
|
|
822
|
-
else {
|
|
823
|
-
throw new Error("No value provided for input HTTP label: MessageId.");
|
|
824
|
-
}
|
|
556
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
557
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
|
|
558
|
+
const query = map({
|
|
559
|
+
"sub-channel-id": [, input.SubChannelId],
|
|
560
|
+
});
|
|
825
561
|
let body;
|
|
826
562
|
return new protocol_http_1.HttpRequest({
|
|
827
563
|
protocol,
|
|
@@ -830,40 +566,24 @@ const serializeAws_restJson1GetChannelMessageCommand = async (input, context) =>
|
|
|
830
566
|
method: "GET",
|
|
831
567
|
headers,
|
|
832
568
|
path: resolvedPath,
|
|
569
|
+
query,
|
|
833
570
|
body,
|
|
834
571
|
});
|
|
835
572
|
};
|
|
836
573
|
exports.serializeAws_restJson1GetChannelMessageCommand = serializeAws_restJson1GetChannelMessageCommand;
|
|
837
574
|
const serializeAws_restJson1GetChannelMessageStatusCommand = async (input, context) => {
|
|
838
575
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
839
|
-
const headers = {
|
|
840
|
-
|
|
841
|
-
};
|
|
576
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
577
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
578
|
+
});
|
|
842
579
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
843
580
|
"/channels/{ChannelArn}/messages/{MessageId}";
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
}
|
|
851
|
-
else {
|
|
852
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
853
|
-
}
|
|
854
|
-
if (input.MessageId !== undefined) {
|
|
855
|
-
const labelValue = input.MessageId;
|
|
856
|
-
if (labelValue.length <= 0) {
|
|
857
|
-
throw new Error("Empty value provided for input HTTP label: MessageId.");
|
|
858
|
-
}
|
|
859
|
-
resolvedPath = resolvedPath.replace("{MessageId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
860
|
-
}
|
|
861
|
-
else {
|
|
862
|
-
throw new Error("No value provided for input HTTP label: MessageId.");
|
|
863
|
-
}
|
|
864
|
-
const query = {
|
|
865
|
-
scope: "message-status",
|
|
866
|
-
};
|
|
581
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
582
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
|
|
583
|
+
const query = map({
|
|
584
|
+
scope: [, "message-status"],
|
|
585
|
+
"sub-channel-id": [, input.SubChannelId],
|
|
586
|
+
});
|
|
867
587
|
let body;
|
|
868
588
|
return new protocol_http_1.HttpRequest({
|
|
869
589
|
protocol,
|
|
@@ -898,24 +618,15 @@ const serializeAws_restJson1GetMessagingSessionEndpointCommand = async (input, c
|
|
|
898
618
|
exports.serializeAws_restJson1GetMessagingSessionEndpointCommand = serializeAws_restJson1GetMessagingSessionEndpointCommand;
|
|
899
619
|
const serializeAws_restJson1ListChannelBansCommand = async (input, context) => {
|
|
900
620
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
901
|
-
const headers = {
|
|
902
|
-
|
|
903
|
-
};
|
|
621
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
622
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
623
|
+
});
|
|
904
624
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans";
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
911
|
-
}
|
|
912
|
-
else {
|
|
913
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
914
|
-
}
|
|
915
|
-
const query = {
|
|
916
|
-
...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
|
|
917
|
-
...(input.NextToken !== undefined && { "next-token": input.NextToken }),
|
|
918
|
-
};
|
|
625
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
626
|
+
const query = map({
|
|
627
|
+
"max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
628
|
+
"next-token": [, input.NextToken],
|
|
629
|
+
});
|
|
919
630
|
let body;
|
|
920
631
|
return new protocol_http_1.HttpRequest({
|
|
921
632
|
protocol,
|
|
@@ -933,11 +644,11 @@ const serializeAws_restJson1ListChannelFlowsCommand = async (input, context) =>
|
|
|
933
644
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
934
645
|
const headers = {};
|
|
935
646
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows";
|
|
936
|
-
const query = {
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
};
|
|
647
|
+
const query = map({
|
|
648
|
+
"app-instance-arn": [, input.AppInstanceArn],
|
|
649
|
+
"max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
650
|
+
"next-token": [, input.NextToken],
|
|
651
|
+
});
|
|
941
652
|
let body;
|
|
942
653
|
return new protocol_http_1.HttpRequest({
|
|
943
654
|
protocol,
|
|
@@ -953,25 +664,17 @@ const serializeAws_restJson1ListChannelFlowsCommand = async (input, context) =>
|
|
|
953
664
|
exports.serializeAws_restJson1ListChannelFlowsCommand = serializeAws_restJson1ListChannelFlowsCommand;
|
|
954
665
|
const serializeAws_restJson1ListChannelMembershipsCommand = async (input, context) => {
|
|
955
666
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
956
|
-
const headers = {
|
|
957
|
-
|
|
958
|
-
};
|
|
667
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
668
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
669
|
+
});
|
|
959
670
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
}
|
|
967
|
-
else {
|
|
968
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
969
|
-
}
|
|
970
|
-
const query = {
|
|
971
|
-
...(input.Type !== undefined && { type: input.Type }),
|
|
972
|
-
...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
|
|
973
|
-
...(input.NextToken !== undefined && { "next-token": input.NextToken }),
|
|
974
|
-
};
|
|
671
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
672
|
+
const query = map({
|
|
673
|
+
type: [, input.Type],
|
|
674
|
+
"max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
675
|
+
"next-token": [, input.NextToken],
|
|
676
|
+
"sub-channel-id": [, input.SubChannelId],
|
|
677
|
+
});
|
|
975
678
|
let body;
|
|
976
679
|
return new protocol_http_1.HttpRequest({
|
|
977
680
|
protocol,
|
|
@@ -987,16 +690,16 @@ const serializeAws_restJson1ListChannelMembershipsCommand = async (input, contex
|
|
|
987
690
|
exports.serializeAws_restJson1ListChannelMembershipsCommand = serializeAws_restJson1ListChannelMembershipsCommand;
|
|
988
691
|
const serializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = async (input, context) => {
|
|
989
692
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
990
|
-
const headers = {
|
|
991
|
-
|
|
992
|
-
};
|
|
693
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
694
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
695
|
+
});
|
|
993
696
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
|
|
994
|
-
const query = {
|
|
995
|
-
scope: "app-instance-user-memberships",
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
};
|
|
697
|
+
const query = map({
|
|
698
|
+
scope: [, "app-instance-user-memberships"],
|
|
699
|
+
"app-instance-user-arn": [, input.AppInstanceUserArn],
|
|
700
|
+
"max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
701
|
+
"next-token": [, input.NextToken],
|
|
702
|
+
});
|
|
1000
703
|
let body;
|
|
1001
704
|
return new protocol_http_1.HttpRequest({
|
|
1002
705
|
protocol,
|
|
@@ -1012,29 +715,25 @@ const serializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = as
|
|
|
1012
715
|
exports.serializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = serializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand;
|
|
1013
716
|
const serializeAws_restJson1ListChannelMessagesCommand = async (input, context) => {
|
|
1014
717
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1015
|
-
const headers = {
|
|
1016
|
-
|
|
1017
|
-
};
|
|
718
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
719
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
720
|
+
});
|
|
1018
721
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages";
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
...(input.NotAfter !== undefined && { "not-after": (input.NotAfter.toISOString().split(".")[0] + "Z").toString() }),
|
|
1035
|
-
...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
|
|
1036
|
-
...(input.NextToken !== undefined && { "next-token": input.NextToken }),
|
|
1037
|
-
};
|
|
722
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
723
|
+
const query = map({
|
|
724
|
+
"sort-order": [, input.SortOrder],
|
|
725
|
+
"not-before": [
|
|
726
|
+
() => input.NotBefore !== void 0,
|
|
727
|
+
() => (input.NotBefore.toISOString().split(".")[0] + "Z").toString(),
|
|
728
|
+
],
|
|
729
|
+
"not-after": [
|
|
730
|
+
() => input.NotAfter !== void 0,
|
|
731
|
+
() => (input.NotAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
732
|
+
],
|
|
733
|
+
"max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
734
|
+
"next-token": [, input.NextToken],
|
|
735
|
+
"sub-channel-id": [, input.SubChannelId],
|
|
736
|
+
});
|
|
1038
737
|
let body;
|
|
1039
738
|
return new protocol_http_1.HttpRequest({
|
|
1040
739
|
protocol,
|
|
@@ -1050,24 +749,15 @@ const serializeAws_restJson1ListChannelMessagesCommand = async (input, context)
|
|
|
1050
749
|
exports.serializeAws_restJson1ListChannelMessagesCommand = serializeAws_restJson1ListChannelMessagesCommand;
|
|
1051
750
|
const serializeAws_restJson1ListChannelModeratorsCommand = async (input, context) => {
|
|
1052
751
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1053
|
-
const headers = {
|
|
1054
|
-
|
|
1055
|
-
};
|
|
752
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
753
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
754
|
+
});
|
|
1056
755
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators";
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1063
|
-
}
|
|
1064
|
-
else {
|
|
1065
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
1066
|
-
}
|
|
1067
|
-
const query = {
|
|
1068
|
-
...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
|
|
1069
|
-
...(input.NextToken !== undefined && { "next-token": input.NextToken }),
|
|
1070
|
-
};
|
|
756
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
757
|
+
const query = map({
|
|
758
|
+
"max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
759
|
+
"next-token": [, input.NextToken],
|
|
760
|
+
});
|
|
1071
761
|
let body;
|
|
1072
762
|
return new protocol_http_1.HttpRequest({
|
|
1073
763
|
protocol,
|
|
@@ -1083,16 +773,16 @@ const serializeAws_restJson1ListChannelModeratorsCommand = async (input, context
|
|
|
1083
773
|
exports.serializeAws_restJson1ListChannelModeratorsCommand = serializeAws_restJson1ListChannelModeratorsCommand;
|
|
1084
774
|
const serializeAws_restJson1ListChannelsCommand = async (input, context) => {
|
|
1085
775
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1086
|
-
const headers = {
|
|
1087
|
-
|
|
1088
|
-
};
|
|
776
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
777
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
778
|
+
});
|
|
1089
779
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
|
|
1090
|
-
const query = {
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
};
|
|
780
|
+
const query = map({
|
|
781
|
+
"app-instance-arn": [, input.AppInstanceArn],
|
|
782
|
+
privacy: [, input.Privacy],
|
|
783
|
+
"max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
784
|
+
"next-token": [, input.NextToken],
|
|
785
|
+
});
|
|
1096
786
|
let body;
|
|
1097
787
|
return new protocol_http_1.HttpRequest({
|
|
1098
788
|
protocol,
|
|
@@ -1110,12 +800,12 @@ const serializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = async
|
|
|
1110
800
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1111
801
|
const headers = {};
|
|
1112
802
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
|
|
1113
|
-
const query = {
|
|
1114
|
-
scope: "channel-flow-associations",
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
};
|
|
803
|
+
const query = map({
|
|
804
|
+
scope: [, "channel-flow-associations"],
|
|
805
|
+
"channel-flow-arn": [, input.ChannelFlowArn],
|
|
806
|
+
"max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
807
|
+
"next-token": [, input.NextToken],
|
|
808
|
+
});
|
|
1119
809
|
let body;
|
|
1120
810
|
return new protocol_http_1.HttpRequest({
|
|
1121
811
|
protocol,
|
|
@@ -1131,16 +821,16 @@ const serializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = async
|
|
|
1131
821
|
exports.serializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = serializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand;
|
|
1132
822
|
const serializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = async (input, context) => {
|
|
1133
823
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1134
|
-
const headers = {
|
|
1135
|
-
|
|
1136
|
-
};
|
|
824
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
825
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
826
|
+
});
|
|
1137
827
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
|
|
1138
|
-
const query = {
|
|
1139
|
-
scope: "app-instance-user-moderated-channels",
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
};
|
|
828
|
+
const query = map({
|
|
829
|
+
scope: [, "app-instance-user-moderated-channels"],
|
|
830
|
+
"app-instance-user-arn": [, input.AppInstanceUserArn],
|
|
831
|
+
"max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
832
|
+
"next-token": [, input.NextToken],
|
|
833
|
+
});
|
|
1144
834
|
let body;
|
|
1145
835
|
return new protocol_http_1.HttpRequest({
|
|
1146
836
|
protocol,
|
|
@@ -1154,13 +844,37 @@ const serializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = asyn
|
|
|
1154
844
|
});
|
|
1155
845
|
};
|
|
1156
846
|
exports.serializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = serializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand;
|
|
847
|
+
const serializeAws_restJson1ListSubChannelsCommand = async (input, context) => {
|
|
848
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
849
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
850
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
851
|
+
});
|
|
852
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/subchannels";
|
|
853
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
854
|
+
const query = map({
|
|
855
|
+
"max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
856
|
+
"next-token": [, input.NextToken],
|
|
857
|
+
});
|
|
858
|
+
let body;
|
|
859
|
+
return new protocol_http_1.HttpRequest({
|
|
860
|
+
protocol,
|
|
861
|
+
hostname,
|
|
862
|
+
port,
|
|
863
|
+
method: "GET",
|
|
864
|
+
headers,
|
|
865
|
+
path: resolvedPath,
|
|
866
|
+
query,
|
|
867
|
+
body,
|
|
868
|
+
});
|
|
869
|
+
};
|
|
870
|
+
exports.serializeAws_restJson1ListSubChannelsCommand = serializeAws_restJson1ListSubChannelsCommand;
|
|
1157
871
|
const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
1158
872
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1159
873
|
const headers = {};
|
|
1160
874
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
|
|
1161
|
-
const query = {
|
|
1162
|
-
|
|
1163
|
-
};
|
|
875
|
+
const query = map({
|
|
876
|
+
arn: [, input.ResourceARN],
|
|
877
|
+
});
|
|
1164
878
|
let body;
|
|
1165
879
|
return new protocol_http_1.HttpRequest({
|
|
1166
880
|
protocol,
|
|
@@ -1175,33 +889,15 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
|
|
|
1175
889
|
};
|
|
1176
890
|
exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson1ListTagsForResourceCommand;
|
|
1177
891
|
const serializeAws_restJson1PutChannelMembershipPreferencesCommand = async (input, context) => {
|
|
1178
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1179
|
-
const headers = {
|
|
1180
|
-
"content-type": "application/json",
|
|
1181
|
-
|
|
1182
|
-
};
|
|
1183
|
-
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1184
|
-
"/channels/{ChannelArn}/memberships/{MemberArn}/preferences";
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
if (labelValue.length <= 0) {
|
|
1188
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
1189
|
-
}
|
|
1190
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1191
|
-
}
|
|
1192
|
-
else {
|
|
1193
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
1194
|
-
}
|
|
1195
|
-
if (input.MemberArn !== undefined) {
|
|
1196
|
-
const labelValue = input.MemberArn;
|
|
1197
|
-
if (labelValue.length <= 0) {
|
|
1198
|
-
throw new Error("Empty value provided for input HTTP label: MemberArn.");
|
|
1199
|
-
}
|
|
1200
|
-
resolvedPath = resolvedPath.replace("{MemberArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1201
|
-
}
|
|
1202
|
-
else {
|
|
1203
|
-
throw new Error("No value provided for input HTTP label: MemberArn.");
|
|
1204
|
-
}
|
|
892
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
893
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
894
|
+
"content-type": "application/json",
|
|
895
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
896
|
+
});
|
|
897
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
898
|
+
"/channels/{ChannelArn}/memberships/{MemberArn}/preferences";
|
|
899
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
900
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
|
|
1205
901
|
let body;
|
|
1206
902
|
body = JSON.stringify({
|
|
1207
903
|
...(input.Preferences != null && {
|
|
@@ -1221,35 +917,21 @@ const serializeAws_restJson1PutChannelMembershipPreferencesCommand = async (inpu
|
|
|
1221
917
|
exports.serializeAws_restJson1PutChannelMembershipPreferencesCommand = serializeAws_restJson1PutChannelMembershipPreferencesCommand;
|
|
1222
918
|
const serializeAws_restJson1RedactChannelMessageCommand = async (input, context) => {
|
|
1223
919
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1224
|
-
const headers = {
|
|
1225
|
-
|
|
1226
|
-
|
|
920
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
921
|
+
"content-type": "application/json",
|
|
922
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
923
|
+
});
|
|
1227
924
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1228
925
|
"/channels/{ChannelArn}/messages/{MessageId}";
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1235
|
-
}
|
|
1236
|
-
else {
|
|
1237
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
1238
|
-
}
|
|
1239
|
-
if (input.MessageId !== undefined) {
|
|
1240
|
-
const labelValue = input.MessageId;
|
|
1241
|
-
if (labelValue.length <= 0) {
|
|
1242
|
-
throw new Error("Empty value provided for input HTTP label: MessageId.");
|
|
1243
|
-
}
|
|
1244
|
-
resolvedPath = resolvedPath.replace("{MessageId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1245
|
-
}
|
|
1246
|
-
else {
|
|
1247
|
-
throw new Error("No value provided for input HTTP label: MessageId.");
|
|
1248
|
-
}
|
|
1249
|
-
const query = {
|
|
1250
|
-
operation: "redact",
|
|
1251
|
-
};
|
|
926
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
927
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
|
|
928
|
+
const query = map({
|
|
929
|
+
operation: [, "redact"],
|
|
930
|
+
});
|
|
1252
931
|
let body;
|
|
932
|
+
body = JSON.stringify({
|
|
933
|
+
...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }),
|
|
934
|
+
});
|
|
1253
935
|
return new protocol_http_1.HttpRequest({
|
|
1254
936
|
protocol,
|
|
1255
937
|
hostname,
|
|
@@ -1264,16 +946,16 @@ const serializeAws_restJson1RedactChannelMessageCommand = async (input, context)
|
|
|
1264
946
|
exports.serializeAws_restJson1RedactChannelMessageCommand = serializeAws_restJson1RedactChannelMessageCommand;
|
|
1265
947
|
const serializeAws_restJson1SearchChannelsCommand = async (input, context) => {
|
|
1266
948
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1267
|
-
const headers = {
|
|
949
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
1268
950
|
"content-type": "application/json",
|
|
1269
|
-
|
|
1270
|
-
};
|
|
951
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
952
|
+
});
|
|
1271
953
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
|
|
1272
|
-
const query = {
|
|
1273
|
-
operation: "search",
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
};
|
|
954
|
+
const query = map({
|
|
955
|
+
operation: [, "search"],
|
|
956
|
+
"max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
957
|
+
"next-token": [, input.NextToken],
|
|
958
|
+
});
|
|
1277
959
|
let body;
|
|
1278
960
|
body = JSON.stringify({
|
|
1279
961
|
...(input.Fields != null && { Fields: serializeAws_restJson1SearchFields(input.Fields, context) }),
|
|
@@ -1293,21 +975,12 @@ exports.serializeAws_restJson1SearchChannelsCommand = serializeAws_restJson1Sear
|
|
|
1293
975
|
const serializeAws_restJson1SendChannelMessageCommand = async (input, context) => {
|
|
1294
976
|
var _a;
|
|
1295
977
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1296
|
-
const headers = {
|
|
978
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
1297
979
|
"content-type": "application/json",
|
|
1298
|
-
|
|
1299
|
-
};
|
|
980
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
981
|
+
});
|
|
1300
982
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages";
|
|
1301
|
-
|
|
1302
|
-
const labelValue = input.ChannelArn;
|
|
1303
|
-
if (labelValue.length <= 0) {
|
|
1304
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
1305
|
-
}
|
|
1306
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1307
|
-
}
|
|
1308
|
-
else {
|
|
1309
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
1310
|
-
}
|
|
983
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
1311
984
|
let body;
|
|
1312
985
|
body = JSON.stringify({
|
|
1313
986
|
ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
@@ -1320,6 +993,7 @@ const serializeAws_restJson1SendChannelMessageCommand = async (input, context) =
|
|
|
1320
993
|
...(input.PushNotification != null && {
|
|
1321
994
|
PushNotification: serializeAws_restJson1PushNotificationConfiguration(input.PushNotification, context),
|
|
1322
995
|
}),
|
|
996
|
+
...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }),
|
|
1323
997
|
...(input.Type != null && { Type: input.Type }),
|
|
1324
998
|
});
|
|
1325
999
|
return new protocol_http_1.HttpRequest({
|
|
@@ -1339,9 +1013,9 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
1339
1013
|
"content-type": "application/json",
|
|
1340
1014
|
};
|
|
1341
1015
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
|
|
1342
|
-
const query = {
|
|
1343
|
-
operation: "tag-resource",
|
|
1344
|
-
};
|
|
1016
|
+
const query = map({
|
|
1017
|
+
operation: [, "tag-resource"],
|
|
1018
|
+
});
|
|
1345
1019
|
let body;
|
|
1346
1020
|
body = JSON.stringify({
|
|
1347
1021
|
...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
|
|
@@ -1365,9 +1039,9 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
|
1365
1039
|
"content-type": "application/json",
|
|
1366
1040
|
};
|
|
1367
1041
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
|
|
1368
|
-
const query = {
|
|
1369
|
-
operation: "untag-resource",
|
|
1370
|
-
};
|
|
1042
|
+
const query = map({
|
|
1043
|
+
operation: [, "untag-resource"],
|
|
1044
|
+
});
|
|
1371
1045
|
let body;
|
|
1372
1046
|
body = JSON.stringify({
|
|
1373
1047
|
...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
|
|
@@ -1387,21 +1061,12 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
|
1387
1061
|
exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
|
|
1388
1062
|
const serializeAws_restJson1UpdateChannelCommand = async (input, context) => {
|
|
1389
1063
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1390
|
-
const headers = {
|
|
1064
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
1391
1065
|
"content-type": "application/json",
|
|
1392
|
-
|
|
1393
|
-
};
|
|
1066
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
1067
|
+
});
|
|
1394
1068
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
|
|
1395
|
-
|
|
1396
|
-
const labelValue = input.ChannelArn;
|
|
1397
|
-
if (labelValue.length <= 0) {
|
|
1398
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
1399
|
-
}
|
|
1400
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1401
|
-
}
|
|
1402
|
-
else {
|
|
1403
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
1404
|
-
}
|
|
1069
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
1405
1070
|
let body;
|
|
1406
1071
|
body = JSON.stringify({
|
|
1407
1072
|
...(input.Metadata != null && { Metadata: input.Metadata }),
|
|
@@ -1425,16 +1090,7 @@ const serializeAws_restJson1UpdateChannelFlowCommand = async (input, context) =>
|
|
|
1425
1090
|
"content-type": "application/json",
|
|
1426
1091
|
};
|
|
1427
1092
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows/{ChannelFlowArn}";
|
|
1428
|
-
|
|
1429
|
-
const labelValue = input.ChannelFlowArn;
|
|
1430
|
-
if (labelValue.length <= 0) {
|
|
1431
|
-
throw new Error("Empty value provided for input HTTP label: ChannelFlowArn.");
|
|
1432
|
-
}
|
|
1433
|
-
resolvedPath = resolvedPath.replace("{ChannelFlowArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1434
|
-
}
|
|
1435
|
-
else {
|
|
1436
|
-
throw new Error("No value provided for input HTTP label: ChannelFlowArn.");
|
|
1437
|
-
}
|
|
1093
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelFlowArn", () => input.ChannelFlowArn, "{ChannelFlowArn}", false);
|
|
1438
1094
|
let body;
|
|
1439
1095
|
body = JSON.stringify({
|
|
1440
1096
|
...(input.Name != null && { Name: input.Name }),
|
|
@@ -1453,36 +1109,19 @@ const serializeAws_restJson1UpdateChannelFlowCommand = async (input, context) =>
|
|
|
1453
1109
|
exports.serializeAws_restJson1UpdateChannelFlowCommand = serializeAws_restJson1UpdateChannelFlowCommand;
|
|
1454
1110
|
const serializeAws_restJson1UpdateChannelMessageCommand = async (input, context) => {
|
|
1455
1111
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1456
|
-
const headers = {
|
|
1112
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
1457
1113
|
"content-type": "application/json",
|
|
1458
|
-
|
|
1459
|
-
};
|
|
1114
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
1115
|
+
});
|
|
1460
1116
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1461
1117
|
"/channels/{ChannelArn}/messages/{MessageId}";
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
if (labelValue.length <= 0) {
|
|
1465
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
1466
|
-
}
|
|
1467
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1468
|
-
}
|
|
1469
|
-
else {
|
|
1470
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
1471
|
-
}
|
|
1472
|
-
if (input.MessageId !== undefined) {
|
|
1473
|
-
const labelValue = input.MessageId;
|
|
1474
|
-
if (labelValue.length <= 0) {
|
|
1475
|
-
throw new Error("Empty value provided for input HTTP label: MessageId.");
|
|
1476
|
-
}
|
|
1477
|
-
resolvedPath = resolvedPath.replace("{MessageId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1478
|
-
}
|
|
1479
|
-
else {
|
|
1480
|
-
throw new Error("No value provided for input HTTP label: MessageId.");
|
|
1481
|
-
}
|
|
1118
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
1119
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
|
|
1482
1120
|
let body;
|
|
1483
1121
|
body = JSON.stringify({
|
|
1484
1122
|
...(input.Content != null && { Content: input.Content }),
|
|
1485
1123
|
...(input.Metadata != null && { Metadata: input.Metadata }),
|
|
1124
|
+
...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }),
|
|
1486
1125
|
});
|
|
1487
1126
|
return new protocol_http_1.HttpRequest({
|
|
1488
1127
|
protocol,
|
|
@@ -1497,21 +1136,16 @@ const serializeAws_restJson1UpdateChannelMessageCommand = async (input, context)
|
|
|
1497
1136
|
exports.serializeAws_restJson1UpdateChannelMessageCommand = serializeAws_restJson1UpdateChannelMessageCommand;
|
|
1498
1137
|
const serializeAws_restJson1UpdateChannelReadMarkerCommand = async (input, context) => {
|
|
1499
1138
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1500
|
-
const headers = {
|
|
1501
|
-
|
|
1502
|
-
|
|
1139
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
1140
|
+
"content-type": "application/json",
|
|
1141
|
+
"x-amz-chime-bearer": input.ChimeBearer,
|
|
1142
|
+
});
|
|
1503
1143
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/readMarker";
|
|
1504
|
-
|
|
1505
|
-
const labelValue = input.ChannelArn;
|
|
1506
|
-
if (labelValue.length <= 0) {
|
|
1507
|
-
throw new Error("Empty value provided for input HTTP label: ChannelArn.");
|
|
1508
|
-
}
|
|
1509
|
-
resolvedPath = resolvedPath.replace("{ChannelArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
1510
|
-
}
|
|
1511
|
-
else {
|
|
1512
|
-
throw new Error("No value provided for input HTTP label: ChannelArn.");
|
|
1513
|
-
}
|
|
1144
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
|
|
1514
1145
|
let body;
|
|
1146
|
+
body = JSON.stringify({
|
|
1147
|
+
...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }),
|
|
1148
|
+
});
|
|
1515
1149
|
return new protocol_http_1.HttpRequest({
|
|
1516
1150
|
protocol,
|
|
1517
1151
|
hostname,
|
|
@@ -1527,11 +1161,11 @@ const deserializeAws_restJson1AssociateChannelFlowCommand = async (output, conte
|
|
|
1527
1161
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1528
1162
|
return deserializeAws_restJson1AssociateChannelFlowCommandError(output, context);
|
|
1529
1163
|
}
|
|
1530
|
-
const contents = {
|
|
1164
|
+
const contents = map({
|
|
1531
1165
|
$metadata: deserializeMetadata(output),
|
|
1532
|
-
};
|
|
1166
|
+
});
|
|
1533
1167
|
await collectBody(output.body, context);
|
|
1534
|
-
return
|
|
1168
|
+
return contents;
|
|
1535
1169
|
};
|
|
1536
1170
|
exports.deserializeAws_restJson1AssociateChannelFlowCommand = deserializeAws_restJson1AssociateChannelFlowCommand;
|
|
1537
1171
|
const deserializeAws_restJson1AssociateChannelFlowCommandError = async (output, context) => {
|
|
@@ -1539,7 +1173,6 @@ const deserializeAws_restJson1AssociateChannelFlowCommandError = async (output,
|
|
|
1539
1173
|
...output,
|
|
1540
1174
|
body: await parseBody(output.body, context),
|
|
1541
1175
|
};
|
|
1542
|
-
let response;
|
|
1543
1176
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1544
1177
|
switch (errorCode) {
|
|
1545
1178
|
case "BadRequestException":
|
|
@@ -1568,33 +1201,29 @@ const deserializeAws_restJson1AssociateChannelFlowCommandError = async (output,
|
|
|
1568
1201
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1569
1202
|
default:
|
|
1570
1203
|
const parsedBody = parsedOutput.body;
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
$metadata,
|
|
1204
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1205
|
+
output,
|
|
1206
|
+
parsedBody,
|
|
1207
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1208
|
+
errorCode,
|
|
1577
1209
|
});
|
|
1578
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1579
1210
|
}
|
|
1580
1211
|
};
|
|
1581
1212
|
const deserializeAws_restJson1BatchCreateChannelMembershipCommand = async (output, context) => {
|
|
1582
1213
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1583
1214
|
return deserializeAws_restJson1BatchCreateChannelMembershipCommandError(output, context);
|
|
1584
1215
|
}
|
|
1585
|
-
const contents = {
|
|
1216
|
+
const contents = map({
|
|
1586
1217
|
$metadata: deserializeMetadata(output),
|
|
1587
|
-
|
|
1588
|
-
Errors: undefined,
|
|
1589
|
-
};
|
|
1218
|
+
});
|
|
1590
1219
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1591
|
-
if (data.BatchChannelMemberships
|
|
1220
|
+
if (data.BatchChannelMemberships != null) {
|
|
1592
1221
|
contents.BatchChannelMemberships = deserializeAws_restJson1BatchChannelMemberships(data.BatchChannelMemberships, context);
|
|
1593
1222
|
}
|
|
1594
|
-
if (data.Errors
|
|
1223
|
+
if (data.Errors != null) {
|
|
1595
1224
|
contents.Errors = deserializeAws_restJson1BatchCreateChannelMembershipErrors(data.Errors, context);
|
|
1596
1225
|
}
|
|
1597
|
-
return
|
|
1226
|
+
return contents;
|
|
1598
1227
|
};
|
|
1599
1228
|
exports.deserializeAws_restJson1BatchCreateChannelMembershipCommand = deserializeAws_restJson1BatchCreateChannelMembershipCommand;
|
|
1600
1229
|
const deserializeAws_restJson1BatchCreateChannelMembershipCommandError = async (output, context) => {
|
|
@@ -1602,7 +1231,6 @@ const deserializeAws_restJson1BatchCreateChannelMembershipCommandError = async (
|
|
|
1602
1231
|
...output,
|
|
1603
1232
|
body: await parseBody(output.body, context),
|
|
1604
1233
|
};
|
|
1605
|
-
let response;
|
|
1606
1234
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1607
1235
|
switch (errorCode) {
|
|
1608
1236
|
case "BadRequestException":
|
|
@@ -1611,6 +1239,12 @@ const deserializeAws_restJson1BatchCreateChannelMembershipCommandError = async (
|
|
|
1611
1239
|
case "ForbiddenException":
|
|
1612
1240
|
case "com.amazonaws.chimesdkmessaging#ForbiddenException":
|
|
1613
1241
|
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1242
|
+
case "NotFoundException":
|
|
1243
|
+
case "com.amazonaws.chimesdkmessaging#NotFoundException":
|
|
1244
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1245
|
+
case "ResourceLimitExceededException":
|
|
1246
|
+
case "com.amazonaws.chimesdkmessaging#ResourceLimitExceededException":
|
|
1247
|
+
throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
|
|
1614
1248
|
case "ServiceFailureException":
|
|
1615
1249
|
case "com.amazonaws.chimesdkmessaging#ServiceFailureException":
|
|
1616
1250
|
throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
|
|
@@ -1625,33 +1259,29 @@ const deserializeAws_restJson1BatchCreateChannelMembershipCommandError = async (
|
|
|
1625
1259
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1626
1260
|
default:
|
|
1627
1261
|
const parsedBody = parsedOutput.body;
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
$metadata,
|
|
1262
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1263
|
+
output,
|
|
1264
|
+
parsedBody,
|
|
1265
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1266
|
+
errorCode,
|
|
1634
1267
|
});
|
|
1635
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1636
1268
|
}
|
|
1637
1269
|
};
|
|
1638
1270
|
const deserializeAws_restJson1ChannelFlowCallbackCommand = async (output, context) => {
|
|
1639
1271
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1640
1272
|
return deserializeAws_restJson1ChannelFlowCallbackCommandError(output, context);
|
|
1641
1273
|
}
|
|
1642
|
-
const contents = {
|
|
1274
|
+
const contents = map({
|
|
1643
1275
|
$metadata: deserializeMetadata(output),
|
|
1644
|
-
|
|
1645
|
-
ChannelArn: undefined,
|
|
1646
|
-
};
|
|
1276
|
+
});
|
|
1647
1277
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1648
|
-
if (data.CallbackId
|
|
1278
|
+
if (data.CallbackId != null) {
|
|
1649
1279
|
contents.CallbackId = (0, smithy_client_1.expectString)(data.CallbackId);
|
|
1650
1280
|
}
|
|
1651
|
-
if (data.ChannelArn
|
|
1281
|
+
if (data.ChannelArn != null) {
|
|
1652
1282
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
1653
1283
|
}
|
|
1654
|
-
return
|
|
1284
|
+
return contents;
|
|
1655
1285
|
};
|
|
1656
1286
|
exports.deserializeAws_restJson1ChannelFlowCallbackCommand = deserializeAws_restJson1ChannelFlowCallbackCommand;
|
|
1657
1287
|
const deserializeAws_restJson1ChannelFlowCallbackCommandError = async (output, context) => {
|
|
@@ -1659,7 +1289,6 @@ const deserializeAws_restJson1ChannelFlowCallbackCommandError = async (output, c
|
|
|
1659
1289
|
...output,
|
|
1660
1290
|
body: await parseBody(output.body, context),
|
|
1661
1291
|
};
|
|
1662
|
-
let response;
|
|
1663
1292
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1664
1293
|
switch (errorCode) {
|
|
1665
1294
|
case "BadRequestException":
|
|
@@ -1685,29 +1314,26 @@ const deserializeAws_restJson1ChannelFlowCallbackCommandError = async (output, c
|
|
|
1685
1314
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1686
1315
|
default:
|
|
1687
1316
|
const parsedBody = parsedOutput.body;
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
$metadata,
|
|
1317
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1318
|
+
output,
|
|
1319
|
+
parsedBody,
|
|
1320
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1321
|
+
errorCode,
|
|
1694
1322
|
});
|
|
1695
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1696
1323
|
}
|
|
1697
1324
|
};
|
|
1698
1325
|
const deserializeAws_restJson1CreateChannelCommand = async (output, context) => {
|
|
1699
1326
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1700
1327
|
return deserializeAws_restJson1CreateChannelCommandError(output, context);
|
|
1701
1328
|
}
|
|
1702
|
-
const contents = {
|
|
1329
|
+
const contents = map({
|
|
1703
1330
|
$metadata: deserializeMetadata(output),
|
|
1704
|
-
|
|
1705
|
-
};
|
|
1331
|
+
});
|
|
1706
1332
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1707
|
-
if (data.ChannelArn
|
|
1333
|
+
if (data.ChannelArn != null) {
|
|
1708
1334
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
1709
1335
|
}
|
|
1710
|
-
return
|
|
1336
|
+
return contents;
|
|
1711
1337
|
};
|
|
1712
1338
|
exports.deserializeAws_restJson1CreateChannelCommand = deserializeAws_restJson1CreateChannelCommand;
|
|
1713
1339
|
const deserializeAws_restJson1CreateChannelCommandError = async (output, context) => {
|
|
@@ -1715,7 +1341,6 @@ const deserializeAws_restJson1CreateChannelCommandError = async (output, context
|
|
|
1715
1341
|
...output,
|
|
1716
1342
|
body: await parseBody(output.body, context),
|
|
1717
1343
|
};
|
|
1718
|
-
let response;
|
|
1719
1344
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1720
1345
|
switch (errorCode) {
|
|
1721
1346
|
case "BadRequestException":
|
|
@@ -1744,33 +1369,29 @@ const deserializeAws_restJson1CreateChannelCommandError = async (output, context
|
|
|
1744
1369
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1745
1370
|
default:
|
|
1746
1371
|
const parsedBody = parsedOutput.body;
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
$metadata,
|
|
1372
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1373
|
+
output,
|
|
1374
|
+
parsedBody,
|
|
1375
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1376
|
+
errorCode,
|
|
1753
1377
|
});
|
|
1754
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1755
1378
|
}
|
|
1756
1379
|
};
|
|
1757
1380
|
const deserializeAws_restJson1CreateChannelBanCommand = async (output, context) => {
|
|
1758
1381
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1759
1382
|
return deserializeAws_restJson1CreateChannelBanCommandError(output, context);
|
|
1760
1383
|
}
|
|
1761
|
-
const contents = {
|
|
1384
|
+
const contents = map({
|
|
1762
1385
|
$metadata: deserializeMetadata(output),
|
|
1763
|
-
|
|
1764
|
-
Member: undefined,
|
|
1765
|
-
};
|
|
1386
|
+
});
|
|
1766
1387
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1767
|
-
if (data.ChannelArn
|
|
1388
|
+
if (data.ChannelArn != null) {
|
|
1768
1389
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
1769
1390
|
}
|
|
1770
|
-
if (data.Member
|
|
1391
|
+
if (data.Member != null) {
|
|
1771
1392
|
contents.Member = deserializeAws_restJson1Identity(data.Member, context);
|
|
1772
1393
|
}
|
|
1773
|
-
return
|
|
1394
|
+
return contents;
|
|
1774
1395
|
};
|
|
1775
1396
|
exports.deserializeAws_restJson1CreateChannelBanCommand = deserializeAws_restJson1CreateChannelBanCommand;
|
|
1776
1397
|
const deserializeAws_restJson1CreateChannelBanCommandError = async (output, context) => {
|
|
@@ -1778,7 +1399,6 @@ const deserializeAws_restJson1CreateChannelBanCommandError = async (output, cont
|
|
|
1778
1399
|
...output,
|
|
1779
1400
|
body: await parseBody(output.body, context),
|
|
1780
1401
|
};
|
|
1781
|
-
let response;
|
|
1782
1402
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1783
1403
|
switch (errorCode) {
|
|
1784
1404
|
case "BadRequestException":
|
|
@@ -1807,29 +1427,26 @@ const deserializeAws_restJson1CreateChannelBanCommandError = async (output, cont
|
|
|
1807
1427
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1808
1428
|
default:
|
|
1809
1429
|
const parsedBody = parsedOutput.body;
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
$metadata,
|
|
1430
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1431
|
+
output,
|
|
1432
|
+
parsedBody,
|
|
1433
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1434
|
+
errorCode,
|
|
1816
1435
|
});
|
|
1817
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1818
1436
|
}
|
|
1819
1437
|
};
|
|
1820
1438
|
const deserializeAws_restJson1CreateChannelFlowCommand = async (output, context) => {
|
|
1821
1439
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1822
1440
|
return deserializeAws_restJson1CreateChannelFlowCommandError(output, context);
|
|
1823
1441
|
}
|
|
1824
|
-
const contents = {
|
|
1442
|
+
const contents = map({
|
|
1825
1443
|
$metadata: deserializeMetadata(output),
|
|
1826
|
-
|
|
1827
|
-
};
|
|
1444
|
+
});
|
|
1828
1445
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1829
|
-
if (data.ChannelFlowArn
|
|
1446
|
+
if (data.ChannelFlowArn != null) {
|
|
1830
1447
|
contents.ChannelFlowArn = (0, smithy_client_1.expectString)(data.ChannelFlowArn);
|
|
1831
1448
|
}
|
|
1832
|
-
return
|
|
1449
|
+
return contents;
|
|
1833
1450
|
};
|
|
1834
1451
|
exports.deserializeAws_restJson1CreateChannelFlowCommand = deserializeAws_restJson1CreateChannelFlowCommand;
|
|
1835
1452
|
const deserializeAws_restJson1CreateChannelFlowCommandError = async (output, context) => {
|
|
@@ -1837,7 +1454,6 @@ const deserializeAws_restJson1CreateChannelFlowCommandError = async (output, con
|
|
|
1837
1454
|
...output,
|
|
1838
1455
|
body: await parseBody(output.body, context),
|
|
1839
1456
|
};
|
|
1840
|
-
let response;
|
|
1841
1457
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1842
1458
|
switch (errorCode) {
|
|
1843
1459
|
case "BadRequestException":
|
|
@@ -1866,33 +1482,32 @@ const deserializeAws_restJson1CreateChannelFlowCommandError = async (output, con
|
|
|
1866
1482
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1867
1483
|
default:
|
|
1868
1484
|
const parsedBody = parsedOutput.body;
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
$metadata,
|
|
1485
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1486
|
+
output,
|
|
1487
|
+
parsedBody,
|
|
1488
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1489
|
+
errorCode,
|
|
1875
1490
|
});
|
|
1876
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1877
1491
|
}
|
|
1878
1492
|
};
|
|
1879
1493
|
const deserializeAws_restJson1CreateChannelMembershipCommand = async (output, context) => {
|
|
1880
1494
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1881
1495
|
return deserializeAws_restJson1CreateChannelMembershipCommandError(output, context);
|
|
1882
1496
|
}
|
|
1883
|
-
const contents = {
|
|
1497
|
+
const contents = map({
|
|
1884
1498
|
$metadata: deserializeMetadata(output),
|
|
1885
|
-
|
|
1886
|
-
Member: undefined,
|
|
1887
|
-
};
|
|
1499
|
+
});
|
|
1888
1500
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1889
|
-
if (data.ChannelArn
|
|
1501
|
+
if (data.ChannelArn != null) {
|
|
1890
1502
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
1891
1503
|
}
|
|
1892
|
-
if (data.Member
|
|
1504
|
+
if (data.Member != null) {
|
|
1893
1505
|
contents.Member = deserializeAws_restJson1Identity(data.Member, context);
|
|
1894
1506
|
}
|
|
1895
|
-
|
|
1507
|
+
if (data.SubChannelId != null) {
|
|
1508
|
+
contents.SubChannelId = (0, smithy_client_1.expectString)(data.SubChannelId);
|
|
1509
|
+
}
|
|
1510
|
+
return contents;
|
|
1896
1511
|
};
|
|
1897
1512
|
exports.deserializeAws_restJson1CreateChannelMembershipCommand = deserializeAws_restJson1CreateChannelMembershipCommand;
|
|
1898
1513
|
const deserializeAws_restJson1CreateChannelMembershipCommandError = async (output, context) => {
|
|
@@ -1900,7 +1515,6 @@ const deserializeAws_restJson1CreateChannelMembershipCommandError = async (outpu
|
|
|
1900
1515
|
...output,
|
|
1901
1516
|
body: await parseBody(output.body, context),
|
|
1902
1517
|
};
|
|
1903
|
-
let response;
|
|
1904
1518
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1905
1519
|
switch (errorCode) {
|
|
1906
1520
|
case "BadRequestException":
|
|
@@ -1912,6 +1526,9 @@ const deserializeAws_restJson1CreateChannelMembershipCommandError = async (outpu
|
|
|
1912
1526
|
case "ForbiddenException":
|
|
1913
1527
|
case "com.amazonaws.chimesdkmessaging#ForbiddenException":
|
|
1914
1528
|
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
1529
|
+
case "NotFoundException":
|
|
1530
|
+
case "com.amazonaws.chimesdkmessaging#NotFoundException":
|
|
1531
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1915
1532
|
case "ResourceLimitExceededException":
|
|
1916
1533
|
case "com.amazonaws.chimesdkmessaging#ResourceLimitExceededException":
|
|
1917
1534
|
throw await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context);
|
|
@@ -1929,33 +1546,29 @@ const deserializeAws_restJson1CreateChannelMembershipCommandError = async (outpu
|
|
|
1929
1546
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1930
1547
|
default:
|
|
1931
1548
|
const parsedBody = parsedOutput.body;
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
$metadata,
|
|
1549
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1550
|
+
output,
|
|
1551
|
+
parsedBody,
|
|
1552
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1553
|
+
errorCode,
|
|
1938
1554
|
});
|
|
1939
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1940
1555
|
}
|
|
1941
1556
|
};
|
|
1942
1557
|
const deserializeAws_restJson1CreateChannelModeratorCommand = async (output, context) => {
|
|
1943
1558
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1944
1559
|
return deserializeAws_restJson1CreateChannelModeratorCommandError(output, context);
|
|
1945
1560
|
}
|
|
1946
|
-
const contents = {
|
|
1561
|
+
const contents = map({
|
|
1947
1562
|
$metadata: deserializeMetadata(output),
|
|
1948
|
-
|
|
1949
|
-
ChannelModerator: undefined,
|
|
1950
|
-
};
|
|
1563
|
+
});
|
|
1951
1564
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1952
|
-
if (data.ChannelArn
|
|
1565
|
+
if (data.ChannelArn != null) {
|
|
1953
1566
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
1954
1567
|
}
|
|
1955
|
-
if (data.ChannelModerator
|
|
1568
|
+
if (data.ChannelModerator != null) {
|
|
1956
1569
|
contents.ChannelModerator = deserializeAws_restJson1Identity(data.ChannelModerator, context);
|
|
1957
1570
|
}
|
|
1958
|
-
return
|
|
1571
|
+
return contents;
|
|
1959
1572
|
};
|
|
1960
1573
|
exports.deserializeAws_restJson1CreateChannelModeratorCommand = deserializeAws_restJson1CreateChannelModeratorCommand;
|
|
1961
1574
|
const deserializeAws_restJson1CreateChannelModeratorCommandError = async (output, context) => {
|
|
@@ -1963,7 +1576,6 @@ const deserializeAws_restJson1CreateChannelModeratorCommandError = async (output
|
|
|
1963
1576
|
...output,
|
|
1964
1577
|
body: await parseBody(output.body, context),
|
|
1965
1578
|
};
|
|
1966
|
-
let response;
|
|
1967
1579
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1968
1580
|
switch (errorCode) {
|
|
1969
1581
|
case "BadRequestException":
|
|
@@ -1992,25 +1604,23 @@ const deserializeAws_restJson1CreateChannelModeratorCommandError = async (output
|
|
|
1992
1604
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
1993
1605
|
default:
|
|
1994
1606
|
const parsedBody = parsedOutput.body;
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
$metadata,
|
|
1607
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1608
|
+
output,
|
|
1609
|
+
parsedBody,
|
|
1610
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1611
|
+
errorCode,
|
|
2001
1612
|
});
|
|
2002
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2003
1613
|
}
|
|
2004
1614
|
};
|
|
2005
1615
|
const deserializeAws_restJson1DeleteChannelCommand = async (output, context) => {
|
|
2006
1616
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2007
1617
|
return deserializeAws_restJson1DeleteChannelCommandError(output, context);
|
|
2008
1618
|
}
|
|
2009
|
-
const contents = {
|
|
1619
|
+
const contents = map({
|
|
2010
1620
|
$metadata: deserializeMetadata(output),
|
|
2011
|
-
};
|
|
1621
|
+
});
|
|
2012
1622
|
await collectBody(output.body, context);
|
|
2013
|
-
return
|
|
1623
|
+
return contents;
|
|
2014
1624
|
};
|
|
2015
1625
|
exports.deserializeAws_restJson1DeleteChannelCommand = deserializeAws_restJson1DeleteChannelCommand;
|
|
2016
1626
|
const deserializeAws_restJson1DeleteChannelCommandError = async (output, context) => {
|
|
@@ -2018,7 +1628,6 @@ const deserializeAws_restJson1DeleteChannelCommandError = async (output, context
|
|
|
2018
1628
|
...output,
|
|
2019
1629
|
body: await parseBody(output.body, context),
|
|
2020
1630
|
};
|
|
2021
|
-
let response;
|
|
2022
1631
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2023
1632
|
switch (errorCode) {
|
|
2024
1633
|
case "BadRequestException":
|
|
@@ -2041,25 +1650,23 @@ const deserializeAws_restJson1DeleteChannelCommandError = async (output, context
|
|
|
2041
1650
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2042
1651
|
default:
|
|
2043
1652
|
const parsedBody = parsedOutput.body;
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
$metadata,
|
|
1653
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1654
|
+
output,
|
|
1655
|
+
parsedBody,
|
|
1656
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1657
|
+
errorCode,
|
|
2050
1658
|
});
|
|
2051
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2052
1659
|
}
|
|
2053
1660
|
};
|
|
2054
1661
|
const deserializeAws_restJson1DeleteChannelBanCommand = async (output, context) => {
|
|
2055
1662
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2056
1663
|
return deserializeAws_restJson1DeleteChannelBanCommandError(output, context);
|
|
2057
1664
|
}
|
|
2058
|
-
const contents = {
|
|
1665
|
+
const contents = map({
|
|
2059
1666
|
$metadata: deserializeMetadata(output),
|
|
2060
|
-
};
|
|
1667
|
+
});
|
|
2061
1668
|
await collectBody(output.body, context);
|
|
2062
|
-
return
|
|
1669
|
+
return contents;
|
|
2063
1670
|
};
|
|
2064
1671
|
exports.deserializeAws_restJson1DeleteChannelBanCommand = deserializeAws_restJson1DeleteChannelBanCommand;
|
|
2065
1672
|
const deserializeAws_restJson1DeleteChannelBanCommandError = async (output, context) => {
|
|
@@ -2067,7 +1674,6 @@ const deserializeAws_restJson1DeleteChannelBanCommandError = async (output, cont
|
|
|
2067
1674
|
...output,
|
|
2068
1675
|
body: await parseBody(output.body, context),
|
|
2069
1676
|
};
|
|
2070
|
-
let response;
|
|
2071
1677
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2072
1678
|
switch (errorCode) {
|
|
2073
1679
|
case "BadRequestException":
|
|
@@ -2090,25 +1696,23 @@ const deserializeAws_restJson1DeleteChannelBanCommandError = async (output, cont
|
|
|
2090
1696
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2091
1697
|
default:
|
|
2092
1698
|
const parsedBody = parsedOutput.body;
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
$metadata,
|
|
1699
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1700
|
+
output,
|
|
1701
|
+
parsedBody,
|
|
1702
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1703
|
+
errorCode,
|
|
2099
1704
|
});
|
|
2100
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2101
1705
|
}
|
|
2102
1706
|
};
|
|
2103
1707
|
const deserializeAws_restJson1DeleteChannelFlowCommand = async (output, context) => {
|
|
2104
1708
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2105
1709
|
return deserializeAws_restJson1DeleteChannelFlowCommandError(output, context);
|
|
2106
1710
|
}
|
|
2107
|
-
const contents = {
|
|
1711
|
+
const contents = map({
|
|
2108
1712
|
$metadata: deserializeMetadata(output),
|
|
2109
|
-
};
|
|
1713
|
+
});
|
|
2110
1714
|
await collectBody(output.body, context);
|
|
2111
|
-
return
|
|
1715
|
+
return contents;
|
|
2112
1716
|
};
|
|
2113
1717
|
exports.deserializeAws_restJson1DeleteChannelFlowCommand = deserializeAws_restJson1DeleteChannelFlowCommand;
|
|
2114
1718
|
const deserializeAws_restJson1DeleteChannelFlowCommandError = async (output, context) => {
|
|
@@ -2116,7 +1720,6 @@ const deserializeAws_restJson1DeleteChannelFlowCommandError = async (output, con
|
|
|
2116
1720
|
...output,
|
|
2117
1721
|
body: await parseBody(output.body, context),
|
|
2118
1722
|
};
|
|
2119
|
-
let response;
|
|
2120
1723
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2121
1724
|
switch (errorCode) {
|
|
2122
1725
|
case "BadRequestException":
|
|
@@ -2142,25 +1745,23 @@ const deserializeAws_restJson1DeleteChannelFlowCommandError = async (output, con
|
|
|
2142
1745
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2143
1746
|
default:
|
|
2144
1747
|
const parsedBody = parsedOutput.body;
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
$metadata,
|
|
1748
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1749
|
+
output,
|
|
1750
|
+
parsedBody,
|
|
1751
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1752
|
+
errorCode,
|
|
2151
1753
|
});
|
|
2152
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2153
1754
|
}
|
|
2154
1755
|
};
|
|
2155
1756
|
const deserializeAws_restJson1DeleteChannelMembershipCommand = async (output, context) => {
|
|
2156
1757
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2157
1758
|
return deserializeAws_restJson1DeleteChannelMembershipCommandError(output, context);
|
|
2158
1759
|
}
|
|
2159
|
-
const contents = {
|
|
1760
|
+
const contents = map({
|
|
2160
1761
|
$metadata: deserializeMetadata(output),
|
|
2161
|
-
};
|
|
1762
|
+
});
|
|
2162
1763
|
await collectBody(output.body, context);
|
|
2163
|
-
return
|
|
1764
|
+
return contents;
|
|
2164
1765
|
};
|
|
2165
1766
|
exports.deserializeAws_restJson1DeleteChannelMembershipCommand = deserializeAws_restJson1DeleteChannelMembershipCommand;
|
|
2166
1767
|
const deserializeAws_restJson1DeleteChannelMembershipCommandError = async (output, context) => {
|
|
@@ -2168,7 +1769,6 @@ const deserializeAws_restJson1DeleteChannelMembershipCommandError = async (outpu
|
|
|
2168
1769
|
...output,
|
|
2169
1770
|
body: await parseBody(output.body, context),
|
|
2170
1771
|
};
|
|
2171
|
-
let response;
|
|
2172
1772
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2173
1773
|
switch (errorCode) {
|
|
2174
1774
|
case "BadRequestException":
|
|
@@ -2194,25 +1794,23 @@ const deserializeAws_restJson1DeleteChannelMembershipCommandError = async (outpu
|
|
|
2194
1794
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2195
1795
|
default:
|
|
2196
1796
|
const parsedBody = parsedOutput.body;
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
$metadata,
|
|
1797
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1798
|
+
output,
|
|
1799
|
+
parsedBody,
|
|
1800
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1801
|
+
errorCode,
|
|
2203
1802
|
});
|
|
2204
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2205
1803
|
}
|
|
2206
1804
|
};
|
|
2207
1805
|
const deserializeAws_restJson1DeleteChannelMessageCommand = async (output, context) => {
|
|
2208
1806
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2209
1807
|
return deserializeAws_restJson1DeleteChannelMessageCommandError(output, context);
|
|
2210
1808
|
}
|
|
2211
|
-
const contents = {
|
|
1809
|
+
const contents = map({
|
|
2212
1810
|
$metadata: deserializeMetadata(output),
|
|
2213
|
-
};
|
|
1811
|
+
});
|
|
2214
1812
|
await collectBody(output.body, context);
|
|
2215
|
-
return
|
|
1813
|
+
return contents;
|
|
2216
1814
|
};
|
|
2217
1815
|
exports.deserializeAws_restJson1DeleteChannelMessageCommand = deserializeAws_restJson1DeleteChannelMessageCommand;
|
|
2218
1816
|
const deserializeAws_restJson1DeleteChannelMessageCommandError = async (output, context) => {
|
|
@@ -2220,7 +1818,6 @@ const deserializeAws_restJson1DeleteChannelMessageCommandError = async (output,
|
|
|
2220
1818
|
...output,
|
|
2221
1819
|
body: await parseBody(output.body, context),
|
|
2222
1820
|
};
|
|
2223
|
-
let response;
|
|
2224
1821
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2225
1822
|
switch (errorCode) {
|
|
2226
1823
|
case "BadRequestException":
|
|
@@ -2243,25 +1840,23 @@ const deserializeAws_restJson1DeleteChannelMessageCommandError = async (output,
|
|
|
2243
1840
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2244
1841
|
default:
|
|
2245
1842
|
const parsedBody = parsedOutput.body;
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
$metadata,
|
|
1843
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1844
|
+
output,
|
|
1845
|
+
parsedBody,
|
|
1846
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1847
|
+
errorCode,
|
|
2252
1848
|
});
|
|
2253
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2254
1849
|
}
|
|
2255
1850
|
};
|
|
2256
1851
|
const deserializeAws_restJson1DeleteChannelModeratorCommand = async (output, context) => {
|
|
2257
1852
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2258
1853
|
return deserializeAws_restJson1DeleteChannelModeratorCommandError(output, context);
|
|
2259
1854
|
}
|
|
2260
|
-
const contents = {
|
|
1855
|
+
const contents = map({
|
|
2261
1856
|
$metadata: deserializeMetadata(output),
|
|
2262
|
-
};
|
|
1857
|
+
});
|
|
2263
1858
|
await collectBody(output.body, context);
|
|
2264
|
-
return
|
|
1859
|
+
return contents;
|
|
2265
1860
|
};
|
|
2266
1861
|
exports.deserializeAws_restJson1DeleteChannelModeratorCommand = deserializeAws_restJson1DeleteChannelModeratorCommand;
|
|
2267
1862
|
const deserializeAws_restJson1DeleteChannelModeratorCommandError = async (output, context) => {
|
|
@@ -2269,7 +1864,6 @@ const deserializeAws_restJson1DeleteChannelModeratorCommandError = async (output
|
|
|
2269
1864
|
...output,
|
|
2270
1865
|
body: await parseBody(output.body, context),
|
|
2271
1866
|
};
|
|
2272
|
-
let response;
|
|
2273
1867
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2274
1868
|
switch (errorCode) {
|
|
2275
1869
|
case "BadRequestException":
|
|
@@ -2292,29 +1886,26 @@ const deserializeAws_restJson1DeleteChannelModeratorCommandError = async (output
|
|
|
2292
1886
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2293
1887
|
default:
|
|
2294
1888
|
const parsedBody = parsedOutput.body;
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
$metadata,
|
|
1889
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1890
|
+
output,
|
|
1891
|
+
parsedBody,
|
|
1892
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1893
|
+
errorCode,
|
|
2301
1894
|
});
|
|
2302
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2303
1895
|
}
|
|
2304
1896
|
};
|
|
2305
1897
|
const deserializeAws_restJson1DescribeChannelCommand = async (output, context) => {
|
|
2306
1898
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2307
1899
|
return deserializeAws_restJson1DescribeChannelCommandError(output, context);
|
|
2308
1900
|
}
|
|
2309
|
-
const contents = {
|
|
1901
|
+
const contents = map({
|
|
2310
1902
|
$metadata: deserializeMetadata(output),
|
|
2311
|
-
|
|
2312
|
-
};
|
|
1903
|
+
});
|
|
2313
1904
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2314
|
-
if (data.Channel
|
|
1905
|
+
if (data.Channel != null) {
|
|
2315
1906
|
contents.Channel = deserializeAws_restJson1Channel(data.Channel, context);
|
|
2316
1907
|
}
|
|
2317
|
-
return
|
|
1908
|
+
return contents;
|
|
2318
1909
|
};
|
|
2319
1910
|
exports.deserializeAws_restJson1DescribeChannelCommand = deserializeAws_restJson1DescribeChannelCommand;
|
|
2320
1911
|
const deserializeAws_restJson1DescribeChannelCommandError = async (output, context) => {
|
|
@@ -2322,7 +1913,6 @@ const deserializeAws_restJson1DescribeChannelCommandError = async (output, conte
|
|
|
2322
1913
|
...output,
|
|
2323
1914
|
body: await parseBody(output.body, context),
|
|
2324
1915
|
};
|
|
2325
|
-
let response;
|
|
2326
1916
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2327
1917
|
switch (errorCode) {
|
|
2328
1918
|
case "BadRequestException":
|
|
@@ -2345,29 +1935,26 @@ const deserializeAws_restJson1DescribeChannelCommandError = async (output, conte
|
|
|
2345
1935
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2346
1936
|
default:
|
|
2347
1937
|
const parsedBody = parsedOutput.body;
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
$metadata,
|
|
1938
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1939
|
+
output,
|
|
1940
|
+
parsedBody,
|
|
1941
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1942
|
+
errorCode,
|
|
2354
1943
|
});
|
|
2355
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2356
1944
|
}
|
|
2357
1945
|
};
|
|
2358
1946
|
const deserializeAws_restJson1DescribeChannelBanCommand = async (output, context) => {
|
|
2359
1947
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2360
1948
|
return deserializeAws_restJson1DescribeChannelBanCommandError(output, context);
|
|
2361
1949
|
}
|
|
2362
|
-
const contents = {
|
|
1950
|
+
const contents = map({
|
|
2363
1951
|
$metadata: deserializeMetadata(output),
|
|
2364
|
-
|
|
2365
|
-
};
|
|
1952
|
+
});
|
|
2366
1953
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2367
|
-
if (data.ChannelBan
|
|
1954
|
+
if (data.ChannelBan != null) {
|
|
2368
1955
|
contents.ChannelBan = deserializeAws_restJson1ChannelBan(data.ChannelBan, context);
|
|
2369
1956
|
}
|
|
2370
|
-
return
|
|
1957
|
+
return contents;
|
|
2371
1958
|
};
|
|
2372
1959
|
exports.deserializeAws_restJson1DescribeChannelBanCommand = deserializeAws_restJson1DescribeChannelBanCommand;
|
|
2373
1960
|
const deserializeAws_restJson1DescribeChannelBanCommandError = async (output, context) => {
|
|
@@ -2375,7 +1962,6 @@ const deserializeAws_restJson1DescribeChannelBanCommandError = async (output, co
|
|
|
2375
1962
|
...output,
|
|
2376
1963
|
body: await parseBody(output.body, context),
|
|
2377
1964
|
};
|
|
2378
|
-
let response;
|
|
2379
1965
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2380
1966
|
switch (errorCode) {
|
|
2381
1967
|
case "BadRequestException":
|
|
@@ -2401,29 +1987,26 @@ const deserializeAws_restJson1DescribeChannelBanCommandError = async (output, co
|
|
|
2401
1987
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2402
1988
|
default:
|
|
2403
1989
|
const parsedBody = parsedOutput.body;
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
$metadata,
|
|
1990
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1991
|
+
output,
|
|
1992
|
+
parsedBody,
|
|
1993
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
1994
|
+
errorCode,
|
|
2410
1995
|
});
|
|
2411
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2412
1996
|
}
|
|
2413
1997
|
};
|
|
2414
1998
|
const deserializeAws_restJson1DescribeChannelFlowCommand = async (output, context) => {
|
|
2415
1999
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2416
2000
|
return deserializeAws_restJson1DescribeChannelFlowCommandError(output, context);
|
|
2417
2001
|
}
|
|
2418
|
-
const contents = {
|
|
2002
|
+
const contents = map({
|
|
2419
2003
|
$metadata: deserializeMetadata(output),
|
|
2420
|
-
|
|
2421
|
-
};
|
|
2004
|
+
});
|
|
2422
2005
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2423
|
-
if (data.ChannelFlow
|
|
2006
|
+
if (data.ChannelFlow != null) {
|
|
2424
2007
|
contents.ChannelFlow = deserializeAws_restJson1ChannelFlow(data.ChannelFlow, context);
|
|
2425
2008
|
}
|
|
2426
|
-
return
|
|
2009
|
+
return contents;
|
|
2427
2010
|
};
|
|
2428
2011
|
exports.deserializeAws_restJson1DescribeChannelFlowCommand = deserializeAws_restJson1DescribeChannelFlowCommand;
|
|
2429
2012
|
const deserializeAws_restJson1DescribeChannelFlowCommandError = async (output, context) => {
|
|
@@ -2431,7 +2014,6 @@ const deserializeAws_restJson1DescribeChannelFlowCommandError = async (output, c
|
|
|
2431
2014
|
...output,
|
|
2432
2015
|
body: await parseBody(output.body, context),
|
|
2433
2016
|
};
|
|
2434
|
-
let response;
|
|
2435
2017
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2436
2018
|
switch (errorCode) {
|
|
2437
2019
|
case "BadRequestException":
|
|
@@ -2454,29 +2036,26 @@ const deserializeAws_restJson1DescribeChannelFlowCommandError = async (output, c
|
|
|
2454
2036
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2455
2037
|
default:
|
|
2456
2038
|
const parsedBody = parsedOutput.body;
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
$metadata,
|
|
2039
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2040
|
+
output,
|
|
2041
|
+
parsedBody,
|
|
2042
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2043
|
+
errorCode,
|
|
2463
2044
|
});
|
|
2464
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2465
2045
|
}
|
|
2466
2046
|
};
|
|
2467
2047
|
const deserializeAws_restJson1DescribeChannelMembershipCommand = async (output, context) => {
|
|
2468
2048
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2469
2049
|
return deserializeAws_restJson1DescribeChannelMembershipCommandError(output, context);
|
|
2470
2050
|
}
|
|
2471
|
-
const contents = {
|
|
2051
|
+
const contents = map({
|
|
2472
2052
|
$metadata: deserializeMetadata(output),
|
|
2473
|
-
|
|
2474
|
-
};
|
|
2053
|
+
});
|
|
2475
2054
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2476
|
-
if (data.ChannelMembership
|
|
2055
|
+
if (data.ChannelMembership != null) {
|
|
2477
2056
|
contents.ChannelMembership = deserializeAws_restJson1ChannelMembership(data.ChannelMembership, context);
|
|
2478
2057
|
}
|
|
2479
|
-
return
|
|
2058
|
+
return contents;
|
|
2480
2059
|
};
|
|
2481
2060
|
exports.deserializeAws_restJson1DescribeChannelMembershipCommand = deserializeAws_restJson1DescribeChannelMembershipCommand;
|
|
2482
2061
|
const deserializeAws_restJson1DescribeChannelMembershipCommandError = async (output, context) => {
|
|
@@ -2484,7 +2063,6 @@ const deserializeAws_restJson1DescribeChannelMembershipCommandError = async (out
|
|
|
2484
2063
|
...output,
|
|
2485
2064
|
body: await parseBody(output.body, context),
|
|
2486
2065
|
};
|
|
2487
|
-
let response;
|
|
2488
2066
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2489
2067
|
switch (errorCode) {
|
|
2490
2068
|
case "BadRequestException":
|
|
@@ -2510,29 +2088,26 @@ const deserializeAws_restJson1DescribeChannelMembershipCommandError = async (out
|
|
|
2510
2088
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2511
2089
|
default:
|
|
2512
2090
|
const parsedBody = parsedOutput.body;
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
$metadata,
|
|
2091
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2092
|
+
output,
|
|
2093
|
+
parsedBody,
|
|
2094
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2095
|
+
errorCode,
|
|
2519
2096
|
});
|
|
2520
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2521
2097
|
}
|
|
2522
2098
|
};
|
|
2523
2099
|
const deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand = async (output, context) => {
|
|
2524
2100
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2525
2101
|
return deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommandError(output, context);
|
|
2526
2102
|
}
|
|
2527
|
-
const contents = {
|
|
2103
|
+
const contents = map({
|
|
2528
2104
|
$metadata: deserializeMetadata(output),
|
|
2529
|
-
|
|
2530
|
-
};
|
|
2105
|
+
});
|
|
2531
2106
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2532
|
-
if (data.ChannelMembership
|
|
2107
|
+
if (data.ChannelMembership != null) {
|
|
2533
2108
|
contents.ChannelMembership = deserializeAws_restJson1ChannelMembershipForAppInstanceUserSummary(data.ChannelMembership, context);
|
|
2534
2109
|
}
|
|
2535
|
-
return
|
|
2110
|
+
return contents;
|
|
2536
2111
|
};
|
|
2537
2112
|
exports.deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand = deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand;
|
|
2538
2113
|
const deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommandError = async (output, context) => {
|
|
@@ -2540,7 +2115,6 @@ const deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand
|
|
|
2540
2115
|
...output,
|
|
2541
2116
|
body: await parseBody(output.body, context),
|
|
2542
2117
|
};
|
|
2543
|
-
let response;
|
|
2544
2118
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2545
2119
|
switch (errorCode) {
|
|
2546
2120
|
case "BadRequestException":
|
|
@@ -2563,29 +2137,26 @@ const deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand
|
|
|
2563
2137
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2564
2138
|
default:
|
|
2565
2139
|
const parsedBody = parsedOutput.body;
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
$metadata,
|
|
2140
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2141
|
+
output,
|
|
2142
|
+
parsedBody,
|
|
2143
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2144
|
+
errorCode,
|
|
2572
2145
|
});
|
|
2573
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2574
2146
|
}
|
|
2575
2147
|
};
|
|
2576
2148
|
const deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = async (output, context) => {
|
|
2577
2149
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2578
2150
|
return deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommandError(output, context);
|
|
2579
2151
|
}
|
|
2580
|
-
const contents = {
|
|
2152
|
+
const contents = map({
|
|
2581
2153
|
$metadata: deserializeMetadata(output),
|
|
2582
|
-
|
|
2583
|
-
};
|
|
2154
|
+
});
|
|
2584
2155
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2585
|
-
if (data.Channel
|
|
2156
|
+
if (data.Channel != null) {
|
|
2586
2157
|
contents.Channel = deserializeAws_restJson1ChannelModeratedByAppInstanceUserSummary(data.Channel, context);
|
|
2587
2158
|
}
|
|
2588
|
-
return
|
|
2159
|
+
return contents;
|
|
2589
2160
|
};
|
|
2590
2161
|
exports.deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand;
|
|
2591
2162
|
const deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommandError = async (output, context) => {
|
|
@@ -2593,7 +2164,6 @@ const deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommandEr
|
|
|
2593
2164
|
...output,
|
|
2594
2165
|
body: await parseBody(output.body, context),
|
|
2595
2166
|
};
|
|
2596
|
-
let response;
|
|
2597
2167
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2598
2168
|
switch (errorCode) {
|
|
2599
2169
|
case "BadRequestException":
|
|
@@ -2616,29 +2186,26 @@ const deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommandEr
|
|
|
2616
2186
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2617
2187
|
default:
|
|
2618
2188
|
const parsedBody = parsedOutput.body;
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
$metadata,
|
|
2189
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2190
|
+
output,
|
|
2191
|
+
parsedBody,
|
|
2192
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2193
|
+
errorCode,
|
|
2625
2194
|
});
|
|
2626
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2627
2195
|
}
|
|
2628
2196
|
};
|
|
2629
2197
|
const deserializeAws_restJson1DescribeChannelModeratorCommand = async (output, context) => {
|
|
2630
2198
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2631
2199
|
return deserializeAws_restJson1DescribeChannelModeratorCommandError(output, context);
|
|
2632
2200
|
}
|
|
2633
|
-
const contents = {
|
|
2201
|
+
const contents = map({
|
|
2634
2202
|
$metadata: deserializeMetadata(output),
|
|
2635
|
-
|
|
2636
|
-
};
|
|
2203
|
+
});
|
|
2637
2204
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2638
|
-
if (data.ChannelModerator
|
|
2205
|
+
if (data.ChannelModerator != null) {
|
|
2639
2206
|
contents.ChannelModerator = deserializeAws_restJson1ChannelModerator(data.ChannelModerator, context);
|
|
2640
2207
|
}
|
|
2641
|
-
return
|
|
2208
|
+
return contents;
|
|
2642
2209
|
};
|
|
2643
2210
|
exports.deserializeAws_restJson1DescribeChannelModeratorCommand = deserializeAws_restJson1DescribeChannelModeratorCommand;
|
|
2644
2211
|
const deserializeAws_restJson1DescribeChannelModeratorCommandError = async (output, context) => {
|
|
@@ -2646,7 +2213,6 @@ const deserializeAws_restJson1DescribeChannelModeratorCommandError = async (outp
|
|
|
2646
2213
|
...output,
|
|
2647
2214
|
body: await parseBody(output.body, context),
|
|
2648
2215
|
};
|
|
2649
|
-
let response;
|
|
2650
2216
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2651
2217
|
switch (errorCode) {
|
|
2652
2218
|
case "BadRequestException":
|
|
@@ -2672,25 +2238,23 @@ const deserializeAws_restJson1DescribeChannelModeratorCommandError = async (outp
|
|
|
2672
2238
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2673
2239
|
default:
|
|
2674
2240
|
const parsedBody = parsedOutput.body;
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
$metadata,
|
|
2241
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2242
|
+
output,
|
|
2243
|
+
parsedBody,
|
|
2244
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2245
|
+
errorCode,
|
|
2681
2246
|
});
|
|
2682
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2683
2247
|
}
|
|
2684
2248
|
};
|
|
2685
2249
|
const deserializeAws_restJson1DisassociateChannelFlowCommand = async (output, context) => {
|
|
2686
2250
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
2687
2251
|
return deserializeAws_restJson1DisassociateChannelFlowCommandError(output, context);
|
|
2688
2252
|
}
|
|
2689
|
-
const contents = {
|
|
2253
|
+
const contents = map({
|
|
2690
2254
|
$metadata: deserializeMetadata(output),
|
|
2691
|
-
};
|
|
2255
|
+
});
|
|
2692
2256
|
await collectBody(output.body, context);
|
|
2693
|
-
return
|
|
2257
|
+
return contents;
|
|
2694
2258
|
};
|
|
2695
2259
|
exports.deserializeAws_restJson1DisassociateChannelFlowCommand = deserializeAws_restJson1DisassociateChannelFlowCommand;
|
|
2696
2260
|
const deserializeAws_restJson1DisassociateChannelFlowCommandError = async (output, context) => {
|
|
@@ -2698,7 +2262,6 @@ const deserializeAws_restJson1DisassociateChannelFlowCommandError = async (outpu
|
|
|
2698
2262
|
...output,
|
|
2699
2263
|
body: await parseBody(output.body, context),
|
|
2700
2264
|
};
|
|
2701
|
-
let response;
|
|
2702
2265
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2703
2266
|
switch (errorCode) {
|
|
2704
2267
|
case "BadRequestException":
|
|
@@ -2727,37 +2290,32 @@ const deserializeAws_restJson1DisassociateChannelFlowCommandError = async (outpu
|
|
|
2727
2290
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2728
2291
|
default:
|
|
2729
2292
|
const parsedBody = parsedOutput.body;
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
$metadata,
|
|
2293
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2294
|
+
output,
|
|
2295
|
+
parsedBody,
|
|
2296
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2297
|
+
errorCode,
|
|
2736
2298
|
});
|
|
2737
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2738
2299
|
}
|
|
2739
2300
|
};
|
|
2740
2301
|
const deserializeAws_restJson1GetChannelMembershipPreferencesCommand = async (output, context) => {
|
|
2741
2302
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2742
2303
|
return deserializeAws_restJson1GetChannelMembershipPreferencesCommandError(output, context);
|
|
2743
2304
|
}
|
|
2744
|
-
const contents = {
|
|
2305
|
+
const contents = map({
|
|
2745
2306
|
$metadata: deserializeMetadata(output),
|
|
2746
|
-
|
|
2747
|
-
Member: undefined,
|
|
2748
|
-
Preferences: undefined,
|
|
2749
|
-
};
|
|
2307
|
+
});
|
|
2750
2308
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2751
|
-
if (data.ChannelArn
|
|
2309
|
+
if (data.ChannelArn != null) {
|
|
2752
2310
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
2753
2311
|
}
|
|
2754
|
-
if (data.Member
|
|
2312
|
+
if (data.Member != null) {
|
|
2755
2313
|
contents.Member = deserializeAws_restJson1Identity(data.Member, context);
|
|
2756
2314
|
}
|
|
2757
|
-
if (data.Preferences
|
|
2315
|
+
if (data.Preferences != null) {
|
|
2758
2316
|
contents.Preferences = deserializeAws_restJson1ChannelMembershipPreferences(data.Preferences, context);
|
|
2759
2317
|
}
|
|
2760
|
-
return
|
|
2318
|
+
return contents;
|
|
2761
2319
|
};
|
|
2762
2320
|
exports.deserializeAws_restJson1GetChannelMembershipPreferencesCommand = deserializeAws_restJson1GetChannelMembershipPreferencesCommand;
|
|
2763
2321
|
const deserializeAws_restJson1GetChannelMembershipPreferencesCommandError = async (output, context) => {
|
|
@@ -2765,7 +2323,6 @@ const deserializeAws_restJson1GetChannelMembershipPreferencesCommandError = asyn
|
|
|
2765
2323
|
...output,
|
|
2766
2324
|
body: await parseBody(output.body, context),
|
|
2767
2325
|
};
|
|
2768
|
-
let response;
|
|
2769
2326
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2770
2327
|
switch (errorCode) {
|
|
2771
2328
|
case "BadRequestException":
|
|
@@ -2788,29 +2345,26 @@ const deserializeAws_restJson1GetChannelMembershipPreferencesCommandError = asyn
|
|
|
2788
2345
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2789
2346
|
default:
|
|
2790
2347
|
const parsedBody = parsedOutput.body;
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
$metadata,
|
|
2348
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2349
|
+
output,
|
|
2350
|
+
parsedBody,
|
|
2351
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2352
|
+
errorCode,
|
|
2797
2353
|
});
|
|
2798
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2799
2354
|
}
|
|
2800
2355
|
};
|
|
2801
2356
|
const deserializeAws_restJson1GetChannelMessageCommand = async (output, context) => {
|
|
2802
2357
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2803
2358
|
return deserializeAws_restJson1GetChannelMessageCommandError(output, context);
|
|
2804
2359
|
}
|
|
2805
|
-
const contents = {
|
|
2360
|
+
const contents = map({
|
|
2806
2361
|
$metadata: deserializeMetadata(output),
|
|
2807
|
-
|
|
2808
|
-
};
|
|
2362
|
+
});
|
|
2809
2363
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2810
|
-
if (data.ChannelMessage
|
|
2364
|
+
if (data.ChannelMessage != null) {
|
|
2811
2365
|
contents.ChannelMessage = deserializeAws_restJson1ChannelMessage(data.ChannelMessage, context);
|
|
2812
2366
|
}
|
|
2813
|
-
return
|
|
2367
|
+
return contents;
|
|
2814
2368
|
};
|
|
2815
2369
|
exports.deserializeAws_restJson1GetChannelMessageCommand = deserializeAws_restJson1GetChannelMessageCommand;
|
|
2816
2370
|
const deserializeAws_restJson1GetChannelMessageCommandError = async (output, context) => {
|
|
@@ -2818,7 +2372,6 @@ const deserializeAws_restJson1GetChannelMessageCommandError = async (output, con
|
|
|
2818
2372
|
...output,
|
|
2819
2373
|
body: await parseBody(output.body, context),
|
|
2820
2374
|
};
|
|
2821
|
-
let response;
|
|
2822
2375
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2823
2376
|
switch (errorCode) {
|
|
2824
2377
|
case "BadRequestException":
|
|
@@ -2844,29 +2397,26 @@ const deserializeAws_restJson1GetChannelMessageCommandError = async (output, con
|
|
|
2844
2397
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2845
2398
|
default:
|
|
2846
2399
|
const parsedBody = parsedOutput.body;
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
$metadata,
|
|
2400
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2401
|
+
output,
|
|
2402
|
+
parsedBody,
|
|
2403
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2404
|
+
errorCode,
|
|
2853
2405
|
});
|
|
2854
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2855
2406
|
}
|
|
2856
2407
|
};
|
|
2857
2408
|
const deserializeAws_restJson1GetChannelMessageStatusCommand = async (output, context) => {
|
|
2858
2409
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2859
2410
|
return deserializeAws_restJson1GetChannelMessageStatusCommandError(output, context);
|
|
2860
2411
|
}
|
|
2861
|
-
const contents = {
|
|
2412
|
+
const contents = map({
|
|
2862
2413
|
$metadata: deserializeMetadata(output),
|
|
2863
|
-
|
|
2864
|
-
};
|
|
2414
|
+
});
|
|
2865
2415
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2866
|
-
if (data.Status
|
|
2416
|
+
if (data.Status != null) {
|
|
2867
2417
|
contents.Status = deserializeAws_restJson1ChannelMessageStatusStructure(data.Status, context);
|
|
2868
2418
|
}
|
|
2869
|
-
return
|
|
2419
|
+
return contents;
|
|
2870
2420
|
};
|
|
2871
2421
|
exports.deserializeAws_restJson1GetChannelMessageStatusCommand = deserializeAws_restJson1GetChannelMessageStatusCommand;
|
|
2872
2422
|
const deserializeAws_restJson1GetChannelMessageStatusCommandError = async (output, context) => {
|
|
@@ -2874,7 +2424,6 @@ const deserializeAws_restJson1GetChannelMessageStatusCommandError = async (outpu
|
|
|
2874
2424
|
...output,
|
|
2875
2425
|
body: await parseBody(output.body, context),
|
|
2876
2426
|
};
|
|
2877
|
-
let response;
|
|
2878
2427
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2879
2428
|
switch (errorCode) {
|
|
2880
2429
|
case "BadRequestException":
|
|
@@ -2897,29 +2446,26 @@ const deserializeAws_restJson1GetChannelMessageStatusCommandError = async (outpu
|
|
|
2897
2446
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2898
2447
|
default:
|
|
2899
2448
|
const parsedBody = parsedOutput.body;
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
$metadata,
|
|
2449
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2450
|
+
output,
|
|
2451
|
+
parsedBody,
|
|
2452
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2453
|
+
errorCode,
|
|
2906
2454
|
});
|
|
2907
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2908
2455
|
}
|
|
2909
2456
|
};
|
|
2910
2457
|
const deserializeAws_restJson1GetMessagingSessionEndpointCommand = async (output, context) => {
|
|
2911
2458
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2912
2459
|
return deserializeAws_restJson1GetMessagingSessionEndpointCommandError(output, context);
|
|
2913
2460
|
}
|
|
2914
|
-
const contents = {
|
|
2461
|
+
const contents = map({
|
|
2915
2462
|
$metadata: deserializeMetadata(output),
|
|
2916
|
-
|
|
2917
|
-
};
|
|
2463
|
+
});
|
|
2918
2464
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2919
|
-
if (data.Endpoint
|
|
2465
|
+
if (data.Endpoint != null) {
|
|
2920
2466
|
contents.Endpoint = deserializeAws_restJson1MessagingSessionEndpoint(data.Endpoint, context);
|
|
2921
2467
|
}
|
|
2922
|
-
return
|
|
2468
|
+
return contents;
|
|
2923
2469
|
};
|
|
2924
2470
|
exports.deserializeAws_restJson1GetMessagingSessionEndpointCommand = deserializeAws_restJson1GetMessagingSessionEndpointCommand;
|
|
2925
2471
|
const deserializeAws_restJson1GetMessagingSessionEndpointCommandError = async (output, context) => {
|
|
@@ -2927,7 +2473,6 @@ const deserializeAws_restJson1GetMessagingSessionEndpointCommandError = async (o
|
|
|
2927
2473
|
...output,
|
|
2928
2474
|
body: await parseBody(output.body, context),
|
|
2929
2475
|
};
|
|
2930
|
-
let response;
|
|
2931
2476
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2932
2477
|
switch (errorCode) {
|
|
2933
2478
|
case "ForbiddenException":
|
|
@@ -2947,37 +2492,32 @@ const deserializeAws_restJson1GetMessagingSessionEndpointCommandError = async (o
|
|
|
2947
2492
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
2948
2493
|
default:
|
|
2949
2494
|
const parsedBody = parsedOutput.body;
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
$metadata,
|
|
2495
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2496
|
+
output,
|
|
2497
|
+
parsedBody,
|
|
2498
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2499
|
+
errorCode,
|
|
2956
2500
|
});
|
|
2957
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2958
2501
|
}
|
|
2959
2502
|
};
|
|
2960
2503
|
const deserializeAws_restJson1ListChannelBansCommand = async (output, context) => {
|
|
2961
2504
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2962
2505
|
return deserializeAws_restJson1ListChannelBansCommandError(output, context);
|
|
2963
2506
|
}
|
|
2964
|
-
const contents = {
|
|
2507
|
+
const contents = map({
|
|
2965
2508
|
$metadata: deserializeMetadata(output),
|
|
2966
|
-
|
|
2967
|
-
ChannelBans: undefined,
|
|
2968
|
-
NextToken: undefined,
|
|
2969
|
-
};
|
|
2509
|
+
});
|
|
2970
2510
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2971
|
-
if (data.ChannelArn
|
|
2511
|
+
if (data.ChannelArn != null) {
|
|
2972
2512
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
2973
2513
|
}
|
|
2974
|
-
if (data.ChannelBans
|
|
2514
|
+
if (data.ChannelBans != null) {
|
|
2975
2515
|
contents.ChannelBans = deserializeAws_restJson1ChannelBanSummaryList(data.ChannelBans, context);
|
|
2976
2516
|
}
|
|
2977
|
-
if (data.NextToken
|
|
2517
|
+
if (data.NextToken != null) {
|
|
2978
2518
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
2979
2519
|
}
|
|
2980
|
-
return
|
|
2520
|
+
return contents;
|
|
2981
2521
|
};
|
|
2982
2522
|
exports.deserializeAws_restJson1ListChannelBansCommand = deserializeAws_restJson1ListChannelBansCommand;
|
|
2983
2523
|
const deserializeAws_restJson1ListChannelBansCommandError = async (output, context) => {
|
|
@@ -2985,7 +2525,6 @@ const deserializeAws_restJson1ListChannelBansCommandError = async (output, conte
|
|
|
2985
2525
|
...output,
|
|
2986
2526
|
body: await parseBody(output.body, context),
|
|
2987
2527
|
};
|
|
2988
|
-
let response;
|
|
2989
2528
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2990
2529
|
switch (errorCode) {
|
|
2991
2530
|
case "BadRequestException":
|
|
@@ -3008,33 +2547,29 @@ const deserializeAws_restJson1ListChannelBansCommandError = async (output, conte
|
|
|
3008
2547
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3009
2548
|
default:
|
|
3010
2549
|
const parsedBody = parsedOutput.body;
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
$metadata,
|
|
2550
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2551
|
+
output,
|
|
2552
|
+
parsedBody,
|
|
2553
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2554
|
+
errorCode,
|
|
3017
2555
|
});
|
|
3018
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3019
2556
|
}
|
|
3020
2557
|
};
|
|
3021
2558
|
const deserializeAws_restJson1ListChannelFlowsCommand = async (output, context) => {
|
|
3022
2559
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3023
2560
|
return deserializeAws_restJson1ListChannelFlowsCommandError(output, context);
|
|
3024
2561
|
}
|
|
3025
|
-
const contents = {
|
|
2562
|
+
const contents = map({
|
|
3026
2563
|
$metadata: deserializeMetadata(output),
|
|
3027
|
-
|
|
3028
|
-
NextToken: undefined,
|
|
3029
|
-
};
|
|
2564
|
+
});
|
|
3030
2565
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3031
|
-
if (data.ChannelFlows
|
|
2566
|
+
if (data.ChannelFlows != null) {
|
|
3032
2567
|
contents.ChannelFlows = deserializeAws_restJson1ChannelFlowSummaryList(data.ChannelFlows, context);
|
|
3033
2568
|
}
|
|
3034
|
-
if (data.NextToken
|
|
2569
|
+
if (data.NextToken != null) {
|
|
3035
2570
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
3036
2571
|
}
|
|
3037
|
-
return
|
|
2572
|
+
return contents;
|
|
3038
2573
|
};
|
|
3039
2574
|
exports.deserializeAws_restJson1ListChannelFlowsCommand = deserializeAws_restJson1ListChannelFlowsCommand;
|
|
3040
2575
|
const deserializeAws_restJson1ListChannelFlowsCommandError = async (output, context) => {
|
|
@@ -3042,7 +2577,6 @@ const deserializeAws_restJson1ListChannelFlowsCommandError = async (output, cont
|
|
|
3042
2577
|
...output,
|
|
3043
2578
|
body: await parseBody(output.body, context),
|
|
3044
2579
|
};
|
|
3045
|
-
let response;
|
|
3046
2580
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3047
2581
|
switch (errorCode) {
|
|
3048
2582
|
case "BadRequestException":
|
|
@@ -3065,37 +2599,32 @@ const deserializeAws_restJson1ListChannelFlowsCommandError = async (output, cont
|
|
|
3065
2599
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3066
2600
|
default:
|
|
3067
2601
|
const parsedBody = parsedOutput.body;
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
$metadata,
|
|
2602
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2603
|
+
output,
|
|
2604
|
+
parsedBody,
|
|
2605
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2606
|
+
errorCode,
|
|
3074
2607
|
});
|
|
3075
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3076
2608
|
}
|
|
3077
2609
|
};
|
|
3078
2610
|
const deserializeAws_restJson1ListChannelMembershipsCommand = async (output, context) => {
|
|
3079
2611
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3080
2612
|
return deserializeAws_restJson1ListChannelMembershipsCommandError(output, context);
|
|
3081
2613
|
}
|
|
3082
|
-
const contents = {
|
|
2614
|
+
const contents = map({
|
|
3083
2615
|
$metadata: deserializeMetadata(output),
|
|
3084
|
-
|
|
3085
|
-
ChannelMemberships: undefined,
|
|
3086
|
-
NextToken: undefined,
|
|
3087
|
-
};
|
|
2616
|
+
});
|
|
3088
2617
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3089
|
-
if (data.ChannelArn
|
|
2618
|
+
if (data.ChannelArn != null) {
|
|
3090
2619
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
3091
2620
|
}
|
|
3092
|
-
if (data.ChannelMemberships
|
|
2621
|
+
if (data.ChannelMemberships != null) {
|
|
3093
2622
|
contents.ChannelMemberships = deserializeAws_restJson1ChannelMembershipSummaryList(data.ChannelMemberships, context);
|
|
3094
2623
|
}
|
|
3095
|
-
if (data.NextToken
|
|
2624
|
+
if (data.NextToken != null) {
|
|
3096
2625
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
3097
2626
|
}
|
|
3098
|
-
return
|
|
2627
|
+
return contents;
|
|
3099
2628
|
};
|
|
3100
2629
|
exports.deserializeAws_restJson1ListChannelMembershipsCommand = deserializeAws_restJson1ListChannelMembershipsCommand;
|
|
3101
2630
|
const deserializeAws_restJson1ListChannelMembershipsCommandError = async (output, context) => {
|
|
@@ -3103,7 +2632,6 @@ const deserializeAws_restJson1ListChannelMembershipsCommandError = async (output
|
|
|
3103
2632
|
...output,
|
|
3104
2633
|
body: await parseBody(output.body, context),
|
|
3105
2634
|
};
|
|
3106
|
-
let response;
|
|
3107
2635
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3108
2636
|
switch (errorCode) {
|
|
3109
2637
|
case "BadRequestException":
|
|
@@ -3126,33 +2654,29 @@ const deserializeAws_restJson1ListChannelMembershipsCommandError = async (output
|
|
|
3126
2654
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3127
2655
|
default:
|
|
3128
2656
|
const parsedBody = parsedOutput.body;
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
$metadata,
|
|
2657
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2658
|
+
output,
|
|
2659
|
+
parsedBody,
|
|
2660
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2661
|
+
errorCode,
|
|
3135
2662
|
});
|
|
3136
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3137
2663
|
}
|
|
3138
2664
|
};
|
|
3139
2665
|
const deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = async (output, context) => {
|
|
3140
2666
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3141
2667
|
return deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommandError(output, context);
|
|
3142
2668
|
}
|
|
3143
|
-
const contents = {
|
|
2669
|
+
const contents = map({
|
|
3144
2670
|
$metadata: deserializeMetadata(output),
|
|
3145
|
-
|
|
3146
|
-
NextToken: undefined,
|
|
3147
|
-
};
|
|
2671
|
+
});
|
|
3148
2672
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3149
|
-
if (data.ChannelMemberships
|
|
2673
|
+
if (data.ChannelMemberships != null) {
|
|
3150
2674
|
contents.ChannelMemberships = deserializeAws_restJson1ChannelMembershipForAppInstanceUserSummaryList(data.ChannelMemberships, context);
|
|
3151
2675
|
}
|
|
3152
|
-
if (data.NextToken
|
|
2676
|
+
if (data.NextToken != null) {
|
|
3153
2677
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
3154
2678
|
}
|
|
3155
|
-
return
|
|
2679
|
+
return contents;
|
|
3156
2680
|
};
|
|
3157
2681
|
exports.deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand;
|
|
3158
2682
|
const deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommandError = async (output, context) => {
|
|
@@ -3160,7 +2684,6 @@ const deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommandErr
|
|
|
3160
2684
|
...output,
|
|
3161
2685
|
body: await parseBody(output.body, context),
|
|
3162
2686
|
};
|
|
3163
|
-
let response;
|
|
3164
2687
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3165
2688
|
switch (errorCode) {
|
|
3166
2689
|
case "BadRequestException":
|
|
@@ -3183,37 +2706,35 @@ const deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommandErr
|
|
|
3183
2706
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3184
2707
|
default:
|
|
3185
2708
|
const parsedBody = parsedOutput.body;
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
$metadata,
|
|
2709
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2710
|
+
output,
|
|
2711
|
+
parsedBody,
|
|
2712
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2713
|
+
errorCode,
|
|
3192
2714
|
});
|
|
3193
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3194
2715
|
}
|
|
3195
2716
|
};
|
|
3196
2717
|
const deserializeAws_restJson1ListChannelMessagesCommand = async (output, context) => {
|
|
3197
2718
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3198
2719
|
return deserializeAws_restJson1ListChannelMessagesCommandError(output, context);
|
|
3199
2720
|
}
|
|
3200
|
-
const contents = {
|
|
2721
|
+
const contents = map({
|
|
3201
2722
|
$metadata: deserializeMetadata(output),
|
|
3202
|
-
|
|
3203
|
-
ChannelMessages: undefined,
|
|
3204
|
-
NextToken: undefined,
|
|
3205
|
-
};
|
|
2723
|
+
});
|
|
3206
2724
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3207
|
-
if (data.ChannelArn
|
|
2725
|
+
if (data.ChannelArn != null) {
|
|
3208
2726
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
3209
2727
|
}
|
|
3210
|
-
if (data.ChannelMessages
|
|
2728
|
+
if (data.ChannelMessages != null) {
|
|
3211
2729
|
contents.ChannelMessages = deserializeAws_restJson1ChannelMessageSummaryList(data.ChannelMessages, context);
|
|
3212
2730
|
}
|
|
3213
|
-
if (data.NextToken
|
|
2731
|
+
if (data.NextToken != null) {
|
|
3214
2732
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
3215
2733
|
}
|
|
3216
|
-
|
|
2734
|
+
if (data.SubChannelId != null) {
|
|
2735
|
+
contents.SubChannelId = (0, smithy_client_1.expectString)(data.SubChannelId);
|
|
2736
|
+
}
|
|
2737
|
+
return contents;
|
|
3217
2738
|
};
|
|
3218
2739
|
exports.deserializeAws_restJson1ListChannelMessagesCommand = deserializeAws_restJson1ListChannelMessagesCommand;
|
|
3219
2740
|
const deserializeAws_restJson1ListChannelMessagesCommandError = async (output, context) => {
|
|
@@ -3221,7 +2742,6 @@ const deserializeAws_restJson1ListChannelMessagesCommandError = async (output, c
|
|
|
3221
2742
|
...output,
|
|
3222
2743
|
body: await parseBody(output.body, context),
|
|
3223
2744
|
};
|
|
3224
|
-
let response;
|
|
3225
2745
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3226
2746
|
switch (errorCode) {
|
|
3227
2747
|
case "BadRequestException":
|
|
@@ -3244,37 +2764,32 @@ const deserializeAws_restJson1ListChannelMessagesCommandError = async (output, c
|
|
|
3244
2764
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3245
2765
|
default:
|
|
3246
2766
|
const parsedBody = parsedOutput.body;
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
$metadata,
|
|
2767
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2768
|
+
output,
|
|
2769
|
+
parsedBody,
|
|
2770
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2771
|
+
errorCode,
|
|
3253
2772
|
});
|
|
3254
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3255
2773
|
}
|
|
3256
2774
|
};
|
|
3257
2775
|
const deserializeAws_restJson1ListChannelModeratorsCommand = async (output, context) => {
|
|
3258
2776
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3259
2777
|
return deserializeAws_restJson1ListChannelModeratorsCommandError(output, context);
|
|
3260
2778
|
}
|
|
3261
|
-
const contents = {
|
|
2779
|
+
const contents = map({
|
|
3262
2780
|
$metadata: deserializeMetadata(output),
|
|
3263
|
-
|
|
3264
|
-
ChannelModerators: undefined,
|
|
3265
|
-
NextToken: undefined,
|
|
3266
|
-
};
|
|
2781
|
+
});
|
|
3267
2782
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3268
|
-
if (data.ChannelArn
|
|
2783
|
+
if (data.ChannelArn != null) {
|
|
3269
2784
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
3270
2785
|
}
|
|
3271
|
-
if (data.ChannelModerators
|
|
2786
|
+
if (data.ChannelModerators != null) {
|
|
3272
2787
|
contents.ChannelModerators = deserializeAws_restJson1ChannelModeratorSummaryList(data.ChannelModerators, context);
|
|
3273
2788
|
}
|
|
3274
|
-
if (data.NextToken
|
|
2789
|
+
if (data.NextToken != null) {
|
|
3275
2790
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
3276
2791
|
}
|
|
3277
|
-
return
|
|
2792
|
+
return contents;
|
|
3278
2793
|
};
|
|
3279
2794
|
exports.deserializeAws_restJson1ListChannelModeratorsCommand = deserializeAws_restJson1ListChannelModeratorsCommand;
|
|
3280
2795
|
const deserializeAws_restJson1ListChannelModeratorsCommandError = async (output, context) => {
|
|
@@ -3282,7 +2797,6 @@ const deserializeAws_restJson1ListChannelModeratorsCommandError = async (output,
|
|
|
3282
2797
|
...output,
|
|
3283
2798
|
body: await parseBody(output.body, context),
|
|
3284
2799
|
};
|
|
3285
|
-
let response;
|
|
3286
2800
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3287
2801
|
switch (errorCode) {
|
|
3288
2802
|
case "BadRequestException":
|
|
@@ -3305,33 +2819,29 @@ const deserializeAws_restJson1ListChannelModeratorsCommandError = async (output,
|
|
|
3305
2819
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3306
2820
|
default:
|
|
3307
2821
|
const parsedBody = parsedOutput.body;
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
$metadata,
|
|
2822
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2823
|
+
output,
|
|
2824
|
+
parsedBody,
|
|
2825
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2826
|
+
errorCode,
|
|
3314
2827
|
});
|
|
3315
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3316
2828
|
}
|
|
3317
2829
|
};
|
|
3318
2830
|
const deserializeAws_restJson1ListChannelsCommand = async (output, context) => {
|
|
3319
2831
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3320
2832
|
return deserializeAws_restJson1ListChannelsCommandError(output, context);
|
|
3321
2833
|
}
|
|
3322
|
-
const contents = {
|
|
2834
|
+
const contents = map({
|
|
3323
2835
|
$metadata: deserializeMetadata(output),
|
|
3324
|
-
|
|
3325
|
-
NextToken: undefined,
|
|
3326
|
-
};
|
|
2836
|
+
});
|
|
3327
2837
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3328
|
-
if (data.Channels
|
|
2838
|
+
if (data.Channels != null) {
|
|
3329
2839
|
contents.Channels = deserializeAws_restJson1ChannelSummaryList(data.Channels, context);
|
|
3330
2840
|
}
|
|
3331
|
-
if (data.NextToken
|
|
2841
|
+
if (data.NextToken != null) {
|
|
3332
2842
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
3333
2843
|
}
|
|
3334
|
-
return
|
|
2844
|
+
return contents;
|
|
3335
2845
|
};
|
|
3336
2846
|
exports.deserializeAws_restJson1ListChannelsCommand = deserializeAws_restJson1ListChannelsCommand;
|
|
3337
2847
|
const deserializeAws_restJson1ListChannelsCommandError = async (output, context) => {
|
|
@@ -3339,7 +2849,6 @@ const deserializeAws_restJson1ListChannelsCommandError = async (output, context)
|
|
|
3339
2849
|
...output,
|
|
3340
2850
|
body: await parseBody(output.body, context),
|
|
3341
2851
|
};
|
|
3342
|
-
let response;
|
|
3343
2852
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3344
2853
|
switch (errorCode) {
|
|
3345
2854
|
case "BadRequestException":
|
|
@@ -3362,33 +2871,29 @@ const deserializeAws_restJson1ListChannelsCommandError = async (output, context)
|
|
|
3362
2871
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3363
2872
|
default:
|
|
3364
2873
|
const parsedBody = parsedOutput.body;
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
$metadata,
|
|
2874
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2875
|
+
output,
|
|
2876
|
+
parsedBody,
|
|
2877
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2878
|
+
errorCode,
|
|
3371
2879
|
});
|
|
3372
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3373
2880
|
}
|
|
3374
2881
|
};
|
|
3375
2882
|
const deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = async (output, context) => {
|
|
3376
2883
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3377
2884
|
return deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommandError(output, context);
|
|
3378
2885
|
}
|
|
3379
|
-
const contents = {
|
|
2886
|
+
const contents = map({
|
|
3380
2887
|
$metadata: deserializeMetadata(output),
|
|
3381
|
-
|
|
3382
|
-
NextToken: undefined,
|
|
3383
|
-
};
|
|
2888
|
+
});
|
|
3384
2889
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3385
|
-
if (data.Channels
|
|
2890
|
+
if (data.Channels != null) {
|
|
3386
2891
|
contents.Channels = deserializeAws_restJson1ChannelAssociatedWithFlowSummaryList(data.Channels, context);
|
|
3387
2892
|
}
|
|
3388
|
-
if (data.NextToken
|
|
2893
|
+
if (data.NextToken != null) {
|
|
3389
2894
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
3390
2895
|
}
|
|
3391
|
-
return
|
|
2896
|
+
return contents;
|
|
3392
2897
|
};
|
|
3393
2898
|
exports.deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand;
|
|
3394
2899
|
const deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommandError = async (output, context) => {
|
|
@@ -3396,7 +2901,6 @@ const deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommandError
|
|
|
3396
2901
|
...output,
|
|
3397
2902
|
body: await parseBody(output.body, context),
|
|
3398
2903
|
};
|
|
3399
|
-
let response;
|
|
3400
2904
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3401
2905
|
switch (errorCode) {
|
|
3402
2906
|
case "BadRequestException":
|
|
@@ -3419,33 +2923,29 @@ const deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommandError
|
|
|
3419
2923
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3420
2924
|
default:
|
|
3421
2925
|
const parsedBody = parsedOutput.body;
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
$metadata,
|
|
2926
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2927
|
+
output,
|
|
2928
|
+
parsedBody,
|
|
2929
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2930
|
+
errorCode,
|
|
3428
2931
|
});
|
|
3429
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3430
2932
|
}
|
|
3431
2933
|
};
|
|
3432
2934
|
const deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = async (output, context) => {
|
|
3433
2935
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3434
2936
|
return deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommandError(output, context);
|
|
3435
2937
|
}
|
|
3436
|
-
const contents = {
|
|
2938
|
+
const contents = map({
|
|
3437
2939
|
$metadata: deserializeMetadata(output),
|
|
3438
|
-
|
|
3439
|
-
NextToken: undefined,
|
|
3440
|
-
};
|
|
2940
|
+
});
|
|
3441
2941
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3442
|
-
if (data.Channels
|
|
2942
|
+
if (data.Channels != null) {
|
|
3443
2943
|
contents.Channels = deserializeAws_restJson1ChannelModeratedByAppInstanceUserSummaryList(data.Channels, context);
|
|
3444
2944
|
}
|
|
3445
|
-
if (data.NextToken
|
|
2945
|
+
if (data.NextToken != null) {
|
|
3446
2946
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
3447
2947
|
}
|
|
3448
|
-
return
|
|
2948
|
+
return contents;
|
|
3449
2949
|
};
|
|
3450
2950
|
exports.deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand;
|
|
3451
2951
|
const deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommandError = async (output, context) => {
|
|
@@ -3453,7 +2953,6 @@ const deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommandError
|
|
|
3453
2953
|
...output,
|
|
3454
2954
|
body: await parseBody(output.body, context),
|
|
3455
2955
|
};
|
|
3456
|
-
let response;
|
|
3457
2956
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3458
2957
|
switch (errorCode) {
|
|
3459
2958
|
case "BadRequestException":
|
|
@@ -3476,29 +2975,81 @@ const deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommandError
|
|
|
3476
2975
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3477
2976
|
default:
|
|
3478
2977
|
const parsedBody = parsedOutput.body;
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
2978
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2979
|
+
output,
|
|
2980
|
+
parsedBody,
|
|
2981
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
2982
|
+
errorCode,
|
|
2983
|
+
});
|
|
2984
|
+
}
|
|
2985
|
+
};
|
|
2986
|
+
const deserializeAws_restJson1ListSubChannelsCommand = async (output, context) => {
|
|
2987
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2988
|
+
return deserializeAws_restJson1ListSubChannelsCommandError(output, context);
|
|
2989
|
+
}
|
|
2990
|
+
const contents = map({
|
|
2991
|
+
$metadata: deserializeMetadata(output),
|
|
2992
|
+
});
|
|
2993
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2994
|
+
if (data.ChannelArn != null) {
|
|
2995
|
+
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
2996
|
+
}
|
|
2997
|
+
if (data.NextToken != null) {
|
|
2998
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
2999
|
+
}
|
|
3000
|
+
if (data.SubChannels != null) {
|
|
3001
|
+
contents.SubChannels = deserializeAws_restJson1SubChannelSummaryList(data.SubChannels, context);
|
|
3002
|
+
}
|
|
3003
|
+
return contents;
|
|
3004
|
+
};
|
|
3005
|
+
exports.deserializeAws_restJson1ListSubChannelsCommand = deserializeAws_restJson1ListSubChannelsCommand;
|
|
3006
|
+
const deserializeAws_restJson1ListSubChannelsCommandError = async (output, context) => {
|
|
3007
|
+
const parsedOutput = {
|
|
3008
|
+
...output,
|
|
3009
|
+
body: await parseBody(output.body, context),
|
|
3010
|
+
};
|
|
3011
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3012
|
+
switch (errorCode) {
|
|
3013
|
+
case "BadRequestException":
|
|
3014
|
+
case "com.amazonaws.chimesdkmessaging#BadRequestException":
|
|
3015
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3016
|
+
case "ForbiddenException":
|
|
3017
|
+
case "com.amazonaws.chimesdkmessaging#ForbiddenException":
|
|
3018
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
3019
|
+
case "ServiceFailureException":
|
|
3020
|
+
case "com.amazonaws.chimesdkmessaging#ServiceFailureException":
|
|
3021
|
+
throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
|
|
3022
|
+
case "ServiceUnavailableException":
|
|
3023
|
+
case "com.amazonaws.chimesdkmessaging#ServiceUnavailableException":
|
|
3024
|
+
throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
3025
|
+
case "ThrottledClientException":
|
|
3026
|
+
case "com.amazonaws.chimesdkmessaging#ThrottledClientException":
|
|
3027
|
+
throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
|
|
3028
|
+
case "UnauthorizedClientException":
|
|
3029
|
+
case "com.amazonaws.chimesdkmessaging#UnauthorizedClientException":
|
|
3030
|
+
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3031
|
+
default:
|
|
3032
|
+
const parsedBody = parsedOutput.body;
|
|
3033
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3034
|
+
output,
|
|
3035
|
+
parsedBody,
|
|
3036
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3037
|
+
errorCode,
|
|
3485
3038
|
});
|
|
3486
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3487
3039
|
}
|
|
3488
3040
|
};
|
|
3489
3041
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
3490
3042
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3491
3043
|
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
3492
3044
|
}
|
|
3493
|
-
const contents = {
|
|
3045
|
+
const contents = map({
|
|
3494
3046
|
$metadata: deserializeMetadata(output),
|
|
3495
|
-
|
|
3496
|
-
};
|
|
3047
|
+
});
|
|
3497
3048
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3498
|
-
if (data.Tags
|
|
3049
|
+
if (data.Tags != null) {
|
|
3499
3050
|
contents.Tags = deserializeAws_restJson1TagList(data.Tags, context);
|
|
3500
3051
|
}
|
|
3501
|
-
return
|
|
3052
|
+
return contents;
|
|
3502
3053
|
};
|
|
3503
3054
|
exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
|
|
3504
3055
|
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
@@ -3506,7 +3057,6 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
3506
3057
|
...output,
|
|
3507
3058
|
body: await parseBody(output.body, context),
|
|
3508
3059
|
};
|
|
3509
|
-
let response;
|
|
3510
3060
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3511
3061
|
switch (errorCode) {
|
|
3512
3062
|
case "BadRequestException":
|
|
@@ -3529,37 +3079,32 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
3529
3079
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3530
3080
|
default:
|
|
3531
3081
|
const parsedBody = parsedOutput.body;
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
$metadata,
|
|
3082
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3083
|
+
output,
|
|
3084
|
+
parsedBody,
|
|
3085
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3086
|
+
errorCode,
|
|
3538
3087
|
});
|
|
3539
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3540
3088
|
}
|
|
3541
3089
|
};
|
|
3542
3090
|
const deserializeAws_restJson1PutChannelMembershipPreferencesCommand = async (output, context) => {
|
|
3543
3091
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3544
3092
|
return deserializeAws_restJson1PutChannelMembershipPreferencesCommandError(output, context);
|
|
3545
3093
|
}
|
|
3546
|
-
const contents = {
|
|
3094
|
+
const contents = map({
|
|
3547
3095
|
$metadata: deserializeMetadata(output),
|
|
3548
|
-
|
|
3549
|
-
Member: undefined,
|
|
3550
|
-
Preferences: undefined,
|
|
3551
|
-
};
|
|
3096
|
+
});
|
|
3552
3097
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3553
|
-
if (data.ChannelArn
|
|
3098
|
+
if (data.ChannelArn != null) {
|
|
3554
3099
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
3555
3100
|
}
|
|
3556
|
-
if (data.Member
|
|
3101
|
+
if (data.Member != null) {
|
|
3557
3102
|
contents.Member = deserializeAws_restJson1Identity(data.Member, context);
|
|
3558
3103
|
}
|
|
3559
|
-
if (data.Preferences
|
|
3104
|
+
if (data.Preferences != null) {
|
|
3560
3105
|
contents.Preferences = deserializeAws_restJson1ChannelMembershipPreferences(data.Preferences, context);
|
|
3561
3106
|
}
|
|
3562
|
-
return
|
|
3107
|
+
return contents;
|
|
3563
3108
|
};
|
|
3564
3109
|
exports.deserializeAws_restJson1PutChannelMembershipPreferencesCommand = deserializeAws_restJson1PutChannelMembershipPreferencesCommand;
|
|
3565
3110
|
const deserializeAws_restJson1PutChannelMembershipPreferencesCommandError = async (output, context) => {
|
|
@@ -3567,7 +3112,6 @@ const deserializeAws_restJson1PutChannelMembershipPreferencesCommandError = asyn
|
|
|
3567
3112
|
...output,
|
|
3568
3113
|
body: await parseBody(output.body, context),
|
|
3569
3114
|
};
|
|
3570
|
-
let response;
|
|
3571
3115
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3572
3116
|
switch (errorCode) {
|
|
3573
3117
|
case "BadRequestException":
|
|
@@ -3593,33 +3137,32 @@ const deserializeAws_restJson1PutChannelMembershipPreferencesCommandError = asyn
|
|
|
3593
3137
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3594
3138
|
default:
|
|
3595
3139
|
const parsedBody = parsedOutput.body;
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
$metadata,
|
|
3140
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3141
|
+
output,
|
|
3142
|
+
parsedBody,
|
|
3143
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3144
|
+
errorCode,
|
|
3602
3145
|
});
|
|
3603
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3604
3146
|
}
|
|
3605
3147
|
};
|
|
3606
3148
|
const deserializeAws_restJson1RedactChannelMessageCommand = async (output, context) => {
|
|
3607
3149
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3608
3150
|
return deserializeAws_restJson1RedactChannelMessageCommandError(output, context);
|
|
3609
3151
|
}
|
|
3610
|
-
const contents = {
|
|
3152
|
+
const contents = map({
|
|
3611
3153
|
$metadata: deserializeMetadata(output),
|
|
3612
|
-
|
|
3613
|
-
MessageId: undefined,
|
|
3614
|
-
};
|
|
3154
|
+
});
|
|
3615
3155
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3616
|
-
if (data.ChannelArn
|
|
3156
|
+
if (data.ChannelArn != null) {
|
|
3617
3157
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
3618
3158
|
}
|
|
3619
|
-
if (data.MessageId
|
|
3159
|
+
if (data.MessageId != null) {
|
|
3620
3160
|
contents.MessageId = (0, smithy_client_1.expectString)(data.MessageId);
|
|
3621
3161
|
}
|
|
3622
|
-
|
|
3162
|
+
if (data.SubChannelId != null) {
|
|
3163
|
+
contents.SubChannelId = (0, smithy_client_1.expectString)(data.SubChannelId);
|
|
3164
|
+
}
|
|
3165
|
+
return contents;
|
|
3623
3166
|
};
|
|
3624
3167
|
exports.deserializeAws_restJson1RedactChannelMessageCommand = deserializeAws_restJson1RedactChannelMessageCommand;
|
|
3625
3168
|
const deserializeAws_restJson1RedactChannelMessageCommandError = async (output, context) => {
|
|
@@ -3627,7 +3170,6 @@ const deserializeAws_restJson1RedactChannelMessageCommandError = async (output,
|
|
|
3627
3170
|
...output,
|
|
3628
3171
|
body: await parseBody(output.body, context),
|
|
3629
3172
|
};
|
|
3630
|
-
let response;
|
|
3631
3173
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3632
3174
|
switch (errorCode) {
|
|
3633
3175
|
case "BadRequestException":
|
|
@@ -3653,33 +3195,29 @@ const deserializeAws_restJson1RedactChannelMessageCommandError = async (output,
|
|
|
3653
3195
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3654
3196
|
default:
|
|
3655
3197
|
const parsedBody = parsedOutput.body;
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
$metadata,
|
|
3198
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3199
|
+
output,
|
|
3200
|
+
parsedBody,
|
|
3201
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3202
|
+
errorCode,
|
|
3662
3203
|
});
|
|
3663
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3664
3204
|
}
|
|
3665
3205
|
};
|
|
3666
3206
|
const deserializeAws_restJson1SearchChannelsCommand = async (output, context) => {
|
|
3667
3207
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3668
3208
|
return deserializeAws_restJson1SearchChannelsCommandError(output, context);
|
|
3669
3209
|
}
|
|
3670
|
-
const contents = {
|
|
3210
|
+
const contents = map({
|
|
3671
3211
|
$metadata: deserializeMetadata(output),
|
|
3672
|
-
|
|
3673
|
-
NextToken: undefined,
|
|
3674
|
-
};
|
|
3212
|
+
});
|
|
3675
3213
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3676
|
-
if (data.Channels
|
|
3214
|
+
if (data.Channels != null) {
|
|
3677
3215
|
contents.Channels = deserializeAws_restJson1ChannelSummaryList(data.Channels, context);
|
|
3678
3216
|
}
|
|
3679
|
-
if (data.NextToken
|
|
3217
|
+
if (data.NextToken != null) {
|
|
3680
3218
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
3681
3219
|
}
|
|
3682
|
-
return
|
|
3220
|
+
return contents;
|
|
3683
3221
|
};
|
|
3684
3222
|
exports.deserializeAws_restJson1SearchChannelsCommand = deserializeAws_restJson1SearchChannelsCommand;
|
|
3685
3223
|
const deserializeAws_restJson1SearchChannelsCommandError = async (output, context) => {
|
|
@@ -3687,7 +3225,6 @@ const deserializeAws_restJson1SearchChannelsCommandError = async (output, contex
|
|
|
3687
3225
|
...output,
|
|
3688
3226
|
body: await parseBody(output.body, context),
|
|
3689
3227
|
};
|
|
3690
|
-
let response;
|
|
3691
3228
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3692
3229
|
switch (errorCode) {
|
|
3693
3230
|
case "BadRequestException":
|
|
@@ -3710,37 +3247,35 @@ const deserializeAws_restJson1SearchChannelsCommandError = async (output, contex
|
|
|
3710
3247
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3711
3248
|
default:
|
|
3712
3249
|
const parsedBody = parsedOutput.body;
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
$metadata,
|
|
3250
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3251
|
+
output,
|
|
3252
|
+
parsedBody,
|
|
3253
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3254
|
+
errorCode,
|
|
3719
3255
|
});
|
|
3720
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3721
3256
|
}
|
|
3722
3257
|
};
|
|
3723
3258
|
const deserializeAws_restJson1SendChannelMessageCommand = async (output, context) => {
|
|
3724
3259
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
3725
3260
|
return deserializeAws_restJson1SendChannelMessageCommandError(output, context);
|
|
3726
3261
|
}
|
|
3727
|
-
const contents = {
|
|
3262
|
+
const contents = map({
|
|
3728
3263
|
$metadata: deserializeMetadata(output),
|
|
3729
|
-
|
|
3730
|
-
MessageId: undefined,
|
|
3731
|
-
Status: undefined,
|
|
3732
|
-
};
|
|
3264
|
+
});
|
|
3733
3265
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3734
|
-
if (data.ChannelArn
|
|
3266
|
+
if (data.ChannelArn != null) {
|
|
3735
3267
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
3736
3268
|
}
|
|
3737
|
-
if (data.MessageId
|
|
3269
|
+
if (data.MessageId != null) {
|
|
3738
3270
|
contents.MessageId = (0, smithy_client_1.expectString)(data.MessageId);
|
|
3739
3271
|
}
|
|
3740
|
-
if (data.Status
|
|
3272
|
+
if (data.Status != null) {
|
|
3741
3273
|
contents.Status = deserializeAws_restJson1ChannelMessageStatusStructure(data.Status, context);
|
|
3742
3274
|
}
|
|
3743
|
-
|
|
3275
|
+
if (data.SubChannelId != null) {
|
|
3276
|
+
contents.SubChannelId = (0, smithy_client_1.expectString)(data.SubChannelId);
|
|
3277
|
+
}
|
|
3278
|
+
return contents;
|
|
3744
3279
|
};
|
|
3745
3280
|
exports.deserializeAws_restJson1SendChannelMessageCommand = deserializeAws_restJson1SendChannelMessageCommand;
|
|
3746
3281
|
const deserializeAws_restJson1SendChannelMessageCommandError = async (output, context) => {
|
|
@@ -3748,7 +3283,6 @@ const deserializeAws_restJson1SendChannelMessageCommandError = async (output, co
|
|
|
3748
3283
|
...output,
|
|
3749
3284
|
body: await parseBody(output.body, context),
|
|
3750
3285
|
};
|
|
3751
|
-
let response;
|
|
3752
3286
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3753
3287
|
switch (errorCode) {
|
|
3754
3288
|
case "BadRequestException":
|
|
@@ -3774,25 +3308,23 @@ const deserializeAws_restJson1SendChannelMessageCommandError = async (output, co
|
|
|
3774
3308
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3775
3309
|
default:
|
|
3776
3310
|
const parsedBody = parsedOutput.body;
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
$metadata,
|
|
3311
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3312
|
+
output,
|
|
3313
|
+
parsedBody,
|
|
3314
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3315
|
+
errorCode,
|
|
3783
3316
|
});
|
|
3784
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3785
3317
|
}
|
|
3786
3318
|
};
|
|
3787
3319
|
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
3788
3320
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3789
3321
|
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
3790
3322
|
}
|
|
3791
|
-
const contents = {
|
|
3323
|
+
const contents = map({
|
|
3792
3324
|
$metadata: deserializeMetadata(output),
|
|
3793
|
-
};
|
|
3325
|
+
});
|
|
3794
3326
|
await collectBody(output.body, context);
|
|
3795
|
-
return
|
|
3327
|
+
return contents;
|
|
3796
3328
|
};
|
|
3797
3329
|
exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
|
|
3798
3330
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
@@ -3800,7 +3332,6 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
3800
3332
|
...output,
|
|
3801
3333
|
body: await parseBody(output.body, context),
|
|
3802
3334
|
};
|
|
3803
|
-
let response;
|
|
3804
3335
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3805
3336
|
switch (errorCode) {
|
|
3806
3337
|
case "BadRequestException":
|
|
@@ -3826,25 +3357,23 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
3826
3357
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3827
3358
|
default:
|
|
3828
3359
|
const parsedBody = parsedOutput.body;
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
$metadata,
|
|
3360
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3361
|
+
output,
|
|
3362
|
+
parsedBody,
|
|
3363
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3364
|
+
errorCode,
|
|
3835
3365
|
});
|
|
3836
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3837
3366
|
}
|
|
3838
3367
|
};
|
|
3839
3368
|
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
3840
3369
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
3841
3370
|
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
3842
3371
|
}
|
|
3843
|
-
const contents = {
|
|
3372
|
+
const contents = map({
|
|
3844
3373
|
$metadata: deserializeMetadata(output),
|
|
3845
|
-
};
|
|
3374
|
+
});
|
|
3846
3375
|
await collectBody(output.body, context);
|
|
3847
|
-
return
|
|
3376
|
+
return contents;
|
|
3848
3377
|
};
|
|
3849
3378
|
exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
|
|
3850
3379
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
@@ -3852,7 +3381,6 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
3852
3381
|
...output,
|
|
3853
3382
|
body: await parseBody(output.body, context),
|
|
3854
3383
|
};
|
|
3855
|
-
let response;
|
|
3856
3384
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3857
3385
|
switch (errorCode) {
|
|
3858
3386
|
case "BadRequestException":
|
|
@@ -3875,29 +3403,26 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
3875
3403
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3876
3404
|
default:
|
|
3877
3405
|
const parsedBody = parsedOutput.body;
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
$metadata,
|
|
3406
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3407
|
+
output,
|
|
3408
|
+
parsedBody,
|
|
3409
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3410
|
+
errorCode,
|
|
3884
3411
|
});
|
|
3885
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3886
3412
|
}
|
|
3887
3413
|
};
|
|
3888
3414
|
const deserializeAws_restJson1UpdateChannelCommand = async (output, context) => {
|
|
3889
3415
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3890
3416
|
return deserializeAws_restJson1UpdateChannelCommandError(output, context);
|
|
3891
3417
|
}
|
|
3892
|
-
const contents = {
|
|
3418
|
+
const contents = map({
|
|
3893
3419
|
$metadata: deserializeMetadata(output),
|
|
3894
|
-
|
|
3895
|
-
};
|
|
3420
|
+
});
|
|
3896
3421
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3897
|
-
if (data.ChannelArn
|
|
3422
|
+
if (data.ChannelArn != null) {
|
|
3898
3423
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
3899
3424
|
}
|
|
3900
|
-
return
|
|
3425
|
+
return contents;
|
|
3901
3426
|
};
|
|
3902
3427
|
exports.deserializeAws_restJson1UpdateChannelCommand = deserializeAws_restJson1UpdateChannelCommand;
|
|
3903
3428
|
const deserializeAws_restJson1UpdateChannelCommandError = async (output, context) => {
|
|
@@ -3905,7 +3430,6 @@ const deserializeAws_restJson1UpdateChannelCommandError = async (output, context
|
|
|
3905
3430
|
...output,
|
|
3906
3431
|
body: await parseBody(output.body, context),
|
|
3907
3432
|
};
|
|
3908
|
-
let response;
|
|
3909
3433
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3910
3434
|
switch (errorCode) {
|
|
3911
3435
|
case "BadRequestException":
|
|
@@ -3931,29 +3455,26 @@ const deserializeAws_restJson1UpdateChannelCommandError = async (output, context
|
|
|
3931
3455
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3932
3456
|
default:
|
|
3933
3457
|
const parsedBody = parsedOutput.body;
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
$metadata,
|
|
3458
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3459
|
+
output,
|
|
3460
|
+
parsedBody,
|
|
3461
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3462
|
+
errorCode,
|
|
3940
3463
|
});
|
|
3941
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3942
3464
|
}
|
|
3943
3465
|
};
|
|
3944
3466
|
const deserializeAws_restJson1UpdateChannelFlowCommand = async (output, context) => {
|
|
3945
3467
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3946
3468
|
return deserializeAws_restJson1UpdateChannelFlowCommandError(output, context);
|
|
3947
3469
|
}
|
|
3948
|
-
const contents = {
|
|
3470
|
+
const contents = map({
|
|
3949
3471
|
$metadata: deserializeMetadata(output),
|
|
3950
|
-
|
|
3951
|
-
};
|
|
3472
|
+
});
|
|
3952
3473
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3953
|
-
if (data.ChannelFlowArn
|
|
3474
|
+
if (data.ChannelFlowArn != null) {
|
|
3954
3475
|
contents.ChannelFlowArn = (0, smithy_client_1.expectString)(data.ChannelFlowArn);
|
|
3955
3476
|
}
|
|
3956
|
-
return
|
|
3477
|
+
return contents;
|
|
3957
3478
|
};
|
|
3958
3479
|
exports.deserializeAws_restJson1UpdateChannelFlowCommand = deserializeAws_restJson1UpdateChannelFlowCommand;
|
|
3959
3480
|
const deserializeAws_restJson1UpdateChannelFlowCommandError = async (output, context) => {
|
|
@@ -3961,7 +3482,6 @@ const deserializeAws_restJson1UpdateChannelFlowCommandError = async (output, con
|
|
|
3961
3482
|
...output,
|
|
3962
3483
|
body: await parseBody(output.body, context),
|
|
3963
3484
|
};
|
|
3964
|
-
let response;
|
|
3965
3485
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3966
3486
|
switch (errorCode) {
|
|
3967
3487
|
case "BadRequestException":
|
|
@@ -3987,37 +3507,35 @@ const deserializeAws_restJson1UpdateChannelFlowCommandError = async (output, con
|
|
|
3987
3507
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
3988
3508
|
default:
|
|
3989
3509
|
const parsedBody = parsedOutput.body;
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
$metadata,
|
|
3510
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3511
|
+
output,
|
|
3512
|
+
parsedBody,
|
|
3513
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3514
|
+
errorCode,
|
|
3996
3515
|
});
|
|
3997
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
3998
3516
|
}
|
|
3999
3517
|
};
|
|
4000
3518
|
const deserializeAws_restJson1UpdateChannelMessageCommand = async (output, context) => {
|
|
4001
3519
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4002
3520
|
return deserializeAws_restJson1UpdateChannelMessageCommandError(output, context);
|
|
4003
3521
|
}
|
|
4004
|
-
const contents = {
|
|
3522
|
+
const contents = map({
|
|
4005
3523
|
$metadata: deserializeMetadata(output),
|
|
4006
|
-
|
|
4007
|
-
MessageId: undefined,
|
|
4008
|
-
Status: undefined,
|
|
4009
|
-
};
|
|
3524
|
+
});
|
|
4010
3525
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
4011
|
-
if (data.ChannelArn
|
|
3526
|
+
if (data.ChannelArn != null) {
|
|
4012
3527
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
4013
3528
|
}
|
|
4014
|
-
if (data.MessageId
|
|
3529
|
+
if (data.MessageId != null) {
|
|
4015
3530
|
contents.MessageId = (0, smithy_client_1.expectString)(data.MessageId);
|
|
4016
3531
|
}
|
|
4017
|
-
if (data.Status
|
|
3532
|
+
if (data.Status != null) {
|
|
4018
3533
|
contents.Status = deserializeAws_restJson1ChannelMessageStatusStructure(data.Status, context);
|
|
4019
3534
|
}
|
|
4020
|
-
|
|
3535
|
+
if (data.SubChannelId != null) {
|
|
3536
|
+
contents.SubChannelId = (0, smithy_client_1.expectString)(data.SubChannelId);
|
|
3537
|
+
}
|
|
3538
|
+
return contents;
|
|
4021
3539
|
};
|
|
4022
3540
|
exports.deserializeAws_restJson1UpdateChannelMessageCommand = deserializeAws_restJson1UpdateChannelMessageCommand;
|
|
4023
3541
|
const deserializeAws_restJson1UpdateChannelMessageCommandError = async (output, context) => {
|
|
@@ -4025,7 +3543,6 @@ const deserializeAws_restJson1UpdateChannelMessageCommandError = async (output,
|
|
|
4025
3543
|
...output,
|
|
4026
3544
|
body: await parseBody(output.body, context),
|
|
4027
3545
|
};
|
|
4028
|
-
let response;
|
|
4029
3546
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4030
3547
|
switch (errorCode) {
|
|
4031
3548
|
case "BadRequestException":
|
|
@@ -4051,29 +3568,29 @@ const deserializeAws_restJson1UpdateChannelMessageCommandError = async (output,
|
|
|
4051
3568
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
4052
3569
|
default:
|
|
4053
3570
|
const parsedBody = parsedOutput.body;
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
$metadata,
|
|
3571
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3572
|
+
output,
|
|
3573
|
+
parsedBody,
|
|
3574
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3575
|
+
errorCode,
|
|
4060
3576
|
});
|
|
4061
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
4062
3577
|
}
|
|
4063
3578
|
};
|
|
4064
3579
|
const deserializeAws_restJson1UpdateChannelReadMarkerCommand = async (output, context) => {
|
|
4065
3580
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4066
3581
|
return deserializeAws_restJson1UpdateChannelReadMarkerCommandError(output, context);
|
|
4067
3582
|
}
|
|
4068
|
-
const contents = {
|
|
3583
|
+
const contents = map({
|
|
4069
3584
|
$metadata: deserializeMetadata(output),
|
|
4070
|
-
|
|
4071
|
-
};
|
|
3585
|
+
});
|
|
4072
3586
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
4073
|
-
if (data.ChannelArn
|
|
3587
|
+
if (data.ChannelArn != null) {
|
|
4074
3588
|
contents.ChannelArn = (0, smithy_client_1.expectString)(data.ChannelArn);
|
|
4075
3589
|
}
|
|
4076
|
-
|
|
3590
|
+
if (data.SubChannelId != null) {
|
|
3591
|
+
contents.SubChannelId = (0, smithy_client_1.expectString)(data.SubChannelId);
|
|
3592
|
+
}
|
|
3593
|
+
return contents;
|
|
4077
3594
|
};
|
|
4078
3595
|
exports.deserializeAws_restJson1UpdateChannelReadMarkerCommand = deserializeAws_restJson1UpdateChannelReadMarkerCommand;
|
|
4079
3596
|
const deserializeAws_restJson1UpdateChannelReadMarkerCommandError = async (output, context) => {
|
|
@@ -4081,7 +3598,6 @@ const deserializeAws_restJson1UpdateChannelReadMarkerCommandError = async (outpu
|
|
|
4081
3598
|
...output,
|
|
4082
3599
|
body: await parseBody(output.body, context),
|
|
4083
3600
|
};
|
|
4084
|
-
let response;
|
|
4085
3601
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4086
3602
|
switch (errorCode) {
|
|
4087
3603
|
case "BadRequestException":
|
|
@@ -4107,23 +3623,22 @@ const deserializeAws_restJson1UpdateChannelReadMarkerCommandError = async (outpu
|
|
|
4107
3623
|
throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
|
|
4108
3624
|
default:
|
|
4109
3625
|
const parsedBody = parsedOutput.body;
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
$metadata,
|
|
3626
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
3627
|
+
output,
|
|
3628
|
+
parsedBody,
|
|
3629
|
+
exceptionCtor: ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException,
|
|
3630
|
+
errorCode,
|
|
4116
3631
|
});
|
|
4117
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
4118
3632
|
}
|
|
4119
3633
|
};
|
|
3634
|
+
const map = smithy_client_1.map;
|
|
4120
3635
|
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
4121
|
-
const contents = {};
|
|
3636
|
+
const contents = map({});
|
|
4122
3637
|
const data = parsedOutput.body;
|
|
4123
|
-
if (data.Code
|
|
3638
|
+
if (data.Code != null) {
|
|
4124
3639
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
4125
3640
|
}
|
|
4126
|
-
if (data.Message
|
|
3641
|
+
if (data.Message != null) {
|
|
4127
3642
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
4128
3643
|
}
|
|
4129
3644
|
const exception = new models_0_1.BadRequestException({
|
|
@@ -4133,12 +3648,12 @@ const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput,
|
|
|
4133
3648
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
4134
3649
|
};
|
|
4135
3650
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
4136
|
-
const contents = {};
|
|
3651
|
+
const contents = map({});
|
|
4137
3652
|
const data = parsedOutput.body;
|
|
4138
|
-
if (data.Code
|
|
3653
|
+
if (data.Code != null) {
|
|
4139
3654
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
4140
3655
|
}
|
|
4141
|
-
if (data.Message
|
|
3656
|
+
if (data.Message != null) {
|
|
4142
3657
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
4143
3658
|
}
|
|
4144
3659
|
const exception = new models_0_1.ConflictException({
|
|
@@ -4148,12 +3663,12 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
4148
3663
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
4149
3664
|
};
|
|
4150
3665
|
const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
|
|
4151
|
-
const contents = {};
|
|
3666
|
+
const contents = map({});
|
|
4152
3667
|
const data = parsedOutput.body;
|
|
4153
|
-
if (data.Code
|
|
3668
|
+
if (data.Code != null) {
|
|
4154
3669
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
4155
3670
|
}
|
|
4156
|
-
if (data.Message
|
|
3671
|
+
if (data.Message != null) {
|
|
4157
3672
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
4158
3673
|
}
|
|
4159
3674
|
const exception = new models_0_1.ForbiddenException({
|
|
@@ -4163,12 +3678,12 @@ const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput,
|
|
|
4163
3678
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
4164
3679
|
};
|
|
4165
3680
|
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
4166
|
-
const contents = {};
|
|
3681
|
+
const contents = map({});
|
|
4167
3682
|
const data = parsedOutput.body;
|
|
4168
|
-
if (data.Code
|
|
3683
|
+
if (data.Code != null) {
|
|
4169
3684
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
4170
3685
|
}
|
|
4171
|
-
if (data.Message
|
|
3686
|
+
if (data.Message != null) {
|
|
4172
3687
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
4173
3688
|
}
|
|
4174
3689
|
const exception = new models_0_1.NotFoundException({
|
|
@@ -4178,12 +3693,12 @@ const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, c
|
|
|
4178
3693
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
4179
3694
|
};
|
|
4180
3695
|
const deserializeAws_restJson1ResourceLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
4181
|
-
const contents = {};
|
|
3696
|
+
const contents = map({});
|
|
4182
3697
|
const data = parsedOutput.body;
|
|
4183
|
-
if (data.Code
|
|
3698
|
+
if (data.Code != null) {
|
|
4184
3699
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
4185
3700
|
}
|
|
4186
|
-
if (data.Message
|
|
3701
|
+
if (data.Message != null) {
|
|
4187
3702
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
4188
3703
|
}
|
|
4189
3704
|
const exception = new models_0_1.ResourceLimitExceededException({
|
|
@@ -4193,12 +3708,12 @@ const deserializeAws_restJson1ResourceLimitExceededExceptionResponse = async (pa
|
|
|
4193
3708
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
4194
3709
|
};
|
|
4195
3710
|
const deserializeAws_restJson1ServiceFailureExceptionResponse = async (parsedOutput, context) => {
|
|
4196
|
-
const contents = {};
|
|
3711
|
+
const contents = map({});
|
|
4197
3712
|
const data = parsedOutput.body;
|
|
4198
|
-
if (data.Code
|
|
3713
|
+
if (data.Code != null) {
|
|
4199
3714
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
4200
3715
|
}
|
|
4201
|
-
if (data.Message
|
|
3716
|
+
if (data.Message != null) {
|
|
4202
3717
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
4203
3718
|
}
|
|
4204
3719
|
const exception = new models_0_1.ServiceFailureException({
|
|
@@ -4208,12 +3723,12 @@ const deserializeAws_restJson1ServiceFailureExceptionResponse = async (parsedOut
|
|
|
4208
3723
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
4209
3724
|
};
|
|
4210
3725
|
const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
4211
|
-
const contents = {};
|
|
3726
|
+
const contents = map({});
|
|
4212
3727
|
const data = parsedOutput.body;
|
|
4213
|
-
if (data.Code
|
|
3728
|
+
if (data.Code != null) {
|
|
4214
3729
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
4215
3730
|
}
|
|
4216
|
-
if (data.Message
|
|
3731
|
+
if (data.Message != null) {
|
|
4217
3732
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
4218
3733
|
}
|
|
4219
3734
|
const exception = new models_0_1.ServiceUnavailableException({
|
|
@@ -4223,12 +3738,12 @@ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parse
|
|
|
4223
3738
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
4224
3739
|
};
|
|
4225
3740
|
const deserializeAws_restJson1ThrottledClientExceptionResponse = async (parsedOutput, context) => {
|
|
4226
|
-
const contents = {};
|
|
3741
|
+
const contents = map({});
|
|
4227
3742
|
const data = parsedOutput.body;
|
|
4228
|
-
if (data.Code
|
|
3743
|
+
if (data.Code != null) {
|
|
4229
3744
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
4230
3745
|
}
|
|
4231
|
-
if (data.Message
|
|
3746
|
+
if (data.Message != null) {
|
|
4232
3747
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
4233
3748
|
}
|
|
4234
3749
|
const exception = new models_0_1.ThrottledClientException({
|
|
@@ -4238,12 +3753,12 @@ const deserializeAws_restJson1ThrottledClientExceptionResponse = async (parsedOu
|
|
|
4238
3753
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
4239
3754
|
};
|
|
4240
3755
|
const deserializeAws_restJson1UnauthorizedClientExceptionResponse = async (parsedOutput, context) => {
|
|
4241
|
-
const contents = {};
|
|
3756
|
+
const contents = map({});
|
|
4242
3757
|
const data = parsedOutput.body;
|
|
4243
|
-
if (data.Code
|
|
3758
|
+
if (data.Code != null) {
|
|
4244
3759
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
4245
3760
|
}
|
|
4246
|
-
if (data.Message
|
|
3761
|
+
if (data.Message != null) {
|
|
4247
3762
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
4248
3763
|
}
|
|
4249
3764
|
const exception = new models_0_1.UnauthorizedClientException({
|
|
@@ -4256,9 +3771,6 @@ const serializeAws_restJson1ChannelMemberArns = (input, context) => {
|
|
|
4256
3771
|
return input
|
|
4257
3772
|
.filter((e) => e != null)
|
|
4258
3773
|
.map((entry) => {
|
|
4259
|
-
if (entry === null) {
|
|
4260
|
-
return null;
|
|
4261
|
-
}
|
|
4262
3774
|
return entry;
|
|
4263
3775
|
});
|
|
4264
3776
|
};
|
|
@@ -4280,18 +3792,27 @@ const serializeAws_restJson1ChannelMessageCallback = (input, context) => {
|
|
|
4280
3792
|
...(input.PushNotification != null && {
|
|
4281
3793
|
PushNotification: serializeAws_restJson1PushNotificationConfiguration(input.PushNotification, context),
|
|
4282
3794
|
}),
|
|
3795
|
+
...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }),
|
|
4283
3796
|
};
|
|
4284
3797
|
};
|
|
4285
3798
|
const serializeAws_restJson1ChannelModeratorArns = (input, context) => {
|
|
4286
3799
|
return input
|
|
4287
3800
|
.filter((e) => e != null)
|
|
4288
3801
|
.map((entry) => {
|
|
4289
|
-
if (entry === null) {
|
|
4290
|
-
return null;
|
|
4291
|
-
}
|
|
4292
3802
|
return entry;
|
|
4293
3803
|
});
|
|
4294
3804
|
};
|
|
3805
|
+
const serializeAws_restJson1ElasticChannelConfiguration = (input, context) => {
|
|
3806
|
+
return {
|
|
3807
|
+
...(input.MaximumSubChannels != null && { MaximumSubChannels: input.MaximumSubChannels }),
|
|
3808
|
+
...(input.MinimumMembershipPercentage != null && {
|
|
3809
|
+
MinimumMembershipPercentage: input.MinimumMembershipPercentage,
|
|
3810
|
+
}),
|
|
3811
|
+
...(input.TargetMembershipsPerSubChannel != null && {
|
|
3812
|
+
TargetMembershipsPerSubChannel: input.TargetMembershipsPerSubChannel,
|
|
3813
|
+
}),
|
|
3814
|
+
};
|
|
3815
|
+
};
|
|
4295
3816
|
const serializeAws_restJson1LambdaConfiguration = (input, context) => {
|
|
4296
3817
|
return {
|
|
4297
3818
|
...(input.InvocationType != null && { InvocationType: input.InvocationType }),
|
|
@@ -4302,9 +3823,6 @@ const serializeAws_restJson1MemberArns = (input, context) => {
|
|
|
4302
3823
|
return input
|
|
4303
3824
|
.filter((e) => e != null)
|
|
4304
3825
|
.map((entry) => {
|
|
4305
|
-
if (entry === null) {
|
|
4306
|
-
return null;
|
|
4307
|
-
}
|
|
4308
3826
|
return entry;
|
|
4309
3827
|
});
|
|
4310
3828
|
};
|
|
@@ -4323,9 +3841,6 @@ const serializeAws_restJson1MessageAttributeStringValues = (input, context) => {
|
|
|
4323
3841
|
return input
|
|
4324
3842
|
.filter((e) => e != null)
|
|
4325
3843
|
.map((entry) => {
|
|
4326
|
-
if (entry === null) {
|
|
4327
|
-
return null;
|
|
4328
|
-
}
|
|
4329
3844
|
return entry;
|
|
4330
3845
|
});
|
|
4331
3846
|
};
|
|
@@ -4355,9 +3870,6 @@ const serializeAws_restJson1ProcessorList = (input, context) => {
|
|
|
4355
3870
|
return input
|
|
4356
3871
|
.filter((e) => e != null)
|
|
4357
3872
|
.map((entry) => {
|
|
4358
|
-
if (entry === null) {
|
|
4359
|
-
return null;
|
|
4360
|
-
}
|
|
4361
3873
|
return serializeAws_restJson1Processor(entry, context);
|
|
4362
3874
|
});
|
|
4363
3875
|
};
|
|
@@ -4385,9 +3897,6 @@ const serializeAws_restJson1SearchFields = (input, context) => {
|
|
|
4385
3897
|
return input
|
|
4386
3898
|
.filter((e) => e != null)
|
|
4387
3899
|
.map((entry) => {
|
|
4388
|
-
if (entry === null) {
|
|
4389
|
-
return null;
|
|
4390
|
-
}
|
|
4391
3900
|
return serializeAws_restJson1SearchField(entry, context);
|
|
4392
3901
|
});
|
|
4393
3902
|
};
|
|
@@ -4395,9 +3904,6 @@ const serializeAws_restJson1SearchFieldValues = (input, context) => {
|
|
|
4395
3904
|
return input
|
|
4396
3905
|
.filter((e) => e != null)
|
|
4397
3906
|
.map((entry) => {
|
|
4398
|
-
if (entry === null) {
|
|
4399
|
-
return null;
|
|
4400
|
-
}
|
|
4401
3907
|
return entry;
|
|
4402
3908
|
});
|
|
4403
3909
|
};
|
|
@@ -4411,9 +3917,6 @@ const serializeAws_restJson1TagKeyList = (input, context) => {
|
|
|
4411
3917
|
return input
|
|
4412
3918
|
.filter((e) => e != null)
|
|
4413
3919
|
.map((entry) => {
|
|
4414
|
-
if (entry === null) {
|
|
4415
|
-
return null;
|
|
4416
|
-
}
|
|
4417
3920
|
return entry;
|
|
4418
3921
|
});
|
|
4419
3922
|
};
|
|
@@ -4421,9 +3924,6 @@ const serializeAws_restJson1TagList = (input, context) => {
|
|
|
4421
3924
|
return input
|
|
4422
3925
|
.filter((e) => e != null)
|
|
4423
3926
|
.map((entry) => {
|
|
4424
|
-
if (entry === null) {
|
|
4425
|
-
return null;
|
|
4426
|
-
}
|
|
4427
3927
|
return serializeAws_restJson1Tag(entry, context);
|
|
4428
3928
|
});
|
|
4429
3929
|
};
|
|
@@ -4432,6 +3932,7 @@ const deserializeAws_restJson1AppInstanceUserMembershipSummary = (output, contex
|
|
|
4432
3932
|
ReadMarkerTimestamp: output.ReadMarkerTimestamp != null
|
|
4433
3933
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ReadMarkerTimestamp)))
|
|
4434
3934
|
: undefined,
|
|
3935
|
+
SubChannelId: (0, smithy_client_1.expectString)(output.SubChannelId),
|
|
4435
3936
|
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
4436
3937
|
};
|
|
4437
3938
|
};
|
|
@@ -4440,6 +3941,7 @@ const deserializeAws_restJson1BatchChannelMemberships = (output, context) => {
|
|
|
4440
3941
|
ChannelArn: (0, smithy_client_1.expectString)(output.ChannelArn),
|
|
4441
3942
|
InvitedBy: output.InvitedBy != null ? deserializeAws_restJson1Identity(output.InvitedBy, context) : undefined,
|
|
4442
3943
|
Members: output.Members != null ? deserializeAws_restJson1Members(output.Members, context) : undefined,
|
|
3944
|
+
SubChannelId: (0, smithy_client_1.expectString)(output.SubChannelId),
|
|
4443
3945
|
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
4444
3946
|
};
|
|
4445
3947
|
};
|
|
@@ -4469,6 +3971,9 @@ const deserializeAws_restJson1Channel = (output, context) => {
|
|
|
4469
3971
|
CreatedTimestamp: output.CreatedTimestamp != null
|
|
4470
3972
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
|
|
4471
3973
|
: undefined,
|
|
3974
|
+
ElasticChannelConfiguration: output.ElasticChannelConfiguration != null
|
|
3975
|
+
? deserializeAws_restJson1ElasticChannelConfiguration(output.ElasticChannelConfiguration, context)
|
|
3976
|
+
: undefined,
|
|
4472
3977
|
LastMessageTimestamp: output.LastMessageTimestamp != null
|
|
4473
3978
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastMessageTimestamp)))
|
|
4474
3979
|
: undefined,
|
|
@@ -4569,6 +4074,7 @@ const deserializeAws_restJson1ChannelMembership = (output, context) => {
|
|
|
4569
4074
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
|
|
4570
4075
|
: undefined,
|
|
4571
4076
|
Member: output.Member != null ? deserializeAws_restJson1Identity(output.Member, context) : undefined,
|
|
4077
|
+
SubChannelId: (0, smithy_client_1.expectString)(output.SubChannelId),
|
|
4572
4078
|
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
4573
4079
|
};
|
|
4574
4080
|
};
|
|
@@ -4638,6 +4144,7 @@ const deserializeAws_restJson1ChannelMessage = (output, context) => {
|
|
|
4638
4144
|
Redacted: (0, smithy_client_1.expectBoolean)(output.Redacted),
|
|
4639
4145
|
Sender: output.Sender != null ? deserializeAws_restJson1Identity(output.Sender, context) : undefined,
|
|
4640
4146
|
Status: output.Status != null ? deserializeAws_restJson1ChannelMessageStatusStructure(output.Status, context) : undefined,
|
|
4147
|
+
SubChannelId: (0, smithy_client_1.expectString)(output.SubChannelId),
|
|
4641
4148
|
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
4642
4149
|
};
|
|
4643
4150
|
};
|
|
@@ -4748,6 +4255,13 @@ const deserializeAws_restJson1ChannelSummaryList = (output, context) => {
|
|
|
4748
4255
|
});
|
|
4749
4256
|
return retVal;
|
|
4750
4257
|
};
|
|
4258
|
+
const deserializeAws_restJson1ElasticChannelConfiguration = (output, context) => {
|
|
4259
|
+
return {
|
|
4260
|
+
MaximumSubChannels: (0, smithy_client_1.expectInt32)(output.MaximumSubChannels),
|
|
4261
|
+
MinimumMembershipPercentage: (0, smithy_client_1.expectInt32)(output.MinimumMembershipPercentage),
|
|
4262
|
+
TargetMembershipsPerSubChannel: (0, smithy_client_1.expectInt32)(output.TargetMembershipsPerSubChannel),
|
|
4263
|
+
};
|
|
4264
|
+
};
|
|
4751
4265
|
const deserializeAws_restJson1Identity = (output, context) => {
|
|
4752
4266
|
return {
|
|
4753
4267
|
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
@@ -4837,6 +4351,23 @@ const deserializeAws_restJson1PushNotificationPreferences = (output, context) =>
|
|
|
4837
4351
|
FilterRule: (0, smithy_client_1.expectString)(output.FilterRule),
|
|
4838
4352
|
};
|
|
4839
4353
|
};
|
|
4354
|
+
const deserializeAws_restJson1SubChannelSummary = (output, context) => {
|
|
4355
|
+
return {
|
|
4356
|
+
MembershipCount: (0, smithy_client_1.expectInt32)(output.MembershipCount),
|
|
4357
|
+
SubChannelId: (0, smithy_client_1.expectString)(output.SubChannelId),
|
|
4358
|
+
};
|
|
4359
|
+
};
|
|
4360
|
+
const deserializeAws_restJson1SubChannelSummaryList = (output, context) => {
|
|
4361
|
+
const retVal = (output || [])
|
|
4362
|
+
.filter((e) => e != null)
|
|
4363
|
+
.map((entry) => {
|
|
4364
|
+
if (entry === null) {
|
|
4365
|
+
return null;
|
|
4366
|
+
}
|
|
4367
|
+
return deserializeAws_restJson1SubChannelSummary(entry, context);
|
|
4368
|
+
});
|
|
4369
|
+
return retVal;
|
|
4370
|
+
};
|
|
4840
4371
|
const deserializeAws_restJson1Tag = (output, context) => {
|
|
4841
4372
|
return {
|
|
4842
4373
|
Key: (0, smithy_client_1.expectString)(output.Key),
|