Skip to content

Commit 8ee8c95

Browse files
chore: update generated code (#2543)
1 parent ed301ba commit 8ee8c95

File tree

140 files changed

+11686
-8130
lines changed

Some content is hidden

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

140 files changed

+11686
-8130
lines changed

clients/client-accessanalyzer/protocols/Aws_restJson1.ts

Lines changed: 68 additions & 56 deletions
Large diffs are not rendered by default.

clients/client-amp/protocols/Aws_restJson1.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ export const serializeAws_restJson1CreateWorkspaceCommand = async (
3737
input: CreateWorkspaceCommandInput,
3838
context: __SerdeContext
3939
): Promise<__HttpRequest> => {
40+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
4041
const headers: any = {
4142
"content-type": "application/json",
4243
};
43-
let resolvedPath = "/workspaces";
44+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
4445
let body: any;
4546
body = JSON.stringify({
4647
...(input.alias !== undefined && input.alias !== null && { alias: input.alias }),
4748
clientToken: input.clientToken ?? generateIdempotencyToken(),
4849
});
49-
const { hostname, protocol = "https", port } = await context.endpoint();
5050
return new __HttpRequest({
5151
protocol,
5252
hostname,
@@ -62,8 +62,10 @@ export const serializeAws_restJson1DeleteWorkspaceCommand = async (
6262
input: DeleteWorkspaceCommandInput,
6363
context: __SerdeContext
6464
): Promise<__HttpRequest> => {
65+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6566
const headers: any = {};
66-
let resolvedPath = "/workspaces/{workspaceId}";
67+
let resolvedPath =
68+
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
6769
if (input.workspaceId !== undefined) {
6870
const labelValue: string = input.workspaceId;
6971
if (labelValue.length <= 0) {
@@ -77,7 +79,6 @@ export const serializeAws_restJson1DeleteWorkspaceCommand = async (
7779
...(input.clientToken !== undefined && { clientToken: input.clientToken }),
7880
};
7981
let body: any;
80-
const { hostname, protocol = "https", port } = await context.endpoint();
8182
return new __HttpRequest({
8283
protocol,
8384
hostname,
@@ -94,8 +95,10 @@ export const serializeAws_restJson1DescribeWorkspaceCommand = async (
9495
input: DescribeWorkspaceCommandInput,
9596
context: __SerdeContext
9697
): Promise<__HttpRequest> => {
98+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9799
const headers: any = {};
98-
let resolvedPath = "/workspaces/{workspaceId}";
100+
let resolvedPath =
101+
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
99102
if (input.workspaceId !== undefined) {
100103
const labelValue: string = input.workspaceId;
101104
if (labelValue.length <= 0) {
@@ -106,7 +109,6 @@ export const serializeAws_restJson1DescribeWorkspaceCommand = async (
106109
throw new Error("No value provided for input HTTP label: workspaceId.");
107110
}
108111
let body: any;
109-
const { hostname, protocol = "https", port } = await context.endpoint();
110112
return new __HttpRequest({
111113
protocol,
112114
hostname,
@@ -122,15 +124,15 @@ export const serializeAws_restJson1ListWorkspacesCommand = async (
122124
input: ListWorkspacesCommandInput,
123125
context: __SerdeContext
124126
): Promise<__HttpRequest> => {
127+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125128
const headers: any = {};
126-
let resolvedPath = "/workspaces";
129+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
127130
const query: any = {
128131
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
129132
...(input.alias !== undefined && { alias: input.alias }),
130133
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
131134
};
132135
let body: any;
133-
const { hostname, protocol = "https", port } = await context.endpoint();
134136
return new __HttpRequest({
135137
protocol,
136138
hostname,
@@ -147,10 +149,12 @@ export const serializeAws_restJson1UpdateWorkspaceAliasCommand = async (
147149
input: UpdateWorkspaceAliasCommandInput,
148150
context: __SerdeContext
149151
): Promise<__HttpRequest> => {
152+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
150153
const headers: any = {
151154
"content-type": "application/json",
152155
};
153-
let resolvedPath = "/workspaces/{workspaceId}/alias";
156+
let resolvedPath =
157+
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/alias";
154158
if (input.workspaceId !== undefined) {
155159
const labelValue: string = input.workspaceId;
156160
if (labelValue.length <= 0) {
@@ -165,7 +169,6 @@ export const serializeAws_restJson1UpdateWorkspaceAliasCommand = async (
165169
...(input.alias !== undefined && input.alias !== null && { alias: input.alias }),
166170
clientToken: input.clientToken ?? generateIdempotencyToken(),
167171
});
168-
const { hostname, protocol = "https", port } = await context.endpoint();
169172
return new __HttpRequest({
170173
protocol,
171174
hostname,

0 commit comments

Comments
 (0)