Skip to content

Commit 2d934c9

Browse files
authored
feat: update clients as of 11/13 (#1676)
1 parent 2f1975d commit 2d934c9

File tree

277 files changed

+102420
-55586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

277 files changed

+102420
-55586
lines changed

clients/client-amplify/models/models_0.ts

Lines changed: 510 additions & 491 deletions
Large diffs are not rendered by default.

clients/client-amplify/protocols/Aws_restJson1.ts

Lines changed: 71 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ export const serializeAws_restJson1CreateAppCommand = async (
122122
}),
123123
...(input.basicAuthCredentials !== undefined && { basicAuthCredentials: input.basicAuthCredentials }),
124124
...(input.buildSpec !== undefined && { buildSpec: input.buildSpec }),
125+
...(input.customHeaders !== undefined && { customHeaders: input.customHeaders }),
125126
...(input.customRules !== undefined && {
126127
customRules: serializeAws_restJson1CustomRules(input.customRules, context),
127128
}),
@@ -437,15 +438,6 @@ export const serializeAws_restJson1DeleteBranchCommand = async (
437438
"Content-Type": "",
438439
};
439440
let resolvedPath = "/apps/{appId}/branches/{branchName}";
440-
if (input.branchName !== undefined) {
441-
const labelValue: string = input.branchName;
442-
if (labelValue.length <= 0) {
443-
throw new Error("Empty value provided for input HTTP label: branchName.");
444-
}
445-
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
446-
} else {
447-
throw new Error("No value provided for input HTTP label: branchName.");
448-
}
449441
if (input.appId !== undefined) {
450442
const labelValue: string = input.appId;
451443
if (labelValue.length <= 0) {
@@ -455,6 +447,15 @@ export const serializeAws_restJson1DeleteBranchCommand = async (
455447
} else {
456448
throw new Error("No value provided for input HTTP label: appId.");
457449
}
450+
if (input.branchName !== undefined) {
451+
const labelValue: string = input.branchName;
452+
if (labelValue.length <= 0) {
453+
throw new Error("Empty value provided for input HTTP label: branchName.");
454+
}
455+
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
456+
} else {
457+
throw new Error("No value provided for input HTTP label: branchName.");
458+
}
458459
let body: any;
459460
const { hostname, protocol = "https", port } = await context.endpoint();
460461
return new __HttpRequest({
@@ -476,15 +477,6 @@ export const serializeAws_restJson1DeleteDomainAssociationCommand = async (
476477
"Content-Type": "",
477478
};
478479
let resolvedPath = "/apps/{appId}/domains/{domainName}";
479-
if (input.domainName !== undefined) {
480-
const labelValue: string = input.domainName;
481-
if (labelValue.length <= 0) {
482-
throw new Error("Empty value provided for input HTTP label: domainName.");
483-
}
484-
resolvedPath = resolvedPath.replace("{domainName}", __extendedEncodeURIComponent(labelValue));
485-
} else {
486-
throw new Error("No value provided for input HTTP label: domainName.");
487-
}
488480
if (input.appId !== undefined) {
489481
const labelValue: string = input.appId;
490482
if (labelValue.length <= 0) {
@@ -494,6 +486,15 @@ export const serializeAws_restJson1DeleteDomainAssociationCommand = async (
494486
} else {
495487
throw new Error("No value provided for input HTTP label: appId.");
496488
}
489+
if (input.domainName !== undefined) {
490+
const labelValue: string = input.domainName;
491+
if (labelValue.length <= 0) {
492+
throw new Error("Empty value provided for input HTTP label: domainName.");
493+
}
494+
resolvedPath = resolvedPath.replace("{domainName}", __extendedEncodeURIComponent(labelValue));
495+
} else {
496+
throw new Error("No value provided for input HTTP label: domainName.");
497+
}
497498
let body: any;
498499
const { hostname, protocol = "https", port } = await context.endpoint();
499500
return new __HttpRequest({
@@ -515,15 +516,6 @@ export const serializeAws_restJson1DeleteJobCommand = async (
515516
"Content-Type": "",
516517
};
517518
let resolvedPath = "/apps/{appId}/branches/{branchName}/jobs/{jobId}";
518-
if (input.branchName !== undefined) {
519-
const labelValue: string = input.branchName;
520-
if (labelValue.length <= 0) {
521-
throw new Error("Empty value provided for input HTTP label: branchName.");
522-
}
523-
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
524-
} else {
525-
throw new Error("No value provided for input HTTP label: branchName.");
526-
}
527519
if (input.appId !== undefined) {
528520
const labelValue: string = input.appId;
529521
if (labelValue.length <= 0) {
@@ -533,6 +525,15 @@ export const serializeAws_restJson1DeleteJobCommand = async (
533525
} else {
534526
throw new Error("No value provided for input HTTP label: appId.");
535527
}
528+
if (input.branchName !== undefined) {
529+
const labelValue: string = input.branchName;
530+
if (labelValue.length <= 0) {
531+
throw new Error("Empty value provided for input HTTP label: branchName.");
532+
}
533+
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
534+
} else {
535+
throw new Error("No value provided for input HTTP label: branchName.");
536+
}
536537
if (input.jobId !== undefined) {
537538
const labelValue: string = input.jobId;
538539
if (labelValue.length <= 0) {
@@ -688,15 +689,6 @@ export const serializeAws_restJson1GetBackendEnvironmentCommand = async (
688689
"Content-Type": "",
689690
};
690691
let resolvedPath = "/apps/{appId}/backendenvironments/{environmentName}";
691-
if (input.environmentName !== undefined) {
692-
const labelValue: string = input.environmentName;
693-
if (labelValue.length <= 0) {
694-
throw new Error("Empty value provided for input HTTP label: environmentName.");
695-
}
696-
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
697-
} else {
698-
throw new Error("No value provided for input HTTP label: environmentName.");
699-
}
700692
if (input.appId !== undefined) {
701693
const labelValue: string = input.appId;
702694
if (labelValue.length <= 0) {
@@ -706,6 +698,15 @@ export const serializeAws_restJson1GetBackendEnvironmentCommand = async (
706698
} else {
707699
throw new Error("No value provided for input HTTP label: appId.");
708700
}
701+
if (input.environmentName !== undefined) {
702+
const labelValue: string = input.environmentName;
703+
if (labelValue.length <= 0) {
704+
throw new Error("Empty value provided for input HTTP label: environmentName.");
705+
}
706+
resolvedPath = resolvedPath.replace("{environmentName}", __extendedEncodeURIComponent(labelValue));
707+
} else {
708+
throw new Error("No value provided for input HTTP label: environmentName.");
709+
}
709710
let body: any;
710711
const { hostname, protocol = "https", port } = await context.endpoint();
711712
return new __HttpRequest({
@@ -884,8 +885,8 @@ export const serializeAws_restJson1ListAppsCommand = async (
884885
};
885886
let resolvedPath = "/apps";
886887
const query: any = {
887-
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
888888
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
889+
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
889890
};
890891
let body: any;
891892
const { hostname, protocol = "https", port } = await context.endpoint();
@@ -909,6 +910,15 @@ export const serializeAws_restJson1ListArtifactsCommand = async (
909910
"Content-Type": "",
910911
};
911912
let resolvedPath = "/apps/{appId}/branches/{branchName}/jobs/{jobId}/artifacts";
913+
if (input.appId !== undefined) {
914+
const labelValue: string = input.appId;
915+
if (labelValue.length <= 0) {
916+
throw new Error("Empty value provided for input HTTP label: appId.");
917+
}
918+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
919+
} else {
920+
throw new Error("No value provided for input HTTP label: appId.");
921+
}
912922
if (input.branchName !== undefined) {
913923
const labelValue: string = input.branchName;
914924
if (labelValue.length <= 0) {
@@ -927,15 +937,6 @@ export const serializeAws_restJson1ListArtifactsCommand = async (
927937
} else {
928938
throw new Error("No value provided for input HTTP label: jobId.");
929939
}
930-
if (input.appId !== undefined) {
931-
const labelValue: string = input.appId;
932-
if (labelValue.length <= 0) {
933-
throw new Error("Empty value provided for input HTTP label: appId.");
934-
}
935-
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
936-
} else {
937-
throw new Error("No value provided for input HTTP label: appId.");
938-
}
939940
const query: any = {
940941
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
941942
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
@@ -972,9 +973,9 @@ export const serializeAws_restJson1ListBackendEnvironmentsCommand = async (
972973
throw new Error("No value provided for input HTTP label: appId.");
973974
}
974975
const query: any = {
976+
...(input.environmentName !== undefined && { environmentName: input.environmentName }),
975977
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
976978
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
977-
...(input.environmentName !== undefined && { environmentName: input.environmentName }),
978979
};
979980
let body: any;
980981
const { hostname, protocol = "https", port } = await context.endpoint();
@@ -1043,8 +1044,8 @@ export const serializeAws_restJson1ListDomainAssociationsCommand = async (
10431044
throw new Error("No value provided for input HTTP label: appId.");
10441045
}
10451046
const query: any = {
1046-
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
10471047
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
1048+
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
10481049
};
10491050
let body: any;
10501051
const { hostname, protocol = "https", port } = await context.endpoint();
@@ -1152,8 +1153,8 @@ export const serializeAws_restJson1ListWebhooksCommand = async (
11521153
throw new Error("No value provided for input HTTP label: appId.");
11531154
}
11541155
const query: any = {
1155-
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
11561156
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
1157+
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
11571158
};
11581159
let body: any;
11591160
const { hostname, protocol = "https", port } = await context.endpoint();
@@ -1177,15 +1178,6 @@ export const serializeAws_restJson1StartDeploymentCommand = async (
11771178
"Content-Type": "application/json",
11781179
};
11791180
let resolvedPath = "/apps/{appId}/branches/{branchName}/deployments/start";
1180-
if (input.branchName !== undefined) {
1181-
const labelValue: string = input.branchName;
1182-
if (labelValue.length <= 0) {
1183-
throw new Error("Empty value provided for input HTTP label: branchName.");
1184-
}
1185-
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
1186-
} else {
1187-
throw new Error("No value provided for input HTTP label: branchName.");
1188-
}
11891181
if (input.appId !== undefined) {
11901182
const labelValue: string = input.appId;
11911183
if (labelValue.length <= 0) {
@@ -1195,6 +1187,15 @@ export const serializeAws_restJson1StartDeploymentCommand = async (
11951187
} else {
11961188
throw new Error("No value provided for input HTTP label: appId.");
11971189
}
1190+
if (input.branchName !== undefined) {
1191+
const labelValue: string = input.branchName;
1192+
if (labelValue.length <= 0) {
1193+
throw new Error("Empty value provided for input HTTP label: branchName.");
1194+
}
1195+
resolvedPath = resolvedPath.replace("{branchName}", __extendedEncodeURIComponent(labelValue));
1196+
} else {
1197+
throw new Error("No value provided for input HTTP label: branchName.");
1198+
}
11981199
let body: any;
11991200
body = JSON.stringify({
12001201
...(input.jobId !== undefined && { jobId: input.jobId }),
@@ -1267,6 +1268,15 @@ export const serializeAws_restJson1StopJobCommand = async (
12671268
"Content-Type": "",
12681269
};
12691270
let resolvedPath = "/apps/{appId}/branches/{branchName}/jobs/{jobId}/stop";
1271+
if (input.appId !== undefined) {
1272+
const labelValue: string = input.appId;
1273+
if (labelValue.length <= 0) {
1274+
throw new Error("Empty value provided for input HTTP label: appId.");
1275+
}
1276+
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
1277+
} else {
1278+
throw new Error("No value provided for input HTTP label: appId.");
1279+
}
12701280
if (input.branchName !== undefined) {
12711281
const labelValue: string = input.branchName;
12721282
if (labelValue.length <= 0) {
@@ -1285,15 +1295,6 @@ export const serializeAws_restJson1StopJobCommand = async (
12851295
} else {
12861296
throw new Error("No value provided for input HTTP label: jobId.");
12871297
}
1288-
if (input.appId !== undefined) {
1289-
const labelValue: string = input.appId;
1290-
if (labelValue.length <= 0) {
1291-
throw new Error("Empty value provided for input HTTP label: appId.");
1292-
}
1293-
resolvedPath = resolvedPath.replace("{appId}", __extendedEncodeURIComponent(labelValue));
1294-
} else {
1295-
throw new Error("No value provided for input HTTP label: appId.");
1296-
}
12971298
let body: any;
12981299
const { hostname, protocol = "https", port } = await context.endpoint();
12991300
return new __HttpRequest({
@@ -1405,6 +1406,7 @@ export const serializeAws_restJson1UpdateAppCommand = async (
14051406
}),
14061407
...(input.basicAuthCredentials !== undefined && { basicAuthCredentials: input.basicAuthCredentials }),
14071408
...(input.buildSpec !== undefined && { buildSpec: input.buildSpec }),
1409+
...(input.customHeaders !== undefined && { customHeaders: input.customHeaders }),
14081410
...(input.customRules !== undefined && {
14091411
customRules: serializeAws_restJson1CustomRules(input.customRules, context),
14101412
}),
@@ -4891,6 +4893,8 @@ const deserializeAws_restJson1App = (output: any, context: __SerdeContext): App
48914893
output.createTime !== undefined && output.createTime !== null
48924894
? new Date(Math.round(output.createTime * 1000))
48934895
: undefined,
4896+
customHeaders:
4897+
output.customHeaders !== undefined && output.customHeaders !== null ? output.customHeaders : undefined,
48944898
customRules:
48954899
output.customRules !== undefined && output.customRules !== null
48964900
? deserializeAws_restJson1CustomRules(output.customRules, context)

0 commit comments

Comments
 (0)