Skip to content

Commit

Permalink
feat: update clients as of 12/12/2020 (#1771)
Browse files Browse the repository at this point in the history
  • Loading branch information
kstich authored Dec 14, 2020
1 parent e22d9ef commit f69ff44
Show file tree
Hide file tree
Showing 250 changed files with 136,207 additions and 81,011 deletions.
313 changes: 200 additions & 113 deletions clients/client-accessanalyzer/protocols/Aws_restJson1.ts

Large diffs are not rendered by default.

437 changes: 262 additions & 175 deletions clients/client-acm-pca/protocols/Aws_json1_1.ts

Large diffs are not rendered by default.

365 changes: 260 additions & 105 deletions clients/client-acm/protocols/Aws_json1_1.ts

Large diffs are not rendered by default.

1,786 changes: 1,061 additions & 725 deletions clients/client-alexa-for-business/protocols/Aws_json1_1.ts

Large diffs are not rendered by default.

746 changes: 448 additions & 298 deletions clients/client-amplify/protocols/Aws_restJson1.ts

Large diffs are not rendered by default.

662 changes: 400 additions & 262 deletions clients/client-amplifybackend/protocols/Aws_restJson1.ts

Large diffs are not rendered by default.

1,569 changes: 892 additions & 677 deletions clients/client-api-gateway/protocols/Aws_restJson1.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ export const serializeAws_restJson1DeleteConnectionCommand = async (
input: DeleteConnectionCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "",
};
const headers: any = {};
let resolvedPath = "/@connections/{ConnectionId}";
if (input.ConnectionId !== undefined) {
const labelValue: string = input.ConnectionId;
Expand Down Expand Up @@ -54,9 +52,7 @@ export const serializeAws_restJson1GetConnectionCommand = async (
input: GetConnectionCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "",
};
const headers: any = {};
let resolvedPath = "/@connections/{ConnectionId}";
if (input.ConnectionId !== undefined) {
const labelValue: string = input.ConnectionId;
Expand Down Expand Up @@ -85,7 +81,7 @@ export const serializeAws_restJson1PostToConnectionCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "application/octet-stream",
"content-type": "application/octet-stream",
};
let resolvedPath = "/@connections/{ConnectionId}";
if (input.ConnectionId !== undefined) {
Expand Down Expand Up @@ -417,6 +413,7 @@ const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<st

const isSerializableHeaderValue = (value: any): boolean =>
value !== undefined &&
value !== null &&
value !== "" &&
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
Expand Down
1,417 changes: 840 additions & 577 deletions clients/client-apigatewayv2/protocols/Aws_restJson1.ts

Large diffs are not rendered by default.

1,088 changes: 705 additions & 383 deletions clients/client-app-mesh/protocols/Aws_restJson1.ts

Large diffs are not rendered by default.

354 changes: 202 additions & 152 deletions clients/client-appconfig/protocols/Aws_restJson1.ts

Large diffs are not rendered by default.

1,283 changes: 779 additions & 504 deletions clients/client-appflow/protocols/Aws_restJson1.ts

Large diffs are not rendered by default.

105 changes: 57 additions & 48 deletions clients/client-appintegrations/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ export const serializeAws_restJson1CreateEventIntegrationCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "application/json",
"content-type": "application/json",
};
let resolvedPath = "/eventIntegrations";
let body: any;
body = JSON.stringify({
ClientToken: input.ClientToken ?? generateIdempotencyToken(),
...(input.Description !== undefined && { Description: input.Description }),
...(input.EventBridgeBus !== undefined && { EventBridgeBus: input.EventBridgeBus }),
...(input.EventFilter !== undefined && {
EventFilter: serializeAws_restJson1EventFilter(input.EventFilter, context),
}),
...(input.Name !== undefined && { Name: input.Name }),
...(input.Tags !== undefined && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
...(input.EventBridgeBus !== undefined &&
input.EventBridgeBus !== null && { EventBridgeBus: input.EventBridgeBus }),
...(input.EventFilter !== undefined &&
input.EventFilter !== null && { EventFilter: serializeAws_restJson1EventFilter(input.EventFilter, context) }),
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
});
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
Expand All @@ -88,9 +88,7 @@ export const serializeAws_restJson1DeleteEventIntegrationCommand = async (
input: DeleteEventIntegrationCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "",
};
const headers: any = {};
let resolvedPath = "/eventIntegrations/{Name}";
if (input.Name !== undefined) {
const labelValue: string = input.Name;
Expand Down Expand Up @@ -118,9 +116,7 @@ export const serializeAws_restJson1GetEventIntegrationCommand = async (
input: GetEventIntegrationCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "",
};
const headers: any = {};
let resolvedPath = "/eventIntegrations/{Name}";
if (input.Name !== undefined) {
const labelValue: string = input.Name;
Expand Down Expand Up @@ -148,9 +144,7 @@ export const serializeAws_restJson1ListEventIntegrationAssociationsCommand = asy
input: ListEventIntegrationAssociationsCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "",
};
const headers: any = {};
let resolvedPath = "/eventIntegrations/{EventIntegrationName}/associations";
if (input.EventIntegrationName !== undefined) {
const labelValue: string = input.EventIntegrationName;
Expand Down Expand Up @@ -183,9 +177,7 @@ export const serializeAws_restJson1ListEventIntegrationsCommand = async (
input: ListEventIntegrationsCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "",
};
const headers: any = {};
let resolvedPath = "/eventIntegrations";
const query: any = {
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
Expand All @@ -209,9 +201,7 @@ export const serializeAws_restJson1ListTagsForResourceCommand = async (
input: ListTagsForResourceCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "",
};
const headers: any = {};
let resolvedPath = "/tags/{resourceArn}";
if (input.resourceArn !== undefined) {
const labelValue: string = input.resourceArn;
Expand Down Expand Up @@ -240,7 +230,7 @@ export const serializeAws_restJson1TagResourceCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "application/json",
"content-type": "application/json",
};
let resolvedPath = "/tags/{resourceArn}";
if (input.resourceArn !== undefined) {
Expand All @@ -254,7 +244,7 @@ export const serializeAws_restJson1TagResourceCommand = async (
}
let body: any;
body = JSON.stringify({
...(input.tags !== undefined && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
});
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
Expand All @@ -272,9 +262,7 @@ export const serializeAws_restJson1UntagResourceCommand = async (
input: UntagResourceCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "",
};
const headers: any = {};
let resolvedPath = "/tags/{resourceArn}";
if (input.resourceArn !== undefined) {
const labelValue: string = input.resourceArn;
Expand Down Expand Up @@ -307,7 +295,7 @@ export const serializeAws_restJson1UpdateEventIntegrationCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {
"Content-Type": "application/json",
"content-type": "application/json",
};
let resolvedPath = "/eventIntegrations/{Name}";
if (input.Name !== undefined) {
Expand All @@ -321,7 +309,7 @@ export const serializeAws_restJson1UpdateEventIntegrationCommand = async (
}
let body: any;
body = JSON.stringify({
...(input.Description !== undefined && { Description: input.Description }),
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
});
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
Expand Down Expand Up @@ -1230,31 +1218,35 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (

const serializeAws_restJson1EventFilter = (input: EventFilter, context: __SerdeContext): any => {
return {
...(input.Source !== undefined && { Source: input.Source }),
...(input.Source !== undefined && input.Source !== null && { Source: input.Source }),
};
};

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]: string }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
return {
...acc,
[key]: value,
}),
{}
);
};
}, {});
};

const deserializeAws_restJson1ClientAssociationMetadata = (
output: any,
context: __SerdeContext
): { [key: string]: string } => {
return Object.entries(output).reduce(
(acc: { [key: string]: string }, [key, value]: [string, any]) => ({
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
return {
...acc,
[key]: value,
}),
{}
);
};
}, {});
};

const deserializeAws_restJson1EventFilter = (output: any, context: __SerdeContext): EventFilter => {
Expand Down Expand Up @@ -1317,21 +1309,37 @@ const deserializeAws_restJson1EventIntegrationAssociationsList = (
output: any,
context: __SerdeContext
): EventIntegrationAssociation[] => {
return (output || []).map((entry: any) => deserializeAws_restJson1EventIntegrationAssociation(entry, context));
return (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1EventIntegrationAssociation(entry, context);
});
};

const deserializeAws_restJson1EventIntegrationsList = (output: any, context: __SerdeContext): EventIntegration[] => {
return (output || []).map((entry: any) => deserializeAws_restJson1EventIntegration(entry, context));
return (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1EventIntegration(entry, context);
});
};

const deserializeAws_restJson1TagMap = (output: any, context: __SerdeContext): { [key: string]: string } => {
return Object.entries(output).reduce(
(acc: { [key: string]: string }, [key, value]: [string, any]) => ({
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
if (value === null) {
return acc;
}
return {
...acc,
[key]: value,
}),
{}
);
};
}, {});
};

const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
Expand All @@ -1354,6 +1362,7 @@ const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<st

const isSerializableHeaderValue = (value: any): boolean =>
value !== undefined &&
value !== null &&
value !== "" &&
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
Expand Down
Loading

0 comments on commit f69ff44

Please sign in to comment.