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

commonMain.aws.sdk.kotlin.services.cloudfront.model.CloudFrontOriginAccessIdentitySummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudfront.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Summary of the information about a CloudFront origin access identity.
 */
public class CloudFrontOriginAccessIdentitySummary private constructor(builder: Builder) {
    /**
     * The comment for this origin access identity, as originally specified when created.
     */
    public val comment: kotlin.String = requireNotNull(builder.comment) { "A non-null value must be provided for comment" }
    /**
     * The ID for the origin access identity. For example: `E74FTE3AJFJ256A`.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.
     */
    public val s3CanonicalUserId: kotlin.String = requireNotNull(builder.s3CanonicalUserId) { "A non-null value must be provided for s3CanonicalUserId" }

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

    override fun toString(): kotlin.String = buildString {
        append("CloudFrontOriginAccessIdentitySummary(")
        append("comment=$comment,")
        append("id=$id,")
        append("s3CanonicalUserId=$s3CanonicalUserId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = comment.hashCode()
        result = 31 * result + (id.hashCode())
        result = 31 * result + (s3CanonicalUserId.hashCode())
        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 CloudFrontOriginAccessIdentitySummary

        if (comment != other.comment) return false
        if (id != other.id) return false
        if (s3CanonicalUserId != other.s3CanonicalUserId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The comment for this origin access identity, as originally specified when created.
         */
        public var comment: kotlin.String? = null
        /**
         * The ID for the origin access identity. For example: `E74FTE3AJFJ256A`.
         */
        public var id: kotlin.String? = null
        /**
         * The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.
         */
        public var s3CanonicalUserId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudfront.model.CloudFrontOriginAccessIdentitySummary) : this() {
            this.comment = x.comment
            this.id = x.id
            this.s3CanonicalUserId = x.s3CanonicalUserId
        }

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

        internal fun correctErrors(): Builder {
            if (comment == null) comment = ""
            if (id == null) id = ""
            if (s3CanonicalUserId == null) s3CanonicalUserId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy