Skip to content

Commit

Permalink
feat(codegen): simplify unary function to reference
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Apr 14, 2023
1 parent 5c55cd8 commit 67e876a
Show file tree
Hide file tree
Showing 159 changed files with 2,530 additions and 2,529 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2811,7 +2811,7 @@ const se_CloudTrailDetails = (input: CloudTrailDetails, context: __SerdeContext)
accessRole: [],
endTime: (_) => _.toISOString().split(".")[0] + "Z",
startTime: (_) => _.toISOString().split(".")[0] + "Z",
trails: (_) => _json(_),
trails: _json,
});
};

Expand Down
12 changes: 6 additions & 6 deletions clients/client-acm-pca/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2109,9 +2109,9 @@ const se_ImportCertificateAuthorityCertificateRequest = (
context: __SerdeContext
): any => {
return take(input, {
Certificate: (_) => context.base64Encoder(_),
Certificate: context.base64Encoder,
CertificateAuthorityArn: [],
CertificateChain: (_) => context.base64Encoder(_),
CertificateChain: context.base64Encoder,
});
};

Expand All @@ -2120,14 +2120,14 @@ const se_ImportCertificateAuthorityCertificateRequest = (
*/
const se_IssueCertificateRequest = (input: IssueCertificateRequest, context: __SerdeContext): any => {
return take(input, {
ApiPassthrough: (_) => _json(_),
ApiPassthrough: _json,
CertificateAuthorityArn: [],
Csr: (_) => context.base64Encoder(_),
Csr: context.base64Encoder,
IdempotencyToken: [],
SigningAlgorithm: [],
TemplateArn: [],
Validity: (_) => _json(_),
ValidityNotBefore: (_) => _json(_),
Validity: _json,
ValidityNotBefore: _json,
});
};

Expand Down
10 changes: 5 additions & 5 deletions clients/client-acm/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont
const se_ExportCertificateRequest = (input: ExportCertificateRequest, context: __SerdeContext): any => {
return take(input, {
CertificateArn: [],
Passphrase: (_) => context.base64Encoder(_),
Passphrase: context.base64Encoder,
});
};

Expand All @@ -1383,11 +1383,11 @@ const se_ExportCertificateRequest = (input: ExportCertificateRequest, context: _
*/
const se_ImportCertificateRequest = (input: ImportCertificateRequest, context: __SerdeContext): any => {
return take(input, {
Certificate: (_) => context.base64Encoder(_),
Certificate: context.base64Encoder,
CertificateArn: [],
CertificateChain: (_) => context.base64Encoder(_),
PrivateKey: (_) => context.base64Encoder(_),
Tags: (_) => _json(_),
CertificateChain: context.base64Encoder,
PrivateKey: context.base64Encoder,
Tags: _json,
});
};

Expand Down
42 changes: 21 additions & 21 deletions clients/client-alexa-for-business/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6242,7 +6242,7 @@ const se_CreateAddressBookRequest = (input: CreateAddressBookRequest, context: _
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
Description: [],
Name: [],
Tags: (_) => _json(_),
Tags: _json,
});
};

Expand All @@ -6255,13 +6255,13 @@ const se_CreateBusinessReportScheduleRequest = (
): any => {
return take(input, {
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ContentRange: (_) => _json(_),
ContentRange: _json,
Format: [],
Recurrence: (_) => _json(_),
Recurrence: _json,
S3BucketName: [],
S3KeyPrefix: [],
ScheduleName: [],
Tags: (_) => _json(_),
Tags: _json,
});
};

Expand All @@ -6273,10 +6273,10 @@ const se_CreateConferenceProviderRequest = (input: CreateConferenceProviderReque
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ConferenceProviderName: [],
ConferenceProviderType: [],
IPDialIn: (_) => _json(_),
MeetingSetting: (_) => _json(_),
PSTNDialIn: (_) => _json(_),
Tags: (_) => _json(_),
IPDialIn: _json,
MeetingSetting: _json,
PSTNDialIn: _json,
Tags: _json,
});
};

