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

commonMain.aws.sdk.kotlin.services.opensearch.model.JwtOptionsInput.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.opensearch.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The JWT authentication and authorization configuration for an Amazon OpenSearch Service domain.
 */
public class JwtOptionsInput private constructor(builder: Builder) {
    /**
     * True to enable JWT authentication and authorization for a domain.
     */
    public val enabled: kotlin.Boolean? = builder.enabled
    /**
     * Element of the JWT assertion used by the cluster to verify JWT signatures.
     */
    public val publicKey: kotlin.String? = builder.publicKey
    /**
     * Element of the JWT assertion to use for roles.
     */
    public val rolesKey: kotlin.String? = builder.rolesKey
    /**
     * Element of the JWT assertion to use for the user name.
     */
    public val subjectKey: kotlin.String? = builder.subjectKey

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

    override fun toString(): kotlin.String = buildString {
        append("JwtOptionsInput(")
        append("enabled=$enabled,")
        append("publicKey=$publicKey,")
        append("rolesKey=$rolesKey,")
        append("subjectKey=$subjectKey")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = enabled?.hashCode() ?: 0
        result = 31 * result + (publicKey?.hashCode() ?: 0)
        result = 31 * result + (rolesKey?.hashCode() ?: 0)
        result = 31 * result + (subjectKey?.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 JwtOptionsInput

        if (enabled != other.enabled) return false
        if (publicKey != other.publicKey) return false
        if (rolesKey != other.rolesKey) return false
        if (subjectKey != other.subjectKey) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * True to enable JWT authentication and authorization for a domain.
         */
        public var enabled: kotlin.Boolean? = null
        /**
         * Element of the JWT assertion used by the cluster to verify JWT signatures.
         */
        public var publicKey: kotlin.String? = null
        /**
         * Element of the JWT assertion to use for roles.
         */
        public var rolesKey: kotlin.String? = null
        /**
         * Element of the JWT assertion to use for the user name.
         */
        public var subjectKey: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.opensearch.model.JwtOptionsInput) : this() {
            this.enabled = x.enabled
            this.publicKey = x.publicKey
            this.rolesKey = x.rolesKey
            this.subjectKey = x.subjectKey
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy