commonMain.aws.sdk.kotlin.services.glue.model.UpdateSchemaRequest.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 UpdateSchemaRequest private constructor(builder: Builder) {
/**
* The new compatibility setting for the schema.
*/
public val compatibility: aws.sdk.kotlin.services.glue.model.Compatibility? = builder.compatibility
/**
* The new description for the schema.
*/
public val description: kotlin.String? = builder.description
/**
* This is a wrapper structure to contain schema identity fields. The structure contains:
* + SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. One of `SchemaArn` or `SchemaName` has to be provided.
* + SchemaId$SchemaName: The name of the schema. One of `SchemaArn` or `SchemaName` has to be provided.
*/
public val schemaId: aws.sdk.kotlin.services.glue.model.SchemaId? = builder.schemaId
/**
* Version number required for check pointing. One of `VersionNumber` or `Compatibility` has to be provided.
*/
public val schemaVersionNumber: aws.sdk.kotlin.services.glue.model.SchemaVersionNumber? = builder.schemaVersionNumber
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.UpdateSchemaRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateSchemaRequest(")
append("compatibility=$compatibility,")
append("description=$description,")
append("schemaId=$schemaId,")
append("schemaVersionNumber=$schemaVersionNumber")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = compatibility?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (schemaId?.hashCode() ?: 0)
result = 31 * result + (schemaVersionNumber?.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 UpdateSchemaRequest
if (compatibility != other.compatibility) return false
if (description != other.description) return false
if (schemaId != other.schemaId) return false
if (schemaVersionNumber != other.schemaVersionNumber) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.UpdateSchemaRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The new compatibility setting for the schema.
*/
public var compatibility: aws.sdk.kotlin.services.glue.model.Compatibility? = null
/**
* The new description for the schema.
*/
public var description: kotlin.String? = null
/**
* This is a wrapper structure to contain schema identity fields. The structure contains:
* + SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. One of `SchemaArn` or `SchemaName` has to be provided.
* + SchemaId$SchemaName: The name of the schema. One of `SchemaArn` or `SchemaName` has to be provided.
*/
public var schemaId: aws.sdk.kotlin.services.glue.model.SchemaId? = null
/**
* Version number required for check pointing. One of `VersionNumber` or `Compatibility` has to be provided.
*/
public var schemaVersionNumber: aws.sdk.kotlin.services.glue.model.SchemaVersionNumber? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.UpdateSchemaRequest) : this() {
this.compatibility = x.compatibility
this.description = x.description
this.schemaId = x.schemaId
this.schemaVersionNumber = x.schemaVersionNumber
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.UpdateSchemaRequest = UpdateSchemaRequest(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.SchemaId] inside the given [block]
*/
public fun schemaId(block: aws.sdk.kotlin.services.glue.model.SchemaId.Builder.() -> kotlin.Unit) {
this.schemaId = aws.sdk.kotlin.services.glue.model.SchemaId.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.SchemaVersionNumber] inside the given [block]
*/
public fun schemaVersionNumber(block: aws.sdk.kotlin.services.glue.model.SchemaVersionNumber.Builder.() -> kotlin.Unit) {
this.schemaVersionNumber = aws.sdk.kotlin.services.glue.model.SchemaVersionNumber.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}