@aws-sdk/client-chime-sdk-messaging 3.121.0 → 3.130.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.
@@ -26,8 +26,7 @@ const serializeAws_restJson1AssociateChannelFlowCommand = async (input, context)
26
26
  }
27
27
  let body;
28
28
  body = JSON.stringify({
29
- ...(input.ChannelFlowArn !== undefined &&
30
- input.ChannelFlowArn !== null && { ChannelFlowArn: input.ChannelFlowArn }),
29
+ ...(input.ChannelFlowArn != null && { ChannelFlowArn: input.ChannelFlowArn }),
31
30
  });
32
31
  return new protocol_http_1.HttpRequest({
33
32
  protocol,
@@ -62,9 +61,8 @@ const serializeAws_restJson1BatchCreateChannelMembershipCommand = async (input,
62
61
  };
63
62
  let body;
64
63
  body = JSON.stringify({
65
- ...(input.MemberArns !== undefined &&
66
- input.MemberArns !== null && { MemberArns: serializeAws_restJson1MemberArns(input.MemberArns, context) }),
67
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
64
+ ...(input.MemberArns != null && { MemberArns: serializeAws_restJson1MemberArns(input.MemberArns, context) }),
65
+ ...(input.Type != null && { Type: input.Type }),
68
66
  });
69
67
  return new protocol_http_1.HttpRequest({
70
68
  protocol,
@@ -101,12 +99,10 @@ const serializeAws_restJson1ChannelFlowCallbackCommand = async (input, context)
101
99
  let body;
102
100
  body = JSON.stringify({
103
101
  CallbackId: (_a = input.CallbackId) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
104
- ...(input.ChannelMessage !== undefined &&
105
- input.ChannelMessage !== null && {
102
+ ...(input.ChannelMessage != null && {
106
103
  ChannelMessage: serializeAws_restJson1ChannelMessageCallback(input.ChannelMessage, context),
107
104
  }),
108
- ...(input.DeleteResource !== undefined &&
109
- input.DeleteResource !== null && { DeleteResource: input.DeleteResource }),
105
+ ...(input.DeleteResource != null && { DeleteResource: input.DeleteResource }),
110
106
  });
111
107
  return new protocol_http_1.HttpRequest({
112
108
  protocol,
@@ -130,22 +126,18 @@ const serializeAws_restJson1CreateChannelCommand = async (input, context) => {
130
126
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
131
127
  let body;
132
128
  body = JSON.stringify({
133
- ...(input.AppInstanceArn !== undefined &&
134
- input.AppInstanceArn !== null && { AppInstanceArn: input.AppInstanceArn }),
135
- ...(input.ChannelId !== undefined && input.ChannelId !== null && { ChannelId: input.ChannelId }),
129
+ ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }),
130
+ ...(input.ChannelId != null && { ChannelId: input.ChannelId }),
136
131
  ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
137
- ...(input.MemberArns !== undefined &&
138
- input.MemberArns !== null && { MemberArns: serializeAws_restJson1ChannelMemberArns(input.MemberArns, context) }),
139
- ...(input.Metadata !== undefined && input.Metadata !== null && { Metadata: input.Metadata }),
140
- ...(input.Mode !== undefined && input.Mode !== null && { Mode: input.Mode }),
141
- ...(input.ModeratorArns !== undefined &&
142
- input.ModeratorArns !== null && {
132
+ ...(input.MemberArns != null && { MemberArns: serializeAws_restJson1ChannelMemberArns(input.MemberArns, context) }),
133
+ ...(input.Metadata != null && { Metadata: input.Metadata }),
134
+ ...(input.Mode != null && { Mode: input.Mode }),
135
+ ...(input.ModeratorArns != null && {
143
136
  ModeratorArns: serializeAws_restJson1ChannelModeratorArns(input.ModeratorArns, context),
144
137
  }),
145
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
146
- ...(input.Privacy !== undefined && input.Privacy !== null && { Privacy: input.Privacy }),
147
- ...(input.Tags !== undefined &&
148
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
138
+ ...(input.Name != null && { Name: input.Name }),
139
+ ...(input.Privacy != null && { Privacy: input.Privacy }),
140
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
149
141
  });
150
142
  return new protocol_http_1.HttpRequest({
151
143
  protocol,
@@ -177,7 +169,7 @@ const serializeAws_restJson1CreateChannelBanCommand = async (input, context) =>
177
169
  }
178
170
  let body;
179
171
  body = JSON.stringify({
180
- ...(input.MemberArn !== undefined && input.MemberArn !== null && { MemberArn: input.MemberArn }),
172
+ ...(input.MemberArn != null && { MemberArn: input.MemberArn }),
181
173
  });
182
174
  return new protocol_http_1.HttpRequest({
183
175
  protocol,
@@ -198,15 +190,11 @@ const serializeAws_restJson1CreateChannelFlowCommand = async (input, context) =>
198
190
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows";
199
191
  let body;
200
192
  body = JSON.stringify({
201
- ...(input.AppInstanceArn !== undefined &&
202
- input.AppInstanceArn !== null && { AppInstanceArn: input.AppInstanceArn }),
203
- ...(input.ClientRequestToken !== undefined &&
204
- input.ClientRequestToken !== null && { ClientRequestToken: input.ClientRequestToken }),
205
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
206
- ...(input.Processors !== undefined &&
207
- input.Processors !== null && { Processors: serializeAws_restJson1ProcessorList(input.Processors, context) }),
208
- ...(input.Tags !== undefined &&
209
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
193
+ ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }),
194
+ ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
195
+ ...(input.Name != null && { Name: input.Name }),
196
+ ...(input.Processors != null && { Processors: serializeAws_restJson1ProcessorList(input.Processors, context) }),
197
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
210
198
  });
211
199
  return new protocol_http_1.HttpRequest({
212
200
  protocol,
@@ -238,8 +226,8 @@ const serializeAws_restJson1CreateChannelMembershipCommand = async (input, conte
238
226
  }
239
227
  let body;
240
228
  body = JSON.stringify({
241
- ...(input.MemberArn !== undefined && input.MemberArn !== null && { MemberArn: input.MemberArn }),
242
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
229
+ ...(input.MemberArn != null && { MemberArn: input.MemberArn }),
230
+ ...(input.Type != null && { Type: input.Type }),
243
231
  });
244
232
  return new protocol_http_1.HttpRequest({
245
233
  protocol,
@@ -271,8 +259,7 @@ const serializeAws_restJson1CreateChannelModeratorCommand = async (input, contex
271
259
  }
272
260
  let body;
273
261
  body = JSON.stringify({
274
- ...(input.ChannelModeratorArn !== undefined &&
275
- input.ChannelModeratorArn !== null && { ChannelModeratorArn: input.ChannelModeratorArn }),
262
+ ...(input.ChannelModeratorArn != null && { ChannelModeratorArn: input.ChannelModeratorArn }),
276
263
  });
277
264
  return new protocol_http_1.HttpRequest({
278
265
  protocol,
@@ -1217,8 +1204,7 @@ const serializeAws_restJson1PutChannelMembershipPreferencesCommand = async (inpu
1217
1204
  }
1218
1205
  let body;
1219
1206
  body = JSON.stringify({
1220
- ...(input.Preferences !== undefined &&
1221
- input.Preferences !== null && {
1207
+ ...(input.Preferences != null && {
1222
1208
  Preferences: serializeAws_restJson1ChannelMembershipPreferences(input.Preferences, context),
1223
1209
  }),
1224
1210
  });
@@ -1290,8 +1276,7 @@ const serializeAws_restJson1SearchChannelsCommand = async (input, context) => {
1290
1276
  };
1291
1277
  let body;
1292
1278
  body = JSON.stringify({
1293
- ...(input.Fields !== undefined &&
1294
- input.Fields !== null && { Fields: serializeAws_restJson1SearchFields(input.Fields, context) }),
1279
+ ...(input.Fields != null && { Fields: serializeAws_restJson1SearchFields(input.Fields, context) }),
1295
1280
  });
1296
1281
  return new protocol_http_1.HttpRequest({
1297
1282
  protocol,
@@ -1326,18 +1311,16 @@ const serializeAws_restJson1SendChannelMessageCommand = async (input, context) =
1326
1311
  let body;
1327
1312
  body = JSON.stringify({
1328
1313
  ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
1329
- ...(input.Content !== undefined && input.Content !== null && { Content: input.Content }),
1330
- ...(input.MessageAttributes !== undefined &&
1331
- input.MessageAttributes !== null && {
1314
+ ...(input.Content != null && { Content: input.Content }),
1315
+ ...(input.MessageAttributes != null && {
1332
1316
  MessageAttributes: serializeAws_restJson1MessageAttributeMap(input.MessageAttributes, context),
1333
1317
  }),
1334
- ...(input.Metadata !== undefined && input.Metadata !== null && { Metadata: input.Metadata }),
1335
- ...(input.Persistence !== undefined && input.Persistence !== null && { Persistence: input.Persistence }),
1336
- ...(input.PushNotification !== undefined &&
1337
- input.PushNotification !== null && {
1318
+ ...(input.Metadata != null && { Metadata: input.Metadata }),
1319
+ ...(input.Persistence != null && { Persistence: input.Persistence }),
1320
+ ...(input.PushNotification != null && {
1338
1321
  PushNotification: serializeAws_restJson1PushNotificationConfiguration(input.PushNotification, context),
1339
1322
  }),
1340
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
1323
+ ...(input.Type != null && { Type: input.Type }),
1341
1324
  });
1342
1325
  return new protocol_http_1.HttpRequest({
1343
1326
  protocol,
@@ -1361,9 +1344,8 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
1361
1344
  };
1362
1345
  let body;
1363
1346
  body = JSON.stringify({
1364
- ...(input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }),
1365
- ...(input.Tags !== undefined &&
1366
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
1347
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1348
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
1367
1349
  });
1368
1350
  return new protocol_http_1.HttpRequest({
1369
1351
  protocol,
@@ -1388,9 +1370,8 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
1388
1370
  };
1389
1371
  let body;
1390
1372
  body = JSON.stringify({
1391
- ...(input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }),
1392
- ...(input.TagKeys !== undefined &&
1393
- input.TagKeys !== null && { TagKeys: serializeAws_restJson1TagKeyList(input.TagKeys, context) }),
1373
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1374
+ ...(input.TagKeys != null && { TagKeys: serializeAws_restJson1TagKeyList(input.TagKeys, context) }),
1394
1375
  });
1395
1376
  return new protocol_http_1.HttpRequest({
1396
1377
  protocol,
@@ -1423,9 +1404,9 @@ const serializeAws_restJson1UpdateChannelCommand = async (input, context) => {
1423
1404
  }
1424
1405
  let body;
1425
1406
  body = JSON.stringify({
1426
- ...(input.Metadata !== undefined && input.Metadata !== null && { Metadata: input.Metadata }),
1427
- ...(input.Mode !== undefined && input.Mode !== null && { Mode: input.Mode }),
1428
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
1407
+ ...(input.Metadata != null && { Metadata: input.Metadata }),
1408
+ ...(input.Mode != null && { Mode: input.Mode }),
1409
+ ...(input.Name != null && { Name: input.Name }),
1429
1410
  });
1430
1411
  return new protocol_http_1.HttpRequest({
1431
1412
  protocol,
@@ -1456,9 +1437,8 @@ const serializeAws_restJson1UpdateChannelFlowCommand = async (input, context) =>
1456
1437
  }
1457
1438
  let body;
1458
1439
  body = JSON.stringify({
1459
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
1460
- ...(input.Processors !== undefined &&
1461
- input.Processors !== null && { Processors: serializeAws_restJson1ProcessorList(input.Processors, context) }),
1440
+ ...(input.Name != null && { Name: input.Name }),
1441
+ ...(input.Processors != null && { Processors: serializeAws_restJson1ProcessorList(input.Processors, context) }),
1462
1442
  });
1463
1443
  return new protocol_http_1.HttpRequest({
1464
1444
  protocol,
@@ -1501,8 +1481,8 @@ const serializeAws_restJson1UpdateChannelMessageCommand = async (input, context)
1501
1481
  }
1502
1482
  let body;
1503
1483
  body = JSON.stringify({
1504
- ...(input.Content !== undefined && input.Content !== null && { Content: input.Content }),
1505
- ...(input.Metadata !== undefined && input.Metadata !== null && { Metadata: input.Metadata }),
1484
+ ...(input.Content != null && { Content: input.Content }),
1485
+ ...(input.Metadata != null && { Metadata: input.Metadata }),
1506
1486
  });
1507
1487
  return new protocol_http_1.HttpRequest({
1508
1488
  protocol,
@@ -4284,23 +4264,20 @@ const serializeAws_restJson1ChannelMemberArns = (input, context) => {
4284
4264
  };
4285
4265
  const serializeAws_restJson1ChannelMembershipPreferences = (input, context) => {
4286
4266
  return {
4287
- ...(input.PushNotifications !== undefined &&
4288
- input.PushNotifications !== null && {
4267
+ ...(input.PushNotifications != null && {
4289
4268
  PushNotifications: serializeAws_restJson1PushNotificationPreferences(input.PushNotifications, context),
4290
4269
  }),
4291
4270
  };
4292
4271
  };
4293
4272
  const serializeAws_restJson1ChannelMessageCallback = (input, context) => {
4294
4273
  return {
4295
- ...(input.Content !== undefined && input.Content !== null && { Content: input.Content }),
4296
- ...(input.MessageAttributes !== undefined &&
4297
- input.MessageAttributes !== null && {
4274
+ ...(input.Content != null && { Content: input.Content }),
4275
+ ...(input.MessageAttributes != null && {
4298
4276
  MessageAttributes: serializeAws_restJson1MessageAttributeMap(input.MessageAttributes, context),
4299
4277
  }),
4300
- ...(input.MessageId !== undefined && input.MessageId !== null && { MessageId: input.MessageId }),
4301
- ...(input.Metadata !== undefined && input.Metadata !== null && { Metadata: input.Metadata }),
4302
- ...(input.PushNotification !== undefined &&
4303
- input.PushNotification !== null && {
4278
+ ...(input.MessageId != null && { MessageId: input.MessageId }),
4279
+ ...(input.Metadata != null && { Metadata: input.Metadata }),
4280
+ ...(input.PushNotification != null && {
4304
4281
  PushNotification: serializeAws_restJson1PushNotificationConfiguration(input.PushNotification, context),
4305
4282
  }),
4306
4283
  };
@@ -4317,9 +4294,8 @@ const serializeAws_restJson1ChannelModeratorArns = (input, context) => {
4317
4294
  };
4318
4295
  const serializeAws_restJson1LambdaConfiguration = (input, context) => {
4319
4296
  return {
4320
- ...(input.InvocationType !== undefined &&
4321
- input.InvocationType !== null && { InvocationType: input.InvocationType }),
4322
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
4297
+ ...(input.InvocationType != null && { InvocationType: input.InvocationType }),
4298
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
4323
4299
  };
4324
4300
  };
4325
4301
  const serializeAws_restJson1MemberArns = (input, context) => {
@@ -4355,29 +4331,24 @@ const serializeAws_restJson1MessageAttributeStringValues = (input, context) => {
4355
4331
  };
4356
4332
  const serializeAws_restJson1MessageAttributeValue = (input, context) => {
4357
4333
  return {
4358
- ...(input.StringValues !== undefined &&
4359
- input.StringValues !== null && {
4334
+ ...(input.StringValues != null && {
4360
4335
  StringValues: serializeAws_restJson1MessageAttributeStringValues(input.StringValues, context),
4361
4336
  }),
4362
4337
  };
4363
4338
  };
4364
4339
  const serializeAws_restJson1Processor = (input, context) => {
4365
4340
  return {
4366
- ...(input.Configuration !== undefined &&
4367
- input.Configuration !== null && {
4341
+ ...(input.Configuration != null && {
4368
4342
  Configuration: serializeAws_restJson1ProcessorConfiguration(input.Configuration, context),
4369
4343
  }),
4370
- ...(input.ExecutionOrder !== undefined &&
4371
- input.ExecutionOrder !== null && { ExecutionOrder: input.ExecutionOrder }),
4372
- ...(input.FallbackAction !== undefined &&
4373
- input.FallbackAction !== null && { FallbackAction: input.FallbackAction }),
4374
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
4344
+ ...(input.ExecutionOrder != null && { ExecutionOrder: input.ExecutionOrder }),
4345
+ ...(input.FallbackAction != null && { FallbackAction: input.FallbackAction }),
4346
+ ...(input.Name != null && { Name: input.Name }),
4375
4347
  };
4376
4348
  };
4377
4349
  const serializeAws_restJson1ProcessorConfiguration = (input, context) => {
4378
4350
  return {
4379
- ...(input.Lambda !== undefined &&
4380
- input.Lambda !== null && { Lambda: serializeAws_restJson1LambdaConfiguration(input.Lambda, context) }),
4351
+ ...(input.Lambda != null && { Lambda: serializeAws_restJson1LambdaConfiguration(input.Lambda, context) }),
4381
4352
  };
4382
4353
  };
4383
4354
  const serializeAws_restJson1ProcessorList = (input, context) => {
@@ -4392,24 +4363,22 @@ const serializeAws_restJson1ProcessorList = (input, context) => {
4392
4363
  };
4393
4364
  const serializeAws_restJson1PushNotificationConfiguration = (input, context) => {
4394
4365
  return {
4395
- ...(input.Body !== undefined && input.Body !== null && { Body: input.Body }),
4396
- ...(input.Title !== undefined && input.Title !== null && { Title: input.Title }),
4397
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
4366
+ ...(input.Body != null && { Body: input.Body }),
4367
+ ...(input.Title != null && { Title: input.Title }),
4368
+ ...(input.Type != null && { Type: input.Type }),
4398
4369
  };
4399
4370
  };
4400
4371
  const serializeAws_restJson1PushNotificationPreferences = (input, context) => {
4401
4372
  return {
4402
- ...(input.AllowNotifications !== undefined &&
4403
- input.AllowNotifications !== null && { AllowNotifications: input.AllowNotifications }),
4404
- ...(input.FilterRule !== undefined && input.FilterRule !== null && { FilterRule: input.FilterRule }),
4373
+ ...(input.AllowNotifications != null && { AllowNotifications: input.AllowNotifications }),
4374
+ ...(input.FilterRule != null && { FilterRule: input.FilterRule }),
4405
4375
  };
4406
4376
  };
4407
4377
  const serializeAws_restJson1SearchField = (input, context) => {
4408
4378
  return {
4409
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
4410
- ...(input.Operator !== undefined && input.Operator !== null && { Operator: input.Operator }),
4411
- ...(input.Values !== undefined &&
4412
- input.Values !== null && { Values: serializeAws_restJson1SearchFieldValues(input.Values, context) }),
4379
+ ...(input.Key != null && { Key: input.Key }),
4380
+ ...(input.Operator != null && { Operator: input.Operator }),
4381
+ ...(input.Values != null && { Values: serializeAws_restJson1SearchFieldValues(input.Values, context) }),
4413
4382
  };
4414
4383
  };
4415
4384
  const serializeAws_restJson1SearchFields = (input, context) => {
@@ -4434,8 +4403,8 @@ const serializeAws_restJson1SearchFieldValues = (input, context) => {
4434
4403
  };
4435
4404
  const serializeAws_restJson1Tag = (input, context) => {
4436
4405
  return {
4437
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
4438
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
4406
+ ...(input.Key != null && { Key: input.Key }),
4407
+ ...(input.Value != null && { Value: input.Value }),
4439
4408
  };
4440
4409
  };
4441
4410
  const serializeAws_restJson1TagKeyList = (input, context) => {
@@ -4460,7 +4429,7 @@ const serializeAws_restJson1TagList = (input, context) => {
4460
4429
  };
4461
4430
  const deserializeAws_restJson1AppInstanceUserMembershipSummary = (output, context) => {
4462
4431
  return {
4463
- ReadMarkerTimestamp: output.ReadMarkerTimestamp !== undefined && output.ReadMarkerTimestamp !== null
4432
+ ReadMarkerTimestamp: output.ReadMarkerTimestamp != null
4464
4433
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ReadMarkerTimestamp)))
4465
4434
  : undefined,
4466
4435
  Type: (0, smithy_client_1.expectString)(output.Type),
@@ -4469,12 +4438,8 @@ const deserializeAws_restJson1AppInstanceUserMembershipSummary = (output, contex
4469
4438
  const deserializeAws_restJson1BatchChannelMemberships = (output, context) => {
4470
4439
  return {
4471
4440
  ChannelArn: (0, smithy_client_1.expectString)(output.ChannelArn),
4472
- InvitedBy: output.InvitedBy !== undefined && output.InvitedBy !== null
4473
- ? deserializeAws_restJson1Identity(output.InvitedBy, context)
4474
- : undefined,
4475
- Members: output.Members !== undefined && output.Members !== null
4476
- ? deserializeAws_restJson1Members(output.Members, context)
4477
- : undefined,
4441
+ InvitedBy: output.InvitedBy != null ? deserializeAws_restJson1Identity(output.InvitedBy, context) : undefined,
4442
+ Members: output.Members != null ? deserializeAws_restJson1Members(output.Members, context) : undefined,
4478
4443
  Type: (0, smithy_client_1.expectString)(output.Type),
4479
4444
  };
4480
4445
  };
@@ -4500,16 +4465,14 @@ const deserializeAws_restJson1Channel = (output, context) => {
4500
4465
  return {
4501
4466
  ChannelArn: (0, smithy_client_1.expectString)(output.ChannelArn),
4502
4467
  ChannelFlowArn: (0, smithy_client_1.expectString)(output.ChannelFlowArn),
4503
- CreatedBy: output.CreatedBy !== undefined && output.CreatedBy !== null
4504
- ? deserializeAws_restJson1Identity(output.CreatedBy, context)
4505
- : undefined,
4506
- CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
4468
+ CreatedBy: output.CreatedBy != null ? deserializeAws_restJson1Identity(output.CreatedBy, context) : undefined,
4469
+ CreatedTimestamp: output.CreatedTimestamp != null
4507
4470
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
4508
4471
  : undefined,
4509
- LastMessageTimestamp: output.LastMessageTimestamp !== undefined && output.LastMessageTimestamp !== null
4472
+ LastMessageTimestamp: output.LastMessageTimestamp != null
4510
4473
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastMessageTimestamp)))
4511
4474
  : undefined,
4512
- LastUpdatedTimestamp: output.LastUpdatedTimestamp !== undefined && output.LastUpdatedTimestamp !== null
4475
+ LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
4513
4476
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
4514
4477
  : undefined,
4515
4478
  Metadata: (0, smithy_client_1.expectString)(output.Metadata),
@@ -4541,22 +4504,16 @@ const deserializeAws_restJson1ChannelAssociatedWithFlowSummaryList = (output, co
4541
4504
  const deserializeAws_restJson1ChannelBan = (output, context) => {
4542
4505
  return {
4543
4506
  ChannelArn: (0, smithy_client_1.expectString)(output.ChannelArn),
4544
- CreatedBy: output.CreatedBy !== undefined && output.CreatedBy !== null
4545
- ? deserializeAws_restJson1Identity(output.CreatedBy, context)
4546
- : undefined,
4547
- CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
4507
+ CreatedBy: output.CreatedBy != null ? deserializeAws_restJson1Identity(output.CreatedBy, context) : undefined,
4508
+ CreatedTimestamp: output.CreatedTimestamp != null
4548
4509
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
4549
4510
  : undefined,
4550
- Member: output.Member !== undefined && output.Member !== null
4551
- ? deserializeAws_restJson1Identity(output.Member, context)
4552
- : undefined,
4511
+ Member: output.Member != null ? deserializeAws_restJson1Identity(output.Member, context) : undefined,
4553
4512
  };
4554
4513
  };
4555
4514
  const deserializeAws_restJson1ChannelBanSummary = (output, context) => {
4556
4515
  return {
4557
- Member: output.Member !== undefined && output.Member !== null
4558
- ? deserializeAws_restJson1Identity(output.Member, context)
4559
- : undefined,
4516
+ Member: output.Member != null ? deserializeAws_restJson1Identity(output.Member, context) : undefined,
4560
4517
  };
4561
4518
  };
4562
4519
  const deserializeAws_restJson1ChannelBanSummaryList = (output, context) => {
@@ -4573,25 +4530,21 @@ const deserializeAws_restJson1ChannelBanSummaryList = (output, context) => {
4573
4530
  const deserializeAws_restJson1ChannelFlow = (output, context) => {
4574
4531
  return {
4575
4532
  ChannelFlowArn: (0, smithy_client_1.expectString)(output.ChannelFlowArn),
4576
- CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
4533
+ CreatedTimestamp: output.CreatedTimestamp != null
4577
4534
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
4578
4535
  : undefined,
4579
- LastUpdatedTimestamp: output.LastUpdatedTimestamp !== undefined && output.LastUpdatedTimestamp !== null
4536
+ LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
4580
4537
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
4581
4538
  : undefined,
4582
4539
  Name: (0, smithy_client_1.expectString)(output.Name),
4583
- Processors: output.Processors !== undefined && output.Processors !== null
4584
- ? deserializeAws_restJson1ProcessorList(output.Processors, context)
4585
- : undefined,
4540
+ Processors: output.Processors != null ? deserializeAws_restJson1ProcessorList(output.Processors, context) : undefined,
4586
4541
  };
4587
4542
  };
4588
4543
  const deserializeAws_restJson1ChannelFlowSummary = (output, context) => {
4589
4544
  return {
4590
4545
  ChannelFlowArn: (0, smithy_client_1.expectString)(output.ChannelFlowArn),
4591
4546
  Name: (0, smithy_client_1.expectString)(output.Name),
4592
- Processors: output.Processors !== undefined && output.Processors !== null
4593
- ? deserializeAws_restJson1ProcessorList(output.Processors, context)
4594
- : undefined,
4547
+ Processors: output.Processors != null ? deserializeAws_restJson1ProcessorList(output.Processors, context) : undefined,
4595
4548
  };
4596
4549
  };
4597
4550
  const deserializeAws_restJson1ChannelFlowSummaryList = (output, context) => {
@@ -4608,27 +4561,23 @@ const deserializeAws_restJson1ChannelFlowSummaryList = (output, context) => {
4608
4561
  const deserializeAws_restJson1ChannelMembership = (output, context) => {
4609
4562
  return {
4610
4563
  ChannelArn: (0, smithy_client_1.expectString)(output.ChannelArn),
4611
- CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
4564
+ CreatedTimestamp: output.CreatedTimestamp != null
4612
4565
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
4613
4566
  : undefined,
4614
- InvitedBy: output.InvitedBy !== undefined && output.InvitedBy !== null
4615
- ? deserializeAws_restJson1Identity(output.InvitedBy, context)
4616
- : undefined,
4617
- LastUpdatedTimestamp: output.LastUpdatedTimestamp !== undefined && output.LastUpdatedTimestamp !== null
4567
+ InvitedBy: output.InvitedBy != null ? deserializeAws_restJson1Identity(output.InvitedBy, context) : undefined,
4568
+ LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
4618
4569
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
4619
4570
  : undefined,
4620
- Member: output.Member !== undefined && output.Member !== null
4621
- ? deserializeAws_restJson1Identity(output.Member, context)
4622
- : undefined,
4571
+ Member: output.Member != null ? deserializeAws_restJson1Identity(output.Member, context) : undefined,
4623
4572
  Type: (0, smithy_client_1.expectString)(output.Type),
4624
4573
  };
4625
4574
  };
4626
4575
  const deserializeAws_restJson1ChannelMembershipForAppInstanceUserSummary = (output, context) => {
4627
4576
  return {
4628
- AppInstanceUserMembershipSummary: output.AppInstanceUserMembershipSummary !== undefined && output.AppInstanceUserMembershipSummary !== null
4577
+ AppInstanceUserMembershipSummary: output.AppInstanceUserMembershipSummary != null
4629
4578
  ? deserializeAws_restJson1AppInstanceUserMembershipSummary(output.AppInstanceUserMembershipSummary, context)
4630
4579
  : undefined,
4631
- ChannelSummary: output.ChannelSummary !== undefined && output.ChannelSummary !== null
4580
+ ChannelSummary: output.ChannelSummary != null
4632
4581
  ? deserializeAws_restJson1ChannelSummary(output.ChannelSummary, context)
4633
4582
  : undefined,
4634
4583
  };
@@ -4646,16 +4595,14 @@ const deserializeAws_restJson1ChannelMembershipForAppInstanceUserSummaryList = (
4646
4595
  };
4647
4596
  const deserializeAws_restJson1ChannelMembershipPreferences = (output, context) => {
4648
4597
  return {
4649
- PushNotifications: output.PushNotifications !== undefined && output.PushNotifications !== null
4598
+ PushNotifications: output.PushNotifications != null
4650
4599
  ? deserializeAws_restJson1PushNotificationPreferences(output.PushNotifications, context)
4651
4600
  : undefined,
4652
4601
  };
4653
4602
  };
4654
4603
  const deserializeAws_restJson1ChannelMembershipSummary = (output, context) => {
4655
4604
  return {
4656
- Member: output.Member !== undefined && output.Member !== null
4657
- ? deserializeAws_restJson1Identity(output.Member, context)
4658
- : undefined,
4605
+ Member: output.Member != null ? deserializeAws_restJson1Identity(output.Member, context) : undefined,
4659
4606
  };
4660
4607
  };
4661
4608
  const deserializeAws_restJson1ChannelMembershipSummaryList = (output, context) => {
@@ -4673,28 +4620,24 @@ const deserializeAws_restJson1ChannelMessage = (output, context) => {
4673
4620
  return {
4674
4621
  ChannelArn: (0, smithy_client_1.expectString)(output.ChannelArn),
4675
4622
  Content: (0, smithy_client_1.expectString)(output.Content),
4676
- CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
4623
+ CreatedTimestamp: output.CreatedTimestamp != null
4677
4624
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
4678
4625
  : undefined,
4679
- LastEditedTimestamp: output.LastEditedTimestamp !== undefined && output.LastEditedTimestamp !== null
4626
+ LastEditedTimestamp: output.LastEditedTimestamp != null
4680
4627
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastEditedTimestamp)))
4681
4628
  : undefined,
4682
- LastUpdatedTimestamp: output.LastUpdatedTimestamp !== undefined && output.LastUpdatedTimestamp !== null
4629
+ LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
4683
4630
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
4684
4631
  : undefined,
4685
- MessageAttributes: output.MessageAttributes !== undefined && output.MessageAttributes !== null
4632
+ MessageAttributes: output.MessageAttributes != null
4686
4633
  ? deserializeAws_restJson1MessageAttributeMap(output.MessageAttributes, context)
4687
4634
  : undefined,
4688
4635
  MessageId: (0, smithy_client_1.expectString)(output.MessageId),
4689
4636
  Metadata: (0, smithy_client_1.expectString)(output.Metadata),
4690
4637
  Persistence: (0, smithy_client_1.expectString)(output.Persistence),
4691
4638
  Redacted: (0, smithy_client_1.expectBoolean)(output.Redacted),
4692
- Sender: output.Sender !== undefined && output.Sender !== null
4693
- ? deserializeAws_restJson1Identity(output.Sender, context)
4694
- : undefined,
4695
- Status: output.Status !== undefined && output.Status !== null
4696
- ? deserializeAws_restJson1ChannelMessageStatusStructure(output.Status, context)
4697
- : undefined,
4639
+ Sender: output.Sender != null ? deserializeAws_restJson1Identity(output.Sender, context) : undefined,
4640
+ Status: output.Status != null ? deserializeAws_restJson1ChannelMessageStatusStructure(output.Status, context) : undefined,
4698
4641
  Type: (0, smithy_client_1.expectString)(output.Type),
4699
4642
  };
4700
4643
  };
@@ -4707,27 +4650,23 @@ const deserializeAws_restJson1ChannelMessageStatusStructure = (output, context)
4707
4650
  const deserializeAws_restJson1ChannelMessageSummary = (output, context) => {
4708
4651
  return {
4709
4652
  Content: (0, smithy_client_1.expectString)(output.Content),
4710
- CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
4653
+ CreatedTimestamp: output.CreatedTimestamp != null
4711
4654
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
4712
4655
  : undefined,
4713
- LastEditedTimestamp: output.LastEditedTimestamp !== undefined && output.LastEditedTimestamp !== null
4656
+ LastEditedTimestamp: output.LastEditedTimestamp != null
4714
4657
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastEditedTimestamp)))
4715
4658
  : undefined,
4716
- LastUpdatedTimestamp: output.LastUpdatedTimestamp !== undefined && output.LastUpdatedTimestamp !== null
4659
+ LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
4717
4660
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
4718
4661
  : undefined,
4719
- MessageAttributes: output.MessageAttributes !== undefined && output.MessageAttributes !== null
4662
+ MessageAttributes: output.MessageAttributes != null
4720
4663
  ? deserializeAws_restJson1MessageAttributeMap(output.MessageAttributes, context)
4721
4664
  : undefined,
4722
4665
  MessageId: (0, smithy_client_1.expectString)(output.MessageId),
4723
4666
  Metadata: (0, smithy_client_1.expectString)(output.Metadata),
4724
4667
  Redacted: (0, smithy_client_1.expectBoolean)(output.Redacted),
4725
- Sender: output.Sender !== undefined && output.Sender !== null
4726
- ? deserializeAws_restJson1Identity(output.Sender, context)
4727
- : undefined,
4728
- Status: output.Status !== undefined && output.Status !== null
4729
- ? deserializeAws_restJson1ChannelMessageStatusStructure(output.Status, context)
4730
- : undefined,
4668
+ Sender: output.Sender != null ? deserializeAws_restJson1Identity(output.Sender, context) : undefined,
4669
+ Status: output.Status != null ? deserializeAws_restJson1ChannelMessageStatusStructure(output.Status, context) : undefined,
4731
4670
  Type: (0, smithy_client_1.expectString)(output.Type),
4732
4671
  };
4733
4672
  };
@@ -4744,7 +4683,7 @@ const deserializeAws_restJson1ChannelMessageSummaryList = (output, context) => {
4744
4683
  };
4745
4684
  const deserializeAws_restJson1ChannelModeratedByAppInstanceUserSummary = (output, context) => {
4746
4685
  return {
4747
- ChannelSummary: output.ChannelSummary !== undefined && output.ChannelSummary !== null
4686
+ ChannelSummary: output.ChannelSummary != null
4748
4687
  ? deserializeAws_restJson1ChannelSummary(output.ChannelSummary, context)
4749
4688
  : undefined,
4750
4689
  };
@@ -4763,22 +4702,16 @@ const deserializeAws_restJson1ChannelModeratedByAppInstanceUserSummaryList = (ou
4763
4702
  const deserializeAws_restJson1ChannelModerator = (output, context) => {
4764
4703
  return {
4765
4704
  ChannelArn: (0, smithy_client_1.expectString)(output.ChannelArn),
4766
- CreatedBy: output.CreatedBy !== undefined && output.CreatedBy !== null
4767
- ? deserializeAws_restJson1Identity(output.CreatedBy, context)
4768
- : undefined,
4769
- CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
4705
+ CreatedBy: output.CreatedBy != null ? deserializeAws_restJson1Identity(output.CreatedBy, context) : undefined,
4706
+ CreatedTimestamp: output.CreatedTimestamp != null
4770
4707
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
4771
4708
  : undefined,
4772
- Moderator: output.Moderator !== undefined && output.Moderator !== null
4773
- ? deserializeAws_restJson1Identity(output.Moderator, context)
4774
- : undefined,
4709
+ Moderator: output.Moderator != null ? deserializeAws_restJson1Identity(output.Moderator, context) : undefined,
4775
4710
  };
4776
4711
  };
4777
4712
  const deserializeAws_restJson1ChannelModeratorSummary = (output, context) => {
4778
4713
  return {
4779
- Moderator: output.Moderator !== undefined && output.Moderator !== null
4780
- ? deserializeAws_restJson1Identity(output.Moderator, context)
4781
- : undefined,
4714
+ Moderator: output.Moderator != null ? deserializeAws_restJson1Identity(output.Moderator, context) : undefined,
4782
4715
  };
4783
4716
  };
4784
4717
  const deserializeAws_restJson1ChannelModeratorSummaryList = (output, context) => {
@@ -4795,7 +4728,7 @@ const deserializeAws_restJson1ChannelModeratorSummaryList = (output, context) =>
4795
4728
  const deserializeAws_restJson1ChannelSummary = (output, context) => {
4796
4729
  return {
4797
4730
  ChannelArn: (0, smithy_client_1.expectString)(output.ChannelArn),
4798
- LastMessageTimestamp: output.LastMessageTimestamp !== undefined && output.LastMessageTimestamp !== null
4731
+ LastMessageTimestamp: output.LastMessageTimestamp != null
4799
4732
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastMessageTimestamp)))
4800
4733
  : undefined,
4801
4734
  Metadata: (0, smithy_client_1.expectString)(output.Metadata),
@@ -4862,7 +4795,7 @@ const deserializeAws_restJson1MessageAttributeStringValues = (output, context) =
4862
4795
  };
4863
4796
  const deserializeAws_restJson1MessageAttributeValue = (output, context) => {
4864
4797
  return {
4865
- StringValues: output.StringValues !== undefined && output.StringValues !== null
4798
+ StringValues: output.StringValues != null
4866
4799
  ? deserializeAws_restJson1MessageAttributeStringValues(output.StringValues, context)
4867
4800
  : undefined,
4868
4801
  };
@@ -4874,7 +4807,7 @@ const deserializeAws_restJson1MessagingSessionEndpoint = (output, context) => {
4874
4807
  };
4875
4808
  const deserializeAws_restJson1Processor = (output, context) => {
4876
4809
  return {
4877
- Configuration: output.Configuration !== undefined && output.Configuration !== null
4810
+ Configuration: output.Configuration != null
4878
4811
  ? deserializeAws_restJson1ProcessorConfiguration(output.Configuration, context)
4879
4812
  : undefined,
4880
4813
  ExecutionOrder: (0, smithy_client_1.expectInt32)(output.ExecutionOrder),
@@ -4884,9 +4817,7 @@ const deserializeAws_restJson1Processor = (output, context) => {
4884
4817
  };
4885
4818
  const deserializeAws_restJson1ProcessorConfiguration = (output, context) => {
4886
4819
  return {
4887
- Lambda: output.Lambda !== undefined && output.Lambda !== null
4888
- ? deserializeAws_restJson1LambdaConfiguration(output.Lambda, context)
4889
- : undefined,
4820
+ Lambda: output.Lambda != null ? deserializeAws_restJson1LambdaConfiguration(output.Lambda, context) : undefined,
4890
4821
  };
4891
4822
  };
4892
4823
  const deserializeAws_restJson1ProcessorList = (output, context) => {
@@ -4954,6 +4885,9 @@ const loadRestJsonErrorCode = (output, data) => {
4954
4885
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
4955
4886
  const sanitizeErrorCode = (rawValue) => {
4956
4887
  let cleanValue = rawValue;
4888
+ if (typeof cleanValue === "number") {
4889
+ cleanValue = cleanValue.toString();
4890
+ }
4957
4891
  if (cleanValue.indexOf(":") >= 0) {
4958
4892
  cleanValue = cleanValue.split(":")[0];
4959
4893
  }