Skip to content

Commit a63f958

Browse files
authored
chore(codegen): update to Smithy 1.23.x which supports IDL v2
1 parent 69c65ec commit a63f958

File tree

14 files changed

+636
-246
lines changed

14 files changed

+636
-246
lines changed

clients/client-kafkaconnect/src/protocols/Aws_restJson1.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const serializeAws_restJson1CreateConnectorCommand = async (
122122
body = JSON.stringify({
123123
...(input.capacity != null && { capacity: serializeAws_restJson1Capacity(input.capacity, context) }),
124124
...(input.connectorConfiguration != null && {
125-
connectorConfiguration: serializeAws_restJson1__mapOf__string(input.connectorConfiguration, context),
125+
connectorConfiguration: serializeAws_restJson1__sensitive__mapOf__string(input.connectorConfiguration, context),
126126
}),
127127
...(input.connectorDescription != null && { connectorDescription: input.connectorDescription }),
128128
...(input.connectorName != null && { connectorName: input.connectorName }),
@@ -822,7 +822,10 @@ export const deserializeAws_restJson1DescribeConnectorCommand = async (
822822
contents.connectorArn = __expectString(data.connectorArn);
823823
}
824824
if (data.connectorConfiguration != null) {
825-
contents.connectorConfiguration = deserializeAws_restJson1__mapOf__string(data.connectorConfiguration, context);
825+
contents.connectorConfiguration = deserializeAws_restJson1__sensitive__mapOf__string(
826+
data.connectorConfiguration,
827+
context
828+
);
826829
}
827830
if (data.connectorDescription != null) {
828831
contents.connectorDescription = __expectString(data.connectorDescription);
@@ -1467,7 +1470,10 @@ const serializeAws_restJson1__listOfPlugin = (input: Plugin[], context: __SerdeC
14671470
});
14681471
};
14691472

1470-
const serializeAws_restJson1__mapOf__string = (input: Record<string, string>, context: __SerdeContext): any => {
1473+
const serializeAws_restJson1__sensitive__mapOf__string = (
1474+
input: Record<string, string>,
1475+
context: __SerdeContext
1476+
): any => {
14711477
return Object.entries(input).reduce((acc: Record<string, any>, [key, value]: [string, any]) => {
14721478
if (value === null) {
14731479
return acc;
@@ -1758,7 +1764,10 @@ const deserializeAws_restJson1__listOfWorkerConfigurationSummary = (
17581764
return retVal;
17591765
};
17601766

1761-
const deserializeAws_restJson1__mapOf__string = (output: any, context: __SerdeContext): Record<string, string> => {
1767+
const deserializeAws_restJson1__sensitive__mapOf__string = (
1768+
output: any,
1769+
context: __SerdeContext
1770+
): Record<string, string> => {
17621771
return Object.entries(output).reduce((acc: Record<string, string>, [key, value]: [string, any]) => {
17631772
if (value === null) {
17641773
return acc;

codegen/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ allprojects {
3131
version = "0.11.0"
3232
}
3333

34-
extra["smithyVersion"] = "[1.21.0,1.22.0["
34+
extra["smithyVersion"] = "[1.23.0,1.24.0["
3535

3636
// The root project doesn't produce a JAR.
3737
tasks["jar"].enabled = false

codegen/sdk-codegen/aws-models/appconfigdata.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@
8282
]
8383
}
8484
},
85-
"com.amazonaws.appconfigdata#Blob": {
86-
"type": "blob"
87-
},
8885
"com.amazonaws.appconfigdata#ConfigurationSession": {
8986
"type": "resource",
9087
"identifiers": {
@@ -166,11 +163,10 @@
166163
}
167164
},
168165
"Configuration": {
169-
"target": "com.amazonaws.appconfigdata#Blob",
166+
"target": "com.amazonaws.appconfigdata#SensitiveBlob",
170167
"traits": {
171168
"smithy.api#documentation": "<p>The data of the configuration. This may be empty if the client already has the latest\n version of configuration.</p>",
172-
"smithy.api#httpPayload": {},
173-
"smithy.api#sensitive": {}
169+
"smithy.api#httpPayload": {}
174170
}
175171
}
176172
}
@@ -318,6 +314,12 @@
318314
]
319315
}
320316
},
317+
"com.amazonaws.appconfigdata#SensitiveBlob": {
318+
"type": "blob",
319+
"traits": {
320+
"smithy.api#sensitive": {}
321+
}
322+
},
321323
"com.amazonaws.appconfigdata#StartConfigurationSession": {
322324
"type": "operation",
323325
"input": {

codegen/sdk-codegen/aws-models/kafkaconnect.json

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,10 @@
471471
}
472472
},
473473
"connectorConfiguration": {
474-
"target": "com.amazonaws.kafkaconnect#__mapOf__string",
474+
"target": "com.amazonaws.kafkaconnect#__sensitive__mapOf__string",
475475
"traits": {
476476
"smithy.api#documentation": "<p>A map of keys to values that represent the configuration for the connector.</p>",
477-
"smithy.api#required": {},
478-
"smithy.api#sensitive": {}
477+
"smithy.api#required": {}
479478
}
480479
},
481480
"connectorDescription": {
@@ -734,11 +733,10 @@
734733
}
735734
},
736735
"propertiesFileContent": {
737-
"target": "com.amazonaws.kafkaconnect#__string",
736+
"target": "com.amazonaws.kafkaconnect#__sensitiveString",
738737
"traits": {
739738
"smithy.api#documentation": "<p>Base64 encoded contents of connect-distributed.properties file.</p>",
740-
"smithy.api#required": {},
741-
"smithy.api#sensitive": {}
739+
"smithy.api#required": {}
742740
}
743741
}
744742
}
@@ -1216,10 +1214,9 @@
12161214
}
12171215
},
12181216
"connectorConfiguration": {
1219-
"target": "com.amazonaws.kafkaconnect#__mapOf__string",
1217+
"target": "com.amazonaws.kafkaconnect#__sensitive__mapOf__string",
12201218
"traits": {
1221-
"smithy.api#documentation": "<p>A map of keys to values that represent the configuration for the connector.</p>",
1222-
"smithy.api#sensitive": {}
1219+
"smithy.api#documentation": "<p>A map of keys to values that represent the configuration for the connector.</p>"
12231220
}
12241221
},
12251222
"connectorDescription": {
@@ -2582,10 +2579,9 @@
25822579
}
25832580
},
25842581
"propertiesFileContent": {
2585-
"target": "com.amazonaws.kafkaconnect#__string",
2582+
"target": "com.amazonaws.kafkaconnect#__sensitiveString",
25862583
"traits": {
2587-
"smithy.api#documentation": "<p>Base64 encoded contents of the connect-distributed.properties file.</p>",
2588-
"smithy.api#sensitive": {}
2584+
"smithy.api#documentation": "<p>Base64 encoded contents of the connect-distributed.properties file.</p>"
25892585
}
25902586
},
25912587
"revision": {
@@ -2796,13 +2792,22 @@
27962792
}
27972793
}
27982794
},
2799-
"com.amazonaws.kafkaconnect#__mapOf__string": {
2795+
"com.amazonaws.kafkaconnect#__sensitiveString": {
2796+
"type": "string",
2797+
"traits": {
2798+
"smithy.api#sensitive": {}
2799+
}
2800+
},
2801+
"com.amazonaws.kafkaconnect#__sensitive__mapOf__string": {
28002802
"type": "map",
28012803
"key": {
28022804
"target": "com.amazonaws.kafkaconnect#__string"
28032805
},
28042806
"value": {
28052807
"target": "com.amazonaws.kafkaconnect#__string"
2808+
},
2809+
"traits": {
2810+
"smithy.api#sensitive": {}
28062811
}
28072812
},
28082813
"com.amazonaws.kafkaconnect#__string": {

private/aws-protocoltests-restjson/src/RestJsonProtocol.ts

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,6 @@ import {
226226
MalformedRequestBodyCommandInput,
227227
MalformedRequestBodyCommandOutput,
228228
} from "./commands/MalformedRequestBodyCommand";
229-
import {
230-
MalformedSetCommand,
231-
MalformedSetCommandInput,
232-
MalformedSetCommandOutput,
233-
} from "./commands/MalformedSetCommand";
234229
import {
235230
MalformedShortCommand,
236231
MalformedShortCommandInput,
@@ -341,6 +336,11 @@ import {
341336
PostPlayerActionCommandInput,
342337
PostPlayerActionCommandOutput,
343338
} from "./commands/PostPlayerActionCommand";
339+
import {
340+
PostUnionWithJsonNameCommand,
341+
PostUnionWithJsonNameCommandInput,
342+
PostUnionWithJsonNameCommandOutput,
343+
} from "./commands/PostUnionWithJsonNameCommand";
344344
import {
345345
QueryIdempotencyTokenAutoFillCommand,
346346
QueryIdempotencyTokenAutoFillCommandInput,
@@ -1912,32 +1912,6 @@ export class RestJsonProtocol extends RestJsonProtocolClient {
19121912
}
19131913
}
19141914

1915-
public malformedSet(
1916-
args: MalformedSetCommandInput,
1917-
options?: __HttpHandlerOptions
1918-
): Promise<MalformedSetCommandOutput>;
1919-
public malformedSet(args: MalformedSetCommandInput, cb: (err: any, data?: MalformedSetCommandOutput) => void): void;
1920-
public malformedSet(
1921-
args: MalformedSetCommandInput,
1922-
options: __HttpHandlerOptions,
1923-
cb: (err: any, data?: MalformedSetCommandOutput) => void
1924-
): void;
1925-
public malformedSet(
1926-
args: MalformedSetCommandInput,
1927-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: MalformedSetCommandOutput) => void),
1928-
cb?: (err: any, data?: MalformedSetCommandOutput) => void
1929-
): Promise<MalformedSetCommandOutput> | void {
1930-
const command = new MalformedSetCommand(args);
1931-
if (typeof optionsOrCb === "function") {
1932-
this.send(command, optionsOrCb);
1933-
} else if (typeof cb === "function") {
1934-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1935-
this.send(command, optionsOrCb || {}, cb);
1936-
} else {
1937-
return this.send(command, optionsOrCb);
1938-
}
1939-
}
1940-
19411915
public malformedShort(
19421916
args: MalformedShortCommandInput,
19431917
options?: __HttpHandlerOptions
@@ -2602,6 +2576,38 @@ export class RestJsonProtocol extends RestJsonProtocolClient {
26022576
}
26032577
}
26042578

2579+
/**
2580+
* This operation defines a union that uses jsonName on some members.
2581+
*/
2582+
public postUnionWithJsonName(
2583+
args: PostUnionWithJsonNameCommandInput,
2584+
options?: __HttpHandlerOptions
2585+
): Promise<PostUnionWithJsonNameCommandOutput>;
2586+
public postUnionWithJsonName(
2587+
args: PostUnionWithJsonNameCommandInput,
2588+
cb: (err: any, data?: PostUnionWithJsonNameCommandOutput) => void
2589+
): void;
2590+
public postUnionWithJsonName(
2591+
args: PostUnionWithJsonNameCommandInput,
2592+
options: __HttpHandlerOptions,
2593+
cb: (err: any, data?: PostUnionWithJsonNameCommandOutput) => void
2594+
): void;
2595+
public postUnionWithJsonName(
2596+
args: PostUnionWithJsonNameCommandInput,
2597+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PostUnionWithJsonNameCommandOutput) => void),
2598+
cb?: (err: any, data?: PostUnionWithJsonNameCommandOutput) => void
2599+
): Promise<PostUnionWithJsonNameCommandOutput> | void {
2600+
const command = new PostUnionWithJsonNameCommand(args);
2601+
if (typeof optionsOrCb === "function") {
2602+
this.send(command, optionsOrCb);
2603+
} else if (typeof cb === "function") {
2604+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2605+
this.send(command, optionsOrCb || {}, cb);
2606+
} else {
2607+
return this.send(command, optionsOrCb);
2608+
}
2609+
}
2610+
26052611
/**
26062612
* Automatically adds idempotency tokens.
26072613
*/

private/aws-protocoltests-restjson/src/RestJsonProtocolClient.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ import {
175175
MalformedRequestBodyCommandInput,
176176
MalformedRequestBodyCommandOutput,
177177
} from "./commands/MalformedRequestBodyCommand";
178-
import { MalformedSetCommandInput, MalformedSetCommandOutput } from "./commands/MalformedSetCommand";
179178
import { MalformedShortCommandInput, MalformedShortCommandOutput } from "./commands/MalformedShortCommand";
180179
import { MalformedStringCommandInput, MalformedStringCommandOutput } from "./commands/MalformedStringCommand";
181180
import {
@@ -243,6 +242,10 @@ import {
243242
OmitsNullSerializesEmptyStringCommandOutput,
244243
} from "./commands/OmitsNullSerializesEmptyStringCommand";
245244
import { PostPlayerActionCommandInput, PostPlayerActionCommandOutput } from "./commands/PostPlayerActionCommand";
245+
import {
246+
PostUnionWithJsonNameCommandInput,
247+
PostUnionWithJsonNameCommandOutput,
248+
} from "./commands/PostUnionWithJsonNameCommand";
246249
import {
247250
QueryIdempotencyTokenAutoFillCommandInput,
248251
QueryIdempotencyTokenAutoFillCommandOutput,
@@ -330,7 +333,6 @@ export type ServiceInputTypes =
330333
| MalformedLongCommandInput
331334
| MalformedMapCommandInput
332335
| MalformedRequestBodyCommandInput
333-
| MalformedSetCommandInput
334336
| MalformedShortCommandInput
335337
| MalformedStringCommandInput
336338
| MalformedTimestampBodyDateTimeCommandInput
@@ -353,6 +355,7 @@ export type ServiceInputTypes =
353355
| NullAndEmptyHeadersServerCommandInput
354356
| OmitsNullSerializesEmptyStringCommandInput
355357
| PostPlayerActionCommandInput
358+
| PostUnionWithJsonNameCommandInput
356359
| QueryIdempotencyTokenAutoFillCommandInput
357360
| QueryParamsAsStringListMapCommandInput
358361
| QueryPrecedenceCommandInput
@@ -418,7 +421,6 @@ export type ServiceOutputTypes =
418421
| MalformedLongCommandOutput
419422
| MalformedMapCommandOutput
420423
| MalformedRequestBodyCommandOutput
421-
| MalformedSetCommandOutput
422424
| MalformedShortCommandOutput
423425
| MalformedStringCommandOutput
424426
| MalformedTimestampBodyDateTimeCommandOutput
@@ -441,6 +443,7 @@ export type ServiceOutputTypes =
441443
| NullAndEmptyHeadersServerCommandOutput
442444
| OmitsNullSerializesEmptyStringCommandOutput
443445
| PostPlayerActionCommandOutput
446+
| PostUnionWithJsonNameCommandOutput
444447
| QueryIdempotencyTokenAutoFillCommandOutput
445448
| QueryParamsAsStringListMapCommandOutput
446449
| QueryPrecedenceCommandOutput

private/aws-protocoltests-restjson/src/commands/MalformedAcceptWithGenericStringCommand.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@ import {
1313
} from "@aws-sdk/types";
1414

1515
import {
16-
MalformedAcceptWithGenericStringInput,
17-
MalformedAcceptWithGenericStringInputFilterSensitiveLog,
16+
MalformedAcceptWithGenericStringOutput,
17+
MalformedAcceptWithGenericStringOutputFilterSensitiveLog,
1818
} from "../models/models_0";
1919
import {
2020
deserializeAws_restJson1MalformedAcceptWithGenericStringCommand,
2121
serializeAws_restJson1MalformedAcceptWithGenericStringCommand,
2222
} from "../protocols/Aws_restJson1";
2323
import { RestJsonProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RestJsonProtocolClient";
2424

25-
export interface MalformedAcceptWithGenericStringCommandInput extends MalformedAcceptWithGenericStringInput {}
26-
export interface MalformedAcceptWithGenericStringCommandOutput extends __MetadataBearer {}
25+
export interface MalformedAcceptWithGenericStringCommandInput {}
26+
export interface MalformedAcceptWithGenericStringCommandOutput
27+
extends MalformedAcceptWithGenericStringOutput,
28+
__MetadataBearer {}
2729

2830
export class MalformedAcceptWithGenericStringCommand extends $Command<
2931
MalformedAcceptWithGenericStringCommandInput,
@@ -58,8 +60,8 @@ export class MalformedAcceptWithGenericStringCommand extends $Command<
5860
logger,
5961
clientName,
6062
commandName,
61-
inputFilterSensitiveLog: MalformedAcceptWithGenericStringInputFilterSensitiveLog,
62-
outputFilterSensitiveLog: (output: any) => output,
63+
inputFilterSensitiveLog: (input: any) => input,
64+
outputFilterSensitiveLog: MalformedAcceptWithGenericStringOutputFilterSensitiveLog,
6365
};
6466
const { requestHandler } = configuration;
6567
return stack.resolve(

0 commit comments

Comments
 (0)