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

commonMain.aws.sdk.kotlin.services.glue.model.GetSchemaVersionsDiffRequest.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 GetSchemaVersionsDiffRequest private constructor(builder: Builder) {
    /**
     * The first of the two schema versions to be compared.
     */
    public val firstSchemaVersionNumber: aws.sdk.kotlin.services.glue.model.SchemaVersionNumber? = builder.firstSchemaVersionNumber
    /**
     * Refers to `SYNTAX_DIFF`, which is the currently supported diff type.
     */
    public val schemaDiffType: aws.sdk.kotlin.services.glue.model.SchemaDiffType? = builder.schemaDiffType
    /**
     * 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
    /**
     * The second of the two schema versions to be compared.
     */
    public val secondSchemaVersionNumber: aws.sdk.kotlin.services.glue.model.SchemaVersionNumber? = builder.secondSchemaVersionNumber

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.GetSchemaVersionsDiffRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GetSchemaVersionsDiffRequest(")
        append("firstSchemaVersionNumber=$firstSchemaVersionNumber,")
        append("schemaDiffType=$schemaDiffType,")
        append("schemaId=$schemaId,")
        append("secondSchemaVersionNumber=$secondSchemaVersionNumber")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = firstSchemaVersionNumber?.hashCode() ?: 0
        result = 31 * result + (schemaDiffType?.hashCode() ?: 0)
        result = 31 * result + (schemaId?.hashCode() ?: 0)
        result = 31 * result + (secondSchemaVersionNumber?.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 GetSchemaVersionsDiffRequest

        if (firstSchemaVersionNumber != other.firstSchemaVersionNumber) return false
        if (schemaDiffType != other.schemaDiffType) return false
        if (schemaId != other.schemaId) return false
        if (secondSchemaVersionNumber != other.secondSchemaVersionNumber) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.GetSchemaVersionsDiffRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The first of the two schema versions to be compared.
         */
        public var firstSchemaVersionNumber: aws.sdk.kotlin.services.glue.model.SchemaVersionNumber? = null
        /**
         * Refers to `SYNTAX_DIFF`, which is the currently supported diff type.
         */
        public var schemaDiffType: aws.sdk.kotlin.services.glue.model.SchemaDiffType? = 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
        /**
         * The second of the two schema versions to be compared.
         */
        public var secondSchemaVersionNumber: aws.sdk.kotlin.services.glue.model.SchemaVersionNumber? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.GetSchemaVersionsDiffRequest) : this() {
            this.firstSchemaVersionNumber = x.firstSchemaVersionNumber
            this.schemaDiffType = x.schemaDiffType
            this.schemaId = x.schemaId
            this.secondSchemaVersionNumber = x.secondSchemaVersionNumber
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.SchemaVersionNumber] inside the given [block]
         */
        public fun firstSchemaVersionNumber(block: aws.sdk.kotlin.services.glue.model.SchemaVersionNumber.Builder.() -> kotlin.Unit) {
            this.firstSchemaVersionNumber = aws.sdk.kotlin.services.glue.model.SchemaVersionNumber.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 secondSchemaVersionNumber(block: aws.sdk.kotlin.services.glue.model.SchemaVersionNumber.Builder.() -> kotlin.Unit) {
            this.secondSchemaVersionNumber = aws.sdk.kotlin.services.glue.model.SchemaVersionNumber.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy