Skip to content

Commit 92d89f5

Browse files
chore: update generated code for sized number parsing (#2719)
* chore: update codegen to use sized number parsing * chore: don't skip float truncation tests * chore: update generated code
1 parent aaf5986 commit 92d89f5

File tree

237 files changed

+5167
-5017
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+5167
-5017
lines changed

clients/client-accessanalyzer/protocols/Aws_restJson1.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ import {
112112
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
113113
import {
114114
expectBoolean as __expectBoolean,
115-
expectInt as __expectInt,
115+
expectInt32 as __expectInt32,
116116
expectString as __expectString,
117117
extendedEncodeURIComponent as __extendedEncodeURIComponent,
118-
strictParseInt as __strictParseInt,
118+
strictParseInt32 as __strictParseInt32,
119119
} from "@aws-sdk/smithy-client";
120120
import {
121121
Endpoint as __Endpoint,
@@ -3505,7 +3505,7 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (
35053505
retryAfterSeconds: undefined,
35063506
};
35073507
if (parsedOutput.headers["retry-after"] !== undefined) {
3508-
contents.retryAfterSeconds = __strictParseInt(parsedOutput.headers["retry-after"]);
3508+
contents.retryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
35093509
}
35103510
const data: any = parsedOutput.body;
35113511
if (data.message !== undefined && data.message !== null) {
@@ -3579,7 +3579,7 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (
35793579
retryAfterSeconds: undefined,
35803580
};
35813581
if (parsedOutput.headers["retry-after"] !== undefined) {
3582-
contents.retryAfterSeconds = __strictParseInt(parsedOutput.headers["retry-after"]);
3582+
contents.retryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
35833583
}
35843584
const data: any = parsedOutput.body;
35853585
if (data.message !== undefined && data.message !== null) {
@@ -4647,8 +4647,8 @@ const deserializeAws_restJson1NetworkOriginConfiguration = (
46474647
};
46484648

46494649
const deserializeAws_restJson1PathElement = (output: any, context: __SerdeContext): PathElement => {
4650-
if (__expectInt(output.index) !== undefined) {
4651-
return { index: __expectInt(output.index) as any };
4650+
if (__expectInt32(output.index) !== undefined) {
4651+
return { index: __expectInt32(output.index) as any };
46524652
}
46534653
if (__expectString(output.key) !== undefined) {
46544654
return { key: __expectString(output.key) as any };
@@ -4699,9 +4699,9 @@ const deserializeAws_restJson1PolicyGenerationList = (output: any, context: __Se
46994699

47004700
const deserializeAws_restJson1Position = (output: any, context: __SerdeContext): Position => {
47014701
return {
4702-
column: __expectInt(output.column),
4703-
line: __expectInt(output.line),
4704-
offset: __expectInt(output.offset),
4702+
column: __expectInt32(output.column),
4703+
line: __expectInt32(output.line),
4704+
offset: __expectInt32(output.offset),
47054705
} as any;
47064706
};
47074707

@@ -4866,8 +4866,8 @@ const deserializeAws_restJson1StatusReason = (output: any, context: __SerdeConte
48664866

48674867
const deserializeAws_restJson1Substring = (output: any, context: __SerdeContext): Substring => {
48684868
return {
4869-
length: __expectInt(output.length),
4870-
start: __expectInt(output.start),
4869+
length: __expectInt32(output.length),
4870+
start: __expectInt32(output.start),
48714871
} as any;
48724872
};
48734873

clients/client-acm-pca/protocols/Aws_json1_1.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ import {
141141
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
142142
import {
143143
expectBoolean as __expectBoolean,
144-
expectInt as __expectInt,
144+
expectInt32 as __expectInt32,
145145
expectString as __expectString,
146146
} from "@aws-sdk/smithy-client";
147147
import {
@@ -3374,7 +3374,7 @@ const deserializeAws_json1_1CrlConfiguration = (output: any, context: __SerdeCon
33743374
return {
33753375
CustomCname: __expectString(output.CustomCname),
33763376
Enabled: __expectBoolean(output.Enabled),
3377-
ExpirationInDays: __expectInt(output.ExpirationInDays),
3377+
ExpirationInDays: __expectInt32(output.ExpirationInDays),
33783378
S3BucketName: __expectString(output.S3BucketName),
33793379
S3ObjectAcl: __expectString(output.S3ObjectAcl),
33803380
} as any;

clients/client-acm/protocols/Aws_json1_1.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ import {
9494
ValidationException,
9595
} from "../models/models_0";
9696
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
97-
import { expectInt as __expectInt, expectString as __expectString } from "@aws-sdk/smithy-client";
97+
import { expectInt32 as __expectInt32, expectString as __expectString } from "@aws-sdk/smithy-client";
9898
import {
9999
Endpoint as __Endpoint,
100100
HeaderBag as __HeaderBag,
@@ -2131,7 +2131,7 @@ const deserializeAws_json1_1ExpiryEventsConfiguration = (
21312131
context: __SerdeContext
21322132
): ExpiryEventsConfiguration => {
21332133
return {
2134-
DaysBeforeExpiry: __expectInt(output.DaysBeforeExpiry),
2134+
DaysBeforeExpiry: __expectInt32(output.DaysBeforeExpiry),
21352135
} as any;
21362136
};
21372137

clients/client-alexa-for-business/protocols/Aws_json1_1.ts

+15-14
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,8 @@ import {
476476
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
477477
import {
478478
expectBoolean as __expectBoolean,
479-
expectInt as __expectInt,
479+
expectInt32 as __expectInt32,
480+
expectLong as __expectLong,
480481
expectString as __expectString,
481482
} from "@aws-sdk/smithy-client";
482483
import {
@@ -8947,7 +8948,7 @@ const deserializeAws_json1_1BusinessReportScheduleList = (
89478948

89488949
const deserializeAws_json1_1Category = (output: any, context: __SerdeContext): Category => {
89498950
return {
8950-
CategoryId: __expectInt(output.CategoryId),
8951+
CategoryId: __expectLong(output.CategoryId),
89518952
CategoryName: __expectString(output.CategoryName),
89528953
} as any;
89538954
};
@@ -9412,7 +9413,7 @@ const deserializeAws_json1_1EndOfMeetingReminderMinutesList = (output: any, cont
94129413
if (entry === null) {
94139414
return null as any;
94149415
}
9415-
return __expectInt(entry) as any;
9416+
return __expectInt32(entry) as any;
94169417
});
94179418
};
94189419

@@ -9629,7 +9630,7 @@ const deserializeAws_json1_1GetSkillGroupResponse = (output: any, context: __Ser
96299630

96309631
const deserializeAws_json1_1InstantBooking = (output: any, context: __SerdeContext): InstantBooking => {
96319632
return {
9632-
DurationInMinutes: __expectInt(output.DurationInMinutes),
9633+
DurationInMinutes: __expectInt32(output.DurationInMinutes),
96339634
Enabled: __expectBoolean(output.Enabled),
96349635
} as any;
96359636
};
@@ -9927,7 +9928,7 @@ const deserializeAws_json1_1Profile = (output: any, context: __SerdeContext): Pr
99279928
DistanceUnit: __expectString(output.DistanceUnit),
99289929
IsDefault: __expectBoolean(output.IsDefault),
99299930
Locale: __expectString(output.Locale),
9930-
MaxVolumeLimit: __expectInt(output.MaxVolumeLimit),
9931+
MaxVolumeLimit: __expectInt32(output.MaxVolumeLimit),
99319932
MeetingRoomConfiguration:
99329933
output.MeetingRoomConfiguration !== undefined && output.MeetingRoomConfiguration !== null
99339934
? deserializeAws_json1_1MeetingRoomConfiguration(output.MeetingRoomConfiguration, context)
@@ -10020,7 +10021,7 @@ const deserializeAws_json1_1RejectSkillResponse = (output: any, context: __Serde
1002010021
const deserializeAws_json1_1RequireCheckIn = (output: any, context: __SerdeContext): RequireCheckIn => {
1002110022
return {
1002210023
Enabled: __expectBoolean(output.Enabled),
10023-
ReleaseAfterMinutes: __expectInt(output.ReleaseAfterMinutes),
10024+
ReleaseAfterMinutes: __expectInt32(output.ReleaseAfterMinutes),
1002410025
} as any;
1002510026
};
1002610027

@@ -10141,7 +10142,7 @@ const deserializeAws_json1_1SearchAddressBooksResponse = (
1014110142
? deserializeAws_json1_1AddressBookDataList(output.AddressBooks, context)
1014210143
: undefined,
1014310144
NextToken: __expectString(output.NextToken),
10144-
TotalCount: __expectInt(output.TotalCount),
10145+
TotalCount: __expectInt32(output.TotalCount),
1014510146
} as any;
1014610147
};
1014710148

@@ -10152,7 +10153,7 @@ const deserializeAws_json1_1SearchContactsResponse = (output: any, context: __Se
1015210153
? deserializeAws_json1_1ContactDataList(output.Contacts, context)
1015310154
: undefined,
1015410155
NextToken: __expectString(output.NextToken),
10155-
TotalCount: __expectInt(output.TotalCount),
10156+
TotalCount: __expectInt32(output.TotalCount),
1015610157
} as any;
1015710158
};
1015810159

@@ -10163,7 +10164,7 @@ const deserializeAws_json1_1SearchDevicesResponse = (output: any, context: __Ser
1016310164
? deserializeAws_json1_1DeviceDataList(output.Devices, context)
1016410165
: undefined,
1016510166
NextToken: __expectString(output.NextToken),
10166-
TotalCount: __expectInt(output.TotalCount),
10167+
TotalCount: __expectInt32(output.TotalCount),
1016710168
} as any;
1016810169
};
1016910170

@@ -10177,7 +10178,7 @@ const deserializeAws_json1_1SearchNetworkProfilesResponse = (
1017710178
? deserializeAws_json1_1NetworkProfileDataList(output.NetworkProfiles, context)
1017810179
: undefined,
1017910180
NextToken: __expectString(output.NextToken),
10180-
TotalCount: __expectInt(output.TotalCount),
10181+
TotalCount: __expectInt32(output.TotalCount),
1018110182
} as any;
1018210183
};
1018310184

@@ -10188,7 +10189,7 @@ const deserializeAws_json1_1SearchProfilesResponse = (output: any, context: __Se
1018810189
output.Profiles !== undefined && output.Profiles !== null
1018910190
? deserializeAws_json1_1ProfileDataList(output.Profiles, context)
1019010191
: undefined,
10191-
TotalCount: __expectInt(output.TotalCount),
10192+
TotalCount: __expectInt32(output.TotalCount),
1019210193
} as any;
1019310194
};
1019410195

@@ -10199,7 +10200,7 @@ const deserializeAws_json1_1SearchRoomsResponse = (output: any, context: __Serde
1019910200
output.Rooms !== undefined && output.Rooms !== null
1020010201
? deserializeAws_json1_1RoomDataList(output.Rooms, context)
1020110202
: undefined,
10202-
TotalCount: __expectInt(output.TotalCount),
10203+
TotalCount: __expectInt32(output.TotalCount),
1020310204
} as any;
1020410205
};
1020510206

@@ -10213,14 +10214,14 @@ const deserializeAws_json1_1SearchSkillGroupsResponse = (
1021310214
output.SkillGroups !== undefined && output.SkillGroups !== null
1021410215
? deserializeAws_json1_1SkillGroupDataList(output.SkillGroups, context)
1021510216
: undefined,
10216-
TotalCount: __expectInt(output.TotalCount),
10217+
TotalCount: __expectInt32(output.TotalCount),
1021710218
} as any;
1021810219
};
1021910220

1022010221
const deserializeAws_json1_1SearchUsersResponse = (output: any, context: __SerdeContext): SearchUsersResponse => {
1022110222
return {
1022210223
NextToken: __expectString(output.NextToken),
10223-
TotalCount: __expectInt(output.TotalCount),
10224+
TotalCount: __expectInt32(output.TotalCount),
1022410225
Users:
1022510226
output.Users !== undefined && output.Users !== null
1022610227
? deserializeAws_json1_1UserDataList(output.Users, context)

clients/client-amp/protocols/Aws_restJson1.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@a
2323
import {
2424
expectString as __expectString,
2525
extendedEncodeURIComponent as __extendedEncodeURIComponent,
26-
strictParseInt as __strictParseInt,
26+
strictParseInt32 as __strictParseInt32,
2727
} from "@aws-sdk/smithy-client";
2828
import {
2929
Endpoint as __Endpoint,
@@ -691,7 +691,7 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (
691691
retryAfterSeconds: undefined,
692692
};
693693
if (parsedOutput.headers["retry-after"] !== undefined) {
694-
contents.retryAfterSeconds = __strictParseInt(parsedOutput.headers["retry-after"]);
694+
contents.retryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
695695
}
696696
const data: any = parsedOutput.body;
697697
if (data.message !== undefined && data.message !== null) {
@@ -773,7 +773,7 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (
773773
serviceCode: undefined,
774774
};
775775
if (parsedOutput.headers["retry-after"] !== undefined) {
776-
contents.retryAfterSeconds = __strictParseInt(parsedOutput.headers["retry-after"]);
776+
contents.retryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
777777
}
778778
const data: any = parsedOutput.body;
779779
if (data.message !== undefined && data.message !== null) {

clients/client-amplifybackend/protocols/Aws_restJson1.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ import {
8080
expectBoolean as __expectBoolean,
8181
expectString as __expectString,
8282
extendedEncodeURIComponent as __extendedEncodeURIComponent,
83-
limitedParseFloat as __limitedParseFloat,
83+
limitedParseDouble as __limitedParseDouble,
8484
serializeFloat as __serializeFloat,
8585
} from "@aws-sdk/smithy-client";
8686
import {
@@ -4063,7 +4063,7 @@ const deserializeAws_restJson1BackendAPIAppSyncAuthSettings = (
40634063
return {
40644064
CognitoUserPoolId: __expectString(output.cognitoUserPoolId),
40654065
Description: __expectString(output.description),
4066-
ExpirationTime: __limitedParseFloat(output.expirationTime),
4066+
ExpirationTime: __limitedParseDouble(output.expirationTime),
40674067
OpenIDAuthTTL: __expectString(output.openIDAuthTTL),
40684068
OpenIDClientId: __expectString(output.openIDClientId),
40694069
OpenIDIatTTL: __expectString(output.openIDIatTTL),
@@ -4224,7 +4224,7 @@ const deserializeAws_restJson1CreateBackendAuthPasswordPolicyConfig = (
42244224
output.additionalConstraints !== undefined && output.additionalConstraints !== null
42254225
? deserializeAws_restJson1ListOfAdditionalConstraintsElement(output.additionalConstraints, context)
42264226
: undefined,
4227-
MinimumLength: __limitedParseFloat(output.minimumLength),
4227+
MinimumLength: __limitedParseDouble(output.minimumLength),
42284228
} as any;
42294229
};
42304230

0 commit comments

Comments
 (0)