Skip to content

Commit d1d2003

Browse files
authored
chore: convert protocol functions to arrow functions (#1133)
1 parent 88a823e commit d1d2003

File tree

223 files changed

+65186
-65178
lines changed

Some content is hidden

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

223 files changed

+65186
-65178
lines changed

clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts

+162-162
Large diffs are not rendered by default.

clients/client-acm-pca/protocols/Aws_json1_1.ts

+180-180
Large diffs are not rendered by default.

clients/client-acm/protocols/Aws_json1_1.ts

+117-117
Large diffs are not rendered by default.

clients/client-alexa-for-business/protocols/Aws_json1_1.ts

+837-837
Large diffs are not rendered by default.

clients/client-amplify/protocols/Aws_restJson1_1.ts

+333-333
Large diffs are not rendered by default.

clients/client-api-gateway/protocols/Aws_restJson1_1.ts

+1,080-1,080
Large diffs are not rendered by default.

clients/client-apigatewaymanagementapi/protocols/Aws_restJson1_1.ts

+27-27
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ import {
3232
SerdeContext as __SerdeContext
3333
} from "@aws-sdk/types";
3434

35-
export async function serializeAws_restJson1_1DeleteConnectionCommand(
35+
export const serializeAws_restJson1_1DeleteConnectionCommand = async (
3636
input: DeleteConnectionCommandInput,
3737
context: __SerdeContext
38-
): Promise<__HttpRequest> {
38+
): Promise<__HttpRequest> => {
3939
const headers: any = {};
4040
headers["Content-Type"] = "";
4141
let resolvedPath = "/@connections/{ConnectionId}";
@@ -64,12 +64,12 @@ export async function serializeAws_restJson1_1DeleteConnectionCommand(
6464
path: resolvedPath,
6565
body
6666
});
67-
}
67+
};
6868

69-
export async function serializeAws_restJson1_1GetConnectionCommand(
69+
export const serializeAws_restJson1_1GetConnectionCommand = async (
7070
input: GetConnectionCommandInput,
7171
context: __SerdeContext
72-
): Promise<__HttpRequest> {
72+
): Promise<__HttpRequest> => {
7373
const headers: any = {};
7474
headers["Content-Type"] = "";
7575
let resolvedPath = "/@connections/{ConnectionId}";
@@ -98,12 +98,12 @@ export async function serializeAws_restJson1_1GetConnectionCommand(
9898
path: resolvedPath,
9999
body
100100
});
101-
}
101+
};
102102

103-
export async function serializeAws_restJson1_1PostToConnectionCommand(
103+
export const serializeAws_restJson1_1PostToConnectionCommand = async (
104104
input: PostToConnectionCommandInput,
105105
context: __SerdeContext
106-
): Promise<__HttpRequest> {
106+
): Promise<__HttpRequest> => {
107107
const headers: any = {};
108108
headers["Content-Type"] = "application/octet-stream";
109109
let resolvedPath = "/@connections/{ConnectionId}";
@@ -135,12 +135,12 @@ export async function serializeAws_restJson1_1PostToConnectionCommand(
135135
path: resolvedPath,
136136
body
137137
});
138-
}
138+
};
139139

140-
export async function deserializeAws_restJson1_1DeleteConnectionCommand(
140+
export const deserializeAws_restJson1_1DeleteConnectionCommand = async (
141141
output: __HttpResponse,
142142
context: __SerdeContext
143-
): Promise<DeleteConnectionCommandOutput> {
143+
): Promise<DeleteConnectionCommandOutput> => {
144144
if (output.statusCode !== 204 && output.statusCode >= 400) {
145145
return deserializeAws_restJson1_1DeleteConnectionCommandError(
146146
output,
@@ -152,12 +152,12 @@ export async function deserializeAws_restJson1_1DeleteConnectionCommand(
152152
};
153153
await collectBody(output.body, context);
154154
return Promise.resolve(contents);
155-
}
155+
};
156156

157-
async function deserializeAws_restJson1_1DeleteConnectionCommandError(
157+
const deserializeAws_restJson1_1DeleteConnectionCommandError = async (
158158
output: __HttpResponse,
159159
context: __SerdeContext
160-
): Promise<DeleteConnectionCommandOutput> {
160+
): Promise<DeleteConnectionCommandOutput> => {
161161
const parsedOutput: any = {
162162
...output,
163163
body: await parseBody(output.body, context)
@@ -214,12 +214,12 @@ async function deserializeAws_restJson1_1DeleteConnectionCommandError(
214214
response.message = message;
215215
delete response.Message;
216216
return Promise.reject(Object.assign(new Error(message), response));
217-
}
217+
};
218218

219-
export async function deserializeAws_restJson1_1GetConnectionCommand(
219+
export const deserializeAws_restJson1_1GetConnectionCommand = async (
220220
output: __HttpResponse,
221221
context: __SerdeContext
222-
): Promise<GetConnectionCommandOutput> {
222+
): Promise<GetConnectionCommandOutput> => {
223223
if (output.statusCode !== 200 && output.statusCode >= 400) {
224224
return deserializeAws_restJson1_1GetConnectionCommandError(output, context);
225225
}
@@ -244,12 +244,12 @@ export async function deserializeAws_restJson1_1GetConnectionCommand(
244244
contents.LastActiveAt = new Date(data.lastActiveAt);
245245
}
246246
return Promise.resolve(contents);
247-
}
247+
};
248248

249-
async function deserializeAws_restJson1_1GetConnectionCommandError(
249+
const deserializeAws_restJson1_1GetConnectionCommandError = async (
250250
output: __HttpResponse,
251251
context: __SerdeContext
252-
): Promise<GetConnectionCommandOutput> {
252+
): Promise<GetConnectionCommandOutput> => {
253253
const parsedOutput: any = {
254254
...output,
255255
body: await parseBody(output.body, context)
@@ -306,12 +306,12 @@ async function deserializeAws_restJson1_1GetConnectionCommandError(
306306
response.message = message;
307307
delete response.Message;
308308
return Promise.reject(Object.assign(new Error(message), response));
309-
}
309+
};
310310

311-
export async function deserializeAws_restJson1_1PostToConnectionCommand(
311+
export const deserializeAws_restJson1_1PostToConnectionCommand = async (
312312
output: __HttpResponse,
313313
context: __SerdeContext
314-
): Promise<PostToConnectionCommandOutput> {
314+
): Promise<PostToConnectionCommandOutput> => {
315315
if (output.statusCode !== 200 && output.statusCode >= 400) {
316316
return deserializeAws_restJson1_1PostToConnectionCommandError(
317317
output,
@@ -323,12 +323,12 @@ export async function deserializeAws_restJson1_1PostToConnectionCommand(
323323
};
324324
await collectBody(output.body, context);
325325
return Promise.resolve(contents);
326-
}
326+
};
327327

328-
async function deserializeAws_restJson1_1PostToConnectionCommandError(
328+
const deserializeAws_restJson1_1PostToConnectionCommandError = async (
329329
output: __HttpResponse,
330330
context: __SerdeContext
331-
): Promise<PostToConnectionCommandOutput> {
331+
): Promise<PostToConnectionCommandOutput> => {
332332
const parsedOutput: any = {
333333
...output,
334334
body: await parseBody(output.body, context)
@@ -396,7 +396,7 @@ async function deserializeAws_restJson1_1PostToConnectionCommandError(
396396
response.message = message;
397397
delete response.Message;
398398
return Promise.reject(Object.assign(new Error(message), response));
399-
}
399+
};
400400

401401
const deserializeAws_restJson1_1ForbiddenExceptionResponse = async (
402402
parsedOutput: any,

0 commit comments

Comments
 (0)