Skip to content

Commit

Permalink
chore(clients): regenerate for smithy 1.23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gosar committed Aug 17, 2022
1 parent 8457909 commit 2cfc4aa
Show file tree
Hide file tree
Showing 10 changed files with 595 additions and 213 deletions.
17 changes: 13 additions & 4 deletions clients/client-kafkaconnect/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const serializeAws_restJson1CreateConnectorCommand = async (
body = JSON.stringify({
...(input.capacity != null && { capacity: serializeAws_restJson1Capacity(input.capacity, context) }),
...(input.connectorConfiguration != null && {
connectorConfiguration: serializeAws_restJson1__mapOf__string(input.connectorConfiguration, context),
connectorConfiguration: serializeAws_restJson1__sensitive__mapOf__string(input.connectorConfiguration, context),
}),
...(input.connectorDescription != null && { connectorDescription: input.connectorDescription }),
...(input.connectorName != null && { connectorName: input.connectorName }),
Expand Down Expand Up @@ -822,7 +822,10 @@ export const deserializeAws_restJson1DescribeConnectorCommand = async (
contents.connectorArn = __expectString(data.connectorArn);
}
if (data.connectorConfiguration != null) {
contents.connectorConfiguration = deserializeAws_restJson1__mapOf__string(data.connectorConfiguration, context);
contents.connectorConfiguration = deserializeAws_restJson1__sensitive__mapOf__string(
data.connectorConfiguration,
context
);
}
if (data.connectorDescription != null) {
contents.connectorDescription = __expectString(data.connectorDescription);
Expand Down Expand Up @@ -1467,7 +1470,10 @@ const serializeAws_restJson1__listOfPlugin = (input: Plugin[], context: __SerdeC
});
};

const serializeAws_restJson1__mapOf__string = (input: Record<string, string>, context: __SerdeContext): any => {
const serializeAws_restJson1__sensitive__mapOf__string = (
input: Record<string, string>,
context: __SerdeContext
): any => {
return Object.entries(input).reduce((acc: Record<string, any>, [key, value]: [string, any]) => {
if (value === null) {
return acc;
Expand Down Expand Up @@ -1758,7 +1764,10 @@ const deserializeAws_restJson1__listOfWorkerConfigurationSummary = (
return retVal;
};

const deserializeAws_restJson1__mapOf__string = (output: any, context: __SerdeContext): Record<string, string> => {
const deserializeAws_restJson1__sensitive__mapOf__string = (
output: any,
context: __SerdeContext
): Record<string, string> => {
return Object.entries(output).reduce((acc: Record<string, string>, [key, value]: [string, any]) => {
if (value === null) {
return acc;
Expand Down
68 changes: 37 additions & 31 deletions private/aws-protocoltests-restjson/src/RestJsonProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,6 @@ import {
MalformedRequestBodyCommandInput,
MalformedRequestBodyCommandOutput,
} from "./commands/MalformedRequestBodyCommand";
import {
MalformedSetCommand,
MalformedSetCommandInput,
MalformedSetCommandOutput,
} from "./commands/MalformedSetCommand";
import {
MalformedShortCommand,
MalformedShortCommandInput,
Expand Down Expand Up @@ -341,6 +336,11 @@ import {
PostPlayerActionCommandInput,
PostPlayerActionCommandOutput,
} from "./commands/PostPlayerActionCommand";
import {
PostUnionWithJsonNameCommand,
PostUnionWithJsonNameCommandInput,
PostUnionWithJsonNameCommandOutput,
} from "./commands/PostUnionWithJsonNameCommand";
import {
QueryIdempotencyTokenAutoFillCommand,
QueryIdempotencyTokenAutoFillCommandInput,
Expand Down Expand Up @@ -1912,32 +1912,6 @@ export class RestJsonProtocol extends RestJsonProtocolClient {
}
}

public malformedSet(
args: MalformedSetCommandInput,
options?: __HttpHandlerOptions
): Promise<MalformedSetCommandOutput>;
public malformedSet(args: MalformedSetCommandInput, cb: (err: any, data?: MalformedSetCommandOutput) => void): void;
public malformedSet(
args: MalformedSetCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: MalformedSetCommandOutput) => void
): void;
public malformedSet(
args: MalformedSetCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: MalformedSetCommandOutput) => void),
cb?: (err: any, data?: MalformedSetCommandOutput) => void
): Promise<MalformedSetCommandOutput> | void {
const command = new MalformedSetCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

public malformedShort(
args: MalformedShortCommandInput,
options?: __HttpHandlerOptions
Expand Down Expand Up @@ -2602,6 +2576,38 @@ export class RestJsonProtocol extends RestJsonProtocolClient {
}
}

/**
* This operation defines a union that uses jsonName on some members.
*/
public postUnionWithJsonName(
args: PostUnionWithJsonNameCommandInput,
options?: __HttpHandlerOptions
): Promise<PostUnionWithJsonNameCommandOutput>;
public postUnionWithJsonName(
args: PostUnionWithJsonNameCommandInput,
cb: (err: any, data?: PostUnionWithJsonNameCommandOutput) => void
): void;
public postUnionWithJsonName(
args: PostUnionWithJsonNameCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PostUnionWithJsonNameCommandOutput) => void
): void;
public postUnionWithJsonName(
args: PostUnionWithJsonNameCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PostUnionWithJsonNameCommandOutput) => void),
cb?: (err: any, data?: PostUnionWithJsonNameCommandOutput) => void
): Promise<PostUnionWithJsonNameCommandOutput> | void {
const command = new PostUnionWithJsonNameCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* Automatically adds idempotency tokens.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ import {
MalformedRequestBodyCommandInput,
MalformedRequestBodyCommandOutput,
} from "./commands/MalformedRequestBodyCommand";
import { MalformedSetCommandInput, MalformedSetCommandOutput } from "./commands/MalformedSetCommand";
import { MalformedShortCommandInput, MalformedShortCommandOutput } from "./commands/MalformedShortCommand";
import { MalformedStringCommandInput, MalformedStringCommandOutput } from "./commands/MalformedStringCommand";
import {
Expand Down Expand Up @@ -243,6 +242,10 @@ import {
OmitsNullSerializesEmptyStringCommandOutput,
} from "./commands/OmitsNullSerializesEmptyStringCommand";
import { PostPlayerActionCommandInput, PostPlayerActionCommandOutput } from "./commands/PostPlayerActionCommand";
import {
PostUnionWithJsonNameCommandInput,
PostUnionWithJsonNameCommandOutput,
} from "./commands/PostUnionWithJsonNameCommand";
import {
QueryIdempotencyTokenAutoFillCommandInput,
QueryIdempotencyTokenAutoFillCommandOutput,
Expand Down Expand Up @@ -330,7 +333,6 @@ export type ServiceInputTypes =
| MalformedLongCommandInput
| MalformedMapCommandInput
| MalformedRequestBodyCommandInput
| MalformedSetCommandInput
| MalformedShortCommandInput
| MalformedStringCommandInput
| MalformedTimestampBodyDateTimeCommandInput
Expand All @@ -353,6 +355,7 @@ export type ServiceInputTypes =
| NullAndEmptyHeadersServerCommandInput
| OmitsNullSerializesEmptyStringCommandInput
| PostPlayerActionCommandInput
| PostUnionWithJsonNameCommandInput
| QueryIdempotencyTokenAutoFillCommandInput
| QueryParamsAsStringListMapCommandInput
| QueryPrecedenceCommandInput
Expand Down Expand Up @@ -418,7 +421,6 @@ export type ServiceOutputTypes =
| MalformedLongCommandOutput
| MalformedMapCommandOutput
| MalformedRequestBodyCommandOutput
| MalformedSetCommandOutput
| MalformedShortCommandOutput
| MalformedStringCommandOutput
| MalformedTimestampBodyDateTimeCommandOutput
Expand All @@ -441,6 +443,7 @@ export type ServiceOutputTypes =
| NullAndEmptyHeadersServerCommandOutput
| OmitsNullSerializesEmptyStringCommandOutput
| PostPlayerActionCommandOutput
| PostUnionWithJsonNameCommandOutput
| QueryIdempotencyTokenAutoFillCommandOutput
| QueryParamsAsStringListMapCommandOutput
| QueryPrecedenceCommandOutput
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import {
PostUnionWithJsonNameInput,
PostUnionWithJsonNameInputFilterSensitiveLog,
PostUnionWithJsonNameOutput,
PostUnionWithJsonNameOutputFilterSensitiveLog,
} from "../models/models_0";
import {
deserializeAws_restJson1PostUnionWithJsonNameCommand,
serializeAws_restJson1PostUnionWithJsonNameCommand,
} from "../protocols/Aws_restJson1";
import { RestJsonProtocolClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RestJsonProtocolClient";

export interface PostUnionWithJsonNameCommandInput extends PostUnionWithJsonNameInput {}
export interface PostUnionWithJsonNameCommandOutput extends PostUnionWithJsonNameOutput, __MetadataBearer {}

/**
* This operation defines a union that uses jsonName on some members.
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RestJsonProtocolClient, PostUnionWithJsonNameCommand } from "@aws-sdk/aws-protocoltests-restjson"; // ES Modules import
* // const { RestJsonProtocolClient, PostUnionWithJsonNameCommand } = require("@aws-sdk/aws-protocoltests-restjson"); // CommonJS import
* const client = new RestJsonProtocolClient(config);
* const command = new PostUnionWithJsonNameCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link PostUnionWithJsonNameCommandInput} for command's `input` shape.
* @see {@link PostUnionWithJsonNameCommandOutput} for command's `response` shape.
* @see {@link RestJsonProtocolClientResolvedConfig | config} for RestJsonProtocolClient's `config` shape.
*
*/
export class PostUnionWithJsonNameCommand extends $Command<
PostUnionWithJsonNameCommandInput,
PostUnionWithJsonNameCommandOutput,
RestJsonProtocolClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: PostUnionWithJsonNameCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: RestJsonProtocolClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<PostUnionWithJsonNameCommandInput, PostUnionWithJsonNameCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "RestJsonProtocolClient";
const commandName = "PostUnionWithJsonNameCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: PostUnionWithJsonNameInputFilterSensitiveLog,
outputFilterSensitiveLog: PostUnionWithJsonNameOutputFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: PostUnionWithJsonNameCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_restJson1PostUnionWithJsonNameCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<PostUnionWithJsonNameCommandOutput> {
return deserializeAws_restJson1PostUnionWithJsonNameCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
2 changes: 1 addition & 1 deletion private/aws-protocoltests-restjson/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export * from "./MalformedListCommand";
export * from "./MalformedLongCommand";
export * from "./MalformedMapCommand";
export * from "./MalformedRequestBodyCommand";
export * from "./MalformedSetCommand";
export * from "./MalformedShortCommand";
export * from "./MalformedStringCommand";
export * from "./MalformedTimestampBodyDateTimeCommand";
Expand All @@ -71,6 +70,7 @@ export * from "./NullAndEmptyHeadersClientCommand";
export * from "./NullAndEmptyHeadersServerCommand";
export * from "./OmitsNullSerializesEmptyStringCommand";
export * from "./PostPlayerActionCommand";
export * from "./PostUnionWithJsonNameCommand";
export * from "./QueryIdempotencyTokenAutoFillCommand";
export * from "./QueryParamsAsStringListMapCommand";
export * from "./QueryPrecedenceCommand";
Expand Down
Loading

0 comments on commit 2cfc4aa

Please sign in to comment.