commonMain.aws.sdk.kotlin.services.glue.model.GetPartitionResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetPartitionResponse private constructor(builder: Builder) {
/**
* The requested information, in the form of a `Partition` object.
*/
public val partition: aws.sdk.kotlin.services.glue.model.Partition? = builder.partition
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.GetPartitionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetPartitionResponse(")
append("partition=$partition")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = partition?.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 GetPartitionResponse
if (partition != other.partition) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.GetPartitionResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The requested information, in the form of a `Partition` object.
*/
public var partition: aws.sdk.kotlin.services.glue.model.Partition? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.GetPartitionResponse) : this() {
this.partition = x.partition
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.GetPartitionResponse = GetPartitionResponse(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.Partition] inside the given [block]
*/
public fun partition(block: aws.sdk.kotlin.services.glue.model.Partition.Builder.() -> kotlin.Unit) {
this.partition = aws.sdk.kotlin.services.glue.model.Partition.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}