Skip to content

Commit e9b6da8

Browse files
authored
feat(clients): use schema-serde in AWS Query & EC2 Query clients (#7489)
* feat(clients): use schema-serde in AWS Query & EC2 Query clients * chore: codegen
1 parent e0c0a7c commit e9b6da8

File tree

1,949 files changed

+138932
-282283
lines changed

Some content is hidden

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

1,949 files changed

+138932
-282283
lines changed

clients/client-auto-scaling/src/AutoScalingClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
getHttpAuthSchemeEndpointRuleSetPlugin,
2020
getHttpSigningPlugin,
2121
} from "@smithy/core";
22+
import { getSchemaSerdePlugin } from "@smithy/core/schema";
2223
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
2324
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint";
2425
import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
@@ -34,11 +35,14 @@ import {
3435
BodyLengthCalculator as __BodyLengthCalculator,
3536
CheckOptionalClientConfig as __CheckOptionalClientConfig,
3637
ChecksumConstructor as __ChecksumConstructor,
38+
ClientProtocol,
3739
Decoder as __Decoder,
3840
Encoder as __Encoder,
3941
EndpointV2 as __EndpointV2,
4042
HashConstructor as __HashConstructor,
4143
HttpHandlerOptions as __HttpHandlerOptions,
44+
HttpRequest,
45+
HttpResponse,
4246
Logger as __Logger,
4347
Provider as __Provider,
4448
Provider,
@@ -552,6 +556,16 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
552556
*/
553557
extensions?: RuntimeExtension[];
554558

559+
/**
560+
* The protocol controlling the message type (e.g. HTTP) and format (e.g. JSON)
561+
* may be overridden. A default will always be set by the client.
562+
* Available options depend on the service's supported protocols and will not be validated by
563+
* the client.
564+
* @alpha
565+
*
566+
*/
567+
protocol?: ClientProtocol<HttpRequest, HttpResponse>;
568+
555569
/**
556570
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
557571
*/
@@ -630,6 +644,7 @@ export class AutoScalingClient extends __Client<
630644
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
631645
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
632646
this.config = _config_8;
647+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
633648
this.middlewareStack.use(getUserAgentPlugin(this.config));
634649
this.middlewareStack.use(getRetryPlugin(this.config));
635650
this.middlewareStack.use(getContentLengthPlugin(this.config));

clients/client-auto-scaling/src/commands/AttachInstancesCommand.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3-
import { getSerdePlugin } from "@smithy/middleware-serde";
43
import { Command as $Command } from "@smithy/smithy-client";
54
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
65

76
import { AutoScalingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AutoScalingClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { AttachInstancesQuery } from "../models/models_0";
10-
import { de_AttachInstancesCommand, se_AttachInstancesCommand } from "../protocols/Aws_query";
9+
import { AttachInstances } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -103,16 +102,11 @@ export class AttachInstancesCommand extends $Command
103102
>()
104103
.ep(commonParams)
105104
.m(function (this: any, Command: any, cs: any, config: AutoScalingClientResolvedConfig, o: any) {
106-
return [
107-
getSerdePlugin(config, this.serialize, this.deserialize),
108-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
109-
];
105+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
110106
})
111107
.s("AutoScaling_2011_01_01", "AttachInstances", {})
112108
.n("AutoScalingClient", "AttachInstancesCommand")
113-
.f(void 0, void 0)
114-
.ser(se_AttachInstancesCommand)
115-
.de(de_AttachInstancesCommand)
109+
.sc(AttachInstances)
116110
.build() {
117111
/** @internal type navigation helper, not in runtime. */
118112
protected declare static __types: {

clients/client-auto-scaling/src/commands/AttachLoadBalancerTargetGroupsCommand.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3-
import { getSerdePlugin } from "@smithy/middleware-serde";
43
import { Command as $Command } from "@smithy/smithy-client";
54
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
65

76
import { AutoScalingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AutoScalingClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { AttachLoadBalancerTargetGroupsResultType, AttachLoadBalancerTargetGroupsType } from "../models/models_0";
10-
import {
11-
de_AttachLoadBalancerTargetGroupsCommand,
12-
se_AttachLoadBalancerTargetGroupsCommand,
13-
} from "../protocols/Aws_query";
9+
import { AttachLoadBalancerTargetGroups } from "../schemas/schemas_0";
1410

1511
/**
1612
* @public
@@ -129,16 +125,11 @@ export class AttachLoadBalancerTargetGroupsCommand extends $Command
129125
>()
130126
.ep(commonParams)
131127
.m(function (this: any, Command: any, cs: any, config: AutoScalingClientResolvedConfig, o: any) {
132-
return [
133-
getSerdePlugin(config, this.serialize, this.deserialize),
134-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
135-
];
128+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
136129
})
137130
.s("AutoScaling_2011_01_01", "AttachLoadBalancerTargetGroups", {})
138131
.n("AutoScalingClient", "AttachLoadBalancerTargetGroupsCommand")
139-
.f(void 0, void 0)
140-
.ser(se_AttachLoadBalancerTargetGroupsCommand)
141-
.de(de_AttachLoadBalancerTargetGroupsCommand)
132+
.sc(AttachLoadBalancerTargetGroups)
142133
.build() {
143134
/** @internal type navigation helper, not in runtime. */
144135
protected declare static __types: {

clients/client-auto-scaling/src/commands/AttachLoadBalancersCommand.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3-
import { getSerdePlugin } from "@smithy/middleware-serde";
43
import { Command as $Command } from "@smithy/smithy-client";
54
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
65

76
import { AutoScalingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AutoScalingClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { AttachLoadBalancersResultType, AttachLoadBalancersType } from "../models/models_0";
10-
import { de_AttachLoadBalancersCommand, se_AttachLoadBalancersCommand } from "../protocols/Aws_query";
9+
import { AttachLoadBalancers } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -111,16 +110,11 @@ export class AttachLoadBalancersCommand extends $Command
111110
>()
112111
.ep(commonParams)
113112
.m(function (this: any, Command: any, cs: any, config: AutoScalingClientResolvedConfig, o: any) {
114-
return [
115-
getSerdePlugin(config, this.serialize, this.deserialize),
116-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
117-
];
113+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
118114
})
119115
.s("AutoScaling_2011_01_01", "AttachLoadBalancers", {})
120116
.n("AutoScalingClient", "AttachLoadBalancersCommand")
121-
.f(void 0, void 0)
122-
.ser(se_AttachLoadBalancersCommand)
123-
.de(de_AttachLoadBalancersCommand)
117+
.sc(AttachLoadBalancers)
124118
.build() {
125119
/** @internal type navigation helper, not in runtime. */
126120
protected declare static __types: {

clients/client-auto-scaling/src/commands/AttachTrafficSourcesCommand.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3-
import { getSerdePlugin } from "@smithy/middleware-serde";
43
import { Command as $Command } from "@smithy/smithy-client";
54
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
65

76
import { AutoScalingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AutoScalingClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { AttachTrafficSourcesResultType, AttachTrafficSourcesType } from "../models/models_0";
10-
import { de_AttachTrafficSourcesCommand, se_AttachTrafficSourcesCommand } from "../protocols/Aws_query";
9+
import { AttachTrafficSources } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -124,16 +123,11 @@ export class AttachTrafficSourcesCommand extends $Command
124123
>()
125124
.ep(commonParams)
126125
.m(function (this: any, Command: any, cs: any, config: AutoScalingClientResolvedConfig, o: any) {
127-
return [
128-
getSerdePlugin(config, this.serialize, this.deserialize),
129-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
130-
];
126+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
131127
})
132128
.s("AutoScaling_2011_01_01", "AttachTrafficSources", {})
133129
.n("AutoScalingClient", "AttachTrafficSourcesCommand")
134-
.f(void 0, void 0)
135-
.ser(se_AttachTrafficSourcesCommand)
136-
.de(de_AttachTrafficSourcesCommand)
130+
.sc(AttachTrafficSources)
137131
.build() {
138132
/** @internal type navigation helper, not in runtime. */
139133
protected declare static __types: {

clients/client-auto-scaling/src/commands/BatchDeleteScheduledActionCommand.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3-
import { getSerdePlugin } from "@smithy/middleware-serde";
43
import { Command as $Command } from "@smithy/smithy-client";
54
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
65

76
import { AutoScalingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AutoScalingClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { BatchDeleteScheduledActionAnswer, BatchDeleteScheduledActionType } from "../models/models_0";
10-
import { de_BatchDeleteScheduledActionCommand, se_BatchDeleteScheduledActionCommand } from "../protocols/Aws_query";
9+
import { BatchDeleteScheduledAction } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -83,16 +82,11 @@ export class BatchDeleteScheduledActionCommand extends $Command
8382
>()
8483
.ep(commonParams)
8584
.m(function (this: any, Command: any, cs: any, config: AutoScalingClientResolvedConfig, o: any) {
86-
return [
87-
getSerdePlugin(config, this.serialize, this.deserialize),
88-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
89-
];
85+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
9086
})
9187
.s("AutoScaling_2011_01_01", "BatchDeleteScheduledAction", {})
9288
.n("AutoScalingClient", "BatchDeleteScheduledActionCommand")
93-
.f(void 0, void 0)
94-
.ser(se_BatchDeleteScheduledActionCommand)
95-
.de(de_BatchDeleteScheduledActionCommand)
89+
.sc(BatchDeleteScheduledAction)
9690
.build() {
9791
/** @internal type navigation helper, not in runtime. */
9892
protected declare static __types: {

clients/client-auto-scaling/src/commands/BatchPutScheduledUpdateGroupActionCommand.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3-
import { getSerdePlugin } from "@smithy/middleware-serde";
43
import { Command as $Command } from "@smithy/smithy-client";
54
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
65

76
import { AutoScalingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AutoScalingClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { BatchPutScheduledUpdateGroupActionAnswer, BatchPutScheduledUpdateGroupActionType } from "../models/models_0";
10-
import {
11-
de_BatchPutScheduledUpdateGroupActionCommand,
12-
se_BatchPutScheduledUpdateGroupActionCommand,
13-
} from "../protocols/Aws_query";
9+
import { BatchPutScheduledUpdateGroupAction } from "../schemas/schemas_0";
1410

1511
/**
1612
* @public
@@ -106,16 +102,11 @@ export class BatchPutScheduledUpdateGroupActionCommand extends $Command
106102
>()
107103
.ep(commonParams)
108104
.m(function (this: any, Command: any, cs: any, config: AutoScalingClientResolvedConfig, o: any) {
109-
return [
110-
getSerdePlugin(config, this.serialize, this.deserialize),
111-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
112-
];
105+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
113106
})
114107
.s("AutoScaling_2011_01_01", "BatchPutScheduledUpdateGroupAction", {})
115108
.n("AutoScalingClient", "BatchPutScheduledUpdateGroupActionCommand")
116-
.f(void 0, void 0)
117-
.ser(se_BatchPutScheduledUpdateGroupActionCommand)
118-
.de(de_BatchPutScheduledUpdateGroupActionCommand)
109+
.sc(BatchPutScheduledUpdateGroupAction)
119110
.build() {
120111
/** @internal type navigation helper, not in runtime. */
121112
protected declare static __types: {

clients/client-auto-scaling/src/commands/CancelInstanceRefreshCommand.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3-
import { getSerdePlugin } from "@smithy/middleware-serde";
43
import { Command as $Command } from "@smithy/smithy-client";
54
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
65

76
import { AutoScalingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AutoScalingClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { CancelInstanceRefreshAnswer, CancelInstanceRefreshType } from "../models/models_0";
10-
import { de_CancelInstanceRefreshCommand, se_CancelInstanceRefreshCommand } from "../protocols/Aws_query";
9+
import { CancelInstanceRefresh } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -107,16 +106,11 @@ export class CancelInstanceRefreshCommand extends $Command
107106
>()
108107
.ep(commonParams)
109108
.m(function (this: any, Command: any, cs: any, config: AutoScalingClientResolvedConfig, o: any) {
110-
return [
111-
getSerdePlugin(config, this.serialize, this.deserialize),
112-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
113-
];
109+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
114110
})
115111
.s("AutoScaling_2011_01_01", "CancelInstanceRefresh", {})
116112
.n("AutoScalingClient", "CancelInstanceRefreshCommand")
117-
.f(void 0, void 0)
118-
.ser(se_CancelInstanceRefreshCommand)
119-
.de(de_CancelInstanceRefreshCommand)
113+
.sc(CancelInstanceRefresh)
120114
.build() {
121115
/** @internal type navigation helper, not in runtime. */
122116
protected declare static __types: {

clients/client-auto-scaling/src/commands/CompleteLifecycleActionCommand.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3-
import { getSerdePlugin } from "@smithy/middleware-serde";
43
import { Command as $Command } from "@smithy/smithy-client";
54
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
65

76
import { AutoScalingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AutoScalingClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { CompleteLifecycleActionAnswer, CompleteLifecycleActionType } from "../models/models_0";
10-
import { de_CompleteLifecycleActionCommand, se_CompleteLifecycleActionCommand } from "../protocols/Aws_query";
9+
import { CompleteLifecycleAction } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -129,16 +128,11 @@ export class CompleteLifecycleActionCommand extends $Command
129128
>()
130129
.ep(commonParams)
131130
.m(function (this: any, Command: any, cs: any, config: AutoScalingClientResolvedConfig, o: any) {
132-
return [
133-
getSerdePlugin(config, this.serialize, this.deserialize),
134-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
135-
];
131+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
136132
})
137133
.s("AutoScaling_2011_01_01", "CompleteLifecycleAction", {})
138134
.n("AutoScalingClient", "CompleteLifecycleActionCommand")
139-
.f(void 0, void 0)
140-
.ser(se_CompleteLifecycleActionCommand)
141-
.de(de_CompleteLifecycleActionCommand)
135+
.sc(CompleteLifecycleAction)
142136
.build() {
143137
/** @internal type navigation helper, not in runtime. */
144138
protected declare static __types: {

clients/client-auto-scaling/src/commands/CreateAutoScalingGroupCommand.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3-
import { getSerdePlugin } from "@smithy/middleware-serde";
43
import { Command as $Command } from "@smithy/smithy-client";
54
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
65

76
import { AutoScalingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AutoScalingClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { CreateAutoScalingGroupType } from "../models/models_0";
10-
import { de_CreateAutoScalingGroupCommand, se_CreateAutoScalingGroupCommand } from "../protocols/Aws_query";
9+
import { CreateAutoScalingGroup } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -421,16 +420,11 @@ export class CreateAutoScalingGroupCommand extends $Command
421420
>()
422421
.ep(commonParams)
423422
.m(function (this: any, Command: any, cs: any, config: AutoScalingClientResolvedConfig, o: any) {
424-
return [
425-
getSerdePlugin(config, this.serialize, this.deserialize),
426-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
427-
];
423+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
428424
})
429425
.s("AutoScaling_2011_01_01", "CreateAutoScalingGroup", {})
430426
.n("AutoScalingClient", "CreateAutoScalingGroupCommand")
431-
.f(void 0, void 0)
432-
.ser(se_CreateAutoScalingGroupCommand)
433-
.de(de_CreateAutoScalingGroupCommand)
427+
.sc(CreateAutoScalingGroup)
434428
.build() {
435429
/** @internal type navigation helper, not in runtime. */
436430
protected declare static __types: {

0 commit comments

Comments
 (0)