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

commonMain.aws.sdk.kotlin.services.datazone.model.CreateDomainUnitResponse.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
import aws.smithy.kotlin.runtime.time.Instant

public class CreateDomainUnitResponse private constructor(builder: Builder) {
    /**
     * The IDs of the ancestor domain units.
     */
    public val ancestorDomainUnitIds: List = requireNotNull(builder.ancestorDomainUnitIds) { "A non-null value must be provided for ancestorDomainUnitIds" }
    /**
     * The timestamp at which the domain unit was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * The user who created the domain unit.
     */
    public val createdBy: kotlin.String? = builder.createdBy
    /**
     * The description of the domain unit.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The ID of the domain where the domain unit was created.
     */
    public val domainId: kotlin.String = requireNotNull(builder.domainId) { "A non-null value must be provided for domainId" }
    /**
     * The ID of the domain unit.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The name of the domain unit.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The owners of the domain unit.
     */
    public val owners: List = requireNotNull(builder.owners) { "A non-null value must be provided for owners" }
    /**
     * The ID of the parent domain unit.
     */
    public val parentDomainUnitId: kotlin.String? = builder.parentDomainUnitId

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

    override fun toString(): kotlin.String = buildString {
        append("CreateDomainUnitResponse(")
        append("ancestorDomainUnitIds=$ancestorDomainUnitIds,")
        append("createdAt=$createdAt,")
        append("createdBy=$createdBy,")
        append("description=*** Sensitive Data Redacted ***,")
        append("domainId=$domainId,")
        append("id=$id,")
        append("name=*** Sensitive Data Redacted ***,")
        append("owners=$owners,")
        append("parentDomainUnitId=$parentDomainUnitId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = ancestorDomainUnitIds.hashCode()
        result = 31 * result + (createdAt?.hashCode() ?: 0)
        result = 31 * result + (createdBy?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (domainId.hashCode())
        result = 31 * result + (id.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (owners.hashCode())
        result = 31 * result + (parentDomainUnitId?.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 CreateDomainUnitResponse

        if (ancestorDomainUnitIds != other.ancestorDomainUnitIds) return false
        if (createdAt != other.createdAt) return false
        if (createdBy != other.createdBy) return false
        if (description != other.description) return false
        if (domainId != other.domainId) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (owners != other.owners) return false
        if (parentDomainUnitId != other.parentDomainUnitId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The IDs of the ancestor domain units.
         */
        public var ancestorDomainUnitIds: List? = null
        /**
         * The timestamp at which the domain unit was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The user who created the domain unit.
         */
        public var createdBy: kotlin.String? = null
        /**
         * The description of the domain unit.
         */
        public var description: kotlin.String? = null
        /**
         * The ID of the domain where the domain unit was created.
         */
        public var domainId: kotlin.String? = null
        /**
         * The ID of the domain unit.
         */
        public var id: kotlin.String? = null
        /**
         * The name of the domain unit.
         */
        public var name: kotlin.String? = null
        /**
         * The owners of the domain unit.
         */
        public var owners: List? = null
        /**
         * The ID of the parent domain unit.
         */
        public var parentDomainUnitId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datazone.model.CreateDomainUnitResponse) : this() {
            this.ancestorDomainUnitIds = x.ancestorDomainUnitIds
            this.createdAt = x.createdAt
            this.createdBy = x.createdBy
            this.description = x.description
            this.domainId = x.domainId
            this.id = x.id
            this.name = x.name
            this.owners = x.owners
            this.parentDomainUnitId = x.parentDomainUnitId
        }

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

        internal fun correctErrors(): Builder {
            if (ancestorDomainUnitIds == null) ancestorDomainUnitIds = emptyList()
            if (domainId == null) domainId = ""
            if (id == null) id = ""
            if (name == null) name = ""
            if (owners == null) owners = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy