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

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

public class CreateCollaborationRequest private constructor(builder: Builder) {
    /**
     * The display name of the collaboration creator.
     */
    public val creatorDisplayName: kotlin.String = requireNotNull(builder.creatorDisplayName) { "A non-null value must be provided for creatorDisplayName" }
    /**
     * The abilities granted to the collaboration creator.
     */
    public val creatorMemberAbilities: List = requireNotNull(builder.creatorMemberAbilities) { "A non-null value must be provided for creatorMemberAbilities" }
    /**
     * The collaboration creator's payment responsibilities set by the collaboration creator.
     *
     * 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.
     */
    public val creatorPaymentConfiguration: aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration? = builder.creatorPaymentConfiguration
    /**
     * The settings for client-side encryption with Cryptographic Computing for Clean Rooms.
     */
    public val dataEncryptionMetadata: aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata? = builder.dataEncryptionMetadata
    /**
     * A description of the collaboration provided by the collaboration owner.
     */
    public val description: kotlin.String = requireNotNull(builder.description) { "A non-null value must be provided for description" }
    /**
     * A list of initial members, not including the creator. This list is immutable.
     */
    public val members: List = requireNotNull(builder.members) { "A non-null value must be provided for members" }
    /**
     * The display name for a collaboration.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * An indicator as to whether query logging has been enabled or disabled for the collaboration.
     */
    public val queryLogStatus: aws.sdk.kotlin.services.cleanrooms.model.CollaborationQueryLogStatus = requireNotNull(builder.queryLogStatus) { "A non-null value must be provided for queryLogStatus" }
    /**
     * An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateCollaborationRequest(")
        append("creatorDisplayName=$creatorDisplayName,")
        append("creatorMemberAbilities=$creatorMemberAbilities,")
        append("creatorPaymentConfiguration=$creatorPaymentConfiguration,")
        append("dataEncryptionMetadata=$dataEncryptionMetadata,")
        append("description=$description,")
        append("members=$members,")
        append("name=$name,")
        append("queryLogStatus=$queryLogStatus,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = creatorDisplayName.hashCode()
        result = 31 * result + (creatorMemberAbilities.hashCode())
        result = 31 * result + (creatorPaymentConfiguration?.hashCode() ?: 0)
        result = 31 * result + (dataEncryptionMetadata?.hashCode() ?: 0)
        result = 31 * result + (description.hashCode())
        result = 31 * result + (members.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (queryLogStatus.hashCode())
        result = 31 * result + (tags?.hashCode() ?: 0)
        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 CreateCollaborationRequest

        if (creatorDisplayName != other.creatorDisplayName) return false
        if (creatorMemberAbilities != other.creatorMemberAbilities) return false
        if (creatorPaymentConfiguration != other.creatorPaymentConfiguration) return false
        if (dataEncryptionMetadata != other.dataEncryptionMetadata) return false
        if (description != other.description) return false
        if (members != other.members) return false
        if (name != other.name) return false
        if (queryLogStatus != other.queryLogStatus) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The display name of the collaboration creator.
         */
        public var creatorDisplayName: kotlin.String? = null
        /**
         * The abilities granted to the collaboration creator.
         */
        public var creatorMemberAbilities: List? = null
        /**
         * The collaboration creator's payment responsibilities set by the collaboration creator.
         *
         * 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.
         */
        public var creatorPaymentConfiguration: aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration? = null
        /**
         * The settings for client-side encryption with Cryptographic Computing for Clean Rooms.
         */
        public var dataEncryptionMetadata: aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata? = null
        /**
         * A description of the collaboration provided by the collaboration owner.
         */
        public var description: kotlin.String? = null
        /**
         * A list of initial members, not including the creator. This list is immutable.
         */
        public var members: List? = null
        /**
         * The display name for a collaboration.
         */
        public var name: kotlin.String? = null
        /**
         * An indicator as to whether query logging has been enabled or disabled for the collaboration.
         */
        public var queryLogStatus: aws.sdk.kotlin.services.cleanrooms.model.CollaborationQueryLogStatus? = null
        /**
         * An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.CreateCollaborationRequest) : this() {
            this.creatorDisplayName = x.creatorDisplayName
            this.creatorMemberAbilities = x.creatorMemberAbilities
            this.creatorPaymentConfiguration = x.creatorPaymentConfiguration
            this.dataEncryptionMetadata = x.dataEncryptionMetadata
            this.description = x.description
            this.members = x.members
            this.name = x.name
            this.queryLogStatus = x.queryLogStatus
            this.tags = x.tags
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration] inside the given [block]
         */
        public fun creatorPaymentConfiguration(block: aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration.Builder.() -> kotlin.Unit) {
            this.creatorPaymentConfiguration = aws.sdk.kotlin.services.cleanrooms.model.PaymentConfiguration.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata] inside the given [block]
         */
        public fun dataEncryptionMetadata(block: aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata.Builder.() -> kotlin.Unit) {
            this.dataEncryptionMetadata = aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (creatorDisplayName == null) creatorDisplayName = ""
            if (creatorMemberAbilities == null) creatorMemberAbilities = emptyList()
            if (description == null) description = ""
            if (members == null) members = emptyList()
            if (name == null) name = ""
            if (queryLogStatus == null) queryLogStatus = CollaborationQueryLogStatus.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy