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

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

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

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



/**
 * Options for enabling and configuring fine-grained access control. For more information, see [Fine-grained access control in Amazon OpenSearch Service](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html).
 */
public class AdvancedSecurityOptionsInput private constructor(builder: Builder) {
    /**
     * True to enable a 30-day migration period during which administrators can create role mappings. Only necessary when [enabling fine-grained access control on an existing domain](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html#fgac-enabling-existing).
     */
    public val anonymousAuthEnabled: kotlin.Boolean? = builder.anonymousAuthEnabled
    /**
     * True to enable fine-grained access control.
     */
    public val enabled: kotlin.Boolean? = builder.enabled
    /**
     * True to enable the internal user database.
     */
    public val internalUserDatabaseEnabled: kotlin.Boolean? = builder.internalUserDatabaseEnabled
    /**
     * Container for information about the master user.
     */
    public val masterUserOptions: aws.sdk.kotlin.services.opensearch.model.MasterUserOptions? = builder.masterUserOptions
    /**
     * Container for information about the SAML configuration for OpenSearch Dashboards.
     */
    public val samlOptions: aws.sdk.kotlin.services.opensearch.model.SamlOptionsInput? = builder.samlOptions

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

    override fun toString(): kotlin.String = buildString {
        append("AdvancedSecurityOptionsInput(")
        append("anonymousAuthEnabled=$anonymousAuthEnabled,")
        append("enabled=$enabled,")
        append("internalUserDatabaseEnabled=$internalUserDatabaseEnabled,")
        append("masterUserOptions=$masterUserOptions,")
        append("samlOptions=$samlOptions")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = anonymousAuthEnabled?.hashCode() ?: 0
        result = 31 * result + (enabled?.hashCode() ?: 0)
        result = 31 * result + (internalUserDatabaseEnabled?.hashCode() ?: 0)
        result = 31 * result + (masterUserOptions?.hashCode() ?: 0)
        result = 31 * result + (samlOptions?.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 AdvancedSecurityOptionsInput

        if (anonymousAuthEnabled != other.anonymousAuthEnabled) return false
        if (enabled != other.enabled) return false
        if (internalUserDatabaseEnabled != other.internalUserDatabaseEnabled) return false
        if (masterUserOptions != other.masterUserOptions) return false
        if (samlOptions != other.samlOptions) return false

        return true
    }

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

    public class Builder {
        /**
         * True to enable a 30-day migration period during which administrators can create role mappings. Only necessary when [enabling fine-grained access control on an existing domain](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html#fgac-enabling-existing).
         */
        public var anonymousAuthEnabled: kotlin.Boolean? = null
        /**
         * True to enable fine-grained access control.
         */
        public var enabled: kotlin.Boolean? = null
        /**
         * True to enable the internal user database.
         */
        public var internalUserDatabaseEnabled: kotlin.Boolean? = null
        /**
         * Container for information about the master user.
         */
        public var masterUserOptions: aws.sdk.kotlin.services.opensearch.model.MasterUserOptions? = null
        /**
         * Container for information about the SAML configuration for OpenSearch Dashboards.
         */
        public var samlOptions: aws.sdk.kotlin.services.opensearch.model.SamlOptionsInput? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.opensearch.model.AdvancedSecurityOptionsInput) : this() {
            this.anonymousAuthEnabled = x.anonymousAuthEnabled
            this.enabled = x.enabled
            this.internalUserDatabaseEnabled = x.internalUserDatabaseEnabled
            this.masterUserOptions = x.masterUserOptions
            this.samlOptions = x.samlOptions
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy