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

commonMain.aws.sdk.kotlin.services.cleanrooms.model.QueryComputePaymentConfig.kt Maven / Gradle / Ivy

There is a newer version: 1.3.31
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

/**
 * An object representing the collaboration member's payment responsibilities set by the collaboration creator for query compute costs.
 */
public class QueryComputePaymentConfig private constructor(builder: Builder) {
    /**
     * Indicates whether the collaboration creator has configured the collaboration member to pay for query compute costs (`TRUE`) or has not configured the collaboration member to pay for query compute costs (`FALSE`).
     *
     * Exactly one member can be configured to pay for query compute costs. An error is returned if the collaboration creator sets a `TRUE` value for more than one member in the collaboration.
     *
     * If the collaboration creator hasn't specified anyone as the member paying for query compute costs, then the member who can query is the default payer. An error is returned if the collaboration creator sets a `FALSE` value for the member who can query.
     */
    public val isResponsible: kotlin.Boolean = requireNotNull(builder.isResponsible) { "A non-null value must be provided for isResponsible" }

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

    override fun toString(): kotlin.String = buildString {
        append("QueryComputePaymentConfig(")
        append("isResponsible=$isResponsible")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = isResponsible.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 QueryComputePaymentConfig

        if (isResponsible != other.isResponsible) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Indicates whether the collaboration creator has configured the collaboration member to pay for query compute costs (`TRUE`) or has not configured the collaboration member to pay for query compute costs (`FALSE`).
         *
         * Exactly one member can be configured to pay for query compute costs. An error is returned if the collaboration creator sets a `TRUE` value for more than one member in the collaboration.
         *
         * If the collaboration creator hasn't specified anyone as the member paying for query compute costs, then the member who can query is the default payer. An error is returned if the collaboration creator sets a `FALSE` value for the member who can query.
         */
        public var isResponsible: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.QueryComputePaymentConfig) : this() {
            this.isResponsible = x.isResponsible
        }

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

        internal fun correctErrors(): Builder {
            if (isResponsible == null) isResponsible = false
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy