commonMain.aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAnalysisRule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleanrooms-jvm Show documentation
Show all versions of cleanrooms-jvm Show documentation
The AWS SDK for Kotlin client for CleanRooms
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cleanrooms.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* A configured table analysis rule, which limits how data for this table can be used.
*/
public class ConfiguredTableAnalysisRule private constructor(builder: Builder) {
/**
* The unique ARN for the configured table.
*/
public val configuredTableArn: kotlin.String = requireNotNull(builder.configuredTableArn) { "A non-null value must be provided for configuredTableArn" }
/**
* The unique ID for the configured table.
*/
public val configuredTableId: kotlin.String = requireNotNull(builder.configuredTableId) { "A non-null value must be provided for configuredTableId" }
/**
* The time the configured table analysis rule was created.
*/
public val createTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createTime) { "A non-null value must be provided for createTime" }
/**
* The policy that controls SQL query rules.
*/
public val policy: aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAnalysisRulePolicy? = builder.policy
/**
* The type of configured table analysis rule.
*/
public val type: aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAnalysisRuleType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
/**
* The time the configured table analysis rule was last updated.
*/
public val updateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateTime) { "A non-null value must be provided for updateTime" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAnalysisRule = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ConfiguredTableAnalysisRule(")
append("configuredTableArn=$configuredTableArn,")
append("configuredTableId=$configuredTableId,")
append("createTime=$createTime,")
append("policy=$policy,")
append("type=$type,")
append("updateTime=$updateTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = configuredTableArn.hashCode()
result = 31 * result + (configuredTableId.hashCode())
result = 31 * result + (createTime.hashCode())
result = 31 * result + (policy?.hashCode() ?: 0)
result = 31 * result + (type.hashCode())
result = 31 * result + (updateTime.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 ConfiguredTableAnalysisRule
if (configuredTableArn != other.configuredTableArn) return false
if (configuredTableId != other.configuredTableId) return false
if (createTime != other.createTime) return false
if (policy != other.policy) return false
if (type != other.type) return false
if (updateTime != other.updateTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAnalysisRule = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique ARN for the configured table.
*/
public var configuredTableArn: kotlin.String? = null
/**
* The unique ID for the configured table.
*/
public var configuredTableId: kotlin.String? = null
/**
* The time the configured table analysis rule was created.
*/
public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The policy that controls SQL query rules.
*/
public var policy: aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAnalysisRulePolicy? = null
/**
* The type of configured table analysis rule.
*/
public var type: aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAnalysisRuleType? = null
/**
* The time the configured table analysis rule was last updated.
*/
public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAnalysisRule) : this() {
this.configuredTableArn = x.configuredTableArn
this.configuredTableId = x.configuredTableId
this.createTime = x.createTime
this.policy = x.policy
this.type = x.type
this.updateTime = x.updateTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAnalysisRule = ConfiguredTableAnalysisRule(this)
internal fun correctErrors(): Builder {
if (configuredTableArn == null) configuredTableArn = ""
if (configuredTableId == null) configuredTableId = ""
if (createTime == null) createTime = Instant.fromEpochSeconds(0)
if (type == null) type = ConfiguredTableAnalysisRuleType.SdkUnknown("no value provided")
if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
return this
}
}
}