commonMain.aws.sdk.kotlin.services.route53recoveryreadiness.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 route53recoveryreadiness-jvm Show documentation
Show all versions of route53recoveryreadiness-jvm Show documentation
The AWS SDK for Kotlin client for Route53 Recovery Readiness
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53recoveryreadiness.endpoints.internal
import aws.sdk.kotlin.services.route53recoveryreadiness.Route53RecoveryReadinessClient
import aws.sdk.kotlin.services.route53recoveryreadiness.endpoints.Route53RecoveryReadinessEndpointParameters
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: Route53RecoveryReadinessClient.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: Route53RecoveryReadinessClient.Config, request: ResolveEndpointRequest): Route53RecoveryReadinessEndpointParameters {
return Route53RecoveryReadinessEndpointParameters {
region = config.region
bindAwsBuiltins(config, request)
endpoint = config.endpointUrl?.toString()
val opName = request.context[SdkClientOption.OperationName]
opContextBindings[opName]?.invoke(this, request)
}
}
private typealias BindOperationContextParamsFn = (Route53RecoveryReadinessEndpointParameters.Builder, ResolveEndpointRequest) -> Unit
private val opContextBindings = mapOf (
)
private fun Route53RecoveryReadinessEndpointParameters.Builder.bindAwsBuiltins(config: Route53RecoveryReadinessClient.Config, request: ResolveEndpointRequest) {
useDualStack = config.useDualStack
useFips = config.useFips
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy