commonMain.aws.sdk.kotlin.services.cleanroomsml.model.PutConfiguredAudienceModelPolicyResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleanroomsml-jvm Show documentation
Show all versions of cleanroomsml-jvm Show documentation
The AWS SDK for Kotlin client for CleanRoomsML
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cleanroomsml.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutConfiguredAudienceModelPolicyResponse private constructor(builder: Builder) {
/**
* The IAM resource policy.
*/
public val configuredAudienceModelPolicy: kotlin.String = requireNotNull(builder.configuredAudienceModelPolicy) { "A non-null value must be provided for configuredAudienceModelPolicy" }
/**
* A cryptographic hash of the contents of the policy used to prevent unexpected concurrent modification of the policy.
*/
public val policyHash: kotlin.String = requireNotNull(builder.policyHash) { "A non-null value must be provided for policyHash" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanroomsml.model.PutConfiguredAudienceModelPolicyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutConfiguredAudienceModelPolicyResponse(")
append("configuredAudienceModelPolicy=$configuredAudienceModelPolicy,")
append("policyHash=$policyHash")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = configuredAudienceModelPolicy.hashCode()
result = 31 * result + (policyHash.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 PutConfiguredAudienceModelPolicyResponse
if (configuredAudienceModelPolicy != other.configuredAudienceModelPolicy) return false
if (policyHash != other.policyHash) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanroomsml.model.PutConfiguredAudienceModelPolicyResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The IAM resource policy.
*/
public var configuredAudienceModelPolicy: kotlin.String? = null
/**
* A cryptographic hash of the contents of the policy used to prevent unexpected concurrent modification of the policy.
*/
public var policyHash: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanroomsml.model.PutConfiguredAudienceModelPolicyResponse) : this() {
this.configuredAudienceModelPolicy = x.configuredAudienceModelPolicy
this.policyHash = x.policyHash
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanroomsml.model.PutConfiguredAudienceModelPolicyResponse = PutConfiguredAudienceModelPolicyResponse(this)
internal fun correctErrors(): Builder {
if (configuredAudienceModelPolicy == null) configuredAudienceModelPolicy = ""
if (policyHash == null) policyHash = ""
return this
}
}
}