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

commonMain.aws.sdk.kotlin.services.cleanroomsml.model.PutConfiguredAudienceModelPolicyRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.79
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cleanroomsml.model

import aws.smithy.kotlin.runtime.SdkDsl

public class PutConfiguredAudienceModelPolicyRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the configured audience model that the resource policy will govern.
     */
    public val configuredAudienceModelArn: kotlin.String? = builder.configuredAudienceModelArn
    /**
     * The IAM resource policy.
     */
    public val configuredAudienceModelPolicy: kotlin.String? = builder.configuredAudienceModelPolicy
    /**
     * Use this to prevent unexpected concurrent modification of the policy.
     */
    public val policyExistenceCondition: aws.sdk.kotlin.services.cleanroomsml.model.PolicyExistenceCondition? = builder.policyExistenceCondition
    /**
     * A cryptographic hash of the contents of the policy used to prevent unexpected concurrent modification of the policy.
     */
    public val previousPolicyHash: kotlin.String? = builder.previousPolicyHash

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

    override fun toString(): kotlin.String = buildString {
        append("PutConfiguredAudienceModelPolicyRequest(")
        append("configuredAudienceModelArn=$configuredAudienceModelArn,")
        append("configuredAudienceModelPolicy=$configuredAudienceModelPolicy,")
        append("policyExistenceCondition=$policyExistenceCondition,")
        append("previousPolicyHash=$previousPolicyHash")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = configuredAudienceModelArn?.hashCode() ?: 0
        result = 31 * result + (configuredAudienceModelPolicy?.hashCode() ?: 0)
        result = 31 * result + (policyExistenceCondition?.hashCode() ?: 0)
        result = 31 * result + (previousPolicyHash?.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 PutConfiguredAudienceModelPolicyRequest

        if (configuredAudienceModelArn != other.configuredAudienceModelArn) return false
        if (configuredAudienceModelPolicy != other.configuredAudienceModelPolicy) return false
        if (policyExistenceCondition != other.policyExistenceCondition) return false
        if (previousPolicyHash != other.previousPolicyHash) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the configured audience model that the resource policy will govern.
         */
        public var configuredAudienceModelArn: kotlin.String? = null
        /**
         * The IAM resource policy.
         */
        public var configuredAudienceModelPolicy: kotlin.String? = null
        /**
         * Use this to prevent unexpected concurrent modification of the policy.
         */
        public var policyExistenceCondition: aws.sdk.kotlin.services.cleanroomsml.model.PolicyExistenceCondition? = null
        /**
         * A cryptographic hash of the contents of the policy used to prevent unexpected concurrent modification of the policy.
         */
        public var previousPolicyHash: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanroomsml.model.PutConfiguredAudienceModelPolicyRequest) : this() {
            this.configuredAudienceModelArn = x.configuredAudienceModelArn
            this.configuredAudienceModelPolicy = x.configuredAudienceModelPolicy
            this.policyExistenceCondition = x.policyExistenceCondition
            this.previousPolicyHash = x.previousPolicyHash
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy