Skip to content

chore(codegen): pin smithy to 1.9.x #2529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions clients/client-accessanalyzer/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3637,7 +3637,7 @@ const serializeAws_restJson1ConfigurationsMap = (
input: { [key: string]: Configuration },
context: __SerdeContext
): any => {
return Object.entries(input).reduce((acc: { [key: string]: Configuration }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand All @@ -3659,7 +3659,7 @@ const serializeAws_restJson1Criterion = (input: Criterion, context: __SerdeConte
};

const serializeAws_restJson1FilterCriteriaMap = (input: { [key: string]: Criterion }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: Criterion }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand Down Expand Up @@ -3711,7 +3711,7 @@ const serializeAws_restJson1InternetConfiguration = (input: InternetConfiguratio
};

const serializeAws_restJson1KmsConstraintsMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand Down Expand Up @@ -3794,7 +3794,7 @@ const serializeAws_restJson1KmsKeyConfiguration = (input: KmsKeyConfiguration, c
};

const serializeAws_restJson1KmsKeyPoliciesMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand Down Expand Up @@ -3860,18 +3860,15 @@ const serializeAws_restJson1S3AccessPointConfigurationsMap = (
input: { [key: string]: S3AccessPointConfiguration },
context: __SerdeContext
): any => {
return Object.entries(input).reduce(
(acc: { [key: string]: S3AccessPointConfiguration }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
return {
...acc,
[key]: serializeAws_restJson1S3AccessPointConfiguration(value, context),
};
},
{}
);
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
return {
...acc,
[key]: serializeAws_restJson1S3AccessPointConfiguration(value, context),
};
}, {});
};

const serializeAws_restJson1S3BucketAclGrantConfiguration = (
Expand Down Expand Up @@ -3956,7 +3953,7 @@ const serializeAws_restJson1SqsQueueConfiguration = (input: SqsQueueConfiguratio
};

const serializeAws_restJson1TagsMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7447,7 +7447,7 @@ const serializeAws_json1_1AudioList = (input: Audio[], context: __SerdeContext):
};

const serializeAws_json1_1AuthorizationResult = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand Down
6 changes: 3 additions & 3 deletions clients/client-amplify/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4864,7 +4864,7 @@ const serializeAws_restJson1CustomRules = (input: CustomRule[], context: __Serde
};

const serializeAws_restJson1EnvironmentVariables = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand All @@ -4876,7 +4876,7 @@ const serializeAws_restJson1EnvironmentVariables = (input: { [key: string]: stri
};

const serializeAws_restJson1FileMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand Down Expand Up @@ -4906,7 +4906,7 @@ const serializeAws_restJson1SubDomainSettings = (input: SubDomainSetting[], cont
};

const serializeAws_restJson1TagMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand Down
15 changes: 9 additions & 6 deletions clients/client-amplifybackend/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@a
import {
SmithyException as __SmithyException,
expectBoolean as __expectBoolean,
expectNumber as __expectNumber,
expectString as __expectString,
extendedEncodeURIComponent as __extendedEncodeURIComponent,
handleFloat as __handleFloat,
serializeFloat as __serializeFloat,
} from "@aws-sdk/smithy-client";
import {
Endpoint as __Endpoint,
Expand Down Expand Up @@ -3403,7 +3404,7 @@ const serializeAws_restJson1BackendAPIAppSyncAuthSettings = (
input.CognitoUserPoolId !== null && { cognitoUserPoolId: input.CognitoUserPoolId }),
...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
...(input.ExpirationTime !== undefined &&
input.ExpirationTime !== null && { expirationTime: input.ExpirationTime }),
input.ExpirationTime !== null && { expirationTime: __serializeFloat(input.ExpirationTime) }),
...(input.OpenIDAuthTTL !== undefined && input.OpenIDAuthTTL !== null && { openIDAuthTTL: input.OpenIDAuthTTL }),
...(input.OpenIDClientId !== undefined &&
input.OpenIDClientId !== null && { openIDClientId: input.OpenIDClientId }),
Expand Down Expand Up @@ -3547,7 +3548,8 @@ const serializeAws_restJson1CreateBackendAuthPasswordPolicyConfig = (
context
),
}),
...(input.MinimumLength !== undefined && input.MinimumLength !== null && { minimumLength: input.MinimumLength }),
...(input.MinimumLength !== undefined &&
input.MinimumLength !== null && { minimumLength: __serializeFloat(input.MinimumLength) }),
};
};

Expand Down Expand Up @@ -3810,7 +3812,8 @@ const serializeAws_restJson1UpdateBackendAuthPasswordPolicyConfig = (
context
),
}),
...(input.MinimumLength !== undefined && input.MinimumLength !== null && { minimumLength: input.MinimumLength }),
...(input.MinimumLength !== undefined &&
input.MinimumLength !== null && { minimumLength: __serializeFloat(input.MinimumLength) }),
};
};

