commonMain.aws.sdk.kotlin.services.glue.model.SchemaReference.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
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An object that references a schema stored in the Glue Schema Registry.
*/
public class SchemaReference private constructor(builder: Builder) {
/**
* A structure that contains schema identity fields. Either this or the `SchemaVersionId` has to be provided.
*/
public val schemaId: aws.sdk.kotlin.services.glue.model.SchemaId? = builder.schemaId
/**
* The unique ID assigned to a version of the schema. Either this or the `SchemaId` has to be provided.
*/
public val schemaVersionId: kotlin.String? = builder.schemaVersionId
/**
* The version number of the schema.
*/
public val schemaVersionNumber: kotlin.Long? = builder.schemaVersionNumber
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.SchemaReference = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SchemaReference(")
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 SchemaReference
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.SchemaReference = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A structure that contains schema identity fields. Either this or the `SchemaVersionId` has to be provided.
*/
public var schemaId: aws.sdk.kotlin.services.glue.model.SchemaId? = null
/**
* The unique ID assigned to a version of the schema. Either this or the `SchemaId` has to be provided.
*/
public var schemaVersionId: kotlin.String? = null
/**
* The version number of the schema.
*/
public var schemaVersionNumber: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.SchemaReference) : this() {
this.schemaId = x.schemaId
this.schemaVersionId = x.schemaVersionId
this.schemaVersionNumber = x.schemaVersionNumber
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.SchemaReference = SchemaReference(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)
}
internal fun correctErrors(): Builder {
return this
}
}
}