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

commonMain.aws.sdk.kotlin.services.servicediscovery.model.NamespaceSummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.servicediscovery.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * A complex type that contains information about a namespace.
 */
public class NamespaceSummary private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) that Cloud Map assigns to the namespace when you create it.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * The date and time that the namespace was created.
     */
    public val createDate: aws.smithy.kotlin.runtime.time.Instant? = builder.createDate
    /**
     * A description for the namespace.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The ID of the namespace.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The name of the namespace. When you create a namespace, Cloud Map automatically creates a Route 53 hosted zone that has the same name as the namespace.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The properties of the namespace.
     */
    public val properties: aws.sdk.kotlin.services.servicediscovery.model.NamespaceProperties? = builder.properties
    /**
     * The number of services that were created using the namespace.
     */
    public val serviceCount: kotlin.Int? = builder.serviceCount
    /**
     * The type of the namespace, either public or private.
     */
    public val type: aws.sdk.kotlin.services.servicediscovery.model.NamespaceType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("NamespaceSummary(")
        append("arn=$arn,")
        append("createDate=$createDate,")
        append("description=$description,")
        append("id=$id,")
        append("name=$name,")
        append("properties=$properties,")
        append("serviceCount=$serviceCount,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (createDate?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (properties?.hashCode() ?: 0)
        result = 31 * result + (serviceCount ?: 0)
        result = 31 * result + (type?.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 NamespaceSummary

        if (arn != other.arn) return false
        if (createDate != other.createDate) return false
        if (description != other.description) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (properties != other.properties) return false
        if (serviceCount != other.serviceCount) return false
        if (type != other.type) return false

        return true
    }

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

    public class Builder {
        /**
         * The Amazon Resource Name (ARN) that Cloud Map assigns to the namespace when you create it.
         */
        public var arn: kotlin.String? = null
        /**
         * The date and time that the namespace was created.
         */
        public var createDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A description for the namespace.
         */
        public var description: kotlin.String? = null
        /**
         * The ID of the namespace.
         */
        public var id: kotlin.String? = null
        /**
         * The name of the namespace. When you create a namespace, Cloud Map automatically creates a Route 53 hosted zone that has the same name as the namespace.
         */
        public var name: kotlin.String? = null
        /**
         * The properties of the namespace.
         */
        public var properties: aws.sdk.kotlin.services.servicediscovery.model.NamespaceProperties? = null
        /**
         * The number of services that were created using the namespace.
         */
        public var serviceCount: kotlin.Int? = null
        /**
         * The type of the namespace, either public or private.
         */
        public var type: aws.sdk.kotlin.services.servicediscovery.model.NamespaceType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.servicediscovery.model.NamespaceSummary) : this() {
            this.arn = x.arn
            this.createDate = x.createDate
            this.description = x.description
            this.id = x.id
            this.name = x.name
            this.properties = x.properties
            this.serviceCount = x.serviceCount
            this.type = x.type
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy