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): add check for required query params #4221

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
8 changes: 6 additions & 2 deletions clients/client-amp/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
8 changes: 6 additions & 2 deletions clients/client-amplify/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
8 changes: 6 additions & 2 deletions clients/client-api-gateway/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2994,8 +2994,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
8 changes: 6 additions & 2 deletions clients/client-apigatewayv2/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1847,8 +1847,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.TagKeys, `TagKeys`) != null,
() => (input.TagKeys! || []).map((_entry) => _entry as any),
() => input.TagKeys !== void 0,
() =>
__expectNonNull(
(input.TagKeys! || []).map((_entry) => _entry as any),
`TagKeys`
),
],
});
let body: any;
Expand Down
8 changes: 6 additions & 2 deletions clients/client-appconfig/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1358,8 +1358,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.TagKeys, `TagKeys`) != null,
() => (input.TagKeys! || []).map((_entry) => _entry as any),
() => input.TagKeys !== void 0,
() =>
__expectNonNull(
(input.TagKeys! || []).map((_entry) => _entry as any),
`TagKeys`
),
],
});
let body: any;
Expand Down
8 changes: 6 additions & 2 deletions clients/client-appflow/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
8 changes: 6 additions & 2 deletions clients/client-appsync/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
8 changes: 6 additions & 2 deletions clients/client-auditmanager/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1751,8 +1751,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export const serializeAws_restJson1PutChunkCommand = async (
false
);
const query: any = map({
length: [__expectNonNull(input.Length, `Length`) != null, () => input.Length!.toString()],
length: [() => input.Length !== void 0, () => __expectNonNull(input.Length!.toString(), `Length`)],
checksum: [, __expectNonNull(input.Checksum!, `Checksum`)],
"checksum-algorithm": [, __expectNonNull(input.ChecksumAlgorithm!, `ChecksumAlgorithm`)],
});
Expand Down
8 changes: 6 additions & 2 deletions clients/client-batch/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.TagKeys, `TagKeys`) != null,
() => (input.TagKeys! || []).map((_entry) => _entry as any),
() => input.TagKeys !== void 0,
() =>
__expectNonNull(
(input.TagKeys! || []).map((_entry) => _entry as any),
`TagKeys`
),
],
});
let body: any;
Expand Down
8 changes: 6 additions & 2 deletions clients/client-braket/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.TagKeys, `TagKeys`) != null,
() => (input.TagKeys! || []).map((_entry) => _entry as any),
() => input.TagKeys !== void 0,
() =>
__expectNonNull(
(input.TagKeys! || []).map((_entry) => _entry as any),
`TagKeys`
),
],
});
let body: any;
Expand Down
32 changes: 18 additions & 14 deletions clients/client-codeguruprofiler/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,12 @@ export const serializeAws_restJson1GetRecommendationsCommand = async (
);
const query: any = map({
startTime: [
__expectNonNull(input.startTime, `startTime`) != null,
() => (input.startTime!.toISOString().split(".")[0] + "Z").toString(),
() => input.startTime !== void 0,
() => __expectNonNull((input.startTime!.toISOString().split(".")[0] + "Z").toString(), `startTime`),
],
endTime: [
__expectNonNull(input.endTime, `endTime`) != null,
() => (input.endTime!.toISOString().split(".")[0] + "Z").toString(),
() => input.endTime !== void 0,
() => __expectNonNull((input.endTime!.toISOString().split(".")[0] + "Z").toString(), `endTime`),
],
locale: [, input.locale!],
});
Expand Down Expand Up @@ -501,12 +501,12 @@ export const serializeAws_restJson1ListFindingsReportsCommand = async (
);
const query: any = map({
startTime: [
__expectNonNull(input.startTime, `startTime`) != null,
() => (input.startTime!.toISOString().split(".")[0] + "Z").toString(),
() => input.startTime !== void 0,
() => __expectNonNull((input.startTime!.toISOString().split(".")[0] + "Z").toString(), `startTime`),
],
endTime: [
__expectNonNull(input.endTime, `endTime`) != null,
() => (input.endTime!.toISOString().split(".")[0] + "Z").toString(),
() => input.endTime !== void 0,
() => __expectNonNull((input.endTime!.toISOString().split(".")[0] + "Z").toString(), `endTime`),
],
nextToken: [, input.nextToken!],
maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()],
Expand Down Expand Up @@ -544,12 +544,12 @@ export const serializeAws_restJson1ListProfileTimesCommand = async (
);
const query: any = map({
startTime: [
__expectNonNull(input.startTime, `startTime`) != null,
() => (input.startTime!.toISOString().split(".")[0] + "Z").toString(),
() => input.startTime !== void 0,
() => __expectNonNull((input.startTime!.toISOString().split(".")[0] + "Z").toString(), `startTime`),
],
endTime: [
__expectNonNull(input.endTime, `endTime`) != null,
() => (input.endTime!.toISOString().split(".")[0] + "Z").toString(),
() => input.endTime !== void 0,
() => __expectNonNull((input.endTime!.toISOString().split(".")[0] + "Z").toString(), `endTime`),
],
period: [, __expectNonNull(input.period!, `period`)],
orderBy: [, input.orderBy!],
Expand Down Expand Up @@ -830,8 +830,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn!, "{Arn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.TagKeys, `TagKeys`) != null,
() => (input.TagKeys! || []).map((_entry) => _entry as any),
() => input.TagKeys !== void 0,
() =>
__expectNonNull(
(input.TagKeys! || []).map((_entry) => _entry as any),
`TagKeys`
),
],
});
let body: any;
Expand Down
16 changes: 12 additions & 4 deletions clients/client-connect/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3004,8 +3004,12 @@ export const serializeAws_restJson1ListContactReferencesCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "ContactId", () => input.ContactId!, "{ContactId}", false);
const query: any = map({
referenceTypes: [
__expectNonNull(input.ReferenceTypes, `ReferenceTypes`) != null,
() => (input.ReferenceTypes! || []).map((_entry) => _entry as any),
() => input.ReferenceTypes !== void 0,
() =>
__expectNonNull(
(input.ReferenceTypes! || []).map((_entry) => _entry as any),
`ReferenceTypes`
),
],
nextToken: [, input.NextToken!],
});
Expand Down Expand Up @@ -4407,8 +4411,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn!, "{arn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
8 changes: 6 additions & 2 deletions clients/client-connectcases/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn!, "{arn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1176,8 +1176,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input.tagKeys! || []).map((_entry) => _entry as any),
() => input.tagKeys !== void 0,
() =>
__expectNonNull(
(input.tagKeys! || []).map((_entry) => _entry as any),
`tagKeys`
),
],
});
let body: any;
Expand Down
8 changes: 6 additions & 2 deletions clients/client-databrew/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1052,8 +1052,12 @@ export const serializeAws_restJson1UntagResourceCommand = async (
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false);
const query: any = map({
tagKeys: [
__expectNonNull(input.TagKeys, `TagKeys`) != null,
() => (input.TagKeys! || []).map((_entry) => _entry as any),
() => input.TagKeys !== void 0,
() =>
__expectNonNull(
(input.TagKeys! || []).map((_entry) => _entry as any),
`TagKeys`
),
],
});
let body: any;
Expand Down
Loading