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

commonMain.aws.sdk.kotlin.services.datazone.model.CustomParameter.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.datazone.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The details of user parameters of an environment blueprint.
 */
public class CustomParameter private constructor(builder: Builder) {
    /**
     * The default value of the parameter.
     */
    public val defaultValue: kotlin.String? = builder.defaultValue
    /**
     * The description of the parameter.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The filed type of the parameter.
     */
    public val fieldType: kotlin.String = requireNotNull(builder.fieldType) { "A non-null value must be provided for fieldType" }
    /**
     * Specifies whether the parameter is editable.
     */
    public val isEditable: kotlin.Boolean? = builder.isEditable
    /**
     * Specifies whether the custom parameter is optional.
     */
    public val isOptional: kotlin.Boolean? = builder.isOptional
    /**
     * The key name of the parameter.
     */
    public val keyName: kotlin.String = requireNotNull(builder.keyName) { "A non-null value must be provided for keyName" }

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

    override fun toString(): kotlin.String = buildString {
        append("CustomParameter(")
        append("defaultValue=$defaultValue,")
        append("description=*** Sensitive Data Redacted ***,")
        append("fieldType=$fieldType,")
        append("isEditable=$isEditable,")
        append("isOptional=$isOptional,")
        append("keyName=$keyName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = defaultValue?.hashCode() ?: 0
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (fieldType.hashCode())
        result = 31 * result + (isEditable?.hashCode() ?: 0)
        result = 31 * result + (isOptional?.hashCode() ?: 0)
        result = 31 * result + (keyName.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 CustomParameter

        if (defaultValue != other.defaultValue) return false
        if (description != other.description) return false
        if (fieldType != other.fieldType) return false
        if (isEditable != other.isEditable) return false
        if (isOptional != other.isOptional) return false
        if (keyName != other.keyName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The default value of the parameter.
         */
        public var defaultValue: kotlin.String? = null
        /**
         * The description of the parameter.
         */
        public var description: kotlin.String? = null
        /**
         * The filed type of the parameter.
         */
        public var fieldType: kotlin.String? = null
        /**
         * Specifies whether the parameter is editable.
         */
        public var isEditable: kotlin.Boolean? = null
        /**
         * Specifies whether the custom parameter is optional.
         */
        public var isOptional: kotlin.Boolean? = null
        /**
         * The key name of the parameter.
         */
        public var keyName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datazone.model.CustomParameter) : this() {
            this.defaultValue = x.defaultValue
            this.description = x.description
            this.fieldType = x.fieldType
            this.isEditable = x.isEditable
            this.isOptional = x.isOptional
            this.keyName = x.keyName
        }

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

        internal fun correctErrors(): Builder {
            if (fieldType == null) fieldType = ""
            if (keyName == null) keyName = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy