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

commonMain.aws.sdk.kotlin.services.acmpca.model.AccessDescription.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.acmpca.model



/**
 * Provides access information used by the `authorityInfoAccess` and `subjectInfoAccess` extensions described in [RFC 5280](https://datatracker.ietf.org/doc/html/rfc5280).
 */
public class AccessDescription private constructor(builder: Builder) {
    /**
     * The location of `AccessDescription` information.
     */
    public val accessLocation: aws.sdk.kotlin.services.acmpca.model.GeneralName? = builder.accessLocation
    /**
     * The type and format of `AccessDescription` information.
     */
    public val accessMethod: aws.sdk.kotlin.services.acmpca.model.AccessMethod? = builder.accessMethod

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

    override fun toString(): kotlin.String = buildString {
        append("AccessDescription(")
        append("accessLocation=$accessLocation,")
        append("accessMethod=$accessMethod")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accessLocation?.hashCode() ?: 0
        result = 31 * result + (accessMethod?.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 AccessDescription

        if (accessLocation != other.accessLocation) return false
        if (accessMethod != other.accessMethod) return false

        return true
    }

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

    public class Builder {
        /**
         * The location of `AccessDescription` information.
         */
        public var accessLocation: aws.sdk.kotlin.services.acmpca.model.GeneralName? = null
        /**
         * The type and format of `AccessDescription` information.
         */
        public var accessMethod: aws.sdk.kotlin.services.acmpca.model.AccessMethod? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.acmpca.model.AccessDescription) : this() {
            this.accessLocation = x.accessLocation
            this.accessMethod = x.accessMethod
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy