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

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

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

/**
 * Specifies an option value.
 */
public class Option private constructor(builder: Builder) {
    /**
     * Specifies the description of the option.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Specifies the label of the option.
     */
    public val label: kotlin.String? = builder.label
    /**
     * Specifies the value of the option.
     */
    public val value: kotlin.String? = builder.value

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

    override fun toString(): kotlin.String = buildString {
        append("Option(")
        append("description=$description,")
        append("label=$label,")
        append("value=$value")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (label?.hashCode() ?: 0)
        result = 31 * result + (value?.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 Option

        if (description != other.description) return false
        if (label != other.label) return false
        if (value != other.value) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies the description of the option.
         */
        public var description: kotlin.String? = null
        /**
         * Specifies the label of the option.
         */
        public var label: kotlin.String? = null
        /**
         * Specifies the value of the option.
         */
        public var value: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.Option) : this() {
            this.description = x.description
            this.label = x.label
            this.value = x.value
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy