Skip to content

Commit 5c66a96

Browse files
chore: update generated code
1 parent 6069a21 commit 5c66a96

File tree

4 files changed

+32
-24
lines changed

4 files changed

+32
-24
lines changed

clients/client-s3/protocols/Aws_restXml.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ import {
396396
extendedEncodeURIComponent as __extendedEncodeURIComponent,
397397
getArrayIfSingleItem as __getArrayIfSingleItem,
398398
getValueFromTextNode as __getValueFromTextNode,
399+
parseBoolean as __parseBoolean,
399400
} from "@aws-sdk/smithy-client";
400401
import {
401402
Endpoint as __Endpoint,
@@ -5008,7 +5009,7 @@ export const deserializeAws_restXmlCompleteMultipartUploadCommand = async (
50085009
contents.SSEKMSKeyId = output.headers["x-amz-server-side-encryption-aws-kms-key-id"];
50095010
}
50105011
if (output.headers["x-amz-server-side-encryption-bucket-key-enabled"] !== undefined) {
5011-
contents.BucketKeyEnabled = output.headers["x-amz-server-side-encryption-bucket-key-enabled"] === "true";
5012+
contents.BucketKeyEnabled = __parseBoolean(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]);
50125013
}
50135014
if (output.headers["x-amz-request-charged"] !== undefined) {
50145015
contents.RequestCharged = output.headers["x-amz-request-charged"];
@@ -5104,7 +5105,7 @@ export const deserializeAws_restXmlCopyObjectCommand = async (
51045105
contents.SSEKMSEncryptionContext = output.headers["x-amz-server-side-encryption-context"];
51055106
}
51065107
if (output.headers["x-amz-server-side-encryption-bucket-key-enabled"] !== undefined) {
5107-
contents.BucketKeyEnabled = output.headers["x-amz-server-side-encryption-bucket-key-enabled"] === "true";
5108+
contents.BucketKeyEnabled = __parseBoolean(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]);
51085109
}
51095110
if (output.headers["x-amz-request-charged"] !== undefined) {
51105111
contents.RequestCharged = output.headers["x-amz-request-charged"];
@@ -5258,7 +5259,7 @@ export const deserializeAws_restXmlCreateMultipartUploadCommand = async (
52585259
contents.SSEKMSEncryptionContext = output.headers["x-amz-server-side-encryption-context"];
52595260
}
52605261
if (output.headers["x-amz-server-side-encryption-bucket-key-enabled"] !== undefined) {
5261-
contents.BucketKeyEnabled = output.headers["x-amz-server-side-encryption-bucket-key-enabled"] === "true";
5262+
contents.BucketKeyEnabled = __parseBoolean(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]);
52625263
}
52635264
if (output.headers["x-amz-request-charged"] !== undefined) {
52645265
contents.RequestCharged = output.headers["x-amz-request-charged"];
@@ -5878,7 +5879,7 @@ export const deserializeAws_restXmlDeleteObjectCommand = async (
58785879
VersionId: undefined,
58795880
};
58805881
if (output.headers["x-amz-delete-marker"] !== undefined) {
5881-
contents.DeleteMarker = output.headers["x-amz-delete-marker"] === "true";
5882+
contents.DeleteMarker = __parseBoolean(output.headers["x-amz-delete-marker"]);
58825883
}
58835884
if (output.headers["x-amz-version-id"] !== undefined) {
58845885
contents.VersionId = output.headers["x-amz-version-id"];
@@ -7102,7 +7103,7 @@ export const deserializeAws_restXmlGetObjectCommand = async (
71027103
WebsiteRedirectLocation: undefined,
71037104
};
71047105
if (output.headers["x-amz-delete-marker"] !== undefined) {
7105-
contents.DeleteMarker = output.headers["x-amz-delete-marker"] === "true";
7106+
contents.DeleteMarker = __parseBoolean(output.headers["x-amz-delete-marker"]);
71067107
}
71077108
if (output.headers["accept-ranges"] !== undefined) {
71087109
contents.AcceptRanges = output.headers["accept-ranges"];
@@ -7165,7 +7166,7 @@ export const deserializeAws_restXmlGetObjectCommand = async (
71657166
contents.SSEKMSKeyId = output.headers["x-amz-server-side-encryption-aws-kms-key-id"];
71667167
}
71677168
if (output.headers["x-amz-server-side-encryption-bucket-key-enabled"] !== undefined) {
7168-
contents.BucketKeyEnabled = output.headers["x-amz-server-side-encryption-bucket-key-enabled"] === "true";
7169+
contents.BucketKeyEnabled = __parseBoolean(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]);
71697170
}
71707171
if (output.headers["x-amz-storage-class"] !== undefined) {
71717172
contents.StorageClass = output.headers["x-amz-storage-class"];
@@ -7690,7 +7691,7 @@ export const deserializeAws_restXmlHeadObjectCommand = async (
76907691
WebsiteRedirectLocation: undefined,
76917692
};
76927693
if (output.headers["x-amz-delete-marker"] !== undefined) {
7693-
contents.DeleteMarker = output.headers["x-amz-delete-marker"] === "true";
7694+
contents.DeleteMarker = __parseBoolean(output.headers["x-amz-delete-marker"]);
76947695
}
76957696
if (output.headers["accept-ranges"] !== undefined) {
76967697
contents.AcceptRanges = output.headers["accept-ranges"];
@@ -7753,7 +7754,7 @@ export const deserializeAws_restXmlHeadObjectCommand = async (
77537754
contents.SSEKMSKeyId = output.headers["x-amz-server-side-encryption-aws-kms-key-id"];
77547755
}
77557756
if (output.headers["x-amz-server-side-encryption-bucket-key-enabled"] !== undefined) {
7756-
contents.BucketKeyEnabled = output.headers["x-amz-server-side-encryption-bucket-key-enabled"] === "true";
7757+
contents.BucketKeyEnabled = __parseBoolean(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]);
77577758
}
77587759
if (output.headers["x-amz-storage-class"] !== undefined) {
77597760
contents.StorageClass = output.headers["x-amz-storage-class"];
@@ -9475,7 +9476,7 @@ export const deserializeAws_restXmlPutObjectCommand = async (
94759476
contents.SSEKMSEncryptionContext = output.headers["x-amz-server-side-encryption-context"];
94769477
}
94779478
if (output.headers["x-amz-server-side-encryption-bucket-key-enabled"] !== undefined) {
9478-
contents.BucketKeyEnabled = output.headers["x-amz-server-side-encryption-bucket-key-enabled"] === "true";
9479+
contents.BucketKeyEnabled = __parseBoolean(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]);
94799480
}
94809481
if (output.headers["x-amz-request-charged"] !== undefined) {
94819482
contents.RequestCharged = output.headers["x-amz-request-charged"];
@@ -9950,7 +9951,7 @@ export const deserializeAws_restXmlUploadPartCommand = async (
99509951
contents.SSEKMSKeyId = output.headers["x-amz-server-side-encryption-aws-kms-key-id"];
99519952
}
99529953
if (output.headers["x-amz-server-side-encryption-bucket-key-enabled"] !== undefined) {
9953-
contents.BucketKeyEnabled = output.headers["x-amz-server-side-encryption-bucket-key-enabled"] === "true";
9954+
contents.BucketKeyEnabled = __parseBoolean(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]);
99549955
}
99559956
if (output.headers["x-amz-request-charged"] !== undefined) {
99569957
contents.RequestCharged = output.headers["x-amz-request-charged"];
@@ -10022,7 +10023,7 @@ export const deserializeAws_restXmlUploadPartCopyCommand = async (
1002210023
contents.SSEKMSKeyId = output.headers["x-amz-server-side-encryption-aws-kms-key-id"];
1002310024
}
1002410025
if (output.headers["x-amz-server-side-encryption-bucket-key-enabled"] !== undefined) {
10025-
contents.BucketKeyEnabled = output.headers["x-amz-server-side-encryption-bucket-key-enabled"] === "true";
10026+
contents.BucketKeyEnabled = __parseBoolean(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]);
1002610027
}
1002710028
if (output.headers["x-amz-request-charged"] !== undefined) {
1002810029
contents.RequestCharged = output.headers["x-amz-request-charged"];

clients/client-transcribe-streaming/protocols/Aws_restJson1.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
TranscriptResultStream,
3030
} from "../models/models_0";
3131
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
32-
import { SmithyException as __SmithyException } from "@aws-sdk/smithy-client";
32+
import { SmithyException as __SmithyException, parseBoolean as __parseBoolean } from "@aws-sdk/smithy-client";
3333
import {
3434
Endpoint as __Endpoint,
3535
EventStreamSerdeContext as __EventStreamSerdeContext,
@@ -187,13 +187,15 @@ export const deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = as
187187
contents.Type = output.headers["x-amzn-transcribe-type"];
188188
}
189189
if (output.headers["x-amzn-transcribe-show-speaker-label"] !== undefined) {
190-
contents.ShowSpeakerLabel = output.headers["x-amzn-transcribe-show-speaker-label"] === "true";
190+
contents.ShowSpeakerLabel = __parseBoolean(output.headers["x-amzn-transcribe-show-speaker-label"]);
191191
}
192192
if (output.headers["x-amzn-transcribe-session-id"] !== undefined) {
193193
contents.SessionId = output.headers["x-amzn-transcribe-session-id"];
194194
}
195195
if (output.headers["x-amzn-transcribe-enable-channel-identification"] !== undefined) {
196-
contents.EnableChannelIdentification = output.headers["x-amzn-transcribe-enable-channel-identification"] === "true";
196+
contents.EnableChannelIdentification = __parseBoolean(
197+
output.headers["x-amzn-transcribe-enable-channel-identification"]
198+
);
197199
}
198200
if (output.headers["x-amzn-transcribe-number-of-channels"] !== undefined) {
199201
contents.NumberOfChannels = parseInt(output.headers["x-amzn-transcribe-number-of-channels"], 10);
@@ -338,17 +340,20 @@ export const deserializeAws_restJson1StartStreamTranscriptionCommand = async (
338340
contents.VocabularyFilterMethod = output.headers["x-amzn-transcribe-vocabulary-filter-method"];
339341
}
340342
if (output.headers["x-amzn-transcribe-show-speaker-label"] !== undefined) {
341-
contents.ShowSpeakerLabel = output.headers["x-amzn-transcribe-show-speaker-label"] === "true";
343+
contents.ShowSpeakerLabel = __parseBoolean(output.headers["x-amzn-transcribe-show-speaker-label"]);
342344
}
343345
if (output.headers["x-amzn-transcribe-enable-channel-identification"] !== undefined) {
344-
contents.EnableChannelIdentification = output.headers["x-amzn-transcribe-enable-channel-identification"] === "true";
346+
contents.EnableChannelIdentification = __parseBoolean(
347+
output.headers["x-amzn-transcribe-enable-channel-identification"]
348+
);
345349
}
346350
if (output.headers["x-amzn-transcribe-number-of-channels"] !== undefined) {
347351
contents.NumberOfChannels = parseInt(output.headers["x-amzn-transcribe-number-of-channels"], 10);
348352
}
349353
if (output.headers["x-amzn-transcribe-enable-partial-results-stabilization"] !== undefined) {
350-
contents.EnablePartialResultsStabilization =
351-
output.headers["x-amzn-transcribe-enable-partial-results-stabilization"] === "true";
354+
contents.EnablePartialResultsStabilization = __parseBoolean(
355+
output.headers["x-amzn-transcribe-enable-partial-results-stabilization"]
356+
);
352357
}
353358
if (output.headers["x-amzn-transcribe-partial-results-stability"] !== undefined) {
354359
contents.PartialResultsStability = output.headers["x-amzn-transcribe-partial-results-stability"];

protocol_tests/aws-restjson/protocols/Aws_restJson1.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ import {
135135
SmithyException as __SmithyException,
136136
dateToUtcString as __dateToUtcString,
137137
extendedEncodeURIComponent as __extendedEncodeURIComponent,
138+
parseBoolean as __parseBoolean,
138139
splitEvery as __splitEvery,
139140
} from "@aws-sdk/smithy-client";
140141
import {
@@ -2557,10 +2558,10 @@ export const deserializeAws_restJson1InputAndOutputWithHeadersCommand = async (
25572558
contents.headerDouble = parseFloat(output.headers["x-double"]);
25582559
}
25592560
if (output.headers["x-boolean1"] !== undefined) {
2560-
contents.headerTrueBool = output.headers["x-boolean1"] === "true";
2561+
contents.headerTrueBool = __parseBoolean(output.headers["x-boolean1"]);
25612562
}
25622563
if (output.headers["x-boolean2"] !== undefined) {
2563-
contents.headerFalseBool = output.headers["x-boolean2"] === "true";
2564+
contents.headerFalseBool = __parseBoolean(output.headers["x-boolean2"]);
25642565
}
25652566
if (output.headers["x-stringlist"] !== undefined) {
25662567
contents.headerStringList = (output.headers["x-stringlist"] || "").split(",").map((_entry) => _entry.trim());
@@ -2576,7 +2577,7 @@ export const deserializeAws_restJson1InputAndOutputWithHeadersCommand = async (
25762577
if (output.headers["x-booleanlist"] !== undefined) {
25772578
contents.headerBooleanList = (output.headers["x-booleanlist"] || "")
25782579
.split(",")
2579-
.map((_entry) => _entry.trim() === "true");
2580+
.map((_entry) => __parseBoolean(_entry.trim()));
25802581
}
25812582
if (output.headers["x-timestamplist"] !== undefined) {
25822583
contents.headerTimestampList = __splitEvery(output.headers["x-timestamplist"] || "", ",", 2).map(

protocol_tests/aws-restxml/protocols/Aws_restXml.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ import {
160160
extendedEncodeURIComponent as __extendedEncodeURIComponent,
161161
getArrayIfSingleItem as __getArrayIfSingleItem,
162162
getValueFromTextNode as __getValueFromTextNode,
163+
parseBoolean as __parseBoolean,
163164
splitEvery as __splitEvery,
164165
} from "@aws-sdk/smithy-client";
165166
import {
@@ -3351,10 +3352,10 @@ export const deserializeAws_restXmlInputAndOutputWithHeadersCommand = async (
33513352
contents.headerDouble = parseFloat(output.headers["x-double"]);
33523353
}
33533354
if (output.headers["x-boolean1"] !== undefined) {
3354-
contents.headerTrueBool = output.headers["x-boolean1"] === "true";
3355+
contents.headerTrueBool = __parseBoolean(output.headers["x-boolean1"]);
33553356
}
33563357
if (output.headers["x-boolean2"] !== undefined) {
3357-
contents.headerFalseBool = output.headers["x-boolean2"] === "true";
3358+
contents.headerFalseBool = __parseBoolean(output.headers["x-boolean2"]);
33583359
}
33593360
if (output.headers["x-stringlist"] !== undefined) {
33603361
contents.headerStringList = (output.headers["x-stringlist"] || "").split(",").map((_entry) => _entry.trim());
@@ -3370,7 +3371,7 @@ export const deserializeAws_restXmlInputAndOutputWithHeadersCommand = async (
33703371
if (output.headers["x-booleanlist"] !== undefined) {
33713372
contents.headerBooleanList = (output.headers["x-booleanlist"] || "")
33723373
.split(",")
3373-
.map((_entry) => _entry.trim() === "true");
3374+
.map((_entry) => __parseBoolean(_entry.trim()));
33743375
}
33753376
if (output.headers["x-timestamplist"] !== undefined) {
33763377
contents.headerTimestampList = __splitEvery(output.headers["x-timestamplist"] || "", ",", 2).map(

0 commit comments

Comments
 (0)