Skip to content

Commit

Permalink
fix(clients): deserialization of jsonName complex shapes (#4670)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Apr 26, 2023
1 parent 79c46f3 commit d79d141
Show file tree
Hide file tree
Showing 17 changed files with 1,041 additions and 961 deletions.
40 changes: 22 additions & 18 deletions clients/client-amplifybackend/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3576,7 +3576,7 @@ const de_BackendAPIAppSyncAuthSettings = (output: any, context: __SerdeContext):
const de_BackendAPIAuthType = (output: any, context: __SerdeContext): BackendAPIAuthType => {
return take(output, {
Mode: [, __expectString, `mode`],
Settings: (_) => [, de_BackendAPIAppSyncAuthSettings(_, context), `settings`],
Settings: [, (_: any) => de_BackendAPIAppSyncAuthSettings(_, context), `settings`],
}) as any;
};

Expand All @@ -3594,10 +3594,10 @@ const de_BackendAPIConflictResolution = (output: any, context: __SerdeContext):
*/
const de_BackendAPIResourceConfig = (output: any, context: __SerdeContext): BackendAPIResourceConfig => {
return take(output, {
AdditionalAuthTypes: (_) => [, de_ListOfBackendAPIAuthType(_, context), `additionalAuthTypes`],
AdditionalAuthTypes: [, (_: any) => de_ListOfBackendAPIAuthType(_, context), `additionalAuthTypes`],
ApiName: [, __expectString, `apiName`],
ConflictResolution: (_) => [, de_BackendAPIConflictResolution(_, context), `conflictResolution`],
DefaultAuthType: (_) => [, de_BackendAPIAuthType(_, context), `defaultAuthType`],
ConflictResolution: [, (_: any) => de_BackendAPIConflictResolution(_, context), `conflictResolution`],
DefaultAuthType: [, (_: any) => de_BackendAPIAuthType(_, context), `defaultAuthType`],
Service: [, __expectString, `service`],
TransformSchema: [, __expectString, `transformSchema`],
}) as any;
Expand Down Expand Up @@ -3660,8 +3660,8 @@ const de_CreateBackendAuthForgotPasswordConfig = (
): CreateBackendAuthForgotPasswordConfig => {
return take(output, {
DeliveryMethod: [, __expectString, `deliveryMethod`],
EmailSettings: (_) => [, de_EmailSettings(_, context), `emailSettings`],
SmsSettings: (_) => [, de_SmsSettings(_, context), `smsSettings`],
EmailSettings: [, (_: any) => de_EmailSettings(_, context), `emailSettings`],
SmsSettings: [, (_: any) => de_SmsSettings(_, context), `smsSettings`],
}) as any;
};

Expand All @@ -3684,7 +3684,7 @@ const de_CreateBackendAuthIdentityPoolConfig = (
const de_CreateBackendAuthMFAConfig = (output: any, context: __SerdeContext): CreateBackendAuthMFAConfig => {
return take(output, {
MFAMode: __expectString,
Settings: (_) => [, de_Settings(_, context), `settings`],
Settings: [, (_: any) => de_Settings(_, context), `settings`],
}) as any;
};

Expand All @@ -3698,7 +3698,7 @@ const de_CreateBackendAuthOAuthConfig = (output: any, context: __SerdeContext):
OAuthScopes: [, _json, `oAuthScopes`],
RedirectSignInURIs: [, _json, `redirectSignInURIs`],
RedirectSignOutURIs: [, _json, `redirectSignOutURIs`],
SocialProviderSettings: (_) => [, de_SocialProviderSettings(_, context), `socialProviderSettings`],
SocialProviderSettings: [, (_: any) => de_SocialProviderSettings(_, context), `socialProviderSettings`],
}) as any;
};

Expand All @@ -3721,9 +3721,9 @@ const de_CreateBackendAuthPasswordPolicyConfig = (
const de_CreateBackendAuthResourceConfig = (output: any, context: __SerdeContext): CreateBackendAuthResourceConfig => {
return take(output, {
AuthResources: [, __expectString, `authResources`],
IdentityPoolConfigs: (_) => [, de_CreateBackendAuthIdentityPoolConfig(_, context), `identityPoolConfigs`],
IdentityPoolConfigs: [, (_: any) => de_CreateBackendAuthIdentityPoolConfig(_, context), `identityPoolConfigs`],
Service: [, __expectString, `service`],
UserPoolConfigs: (_) => [, de_CreateBackendAuthUserPoolConfig(_, context), `userPoolConfigs`],
UserPoolConfigs: [, (_: any) => de_CreateBackendAuthUserPoolConfig(_, context), `userPoolConfigs`],
}) as any;
};

Expand All @@ -3732,14 +3732,18 @@ const de_CreateBackendAuthResourceConfig = (output: any, context: __SerdeContext
*/
const de_CreateBackendAuthUserPoolConfig = (output: any, context: __SerdeContext): CreateBackendAuthUserPoolConfig => {
return take(output, {
ForgotPassword: (_) => [, de_CreateBackendAuthForgotPasswordConfig(_, context), `forgotPassword`],
Mfa: (_) => [, de_CreateBackendAuthMFAConfig(_, context), `mfa`],
OAuth: (_) => [, de_CreateBackendAuthOAuthConfig(_, context), `oAuth`],
PasswordPolicy: (_) => [, de_CreateBackendAuthPasswordPolicyConfig(_, context), `passwordPolicy`],
ForgotPassword: [, (_: any) => de_CreateBackendAuthForgotPasswordConfig(_, context), `forgotPassword`],
Mfa: [, (_: any) => de_CreateBackendAuthMFAConfig(_, context), `mfa`],
OAuth: [, (_: any) => de_CreateBackendAuthOAuthConfig(_, context), `oAuth`],
PasswordPolicy: [, (_: any) => de_CreateBackendAuthPasswordPolicyConfig(_, context), `passwordPolicy`],
RequiredSignUpAttributes: [, _json, `requiredSignUpAttributes`],
SignInMethod: [, __expectString, `signInMethod`],
UserPoolName: [, __expectString, `userPoolName`],
VerificationMessage: (_) => [, de_CreateBackendAuthVerificationMessageConfig(_, context), `verificationMessage`],
VerificationMessage: [
,
(_: any) => de_CreateBackendAuthVerificationMessageConfig(_, context),
`verificationMessage`,
],
}) as any;
};

Expand All @@ -3752,8 +3756,8 @@ const de_CreateBackendAuthVerificationMessageConfig = (
): CreateBackendAuthVerificationMessageConfig => {
return take(output, {
DeliveryMethod: [, __expectString, `deliveryMethod`],
EmailSettings: (_) => [, de_EmailSettings(_, context), `emailSettings`],
SmsSettings: (_) => [, de_SmsSettings(_, context), `smsSettings`],
EmailSettings: [, (_: any) => de_EmailSettings(_, context), `emailSettings`],
SmsSettings: [, (_: any) => de_SmsSettings(_, context), `smsSettings`],
}) as any;
};

Expand All @@ -3774,7 +3778,7 @@ const de_GetBackendStorageResourceConfig = (output: any, context: __SerdeContext
return take(output, {
BucketName: [, __expectString, `bucketName`],
Imported: [, __expectBoolean, `imported`],
Permissions: (_) => [, de_BackendStoragePermissions(_, context), `permissions`],
Permissions: [, (_: any) => de_BackendStoragePermissions(_, context), `permissions`],
ServiceName: [, __expectString, `serviceName`],
}) as any;
};
Expand Down
36 changes: 20 additions & 16 deletions clients/client-apigatewayv2/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7012,8 +7012,8 @@ const de_Api = (output: any, context: __SerdeContext): Api => {
ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`],
ApiId: [, __expectString, `apiId`],
ApiKeySelectionExpression: [, __expectString, `apiKeySelectionExpression`],
CorsConfiguration: (_) => [, de_Cors(_, context), `corsConfiguration`],
CreatedDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`],
CorsConfiguration: [, (_: any) => de_Cors(_, context), `corsConfiguration`],
CreatedDate: [, (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`],
Description: [, __expectString, `description`],
DisableExecuteApiEndpoint: [, __expectBoolean, `disableExecuteApiEndpoint`],
DisableSchemaValidation: [, __expectBoolean, `disableSchemaValidation`],
Expand Down Expand Up @@ -7055,7 +7055,7 @@ const de_Authorizer = (output: any, context: __SerdeContext): Authorizer => {
EnableSimpleResponses: [, __expectBoolean, `enableSimpleResponses`],
IdentitySource: [, _json, `identitySource`],
IdentityValidationExpression: [, __expectString, `identityValidationExpression`],
JwtConfiguration: (_) => [, de_JWTConfiguration(_, context), `jwtConfiguration`],
JwtConfiguration: [, (_: any) => de_JWTConfiguration(_, context), `jwtConfiguration`],
Name: [, __expectString, `name`],
}) as any;
};
Expand Down Expand Up @@ -7086,7 +7086,7 @@ const de_Cors = (output: any, context: __SerdeContext): Cors => {
const de_Deployment = (output: any, context: __SerdeContext): Deployment => {
return take(output, {
AutoDeployed: [, __expectBoolean, `autoDeployed`],
CreatedDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`],
CreatedDate: [, (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`],
DeploymentId: [, __expectString, `deploymentId`],
DeploymentStatus: [, __expectString, `deploymentStatus`],
DeploymentStatusMessage: [, __expectString, `deploymentStatusMessage`],
Expand All @@ -7101,8 +7101,8 @@ const de_DomainName = (output: any, context: __SerdeContext): DomainName => {
return take(output, {
ApiMappingSelectionExpression: [, __expectString, `apiMappingSelectionExpression`],
DomainName: [, __expectString, `domainName`],
DomainNameConfigurations: (_) => [, de_DomainNameConfigurations(_, context), `domainNameConfigurations`],
MutualTlsAuthentication: (_) => [, de_MutualTlsAuthentication(_, context), `mutualTlsAuthentication`],
DomainNameConfigurations: [, (_: any) => de_DomainNameConfigurations(_, context), `domainNameConfigurations`],
MutualTlsAuthentication: [, (_: any) => de_MutualTlsAuthentication(_, context), `mutualTlsAuthentication`],
Tags: [, _json, `tags`],
}) as any;
};
Expand All @@ -7115,7 +7115,11 @@ const de_DomainNameConfiguration = (output: any, context: __SerdeContext): Domai
ApiGatewayDomainName: [, __expectString, `apiGatewayDomainName`],
CertificateArn: [, __expectString, `certificateArn`],
CertificateName: [, __expectString, `certificateName`],
CertificateUploadDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `certificateUploadDate`],
CertificateUploadDate: [
,
(_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
`certificateUploadDate`,
],
DomainNameStatus: [, __expectString, `domainNameStatus`],
DomainNameStatusMessage: [, __expectString, `domainNameStatusMessage`],
EndpointType: [, __expectString, `endpointType`],
Expand Down Expand Up @@ -7163,7 +7167,7 @@ const de_Integration = (output: any, context: __SerdeContext): Integration => {
ResponseParameters: [, _json, `responseParameters`],
TemplateSelectionExpression: [, __expectString, `templateSelectionExpression`],
TimeoutInMillis: [, __expectInt32, `timeoutInMillis`],
TlsConfig: (_) => [, de_TlsConfig(_, context), `tlsConfig`],
TlsConfig: [, (_: any) => de_TlsConfig(_, context), `tlsConfig`],
}) as any;
};

Expand Down Expand Up @@ -7241,7 +7245,7 @@ const de_Route = (output: any, context: __SerdeContext): Route => {
ModelSelectionExpression: [, __expectString, `modelSelectionExpression`],
OperationName: [, __expectString, `operationName`],
RequestModels: [, _json, `requestModels`],
RequestParameters: (_) => [, de_RouteParameters(_, context), `requestParameters`],
RequestParameters: [, (_: any) => de_RouteParameters(_, context), `requestParameters`],
RouteId: [, __expectString, `routeId`],
RouteKey: [, __expectString, `routeKey`],
RouteResponseSelectionExpression: [, __expectString, `routeResponseSelectionExpression`],
Expand Down Expand Up @@ -7271,7 +7275,7 @@ const de_RouteResponse = (output: any, context: __SerdeContext): RouteResponse =
return take(output, {
ModelSelectionExpression: [, __expectString, `modelSelectionExpression`],
ResponseModels: [, _json, `responseModels`],
ResponseParameters: (_) => [, de_RouteParameters(_, context), `responseParameters`],
ResponseParameters: [, (_: any) => de_RouteParameters(_, context), `responseParameters`],
RouteResponseId: [, __expectString, `routeResponseId`],
RouteResponseKey: [, __expectString, `routeResponseKey`],
}) as any;
Expand Down Expand Up @@ -7310,17 +7314,17 @@ const de_RouteSettingsMap = (output: any, context: __SerdeContext): Record<strin
*/
const de_Stage = (output: any, context: __SerdeContext): Stage => {
return take(output, {
AccessLogSettings: (_) => [, de_AccessLogSettings(_, context), `accessLogSettings`],
AccessLogSettings: [, (_: any) => de_AccessLogSettings(_, context), `accessLogSettings`],
ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`],
AutoDeploy: [, __expectBoolean, `autoDeploy`],
ClientCertificateId: [, __expectString, `clientCertificateId`],
CreatedDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`],
DefaultRouteSettings: (_) => [, de_RouteSettings(_, context), `defaultRouteSettings`],
CreatedDate: [, (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`],
DefaultRouteSettings: [, (_: any) => de_RouteSettings(_, context), `defaultRouteSettings`],
DeploymentId: [, __expectString, `deploymentId`],
Description: [, __expectString, `description`],
LastDeploymentStatusMessage: [, __expectString, `lastDeploymentStatusMessage`],
LastUpdatedDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastUpdatedDate`],
RouteSettings: (_) => [, de_RouteSettingsMap(_, context), `routeSettings`],
LastUpdatedDate: [, (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastUpdatedDate`],
RouteSettings: [, (_: any) => de_RouteSettingsMap(_, context), `routeSettings`],
StageName: [, __expectString, `stageName`],
StageVariables: [, _json, `stageVariables`],
Tags: [, _json, `tags`],
Expand Down Expand Up @@ -7349,7 +7353,7 @@ const de_TlsConfig = (output: any, context: __SerdeContext): TlsConfig => {
*/
const de_VpcLink = (output: any, context: __SerdeContext): VpcLink => {
return take(output, {
CreatedDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`],
CreatedDate: [, (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`],
Name: [, __expectString, `name`],
SecurityGroupIds: [, _json, `securityGroupIds`],
SubnetIds: [, _json, `subnetIds`],
Expand Down
Loading

0 comments on commit d79d141

Please sign in to comment.