AWS SDK

AWS SDK

rev. 2493670155f3f484f4055f00c7816463c1a2ced2..ac5e22252d1e170d05dd8b11ceb2a7a284cd7f2e (ignoring whitespace)

Files changed:

tmp-codegen-diff/services/s3/generated-src/main/kotlin/aws/sdk/kotlin/services/s3/model/StorageClassAnalysisSchemaVersion.kt

@@ -3,3 +37,37 @@
   23     23   
        public fun fromValue(value: kotlin.String): aws.sdk.kotlin.services.s3.model.StorageClassAnalysisSchemaVersion = when (value) {
   24     24   
            "V_1" -> V1
   25     25   
            else -> SdkUnknown(value)
   26     26   
        }
   27     27   
   28     28   
        /**
   29     29   
         * Get a list of all possible variants
   30     30   
         */
   31     31   
        public fun values(): kotlin.collections.List<aws.sdk.kotlin.services.s3.model.StorageClassAnalysisSchemaVersion> = values
   32     32   
   33         -
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.StorageClassAnalysisSchemaVersion> = listOf(
          33  +
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.StorageClassAnalysisSchemaVersion> by lazy { listOf(
   34     34   
            V1,
   35         -
        )
          35  +
        ) }
   36     36   
    }
   37     37   
}

tmp-codegen-diff/services/s3/generated-src/main/kotlin/aws/sdk/kotlin/services/s3/model/TableSseAlgorithm.kt

@@ -9,9 +44,44 @@
   29     29   
            "AES256" -> Aes256
   30     30   
            "aws:kms" -> AwsKms
   31     31   
            else -> SdkUnknown(value)
   32     32   
        }
   33     33   
   34     34   
        /**
   35     35   
         * Get a list of all possible variants
   36     36   
         */
   37     37   
        public fun values(): kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TableSseAlgorithm> = values
   38     38   
   39         -
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TableSseAlgorithm> = listOf(
          39  +
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TableSseAlgorithm> by lazy { listOf(
   40     40   
            Aes256,
   41     41   
            AwsKms,
   42         -
        )
          42  +
        ) }
   43     43   
    }
   44     44   
}

tmp-codegen-diff/services/s3/generated-src/main/kotlin/aws/sdk/kotlin/services/s3/model/TaggingDirective.kt

@@ -9,9 +44,44 @@
   29     29   
            "COPY" -> Copy
   30     30   
            "REPLACE" -> Replace
   31     31   
            else -> SdkUnknown(value)
   32     32   
        }
   33     33   
   34     34   
        /**
   35     35   
         * Get a list of all possible variants
   36     36   
         */
   37     37   
        public fun values(): kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TaggingDirective> = values
   38     38   
   39         -
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TaggingDirective> = listOf(
          39  +
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TaggingDirective> by lazy { listOf(
   40     40   
            Copy,
   41     41   
            Replace,
   42         -
        )
          42  +
        ) }
   43     43   
    }
   44     44   
}

tmp-codegen-diff/services/s3/generated-src/main/kotlin/aws/sdk/kotlin/services/s3/model/Tier.kt

@@ -15,15 +51,51 @@
   35     35   
            "Expedited" -> Expedited
   36     36   
            "Standard" -> Standard
   37     37   
            else -> SdkUnknown(value)
   38     38   
        }
   39     39   
   40     40   
        /**
   41     41   
         * Get a list of all possible variants
   42     42   
         */
   43     43   
        public fun values(): kotlin.collections.List<aws.sdk.kotlin.services.s3.model.Tier> = values
   44     44   
   45         -
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.Tier> = listOf(
          45  +
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.Tier> by lazy { listOf(
   46     46   
            Bulk,
   47     47   
            Expedited,
   48     48   
            Standard,
   49         -
        )
          49  +
        ) }
   50     50   
    }
   51     51   
}

tmp-codegen-diff/services/s3/generated-src/main/kotlin/aws/sdk/kotlin/services/s3/model/TransitionDefaultMinimumObjectSize.kt

@@ -9,9 +44,44 @@
   29     29   
            "all_storage_classes_128K" -> AllStorageClasses128K
   30     30   
            "varies_by_storage_class" -> VariesByStorageClass
   31     31   
            else -> SdkUnknown(value)
   32     32   
        }
   33     33   
   34     34   
        /**
   35     35   
         * Get a list of all possible variants
   36     36   
         */
   37     37   
        public fun values(): kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TransitionDefaultMinimumObjectSize> = values
   38     38   
   39         -
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TransitionDefaultMinimumObjectSize> = listOf(
          39  +
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TransitionDefaultMinimumObjectSize> by lazy { listOf(
   40     40   
            AllStorageClasses128K,
   41     41   
            VariesByStorageClass,
   42         -
        )
          42  +
        ) }
   43     43   
    }
   44     44   
}

tmp-codegen-diff/services/s3/generated-src/main/kotlin/aws/sdk/kotlin/services/s3/model/TransitionStorageClass.kt

@@ -33,33 +72,72 @@
   53     53   
            "ONEZONE_IA" -> OnezoneIa
   54     54   
            "STANDARD_IA" -> StandardIa
   55     55   
            else -> SdkUnknown(value)
   56     56   
        }
   57     57   
   58     58   
        /**
   59     59   
         * Get a list of all possible variants
   60     60   
         */
   61     61   
        public fun values(): kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TransitionStorageClass> = values
   62     62   
   63         -
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TransitionStorageClass> = listOf(
          63  +
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.TransitionStorageClass> by lazy { listOf(
   64     64   
            DeepArchive,
   65     65   
            Glacier,
   66     66   
            GlacierIr,
   67     67   
            IntelligentTiering,
   68     68   
            OnezoneIa,
   69     69   
            StandardIa,
   70         -
        )
          70  +
        ) }
   71     71   
    }
   72     72   
}

tmp-codegen-diff/services/s3/generated-src/main/kotlin/aws/sdk/kotlin/services/s3/model/Type.kt

@@ -15,15 +51,51 @@
   35     35   
            "CanonicalUser" -> CanonicalUser
   36     36   
            "Group" -> Group
   37     37   
            else -> SdkUnknown(value)
   38     38   
        }
   39     39   
   40     40   
        /**
   41     41   
         * Get a list of all possible variants
   42     42   
         */
   43     43   
        public fun values(): kotlin.collections.List<aws.sdk.kotlin.services.s3.model.Type> = values
   44     44   
   45         -
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.Type> = listOf(
          45  +
        private val values: kotlin.collections.List<aws.sdk.kotlin.services.s3.model.Type> by lazy { listOf(
   46     46   
            AmazonCustomerByEmail,
   47     47   
            CanonicalUser,
   48     48   
            Group,
   49         -
        )
          49  +
        ) }
   50     50   
    }
   51     51   
}

tmp-codegen-diff/services/sts/build.gradle.kts

@@ -1,1 +34,34 @@
    1      1   
    2      2   
description = "The AWS SDK for Kotlin client for STS"
    3      3   
project.ext.set("aws.sdk.id", "STS")
    4      4   
    5      5   
kotlin {
    6      6   
    sourceSets {
    7      7   
        commonMain {
    8      8   
            dependencies {
    9         -
                implementation("aws.smithy.kotlin:aws-credentials:1.6.8-SNAPSHOT")
           9  +
                implementation("aws.smithy.kotlin:aws-credentials:1.6.13-SNAPSHOT")
   10     10   
                implementation(project(":aws-runtime:aws-http"))
   11         -
                implementation("aws.smithy.kotlin:aws-protocol-core:1.6.8-SNAPSHOT")
   12         -
                implementation("aws.smithy.kotlin:aws-signing-common:1.6.8-SNAPSHOT")
   13         -
                implementation("aws.smithy.kotlin:aws-signing-default:1.6.8-SNAPSHOT")
   14         -
                implementation("aws.smithy.kotlin:aws-xml-protocols:1.6.8-SNAPSHOT")
   15         -
                implementation("aws.smithy.kotlin:http:1.6.8-SNAPSHOT")
   16         -
                implementation("aws.smithy.kotlin:http-auth:1.6.8-SNAPSHOT")
   17         -
                implementation("aws.smithy.kotlin:http-auth-aws:1.6.8-SNAPSHOT")
   18         -
                implementation("aws.smithy.kotlin:http-client-engine-default:1.6.8-SNAPSHOT")
   19         -
                implementation("aws.smithy.kotlin:identity-api:1.6.8-SNAPSHOT")
   20         -
                implementation("aws.smithy.kotlin:serde:1.6.8-SNAPSHOT")
   21         -
                implementation("aws.smithy.kotlin:serde-form-url:1.6.8-SNAPSHOT")
   22         -
                implementation("aws.smithy.kotlin:serde-xml:1.6.8-SNAPSHOT")
   23         -
                implementation("aws.smithy.kotlin:telemetry-defaults:1.6.8-SNAPSHOT")
          11  +
                implementation("aws.smithy.kotlin:aws-protocol-core:1.6.13-SNAPSHOT")
          12  +
                implementation("aws.smithy.kotlin:aws-signing-common:1.6.13-SNAPSHOT")
          13  +
                implementation("aws.smithy.kotlin:aws-signing-default:1.6.13-SNAPSHOT")
          14  +
                implementation("aws.smithy.kotlin:aws-xml-protocols:1.6.13-SNAPSHOT")
          15  +
                implementation("aws.smithy.kotlin:http:1.6.13-SNAPSHOT")
          16  +
                implementation("aws.smithy.kotlin:http-auth:1.6.13-SNAPSHOT")
          17  +
                implementation("aws.smithy.kotlin:http-auth-aws:1.6.13-SNAPSHOT")
          18  +
                implementation("aws.smithy.kotlin:http-client-engine-default:1.6.13-SNAPSHOT")
          19  +
                implementation("aws.smithy.kotlin:identity-api:1.6.13-SNAPSHOT")
          20  +
                implementation("aws.smithy.kotlin:serde:1.6.13-SNAPSHOT")
          21  +
                implementation("aws.smithy.kotlin:serde-form-url:1.6.13-SNAPSHOT")
          22  +
                implementation("aws.smithy.kotlin:serde-xml:1.6.13-SNAPSHOT")
          23  +
                implementation("aws.smithy.kotlin:telemetry-defaults:1.6.13-SNAPSHOT")
   24     24   
                api(project(":aws-runtime:aws-config"))
   25     25   
                api(project(":aws-runtime:aws-core"))
   26     26   
                api(project(":aws-runtime:aws-endpoint"))
   27         -
                api("aws.smithy.kotlin:http-client:1.6.8-SNAPSHOT")
   28         -
                api("aws.smithy.kotlin:runtime-core:1.6.8-SNAPSHOT")
   29         -
                api("aws.smithy.kotlin:smithy-client:1.6.8-SNAPSHOT")
   30         -
                api("aws.smithy.kotlin:telemetry-api:1.6.8-SNAPSHOT")
          27  +
                api("aws.smithy.kotlin:http-client:1.6.13-SNAPSHOT")
          28  +
                api("aws.smithy.kotlin:runtime-core:1.6.13-SNAPSHOT")
          29  +
                api("aws.smithy.kotlin:smithy-client:1.6.13-SNAPSHOT")
          30  +
                api("aws.smithy.kotlin:telemetry-api:1.6.13-SNAPSHOT")
   31     31   
            }
   32     32   
        }
   33     33   
    }
   34     34   
}

tmp-codegen-diff/services/sts/build/tmp/jvmJar/MANIFEST.MF

@@ -1,0 +2,0 @@
    1         -
Manifest-Version: 1.0
    2         -

tmp-codegen-diff/services/sts/e2eTest/src/STSPresignerTest.kt

@@ -1,1 +39,40 @@
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
package aws.sdk.kotlin.services.sts
    6      6   
    7      7   
import aws.sdk.kotlin.services.sts.model.GetCallerIdentityRequest
    8      8   
import aws.sdk.kotlin.services.sts.presigners.presignGetCallerIdentity
    9      9   
import aws.sdk.kotlin.testing.withAllEngines
   10     10   
import aws.smithy.kotlin.runtime.http.SdkHttpClient
   11     11   
import aws.smithy.kotlin.runtime.http.complete
          12  +
import aws.smithy.kotlin.runtime.testing.TestInstance
          13  +
import aws.smithy.kotlin.runtime.testing.TestLifecycle
   12     14   
import kotlinx.coroutines.runBlocking
   13         -
import org.junit.jupiter.api.TestInstance
   14     15   
import kotlin.test.Test
   15     16   
import kotlin.test.assertEquals
   16     17   
import kotlin.time.Duration.Companion.seconds
   17     18   
   18     19   
/**
   19     20   
 * Tests for presigner
   20     21   
 */
   21         -
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
          22  +
@TestInstance(TestLifecycle.PER_CLASS)
   22     23   
