Skip to content

Commit b87ce5f

Browse files
committed
test(client-secrets-manager): schema testing
1 parent f073f96 commit b87ce5f

30 files changed

+1311
-404
lines changed

clients/client-secrets-manager/src/SecretsManagerClient.ts

Lines changed: 2 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";
@@ -409,6 +410,7 @@ export class SecretsManagerClient extends __Client<
409410
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
410411
super(_config_8);
411412
this.config = _config_8;
413+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
412414
this.middlewareStack.use(getUserAgentPlugin(this.config));
413415
this.middlewareStack.use(getRetryPlugin(this.config));
414416
this.middlewareStack.use(getContentLengthPlugin(this.config));

clients/client-secrets-manager/src/commands/BatchGetSecretValueCommand.ts

Lines changed: 3 additions & 8 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,7 +9,7 @@ import {
109
BatchGetSecretValueResponse,
1110
BatchGetSecretValueResponseFilterSensitiveLog,
1211
} from "../models/models_0";
13-
import { de_BatchGetSecretValueCommand, se_BatchGetSecretValueCommand } from "../protocols/Aws_json1_1";
12+
import { BatchGetSecretValue } from "../schemas/com.amazonaws.secretsmanager";
1413
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
1514

1615
/**
@@ -197,16 +196,12 @@ export class BatchGetSecretValueCommand extends $Command
197196
>()
198197
.ep(commonParams)
199198
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
200-
return [
201-
getSerdePlugin(config, this.serialize, this.deserialize),
202-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
203-
];
199+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
204200
})
205201
.s("secretsmanager", "BatchGetSecretValue", {})
206202
.n("SecretsManagerClient", "BatchGetSecretValueCommand")
207203
.f(void 0, BatchGetSecretValueResponseFilterSensitiveLog)
208-
.ser(se_BatchGetSecretValueCommand)
209-
.de(de_BatchGetSecretValueCommand)
204+
.sc(BatchGetSecretValue)
210205
.build() {
211206
/** @internal type navigation helper, not in runtime. */
212207
protected declare static __types: {

clients/client-secrets-manager/src/commands/CancelRotateSecretCommand.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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 { commonParams } from "../endpoint/EndpointParameters";
87
import { CancelRotateSecretRequest, CancelRotateSecretResponse } from "../models/models_0";
9-
import { de_CancelRotateSecretCommand, se_CancelRotateSecretCommand } from "../protocols/Aws_json1_1";
8+
import { CancelRotateSecret } from "../schemas/com.amazonaws.secretsmanager";
109
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
1110

1211
/**
@@ -131,16 +130,12 @@ export class CancelRotateSecretCommand extends $Command
131130
>()
132131
.ep(commonParams)
133132
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
134-
return [
135-
getSerdePlugin(config, this.serialize, this.deserialize),
136-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
137-
];
133+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
138134
})
139135
.s("secretsmanager", "CancelRotateSecret", {})
140136
.n("SecretsManagerClient", "CancelRotateSecretCommand")
141137
.f(void 0, void 0)
142-
.ser(se_CancelRotateSecretCommand)
143-
.de(de_CancelRotateSecretCommand)
138+
.sc(CancelRotateSecret)
144139
.build() {
145140
/** @internal type navigation helper, not in runtime. */
146141
protected declare static __types: {

clients/client-secrets-manager/src/commands/CreateSecretCommand.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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 { commonParams } from "../endpoint/EndpointParameters";
87
import { CreateSecretRequest, CreateSecretRequestFilterSensitiveLog, CreateSecretResponse } from "../models/models_0";
9-
import { de_CreateSecretCommand, se_CreateSecretCommand } from "../protocols/Aws_json1_1";
8+
import { CreateSecret } from "../schemas/com.amazonaws.secretsmanager";
109
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
1110

1211
/**
@@ -202,16 +201,12 @@ export class CreateSecretCommand extends $Command
202201
>()
203202
.ep(commonParams)
204203
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
205-
return [
206-
getSerdePlugin(config, this.serialize, this.deserialize),
207-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
208-
];
204+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
209205
})
210206
.s("secretsmanager", "CreateSecret", {})
211207
.n("SecretsManagerClient", "CreateSecretCommand")
212208
.f(CreateSecretRequestFilterSensitiveLog, void 0)
213-
.ser(se_CreateSecretCommand)
214-
.de(de_CreateSecretCommand)
209+
.sc(CreateSecret)
215210
.build() {
216211
/** @internal type navigation helper, not in runtime. */
217212
protected declare static __types: {

clients/client-secrets-manager/src/commands/DeleteResourcePolicyCommand.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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 { commonParams } from "../endpoint/EndpointParameters";
87
import { DeleteResourcePolicyRequest, DeleteResourcePolicyResponse } from "../models/models_0";
9-
import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Aws_json1_1";
8+
import { DeleteResourcePolicy } from "../schemas/com.amazonaws.secretsmanager";
109
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
1110

1211
/**
@@ -120,16 +119,12 @@ export class DeleteResourcePolicyCommand extends $Command
120119
>()
121120
.ep(commonParams)
122121
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, 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("secretsmanager", "DeleteResourcePolicy", {})
129125
.n("SecretsManagerClient", "DeleteResourcePolicyCommand")
130126
.f(void 0, void 0)
131-
.ser(se_DeleteResourcePolicyCommand)
132-
.de(de_DeleteResourcePolicyCommand)
127+
.sc(DeleteResourcePolicy)
133128
.build() {
134129
/** @internal type navigation helper, not in runtime. */
135130
protected declare static __types: {

clients/client-secrets-manager/src/commands/DeleteSecretCommand.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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 { commonParams } from "../endpoint/EndpointParameters";
87
import { DeleteSecretRequest, DeleteSecretResponse } from "../models/models_0";
9-
import { de_DeleteSecretCommand, se_DeleteSecretCommand } from "../protocols/Aws_json1_1";
8+
import { DeleteSecret } from "../schemas/com.amazonaws.secretsmanager";
109
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
1110

1211
/**
@@ -145,16 +144,12 @@ export class DeleteSecretCommand extends $Command
145144
>()
146145
.ep(commonParams)
147146
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
148-
return [
149-
getSerdePlugin(config, this.serialize, this.deserialize),
150-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
151-
];
147+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
152148
})
153149
.s("secretsmanager", "DeleteSecret", {})
154150
.n("SecretsManagerClient", "DeleteSecretCommand")
155151
.f(void 0, void 0)
156-
.ser(se_DeleteSecretCommand)
157-
.de(de_DeleteSecretCommand)
152+
.sc(DeleteSecret)
158153
.build() {
159154
/** @internal type navigation helper, not in runtime. */
160155
protected declare static __types: {

clients/client-secrets-manager/src/commands/DescribeSecretCommand.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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 { commonParams } from "../endpoint/EndpointParameters";
87
import { DescribeSecretRequest, DescribeSecretResponse } from "../models/models_0";
9-
import { de_DescribeSecretCommand, se_DescribeSecretCommand } from "../protocols/Aws_json1_1";
8+
import { DescribeSecret } from "../schemas/com.amazonaws.secretsmanager";
109
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
1110

1211
/**
@@ -170,16 +169,12 @@ export class DescribeSecretCommand extends $Command
170169
>()
171170
.ep(commonParams)
172171
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
173-
return [
174-
getSerdePlugin(config, this.serialize, this.deserialize),
175-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
176-
];
172+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
177173
})
178174
.s("secretsmanager", "DescribeSecret", {})
179175
.n("SecretsManagerClient", "DescribeSecretCommand")
180176
.f(void 0, void 0)
181-
.ser(se_DescribeSecretCommand)
182-
.de(de_DescribeSecretCommand)
177+
.sc(DescribeSecret)
183178
.build() {
184179
/** @internal type navigation helper, not in runtime. */
185180
protected declare static __types: {

clients/client-secrets-manager/src/commands/GetRandomPasswordCommand.ts

Lines changed: 3 additions & 8 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,7 +9,7 @@ import {
109
GetRandomPasswordResponse,
1110
GetRandomPasswordResponseFilterSensitiveLog,
1211
} from "../models/models_0";
13-
import { de_GetRandomPasswordCommand, se_GetRandomPasswordCommand } from "../protocols/Aws_json1_1";
12+
import { GetRandomPassword } from "../schemas/com.amazonaws.secretsmanager";
1413
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
1514

1615
/**
@@ -130,16 +129,12 @@ export class GetRandomPasswordCommand extends $Command
130129
>()
131130
.ep(commonParams)
132131
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
133-
return [
134-
getSerdePlugin(config, this.serialize, this.deserialize),
135-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
136-
];
132+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
137133
})
138134
.s("secretsmanager", "GetRandomPassword", {})
139135
.n("SecretsManagerClient", "GetRandomPasswordCommand")
140136
.f(void 0, GetRandomPasswordResponseFilterSensitiveLog)
141-
.ser(se_GetRandomPasswordCommand)
142-
.de(de_GetRandomPasswordCommand)
137+
.sc(GetRandomPassword)
143138
.build() {
144139
/** @internal type navigation helper, not in runtime. */
145140
protected declare static __types: {

clients/client-secrets-manager/src/commands/GetResourcePolicyCommand.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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 { commonParams } from "../endpoint/EndpointParameters";
87
import { GetResourcePolicyRequest, GetResourcePolicyResponse } from "../models/models_0";
9-
import { de_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Aws_json1_1";
8+
import { GetResourcePolicy } from "../schemas/com.amazonaws.secretsmanager";
109
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
1110

1211
/**
@@ -124,16 +123,12 @@ export class GetResourcePolicyCommand extends $Command
124123
>()
125124
.ep(commonParams)
126125
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, 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("secretsmanager", "GetResourcePolicy", {})
133129
.n("SecretsManagerClient", "GetResourcePolicyCommand")
134130
.f(void 0, void 0)
135-
.ser(se_GetResourcePolicyCommand)
136-
.de(de_GetResourcePolicyCommand)
131+
.sc(GetResourcePolicy)
137132
.build() {
138133
/** @internal type navigation helper, not in runtime. */
139134
protected declare static __types: {

clients/client-secrets-manager/src/commands/GetSecretValueCommand.ts

Lines changed: 3 additions & 8 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,7 +9,7 @@ import {
109
GetSecretValueResponse,
1110
GetSecretValueResponseFilterSensitiveLog,
1211
} from "../models/models_0";
13-
import { de_GetSecretValueCommand, se_GetSecretValueCommand } from "../protocols/Aws_json1_1";
12+
import { GetSecretValue } from "../schemas/com.amazonaws.secretsmanager";
1413
import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
1514

1615
/**
@@ -151,16 +150,12 @@ export class GetSecretValueCommand extends $Command
151150
>()
152151
.ep(commonParams)
153152
.m(function (this: any, Command: any, cs: any, config: SecretsManagerClientResolvedConfig, o: any) {
154-
return [
155-
getSerdePlugin(config, this.serialize, this.deserialize),
156-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
157-
];
153+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
158154
})
159155
.s("secretsmanager", "GetSecretValue", {})
160156
.n("SecretsManagerClient", "GetSecretValueCommand")
161157
.f(void 0, GetSecretValueResponseFilterSensitiveLog)
162-
.ser(se_GetSecretValueCommand)
163-
.de(de_GetSecretValueCommand)
158+
.sc(GetSecretValue)
164159
.build() {
165160
/** @internal type navigation helper, not in runtime. */
166161
protected declare static __types: {

0 commit comments

Comments
 (0)