Expand All @@ -6290,9 +6290,9 @@ const se_CreateContactRequest = (input: CreateContactRequest, context: __SerdeCo
FirstName: [],
LastName: [],
PhoneNumber: [],
PhoneNumbers: (_) => _json(_),
SipAddresses: (_) => _json(_),
Tags: (_) => _json(_),
PhoneNumbers: _json,
SipAddresses: _json,
Tags: _json,
});
};

Expand All @@ -6306,7 +6306,7 @@ const se_CreateGatewayGroupRequest = (input: CreateGatewayGroupRequest, context:
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
Description: [],
Name: [],
Tags: (_) => _json(_),
Tags: _json,
});
};

Expand All @@ -6328,8 +6328,8 @@ const se_CreateNetworkProfileRequest = (input: CreateNetworkProfileRequest, cont
NextPassword: [],
SecurityType: [],
Ssid: [],
Tags: (_) => _json(_),
TrustAnchors: (_) => _json(_),
Tags: _json,
TrustAnchors: _json,
});
};

Expand All @@ -6344,11 +6344,11 @@ const se_CreateProfileRequest = (input: CreateProfileRequest, context: __SerdeCo
DistanceUnit: [],
Locale: [],
MaxVolumeLimit: [],
MeetingRoomConfiguration: (_) => _json(_),
MeetingRoomConfiguration: _json,
PSTNEnabled: [],
ProfileName: [],
SetupModeDisabled: [],
Tags: (_) => _json(_),
Tags: _json,
TemperatureUnit: [],
Timezone: [],
WakeWord: [],
Expand All @@ -6367,7 +6367,7 @@ const se_CreateRoomRequest = (input: CreateRoomRequest, context: __SerdeContext)
ProfileArn: [],
ProviderCalendarId: [],
RoomName: [],
Tags: (_) => _json(_),
Tags: _json,
});
};

Expand All @@ -6379,7 +6379,7 @@ const se_CreateSkillGroupRequest = (input: CreateSkillGroupRequest, context: __S
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
Description: [],
SkillGroupName: [],
Tags: (_) => _json(_),
Tags: _json,
});
};