Expand Down Expand Up @@ -3862,7 +3865,7 @@ const deserializeAws_restJson1BackendAPIAppSyncAuthSettings = (
return {
CognitoUserPoolId: __expectString(output.cognitoUserPoolId),
Description: __expectString(output.description),
ExpirationTime: __expectNumber(output.expirationTime),
ExpirationTime: __handleFloat(output.expirationTime),
OpenIDAuthTTL: __expectString(output.openIDAuthTTL),
OpenIDClientId: __expectString(output.openIDClientId),
OpenIDIatTTL: __expectString(output.openIDIatTTL),
Expand Down Expand Up @@ -4011,7 +4014,7 @@ const deserializeAws_restJson1CreateBackendAuthPasswordPolicyConfig = (
output.additionalConstraints !== undefined && output.additionalConstraints !== null
? deserializeAws_restJson1ListOfAdditionalConstraintsElement(output.additionalConstraints, context)
: undefined,
MinimumLength: __expectNumber(output.minimumLength),
MinimumLength: __handleFloat(output.minimumLength),
} as any;
};

Expand Down
22 changes: 12 additions & 10 deletions clients/client-api-gateway/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ import {
expectNumber as __expectNumber,
expectString as __expectString,
extendedEncodeURIComponent as __extendedEncodeURIComponent,
handleFloat as __handleFloat,
serializeFloat as __serializeFloat,
} from "@aws-sdk/smithy-client";
import {
Endpoint as __Endpoint,
Expand Down Expand Up @@ -16786,7 +16788,7 @@ const serializeAws_restJson1CanarySettings = (input: CanarySettings, context: __
return {
...(input.deploymentId !== undefined && input.deploymentId !== null && { deploymentId: input.deploymentId }),
...(input.percentTraffic !== undefined &&
input.percentTraffic !== null && { percentTraffic: input.percentTraffic }),
input.percentTraffic !== null && { percentTraffic: __serializeFloat(input.percentTraffic) }),
...(input.stageVariableOverrides !== undefined &&
input.stageVariableOverrides !== null && {
stageVariableOverrides: serializeAws_restJson1MapOfStringToString(input.stageVariableOverrides, context),
Expand All @@ -16801,7 +16803,7 @@ const serializeAws_restJson1DeploymentCanarySettings = (
): any => {
return {
...(input.percentTraffic !== undefined &&
input.percentTraffic !== null && { percentTraffic: input.percentTraffic }),
input.percentTraffic !== null && { percentTraffic: __serializeFloat(input.percentTraffic) }),
...(input.stageVariableOverrides !== undefined &&
input.stageVariableOverrides !== null && {
stageVariableOverrides: serializeAws_restJson1MapOfStringToString(input.stageVariableOverrides, context),
Expand Down Expand Up @@ -16904,7 +16906,7 @@ const serializeAws_restJson1MapOfApiStageThrottleSettings = (
input: { [key: string]: ThrottleSettings },
context: __SerdeContext
): any => {
return Object.entries(input).reduce((acc: { [key: string]: ThrottleSettings }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand All @@ -16919,7 +16921,7 @@ const serializeAws_restJson1MapOfStringToBoolean = (
input: { [key: string]: boolean },
context: __SerdeContext
): any => {
return Object.entries(input).reduce((acc: { [key: string]: boolean }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand All @@ -16931,7 +16933,7 @@ const serializeAws_restJson1MapOfStringToBoolean = (
};

const serializeAws_restJson1MapOfStringToList = (input: { [key: string]: string[] }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string[] }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand All @@ -16943,7 +16945,7 @@ const serializeAws_restJson1MapOfStringToList = (input: { [key: string]: string[
};

const serializeAws_restJson1MapOfStringToString = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand Down Expand Up @@ -16992,7 +16994,7 @@ const serializeAws_restJson1StageKey = (input: StageKey, context: __SerdeContext
const serializeAws_restJson1ThrottleSettings = (input: ThrottleSettings, context: __SerdeContext): any => {
return {
...(input.burstLimit !== undefined && input.burstLimit !== null && { burstLimit: input.burstLimit }),
...(input.rateLimit !== undefined && input.rateLimit !== null && { rateLimit: input.rateLimit }),
...(input.rateLimit !== undefined && input.rateLimit !== null && { rateLimit: __serializeFloat(input.rateLimit) }),
};
};

Expand Down Expand Up @@ -17077,7 +17079,7 @@ const deserializeAws_restJson1BasePathMapping = (output: any, context: __SerdeCo
const deserializeAws_restJson1CanarySettings = (output: any, context: __SerdeContext): CanarySettings => {
return {
deploymentId: __expectString(output.deploymentId),
percentTraffic: __expectNumber(output.percentTraffic),
percentTraffic: __handleFloat(output.percentTraffic),
stageVariableOverrides:
output.stageVariableOverrides !== undefined && output.stageVariableOverrides !== null
? deserializeAws_restJson1MapOfStringToString(output.stageVariableOverrides, context)
Expand Down Expand Up @@ -17755,7 +17757,7 @@ const deserializeAws_restJson1MethodSetting = (output: any, context: __SerdeCont
metricsEnabled: __expectBoolean(output.metricsEnabled),
requireAuthorizationForCacheControl: __expectBoolean(output.requireAuthorizationForCacheControl),
throttlingBurstLimit: __expectNumber(output.throttlingBurstLimit),
throttlingRateLimit: __expectNumber(output.throttlingRateLimit),
throttlingRateLimit: __handleFloat(output.throttlingRateLimit),
unauthorizedCacheControlHeaderStrategy: __expectString(output.unauthorizedCacheControlHeaderStrategy),
} as any;
};
Expand Down Expand Up @@ -17943,7 +17945,7 @@ const deserializeAws_restJson1Stage = (output: any, context: __SerdeContext): St
const deserializeAws_restJson1ThrottleSettings = (output: any, context: __SerdeContext): ThrottleSettings => {
return {
burstLimit: __expectNumber(output.burstLimit),
rateLimit: __expectNumber(output.rateLimit),
rateLimit: __handleFloat(output.rateLimit),
} as any;
};

Expand Down
41 changes: 20 additions & 21 deletions clients/client-apigatewayv2/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ import {
expectNumber as __expectNumber,
expectString as __expectString,
extendedEncodeURIComponent as __extendedEncodeURIComponent,
handleFloat as __handleFloat,
serializeFloat as __serializeFloat,
} from "@aws-sdk/smithy-client";
import {
Endpoint as __Endpoint,
Expand Down Expand Up @@ -9751,7 +9753,7 @@ const serializeAws_restJson1IntegrationParameters = (
input: { [key: string]: string },
context: __SerdeContext
): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand Down Expand Up @@ -9791,22 +9793,19 @@ const serializeAws_restJson1ResponseParameters = (
input: { [key: string]: { [key: string]: string } },
context: __SerdeContext
): any => {
return Object.entries(input).reduce(
(acc: { [key: string]: { [key: string]: string } }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
return {
...acc,
[key]: serializeAws_restJson1IntegrationParameters(value, context),
};
},
{}
);
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
return {
...acc,
[key]: serializeAws_restJson1IntegrationParameters(value, context),
};
}, {});
};

const serializeAws_restJson1RouteModels = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand All @@ -9821,7 +9820,7 @@ const serializeAws_restJson1RouteParameters = (
input: { [key: string]: ParameterConstraints },
context: __SerdeContext
): any => {
return Object.entries(input).reduce((acc: { [key: string]: ParameterConstraints }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand All @@ -9842,15 +9841,15 @@ const serializeAws_restJson1RouteSettings = (input: RouteSettings, context: __Se
...(input.ThrottlingBurstLimit !== undefined &&
input.ThrottlingBurstLimit !== null && { throttlingBurstLimit: input.ThrottlingBurstLimit }),
...(input.ThrottlingRateLimit !== undefined &&
input.ThrottlingRateLimit !== null && { throttlingRateLimit: input.ThrottlingRateLimit }),
input.ThrottlingRateLimit !== null && { throttlingRateLimit: __serializeFloat(input.ThrottlingRateLimit) }),
};
};

const serializeAws_restJson1RouteSettingsMap = (
input: { [key: string]: RouteSettings },
context: __SerdeContext
): any => {
return Object.entries(input).reduce((acc: { [key: string]: RouteSettings }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand All @@ -9873,7 +9872,7 @@ const serializeAws_restJson1SecurityGroupIdList = (input: string[], context: __S
};

const serializeAws_restJson1StageVariablesMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand All @@ -9896,7 +9895,7 @@ const serializeAws_restJson1SubnetIdList = (input: string[], context: __SerdeCon
};

const serializeAws_restJson1Tags = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand All @@ -9908,7 +9907,7 @@ const serializeAws_restJson1Tags = (input: { [key: string]: string }, context: _
};

const serializeAws_restJson1TemplateMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
return Object.entries(input).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
Expand Down Expand Up @@ -10490,7 +10489,7 @@ const deserializeAws_restJson1RouteSettings = (output: any, context: __SerdeCont
DetailedMetricsEnabled: __expectBoolean(output.detailedMetricsEnabled),
LoggingLevel: __expectString(output.loggingLevel),
ThrottlingBurstLimit: __expectNumber(output.throttlingBurstLimit),
ThrottlingRateLimit: __expectNumber(output.throttlingRateLimit),
ThrottlingRateLimit: __handleFloat(output.throttlingRateLimit),
} as any;
};

Expand Down
Loading