commonMain.aws.sdk.kotlin.services.glacier.endpoints.internal.EndpointResolverAdapter.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glacier-jvm Show documentation
Show all versions of glacier-jvm Show documentation
The AWS Kotlin client for Glacier
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glacier.endpoints.internal
import aws.sdk.kotlin.services.glacier.GlacierClient
import aws.sdk.kotlin.services.glacier.endpoints.GlacierEndpointParameters
import aws.smithy.kotlin.runtime.client.SdkClientOption
import aws.smithy.kotlin.runtime.client.endpoints.Endpoint
import aws.smithy.kotlin.runtime.collections.get
import aws.smithy.kotlin.runtime.http.operation.EndpointResolver
import aws.smithy.kotlin.runtime.http.operation.ResolveEndpointRequest
internal class EndpointResolverAdapter(
private val config: GlacierClient.Config
): EndpointResolver {
override suspend fun resolve(request: ResolveEndpointRequest): Endpoint {
val params = resolveEndpointParams(config, request)
val endpoint = config.endpointProvider.resolveEndpoint(params)
return endpoint
}
}
internal fun resolveEndpointParams(config: GlacierClient.Config, request: ResolveEndpointRequest): GlacierEndpointParameters {
return GlacierEndpointParameters {
bindAwsBuiltins(config, request)
val opName = request.context[SdkClientOption.OperationName]
opContextBindings[opName]?.invoke(this, request)
}
}
private typealias BindOperationContextParamsFn = (GlacierEndpointParameters.Builder, ResolveEndpointRequest) -> Unit
private val opContextBindings = mapOf (
)
private fun GlacierEndpointParameters.Builder.bindAwsBuiltins(config: GlacierClient.Config, request: ResolveEndpointRequest) {
region = config.region
useDualStack = config.useDualStack
useFips = config.useFips
endpoint = config.endpointUrl?.toString()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy