commonMain.aws.sdk.kotlin.services.cloudsearch.model.OptionStatus.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudsearch-jvm Show documentation
Show all versions of cloudsearch-jvm Show documentation
The AWS SDK for Kotlin client for CloudSearch
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudsearch.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* The status of domain configuration option.
*/
public class OptionStatus private constructor(builder: Builder) {
/**
* A timestamp for when this option was created.
*/
public val creationDate: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationDate) { "A non-null value must be provided for creationDate" }
/**
* Indicates that the option will be deleted once processing is complete.
*/
public val pendingDeletion: kotlin.Boolean? = builder.pendingDeletion
/**
* The state of processing a change to an option. Possible values:
* + `RequiresIndexDocuments`: the option's latest value will not be deployed until IndexDocuments has been called and indexing is complete.
* + `Processing`: the option's latest value is in the process of being activated.
* + `Active`: the option's latest value is completely deployed.
* + `FailedToValidate`: the option value is not compatible with the domain's data and cannot be used to index the data. You must either modify the option value or update or remove the incompatible documents.
*/
public val state: aws.sdk.kotlin.services.cloudsearch.model.OptionState = requireNotNull(builder.state) { "A non-null value must be provided for state" }
/**
* A timestamp for when this option was last updated.
*/
public val updateDate: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateDate) { "A non-null value must be provided for updateDate" }
/**
* A unique integer that indicates when this option was last updated.
*/
public val updateVersion: kotlin.Int = builder.updateVersion
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudsearch.model.OptionStatus = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OptionStatus(")
append("creationDate=$creationDate,")
append("pendingDeletion=$pendingDeletion,")
append("state=$state,")
append("updateDate=$updateDate,")
append("updateVersion=$updateVersion")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creationDate.hashCode()
result = 31 * result + (pendingDeletion?.hashCode() ?: 0)
result = 31 * result + (state.hashCode())
result = 31 * result + (updateDate.hashCode())
result = 31 * result + (updateVersion)
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 OptionStatus
if (creationDate != other.creationDate) return false
if (pendingDeletion != other.pendingDeletion) return false
if (state != other.state) return false
if (updateDate != other.updateDate) return false
if (updateVersion != other.updateVersion) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudsearch.model.OptionStatus = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A timestamp for when this option was created.
*/
public var creationDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Indicates that the option will be deleted once processing is complete.
*/
public var pendingDeletion: kotlin.Boolean? = null
/**
* The state of processing a change to an option. Possible values:
* + `RequiresIndexDocuments`: the option's latest value will not be deployed until IndexDocuments has been called and indexing is complete.
* + `Processing`: the option's latest value is in the process of being activated.
* + `Active`: the option's latest value is completely deployed.
* + `FailedToValidate`: the option value is not compatible with the domain's data and cannot be used to index the data. You must either modify the option value or update or remove the incompatible documents.
*/
public var state: aws.sdk.kotlin.services.cloudsearch.model.OptionState? = null
/**
* A timestamp for when this option was last updated.
*/
public var updateDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* A unique integer that indicates when this option was last updated.
*/
public var updateVersion: kotlin.Int = 0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudsearch.model.OptionStatus) : this() {
this.creationDate = x.creationDate
this.pendingDeletion = x.pendingDeletion
this.state = x.state
this.updateDate = x.updateDate
this.updateVersion = x.updateVersion
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudsearch.model.OptionStatus = OptionStatus(this)
internal fun correctErrors(): Builder {
if (creationDate == null) creationDate = Instant.fromEpochSeconds(0)
if (state == null) state = OptionState.SdkUnknown("no value provided")
if (updateDate == null) updateDate = Instant.fromEpochSeconds(0)
return this
}
}
}