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

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

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

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



/**
 * Defines a custom ASN.1 X.400 `GeneralName` using an object identifier (OID) and value. The OID must satisfy the regular expression shown below. For more information, see NIST's definition of [Object Identifier (OID)](https://csrc.nist.gov/glossary/term/Object_Identifier).
 */
public class OtherName private constructor(builder: Builder) {
    /**
     * Specifies an OID.
     */
    public val typeId: kotlin.String = requireNotNull(builder.typeId) { "A non-null value must be provided for typeId" }
    /**
     * Specifies an OID value.
     */
    public val value: kotlin.String = requireNotNull(builder.value) { "A non-null value must be provided for value" }

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

    override fun toString(): kotlin.String = buildString {
        append("OtherName(")
        append("typeId=$typeId,")
        append("value=$value")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = typeId.hashCode()
        result = 31 * result + (value.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 OtherName

        if (typeId != other.typeId) return false
        if (value != other.value) return false

        return true
    }

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

    public class Builder {
        /**
         * Specifies an OID.
         */
        public var typeId: kotlin.String? = null
        /**
         * Specifies an OID value.
         */
        public var value: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.acmpca.model.OtherName) : this() {
            this.typeId = x.typeId
            this.value = x.value
        }

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

        internal fun correctErrors(): Builder {
            if (typeId == null) typeId = ""
            if (value == null) value = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy