Skip to content

Commit

Permalink
chore: codegen for fix uriencoding path (#894)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Feb 9, 2020
1 parent 1c996e1 commit c0f919b
Show file tree
Hide file tree
Showing 72 changed files with 2,348 additions and 9,053 deletions.
73 changes: 14 additions & 59 deletions clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts
Expand Up @@ -159,10 +159,7 @@ export async function serializeAws_restJson1_1CreateArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand Down Expand Up @@ -211,10 +208,7 @@ export async function serializeAws_restJson1_1DeleteAnalyzerCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand Down Expand Up @@ -249,10 +243,7 @@ export async function serializeAws_restJson1_1DeleteArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand All @@ -264,10 +255,7 @@ export async function serializeAws_restJson1_1DeleteArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{ruleName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: ruleName.");
Expand Down Expand Up @@ -326,10 +314,7 @@ export async function serializeAws_restJson1_1GetAnalyzerCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand Down Expand Up @@ -359,10 +344,7 @@ export async function serializeAws_restJson1_1GetArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand All @@ -374,10 +356,7 @@ export async function serializeAws_restJson1_1GetArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{ruleName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: ruleName.");
Expand All @@ -403,13 +382,7 @@ export async function serializeAws_restJson1_1GetFindingCommand(
if (labelValue.length <= 0) {
throw new Error("Empty value provided for input HTTP label: id.");
}
resolvedPath = resolvedPath.replace(
"{id}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
);
resolvedPath = resolvedPath.replace("{id}", encodeURIComponent(labelValue));
} else {
throw new Error("No value provided for input HTTP label: id.");
}
Expand Down Expand Up @@ -502,10 +475,7 @@ export async function serializeAws_restJson1_1ListArchiveRulesCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand Down Expand Up @@ -584,10 +554,7 @@ export async function serializeAws_restJson1_1ListTagsForResourceCommand(
}
resolvedPath = resolvedPath.replace(
"{resourceArn}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: resourceArn.");
Expand Down Expand Up @@ -643,10 +610,7 @@ export async function serializeAws_restJson1_1TagResourceCommand(
}
resolvedPath = resolvedPath.replace(
"{resourceArn}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: resourceArn.");
Expand Down Expand Up @@ -683,10 +647,7 @@ export async function serializeAws_restJson1_1UntagResourceCommand(
}
resolvedPath = resolvedPath.replace(
"{resourceArn}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: resourceArn.");
Expand Down Expand Up @@ -721,10 +682,7 @@ export async function serializeAws_restJson1_1UpdateArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{analyzerName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: analyzerName.");
Expand All @@ -736,10 +694,7 @@ export async function serializeAws_restJson1_1UpdateArchiveRuleCommand(
}
resolvedPath = resolvedPath.replace(
"{ruleName}",
labelValue
.split("/")
.map(segment => encodeURIComponent(segment))
.join("/")
encodeURIComponent(labelValue)
);
} else {
throw new Error("No value provided for input HTTP label: ruleName.");
Expand Down

0 comments on commit c0f919b

Please sign in to comment.