Skip to content
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

fix(clients): always allow idempotency token #4642

Merged
merged 1 commit into from Apr 19, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions clients/client-accessanalyzer/src/protocols/Aws_restJson1.ts
Expand Up @@ -144,7 +144,7 @@ export const se_ApplyArchiveRuleCommand = async (
body = JSON.stringify(
take(input, {
analyzerArn: [],
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
ruleName: [],
})
);
Expand Down Expand Up @@ -199,7 +199,7 @@ export const se_CreateAccessPreviewCommand = async (
body = JSON.stringify(
take(input, {
analyzerArn: [],
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
configurations: (_) => _json(_),
})
);
Expand Down Expand Up @@ -231,7 +231,7 @@ export const se_CreateAnalyzerCommand = async (
take(input, {
analyzerName: [],
archiveRules: (_) => _json(_),
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
tags: (_) => _json(_),
type: [],
})
Expand Down Expand Up @@ -271,7 +271,7 @@ export const se_CreateArchiveRuleCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
filter: (_) => _json(_),
ruleName: [],
})
Expand Down Expand Up @@ -809,7 +809,7 @@ export const se_StartPolicyGenerationCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
cloudTrailDetails: (_) => se_CloudTrailDetails(_, context),
policyGenerationDetails: (_) => _json(_),
})
Expand Down Expand Up @@ -942,7 +942,7 @@ export const se_UpdateArchiveRuleCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
filter: (_) => _json(_),
})
);
Expand Down Expand Up @@ -973,7 +973,7 @@ export const se_UpdateFindingsCommand = async (
body = JSON.stringify(
take(input, {
analyzerArn: [],
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
ids: (_) => _json(_),
resourceArn: [],
status: [],
Expand Down
22 changes: 11 additions & 11 deletions clients/client-alexa-for-business/src/protocols/Aws_json1_1.ts
Expand Up @@ -6239,7 +6239,7 @@ const de_UnauthorizedExceptionRes = async (
*/
const se_CreateAddressBookRequest = (input: CreateAddressBookRequest, context: __SerdeContext): any => {
return take(input, {
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
Description: [],
Name: [],
Tags: _json,
Expand All @@ -6254,7 +6254,7 @@ const se_CreateBusinessReportScheduleRequest = (
context: __SerdeContext
): any => {
return take(input, {
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
ContentRange: _json,
Format: [],
Recurrence: _json,
Expand All @@ -6270,7 +6270,7 @@ const se_CreateBusinessReportScheduleRequest = (
*/
const se_CreateConferenceProviderRequest = (input: CreateConferenceProviderRequest, context: __SerdeContext): any => {
return take(input, {
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
ConferenceProviderName: [],
ConferenceProviderType: [],
IPDialIn: _json,
Expand All @@ -6285,7 +6285,7 @@ const se_CreateConferenceProviderRequest = (input: CreateConferenceProviderReque
*/
const se_CreateContactRequest = (input: CreateContactRequest, context: __SerdeContext): any => {
return take(input, {
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
DisplayName: [],
FirstName: [],
LastName: [],
Expand All @@ -6303,7 +6303,7 @@ const se_CreateContactRequest = (input: CreateContactRequest, context: __SerdeCo
*/
const se_CreateGatewayGroupRequest = (input: CreateGatewayGroupRequest, context: __SerdeContext): any => {
return take(input, {
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
Description: [],
Name: [],
Tags: _json,
Expand All @@ -6320,7 +6320,7 @@ const se_CreateGatewayGroupRequest = (input: CreateGatewayGroupRequest, context:
const se_CreateNetworkProfileRequest = (input: CreateNetworkProfileRequest, context: __SerdeContext): any => {
return take(input, {
CertificateAuthorityArn: [],
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
CurrentPassword: [],
Description: [],
EapMethod: [],
Expand All @@ -6339,7 +6339,7 @@ const se_CreateNetworkProfileRequest = (input: CreateNetworkProfileRequest, cont
const se_CreateProfileRequest = (input: CreateProfileRequest, context: __SerdeContext): any => {
return take(input, {
Address: [],
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
DataRetentionOptIn: [],
DistanceUnit: [],
Locale: [],
Expand All @@ -6362,7 +6362,7 @@ const se_CreateProfileRequest = (input: CreateProfileRequest, context: __SerdeCo
*/
const se_CreateRoomRequest = (input: CreateRoomRequest, context: __SerdeContext): any => {
return take(input, {
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
Description: [],
ProfileArn: [],
ProviderCalendarId: [],
Expand All @@ -6376,7 +6376,7 @@ const se_CreateRoomRequest = (input: CreateRoomRequest, context: __SerdeContext)
*/
const se_CreateSkillGroupRequest = (input: CreateSkillGroupRequest, context: __SerdeContext): any => {
return take(input, {
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
Description: [],
SkillGroupName: [],
Tags: _json,
Expand All @@ -6388,7 +6388,7 @@ const se_CreateSkillGroupRequest = (input: CreateSkillGroupRequest, context: __S
*/
const se_CreateUserRequest = (input: CreateUserRequest, context: __SerdeContext): any => {
return take(input, {
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
Email: [],
FirstName: [],
LastName: [],
Expand Down Expand Up @@ -6542,7 +6542,7 @@ const se_CreateUserRequest = (input: CreateUserRequest, context: __SerdeContext)
*/
const se_SendAnnouncementRequest = (input: SendAnnouncementRequest, context: __SerdeContext): any => {
return take(input, {
ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
Content: _json,
RoomFilters: _json,
TimeToLiveInSeconds: [],
Expand Down
16 changes: 8 additions & 8 deletions clients/client-amp/src/protocols/Aws_restJson1.ts
Expand Up @@ -123,7 +123,7 @@ export const se_CreateAlertManagerDefinitionCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
data: (_) => context.base64Encoder(_),
})
);
Expand Down Expand Up @@ -155,7 +155,7 @@ export const se_CreateLoggingConfigurationCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
logGroupArn: [],
})
);
Expand Down Expand Up @@ -188,7 +188,7 @@ export const se_CreateRuleGroupsNamespaceCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
data: (_) => context.base64Encoder(_),
name: [],
tags: (_) => _json(_),
Expand Down Expand Up @@ -221,7 +221,7 @@ export const se_CreateWorkspaceCommand = async (
body = JSON.stringify(
take(input, {
alias: [],
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
tags: (_) => _json(_),
})
);
Expand Down Expand Up @@ -550,7 +550,7 @@ export const se_PutAlertManagerDefinitionCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
data: (_) => context.base64Encoder(_),
})
);
Expand Down Expand Up @@ -584,7 +584,7 @@ export const se_PutRuleGroupsNamespaceCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
data: (_) => context.base64Encoder(_),
})
);
Expand Down Expand Up @@ -676,7 +676,7 @@ export const se_UpdateLoggingConfigurationCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
logGroupArn: [],
})
);
Expand Down Expand Up @@ -709,7 +709,7 @@ export const se_UpdateWorkspaceAliasCommand = async (
body = JSON.stringify(
take(input, {
alias: [],
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
})
);
return new __HttpRequest({
Expand Down
28 changes: 14 additions & 14 deletions clients/client-app-mesh/src/protocols/Aws_restJson1.ts
Expand Up @@ -291,7 +291,7 @@ export const se_CreateGatewayRouteCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
gatewayRouteName: [],
spec: (_) => _json(_),
tags: (_) => _json(_),
Expand Down Expand Up @@ -324,7 +324,7 @@ export const se_CreateMeshCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
meshName: [],
spec: (_) => _json(_),
tags: (_) => _json(_),
Expand Down Expand Up @@ -370,7 +370,7 @@ export const se_CreateRouteCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
routeName: [],
spec: (_) => _json(_),
tags: (_) => _json(_),
Expand Down Expand Up @@ -409,7 +409,7 @@ export const se_CreateVirtualGatewayCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
spec: (_) => _json(_),
tags: (_) => _json(_),
virtualGatewayName: [],
Expand Down Expand Up @@ -447,7 +447,7 @@ export const se_CreateVirtualNodeCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
spec: (_) => _json(_),
tags: (_) => _json(_),
virtualNodeName: [],
Expand Down Expand Up @@ -486,7 +486,7 @@ export const se_CreateVirtualRouterCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
spec: (_) => _json(_),
tags: (_) => _json(_),
virtualRouterName: [],
Expand Down Expand Up @@ -525,7 +525,7 @@ export const se_CreateVirtualServiceCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
spec: (_) => _json(_),
tags: (_) => _json(_),
virtualServiceName: [],
Expand Down Expand Up @@ -1416,7 +1416,7 @@ export const se_UpdateGatewayRouteCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
spec: (_) => _json(_),
})
);
Expand Down Expand Up @@ -1449,7 +1449,7 @@ export const se_UpdateMeshCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
spec: (_) => _json(_),
})
);
Expand Down Expand Up @@ -1494,7 +1494,7 @@ export const se_UpdateRouteCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
spec: (_) => _json(_),
})
);
Expand Down Expand Up @@ -1539,7 +1539,7 @@ export const se_UpdateVirtualGatewayCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
spec: (_) => _json(_),
})
);
Expand Down Expand Up @@ -1584,7 +1584,7 @@ export const se_UpdateVirtualNodeCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
spec: (_) => _json(_),
})
);
Expand Down Expand Up @@ -1629,7 +1629,7 @@ export const se_UpdateVirtualRouterCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
spec: (_) => _json(_),
})
);
Expand Down Expand Up @@ -1674,7 +1674,7 @@ export const se_UpdateVirtualServiceCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
clientToken: (_) => _ ?? generateIdempotencyToken(),
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
spec: (_) => _json(_),
})
);
Expand Down