commonMain.aws.sdk.kotlin.services.cleanroomsml.model.GetConfiguredAudienceModelPolicyResponse.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 GetConfiguredAudienceModelPolicyResponse private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the configured audience model.
*/
public val configuredAudienceModelArn: kotlin.String = requireNotNull(builder.configuredAudienceModelArn) { "A non-null value must be provided for configuredAudienceModelArn" }
/**
* The configured audience model policy. This is a JSON 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.GetConfiguredAudienceModelPolicyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetConfiguredAudienceModelPolicyResponse(")
append("configuredAudienceModelArn=$configuredAudienceModelArn,")
append("configuredAudienceModelPolicy=$configuredAudienceModelPolicy,")
append("policyHash=$policyHash")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = configuredAudienceModelArn.hashCode()
result = 31 * 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 GetConfiguredAudienceModelPolicyResponse
if (configuredAudienceModelArn != other.configuredAudienceModelArn) return false
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.GetConfiguredAudienceModelPolicyResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the configured audience model.
*/
public var configuredAudienceModelArn: kotlin.String? = null
/**
* The configured audience model policy. This is a JSON 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.GetConfiguredAudienceModelPolicyResponse) : this() {
this.configuredAudienceModelArn = x.configuredAudienceModelArn
this.configuredAudienceModelPolicy = x.configuredAudienceModelPolicy
this.policyHash = x.policyHash
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanroomsml.model.GetConfiguredAudienceModelPolicyResponse = GetConfiguredAudienceModelPolicyResponse(this)
internal fun correctErrors(): Builder {
if (configuredAudienceModelArn == null) configuredAudienceModelArn = ""
if (configuredAudienceModelPolicy == null) configuredAudienceModelPolicy = ""
if (policyHash == null) policyHash = ""
return this
}
}
}