commonMain.aws.sdk.kotlin.services.cleanrooms.model.ConfiguredAudienceModelAssociation.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleanrooms-jvm Show documentation
Show all versions of cleanrooms-jvm Show documentation
The AWS SDK for Kotlin client for CleanRooms
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cleanrooms.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Details about the configured audience model association.
*/
public class ConfiguredAudienceModelAssociation private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the configured audience model association.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* The Amazon Resource Name (ARN) of the collaboration that contains this configured audience model association.
*/
public val collaborationArn: kotlin.String = requireNotNull(builder.collaborationArn) { "A non-null value must be provided for collaborationArn" }
/**
* A unique identifier of the collaboration that contains this configured audience model association.
*/
public val collaborationId: kotlin.String = requireNotNull(builder.collaborationId) { "A non-null value must be provided for collaborationId" }
/**
* The Amazon Resource Name (ARN) of the configured audience model that was used for this configured audience model association.
*/
public val configuredAudienceModelArn: kotlin.String = requireNotNull(builder.configuredAudienceModelArn) { "A non-null value must be provided for configuredAudienceModelArn" }
/**
* The time at which the configured audience model association was created.
*/
public val createTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createTime) { "A non-null value must be provided for createTime" }
/**
* The description of the configured audience model association.
*/
public val description: kotlin.String? = builder.description
/**
* A unique identifier of the configured audience model association.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* 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.
*/
public val manageResourcePolicies: kotlin.Boolean = requireNotNull(builder.manageResourcePolicies) { "A non-null value must be provided for manageResourcePolicies" }
/**
* The Amazon Resource Name (ARN) of the membership that contains this configured audience model association.
*/
public val membershipArn: kotlin.String = requireNotNull(builder.membershipArn) { "A non-null value must be provided for membershipArn" }
/**
* A unique identifier for the membership that contains this configured audience model association.
*/
public val membershipId: kotlin.String = requireNotNull(builder.membershipId) { "A non-null value must be provided for membershipId" }
/**
* The name of the configured audience model association.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The most recent time at which the configured audience model association was updated.
*/
public val updateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateTime) { "A non-null value must be provided for updateTime" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanrooms.model.ConfiguredAudienceModelAssociation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ConfiguredAudienceModelAssociation(")
append("arn=$arn,")
append("collaborationArn=$collaborationArn,")
append("collaborationId=$collaborationId,")
append("configuredAudienceModelArn=$configuredAudienceModelArn,")
append("createTime=$createTime,")
append("description=$description,")
append("id=$id,")
append("manageResourcePolicies=$manageResourcePolicies,")
append("membershipArn=$membershipArn,")
append("membershipId=$membershipId,")
append("name=$name,")
append("updateTime=$updateTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (collaborationArn.hashCode())
result = 31 * result + (collaborationId.hashCode())
result = 31 * result + (configuredAudienceModelArn.hashCode())
result = 31 * result + (createTime.hashCode())
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (id.hashCode())
result = 31 * result + (manageResourcePolicies.hashCode())
result = 31 * result + (membershipArn.hashCode())
result = 31 * result + (membershipId.hashCode())
result = 31 * result + (name.hashCode())
result = 31 * result + (updateTime.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 ConfiguredAudienceModelAssociation
if (arn != other.arn) return false
if (collaborationArn != other.collaborationArn) return false
if (collaborationId != other.collaborationId) return false
if (configuredAudienceModelArn != other.configuredAudienceModelArn) return false
if (createTime != other.createTime) return false
if (description != other.description) return false
if (id != other.id) return false
if (manageResourcePolicies != other.manageResourcePolicies) return false
if (membershipArn != other.membershipArn) return false
if (membershipId != other.membershipId) return false
if (name != other.name) return false
if (updateTime != other.updateTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.ConfiguredAudienceModelAssociation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the configured audience model association.
*/
public var arn: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the collaboration that contains this configured audience model association.
*/
public var collaborationArn: kotlin.String? = null
/**
* A unique identifier of the collaboration that contains this configured audience model association.
*/
public var collaborationId: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the configured audience model that was used for this configured audience model association.
*/
public var configuredAudienceModelArn: kotlin.String? = null
/**
* The time at which the configured audience model association was created.
*/
public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The description of the configured audience model association.
*/
public var description: kotlin.String? = null
/**
* A unique identifier of the configured audience model association.
*/
public var id: 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.
*/
public var manageResourcePolicies: kotlin.Boolean? = null
/**
* The Amazon Resource Name (ARN) of the membership that contains this configured audience model association.
*/
public var membershipArn: kotlin.String? = null
/**
* A unique identifier for the membership that contains this configured audience model association.
*/
public var membershipId: kotlin.String? = null
/**
* The name of the configured audience model association.
*/
public var name: kotlin.String? = null
/**
* The most recent time at which the configured audience model association was updated.
*/
public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.ConfiguredAudienceModelAssociation) : this() {
this.arn = x.arn
this.collaborationArn = x.collaborationArn
this.collaborationId = x.collaborationId
this.configuredAudienceModelArn = x.configuredAudienceModelArn
this.createTime = x.createTime
this.description = x.description
this.id = x.id
this.manageResourcePolicies = x.manageResourcePolicies
this.membershipArn = x.membershipArn
this.membershipId = x.membershipId
this.name = x.name
this.updateTime = x.updateTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.ConfiguredAudienceModelAssociation = ConfiguredAudienceModelAssociation(this)
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (collaborationArn == null) collaborationArn = ""
if (collaborationId == null) collaborationId = ""
if (configuredAudienceModelArn == null) configuredAudienceModelArn = ""
if (createTime == null) createTime = Instant.fromEpochSeconds(0)
if (id == null) id = ""
if (manageResourcePolicies == null) manageResourcePolicies = false
if (membershipArn == null) membershipArn = ""
if (membershipId == null) membershipId = ""
if (name == null) name = ""
if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
return this
}
}
}