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

commonMain.aws.sdk.kotlin.services.cloudsearch.model.DomainStatus.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudsearch.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The current status of the search domain.
 */
public class DomainStatus private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the search domain. See [Identifiers for IAM Entities](http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?Using_Identifiers.html) in *Using AWS Identity and Access Management* for more information.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * True if the search domain is created. It can take several minutes to initialize a domain when CreateDomain is called. Newly created search domains are returned from DescribeDomains with a false value for Created until domain creation is complete.
     */
    public val created: kotlin.Boolean? = builder.created
    /**
     * True if the search domain has been deleted. The system must clean up resources dedicated to the search domain when DeleteDomain is called. Newly deleted search domains are returned from DescribeDomains with a true value for IsDeleted for several minutes until resource cleanup is complete.
     */
    public val deleted: kotlin.Boolean? = builder.deleted
    /**
     * The service endpoint for updating documents in a search domain.
     */
    public val docService: aws.sdk.kotlin.services.cloudsearch.model.ServiceEndpoint? = builder.docService
    /**
     * An internally generated unique identifier for a domain.
     */
    public val domainId: kotlin.String = requireNotNull(builder.domainId) { "A non-null value must be provided for domainId" }
    /**
     * A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).
     */
    public val domainName: kotlin.String = requireNotNull(builder.domainName) { "A non-null value must be provided for domainName" }
    public val limits: aws.sdk.kotlin.services.cloudsearch.model.Limits? = builder.limits
    /**
     * True if processing is being done to activate the current domain configuration.
     */
    public val processing: kotlin.Boolean? = builder.processing
    /**
     * True if IndexDocuments needs to be called to activate the current domain configuration.
     */
    public val requiresIndexDocuments: kotlin.Boolean = requireNotNull(builder.requiresIndexDocuments) { "A non-null value must be provided for requiresIndexDocuments" }
    /**
     * The number of search instances that are available to process search requests.
     */
    public val searchInstanceCount: kotlin.Int? = builder.searchInstanceCount
    /**
     * The instance type that is being used to process search requests.
     */
    public val searchInstanceType: kotlin.String? = builder.searchInstanceType
    /**
     * The number of partitions across which the search index is spread.
     */
    public val searchPartitionCount: kotlin.Int? = builder.searchPartitionCount
    /**
     * The service endpoint for requesting search results from a search domain.
     */
    public val searchService: aws.sdk.kotlin.services.cloudsearch.model.ServiceEndpoint? = builder.searchService

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

    override fun toString(): kotlin.String = buildString {
        append("DomainStatus(")
        append("arn=$arn,")
        append("created=$created,")
        append("deleted=$deleted,")
        append("docService=$docService,")
        append("domainId=$domainId,")
        append("domainName=$domainName,")
        append("limits=$limits,")
        append("processing=$processing,")
        append("requiresIndexDocuments=$requiresIndexDocuments,")
        append("searchInstanceCount=$searchInstanceCount,")
        append("searchInstanceType=$searchInstanceType,")
        append("searchPartitionCount=$searchPartitionCount,")
        append("searchService=$searchService")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (created?.hashCode() ?: 0)
        result = 31 * result + (deleted?.hashCode() ?: 0)
        result = 31 * result + (docService?.hashCode() ?: 0)
        result = 31 * result + (domainId.hashCode())
        result = 31 * result + (domainName.hashCode())
        result = 31 * result + (limits?.hashCode() ?: 0)
        result = 31 * result + (processing?.hashCode() ?: 0)
        result = 31 * result + (requiresIndexDocuments.hashCode())
        result = 31 * result + (searchInstanceCount ?: 0)
        result = 31 * result + (searchInstanceType?.hashCode() ?: 0)
        result = 31 * result + (searchPartitionCount ?: 0)
        result = 31 * result + (searchService?.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 DomainStatus

        if (arn != other.arn) return false
        if (created != other.created) return false
        if (deleted != other.deleted) return false
        if (docService != other.docService) return false
        if (domainId != other.domainId) return false
        if (domainName != other.domainName) return false
        if (limits != other.limits) return false
        if (processing != other.processing) return false
        if (requiresIndexDocuments != other.requiresIndexDocuments) return false
        if (searchInstanceCount != other.searchInstanceCount) return false
        if (searchInstanceType != other.searchInstanceType) return false
        if (searchPartitionCount != other.searchPartitionCount) return false
        if (searchService != other.searchService) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the search domain. See [Identifiers for IAM Entities](http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?Using_Identifiers.html) in *Using AWS Identity and Access Management* for more information.
         */
        public var arn: kotlin.String? = null
        /**
         * True if the search domain is created. It can take several minutes to initialize a domain when CreateDomain is called. Newly created search domains are returned from DescribeDomains with a false value for Created until domain creation is complete.
         */
        public var created: kotlin.Boolean? = null
        /**
         * True if the search domain has been deleted. The system must clean up resources dedicated to the search domain when DeleteDomain is called. Newly deleted search domains are returned from DescribeDomains with a true value for IsDeleted for several minutes until resource cleanup is complete.
         */
        public var deleted: kotlin.Boolean? = null
        /**
         * The service endpoint for updating documents in a search domain.
         */
        public var docService: aws.sdk.kotlin.services.cloudsearch.model.ServiceEndpoint? = null
        /**
         * An internally generated unique identifier for a domain.
         */
        public var domainId: kotlin.String? = null
        /**
         * A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).
         */
        public var domainName: kotlin.String? = null
        public var limits: aws.sdk.kotlin.services.cloudsearch.model.Limits? = null
        /**
         * True if processing is being done to activate the current domain configuration.
         */
        public var processing: kotlin.Boolean? = null
        /**
         * True if IndexDocuments needs to be called to activate the current domain configuration.
         */
        public var requiresIndexDocuments: kotlin.Boolean? = null
        /**
         * The number of search instances that are available to process search requests.
         */
        public var searchInstanceCount: kotlin.Int? = null
        /**
         * The instance type that is being used to process search requests.
         */
        public var searchInstanceType: kotlin.String? = null
        /**
         * The number of partitions across which the search index is spread.
         */
        public var searchPartitionCount: kotlin.Int? = null
        /**
         * The service endpoint for requesting search results from a search domain.
         */
        public var searchService: aws.sdk.kotlin.services.cloudsearch.model.ServiceEndpoint? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudsearch.model.DomainStatus) : this() {
            this.arn = x.arn
            this.created = x.created
            this.deleted = x.deleted
            this.docService = x.docService
            this.domainId = x.domainId
            this.domainName = x.domainName
            this.limits = x.limits
            this.processing = x.processing
            this.requiresIndexDocuments = x.requiresIndexDocuments
            this.searchInstanceCount = x.searchInstanceCount
            this.searchInstanceType = x.searchInstanceType
            this.searchPartitionCount = x.searchPartitionCount
            this.searchService = x.searchService
        }

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

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

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

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

        internal fun correctErrors(): Builder {
            if (domainId == null) domainId = ""
            if (domainName == null) domainName = ""
            if (requiresIndexDocuments == null) requiresIndexDocuments = false
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy