Skip to content

Commit

Permalink
feat: update generated clients with client configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFossAWS committed Feb 17, 2024
1 parent 01a77a4 commit 9d46af7
Show file tree
Hide file tree
Showing 380 changed files with 43,483 additions and 19,791 deletions.
740 changes: 740 additions & 0 deletions Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md

Large diffs are not rendered by default.

115 changes: 88 additions & 27 deletions Sources/Services/AWSACM/ACMClient.swift

Large diffs are not rendered by default.

131 changes: 96 additions & 35 deletions Sources/Services/AWSACMPCA/ACMPCAClient.swift

Large diffs are not rendered by default.

325 changes: 193 additions & 132 deletions Sources/Services/AWSAPIGateway/APIGatewayClient.swift

Large diffs are not rendered by default.

107 changes: 84 additions & 23 deletions Sources/Services/AWSARCZonalShift/ARCZonalShiftClient.swift

Large diffs are not rendered by default.

149 changes: 105 additions & 44 deletions Sources/Services/AWSAccessAnalyzer/AccessAnalyzerClient.swift

Large diffs are not rendered by default.

103 changes: 82 additions & 21 deletions Sources/Services/AWSAccount/AccountClient.swift

Large diffs are not rendered by default.

271 changes: 166 additions & 105 deletions Sources/Services/AWSAlexaForBusiness/AlexaForBusinessClient.swift

Large diffs are not rendered by default.

137 changes: 99 additions & 38 deletions Sources/Services/AWSAmp/AmpClient.swift

Large diffs are not rendered by default.

159 changes: 110 additions & 49 deletions Sources/Services/AWSAmplify/AmplifyClient.swift

Large diffs are not rendered by default.

147 changes: 104 additions & 43 deletions Sources/Services/AWSAmplifyBackend/AmplifyBackendClient.swift

Large diffs are not rendered by default.

135 changes: 98 additions & 37 deletions Sources/Services/AWSAmplifyUIBuilder/AmplifyUIBuilderClient.swift

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ import ClientRuntime
import Foundation
import Logging

public class ApiGatewayManagementApiClient {
public class ApiGatewayManagementApiClient: Client {
public static let clientName = "ApiGatewayManagementApiClient"
let client: ClientRuntime.SdkHttpClient
let config: ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration
let serviceName = "ApiGatewayManagementApi"
let encoder: ClientRuntime.RequestEncoder
let decoder: ClientRuntime.ResponseDecoder

public init(config: ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration) {
public required init(config: ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration) {
client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration)
let encoder = ClientRuntime.JSONEncoder()
encoder.dateEncodingStrategy = .secondsSince1970
encoder.nonConformingFloatEncodingStrategy = .convertToString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN")
self.encoder = config.encoder ?? encoder
self.encoder = encoder
let decoder = ClientRuntime.JSONDecoder()
decoder.dateDecodingStrategy = .secondsSince1970
decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN")
self.decoder = config.decoder ?? decoder
self.decoder = decoder
self.config = config
}

Expand All @@ -31,25 +31,86 @@ public class ApiGatewayManagementApiClient {
self.init(config: config)
}

public convenience init() async throws {
public convenience required init() async throws {
let config = try await ApiGatewayManagementApiClient.ApiGatewayManagementApiClientConfiguration()
self.init(config: config)
}
}

extension ApiGatewayManagementApiClient {
public typealias ApiGatewayManagementApiClientConfiguration = AWSClientConfiguration<ServiceSpecificConfiguration>
public class ApiGatewayManagementApiClientConfiguration: AWSDefaultClientConfiguration & AWSRegionClientConfiguration & DefaultClientConfiguration & DefaultHttpClientConfiguration {
public var useFIPS: Swift.Bool?

public struct ServiceSpecificConfiguration: AWSServiceSpecificConfiguration {
public typealias AWSServiceEndpointResolver = EndpointResolver
public var useDualStack: Swift.Bool?

public var appID: Swift.String?

public var credentialsProvider: AWSClientRuntime.CredentialsProviding

public var awsRetryMode: AWSClientRuntime.AWSRetryMode

public var region: Swift.String?

public var signingRegion: Swift.String?

public var serviceName: String { "ApiGatewayManagementApi" }
public var clientName: String { "ApiGatewayManagementApiClient" }
public var endpointResolver: EndpointResolver

public init(endpointResolver: EndpointResolver? = nil) throws {
self.endpointResolver = try endpointResolver ?? DefaultEndpointResolver()
public var logger: ClientRuntime.LogAgent

public var retryStrategyOptions: ClientRuntime.RetryStrategyOptions

public var clientLogMode: ClientRuntime.ClientLogMode

public var endpoint: Swift.String?

public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator

public var httpClientEngine: ClientRuntime.HTTPClient

public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration

private init(_ useFIPS: Swift.Bool?, _ useDualStack: Swift.Bool?, _ appID: Swift.String?, _ credentialsProvider: AWSClientRuntime.CredentialsProviding, _ awsRetryMode: AWSClientRuntime.AWSRetryMode, _ region: Swift.String?, _ signingRegion: Swift.String?, _ endpointResolver: EndpointResolver, _ logger: ClientRuntime.LogAgent, _ retryStrategyOptions: ClientRuntime.RetryStrategyOptions, _ clientLogMode: ClientRuntime.ClientLogMode, _ endpoint: Swift.String?, _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, _ httpClientEngine: ClientRuntime.HTTPClient, _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration) {
self.useFIPS = useFIPS
self.useDualStack = useDualStack
self.appID = appID
self.credentialsProvider = credentialsProvider
self.awsRetryMode = awsRetryMode
self.region = region
self.signingRegion = signingRegion
self.endpointResolver = endpointResolver
self.logger = logger
self.retryStrategyOptions = retryStrategyOptions
self.clientLogMode = clientLogMode
self.endpoint = endpoint
self.idempotencyTokenGenerator = idempotencyTokenGenerator
self.httpClientEngine = httpClientEngine
self.httpClientConfiguration = httpClientConfiguration
}

public convenience init(useFIPS: Bool? = nil, useDualStack: Bool? = nil, appID: String? = nil, credentialsProvider: CredentialsProviding? = nil, awsRetryMode: AWSRetryMode? = nil, region: String? = nil, signingRegion: String? = nil, endpointResolver: EndpointResolver? = nil, logger: LogAgent? = nil, retryStrategyOptions: RetryStrategyOptions? = nil, clientLogMode: ClientLogMode? = nil, endpoint: String? = nil, idempotencyTokenGenerator: IdempotencyTokenGenerator? = nil, httpClientEngine: HTTPClient? = nil, httpClientConfiguration: HttpClientConfiguration? = nil) async throws {
self.init(useFIPS, useDualStack, try AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.credentialsProvider(), try AWSClientConfigDefaultsProvider.retryMode(), try await AWSClientConfigDefaultsProvider.region(region), try await AWSClientConfigDefaultsProvider.region(signingRegion), try DefaultEndpointResolver(), AWSClientConfigDefaultsProvider.logger(clientName), try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode, endpoint, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator, AWSClientConfigDefaultsProvider.httpClientEngine, AWSClientConfigDefaultsProvider.httpClientConfiguration)}

public convenience init(useFIPS: Bool? = nil, useDualStack: Bool? = nil, appID: String? = nil, credentialsProvider: CredentialsProviding? = nil, awsRetryMode: AWSRetryMode? = nil, region: String? = nil, signingRegion: String? = nil, endpointResolver: EndpointResolver? = nil, logger: LogAgent? = nil, retryStrategyOptions: RetryStrategyOptions? = nil, clientLogMode: ClientLogMode? = nil, endpoint: String? = nil, idempotencyTokenGenerator: IdempotencyTokenGenerator? = nil, httpClientEngine: HTTPClient? = nil, httpClientConfiguration: HttpClientConfiguration? = nil) throws {
self.init(useFIPS, useDualStack, try appID ?? AWSClientConfigDefaultsProvider.appID(), try credentialsProvider ?? AWSClientConfigDefaultsProvider.credentialsProvider(), try awsRetryMode ?? AWSClientConfigDefaultsProvider.retryMode(), region, signingRegion, try endpointResolver ?? DefaultEndpointResolver(), logger ?? AWSClientConfigDefaultsProvider.logger(clientName), try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(), clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode, endpoint, idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator, httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine, httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration)}

public convenience required init() async throws {
try await self.init(useFIPS: nil, useDualStack: nil, appID: nil, credentialsProvider: nil, awsRetryMode: nil, region: nil, signingRegion: nil, endpointResolver: nil, logger: nil, retryStrategyOptions: nil, clientLogMode: nil, endpoint: nil, idempotencyTokenGenerator: nil, httpClientEngine: nil, httpClientConfiguration: nil)
}

public convenience init(region: String) throws {
self.init(nil, nil, try AWSClientConfigDefaultsProvider.appID(), try AWSClientConfigDefaultsProvider.credentialsProvider(), try AWSClientConfigDefaultsProvider.retryMode(), region, region, try DefaultEndpointResolver(), AWSClientConfigDefaultsProvider.logger(clientName), try AWSClientConfigDefaultsProvider.retryStrategyOptions(), AWSClientConfigDefaultsProvider.clientLogMode, nil, AWSClientConfigDefaultsProvider.idempotencyTokenGenerator, AWSClientConfigDefaultsProvider.httpClientEngine, AWSClientConfigDefaultsProvider.httpClientConfiguration)
}

public var partitionID: String? {
return "\(ApiGatewayManagementApiClient.clientName) - \(region ?? "")"
}
}

public static func builder() -> ClientBuilder<ApiGatewayManagementApiClient> {
return ClientBuilder<ApiGatewayManagementApiClient>(defaultPlugins: [
ClientRuntime.DefaultClientPlugin(),
AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName)
])
}
}

Expand Down Expand Up @@ -100,7 +161,7 @@ extension ApiGatewayManagementApiClient {
operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware<DeleteConnectionInput, DeleteConnectionOutput>(DeleteConnectionInput.urlPathProvider(_:)))
operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware<DeleteConnectionInput, DeleteConnectionOutput>())
let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false)
operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware<DeleteConnectionOutput>(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams))
operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware<DeleteConnectionOutput>(endpointResolver: config.endpointResolver, endpointParams: endpointParams))
operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config)))
operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware<ClientRuntime.DefaultRetryStrategy, AWSClientRuntime.AWSRetryErrorInfoProvider, DeleteConnectionOutput>(options: config.retryStrategyOptions))
let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4)
Expand Down Expand Up @@ -144,7 +205,7 @@ extension ApiGatewayManagementApiClient {
operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware<GetConnectionInput, GetConnectionOutput>(GetConnectionInput.urlPathProvider(_:)))
operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware<GetConnectionInput, GetConnectionOutput>())
let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false)
operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware<GetConnectionOutput>(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams))
operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware<GetConnectionOutput>(endpointResolver: config.endpointResolver, endpointParams: endpointParams))
operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config)))
operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware<ClientRuntime.DefaultRetryStrategy, AWSClientRuntime.AWSRetryErrorInfoProvider, GetConnectionOutput>(options: config.retryStrategyOptions))
let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4)
Expand Down Expand Up @@ -189,7 +250,7 @@ extension ApiGatewayManagementApiClient {
operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLPathMiddleware<PostToConnectionInput, PostToConnectionOutput>(PostToConnectionInput.urlPathProvider(_:)))
operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware<PostToConnectionInput, PostToConnectionOutput>())
let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false)
operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware<PostToConnectionOutput>(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams))
operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware<PostToConnectionOutput>(endpointResolver: config.endpointResolver, endpointParams: endpointParams))
operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config)))
operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware<PostToConnectionInput, PostToConnectionOutput>(contentType: "application/octet-stream"))
operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BlobBodyMiddleware<PostToConnectionInput, PostToConnectionOutput>(keyPath: \.data))
Expand Down
Loading

0 comments on commit 9d46af7

Please sign in to comment.