Skip to content

Commit a439def

Browse files
committed
chore: refactor schemas
1 parent 7d84a9b commit a439def

File tree

147 files changed

+11072
-5487
lines changed

Some content is hidden

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

147 files changed

+11072
-5487
lines changed

clients/client-dynamodb/src/DynamoDBClient.ts

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
getHttpAuthSchemeEndpointRuleSetPlugin,
3131
getHttpSigningPlugin,
3232
} from "@smithy/core";
33+
import { getSchemaSerdePlugin } from "@smithy/core/schema";
3334
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
3435
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint";
3536
import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
@@ -570,6 +571,7 @@ export class DynamoDBClient extends __Client<
570571
const _config_10 = resolveRuntimeExtensions(_config_9, configuration?.extensions || []);
571572
super(_config_10);
572573
this.config = _config_10;
574+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
573575
this.middlewareStack.use(getUserAgentPlugin(this.config));
574576
this.middlewareStack.use(getRetryPlugin(this.config));
575577
this.middlewareStack.use(getContentLengthPlugin(this.config));

clients/client-dynamodb/src/commands/BatchExecuteStatementCommand.ts

+3-8
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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { BatchExecuteStatementInput, BatchExecuteStatementOutput } from "../models/models_0";
10-
import { de_BatchExecuteStatementCommand, se_BatchExecuteStatementCommand } from "../protocols/Aws_json1_0";
9+
import { BatchExecuteStatement } from "../schemas/com.amazonaws.dynamodb";
1110

