AWS SDK

AWS SDK

rev. 2493670155f3f484f4055f00c7816463c1a2ced2..d52e890343dc62eceaad006f54eea929ef91eb0f (ignoring whitespace)

Files changed:

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

@@ -1,1 +87,95 @@
    1      1   
// Code generated by smithy-kotlin codegen. DO NOT EDIT!
    2      2   
    3      3   
package aws.sdk.kotlin.services.s3.model
    4      4   
    5      5   
import aws.smithy.kotlin.runtime.SdkDsl
    6      6   
    7      7   
    8      8   
public class GetBucketMetricsConfigurationRequest private constructor(builder: Builder) {
    9      9   
    /**
   10     10   
     * The name of the bucket containing the metrics configuration to retrieve.
          11  +
     *
          12  +
     * **Directory buckets ** - When you use this operation with a directory bucket, you must use path-style requests in the format `https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i> `. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format ` <i>bucket-base-name</i>--<i>zone-id</i>--x-s3` (for example, ` <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3`). For information about bucket naming restrictions, see [Directory bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) in the *Amazon S3 User Guide*
   11     13   
     */
   12     14   
    public val bucket: kotlin.String? = builder.bucket
   13     15   
    /**
   14     16   
     * The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code `403 Forbidden` (access denied).
          17  +
     *
          18  +
     * For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code `501 Not Implemented`.
   15     19   
     */
   16     20   
    public val expectedBucketOwner: kotlin.String? = builder.expectedBucketOwner
   17     21   
    /**
   18     22   
     * The ID used to identify the metrics configuration. The ID has a 64 character limit and can only contain letters, numbers, periods, dashes, and underscores.
   19     23   
     */
   20     24   
    public val id: kotlin.String? = builder.id
   21     25   
   22     26   
    public companion object {
   23     27   
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.GetBucketMetricsConfigurationRequest = Builder().apply(block).build()
   24     28   
    }
   25     29   
   26     30   
    override fun toString(): kotlin.String = buildString {
   27     31   
        append("GetBucketMetricsConfigurationRequest(")
   28     32   
        append("bucket=$bucket,")
   29     33   
        append("expectedBucketOwner=$expectedBucketOwner,")
   30     34   
        append("id=$id")
   31     35   
        append(")")
   32     36   
    }
   33     37   
   34     38   
    override fun hashCode(): kotlin.Int {
   35     39   
        var result = bucket?.hashCode() ?: 0
   36     40   
        result = 31 * result + (this.expectedBucketOwner?.hashCode() ?: 0)
   37     41   
        result = 31 * result + (this.id?.hashCode() ?: 0)
   38     42   
        return result
   39     43   
    }
   40     44   
   41     45   
    override fun equals(other: kotlin.Any?): kotlin.Boolean {
   42     46   
        if (this === other) return true
   43     47   
        if (other == null || this::class != other::class) return false
   44     48   
   45     49   
        other as GetBucketMetricsConfigurationRequest
   46     50   
   47     51   
        if (bucket != other.bucket) return false
   48     52   
        if (expectedBucketOwner != other.expectedBucketOwner) return false
   49     53   
        if (id != other.id) return false
   50     54   
   51     55   
        return true
   52     56   
    }
   53     57   
   54     58   
    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.GetBucketMetricsConfigurationRequest = Builder(this).apply(block).build()
   55     59   
   56     60   
    @SdkDsl
   57     61   
    public class Builder {
   58     62   
        /**
   59     63   
         * The name of the bucket containing the metrics configuration to retrieve.
          64  +
         *
          65  +
         * **Directory buckets ** - When you use this operation with a directory bucket, you must use path-style requests in the format `https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i> `. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format ` <i>bucket-base-name</i>--<i>zone-id</i>--x-s3` (for example, ` <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3`). For information about bucket naming restrictions, see [Directory bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) in the *Amazon S3 User Guide*
   60     66   
         */
   61     67   
        public var bucket: kotlin.String? = null
   62     68   
        /**
   63     69   
         * The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code `403 Forbidden` (access denied).
          70  +
         *
          71  +
         * For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code `501 Not Implemented`.
   64     72   
         */
   65     73   
        public var expectedBucketOwner: kotlin.String? = null
   66     74   
        /**
   67     75   
         * The ID used to identify the metrics configuration. The ID has a 64 character limit and can only contain letters, numbers, periods, dashes, and underscores.
   68     76   
         */
   69     77   
        public var id: kotlin.String? = null
   70     78   
   71     79   
        @PublishedApi
   72     80   
        internal constructor()
   73     81   
        @PublishedApi

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

@@ -1,1 +87,95 @@
    1      1   
// Code generated by smithy-kotlin codegen. DO NOT EDIT!
    2      2   
    3      3   
package aws.sdk.kotlin.services.s3.model
    4      4   
    5      5   
import aws.smithy.kotlin.runtime.SdkDsl
    6      6   
    7      7   
    8      8   
public class ListBucketMetricsConfigurationsRequest private constructor(builder: Builder) {
    9      9   
    /**
   10     10   
     * The name of the bucket containing the metrics configurations to retrieve.
          11  +
     *
          12  +
     * **Directory buckets ** - When you use this operation with a directory bucket, you must use path-style requests in the format `https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i> `. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format ` <i>bucket-base-name</i>--<i>zone-id</i>--x-s3` (for example, ` <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3`). For information about bucket naming restrictions, see [Directory bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) in the *Amazon S3 User Guide*
   11     13   
     */
   12     14   
    public val bucket: kotlin.String? = builder.bucket
   13     15   
    /**
   14     16   
     * The marker that is used to continue a metrics configuration listing that has been truncated. Use the `NextContinuationToken` from a previously truncated list response to continue the listing. The continuation token is an opaque value that Amazon S3 understands.
   15     17   
     */
   16     18   
    public val continuationToken: kotlin.String? = builder.continuationToken
   17     19   
    /**
   18     20   
     * The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code `403 Forbidden` (access denied).
          21  +
     *
          22  +
     * For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code `501 Not Implemented`.
   19     23   
     */
   20     24   
    public val expectedBucketOwner: kotlin.String? = builder.expectedBucketOwner
   21     25   
   22     26   
    public companion object {
   23     27   
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.ListBucketMetricsConfigurationsRequest = Builder().apply(block).build()
   24     28   
    }
   25     29   
   26     30   
    override fun toString(): kotlin.String = buildString {
   27     31   
        append("ListBucketMetricsConfigurationsRequest(")
   28     32   
        append("bucket=$bucket,")
   29     33   
        append("continuationToken=$continuationToken,")
   30     34   
        append("expectedBucketOwner=$expectedBucketOwner")
   31     35   
        append(")")
   32     36   
    }
   33     37   
   34     38   
    override fun hashCode(): kotlin.Int {
   35     39   
        var result = bucket?.hashCode() ?: 0
   36     40   
        result = 31 * result + (this.continuationToken?.hashCode() ?: 0)
   37     41   
        result = 31 * result + (this.expectedBucketOwner?.hashCode() ?: 0)
   38     42   
        return result
   39     43   
    }
   40     44   
   41     45   
    override fun equals(other: kotlin.Any?): kotlin.Boolean {
   42     46   
        if (this === other) return true
   43     47   
        if (other == null || this::class != other::class) return false
   44     48   
   45     49   
        other as ListBucketMetricsConfigurationsRequest
   46     50   
   47     51   
        if (bucket != other.bucket) return false
   48     52   
        if (continuationToken != other.continuationToken) return false
   49     53   
        if (expectedBucketOwner != other.expectedBucketOwner) return false
   50     54   
   51     55   
        return true
   52     56   
    }
   53     57   
   54     58   
    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.ListBucketMetricsConfigurationsRequest = Builder(this).apply(block).build()
   55     59   
   56     60   
    @SdkDsl
   57     61   
    public class Builder {
   58     62   
        /**
   59     63   
         * The name of the bucket containing the metrics configurations to retrieve.
          64  +
         *
          65  +
         * **Directory buckets ** - When you use this operation with a directory bucket, you must use path-style requests in the format `https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i> `. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format ` <i>bucket-base-name</i>--<i>zone-id</i>--x-s3` (for example, ` <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3`). For information about bucket naming restrictions, see [Directory bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) in the *Amazon S3 User Guide*
   60     66   
         */
   61     67   
        public var bucket: kotlin.String? = null
   62     68   
        /**
   63     69   
         * The marker that is used to continue a metrics configuration listing that has been truncated. Use the `NextContinuationToken` from a previously truncated list response to continue the listing. The continuation token is an opaque value that Amazon S3 understands.
   64     70   
         */
   65     71   
        public var continuationToken: kotlin.String? = null
   66     72   
        /**
   67     73   
         * The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code `403 Forbidden` (access denied).
          74  +
         *
          75  +
         * For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code `501 Not Implemented`.
   68     76   
         */
   69     77   
        public var expectedBucketOwner: kotlin.String? = null
   70     78   
   71     79   
        @PublishedApi
   72     80   
        internal constructor()
   73     81   
        @PublishedApi
   74     82   
        internal constructor(x: aws.sdk.kotlin.services.s3.model.ListBucketMetricsConfigurationsRequest) : this() {
   75     83   
            this.bucket = x.bucket
   76     84   
            this.continuationToken = x.continuationToken
   77     85   
            this.expectedBucketOwner = x.expectedBucketOwner

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

@@ -1,1 +90,94 @@
   12     12   
    /**
   13     13   
     * The access point ARN used when evaluating an `AND` predicate.
   14     14   
     */
   15     15   
    public val accessPointArn: kotlin.String? = builder.accessPointArn
   16     16   
    /**
   17     17   
     * The prefix used when evaluating an AND predicate.
   18     18   
     */
   19     19   
    public val prefix: kotlin.String? = builder.prefix
   20     20   
    /**
   21     21   
     * The list of tags used when evaluating an AND predicate.
          22  +
     *
          23  +
     * `Tag` filters are not supported for directory buckets.
   22     24   
     */
   23     25   
    public val tags: List<Tag>? = builder.tags
   24     26   
   25     27   
    public companion object {
   26     28   
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.MetricsAndOperator = Builder().apply(block).build()
   27     29   
    }
   28     30   
   29     31   
    override fun toString(): kotlin.String = buildString {
   30     32   
        append("MetricsAndOperator(")
   31     33   
        append("accessPointArn=$accessPointArn,")
   32     34   
        append("prefix=$prefix,")
   33     35   
        append("tags=$tags")
   34     36   
        append(")")
   35     37   
    }
   36     38   
   37     39   
    override fun hashCode(): kotlin.Int {
   38     40   
        var result = accessPointArn?.hashCode() ?: 0
   39     41   
        result = 31 * result + (this.prefix?.hashCode() ?: 0)
   40     42   
        result = 31 * result + (this.tags?.hashCode() ?: 0)
   41     43   
        return result
   42     44   
    }
   43     45   
   44     46   
    override fun equals(other: kotlin.Any?): kotlin.Boolean {
   45     47   
        if (this === other) return true
   46     48   
        if (other == null || this::class != other::class) return false
   47     49   
   48     50   
        other as MetricsAndOperator
   49     51   
   50     52   
        if (accessPointArn != other.accessPointArn) return false
   51     53   
        if (prefix != other.prefix) return false
   52     54   
        if (tags != other.tags) return false
   53     55   
   54     56   
        return true
   55     57   
    }
   56     58   
   57     59   
    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.MetricsAndOperator = Builder(this).apply(block).build()
   58     60   
   59     61   
    @SdkDsl
   60     62   
    public class Builder {
   61     63   
        /**
   62     64   
         * The access point ARN used when evaluating an `AND` predicate.
   63     65   
         */
   64     66   
        public var accessPointArn: kotlin.String? = null
   65     67   
        /**
   66     68   
         * The prefix used when evaluating an AND predicate.
   67     69   
         */
   68     70   
        public var prefix: kotlin.String? = null
   69     71   
        /**
   70     72   
         * The list of tags used when evaluating an AND predicate.
          73  +
         *
          74  +
         * `Tag` filters are not supported for directory buckets.
   71     75   
         */
   72     76   
        public var tags: List<Tag>? = null
   73     77   
   74     78   
        @PublishedApi
   75     79   
        internal constructor()
   76     80   
        @PublishedApi
   77     81   
        internal constructor(x: aws.sdk.kotlin.services.s3.model.MetricsAndOperator) : this() {
   78     82   
            this.accessPointArn = x.accessPointArn
   79     83   
            this.prefix = x.prefix
   80     84   
            this.tags = x.tags

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

@@ -1,1 +79,83 @@
    4      4   
    5      5   
import aws.smithy.kotlin.runtime.SdkDsl
    6      6   
    7      7   
    8      8   
/**
    9      9   
 * Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don't include the elements you want to keep, they are erased. For more information, see [PutBucketMetricsConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTMetricConfiguration.html).
   10     10   
 */
   11     11   
public class MetricsConfiguration private constructor(builder: Builder) {
   12     12   
    /**
   13     13   
     * Specifies a metrics configuration filter. The metrics configuration will only include objects that meet the filter's criteria. A filter must be a prefix, an object tag, an access point ARN, or a conjunction (MetricsAndOperator).
          14  +
     *
          15  +
     * Metrics configurations for directory buckets do not support tag filters.
   14     16   
     */
   15     17   
    public val filter: aws.sdk.kotlin.services.s3.model.MetricsFilter? = builder.filter
   16     18   
    /**
   17     19   
     * The ID used to identify the metrics configuration. The ID has a 64 character limit and can only contain letters, numbers, periods, dashes, and underscores.
   18     20   
     */
   19     21   
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
   20     22   
   21     23   
    public companion object {
   22     24   
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.MetricsConfiguration = Builder().apply(block).build()
   23     25   
    }
   24     26   
   25     27   
    override fun toString(): kotlin.String = buildString {
   26     28   
        append("MetricsConfiguration(")
   27     29   
        append("filter=$filter,")
   28     30   
        append("id=$id")
   29     31   
        append(")")
   30     32   
    }
   31     33   
   32     34   
    override fun hashCode(): kotlin.Int {
   33     35   
        var result = filter?.hashCode() ?: 0
   34     36   
        result = 31 * result + (this.id.hashCode())
   35     37   
        return result
   36     38   
    }
   37     39   
   38     40   
    override fun equals(other: kotlin.Any?): kotlin.Boolean {
   39     41   
        if (this === other) return true
   40     42   
        if (other == null || this::class != other::class) return false
   41     43   
   42     44   
        other as MetricsConfiguration
   43     45   
   44     46   
        if (filter != other.filter) return false
   45     47   
        if (id != other.id) return false
   46     48   
   47     49   
        return true
   48     50   
    }
   49     51   
   50     52   
    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.MetricsConfiguration = Builder(this).apply(block).build()
   51     53   
   52     54   
    @SdkDsl
   53     55   
    public class Builder {
   54     56   
        /**
   55     57   
         * Specifies a metrics configuration filter. The metrics configuration will only include objects that meet the filter's criteria. A filter must be a prefix, an object tag, an access point ARN, or a conjunction (MetricsAndOperator).
          58  +
         *
          59  +
         * Metrics configurations for directory buckets do not support tag filters.
   56     60   
         */
   57     61   
        public var filter: aws.sdk.kotlin.services.s3.model.MetricsFilter? = null
   58     62   
        /**
   59     63   
         * The ID used to identify the metrics configuration. The ID has a 64 character limit and can only contain letters, numbers, periods, dashes, and underscores.
   60     64   
         */
   61     65   
        public var id: kotlin.String? = null
   62     66   
   63     67   
        @PublishedApi
   64     68   
        internal constructor()
   65     69   
        @PublishedApi

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

@@ -1,1 +60,62 @@
   21     21   
    }
   22     22   
   23     23   
    /**
   24     24   
     * The prefix used when evaluating a metrics filter.
   25     25   
     */
   26     26   
    public data class Prefix(val value: kotlin.String) : aws.sdk.kotlin.services.s3.model.MetricsFilter() {
   27     27   
    }
   28     28   
   29     29   
    /**
   30     30   
     * The tag used when evaluating a metrics filter.
          31  +
     *
          32  +
     * `Tag` filters are not supported for directory buckets.
   31     33   
     */
   32     34   
    public data class Tag(val value: aws.sdk.kotlin.services.s3.model.Tag) : aws.sdk.kotlin.services.s3.model.MetricsFilter() {
   33     35   
    }
   34     36   
   35     37   
    public object SdkUnknown : aws.sdk.kotlin.services.s3.model.MetricsFilter() {
   36     38   
    }
   37     39   
   38     40   
    /**
   39     41   
     * Casts this [MetricsFilter] as a [AccessPointArn] and retrieves its [kotlin.String] value. Throws an exception if the [MetricsFilter] is not a
   40     42   
     * [AccessPointArn].

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

@@ -1,1 +101,109 @@
    2      2   
    3      3   
package aws.sdk.kotlin.services.s3.model
    4      4   
    5      5   
import aws.smithy.kotlin.runtime.SdkDsl
    6      6   
    7      7   
private val awsSdkKotlinServicesS3ModelMetricsConfigurationDslBuilderRef = aws.sdk.kotlin.services.s3.model.MetricsConfiguration
    8      8   
    9      9   
public class PutBucketMetricsConfigurationRequest private constructor(builder: Builder) {
   10     10   
    /**
   11     11   
     * The name of the bucket for which the metrics configuration is set.
          12  +
     *
          13  +
     * **Directory buckets ** - When you use this operation with a directory bucket, you must use path-style requests in the format `https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i> `. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format ` <i>bucket-base-name</i>--<i>zone-id</i>--x-s3` (for example, ` <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3`). For information about bucket naming restrictions, see [Directory bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) in the *Amazon S3 User Guide*
   12     14   
     */
   13     15   
    public val bucket: kotlin.String? = builder.bucket
   14     16   
    /**
   15     17   
     * The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code `403 Forbidden` (access denied).
          18  +
     *
          19  +
     * For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code `501 Not Implemented`.
   16     20   
     */
   17     21   
    public val expectedBucketOwner: kotlin.String? = builder.expectedBucketOwner
   18     22   
    /**
   19     23   
     * The ID used to identify the metrics configuration. The ID has a 64 character limit and can only contain letters, numbers, periods, dashes, and underscores.
   20     24   
     */
   21     25   
    public val id: kotlin.String? = builder.id
   22     26   
    /**
   23     27   
     * Specifies the metrics configuration.
   24     28   
     */
   25     29   
    public val metricsConfiguration: aws.sdk.kotlin.services.s3.model.MetricsConfiguration? = builder.metricsConfiguration
   26     30   
   27     31   
    public companion object {
   28     32   
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.PutBucketMetricsConfigurationRequest = Builder().apply(block).build()
   29     33   
    }
   30     34   
   31     35   
    override fun toString(): kotlin.String = buildString {
   32     36   
        append("PutBucketMetricsConfigurationRequest(")
   33     37   
        append("bucket=$bucket,")
   34     38   
        append("expectedBucketOwner=$expectedBucketOwner,")
   35     39   
        append("id=$id,")
   36     40   
        append("metricsConfiguration=$metricsConfiguration")
   37     41   
        append(")")
   38     42   
    }
   39     43   
   40     44   
    override fun hashCode(): kotlin.Int {
   41     45   
        var result = bucket?.hashCode() ?: 0
   42     46   
        result = 31 * result + (this.expectedBucketOwner?.hashCode() ?: 0)
   43     47   
        result = 31 * result + (this.id?.hashCode() ?: 0)
   44     48   
        result = 31 * result + (this.metricsConfiguration?.hashCode() ?: 0)
   45     49   
        return result
   46     50   
    }
   47     51   
   48     52   
    override fun equals(other: kotlin.Any?): kotlin.Boolean {
   49     53   
        if (this === other) return true
   50     54   
        if (other == null || this::class != other::class) return false
   51     55   
   52     56   
        other as PutBucketMetricsConfigurationRequest
   53     57   
   54     58   
        if (bucket != other.bucket) return false
   55     59   
        if (expectedBucketOwner != other.expectedBucketOwner) return false
   56     60   
        if (id != other.id) return false
   57     61   
        if (metricsConfiguration != other.metricsConfiguration) return false
   58     62   
   59     63   
        return true
   60     64   
    }
   61     65   
   62     66   
    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.PutBucketMetricsConfigurationRequest = Builder(this).apply(block).build()
   63     67   
   64     68   
    @SdkDsl
   65     69   
    public class Builder {
   66     70   
        /**
   67     71   
         * The name of the bucket for which the metrics configuration is set.
          72  +
         *
          73  +
         * **Directory buckets ** - When you use this operation with a directory bucket, you must use path-style requests in the format `https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i> `. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format ` <i>bucket-base-name</i>--<i>zone-id</i>--x-s3` (for example, ` <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3`). For information about bucket naming restrictions, see [Directory bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) in the *Amazon S3 User Guide*
   68     74   
         */
   69     75   
        public var bucket: kotlin.String? = null
   70     76   
        /**
   71     77   
         * The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code `403 Forbidden` (access denied).
          78  +
         *
          79  +
         * For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code `501 Not Implemented`.
   72     80   
         */
   73     81   
        public var expectedBucketOwner: kotlin.String? = null
   74     82   
        /**
   75     83   
         * The ID used to identify the metrics configuration. The ID has a 64 character limit and can only contain letters, numbers, periods, dashes, and underscores.
   76     84   
         */
   77     85   
        public var id: kotlin.String? = null
   78     86   
        /**
   79     87   
         * Specifies the metrics configuration.
   80     88   
         */
   81     89   
        public var metricsConfiguration: aws.sdk.kotlin.services.s3.model.MetricsConfiguration? = null

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.60-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")