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

commonMain.aws.sdk.kotlin.services.lightsail.model.GetBucketsResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lightsail.model

import aws.smithy.kotlin.runtime.SdkDsl

public class GetBucketsResponse private constructor(builder: Builder) {
    /**
     * An object that describes the synchronization status of the Amazon S3 account-level block public access feature for your Lightsail buckets.
     *
     * For more information about this feature and how it affects Lightsail buckets, see [Block public access for buckets in Amazon Lightsail](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-block-public-access-for-buckets).
     */
    public val accountLevelBpaSync: aws.sdk.kotlin.services.lightsail.model.AccountLevelBpaSync? = builder.accountLevelBpaSync
    /**
     * An array of objects that describe buckets.
     */
    public val buckets: List? = builder.buckets
    /**
     * The token to advance to the next page of results from your request.
     *
     * A next page token is not returned if there are no more results to display.
     *
     * To get the next page of results, perform another `GetBuckets` request and specify the next page token using the `pageToken` parameter.
     */
    public val nextPageToken: kotlin.String? = builder.nextPageToken

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

    override fun toString(): kotlin.String = buildString {
        append("GetBucketsResponse(")
        append("accountLevelBpaSync=$accountLevelBpaSync,")
        append("buckets=$buckets,")
        append("nextPageToken=$nextPageToken")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accountLevelBpaSync?.hashCode() ?: 0
        result = 31 * result + (buckets?.hashCode() ?: 0)
        result = 31 * result + (nextPageToken?.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 GetBucketsResponse

        if (accountLevelBpaSync != other.accountLevelBpaSync) return false
        if (buckets != other.buckets) return false
        if (nextPageToken != other.nextPageToken) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An object that describes the synchronization status of the Amazon S3 account-level block public access feature for your Lightsail buckets.
         *
         * For more information about this feature and how it affects Lightsail buckets, see [Block public access for buckets in Amazon Lightsail](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-block-public-access-for-buckets).
         */
        public var accountLevelBpaSync: aws.sdk.kotlin.services.lightsail.model.AccountLevelBpaSync? = null
        /**
         * An array of objects that describe buckets.
         */
        public var buckets: List? = null
        /**
         * The token to advance to the next page of results from your request.
         *
         * A next page token is not returned if there are no more results to display.
         *
         * To get the next page of results, perform another `GetBuckets` request and specify the next page token using the `pageToken` parameter.
         */
        public var nextPageToken: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.GetBucketsResponse) : this() {
            this.accountLevelBpaSync = x.accountLevelBpaSync
            this.buckets = x.buckets
            this.nextPageToken = x.nextPageToken
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy