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

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

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

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



public class GetBucketLoggingResponse private constructor(builder: Builder) {
    /**
     * Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see [PUT Bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) in the *Amazon S3 API Reference*.
     */
    public val loggingEnabled: aws.sdk.kotlin.services.s3.model.LoggingEnabled? = builder.loggingEnabled

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

    override fun toString(): kotlin.String = buildString {
        append("GetBucketLoggingResponse(")
        append("loggingEnabled=$loggingEnabled")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = loggingEnabled?.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 GetBucketLoggingResponse

        if (loggingEnabled != other.loggingEnabled) return false

        return true
    }

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

    public class Builder {
        /**
         * Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see [PUT Bucket logging](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) in the *Amazon S3 API Reference*.
         */
        public var loggingEnabled: aws.sdk.kotlin.services.s3.model.LoggingEnabled? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.s3.model.GetBucketLoggingResponse) : this() {
            this.loggingEnabled = x.loggingEnabled
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.s3.model.LoggingEnabled] inside the given [block]
         */
        public fun loggingEnabled(block: aws.sdk.kotlin.services.s3.model.LoggingEnabled.Builder.() -> kotlin.Unit) {
            this.loggingEnabled = aws.sdk.kotlin.services.s3.model.LoggingEnabled.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy