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

feat: update clients as of 11/13 #1676

Merged
merged 7 commits into from
Nov 13, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,001 changes: 510 additions & 491 deletions clients/client-amplify/models/models_0.ts

Large diffs are not rendered by default.

138 changes: 71 additions & 67 deletions clients/client-amplify/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export const serializeAws_restJson1CreateAppCommand = async (
}),
...(input.basicAuthCredentials !== undefined && { basicAuthCredentials: input.basicAuthCredentials }),
...(input.buildSpec !== undefined && { buildSpec: input.buildSpec }),
...(input.customHeaders !== undefined && { customHeaders: input.customHeaders }),
...(input.customRules !== undefined && {
customRules: serializeAws_restJson1CustomRules(input.customRules, context),
}),
Expand Down Expand Up @@ -437,15 +438,6 @@ export const serializeAws_restJson1DeleteBranchCommand = async (
"Content-Type": "",
};
let resolvedPath = "/apps/{appId}/branches/{branchName}";
if (input.branchName !== undefined) {
const labelValue: string = input.branchName;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: branchName.");
}
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: branchName.");
}
if (input.appId !== undefined) {
const labelValue: string = input.appId;
if (labelValue.length <= 0) {
Expand All @@ -455,6 +447,15 @@ export const serializeAws_restJson1DeleteBranchCommand = async (
} else {
throw new Error("No value provided for input HTTP label: appId.");
}
if (input.branchName !== undefined) {
const labelValue: string = input.branchName;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: branchName.");
}
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: branchName.");
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
Expand All @@ -476,15 +477,6 @@ export const serializeAws_restJson1DeleteDomainAssociationCommand = async (
"Content-Type": "",
};
let resolvedPath = "/apps/{appId}/domains/{domainName}";
if (input.domainName !== undefined) {
const labelValue: string = input.domainName;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: domainName.");
}
resolvedPath = resolvedPath.replace("{domainName}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: domainName.");
}
if (input.appId !== undefined) {
const labelValue: string = input.appId;
if (labelValue.length <= 0) {
Expand All @@ -494,6 +486,15 @@ export const serializeAws_restJson1DeleteDomainAssociationCommand = async (
} else {
throw new Error("No value provided for input HTTP label: appId.");
}
if (input.domainName !== undefined) {
const labelValue: string = input.domainName;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: domainName.");
}
resolvedPath = resolvedPath.replace("{domainName}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: domainName.");
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
Expand All @@ -515,15 +516,6 @@ export const serializeAws_restJson1DeleteJobCommand = async (
"Content-Type": "",
};
let resolvedPath = "/apps/{appId}/branches/{branchName}/jobs/{jobId}";
if (input.branchName !== undefined) {
const labelValue: string = input.branchName;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: branchName.");
}
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: branchName.");
}
if (input.appId !== undefined) {
const labelValue: string = input.appId;
if (labelValue.length <= 0) {
Expand All @@ -533,6 +525,15 @@ export const serializeAws_restJson1DeleteJobCommand = async (
} else {
throw new Error("No value provided for input HTTP label: appId.");
}
if (input.branchName !== undefined) {
const labelValue: string = input.branchName;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: branchName.");
}
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: branchName.");
}
if (input.jobId !== undefined) {
const labelValue: string = input.jobId;
if (labelValue.length <= 0) {
Expand Down Expand Up @@ -688,15 +689,6 @@ export const serializeAws_restJson1GetBackendEnvironmentCommand = async (
"Content-Type": "",
};
let resolvedPath = "/apps/{appId}/backendenvironments/{environmentName}";
if (input.environmentName !== undefined) {
const labelValue: string = input.environmentName;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: environmentName.");
}
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: environmentName.");
}
if (input.appId !== undefined) {
const labelValue: string = input.appId;
if (labelValue.length <= 0) {
Expand All @@ -706,6 +698,15 @@ export const serializeAws_restJson1GetBackendEnvironmentCommand = async (
} else {
throw new Error("No value provided for input HTTP label: appId.");
}
if (input.environmentName !== undefined) {
const labelValue: string = input.environmentName;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: environmentName.");
}
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: environmentName.");
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
Expand Down Expand Up @@ -884,8 +885,8 @@ export const serializeAws_restJson1ListAppsCommand = async (
};
let resolvedPath = "/apps";
const query: any = {
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
};
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
Expand All @@ -909,6 +910,15 @@ export const serializeAws_restJson1ListArtifactsCommand = async (
"Content-Type": "",
};
let resolvedPath = "/apps/{appId}/branches/{branchName}/jobs/{jobId}/artifacts";
if (input.appId !== undefined) {
const labelValue: string = input.appId;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: appId.");
}
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: appId.");
}
if (input.branchName !== undefined) {
const labelValue: string = input.branchName;
if (labelValue.length <= 0) {
Expand All @@ -927,15 +937,6 @@ export const serializeAws_restJson1ListArtifactsCommand = async (
} else {
throw new Error("No value provided for input HTTP label: jobId.");
}
if (input.appId !== undefined) {
const labelValue: string = input.appId;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: appId.");
}
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: appId.");
}
const query: any = {
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
Expand Down Expand Up @@ -972,9 +973,9 @@ export const serializeAws_restJson1ListBackendEnvironmentsCommand = async (
throw new Error("No value provided for input HTTP label: appId.");
}
const query: any = {
...(input.environmentName !== undefined && { environmentName: input.environmentName }),
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
...(input.environmentName !== undefined && { environmentName: input.environmentName }),
};
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
Expand Down Expand Up @@ -1043,8 +1044,8 @@ export const serializeAws_restJson1ListDomainAssociationsCommand = async (
throw new Error("No value provided for input HTTP label: appId.");
}
const query: any = {
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
};
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
Expand Down Expand Up @@ -1152,8 +1153,8 @@ export const serializeAws_restJson1ListWebhooksCommand = async (
throw new Error("No value provided for input HTTP label: appId.");
}
const query: any = {
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
};
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
Expand All @@ -1177,15 +1178,6 @@ export const serializeAws_restJson1StartDeploymentCommand = async (
"Content-Type": "application/json",
};
let resolvedPath = "/apps/{appId}/branches/{branchName}/deployments/start";
if (input.branchName !== undefined) {
const labelValue: string = input.branchName;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: branchName.");
}
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: branchName.");
}
if (input.appId !== undefined) {
const labelValue: string = input.appId;
if (labelValue.length <= 0) {
Expand All @@ -1195,6 +1187,15 @@ export const serializeAws_restJson1StartDeploymentCommand = async (
} else {
throw new Error("No value provided for input HTTP label: appId.");
}
if (input.branchName !== undefined) {
const labelValue: string = input.branchName;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: branchName.");
}
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: branchName.");
}
let body: any;
body = JSON.stringify({
...(input.jobId !== undefined && { jobId: input.jobId }),
Expand Down Expand Up @@ -1267,6 +1268,15 @@ export const serializeAws_restJson1StopJobCommand = async (
"Content-Type": "",
};
let resolvedPath = "/apps/{appId}/branches/{branchName}/jobs/{jobId}/stop";
if (input.appId !== undefined) {
const labelValue: string = input.appId;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: appId.");
}
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: appId.");
}
if (input.branchName !== undefined) {
const labelValue: string = input.branchName;
if (labelValue.length <= 0) {
Expand All @@ -1285,15 +1295,6 @@ export const serializeAws_restJson1StopJobCommand = async (
} else {
throw new Error("No value provided for input HTTP label: jobId.");
}
if (input.appId !== undefined) {
const labelValue: string = input.appId;
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: appId.");
}
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: appId.");
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
Expand Down Expand Up @@ -1405,6 +1406,7 @@ export const serializeAws_restJson1UpdateAppCommand = async (
}),
...(input.basicAuthCredentials !== undefined && { basicAuthCredentials: input.basicAuthCredentials }),
...(input.buildSpec !== undefined && { buildSpec: input.buildSpec }),
...(input.customHeaders !== undefined && { customHeaders: input.customHeaders }),
...(input.customRules !== undefined && {
customRules: serializeAws_restJson1CustomRules(input.customRules, context),
}),
Expand Down Expand Up @@ -4891,6 +4893,8 @@ const deserializeAws_restJson1App = (output: any, context: __SerdeContext): App
output.createTime !== undefined && output.createTime !== null
? new Date(Math.round(output.createTime * 1000))
: undefined,
customHeaders:
output.customHeaders !== undefined && output.customHeaders !== null ? output.customHeaders : undefined,
customRules:
output.customRules !== undefined && output.customRules !== null
? deserializeAws_restJson1CustomRules(output.customRules, context)
Expand Down
Loading