commonMain.aws.sdk.kotlin.services.redshift.model.AssociateDataShareConsumerRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshift.model
import aws.smithy.kotlin.runtime.SdkDsl
public class AssociateDataShareConsumerRequest private constructor(builder: Builder) {
/**
* If set to true, allows write operations for a datashare.
*/
public val allowWrites: kotlin.Boolean? = builder.allowWrites
/**
* A value that specifies whether the datashare is associated with the entire account.
*/
public val associateEntireAccount: kotlin.Boolean? = builder.associateEntireAccount
/**
* The Amazon Resource Name (ARN) of the consumer namespace associated with the datashare.
*/
public val consumerArn: kotlin.String? = builder.consumerArn
/**
* From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified Amazon Web Services Region.
*/
public val consumerRegion: kotlin.String? = builder.consumerRegion
/**
* The Amazon Resource Name (ARN) of the datashare that the consumer is to use.
*/
public val dataShareArn: kotlin.String? = builder.dataShareArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.AssociateDataShareConsumerRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssociateDataShareConsumerRequest(")
append("allowWrites=$allowWrites,")
append("associateEntireAccount=$associateEntireAccount,")
append("consumerArn=$consumerArn,")
append("consumerRegion=$consumerRegion,")
append("dataShareArn=$dataShareArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = allowWrites?.hashCode() ?: 0
result = 31 * result + (associateEntireAccount?.hashCode() ?: 0)
result = 31 * result + (consumerArn?.hashCode() ?: 0)
result = 31 * result + (consumerRegion?.hashCode() ?: 0)
result = 31 * result + (dataShareArn?.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 AssociateDataShareConsumerRequest
if (allowWrites != other.allowWrites) return false
if (associateEntireAccount != other.associateEntireAccount) return false
if (consumerArn != other.consumerArn) return false
if (consumerRegion != other.consumerRegion) return false
if (dataShareArn != other.dataShareArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.AssociateDataShareConsumerRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* If set to true, allows write operations for a datashare.
*/
public var allowWrites: kotlin.Boolean? = null
/**
* A value that specifies whether the datashare is associated with the entire account.
*/
public var associateEntireAccount: kotlin.Boolean? = null
/**
* The Amazon Resource Name (ARN) of the consumer namespace associated with the datashare.
*/
public var consumerArn: kotlin.String? = null
/**
* From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified Amazon Web Services Region.
*/
public var consumerRegion: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the datashare that the consumer is to use.
*/
public var dataShareArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.AssociateDataShareConsumerRequest) : this() {
this.allowWrites = x.allowWrites
this.associateEntireAccount = x.associateEntireAccount
this.consumerArn = x.consumerArn
this.consumerRegion = x.consumerRegion
this.dataShareArn = x.dataShareArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.AssociateDataShareConsumerRequest = AssociateDataShareConsumerRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}