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

commonMain.aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAssociationAnalysisRule.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.cleanrooms.model

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

/**
 * An analysis rule for a configured table association. This analysis rule specifies how data from the table can be used within its associated collaboration. In the console, the `ConfiguredTableAssociationAnalysisRule` is referred to as the *collaboration analysis rule*.
 */
public class ConfiguredTableAssociationAnalysisRule private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the configured table association.
     */
    public val configuredTableAssociationArn: kotlin.String = requireNotNull(builder.configuredTableAssociationArn) { "A non-null value must be provided for configuredTableAssociationArn" }
    /**
     * The unique identifier for the configured table association.
     */
    public val configuredTableAssociationId: kotlin.String = requireNotNull(builder.configuredTableAssociationId) { "A non-null value must be provided for configuredTableAssociationId" }
    /**
     * The creation time of the configured table association analysis rule.
     */
    public val createTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createTime) { "A non-null value must be provided for createTime" }
    /**
     * The membership identifier for the configured table association analysis rule.
     */
    public val membershipIdentifier: kotlin.String = requireNotNull(builder.membershipIdentifier) { "A non-null value must be provided for membershipIdentifier" }
    /**
     * The policy of the configured table association analysis rule.
     */
    public val policy: aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAssociationAnalysisRulePolicy? = builder.policy
    /**
     * The type of the configured table association analysis rule.
     */
    public val type: aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAssociationAnalysisRuleType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
    /**
     * The update time of the configured table association analysis rule.
     */
    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.ConfiguredTableAssociationAnalysisRule = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ConfiguredTableAssociationAnalysisRule(")
        append("configuredTableAssociationArn=$configuredTableAssociationArn,")
        append("configuredTableAssociationId=$configuredTableAssociationId,")
        append("createTime=$createTime,")
        append("membershipIdentifier=$membershipIdentifier,")
        append("policy=$policy,")
        append("type=$type,")
        append("updateTime=$updateTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = configuredTableAssociationArn.hashCode()
        result = 31 * result + (configuredTableAssociationId.hashCode())
        result = 31 * result + (createTime.hashCode())
        result = 31 * result + (membershipIdentifier.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 ConfiguredTableAssociationAnalysisRule

        if (configuredTableAssociationArn != other.configuredTableAssociationArn) return false
        if (configuredTableAssociationId != other.configuredTableAssociationId) return false
        if (createTime != other.createTime) return false
        if (membershipIdentifier != other.membershipIdentifier) 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.ConfiguredTableAssociationAnalysisRule = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the configured table association.
         */
        public var configuredTableAssociationArn: kotlin.String? = null
        /**
         * The unique identifier for the configured table association.
         */
        public var configuredTableAssociationId: kotlin.String? = null
        /**
         * The creation time of the configured table association analysis rule.
         */
        public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The membership identifier for the configured table association analysis rule.
         */
        public var membershipIdentifier: kotlin.String? = null
        /**
         * The policy of the configured table association analysis rule.
         */
        public var policy: aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAssociationAnalysisRulePolicy? = null
        /**
         * The type of the configured table association analysis rule.
         */
        public var type: aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAssociationAnalysisRuleType? = null
        /**
         * The update time of the configured table association analysis rule.
         */
        public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAssociationAnalysisRule) : this() {
            this.configuredTableAssociationArn = x.configuredTableAssociationArn
            this.configuredTableAssociationId = x.configuredTableAssociationId
            this.createTime = x.createTime
            this.membershipIdentifier = x.membershipIdentifier
            this.policy = x.policy
            this.type = x.type
            this.updateTime = x.updateTime
        }

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

        internal fun correctErrors(): Builder {
            if (configuredTableAssociationArn == null) configuredTableAssociationArn = ""
            if (configuredTableAssociationId == null) configuredTableAssociationId = ""
            if (createTime == null) createTime = Instant.fromEpochSeconds(0)
            if (membershipIdentifier == null) membershipIdentifier = ""
            if (type == null) type = ConfiguredTableAssociationAnalysisRuleType.SdkUnknown("no value provided")
            if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy