commonMain.aws.sdk.kotlin.services.cleanrooms.model.CreateMembershipRequest.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
public class CreateMembershipRequest private constructor(builder: Builder) {
/**
* The unique ID for the associated collaboration.
*/
public val collaborationIdentifier: kotlin.String = requireNotNull(builder.collaborationIdentifier) { "A non-null value must be provided for collaborationIdentifier" }
/**
* The default protected query result configuration as specified by the member who can receive results.
*/
public val defaultResultConfiguration: aws.sdk.kotlin.services.cleanrooms.model.MembershipProtectedQueryResultConfiguration? = builder.defaultResultConfiguration
/**
* The payment responsibilities accepted by the collaboration member.
*
* Not required if the collaboration member has the member ability to run queries.
*
* Required if the collaboration member doesn't have the member ability to run queries but is configured as a payer by the collaboration creator.
*/
public val paymentConfiguration: aws.sdk.kotlin.services.cleanrooms.model.MembershipPaymentConfiguration? = builder.paymentConfiguration
/**
* An indicator as to whether query logging has been enabled or disabled for the membership.
*/
public val queryLogStatus: aws.sdk.kotlin.services.cleanrooms.model.MembershipQueryLogStatus = requireNotNull(builder.queryLogStatus) { "A non-null value must be provided for queryLogStatus" }
/**
* An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanrooms.model.CreateMembershipRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateMembershipRequest(")
append("collaborationIdentifier=$collaborationIdentifier,")
append("defaultResultConfiguration=$defaultResultConfiguration,")
append("paymentConfiguration=$paymentConfiguration,")
append("queryLogStatus=$queryLogStatus,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = collaborationIdentifier.hashCode()
result = 31 * result + (defaultResultConfiguration?.hashCode() ?: 0)
result = 31 * result + (paymentConfiguration?.hashCode() ?: 0)
result = 31 * result + (queryLogStatus.hashCode())
result = 31 * result + (tags?.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 CreateMembershipRequest
if (collaborationIdentifier != other.collaborationIdentifier) return false
if (defaultResultConfiguration != other.defaultResultConfiguration) return false
if (paymentConfiguration != other.paymentConfiguration) return false
if (queryLogStatus != other.queryLogStatus) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.CreateMembershipRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique ID for the associated collaboration.
*/
public var collaborationIdentifier: kotlin.String? = null
/**
* The default protected query result configuration as specified by the member who can receive results.
*/
public var defaultResultConfiguration: aws.sdk.kotlin.services.cleanrooms.model.MembershipProtectedQueryResultConfiguration? = null
/**
* The payment responsibilities accepted by the collaboration member.
*
* Not required if the collaboration member has the member ability to run queries.
*
* Required if the collaboration member doesn't have the member ability to run queries but is configured as a payer by the collaboration creator.
*/
public var paymentConfiguration: aws.sdk.kotlin.services.cleanrooms.model.MembershipPaymentConfiguration? = null
/**
* An indicator as to whether query logging has been enabled or disabled for the membership.
*/
public var queryLogStatus: aws.sdk.kotlin.services.cleanrooms.model.MembershipQueryLogStatus? = null
/**
* An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.CreateMembershipRequest) : this() {
this.collaborationIdentifier = x.collaborationIdentifier
this.defaultResultConfiguration = x.defaultResultConfiguration
this.paymentConfiguration = x.paymentConfiguration
this.queryLogStatus = x.queryLogStatus
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.CreateMembershipRequest = CreateMembershipRequest(this)
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.MembershipProtectedQueryResultConfiguration] inside the given [block]
*/
public fun defaultResultConfiguration(block: aws.sdk.kotlin.services.cleanrooms.model.MembershipProtectedQueryResultConfiguration.Builder.() -> kotlin.Unit) {
this.defaultResultConfiguration = aws.sdk.kotlin.services.cleanrooms.model.MembershipProtectedQueryResultConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cleanrooms.model.MembershipPaymentConfiguration] inside the given [block]
*/
public fun paymentConfiguration(block: aws.sdk.kotlin.services.cleanrooms.model.MembershipPaymentConfiguration.Builder.() -> kotlin.Unit) {
this.paymentConfiguration = aws.sdk.kotlin.services.cleanrooms.model.MembershipPaymentConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
if (collaborationIdentifier == null) collaborationIdentifier = ""
if (queryLogStatus == null) queryLogStatus = MembershipQueryLogStatus.SdkUnknown("no value provided")
return this
}
}
}