commonMain.aws.sdk.kotlin.services.cleanrooms.model.CreateConfiguredTableRequest.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 CreateConfiguredTableRequest private constructor(builder: Builder) {
/**
* The columns of the underlying table that can be used by collaborations or analysis rules.
*/
public val allowedColumns: List = requireNotNull(builder.allowedColumns) { "A non-null value must be provided for allowedColumns" }
/**
* The analysis method for the configured tables. The only valid value is currently `DIRECT_QUERY`.
*/
public val analysisMethod: aws.sdk.kotlin.services.cleanrooms.model.AnalysisMethod = requireNotNull(builder.analysisMethod) { "A non-null value must be provided for analysisMethod" }
/**
* A description for the configured table.
*/
public val description: kotlin.String? = builder.description
/**
* The name of the configured table.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* A reference to the Glue table being configured.
*/
public val tableReference: aws.sdk.kotlin.services.cleanrooms.model.TableReference? = builder.tableReference
/**
* 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.CreateConfiguredTableRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateConfiguredTableRequest(")
append("allowedColumns=$allowedColumns,")
append("analysisMethod=$analysisMethod,")
append("description=$description,")
append("name=$name,")
append("tableReference=$tableReference,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = allowedColumns.hashCode()
result = 31 * result + (analysisMethod.hashCode())
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (tableReference?.hashCode() ?: 0)
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 CreateConfiguredTableRequest
if (allowedColumns != other.allowedColumns) return false
if (analysisMethod != other.analysisMethod) return false
if (description != other.description) return false
if (name != other.name) return false
if (tableReference != other.tableReference) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanrooms.model.CreateConfiguredTableRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The columns of the underlying table that can be used by collaborations or analysis rules.
*/
public var allowedColumns: List? = null
/**
* The analysis method for the configured tables. The only valid value is currently `DIRECT_QUERY`.
*/
public var analysisMethod: aws.sdk.kotlin.services.cleanrooms.model.AnalysisMethod? = null
/**
* A description for the configured table.
*/
public var description: kotlin.String? = null
/**
* The name of the configured table.
*/
public var name: kotlin.String? = null
/**
* A reference to the Glue table being configured.
*/
public var tableReference: aws.sdk.kotlin.services.cleanrooms.model.TableReference? = 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.CreateConfiguredTableRequest) : this() {
this.allowedColumns = x.allowedColumns
this.analysisMethod = x.analysisMethod
this.description = x.description
this.name = x.name
this.tableReference = x.tableReference
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanrooms.model.CreateConfiguredTableRequest = CreateConfiguredTableRequest(this)
internal fun correctErrors(): Builder {
if (allowedColumns == null) allowedColumns = emptyList()
if (analysisMethod == null) analysisMethod = AnalysisMethod.SdkUnknown("no value provided")
if (name == null) name = ""
return this
}
}
}