1211
/**
1312
* @public
@@ -223,16 +222,12 @@ export class BatchExecuteStatementCommand extends $Command
223222
>()
224223
.ep(commonParams)
225224
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
226-
return [
227-
getSerdePlugin(config, this.serialize, this.deserialize),
228-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
229-
];
225+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
230226
})
231227
.s("DynamoDB_20120810", "BatchExecuteStatement", {})
232228
.n("DynamoDBClient", "BatchExecuteStatementCommand")
233229
.f(void 0, void 0)
234-
.ser(se_BatchExecuteStatementCommand)
235-
.de(de_BatchExecuteStatementCommand)
230+
.sc(BatchExecuteStatement)
236231
.build() {
237232
/** @internal type navigation helper, not in runtime. */
238233
protected declare static __types: {

clients/client-dynamodb/src/commands/BatchGetItemCommand.ts

+3-8
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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { BatchGetItemInput, BatchGetItemOutput } from "../models/models_0";
10-
import { de_BatchGetItemCommand, se_BatchGetItemCommand } from "../protocols/Aws_json1_0";
9+
import { BatchGetItem } from "../schemas/com.amazonaws.dynamodb";
1110

1211
/**
1312
* @public
@@ -351,16 +350,12 @@ export class BatchGetItemCommand extends $Command
351350
ResourceArnList: { type: "operationContextParams", get: (input?: any) => Object.keys(input?.RequestItems ?? {}) },
352351
})
353352
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
354-
return [
355-
getSerdePlugin(config, this.serialize, this.deserialize),
356-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
357-
];
353+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
358354
})
359355
.s("DynamoDB_20120810", "BatchGetItem", {})
360356
.n("DynamoDBClient", "BatchGetItemCommand")
361357
.f(void 0, void 0)
362-
.ser(se_BatchGetItemCommand)
363-
.de(de_BatchGetItemCommand)
358+
.sc(BatchGetItem)
364359
.build() {
365360
/** @internal type navigation helper, not in runtime. */
366361
protected declare static __types: {

clients/client-dynamodb/src/commands/BatchWriteItemCommand.ts

+3-8
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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { BatchWriteItemInput, BatchWriteItemOutput } from "../models/models_0";
10-
import { de_BatchWriteItemCommand, se_BatchWriteItemCommand } from "../protocols/Aws_json1_0";
9+
import { BatchWriteItem } from "../schemas/com.amazonaws.dynamodb";
1110

1211
/**
1312
* @public
@@ -397,16 +396,12 @@ export class BatchWriteItemCommand extends $Command
397396
ResourceArnList: { type: "operationContextParams", get: (input?: any) => Object.keys(input?.RequestItems ?? {}) },
398397
})
399398
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
400-
return [
401-
getSerdePlugin(config, this.serialize, this.deserialize),
402-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
403-
];
399+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
404400
})
405401
.s("DynamoDB_20120810", "BatchWriteItem", {})
406402
.n("DynamoDBClient", "BatchWriteItemCommand")
407403
.f(void 0, void 0)
408-
.ser(se_BatchWriteItemCommand)
409-
.de(de_BatchWriteItemCommand)
404+
.sc(BatchWriteItem)
410405
.build() {
411406
/** @internal type navigation helper, not in runtime. */
412407
protected declare static __types: {

clients/client-dynamodb/src/commands/CreateBackupCommand.ts

+3-8
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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { CreateBackupInput, CreateBackupOutput } from "../models/models_0";
10-
import { de_CreateBackupCommand, se_CreateBackupCommand } from "../protocols/Aws_json1_0";
9+
import { CreateBackup } from "../schemas/com.amazonaws.dynamodb";
1110

1211
/**
1312
* @public
@@ -144,16 +143,12 @@ export class CreateBackupCommand extends $Command
144143
ResourceArn: { type: "contextParams", name: "TableName" },
145144
})
146145
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
147-
return [
148-
getSerdePlugin(config, this.serialize, this.deserialize),
149-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
150-
];
146+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
151147
})
152148
.s("DynamoDB_20120810", "CreateBackup", {})
153149
.n("DynamoDBClient", "CreateBackupCommand")
154150
.f(void 0, void 0)
155-
.ser(se_CreateBackupCommand)
156-
.de(de_CreateBackupCommand)
151+
.sc(CreateBackup)
157152
.build() {
158153
/** @internal type navigation helper, not in runtime. */
159154
protected declare static __types: {

clients/client-dynamodb/src/commands/CreateGlobalTableCommand.ts

+3-8
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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { CreateGlobalTableInput, CreateGlobalTableOutput } from "../models/models_0";
10-
import { de_CreateGlobalTableCommand, se_CreateGlobalTableCommand } from "../protocols/Aws_json1_0";
9+
import { CreateGlobalTable } from "../schemas/com.amazonaws.dynamodb";
1110

1211
/**
1312
* @public
@@ -203,16 +202,12 @@ export class CreateGlobalTableCommand extends $Command
203202
ResourceArn: { type: "contextParams", name: "GlobalTableName" },
204203
})
205204
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
206-
return [
207-
getSerdePlugin(config, this.serialize, this.deserialize),
208-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
209-
];
205+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
210206
})
211207
.s("DynamoDB_20120810", "CreateGlobalTable", {})
212208
.n("DynamoDBClient", "CreateGlobalTableCommand")
213209
.f(void 0, void 0)
214-
.ser(se_CreateGlobalTableCommand)
215-
.de(de_CreateGlobalTableCommand)
210+
.sc(CreateGlobalTable)
216211
.build() {
217212
/** @internal type navigation helper, not in runtime. */
218213
protected declare static __types: {

clients/client-dynamodb/src/commands/CreateTableCommand.ts

+3-8
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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { CreateTableInput, CreateTableOutput } from "../models/models_0";
10-
import { de_CreateTableCommand, se_CreateTableCommand } from "../protocols/Aws_json1_0";
9+
import { CreateTable } from "../schemas/com.amazonaws.dynamodb";
1110

1211
/**
1312
* @public
@@ -446,16 +445,12 @@ export class CreateTableCommand extends $Command
446445
ResourceArn: { type: "contextParams", name: "TableName" },
447446
})
448447
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
449-
return [
450-
getSerdePlugin(config, this.serialize, this.deserialize),
451-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
452-
];
448+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
453449
})
454450
.s("DynamoDB_20120810", "CreateTable", {})
455451
.n("DynamoDBClient", "CreateTableCommand")
456452
.f(void 0, void 0)
457-
.ser(se_CreateTableCommand)
458-
.de(de_CreateTableCommand)
453+
.sc(CreateTable)
459454
.build() {
460455
/** @internal type navigation helper, not in runtime. */
461456
protected declare static __types: {

clients/client-dynamodb/src/commands/DeleteBackupCommand.ts

+3-8
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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { DeleteBackupInput, DeleteBackupOutput } from "../models/models_0";
10-
import { de_DeleteBackupCommand, se_DeleteBackupCommand } from "../protocols/Aws_json1_0";
9+
import { DeleteBackup } from "../schemas/com.amazonaws.dynamodb";
1110

1211
/**
1312
* @public
@@ -191,16 +190,12 @@ export class DeleteBackupCommand extends $Command
191190
ResourceArn: { type: "contextParams", name: "BackupArn" },
192191
})
193192
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
194-
return [
195-
getSerdePlugin(config, this.serialize, this.deserialize),
196-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
197-
];
193+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
198194
})
199195
.s("DynamoDB_20120810", "DeleteBackup", {})
200196
.n("DynamoDBClient", "DeleteBackupCommand")
201197
.f(void 0, void 0)
202-
.ser(se_DeleteBackupCommand)
203-
.de(de_DeleteBackupCommand)
198+
.sc(DeleteBackup)
204199
.build() {
205200
/** @internal type navigation helper, not in runtime. */
206201
protected declare static __types: {

clients/client-dynamodb/src/commands/DeleteItemCommand.ts

+3-8
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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { DeleteItemInput, DeleteItemOutput } from "../models/models_0";
10-
import { de_DeleteItemCommand, se_DeleteItemCommand } from "../protocols/Aws_json1_0";
9+
import { DeleteItem } from "../schemas/com.amazonaws.dynamodb";
1110

1211
/**
1312
* @public
@@ -285,16 +284,12 @@ export class DeleteItemCommand extends $Command
285284
ResourceArn: { type: "contextParams", name: "TableName" },
286285
})
287286
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
288-
return [
289-
getSerdePlugin(config, this.serialize, this.deserialize),
290-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
291-
];
287+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
292288
})
293289
.s("DynamoDB_20120810", "DeleteItem", {})
294290
.n("DynamoDBClient", "DeleteItemCommand")
295291
.f(void 0, void 0)
296-
.ser(se_DeleteItemCommand)
297-
.de(de_DeleteItemCommand)
292+
.sc(DeleteItem)
298293
.build() {
299294
/** @internal type navigation helper, not in runtime. */
300295
protected declare static __types: {

clients/client-dynamodb/src/commands/DeleteResourcePolicyCommand.ts

+3-8
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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { DeleteResourcePolicyInput, DeleteResourcePolicyOutput } from "../models/models_0";
10-
import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Aws_json1_0";
9+
import { DeleteResourcePolicy } from "../schemas/com.amazonaws.dynamodb";
1110

1211
/**
1312
* @public
@@ -136,16 +135,12 @@ export class DeleteResourcePolicyCommand extends $Command
136135
ResourceArn: { type: "contextParams", name: "ResourceArn" },
137136
})
138137
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
139-
return [
140-
getSerdePlugin(config, this.serialize, this.deserialize),
141-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
142-
];
138+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
143139
})
144140
.s("DynamoDB_20120810", "DeleteResourcePolicy", {})
145141
.n("DynamoDBClient", "DeleteResourcePolicyCommand")
146142
.f(void 0, void 0)
147-
.ser(se_DeleteResourcePolicyCommand)
148-
.de(de_DeleteResourcePolicyCommand)
143+
.sc(DeleteResourcePolicy)
149144
.build() {
150145
/** @internal type navigation helper, not in runtime. */
151146
protected declare static __types: {

clients/client-dynamodb/src/commands/DeleteTableCommand.ts

+3-8
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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { DeleteTableInput, DeleteTableOutput } from "../models/models_0";
10-
import { de_DeleteTableCommand, se_DeleteTableCommand } from "../protocols/Aws_json1_0";
9+
import { DeleteTable } from "../schemas/com.amazonaws.dynamodb";
1110

1211
/**
1312
* @public
@@ -327,16 +326,12 @@ export class DeleteTableCommand extends $Command
327326
ResourceArn: { type: "contextParams", name: "TableName" },
328327
})
329328
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
330-
return [
331-
getSerdePlugin(config, this.serialize, this.deserialize),
332-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
333-
];
329+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
334330
})
335331
.s("DynamoDB_20120810", "DeleteTable", {})
336332
.n("DynamoDBClient", "DeleteTableCommand")
337333
.f(void 0, void 0)
338-
.ser(se_DeleteTableCommand)
339-
.de(de_DeleteTableCommand)
334+
.sc(DeleteTable)
340335
.build() {
341336
/** @internal type navigation helper, not in runtime. */
342337
protected declare static __types: {

clients/client-dynamodb/src/commands/DescribeBackupCommand.ts

+3-8
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 { DynamoDBClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DynamoDBClient";
87
import { commonParams } from "../endpoint/EndpointParameters";
98
import { DescribeBackupInput, DescribeBackupOutput } from "../models/models_0";
10-
import { de_DescribeBackupCommand, se_DescribeBackupCommand } from "../protocols/Aws_json1_0";
9+
import { DescribeBackup } from "../schemas/com.amazonaws.dynamodb";
1110

1211
/**
1312
* @public
@@ -171,16 +170,12 @@ export class DescribeBackupCommand extends $Command
171170
ResourceArn: { type: "contextParams", name: "BackupArn" },
172171
})
173172
.m(function (this: any, Command: any, cs: any, config: DynamoDBClientResolvedConfig, o: any) {
174-
return [
175-
getSerdePlugin(config, this.serialize, this.deserialize),
176-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
177-
];
173+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
178174
})
179175
.s("DynamoDB_20120810", "DescribeBackup", {})
180176
.n("DynamoDBClient", "DescribeBackupCommand")
181177
.f(void 0, void 0)
182-
.ser(se_DescribeBackupCommand)
183-
.de(de_DescribeBackupCommand)
178+
.sc(DescribeBackup)
184179
.build() {
185180
/** @internal type navigation helper, not in runtime. */
186181
protected declare static __types: {

0 commit comments

Comments
 (0)