commonMain.aws.sdk.kotlin.services.glue.model.CreatePartitionRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreatePartitionRequest private constructor(builder: Builder) {
/**
* The Amazon Web Services account ID of the catalog in which the partition is to be created.
*/
public val catalogId: kotlin.String? = builder.catalogId
/**
* The name of the metadata database in which the partition is to be created.
*/
public val databaseName: kotlin.String? = builder.databaseName
/**
* A `PartitionInput` structure defining the partition to be created.
*/
public val partitionInput: aws.sdk.kotlin.services.glue.model.PartitionInput? = builder.partitionInput
/**
* The name of the metadata table in which the partition is to be created.
*/
public val tableName: kotlin.String? = builder.tableName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.CreatePartitionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreatePartitionRequest(")
append("catalogId=$catalogId,")
append("databaseName=$databaseName,")
append("partitionInput=$partitionInput,")
append("tableName=$tableName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = catalogId?.hashCode() ?: 0
result = 31 * result + (databaseName?.hashCode() ?: 0)
result = 31 * result + (partitionInput?.hashCode() ?: 0)
result = 31 * result + (tableName?.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 CreatePartitionRequest
if (catalogId != other.catalogId) return false
if (databaseName != other.databaseName) return false
if (partitionInput != other.partitionInput) return false
if (tableName != other.tableName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.CreatePartitionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Web Services account ID of the catalog in which the partition is to be created.
*/
public var catalogId: kotlin.String? = null
/**
* The name of the metadata database in which the partition is to be created.
*/
public var databaseName: kotlin.String? = null
/**
* A `PartitionInput` structure defining the partition to be created.
*/
public var partitionInput: aws.sdk.kotlin.services.glue.model.PartitionInput? = null
/**
* The name of the metadata table in which the partition is to be created.
*/
public var tableName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.CreatePartitionRequest) : this() {
this.catalogId = x.catalogId
this.databaseName = x.databaseName
this.partitionInput = x.partitionInput
this.tableName = x.tableName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.CreatePartitionRequest = CreatePartitionRequest(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.PartitionInput] inside the given [block]
*/
public fun partitionInput(block: aws.sdk.kotlin.services.glue.model.PartitionInput.Builder.() -> kotlin.Unit) {
this.partitionInput = aws.sdk.kotlin.services.glue.model.PartitionInput.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}