Skip to content

Commit

Permalink
feat: codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Apr 24, 2020
1 parent 62c9392 commit 05b7aec
Show file tree
Hide file tree
Showing 218 changed files with 16,336 additions and 11,208 deletions.
194 changes: 115 additions & 79 deletions clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,15 @@ export async function serializeAws_restJson1_1CreateAnalyzerCommand(
bodyParams["type"] = input.type;
}
body = JSON.stringify(bodyParams);
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "PUT",
headers: headers,
headers,
path: resolvedPath,
body: body,
...context.endpoint
body
});
}

Expand Down Expand Up @@ -185,13 +187,15 @@ export async function serializeAws_restJson1_1CreateArchiveRuleCommand(
bodyParams["ruleName"] = input.ruleName;
}
body = JSON.stringify(bodyParams);
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "PUT",
headers: headers,
headers,
path: resolvedPath,
body: body,
...context.endpoint
body
});
}

Expand Down Expand Up @@ -221,14 +225,16 @@ export async function serializeAws_restJson1_1DeleteAnalyzerCommand(
query["clientToken"] = input.clientToken;
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "DELETE",
headers: headers,
headers,
path: resolvedPath,
query: query,
body: body,
...context.endpoint
query,
body
});
}

Expand Down Expand Up @@ -270,14 +276,16 @@ export async function serializeAws_restJson1_1DeleteArchiveRuleCommand(
query["clientToken"] = input.clientToken;
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "DELETE",
headers: headers,
headers,
path: resolvedPath,
query: query,
body: body,
...context.endpoint
query,
body
});
}

Expand All @@ -296,14 +304,16 @@ export async function serializeAws_restJson1_1GetAnalyzedResourceCommand(
query["resourceArn"] = input.resourceArn;
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "GET",
headers: headers,
headers,
path: resolvedPath,
query: query,
body: body,
...context.endpoint
query,
body
});
}

Expand All @@ -329,13 +339,15 @@ export async function serializeAws_restJson1_1GetAnalyzerCommand(
throw new Error("No value provided for input HTTP label: analyzerName.");
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "GET",
headers: headers,
headers,
path: resolvedPath,
body: body,
...context.endpoint
body
});
}

Expand Down Expand Up @@ -373,13 +385,15 @@ export async function serializeAws_restJson1_1GetArchiveRuleCommand(
throw new Error("No value provided for input HTTP label: ruleName.");
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "GET",
headers: headers,
headers,
path: resolvedPath,
body: body,
...context.endpoint
body
});
}

Expand Down Expand Up @@ -407,14 +421,16 @@ export async function serializeAws_restJson1_1GetFindingCommand(
query["analyzerArn"] = input.analyzerArn;
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "GET",
headers: headers,
headers,
path: resolvedPath,
query: query,
body: body,
...context.endpoint
query,
body
});
}

Expand All @@ -440,13 +456,15 @@ export async function serializeAws_restJson1_1ListAnalyzedResourcesCommand(
bodyParams["resourceType"] = input.resourceType;
}
body = JSON.stringify(bodyParams);
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "POST",
headers: headers,
headers,
path: resolvedPath,
body: body,
...context.endpoint
body
});
}

Expand All @@ -468,14 +486,16 @@ export async function serializeAws_restJson1_1ListAnalyzersCommand(
query["type"] = input.type;
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "GET",
headers: headers,
headers,
path: resolvedPath,
query: query,
body: body,
...context.endpoint
query,
body
});
}

Expand Down Expand Up @@ -508,14 +528,16 @@ export async function serializeAws_restJson1_1ListArchiveRulesCommand(
query["nextToken"] = input.nextToken;
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "GET",
headers: headers,
headers,
path: resolvedPath,
query: query,
body: body,
...context.endpoint
query,
body
});
}

Expand Down Expand Up @@ -550,13 +572,15 @@ export async function serializeAws_restJson1_1ListFindingsCommand(
);
}
body = JSON.stringify(bodyParams);
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "POST",
headers: headers,
headers,
path: resolvedPath,
body: body,
...context.endpoint
body
});
}

Expand All @@ -582,13 +606,15 @@ export async function serializeAws_restJson1_1ListTagsForResourceCommand(
throw new Error("No value provided for input HTTP label: resourceArn.");
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "GET",
headers: headers,
headers,
path: resolvedPath,
body: body,
...context.endpoint
body
});
}

Expand All @@ -608,13 +634,15 @@ export async function serializeAws_restJson1_1StartResourceScanCommand(
bodyParams["resourceArn"] = input.resourceArn;
}
body = JSON.stringify(bodyParams);
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "POST",
headers: headers,
headers,
path: resolvedPath,
body: body,
...context.endpoint
body
});
}

Expand Down Expand Up @@ -645,13 +673,15 @@ export async function serializeAws_restJson1_1TagResourceCommand(
bodyParams["tags"] = serializeAws_restJson1_1TagsMap(input.tags, context);
}
body = JSON.stringify(bodyParams);
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "POST",
headers: headers,
headers,
path: resolvedPath,
body: body,
...context.endpoint
body
});
}

Expand Down Expand Up @@ -681,14 +711,16 @@ export async function serializeAws_restJson1_1UntagResourceCommand(
query["tagKeys"] = (input.tagKeys || []).map(_entry => _entry);
}
let body: any;
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "DELETE",
headers: headers,
headers,
path: resolvedPath,
query: query,
body: body,
...context.endpoint
query,
body
});
}

Expand Down Expand Up @@ -740,13 +772,15 @@ export async function serializeAws_restJson1_1UpdateArchiveRuleCommand(
);
}
body = JSON.stringify(bodyParams);
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "PUT",
headers: headers,
headers,
path: resolvedPath,
body: body,
...context.endpoint
body
});
}

Expand Down Expand Up @@ -781,13 +815,15 @@ export async function serializeAws_restJson1_1UpdateFindingsCommand(
bodyParams["status"] = input.status;
}
body = JSON.stringify(bodyParams);
const { hostname, protocol = "https", port } = await context.endpoint();
return new __HttpRequest({
protocol: "https",
protocol,
hostname,
port,
method: "PUT",
headers: headers,
headers,
path: resolvedPath,
body: body,
...context.endpoint
body
});
}

Expand Down
Loading

0 comments on commit 05b7aec

Please sign in to comment.