Skip to content

Commit 201fcef

Browse files
authored
chore: update codegen for protocol tests relating to authSchemePreference (#1578)
1 parent fb9d29d commit 201fcef

14 files changed

+34
-2
lines changed

private/smithy-rpcv2-cbor/src/auth/httpAuthSchemeProvider.ts

+21-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import {
77
HttpAuthSchemeParameters,
88
HttpAuthSchemeParametersProvider,
99
HttpAuthSchemeProvider,
10+
Provider,
1011
} from "@smithy/types";
11-
import { getSmithyContext } from "@smithy/util-middleware";
12+
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
1213

1314
/**
1415
* @internal
@@ -68,6 +69,14 @@ export const defaultRpcV2ProtocolHttpAuthSchemeProvider: RpcV2ProtocolHttpAuthSc
6869
* @internal
6970
*/
7071
export interface HttpAuthSchemeInputConfig {
72+
/**
73+
* A comma-separated list of case-sensitive auth scheme names.
74+
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
75+
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
76+
* @public
77+
*/
78+
authSchemePreference?: string[] | Provider<string[]>;
79+
7180
/**
7281
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
7382
* @internal
@@ -85,6 +94,14 @@ export interface HttpAuthSchemeInputConfig {
8594
* @internal
8695
*/
8796
export interface HttpAuthSchemeResolvedConfig {
97+
/**
98+
* A comma-separated list of case-sensitive auth scheme names.
99+
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
100+
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
101+
* @public
102+
*/
103+
readonly authSchemePreference: Provider<string[]>;
104+
88105
/**
89106
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
90107
* @internal
@@ -104,5 +121,7 @@ export interface HttpAuthSchemeResolvedConfig {
104121
export const resolveHttpAuthSchemeConfig = <T>(
105122
config: T & HttpAuthSchemeInputConfig
106123
): T & HttpAuthSchemeResolvedConfig => {
107-
return Object.assign(config, {}) as T & HttpAuthSchemeResolvedConfig;
124+
return Object.assign(config, {
125+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
126+
}) as T & HttpAuthSchemeResolvedConfig;
108127
};

private/smithy-rpcv2-cbor/src/commands/EmptyInputOutputCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export interface EmptyInputOutputCommandOutput extends EmptyStructure, __Metadat
4949
* @throws {@link RpcV2ProtocolServiceException}
5050
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
5151
*
52+
*
5253
*/
5354
export class EmptyInputOutputCommand extends $Command
5455
.classBuilder<

private/smithy-rpcv2-cbor/src/commands/Float16Command.ts

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export interface Float16CommandOutput extends Float16Output, __MetadataBearer {}
5151
* @throws {@link RpcV2ProtocolServiceException}
5252
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
5353
*
54+
*
5455
*/
5556
export class Float16Command extends $Command
5657
.classBuilder<

private/smithy-rpcv2-cbor/src/commands/FractionalSecondsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export interface FractionalSecondsCommandOutput extends FractionalSecondsOutput,
5151
* @throws {@link RpcV2ProtocolServiceException}
5252
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
5353
*
54+
*
5455
*/
5556
export class FractionalSecondsCommand extends $Command
5657
.classBuilder<

private/smithy-rpcv2-cbor/src/commands/GreetingWithErrorsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export interface GreetingWithErrorsCommandOutput extends GreetingWithErrorsOutpu
6363
* @throws {@link RpcV2ProtocolServiceException}
6464
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
6565
*
66+
*
6667
* @public
6768
*/
6869
export class GreetingWithErrorsCommand extends $Command

private/smithy-rpcv2-cbor/src/commands/NoInputOutputCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export interface NoInputOutputCommandOutput extends __MetadataBearer {}
4848
* @throws {@link RpcV2ProtocolServiceException}
4949
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
5050
*
51+
*
5152
*/
5253
export class NoInputOutputCommand extends $Command
5354
.classBuilder<

private/smithy-rpcv2-cbor/src/commands/OperationWithDefaultsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export interface OperationWithDefaultsCommandOutput extends OperationWithDefault
117117
* @throws {@link RpcV2ProtocolServiceException}
118118
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
119119
*
120+
*
120121
*/
121122
export class OperationWithDefaultsCommand extends $Command
122123
.classBuilder<

private/smithy-rpcv2-cbor/src/commands/OptionalInputOutputCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export interface OptionalInputOutputCommandOutput extends SimpleStructure, __Met
5353
* @throws {@link RpcV2ProtocolServiceException}
5454
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
5555
*
56+
*
5657
*/
5758
export class OptionalInputOutputCommand extends $Command
5859
.classBuilder<

private/smithy-rpcv2-cbor/src/commands/RecursiveShapesCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export interface RecursiveShapesCommandOutput extends RecursiveShapesInputOutput
7777
* @throws {@link RpcV2ProtocolServiceException}
7878
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
7979
*
80+
*
8081
*/
8182
export class RecursiveShapesCommand extends $Command
8283
.classBuilder<

private/smithy-rpcv2-cbor/src/commands/RpcV2CborDenseMapsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export interface RpcV2CborDenseMapsCommandOutput extends RpcV2CborDenseMapsInput
9393
* @throws {@link RpcV2ProtocolServiceException}
9494
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
9595
*
96+
*
9697
* @public
9798
*/
9899
export class RpcV2CborDenseMapsCommand extends $Command

private/smithy-rpcv2-cbor/src/commands/RpcV2CborListsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export interface RpcV2CborListsCommandOutput extends RpcV2CborListInputOutput, _
131131
* @throws {@link RpcV2ProtocolServiceException}
132132
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
133133
*
134+
*
134135
* @public
135136
*/
136137
export class RpcV2CborListsCommand extends $Command

private/smithy-rpcv2-cbor/src/commands/RpcV2CborSparseMapsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export interface RpcV2CborSparseMapsCommandOutput extends RpcV2CborSparseMapsInp
9494
* @throws {@link RpcV2ProtocolServiceException}
9595
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
9696
*
97+
*
9798
*/
9899
export class RpcV2CborSparseMapsCommand extends $Command
99100
.classBuilder<

private/smithy-rpcv2-cbor/src/commands/SimpleScalarPropertiesCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export interface SimpleScalarPropertiesCommandOutput extends SimpleScalarStructu
7171
* @throws {@link RpcV2ProtocolServiceException}
7272
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
7373
*
74+
*
7475
*/
7576
export class SimpleScalarPropertiesCommand extends $Command
7677
.classBuilder<

private/smithy-rpcv2-cbor/src/commands/SparseNullsOperationCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export interface SparseNullsOperationCommandOutput extends SparseNullsOperationI
6363
* @throws {@link RpcV2ProtocolServiceException}
6464
* <p>Base exception class for all service exceptions from RpcV2Protocol service.</p>
6565
*
66+
*
6667
*/
6768
export class SparseNullsOperationCommand extends $Command
6869
.classBuilder<

0 commit comments

Comments
 (0)