All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.glue.model.PutSchemaVersionMetadataRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.glue.model

import aws.smithy.kotlin.runtime.SdkDsl

public class PutSchemaVersionMetadataRequest private constructor(builder: Builder) {
    /**
     * The metadata key's corresponding value.
     */
    public val metadataKeyValue: aws.sdk.kotlin.services.glue.model.MetadataKeyValuePair? = builder.metadataKeyValue
    /**
     * The unique ID for the schema.
     */
    public val schemaId: aws.sdk.kotlin.services.glue.model.SchemaId? = builder.schemaId
    /**
     * The unique version ID of the schema version.
     */
    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.PutSchemaVersionMetadataRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("PutSchemaVersionMetadataRequest(")
        append("metadataKeyValue=$metadataKeyValue,")
        append("schemaId=$schemaId,")
        append("schemaVersionId=$schemaVersionId,")
        append("schemaVersionNumber=$schemaVersionNumber")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = metadataKeyValue?.hashCode() ?: 0
        result = 31 * 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 PutSchemaVersionMetadataRequest

        if (metadataKeyValue != other.metadataKeyValue) return false
        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.PutSchemaVersionMetadataRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The metadata key's corresponding value.
         */
        public var metadataKeyValue: aws.sdk.kotlin.services.glue.model.MetadataKeyValuePair? = null
        /**
         * The unique ID for the schema.
         */
        public var schemaId: aws.sdk.kotlin.services.glue.model.SchemaId? = null
        /**
         * The unique version ID of the schema version.
         */
        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.PutSchemaVersionMetadataRequest) : this() {
            this.metadataKeyValue = x.metadataKeyValue
            this.schemaId = x.schemaId
            this.schemaVersionId = x.schemaVersionId
            this.schemaVersionNumber = x.schemaVersionNumber
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.glue.model.PutSchemaVersionMetadataRequest = PutSchemaVersionMetadataRequest(this)

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.MetadataKeyValuePair] inside the given [block]
         */
        public fun metadataKeyValue(block: aws.sdk.kotlin.services.glue.model.MetadataKeyValuePair.Builder.() -> kotlin.Unit) {
            this.metadataKeyValue = aws.sdk.kotlin.services.glue.model.MetadataKeyValuePair.invoke(block)
        }

        /**
         * 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
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy