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

commonMain.aws.sdk.kotlin.services.datazone.model.SelfGrantStatusDetail.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.datazone.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The details for the self granting status.
 */
public class SelfGrantStatusDetail private constructor(builder: Builder) {
    /**
     * The name of the database used for the data source.
     */
    public val databaseName: kotlin.String = requireNotNull(builder.databaseName) { "A non-null value must be provided for databaseName" }
    /**
     * The reason for why the operation failed.
     */
    public val failureCause: kotlin.String? = builder.failureCause
    /**
     * The name of the schema used in the data source.
     */
    public val schemaName: kotlin.String? = builder.schemaName
    /**
     * The self granting status of the data source.
     */
    public val status: aws.sdk.kotlin.services.datazone.model.SelfGrantStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }

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

    override fun toString(): kotlin.String = buildString {
        append("SelfGrantStatusDetail(")
        append("databaseName=$databaseName,")
        append("failureCause=$failureCause,")
        append("schemaName=$schemaName,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = databaseName.hashCode()
        result = 31 * result + (failureCause?.hashCode() ?: 0)
        result = 31 * result + (schemaName?.hashCode() ?: 0)
        result = 31 * result + (status.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 SelfGrantStatusDetail

        if (databaseName != other.databaseName) return false
        if (failureCause != other.failureCause) return false
        if (schemaName != other.schemaName) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the database used for the data source.
         */
        public var databaseName: kotlin.String? = null
        /**
         * The reason for why the operation failed.
         */
        public var failureCause: kotlin.String? = null
        /**
         * The name of the schema used in the data source.
         */
        public var schemaName: kotlin.String? = null
        /**
         * The self granting status of the data source.
         */
        public var status: aws.sdk.kotlin.services.datazone.model.SelfGrantStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datazone.model.SelfGrantStatusDetail) : this() {
            this.databaseName = x.databaseName
            this.failureCause = x.failureCause
            this.schemaName = x.schemaName
            this.status = x.status
        }

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

        internal fun correctErrors(): Builder {
            if (databaseName == null) databaseName = ""
            if (status == null) status = SelfGrantStatus.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy