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

commonMain.aws.sdk.kotlin.services.grafana.model.AuthenticationSummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.grafana.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A structure that describes whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication, and whether that authentication is fully configured.
 */
public class AuthenticationSummary private constructor(builder: Builder) {
    /**
     * Specifies whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
     */
    public val providers: List = requireNotNull(builder.providers) { "A non-null value must be provided for providers" }
    /**
     * Specifies whether the workplace's user authentication method is fully configured.
     */
    public val samlConfigurationStatus: aws.sdk.kotlin.services.grafana.model.SamlConfigurationStatus? = builder.samlConfigurationStatus

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

    override fun toString(): kotlin.String = buildString {
        append("AuthenticationSummary(")
        append("providers=$providers,")
        append("samlConfigurationStatus=$samlConfigurationStatus")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = providers.hashCode()
        result = 31 * result + (samlConfigurationStatus?.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 AuthenticationSummary

        if (providers != other.providers) return false
        if (samlConfigurationStatus != other.samlConfigurationStatus) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies whether the workspace uses SAML, IAM Identity Center, or both methods for user authentication.
         */
        public var providers: List? = null
        /**
         * Specifies whether the workplace's user authentication method is fully configured.
         */
        public var samlConfigurationStatus: aws.sdk.kotlin.services.grafana.model.SamlConfigurationStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.grafana.model.AuthenticationSummary) : this() {
            this.providers = x.providers
            this.samlConfigurationStatus = x.samlConfigurationStatus
        }

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

        internal fun correctErrors(): Builder {
            if (providers == null) providers = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy