commonMain.aws.sdk.kotlin.services.glue.model.GetSchemaVersionRequest.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 GetSchemaVersionRequest private constructor(builder: Builder) {
/**
* This is a wrapper structure to contain schema identity fields. The structure contains:
* + SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. Either `SchemaArn` or `SchemaName` and `RegistryName` has to be provided.
* + SchemaId$SchemaName: The name of the schema. Either `SchemaArn` or `SchemaName` and `RegistryName` has to be provided.
*/
public val schemaId: aws.sdk.kotlin.services.glue.model.SchemaId? = builder.schemaId
/**
* The `SchemaVersionId` of the schema version. This field is required for fetching by schema ID. Either this or the `SchemaId` wrapper has to be provided.
*/
public val schemaVersionId: kotlin.String? = builder.schemaVersionId
/**
* The version number of the schema.
*/
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.GetSchemaVersionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetSchemaVersionRequest(")
append("schemaId=$schemaId,")
append("schemaVersionId=$schemaVersionId,")
append("schemaVersionNumber=$schemaVersionNumber")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = schemaId?.hashCode() ?: 0
result = 31 * result + (schemaVersionId?.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 GetSchemaVersionRequest
if (schemaId != other.schemaId) return false
if (schemaVersionId != other.schemaVersionId) return false
if (schemaVersionNumber != other.schemaVersionNumber) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.GetSchemaVersionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* This is a wrapper structure to contain schema identity fields. The structure contains:
* + SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. Either `SchemaArn` or `SchemaName` and `RegistryName` has to be provided.
* + SchemaId$SchemaName: The name of the schema. Either `SchemaArn` or `SchemaName` and `RegistryName` has to be provided.
*/
public var schemaId: aws.sdk.kotlin.services.glue.model.SchemaId? = null
/**
* The `SchemaVersionId` of the schema version. This field is required for fetching by schema ID. Either this or the `SchemaId` wrapper has to be provided.
*/
public var schemaVersionId: kotlin.String? = null
/**
* The version number of the schema.
*/
public var schemaVersionNumber: aws.sdk.kotlin.services.glue.model.SchemaVersionNumber? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.GetSchemaVersionRequest) : this() {
this.schemaId = x.schemaId
this.schemaVersionId = x.schemaVersionId
this.schemaVersionNumber = x.schemaVersionNumber
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.GetSchemaVersionRequest = GetSchemaVersionRequest(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
}
}
}