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
|