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

commonMain.aws.sdk.kotlin.services.glue.model.Property.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

/**
 * An object that defines a connection type for a compute environment.
 */
public class Property private constructor(builder: Builder) {
    /**
     * A list of `AllowedValue` objects representing the values allowed for the property.
     */
    public val allowedValues: List? = builder.allowedValues
    /**
     * Indicates which data operations are applicable to the property.
     */
    public val dataOperationScopes: List? = builder.dataOperationScopes
    /**
     * The default value for the property.
     */
    public val defaultValue: kotlin.String? = builder.defaultValue
    /**
     * A description of the property.
     */
    public val description: kotlin.String = requireNotNull(builder.description) { "A non-null value must be provided for description" }
    /**
     * The name of the property.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * Describes the type of property.
     */
    public val propertyTypes: List = builder.propertyTypes
    /**
     * Indicates whether the property is required.
     */
    public val required: kotlin.Boolean = requireNotNull(builder.required) { "A non-null value must be provided for required" }

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

    override fun toString(): kotlin.String = buildString {
        append("Property(")
        append("allowedValues=$allowedValues,")
        append("dataOperationScopes=$dataOperationScopes,")
        append("defaultValue=$defaultValue,")
        append("description=$description,")
        append("name=$name,")
        append("propertyTypes=$propertyTypes,")
        append("required=$required")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = allowedValues?.hashCode() ?: 0
        result = 31 * result + (dataOperationScopes?.hashCode() ?: 0)
        result = 31 * result + (defaultValue?.hashCode() ?: 0)
        result = 31 * result + (description.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (propertyTypes.hashCode())
        result = 31 * result + (required.hashCode())
        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 Property

        if (allowedValues != other.allowedValues) return false
        if (dataOperationScopes != other.dataOperationScopes) return false
        if (defaultValue != other.defaultValue) return false
        if (description != other.description) return false
        if (name != other.name) return false
        if (propertyTypes != other.propertyTypes) return false
        if (required != other.required) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A list of `AllowedValue` objects representing the values allowed for the property.
         */
        public var allowedValues: List? = null
        /**
         * Indicates which data operations are applicable to the property.
         */
        public var dataOperationScopes: List? = null
        /**
         * The default value for the property.
         */
        public var defaultValue: kotlin.String? = null
        /**
         * A description of the property.
         */
        public var description: kotlin.String? = null
        /**
         * The name of the property.
         */
        public var name: kotlin.String? = null
        /**
         * Describes the type of property.
         */
        public var propertyTypes: List = listOf()
        /**
         * Indicates whether the property is required.
         */
        public var required: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.Property) : this() {
            this.allowedValues = x.allowedValues
            this.dataOperationScopes = x.dataOperationScopes
            this.defaultValue = x.defaultValue
            this.description = x.description
            this.name = x.name
            this.propertyTypes = x.propertyTypes
            this.required = x.required
        }

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

        internal fun correctErrors(): Builder {
            if (description == null) description = ""
            if (name == null) name = ""
            if (required == null) required = false
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy