commonMain.aws.sdk.kotlin.services.cleanrooms.model.Collaboration.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
/**
* The multi-party data share environment. The collaboration contains metadata about its purpose and participants.
*/
public class Collaboration private constructor(builder: Builder) {
/**
* The unique ARN for the collaboration.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* The time when the collaboration was created.
*/
public val createTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createTime) { "A non-null value must be provided for createTime" }
/**
* The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.
*/
public val creatorAccountId: kotlin.String = requireNotNull(builder.creatorAccountId) { "A non-null value must be provided for creatorAccountId" }
/**
* A display name of the collaboration creator.
*/
public val creatorDisplayName: kotlin.String = requireNotNull(builder.creatorDisplayName) { "A non-null value must be provided for creatorDisplayName" }
/**
* The settings for client-side encryption for cryptographic computing.
*/
public val dataEncryptionMetadata: aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata? = builder.dataEncryptionMetadata
/**
* A description of the collaboration provided by the collaboration owner.
*/
public val description: kotlin.String? = builder.description
/**
* The unique ID for the collaboration.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* The status of a member in a collaboration.
*/
public val memberStatus: aws.sdk.kotlin.services.cleanrooms.model.MemberStatus = requireNotNull(builder.memberStatus) { "A non-null value must be provided for memberStatus" }
/**
* The unique ARN for your membership within the collaboration.
*/
public val membershipArn: kotlin.String? = builder.membershipArn
/**
* The unique ID for your membership within the collaboration.
*/
public val membershipId: kotlin.String? = builder.membershipId
/**
* A human-readable identifier provided by the collaboration owner. Display names are not unique.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* An indicator as to whether query logging has been enabled or disabled for the collaboration.
*/
public val queryLogStatus: aws.sdk.kotlin.services.cleanrooms.model.CollaborationQueryLogStatus = requireNotNull(builder.queryLogStatus) { "A non-null value must be provided for queryLogStatus" }
/**
* The time the collaboration metadata was last 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.Collaboration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Collaboration(")
append("arn=$arn,")
append("createTime=$createTime,")
append("creatorAccountId=$creatorAccountId,")
append("creatorDisplayName=$creatorDisplayName,")
append("dataEncryptionMetadata=$dataEncryptionMetadata,")
append("description=$description,")
append("id=$id,")
append("memberStatus=$memberStatus,")
append("membershipArn=$membershipArn,")
append("membershipId=$membershipId,")
append("name=$name,")
append("queryLogStatus=$queryLogStatus,")
append("updateTime=$updateTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (createTime.hashCode())
result = 31 * result + (creatorAccountId.hashCode())
result = 31 * result + (creatorDisplayName.hashCode())
result = 31 * result + (dataEncryptionMetadata?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (id.hashCode())
result = 31 * result + (memberStatus.hashCode())
result = 31 * result + (membershipArn?.hashCode() ?: 0)
result = 31 * result + (membershipId?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (queryLogStatus.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 Collaboration
if (arn != other.arn) return false
if (createTime != other.createTime) return false
if (creatorAccountId != other.creatorAccountId) return false
if (creatorDisplayName != other.creatorDisplayName) return false
if (dataEncryptionMetadata != other.dataEncryptionMetadata) return false
if (description != other.description) return false
if (id != other.id) return false
if (memberStatus != other.memberStatus) return false
if (membershipArn != other.membershipArn) return false
if (membershipId != other.membershipId) return false
if (name != other.name) return false
if (queryLogStatus != other.queryLogStatus) return false
if (updateTime != other.updateTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.Collaboration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique ARN for the collaboration.
*/
public var arn: kotlin.String? = null
/**
* The time when the collaboration was created.
*/
public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.
*/
public var creatorAccountId: kotlin.String? = null
/**
* A display name of the collaboration creator.
*/
public var creatorDisplayName: kotlin.String? = null
/**
* The settings for client-side encryption for cryptographic computing.
*/
public var dataEncryptionMetadata: aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata? = null
/**
* A description of the collaboration provided by the collaboration owner.
*/
public var description: kotlin.String? = null
/**
* The unique ID for the collaboration.
*/
public var id: kotlin.String? = null
/**
* The status of a member in a collaboration.
*/
public var memberStatus: aws.sdk.kotlin.services.cleanrooms.model.MemberStatus? = null
/**
* The unique ARN for your membership within the collaboration.
*/
public var membershipArn: kotlin.String? = null
/**
* The unique ID for your membership within the collaboration.
*/
public var membershipId: kotlin.String? = null
/**
* A human-readable identifier provided by the collaboration owner. Display names are not unique.
*/
public var name: kotlin.String? = null
/**
* An indicator as to whether query logging has been enabled or disabled for the collaboration.
*/
public var queryLogStatus: aws.sdk.kotlin.services.cleanrooms.model.CollaborationQueryLogStatus? = null
/**
* The time the collaboration metadata was last updated.
*/
public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.Collaboration) : this() {
this.arn = x.arn
this.createTime = x.createTime
this.creatorAccountId = x.creatorAccountId
this.creatorDisplayName = x.creatorDisplayName
this.dataEncryptionMetadata = x.dataEncryptionMetadata
this.description = x.description
this.id = x.id
this.memberStatus = x.memberStatus
this.membershipArn = x.membershipArn
this.membershipId = x.membershipId
this.name = x.name
this.queryLogStatus = x.queryLogStatus
this.updateTime = x.updateTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.Collaboration = Collaboration(this)
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata] inside the given [block]
*/
public fun dataEncryptionMetadata(block: aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata.Builder.() -> kotlin.Unit) {
this.dataEncryptionMetadata = aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata.invoke(block)
}
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (createTime == null) createTime = Instant.fromEpochSeconds(0)
if (creatorAccountId == null) creatorAccountId = ""
if (creatorDisplayName == null) creatorDisplayName = ""
if (id == null) id = ""
if (memberStatus == null) memberStatus = MemberStatus.SdkUnknown("no value provided")
if (name == null) name = ""
if (queryLogStatus == null) queryLogStatus = CollaborationQueryLogStatus.SdkUnknown("no value provided")
if (updateTime == null) updateTime = Instant.fromEpochSeconds(0)
return this
}
}
}