Expand All @@ -6392,7 +6392,7 @@ const se_CreateUserRequest = (input: CreateUserRequest, context: __SerdeContext)
Email: [],
FirstName: [],
LastName: [],
Tags: (_) => _json(_),
Tags: _json,
UserId: [],
});
};
Expand Down Expand Up @@ -6543,8 +6543,8 @@ const se_CreateUserRequest = (input: CreateUserRequest, context: __SerdeContext)
const se_SendAnnouncementRequest = (input: SendAnnouncementRequest, context: __SerdeContext): any => {
return take(input, {
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
Content: (_) => _json(_),
RoomFilters: (_) => _json(_),
Content: _json,
RoomFilters: _json,
TimeToLiveInSeconds: [],
});
};
Expand Down
30 changes: 15 additions & 15 deletions clients/client-amplifybackend/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3165,7 +3165,7 @@ const se_BackendAPIAppSyncAuthSettings = (input: BackendAPIAppSyncAuthSettings,
return take(input, {
cognitoUserPoolId: [, , `CognitoUserPoolId`],
description: [, , `Description`],
expirationTime: [, (_) => __serializeFloat(_), `ExpirationTime`],
expirationTime: [, __serializeFloat, `ExpirationTime`],
openIDAuthTTL: [, , `OpenIDAuthTTL`],
openIDClientId: [, , `OpenIDClientId`],
openIDIatTTL: [, , `OpenIDIatTTL`],
Expand Down Expand Up @@ -3234,8 +3234,8 @@ const se_BackendAuthSocialProviderConfig = (input: BackendAuthSocialProviderConf
*/
const se_BackendStoragePermissions = (input: BackendStoragePermissions, context: __SerdeContext): any => {
return take(input, {
authenticated: [, (_) => _json(_), `Authenticated`],
unAuthenticated: [, (_) => _json(_), `UnAuthenticated`],
authenticated: [, _json, `Authenticated`],
unAuthenticated: [, _json, `UnAuthenticated`],
});
};

Expand Down Expand Up @@ -3283,9 +3283,9 @@ const se_CreateBackendAuthOAuthConfig = (input: CreateBackendAuthOAuthConfig, co
return take(input, {
domainPrefix: [, , `DomainPrefix`],
oAuthGrantType: [, , `OAuthGrantType`],
oAuthScopes: [, (_) => _json(_), `OAuthScopes`],
redirectSignInURIs: [, (_) => _json(_), `RedirectSignInURIs`],
redirectSignOutURIs: [, (_) => _json(_), `RedirectSignOutURIs`],
oAuthScopes: [, _json, `OAuthScopes`],
redirectSignInURIs: [, _json, `RedirectSignInURIs`],
redirectSignOutURIs: [, _json, `RedirectSignOutURIs`],
socialProviderSettings: [, (_) => se_SocialProviderSettings(_, context), `SocialProviderSettings`],
});
};
Expand All @@ -3298,8 +3298,8 @@ const se_CreateBackendAuthPasswordPolicyConfig = (
context: __SerdeContext
): any => {
return take(input, {
additionalConstraints: [, (_) => _json(_), `AdditionalConstraints`],
minimumLength: [, (_) => __serializeFloat(_), `MinimumLength`],
additionalConstraints: [, _json, `AdditionalConstraints`],
minimumLength: [, __serializeFloat, `MinimumLength`],
});
};

Expand All @@ -3324,7 +3324,7 @@ const se_CreateBackendAuthUserPoolConfig = (input: CreateBackendAuthUserPoolConf
mfa: [, (_) => se_CreateBackendAuthMFAConfig(_, context), `Mfa`],
oAuth: [, (_) => se_CreateBackendAuthOAuthConfig(_, context), `OAuth`],
passwordPolicy: [, (_) => se_CreateBackendAuthPasswordPolicyConfig(_, context), `PasswordPolicy`],
requiredSignUpAttributes: [, (_) => _json(_), `RequiredSignUpAttributes`],
requiredSignUpAttributes: [, _json, `RequiredSignUpAttributes`],
signInMethod: [, , `SignInMethod`],
userPoolName: [, , `UserPoolName`],
verificationMessage: [, (_) => se_CreateBackendAuthVerificationMessageConfig(_, context), `VerificationMessage`],
Expand Down Expand Up @@ -3413,7 +3413,7 @@ const se_LoginAuthConfigReqObj = (input: LoginAuthConfigReqObj, context: __Serde
*/
const se_Settings = (input: Settings, context: __SerdeContext): any => {
return take(input, {
mfaTypes: [, (_) => _json(_), `MfaTypes`],
mfaTypes: [, _json, `MfaTypes`],
smsMessage: [, , `SmsMessage`],
});
};
Expand Down Expand Up @@ -3482,9 +3482,9 @@ const se_UpdateBackendAuthOAuthConfig = (input: UpdateBackendAuthOAuthConfig, co
return take(input, {
domainPrefix: [, , `DomainPrefix`],
oAuthGrantType: [, , `OAuthGrantType`],
oAuthScopes: [, (_) => _json(_), `OAuthScopes`],
redirectSignInURIs: [, (_) => _json(_), `RedirectSignInURIs`],
redirectSignOutURIs: [, (_) => _json(_), `RedirectSignOutURIs`],
oAuthScopes: [, _json, `OAuthScopes`],
redirectSignInURIs: [, _json, `RedirectSignInURIs`],
redirectSignOutURIs: [, _json, `RedirectSignOutURIs`],
socialProviderSettings: [, (_) => se_SocialProviderSettings(_, context), `SocialProviderSettings`],
});
};
Expand All @@ -3497,8 +3497,8 @@ const se_UpdateBackendAuthPasswordPolicyConfig = (
context: __SerdeContext
): any => {
return take(input, {
additionalConstraints: [, (_) => _json(_), `AdditionalConstraints`],
minimumLength: [, (_) => __serializeFloat(_), `MinimumLength`],
additionalConstraints: [, _json, `AdditionalConstraints`],
minimumLength: [, __serializeFloat, `MinimumLength`],
});
};

Expand Down
Loading

0 comments on commit 67e876a

Please sign in to comment.