@@ -2339,11 +2339,7 @@ export const serializeAws_restJson1GetExportCommand = async (
2339
2339
throw new Error("No value provided for input HTTP label: exportType.");
2340
2340
}
2341
2341
const query: any = {
2342
- ...(input.parameters !== undefined &&
2343
- Object.entries(input.parameters || {}).reduce(
2344
- (acc: any, [key, value]: [string, string]) => ({ ...acc, [key]: value }),
2345
- {}
2346
- )),
2342
+ ...(input.parameters !== undefined && input.parameters),
2347
2343
};
2348
2344
let body: any;
2349
2345
const { hostname, protocol = "https", port } = await context.endpoint();
@@ -2974,11 +2970,7 @@ export const serializeAws_restJson1GetSdkCommand = async (
2974
2970
throw new Error("No value provided for input HTTP label: sdkType.");
2975
2971
}
2976
2972
const query: any = {
2977
- ...(input.parameters !== undefined &&
2978
- Object.entries(input.parameters || {}).reduce(
2979
- (acc: any, [key, value]: [string, string]) => ({ ...acc, [key]: value }),
2980
- {}
2981
- )),
2973
+ ...(input.parameters !== undefined && input.parameters),
2982
2974
};
2983
2975
let body: any;
2984
2976
const { hostname, protocol = "https", port } = await context.endpoint();
@@ -3438,11 +3430,7 @@ export const serializeAws_restJson1ImportRestApiCommand = async (
3438
3430
let resolvedPath = "/restapis";
3439
3431
const query: any = {
3440
3432
mode: "import",
3441
- ...(input.parameters !== undefined &&
3442
- Object.entries(input.parameters || {}).reduce(
3443
- (acc: any, [key, value]: [string, string]) => ({ ...acc, [key]: value }),
3444
- {}
3445
- )),
3433
+ ...(input.parameters !== undefined && input.parameters),
3446
3434
...(input.failOnWarnings !== undefined && { failonwarnings: input.failOnWarnings.toString() }),
3447
3435
};
3448
3436
let body: any;
@@ -3819,11 +3807,7 @@ export const serializeAws_restJson1PutRestApiCommand = async (
3819
3807
throw new Error("No value provided for input HTTP label: restApiId.");
3820
3808
}
3821
3809
const query: any = {
3822
- ...(input.parameters !== undefined &&
3823
- Object.entries(input.parameters || {}).reduce(
3824
- (acc: any, [key, value]: [string, string]) => ({ ...acc, [key]: value }),
3825
- {}
3826
- )),
3810
+ ...(input.parameters !== undefined && input.parameters),
3827
3811
...(input.mode !== undefined && { mode: input.mode }),
3828
3812
...(input.failOnWarnings !== undefined && { failonwarnings: input.failOnWarnings.toString() }),
3829
3813
};
0 commit comments