Skip to content

Commit f806a2b

Browse files
authored
feat(clients): use schema-serde in AWS REST XML clients (#7499)
* feat(clients): use schema-serde in AWS REST XML clients * chore: codegen * chore: update maximal api test * chore: remove s3 codegen blocker
1 parent 2a1737e commit f806a2b

File tree

457 files changed

+31955
-51637
lines changed

Some content is hidden

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

457 files changed

+31955
-51637
lines changed

clients/client-cloudfront/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"@aws-sdk/util-endpoints": "*",
3232
"@aws-sdk/util-user-agent-browser": "*",
3333
"@aws-sdk/util-user-agent-node": "*",
34-
"@aws-sdk/xml-builder": "*",
3534
"@smithy/config-resolver": "^4.4.3",
3635
"@smithy/core": "^3.18.2",
3736
"@smithy/fetch-http-handler": "^5.3.6",

clients/client-cloudfront/src/CloudFrontClient.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,
@@ -987,6 +991,16 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
987991
*/
988992
extensions?: RuntimeExtension[];
989993

994+
/**
995+
* The protocol controlling the message type (e.g. HTTP) and format (e.g. JSON)
996+
* may be overridden. A default will always be set by the client.
997+
* Available options depend on the service's supported protocols and will not be validated by
998+
* the client.
999+
* @alpha
1000+
*
1001+
*/
1002+
protocol?: ClientProtocol<HttpRequest, HttpResponse>;
1003+
9901004
/**
9911005
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
9921006
*/
@@ -1060,6 +1074,7 @@ export class CloudFrontClient extends __Client<
10601074
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
10611075
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
10621076
this.config = _config_8;
1077+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
10631078
this.middlewareStack.use(getUserAgentPlugin(this.config));
10641079
this.middlewareStack.use(getRetryPlugin(this.config));
10651080
this.middlewareStack.use(getContentLengthPlugin(this.config));

clients/client-cloudfront/src/commands/AssociateAliasCommand.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 { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { AssociateAliasRequest } from "../models/models_0";
10-
import { de_AssociateAliasCommand, se_AssociateAliasCommand } from "../protocols/Aws_restXml";
9+
import { AssociateAlias } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -84,16 +83,11 @@ export class AssociateAliasCommand extends $Command
8483
>()
8584
.ep(commonParams)
8685
.m(function (this: any, Command: any, cs: any, config: CloudFrontClientResolvedConfig, o: any) {
87-
return [
88-
getSerdePlugin(config, this.serialize, this.deserialize),
89-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
90-
];
86+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
9187
})
9288
.s("Cloudfront2020_05_31", "AssociateAlias", {})
9389
.n("CloudFrontClient", "AssociateAliasCommand")
94-
.f(void 0, void 0)
95-
.ser(se_AssociateAliasCommand)
96-
.de(de_AssociateAliasCommand)
90+
.sc(AssociateAlias)
9791
.build() {
9892
/** @internal type navigation helper, not in runtime. */
9993
protected declare static __types: {

clients/client-cloudfront/src/commands/AssociateDistributionTenantWebACLCommand.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 { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { AssociateDistributionTenantWebACLRequest, AssociateDistributionTenantWebACLResult } from "../models/models_0";
10-
import {
11-
de_AssociateDistributionTenantWebACLCommand,
12-
se_AssociateDistributionTenantWebACLCommand,
13-
} from "../protocols/Aws_restXml";
9+
import { AssociateDistributionTenantWebACL } from "../schemas/schemas_0";
1410

1511
/**
1612
* @public
@@ -94,16 +90,11 @@ export class AssociateDistributionTenantWebACLCommand extends $Command
9490
>()
9591
.ep(commonParams)
9692
.m(function (this: any, Command: any, cs: any, config: CloudFrontClientResolvedConfig, o: any) {
97-
return [
98-
getSerdePlugin(config, this.serialize, this.deserialize),
99-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
100-
];
93+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
10194
})
10295
.s("Cloudfront2020_05_31", "AssociateDistributionTenantWebACL", {})
10396
.n("CloudFrontClient", "AssociateDistributionTenantWebACLCommand")
104-
.f(void 0, void 0)
105-
.ser(se_AssociateDistributionTenantWebACLCommand)
106-
.de(de_AssociateDistributionTenantWebACLCommand)
97+
.sc(AssociateDistributionTenantWebACL)
10798
.build() {
10899
/** @internal type navigation helper, not in runtime. */
109100
protected declare static __types: {

clients/client-cloudfront/src/commands/AssociateDistributionWebACLCommand.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 { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { AssociateDistributionWebACLRequest, AssociateDistributionWebACLResult } from "../models/models_0";
10-
import { de_AssociateDistributionWebACLCommand, se_AssociateDistributionWebACLCommand } from "../protocols/Aws_restXml";
9+
import { AssociateDistributionWebACL } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -89,16 +88,11 @@ export class AssociateDistributionWebACLCommand extends $Command
8988
>()
9089
.ep(commonParams)
9190
.m(function (this: any, Command: any, cs: any, config: CloudFrontClientResolvedConfig, o: any) {
92-
return [
93-
getSerdePlugin(config, this.serialize, this.deserialize),
94-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
95-
];
91+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
9692
})
9793
.s("Cloudfront2020_05_31", "AssociateDistributionWebACL", {})
9894
.n("CloudFrontClient", "AssociateDistributionWebACLCommand")
99-
.f(void 0, void 0)
100-
.ser(se_AssociateDistributionWebACLCommand)
101-
.de(de_AssociateDistributionWebACLCommand)
95+
.sc(AssociateDistributionWebACL)
10296
.build() {
10397
/** @internal type navigation helper, not in runtime. */
10498
protected declare static __types: {

clients/client-cloudfront/src/commands/CopyDistributionCommand.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +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 { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
9-
import {
10-
CopyDistributionRequest,
11-
CopyDistributionResult,
12-
CopyDistributionResultFilterSensitiveLog,
13-
} from "../models/models_0";
14-
import { de_CopyDistributionCommand, se_CopyDistributionCommand } from "../protocols/Aws_restXml";
8+
import { CopyDistributionRequest, CopyDistributionResult } from "../models/models_0";
9+
import { CopyDistribution } from "../schemas/schemas_0";
1510

1611
/**
1712
* @public
@@ -634,16 +629,11 @@ export class CopyDistributionCommand extends $Command
634629
>()
635630
.ep(commonParams)
636631
.m(function (this: any, Command: any, cs: any, config: CloudFrontClientResolvedConfig, o: any) {
637-
return [
638-
getSerdePlugin(config, this.serialize, this.deserialize),
639-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
640-
];
632+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
641633
})
642634
.s("Cloudfront2020_05_31", "CopyDistribution", {})
643635
.n("CloudFrontClient", "CopyDistributionCommand")
644-
.f(void 0, CopyDistributionResultFilterSensitiveLog)
645-
.ser(se_CopyDistributionCommand)
646-
.de(de_CopyDistributionCommand)
636+
.sc(CopyDistribution)
647637
.build() {
648638
/** @internal type navigation helper, not in runtime. */
649639
protected declare static __types: {

clients/client-cloudfront/src/commands/CreateAnycastIpListCommand.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 { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { CreateAnycastIpListRequest, CreateAnycastIpListResult } from "../models/models_0";
10-
import { de_CreateAnycastIpListCommand, se_CreateAnycastIpListCommand } from "../protocols/Aws_restXml";
9+
import { CreateAnycastIpList } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -110,16 +109,11 @@ export class CreateAnycastIpListCommand extends $Command
110109
>()
111110
.ep(commonParams)
112111
.m(function (this: any, Command: any, cs: any, config: CloudFrontClientResolvedConfig, o: any) {
113-
return [
114-
getSerdePlugin(config, this.serialize, this.deserialize),
115-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
116-
];
112+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
117113
})
118114
.s("Cloudfront2020_05_31", "CreateAnycastIpList", {})
119115
.n("CloudFrontClient", "CreateAnycastIpListCommand")
120-
.f(void 0, void 0)
121-
.ser(se_CreateAnycastIpListCommand)
122-
.de(de_CreateAnycastIpListCommand)
116+
.sc(CreateAnycastIpList)
123117
.build() {
124118
/** @internal type navigation helper, not in runtime. */
125119
protected declare static __types: {

clients/client-cloudfront/src/commands/CreateCachePolicyCommand.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 { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { CreateCachePolicyRequest, CreateCachePolicyResult } from "../models/models_0";
10-
import { de_CreateCachePolicyCommand, se_CreateCachePolicyCommand } from "../protocols/Aws_restXml";
9+
import { CreateCachePolicy } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -174,16 +173,11 @@ export class CreateCachePolicyCommand extends $Command
174173
>()
175174
.ep(commonParams)
176175
.m(function (this: any, Command: any, cs: any, config: CloudFrontClientResolvedConfig, o: any) {
177-
return [
178-
getSerdePlugin(config, this.serialize, this.deserialize),
179-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
180-
];
176+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
181177
})
182178
.s("Cloudfront2020_05_31", "CreateCachePolicy", {})
183179
.n("CloudFrontClient", "CreateCachePolicyCommand")
184-
.f(void 0, void 0)
185-
.ser(se_CreateCachePolicyCommand)
186-
.de(de_CreateCachePolicyCommand)
180+
.sc(CreateCachePolicy)
187181
.build() {
188182
/** @internal type navigation helper, not in runtime. */
189183
protected declare static __types: {

clients/client-cloudfront/src/commands/CreateCloudFrontOriginAccessIdentityCommand.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
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

@@ -10,10 +9,7 @@ import {
109
CreateCloudFrontOriginAccessIdentityRequest,
1110
CreateCloudFrontOriginAccessIdentityResult,
1211
} from "../models/models_0";
13-
import {
14-
de_CreateCloudFrontOriginAccessIdentityCommand,
15-
se_CreateCloudFrontOriginAccessIdentityCommand,
16-
} from "../protocols/Aws_restXml";
12+
import { CreateCloudFrontOriginAccessIdentity } from "../schemas/schemas_0";
1713

1814
/**
1915
* @public
@@ -105,16 +101,11 @@ export class CreateCloudFrontOriginAccessIdentityCommand extends $Command
105101
>()
106102
.ep(commonParams)
107103
.m(function (this: any, Command: any, cs: any, config: CloudFrontClientResolvedConfig, o: any) {
108-
return [
109-
getSerdePlugin(config, this.serialize, this.deserialize),
110-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
111-
];
104+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
112105
})
113106
.s("Cloudfront2020_05_31", "CreateCloudFrontOriginAccessIdentity", {})
114107
.n("CloudFrontClient", "CreateCloudFrontOriginAccessIdentityCommand")
115-
.f(void 0, void 0)
116-
.ser(se_CreateCloudFrontOriginAccessIdentityCommand)
117-
.de(de_CreateCloudFrontOriginAccessIdentityCommand)
108+
.sc(CreateCloudFrontOriginAccessIdentity)
118109
.build() {
119110
/** @internal type navigation helper, not in runtime. */
120111
protected declare static __types: {

clients/client-cloudfront/src/commands/CreateConnectionGroupCommand.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 { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { CreateConnectionGroupRequest, CreateConnectionGroupResult } from "../models/models_0";
10-
import { de_CreateConnectionGroupCommand, se_CreateConnectionGroupCommand } from "../protocols/Aws_restXml";
9+
import { CreateConnectionGroup } from "../schemas/schemas_0";
1110

1211
/**
1312
* @public
@@ -120,16 +119,11 @@ export class CreateConnectionGroupCommand extends $Command
120119
>()
121120
.ep(commonParams)
122121
.m(function (this: any, Command: any, cs: any, config: CloudFrontClientResolvedConfig, o: any) {
123-
return [
124-
getSerdePlugin(config, this.serialize, this.deserialize),
125-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
126-
];
122+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
127123
})
128124
.s("Cloudfront2020_05_31", "CreateConnectionGroup", {})
129125
.n("CloudFrontClient", "CreateConnectionGroupCommand")
130-
.f(void 0, void 0)
131-
.ser(se_CreateConnectionGroupCommand)
132-
.de(de_CreateConnectionGroupCommand)
126+
.sc(CreateConnectionGroup)
133127
.build() {
134128
/** @internal type navigation helper, not in runtime. */
135129
protected declare static __types: {

0 commit comments

Comments
 (0)