class StsPresignerTest {
   23     24   
    @Test
   24     25   
    fun testGetCallerIdentityPresigner() = runBlocking {
   25     26   
        val req = GetCallerIdentityRequest { }
   26     27   
   27     28   
        val presignedRequest = StsClient { region = "us-west-2" }.use { sts ->
   28     29   
            sts.presignGetCallerIdentity(req, 60.seconds)
   29     30   
        }
   30     31   
   31         -
        withAllEngines { engine ->
   32         -
            val httpClient = SdkHttpClient(engine)
          32  +
        withAllEngines { context ->
          33  +
            val httpClient = SdkHttpClient(context.engine)
   33     34   
            val call = httpClient.call(presignedRequest)
   34     35   
            call.complete()
   35     36   
   36         -
            assertEquals(200, call.response.status.value, "presigned sts request failed for engine: $engine")
          37  +
            assertEquals(200, call.response.status.value, "presigned sts request failed for ${context.name} engine")
   37     38   
        }
   38     39   
    }
   39     40   
}

tmp-codegen-diff/services/sts/generated-src/main/kotlin/aws/sdk/kotlin/services/sts/DefaultStsClient.kt

@@ -2,2 +82,86 @@
   22     22   
import aws.smithy.kotlin.runtime.auth.awssigning.DefaultAwsSigner
   23     23   
import aws.smithy.kotlin.runtime.awsprotocol.AwsAttributes
   24     24   
import aws.smithy.kotlin.runtime.businessmetrics.emitBusinessMetric
   25     25   
import aws.smithy.kotlin.runtime.client.SdkClientOption
   26     26   
import aws.smithy.kotlin.runtime.collections.attributesOf
   27     27   
import aws.smithy.kotlin.runtime.collections.putIfAbsent
   28     28   
import aws.smithy.kotlin.runtime.collections.putIfAbsentNotNull
   29     29   
import aws.smithy.kotlin.runtime.http.SdkHttpClient
   30     30   
import aws.smithy.kotlin.runtime.http.auth.AnonymousAuthScheme
   31     31   
import aws.smithy.kotlin.runtime.http.auth.AuthScheme
          32  +
import aws.smithy.kotlin.runtime.http.auth.SigV4AsymmetricAuthScheme
   32     33   
import aws.smithy.kotlin.runtime.http.auth.SigV4AuthScheme
   33     34   
import aws.smithy.kotlin.runtime.http.middleware.MutateHeaders
   34     35   
import aws.smithy.kotlin.runtime.http.operation.HttpOperationContext
   35     36   
import aws.smithy.kotlin.runtime.http.operation.OperationAuthConfig
   36     37   
import aws.smithy.kotlin.runtime.http.operation.OperationMetrics
   37     38   
import aws.smithy.kotlin.runtime.http.operation.SdkHttpOperation
   38     39   
import aws.smithy.kotlin.runtime.http.operation.context
   39     40   
import aws.smithy.kotlin.runtime.http.operation.roundTrip
   40     41   
import aws.smithy.kotlin.runtime.http.operation.telemetry
   41     42   
import aws.smithy.kotlin.runtime.io.SdkManagedGroup
   42     43   
import aws.smithy.kotlin.runtime.io.addIfManaged
   43     44   
import aws.smithy.kotlin.runtime.operation.ExecutionContext
   44     45   
   45     46   
internal class DefaultStsClient(override val config: StsClient.Config) : StsClient {
   46     47   
    private val managedResources = SdkManagedGroup()
   47     48   
    private val client = SdkHttpClient(config.httpClient)
   48     49   
    private val identityProviderConfig = StsIdentityProviderConfigAdapter(config)
   49     50   
    private val configuredAuthSchemes = with(config.authSchemes.associateBy(AuthScheme::schemeId).toMutableMap()){
   50     51   
        getOrPut(AuthSchemeId.AwsSigV4){
   51     52   
            SigV4AuthScheme(DefaultAwsSigner, "sts")
   52     53   
        }
          54  +
        getOrPut(AuthSchemeId.AwsSigV4Asymmetric){
          55  +
            SigV4AsymmetricAuthScheme(DefaultAwsSigner, "sts")
          56  +
        }
   53     57   
        getOrPut(AuthSchemeId.Anonymous){
   54     58   
            AnonymousAuthScheme
   55     59   
        }
   56     60   
        toMap()
   57     61   
    }
   58     62   
    private val authSchemeAdapter = StsAuthSchemeProviderAdapter(config)
   59     63   
    private val telemetryScope = "aws.sdk.kotlin.services.sts"
   60     64   
    private val opMetrics = OperationMetrics(telemetryScope, config.telemetryProvider)
   61     65   
   62     66   
    init {
@@ -719,723 +751,756 @@
  739    743   
    private fun mergeServiceDefaults(ctx: ExecutionContext) {
  740    744   
        ctx.putIfAbsentNotNull(HttpOperationContext.AttemptTimeout, config.attemptTimeout)
  741    745   
        ctx.putIfAbsentNotNull(HttpOperationContext.CallTimeout, config.callTimeout)
  742    746   
        ctx.putIfAbsent(SdkClientOption.ClientName, config.clientName)
  743    747   
        ctx.putIfAbsent(SdkClientOption.LogMode, config.logMode)
  744    748   
        ctx.putIfAbsentNotNull(AwsAttributes.Region, config.region)
  745    749   
        ctx.putIfAbsentNotNull(AwsSigningAttributes.SigningRegion, config.region)
  746    750   
        ctx.putIfAbsent(AwsSigningAttributes.SigningService, "sts")
  747    751   
        ctx.putIfAbsent(AwsSigningAttributes.CredentialsProvider, config.credentialsProvider)
  748    752   
        ctx.putIfAbsentNotNull(AwsSdkClientOption.ApplicationId, config.applicationId)
         753  +
        ctx.putIfAbsentNotNull(AwsSigningAttributes.ConfigSigningRegionSet, config.sigV4aSigningRegionSet)
  749    754   
    }
  750    755   
  751    756   
}

tmp-codegen-diff/services/sts/generated-src/main/kotlin/aws/sdk/kotlin/services/sts/StsClient.kt

@@ -16,16 +193,197 @@
   36     36   
import aws.sdk.kotlin.services.sts.model.GetDelegatedAccessTokenResponse
   37     37   
import aws.sdk.kotlin.services.sts.model.GetFederationTokenRequest
   38     38   
import aws.sdk.kotlin.services.sts.model.GetFederationTokenResponse
   39     39   
import aws.sdk.kotlin.services.sts.model.GetSessionTokenRequest
   40     40   
import aws.sdk.kotlin.services.sts.model.GetSessionTokenResponse
   41     41   
import aws.sdk.kotlin.services.sts.model.GetWebIdentityTokenRequest
   42     42   
import aws.sdk.kotlin.services.sts.model.GetWebIdentityTokenResponse
   43     43   
import aws.smithy.kotlin.runtime.auth.AuthSchemeId
   44     44   
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
   45     45   
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderConfig
          46  +
import aws.smithy.kotlin.runtime.auth.awscredentials.SigV4aClientConfig
   46     47   
import aws.smithy.kotlin.runtime.awsprotocol.ClockSkewInterceptor
   47     48   
import aws.smithy.kotlin.runtime.client.AbstractSdkClientBuilder
   48     49   
import aws.smithy.kotlin.runtime.client.AbstractSdkClientFactory
   49     50   
import aws.smithy.kotlin.runtime.client.LogMode
   50     51   
import aws.smithy.kotlin.runtime.client.RetryClientConfig
   51     52   
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfig
   52     53   
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfigImpl
   53     54   
import aws.smithy.kotlin.runtime.client.SdkClient
   54     55   
import aws.smithy.kotlin.runtime.client.SdkClientConfig
   55     56   
import aws.smithy.kotlin.runtime.client.region.RegionProvider
   56     57   
import aws.smithy.kotlin.runtime.http.auth.AuthScheme
   57     58   
import aws.smithy.kotlin.runtime.http.auth.HttpAuthConfig
   58     59   
import aws.smithy.kotlin.runtime.http.config.HttpClientConfig
   59     60   
import aws.smithy.kotlin.runtime.http.config.HttpEngineConfig
   60     61   
import aws.smithy.kotlin.runtime.http.config.TimeoutConfig
   61     62   
import aws.smithy.kotlin.runtime.http.engine.HttpClientEngine
   62     63   
import aws.smithy.kotlin.runtime.http.engine.HttpEngineConfigImpl
   63     64   
import aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor
   64     65   
import aws.smithy.kotlin.runtime.net.url.Url
   65     66   
import aws.smithy.kotlin.runtime.retries.RetryStrategy
   66     67   
import aws.smithy.kotlin.runtime.retries.policy.RetryPolicy
   67     68   
import aws.smithy.kotlin.runtime.telemetry.Global
   68     69   
import aws.smithy.kotlin.runtime.telemetry.TelemetryConfig
   69     70   
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
   70     71   
import aws.smithy.kotlin.runtime.util.LazyAsyncValue
   71     72   
import kotlin.collections.List
          73  +
import kotlin.collections.Set
   72     74   
import kotlin.jvm.JvmStatic
   73     75   
import kotlin.time.Duration
   74     76   
import kotlinx.coroutines.runBlocking
   75     77   
   76     78   
   77     79   
public const val ServiceId: String = "STS"
   78         -
public const val SdkVersion: String = "1.6.48-SNAPSHOT"
          80  +
public const val SdkVersion: String = "1.6.61-SNAPSHOT"
   79     81   
public const val ServiceApiVersion: String = "2011-06-15"
   80     82   
   81     83   
/**
   82     84   
 * # Security Token Service
   83     85   
 * Security Token Service (STS) enables you to request temporary, limited-privilege credentials for users. This guide provides descriptions of the STS API. For more information about using this service, see [Temporary Security Credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).
   84     86   
 */
   85     87   
public interface StsClient : SdkClient {
   86     88   
    /**
   87     89   
     * StsClient's configuration
   88     90   
     */
   89     91   
    public override val config: Config
   90     92   
   91     93   
    public companion object : AbstractAwsSdkClientFactory<Config, Config.Builder, StsClient, Builder>()
   92     94   
     {
   93     95   
        @JvmStatic
   94     96   
        override fun builder(): Builder = Builder()
   95     97   
   96     98   
        override fun finalizeConfig(builder: Builder) {
   97     99   
            super.finalizeConfig(builder)
   98    100   
            builder.config.interceptors.add(0, ClockSkewInterceptor())
   99    101   
        }
  100    102   
  101    103   
        override suspend fun finalizeEnvironmentalConfig(builder: Builder, sharedConfig: LazyAsyncValue<AwsSharedConfig>, activeProfile: LazyAsyncValue<AwsProfile>) {
  102    104   
            super.finalizeEnvironmentalConfig(builder, sharedConfig, activeProfile)
  103    105   
            builder.config.endpointUrl = builder.config.endpointUrl ?: resolveEndpointUrl(
  104    106   
                sharedConfig,
  105    107   
                "Sts",
  106    108   
                "STS",
  107    109   
                "sts",
  108    110   
            )
  109    111   
        }
  110    112   
    }
  111    113   
  112    114   
    public class Builder internal constructor(): AbstractSdkClientBuilder<Config, Config.Builder, StsClient>() {
  113    115   
        override val config: Config.Builder = Config.Builder()
  114    116   
        override fun newClient(config: Config): StsClient = DefaultStsClient(config)
  115    117   
    }
  116    118   
  117         -
    public class Config private constructor(builder: Builder) : AwsSdkClientConfig, CredentialsProviderConfig, HttpAuthConfig, HttpClientConfig, HttpEngineConfig by builder.buildHttpEngineConfig(), RetryClientConfig, RetryStrategyClientConfig by builder.buildRetryStrategyClientConfig(), SdkClientConfig, TelemetryConfig, TimeoutConfig {
         119  +
    public class Config private constructor(builder: Builder) : AwsSdkClientConfig, CredentialsProviderConfig, HttpAuthConfig, HttpClientConfig, HttpEngineConfig by builder.buildHttpEngineConfig(), RetryClientConfig, RetryStrategyClientConfig by builder.buildRetryStrategyClientConfig(), SdkClientConfig, SigV4aClientConfig, TelemetryConfig, TimeoutConfig {
  118    120   
        override val clientName: String = builder.clientName
  119    121   
        override val region: String? = (builder.region ?: runBlocking { builder.regionProvider?.getRegion() ?: resolveRegion() })?.let { validateRegion(it) }
  120    122   
        override val regionProvider: RegionProvider = builder.regionProvider ?: DefaultRegionProviderChain()
  121    123   
        override val attemptTimeout: Duration? = builder.attemptTimeout
  122    124   
        override val authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = builder.authSchemePreference
  123    125   
        override val authSchemes: kotlin.collections.List<aws.smithy.kotlin.runtime.http.auth.AuthScheme> = builder.authSchemes
  124    126   
        override val callTimeout: Duration? = builder.callTimeout
  125    127   
        override val credentialsProvider: CredentialsProvider = builder.credentialsProvider ?: DefaultChainCredentialsProvider(httpClient = httpClient, region = region).manage()
  126    128   
        public val endpointProvider: StsEndpointProvider = builder.endpointProvider ?: DefaultStsEndpointProvider()
  127    129   
        public val endpointUrl: Url? = builder.endpointUrl
  128    130   
        override val interceptors: kotlin.collections.List<aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor> = builder.interceptors
  129    131   
        override val logMode: LogMode = builder.logMode ?: LogMode.Default
  130    132   
        override val retryPolicy: RetryPolicy<Any?> = builder.retryPolicy ?: AwsRetryPolicy.Default
         133  +
        override val sigV4aSigningRegionSet: kotlin.collections.Set<kotlin.String>? = builder.sigV4aSigningRegionSet
  131    134   
        override val telemetryProvider: TelemetryProvider = builder.telemetryProvider ?: TelemetryProvider.Global
  132    135   
        override val useDualStack: Boolean = builder.useDualStack ?: false
  133    136   
        override val useFips: Boolean = builder.useFips ?: false
  134    137   
        override val applicationId: String? = builder.applicationId
  135    138   
        public val authSchemeProvider: StsAuthSchemeProvider = builder.authSchemeProvider ?: DefaultStsAuthSchemeProvider(authSchemePreference = authSchemePreference)
  136    139   
        public companion object {
  137    140   
            public inline operator fun invoke(block: Builder.() -> kotlin.Unit): Config = Builder().apply(block).build()
  138    141   
        }
  139    142   
  140    143   
        public fun toBuilder(): Builder = Builder().apply {
  141    144   
            clientName = this@Config.clientName
  142    145   
            region = this@Config.region
  143    146   
            regionProvider = this@Config.regionProvider
  144    147   
            attemptTimeout = this@Config.attemptTimeout
  145    148   
            authSchemePreference = this@Config.authSchemePreference
  146    149   
            authSchemes = this@Config.authSchemes
  147    150   
            callTimeout = this@Config.callTimeout
  148    151   
            credentialsProvider = this@Config.credentialsProvider
  149    152   
            endpointProvider = this@Config.endpointProvider
  150    153   
            endpointUrl = this@Config.endpointUrl
  151    154   
            httpClient = this@Config.httpClient
  152    155   
            interceptors = this@Config.interceptors.toMutableList()
  153    156   
            logMode = this@Config.logMode
  154    157   
            retryPolicy = this@Config.retryPolicy
  155    158   
            retryStrategy = this@Config.retryStrategy
         159  +
            sigV4aSigningRegionSet = this@Config.sigV4aSigningRegionSet
  156    160   
            telemetryProvider = this@Config.telemetryProvider
  157    161   
            useDualStack = this@Config.useDualStack
  158    162   
            useFips = this@Config.useFips
  159    163   
            applicationId = this@Config.applicationId
  160    164   
            authSchemeProvider = this@Config.authSchemeProvider
  161    165   
        }
  162    166   
  163         -
        public class Builder : AwsSdkClientConfig.Builder, CredentialsProviderConfig.Builder, HttpAuthConfig.Builder, HttpClientConfig.Builder, HttpEngineConfig.Builder by HttpEngineConfigImpl.BuilderImpl(), RetryClientConfig.Builder, RetryStrategyClientConfig.Builder by RetryStrategyClientConfigImpl.BuilderImpl(), SdkClientConfig.Builder<Config>, TelemetryConfig.Builder, TimeoutConfig.Builder {
         167  +
        public class Builder : AwsSdkClientConfig.Builder, CredentialsProviderConfig.Builder, HttpAuthConfig.Builder, HttpClientConfig.Builder, HttpEngineConfig.Builder by HttpEngineConfigImpl.BuilderImpl(), RetryClientConfig.Builder, RetryStrategyClientConfig.Builder by RetryStrategyClientConfigImpl.BuilderImpl(), SdkClientConfig.Builder<Config>, SigV4aClientConfig.Builder, TelemetryConfig.Builder, TimeoutConfig.Builder {
  164    168   
            /**
  165    169   
             * A reader-friendly name for the client.
  166    170   
             */
  167    171   
            override var clientName: String = "STS"
  168    172   
  169    173   
            /**
  170    174   
             * The AWS region (e.g. `us-west-2`) to make requests to. See about AWS
  171    175   
             * [global infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/) for more information.
  172    176   
             * When specified, this static region configuration takes precedence over other region resolution methods.
  173    177   
             *
@@ -242,246 +301,310 @@
  262    266   
             * performance considerations when dumping the request/response body. This is primarily a tool for
  263    267   
             * debug purposes.
  264    268   
             */
  265    269   
            override var logMode: LogMode? = null
  266    270   
  267    271   
            /**
  268    272   
             * The policy to use for evaluating operation results and determining whether/how to retry.
  269    273   
             */
  270    274   
            override var retryPolicy: RetryPolicy<Any?>? = null
  271    275   
         276  +
            /**
         277  +
             * The set of regions to use when signing a request with SigV4a. If not provided this will automatically be set by the SDK.
         278  +
             */
         279  +
            override var sigV4aSigningRegionSet: kotlin.collections.Set<kotlin.String>? = null
         280  +
  272    281   
            /**
  273    282   
             * The telemetry provider used to instrument the SDK operations with. By default, the global telemetry
  274    283   
             * provider will be used.
  275    284   
             */
  276    285   
            override var telemetryProvider: TelemetryProvider? = null
  277    286   
  278    287   
            /**
  279    288   
             *            Flag to toggle whether to use dual-stack endpoints when making requests.
  280    289   
             *            See [https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html] for more information.
  281    290   
             * `          Disabled by default.

tmp-codegen-diff/services/sts/generated-src/main/kotlin/aws/sdk/kotlin/services/sts/auth/DefaultStsAuthSchemeProvider.kt

@@ -1,1 +32,34 @@
    1      1   
// Code generated by smithy-kotlin codegen. DO NOT EDIT!
    2      2   
    3      3   
package aws.sdk.kotlin.services.sts.auth
    4      4   
    5      5   
import aws.sdk.kotlin.services.sts.endpoints.StsEndpointProvider
    6      6   
import aws.smithy.kotlin.runtime.auth.AuthOption
    7      7   
import aws.smithy.kotlin.runtime.auth.AuthSchemeId
    8      8   
import aws.smithy.kotlin.runtime.http.auth.reprioritizeAuthOptions
    9      9   
import aws.smithy.kotlin.runtime.http.auth.sigV4
          10  +
import aws.smithy.kotlin.runtime.http.auth.sigV4A
   10     11   
   11     12   
public class DefaultStsAuthSchemeProvider(private val endpointProvider: StsEndpointProvider? = null, private val authSchemePreference: kotlin.collections.List<aws.smithy.kotlin.runtime.auth.AuthSchemeId>? = null) : StsAuthSchemeProvider {
   12     13   
    private val operationOverrides = mapOf<String, List<AuthOption>>(
   13     14   
        "AssumeRoleWithSAML" to listOf(
   14     15   
            AuthOption(AuthSchemeId.Anonymous),
   15     16   
        ),
   16     17   
        "AssumeRoleWithWebIdentity" to listOf(
   17     18   
            AuthOption(AuthSchemeId.Anonymous),
   18     19   
        ),
   19     20   
    )
   20     21   
   21     22   
    private val serviceDefaults = listOf<AuthOption>(
   22     23   
        sigV4(),
          24  +
        sigV4A(),
   23     25   
    )
   24     26   
   25     27   
    override suspend fun resolveAuthScheme(params: StsAuthSchemeParameters): List<AuthOption> {
   26     28   
        val modeledAuthOptions = operationOverrides.getOrElse(params.operationName) { serviceDefaults }
   27     29   
   28     30   
        val authOptions = modeledAuthOptions
   29     31   
   30     32   
        return authSchemePreference?.let { reprioritizeAuthOptions(it, authOptions) } ?: authOptions
   31     33   
    }
   32     34   
}

tmp-codegen-diff/services/sts/generated-src/main/kotlin/aws/sdk/kotlin/services/sts/auth/StsIdentityProviderConfigAdapter.kt

@@ -1,1 +19,20 @@
    5      5   
import aws.sdk.kotlin.services.sts.StsClient
    6      6   
import aws.smithy.kotlin.runtime.auth.AuthSchemeId
    7      7   
import aws.smithy.kotlin.runtime.http.auth.AnonymousIdentityProvider
    8      8   
import aws.smithy.kotlin.runtime.identity.IdentityProvider
    9      9   
import aws.smithy.kotlin.runtime.identity.IdentityProviderConfig
   10     10   
   11     11   
internal class StsIdentityProviderConfigAdapter (private val config: StsClient.Config): IdentityProviderConfig {
   12     12   
   13     13   
    override fun identityProviderForScheme(schemeId: AuthSchemeId): IdentityProvider = when(schemeId.id) {
   14     14   
        "aws.auth#sigv4" -> config.credentialsProvider
          15  +
        "aws.auth#sigv4a" -> config.credentialsProvider
   15     16   
        "smithy.api#noAuth" -> AnonymousIdentityProvider
   16     17   
        else -> error("auth scheme $schemeId not configured for client")
   17     18   
    }
   18     19   
   19     20   
}

tmp-codegen-diff/services/transcribestreaming/e2eTest/src/TranscribeStreamingIntegrationTest.kt

@@ -1,1 +50,51 @@
    1      1   
/*
    2      2   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3      3   
 * SPDX-License-Identifier: Apache-2.0
    4      4   
 */
    5      5   
package aws.sdk.kotlin.e2etest
    6      6   
    7      7   
import aws.sdk.kotlin.services.transcribestreaming.TranscribeStreamingClient
    8      8   
import aws.sdk.kotlin.services.transcribestreaming.model.*
           9  +
import aws.smithy.kotlin.runtime.testing.TestInstance
          10  +
import aws.smithy.kotlin.runtime.testing.TestLifecycle
    9     11   
import kotlinx.coroutines.Dispatchers
   10     12   
import kotlinx.coroutines.flow.Flow
   11     13   
import kotlinx.coroutines.flow.flow
   12     14   
import kotlinx.coroutines.flow.flowOn
   13     15   
import kotlinx.coroutines.runBlocking
   14         -
import org.junit.jupiter.api.Test
   15         -
import org.junit.jupiter.api.TestInstance
   16     16   
import java.io.File
   17     17   
import java.nio.file.Paths
   18     18   
import javax.sound.sampled.AudioSystem
          19  +
import kotlin.test.Test
   19     20   
import kotlin.test.assertTrue
   20     21   
   21         -
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
          22  +
@TestInstance(TestLifecycle.PER_CLASS)
   22     23   
class TranscribeStreamingIntegrationTest {
   23     24   
   24     25   
    @Test
   25     26   
    fun testTranscribeEventStream(): Unit = runBlocking {
   26     27   
        val url = this::class.java.classLoader.getResource("hello-kotlin-8000.wav") ?: error("failed to load test resource")
   27     28   
        val audioFile = Paths.get(url.toURI()).toFile()
   28     29   
   29     30   
        TranscribeStreamingClient { region = "us-west-2" }.use { client ->
   30     31   
            val transcript = getTranscript(client, audioFile)
   31     32   
            assertTrue(transcript.startsWith("Hello from", true), "full transcript: $transcript")