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

commonMain.aws.sdk.kotlin.services.appfabric.model.Tenant.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.appfabric.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains information about an application tenant.
 */
public class Tenant private constructor(builder: Builder) {
    /**
     * The display name of the tenant.
     */
    public val tenantDisplayName: kotlin.String = requireNotNull(builder.tenantDisplayName) { "A non-null value must be provided for tenantDisplayName" }
    /**
     * The ID of the application tenant.
     */
    public val tenantIdentifier: kotlin.String = requireNotNull(builder.tenantIdentifier) { "A non-null value must be provided for tenantIdentifier" }

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

    override fun toString(): kotlin.String = buildString {
        append("Tenant(")
        append("tenantDisplayName=$tenantDisplayName,")
        append("tenantIdentifier=$tenantIdentifier")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = tenantDisplayName.hashCode()
        result = 31 * result + (tenantIdentifier.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 Tenant

        if (tenantDisplayName != other.tenantDisplayName) return false
        if (tenantIdentifier != other.tenantIdentifier) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The display name of the tenant.
         */
        public var tenantDisplayName: kotlin.String? = null
        /**
         * The ID of the application tenant.
         */
        public var tenantIdentifier: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appfabric.model.Tenant) : this() {
            this.tenantDisplayName = x.tenantDisplayName
            this.tenantIdentifier = x.tenantIdentifier
        }

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

        internal fun correctErrors(): Builder {
            if (tenantDisplayName == null) tenantDisplayName = ""
            if (tenantIdentifier == null) tenantIdentifier = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy