Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update config properties overrides #1437

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Sources/Services/AWSARCZonalShift/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSAccount/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSAmp/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSAmplifyUIBuilder/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSArtifact/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSB2bi/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSBackupGateway/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSBedrock/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSBedrockAgent/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSBedrockAgentRuntime/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSBraket/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSCleanRooms/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSCleanRoomsML/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSCodeCatalyst/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSConnectCases/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSControlCatalog/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSEMRServerless/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSEvidently/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSGroundStation/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSInternetMonitor/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSLaunchWizard/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSLocation/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSMediaPackageV2/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSMigrationHubOrchestrator/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSNeptuneGraph/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSNetworkMonitor/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSNimble/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSOmics/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSOpenSearchServerless/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSPcaConnectorAd/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSPipes/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSQConnect/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSRUM/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSRolesAnywhere/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSSageMakerGeospatial/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSScheduler/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSSimSpaceWeaver/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSSnowDeviceManagement/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSTimestreamInfluxDB/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSVPCLattice/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSVerifiedPermissions/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSWisdom/Paginators.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Sources/Services/AWSWorkSpacesWeb/Paginators.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,28 @@ class AWSHttpProtocolServiceClient(
"authSchemes" -> {
ConfigProperty("authSchemes", ClientRuntimeTypes.Auth.AuthSchemes.toOptional(), authSchemesDefaultProvider)
}
"retryStrategyOptions" -> {
ConfigProperty("retryStrategyOptions", ClientRuntimeTypes.Core.RetryStrategyOptions, "AWSClientConfigDefaultsProvider.retryStrategyOptions()", true)
}
"clientLogMode" -> {
ConfigProperty("clientLogMode", ClientRuntimeTypes.Core.ClientLogMode, "AWSClientConfigDefaultsProvider.clientLogMode")
}
"idempotencyTokenGenerator" -> {
ConfigProperty("idempotencyTokenGenerator", ClientRuntimeTypes.Core.IdempotencyTokenGenerator, "AWSClientConfigDefaultsProvider.idempotencyTokenGenerator")
}
"httpClientEngine" -> {
ConfigProperty("httpClientEngine", ClientRuntimeTypes.Http.HttpClient, "AWSClientConfigDefaultsProvider.httpClientEngine")
}
"httpClientConfiguration" -> {
ConfigProperty("httpClientConfiguration", ClientRuntimeTypes.Http.HttpClientConfiguration, "AWSClientConfigDefaultsProvider.httpClientConfiguration")
}
else -> it
}
}
}

override fun renderCustomConfigInitializer(properties: List<ConfigProperty>) {
renderEmptyAsynchronousConfigInitializer(properties)
renderRegionConfigInitializer(properties)
renderPartitionID()
}

/**
Expand Down Expand Up @@ -89,7 +102,7 @@ class AWSHttpProtocolServiceClient(
writer.write("")
}

private fun renderPartitionID() {
override fun renderPartitionID() {
writer.openBlock("public var partitionID: String? {", "}") {
writer.write("return \"\\(\$L.clientName) - \\(region ?? \"\")\"", serviceConfig.clientName.toUpperCamelCase())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ class RestJsonProtocolGeneratorTests {
public var authSchemes: [ClientRuntime.AuthScheme]?
public var authSchemeResolver: ClientRuntime.AuthSchemeResolver
internal let logger: ClientRuntime.LogAgent
private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ awsCredentialIdentityResolver: any AWSClientRuntime.AWSCredentialIdentityResolver, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ telemetryProvider: ClientRuntime.TelemetryProvider, _ retryStrategyOptions: ClientRuntime.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: ClientRuntime.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, _ authSchemes: [ClientRuntime.AuthScheme]?, _ authSchemeResolver: ClientRuntime.AuthSchemeResolver) {
self.useFIPS = useFIPS
self.useDualStack = useDualStack
Expand All @@ -173,23 +173,23 @@ class RestJsonProtocolGeneratorTests {
self.authSchemeResolver = authSchemeResolver
self.logger = telemetryProvider.loggerProvider.getLogger(name: ExampleClient.clientName)
}
public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: ClientRuntime.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: ClientRuntime.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ClientRuntime.AuthSchemeResolver? = nil) throws {
self.init(useFIPS, useDualStack, try appID ?? AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientConfigDefaultsProvider.retryMode(), region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode, endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator, httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine, httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration, authSchemes ?? [SigV4AuthScheme()], authSchemeResolver ?? DefaultExampleAuthSchemeResolver())
}
public convenience init(useFIPS: Swift.Bool? = nil, useDualStack: Swift.Bool? = nil, appID: Swift.String? = nil, awsCredentialIdentityResolver: (any AWSClientRuntime.AWSCredentialIdentityResolver)? = nil, awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, region: Swift.String? = nil, signingRegion: Swift.String? = nil, endpointResolver: EndpointResolver? = nil, telemetryProvider: ClientRuntime.TelemetryProvider? = nil, retryStrategyOptions: ClientRuntime.RetryStrategyOptions? = nil, clientLogMode: ClientRuntime.ClientLogMode? = nil, endpoint: Swift.String? = nil, idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, httpClientEngine: ClientRuntime.HTTPClient? = nil, httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, authSchemes: [ClientRuntime.AuthScheme]? = nil, authSchemeResolver: ClientRuntime.AuthSchemeResolver? = nil) async throws {
self.init(useFIPS, useDualStack, try appID ?? AWSClientConfigDefaultsProvider.appID(), try awsCredentialIdentityResolver ?? AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), try awsRetryMode ?? AWSClientConfigDefaultsProvider.retryMode(), try await AWSClientConfigDefaultsProvider.region(region), try await AWSClientConfigDefaultsProvider.region(region), try endpointResolver ?? DefaultEndpointResolver(), telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode, endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator, httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine, httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration, authSchemes ?? [SigV4AuthScheme()], authSchemeResolver ?? DefaultExampleAuthSchemeResolver())
}
public convenience required init() async throws {
try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, awsCredentialIdentityResolver: nil, awsRetryMode: nil, region: nil, signingRegion: nil, endpointResolver: nil, telemetryProvider: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil, authSchemes: nil, authSchemeResolver: nil)
}
public convenience init(region: String) throws {
self.init(nil, nil, try AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), try AWSClientConfigDefaultsProvider.retryMode(), region, region, try DefaultEndpointResolver(), ClientRuntime.DefaultTelemetry.provider, try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode, nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator, AWSClientConfigDefaultsProvider.httpClientEngine, AWSClientConfigDefaultsProvider.httpClientConfiguration, [SigV4AuthScheme()], DefaultExampleAuthSchemeResolver())
}
public var partitionID: String? {
return "\(ExampleClient.clientName) - \(region ?? "")"
}
Expand Down
Loading