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

commonMain.aws.sdk.kotlin.services.cleanrooms.model.CreateConfiguredAudienceModelAssociationRequest.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 CreateConfiguredAudienceModelAssociationRequest private constructor(builder: Builder) {
    /**
     * A unique identifier for the configured audience model that you want to associate.
     */
    public val configuredAudienceModelArn: kotlin.String? = builder.configuredAudienceModelArn
    /**
     * The name of the configured audience model association.
     */
    public val configuredAudienceModelAssociationName: kotlin.String? = builder.configuredAudienceModelAssociationName
    /**
     * A description of the configured audience model association.
     */
    public val description: kotlin.String? = builder.description
    /**
     * When `TRUE`, indicates that the resource policy for the configured audience model resource being associated is configured for Clean Rooms to manage permissions related to the given collaboration. When `FALSE`, indicates that the configured audience model resource owner will manage permissions related to the given collaboration.
     *
     * Setting this to `TRUE` requires you to have permissions to create, update, and delete the resource policy for the `cleanrooms-ml` resource when you call the DeleteConfiguredAudienceModelAssociation resource. In addition, if you are the collaboration creator and specify `TRUE`, you must have the same permissions when you call the DeleteMember and DeleteCollaboration APIs.
     */
    public val manageResourcePolicies: kotlin.Boolean? = builder.manageResourcePolicies
    /**
     * A unique identifier for one of your memberships for a collaboration. The configured audience model is associated to the collaboration that this membership belongs to. Accepts a membership ID.
     */
    public val membershipIdentifier: kotlin.String? = builder.membershipIdentifier
    /**
     * 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.CreateConfiguredAudienceModelAssociationRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateConfiguredAudienceModelAssociationRequest(")
        append("configuredAudienceModelArn=$configuredAudienceModelArn,")
        append("configuredAudienceModelAssociationName=$configuredAudienceModelAssociationName,")
        append("description=$description,")
        append("manageResourcePolicies=$manageResourcePolicies,")
        append("membershipIdentifier=$membershipIdentifier,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = configuredAudienceModelArn?.hashCode() ?: 0
        result = 31 * result + (configuredAudienceModelAssociationName?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (manageResourcePolicies?.hashCode() ?: 0)
        result = 31 * result + (membershipIdentifier?.hashCode() ?: 0)
        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 CreateConfiguredAudienceModelAssociationRequest

        if (configuredAudienceModelArn != other.configuredAudienceModelArn) return false
        if (configuredAudienceModelAssociationName != other.configuredAudienceModelAssociationName) return false
        if (description != other.description) return false
        if (manageResourcePolicies != other.manageResourcePolicies) return false
        if (membershipIdentifier != other.membershipIdentifier) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A unique identifier for the configured audience model that you want to associate.
         */
        public var configuredAudienceModelArn: kotlin.String? = null
        /**
         * The name of the configured audience model association.
         */
        public var configuredAudienceModelAssociationName: kotlin.String? = null
        /**
         * A description of the configured audience model association.
         */
        public var description: kotlin.String? = null
        /**
         * When `TRUE`, indicates that the resource policy for the configured audience model resource being associated is configured for Clean Rooms to manage permissions related to the given collaboration. When `FALSE`, indicates that the configured audience model resource owner will manage permissions related to the given collaboration.
         *
         * Setting this to `TRUE` requires you to have permissions to create, update, and delete the resource policy for the `cleanrooms-ml` resource when you call the DeleteConfiguredAudienceModelAssociation resource. In addition, if you are the collaboration creator and specify `TRUE`, you must have the same permissions when you call the DeleteMember and DeleteCollaboration APIs.
         */
        public var manageResourcePolicies: kotlin.Boolean? = null
        /**
         * A unique identifier for one of your memberships for a collaboration. The configured audience model is associated to the collaboration that this membership belongs to. Accepts a membership ID.
         */
        public var membershipIdentifier: kotlin.String? = 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.CreateConfiguredAudienceModelAssociationRequest) : this() {
            this.configuredAudienceModelArn = x.configuredAudienceModelArn
            this.configuredAudienceModelAssociationName = x.configuredAudienceModelAssociationName
            this.description = x.description
            this.manageResourcePolicies = x.manageResourcePolicies
            this.membershipIdentifier = x.membershipIdentifier
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy