All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.s3.model.HeadBucketResponse.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.s3.model



public class HeadBucketResponse private constructor(builder: Builder) {
    /**
     * Indicates whether the bucket name used in the request is an access point alias.
     *
     * This functionality is not supported for directory buckets.
     */
    public val accessPointAlias: kotlin.Boolean? = builder.accessPointAlias
    /**
     * The name of the location where the bucket will be created.
     *
     * For directory buckets, the AZ ID of the Availability Zone where the bucket is created. An example AZ ID value is `usw2-az2`.
     *
     * This functionality is only supported by directory buckets.
     */
    public val bucketLocationName: kotlin.String? = builder.bucketLocationName
    /**
     * The type of location where the bucket is created.
     *
     * This functionality is only supported by directory buckets.
     */
    public val bucketLocationType: aws.sdk.kotlin.services.s3.model.LocationType? = builder.bucketLocationType
    /**
     * The Region that the bucket is located.
     *
     * This functionality is not supported for directory buckets.
     */
    public val bucketRegion: kotlin.String? = builder.bucketRegion

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.HeadBucketResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("HeadBucketResponse(")
        append("accessPointAlias=$accessPointAlias,")
        append("bucketLocationName=$bucketLocationName,")
        append("bucketLocationType=$bucketLocationType,")
        append("bucketRegion=$bucketRegion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accessPointAlias?.hashCode() ?: 0
        result = 31 * result + (bucketLocationName?.hashCode() ?: 0)
        result = 31 * result + (bucketLocationType?.hashCode() ?: 0)
        result = 31 * result + (bucketRegion?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as HeadBucketResponse

        if (accessPointAlias != other.accessPointAlias) return false
        if (bucketLocationName != other.bucketLocationName) return false
        if (bucketLocationType != other.bucketLocationType) return false
        if (bucketRegion != other.bucketRegion) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.HeadBucketResponse = Builder(this).apply(block).build()

    public class Builder {
        /**
         * Indicates whether the bucket name used in the request is an access point alias.
         *
         * This functionality is not supported for directory buckets.
         */
        public var accessPointAlias: kotlin.Boolean? = null
        /**
         * The name of the location where the bucket will be created.
         *
         * For directory buckets, the AZ ID of the Availability Zone where the bucket is created. An example AZ ID value is `usw2-az2`.
         *
         * This functionality is only supported by directory buckets.
         */
        public var bucketLocationName: kotlin.String? = null
        /**
         * The type of location where the bucket is created.
         *
         * This functionality is only supported by directory buckets.
         */
        public var bucketLocationType: aws.sdk.kotlin.services.s3.model.LocationType? = null
        /**
         * The Region that the bucket is located.
         *
         * This functionality is not supported for directory buckets.
         */
        public var bucketRegion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.s3.model.HeadBucketResponse) : this() {
            this.accessPointAlias = x.accessPointAlias
            this.bucketLocationName = x.bucketLocationName
            this.bucketLocationType = x.bucketLocationType
            this.bucketRegion = x.bucketRegion
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.s3.model.HeadBucketResponse = HeadBucketResponse(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy