From 97e6d1ca0327e161b57603b68b377140a26a4f82 Mon Sep 17 00:00:00 2001 From: George Fu Date: Mon, 5 May 2025 12:24:21 -0400 Subject: [PATCH] chore: update codegen for protocol tests --- .../src/auth/httpAuthSchemeProvider.ts | 23 +++++++++++++++++-- .../src/commands/EmptyInputOutputCommand.ts | 1 + .../src/commands/Float16Command.ts | 1 + .../src/commands/FractionalSecondsCommand.ts | 1 + .../src/commands/GreetingWithErrorsCommand.ts | 1 + .../src/commands/NoInputOutputCommand.ts | 1 + .../commands/OperationWithDefaultsCommand.ts | 1 + .../commands/OptionalInputOutputCommand.ts | 1 + .../src/commands/RecursiveShapesCommand.ts | 1 + .../src/commands/RpcV2CborDenseMapsCommand.ts | 1 + .../src/commands/RpcV2CborListsCommand.ts | 1 + .../commands/RpcV2CborSparseMapsCommand.ts | 1 + .../commands/SimpleScalarPropertiesCommand.ts | 1 + .../commands/SparseNullsOperationCommand.ts | 1 + 14 files changed, 34 insertions(+), 2 deletions(-) diff --git a/private/smithy-rpcv2-cbor/src/auth/httpAuthSchemeProvider.ts b/private/smithy-rpcv2-cbor/src/auth/httpAuthSchemeProvider.ts index 55bbd627a21..d4490b9636d 100644 --- a/private/smithy-rpcv2-cbor/src/auth/httpAuthSchemeProvider.ts +++ b/private/smithy-rpcv2-cbor/src/auth/httpAuthSchemeProvider.ts @@ -7,8 +7,9 @@ import { HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, + Provider, } from "@smithy/types"; -import { getSmithyContext } from "@smithy/util-middleware"; +import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware"; /** * @internal @@ -68,6 +69,14 @@ export const defaultRpcV2ProtocolHttpAuthSchemeProvider: RpcV2ProtocolHttpAuthSc * @internal */ export interface HttpAuthSchemeInputConfig { + /** + * A comma-separated list of case-sensitive auth scheme names. + * An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed. + * For example, the auth scheme with ID aws.auth#sigv4 is named sigv4. + * @public + */ + authSchemePreference?: string[] | Provider; + /** * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. * @internal @@ -85,6 +94,14 @@ export interface HttpAuthSchemeInputConfig { * @internal */ export interface HttpAuthSchemeResolvedConfig { + /** + * A comma-separated list of case-sensitive auth scheme names. + * An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed. + * For example, the auth scheme with ID aws.auth#sigv4 is named sigv4. + * @public + */ + readonly authSchemePreference: Provider; + /** * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. * @internal @@ -104,5 +121,7 @@ export interface HttpAuthSchemeResolvedConfig { export const resolveHttpAuthSchemeConfig = ( config: T & HttpAuthSchemeInputConfig ): T & HttpAuthSchemeResolvedConfig => { - return Object.assign(config, {}) as T & HttpAuthSchemeResolvedConfig; + return Object.assign(config, { + authSchemePreference: normalizeProvider(config.authSchemePreference ?? []), + }) as T & HttpAuthSchemeResolvedConfig; }; diff --git a/private/smithy-rpcv2-cbor/src/commands/EmptyInputOutputCommand.ts b/private/smithy-rpcv2-cbor/src/commands/EmptyInputOutputCommand.ts index 0e60c36f071..818184736b8 100644 --- a/private/smithy-rpcv2-cbor/src/commands/EmptyInputOutputCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/EmptyInputOutputCommand.ts @@ -49,6 +49,7 @@ export interface EmptyInputOutputCommandOutput extends EmptyStructure, __Metadat * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * */ export class EmptyInputOutputCommand extends $Command .classBuilder< diff --git a/private/smithy-rpcv2-cbor/src/commands/Float16Command.ts b/private/smithy-rpcv2-cbor/src/commands/Float16Command.ts index f2de09ee243..fde2ec6d78f 100644 --- a/private/smithy-rpcv2-cbor/src/commands/Float16Command.ts +++ b/private/smithy-rpcv2-cbor/src/commands/Float16Command.ts @@ -51,6 +51,7 @@ export interface Float16CommandOutput extends Float16Output, __MetadataBearer {} * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * */ export class Float16Command extends $Command .classBuilder< diff --git a/private/smithy-rpcv2-cbor/src/commands/FractionalSecondsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/FractionalSecondsCommand.ts index ce131c6a195..df0aefff431 100644 --- a/private/smithy-rpcv2-cbor/src/commands/FractionalSecondsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/FractionalSecondsCommand.ts @@ -51,6 +51,7 @@ export interface FractionalSecondsCommandOutput extends FractionalSecondsOutput, * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * */ export class FractionalSecondsCommand extends $Command .classBuilder< diff --git a/private/smithy-rpcv2-cbor/src/commands/GreetingWithErrorsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/GreetingWithErrorsCommand.ts index 9f374819462..3baab0929dd 100644 --- a/private/smithy-rpcv2-cbor/src/commands/GreetingWithErrorsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/GreetingWithErrorsCommand.ts @@ -63,6 +63,7 @@ export interface GreetingWithErrorsCommandOutput extends GreetingWithErrorsOutpu * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * * @public */ export class GreetingWithErrorsCommand extends $Command diff --git a/private/smithy-rpcv2-cbor/src/commands/NoInputOutputCommand.ts b/private/smithy-rpcv2-cbor/src/commands/NoInputOutputCommand.ts index 8859c9484a5..a71d4b936f5 100644 --- a/private/smithy-rpcv2-cbor/src/commands/NoInputOutputCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/NoInputOutputCommand.ts @@ -48,6 +48,7 @@ export interface NoInputOutputCommandOutput extends __MetadataBearer {} * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * */ export class NoInputOutputCommand extends $Command .classBuilder< diff --git a/private/smithy-rpcv2-cbor/src/commands/OperationWithDefaultsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/OperationWithDefaultsCommand.ts index 895a6e26fb3..62d2fd3f9c6 100644 --- a/private/smithy-rpcv2-cbor/src/commands/OperationWithDefaultsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/OperationWithDefaultsCommand.ts @@ -117,6 +117,7 @@ export interface OperationWithDefaultsCommandOutput extends OperationWithDefault * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * */ export class OperationWithDefaultsCommand extends $Command .classBuilder< diff --git a/private/smithy-rpcv2-cbor/src/commands/OptionalInputOutputCommand.ts b/private/smithy-rpcv2-cbor/src/commands/OptionalInputOutputCommand.ts index 10d706d5496..8463c19135c 100644 --- a/private/smithy-rpcv2-cbor/src/commands/OptionalInputOutputCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/OptionalInputOutputCommand.ts @@ -53,6 +53,7 @@ export interface OptionalInputOutputCommandOutput extends SimpleStructure, __Met * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * */ export class OptionalInputOutputCommand extends $Command .classBuilder< diff --git a/private/smithy-rpcv2-cbor/src/commands/RecursiveShapesCommand.ts b/private/smithy-rpcv2-cbor/src/commands/RecursiveShapesCommand.ts index c6cbf640477..1cb74b766ae 100644 --- a/private/smithy-rpcv2-cbor/src/commands/RecursiveShapesCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/RecursiveShapesCommand.ts @@ -77,6 +77,7 @@ export interface RecursiveShapesCommandOutput extends RecursiveShapesInputOutput * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * */ export class RecursiveShapesCommand extends $Command .classBuilder< diff --git a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborDenseMapsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborDenseMapsCommand.ts index 733838315cf..d9a87e0b479 100644 --- a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborDenseMapsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborDenseMapsCommand.ts @@ -93,6 +93,7 @@ export interface RpcV2CborDenseMapsCommandOutput extends RpcV2CborDenseMapsInput * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * * @public */ export class RpcV2CborDenseMapsCommand extends $Command diff --git a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborListsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborListsCommand.ts index 2d36006907e..41010e3cf9e 100644 --- a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborListsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborListsCommand.ts @@ -131,6 +131,7 @@ export interface RpcV2CborListsCommandOutput extends RpcV2CborListInputOutput, _ * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * * @public */ export class RpcV2CborListsCommand extends $Command diff --git a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborSparseMapsCommand.ts b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborSparseMapsCommand.ts index a70d44e374a..463f2ec8850 100644 --- a/private/smithy-rpcv2-cbor/src/commands/RpcV2CborSparseMapsCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/RpcV2CborSparseMapsCommand.ts @@ -94,6 +94,7 @@ export interface RpcV2CborSparseMapsCommandOutput extends RpcV2CborSparseMapsInp * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * */ export class RpcV2CborSparseMapsCommand extends $Command .classBuilder< diff --git a/private/smithy-rpcv2-cbor/src/commands/SimpleScalarPropertiesCommand.ts b/private/smithy-rpcv2-cbor/src/commands/SimpleScalarPropertiesCommand.ts index e8517f1a394..9af9f13932e 100644 --- a/private/smithy-rpcv2-cbor/src/commands/SimpleScalarPropertiesCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/SimpleScalarPropertiesCommand.ts @@ -71,6 +71,7 @@ export interface SimpleScalarPropertiesCommandOutput extends SimpleScalarStructu * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * */ export class SimpleScalarPropertiesCommand extends $Command .classBuilder< diff --git a/private/smithy-rpcv2-cbor/src/commands/SparseNullsOperationCommand.ts b/private/smithy-rpcv2-cbor/src/commands/SparseNullsOperationCommand.ts index bf07bfade30..4ebd26493ef 100644 --- a/private/smithy-rpcv2-cbor/src/commands/SparseNullsOperationCommand.ts +++ b/private/smithy-rpcv2-cbor/src/commands/SparseNullsOperationCommand.ts @@ -63,6 +63,7 @@ export interface SparseNullsOperationCommandOutput extends SparseNullsOperationI * @throws {@link RpcV2ProtocolServiceException} *

Base exception class for all service exceptions from RpcV2Protocol service.

* + * */ export class SparseNullsOperationCommand extends $Command .classBuilder<