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

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

/**
 * The status details of the analysis template validation. Clean Rooms Differential Privacy uses a general-purpose query structure to support complex SQL queries and validates whether an analysis template fits that general-purpose query structure. Validation is performed when analysis templates are created and fetched. Because analysis templates are immutable by design, we recommend that you create analysis templates after you associate the configured tables with their analysis rule to your collaboration.
 *
 * For more information, see [https://docs.aws.amazon.com/clean-rooms/latest/userguide/analysis-rules-custom.html#custom-diff-privacy](https://docs.aws.amazon.com/clean-rooms/latest/userguide/analysis-rules-custom.html#custom-diff-privacy).
 */
public class AnalysisTemplateValidationStatusDetail private constructor(builder: Builder) {
    /**
     * The reasons for the validation results.
     */
    public val reasons: List? = builder.reasons
    /**
     * The status of the validation.
     */
    public val status: aws.sdk.kotlin.services.cleanrooms.model.AnalysisTemplateValidationStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * The type of validation that was performed.
     */
    public val type: aws.sdk.kotlin.services.cleanrooms.model.AnalysisTemplateValidationType = requireNotNull(builder.type) { "A non-null value must be provided for type" }

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

    override fun toString(): kotlin.String = buildString {
        append("AnalysisTemplateValidationStatusDetail(")
        append("reasons=$reasons,")
        append("status=$status,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = reasons?.hashCode() ?: 0
        result = 31 * result + (status.hashCode())
        result = 31 * result + (type.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 AnalysisTemplateValidationStatusDetail

        if (reasons != other.reasons) return false
        if (status != other.status) return false
        if (type != other.type) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The reasons for the validation results.
         */
        public var reasons: List? = null
        /**
         * The status of the validation.
         */
        public var status: aws.sdk.kotlin.services.cleanrooms.model.AnalysisTemplateValidationStatus? = null
        /**
         * The type of validation that was performed.
         */
        public var type: aws.sdk.kotlin.services.cleanrooms.model.AnalysisTemplateValidationType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.AnalysisTemplateValidationStatusDetail) : this() {
            this.reasons = x.reasons
            this.status = x.status
            this.type = x.type
        }

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

        internal fun correctErrors(): Builder {
            if (status == null) status = AnalysisTemplateValidationStatus.SdkUnknown("no value provided")
            if (type == null) type = AnalysisTemplateValidationType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy