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

commonMain.aws.sdk.kotlin.services.elasticbeanstalk.model.ValidationMessage.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.elasticbeanstalk.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * An error or warning for a desired configuration option value.
 */
public class ValidationMessage private constructor(builder: Builder) {
    /**
     * A message describing the error or warning.
     */
    public val message: kotlin.String? = builder.message
    /**
     * The namespace to which the option belongs.
     */
    public val namespace: kotlin.String? = builder.namespace
    /**
     * The name of the option.
     */
    public val optionName: kotlin.String? = builder.optionName
    /**
     * An indication of the severity of this message:
     * + `error`: This message indicates that this is not a valid setting for an option.
     * + `warning`: This message is providing information you should take into account.
     */
    public val severity: aws.sdk.kotlin.services.elasticbeanstalk.model.ValidationSeverity? = builder.severity

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

    override fun toString(): kotlin.String = buildString {
        append("ValidationMessage(")
        append("message=$message,")
        append("namespace=$namespace,")
        append("optionName=$optionName,")
        append("severity=$severity")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = message?.hashCode() ?: 0
        result = 31 * result + (namespace?.hashCode() ?: 0)
        result = 31 * result + (optionName?.hashCode() ?: 0)
        result = 31 * result + (severity?.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 ValidationMessage

        if (message != other.message) return false
        if (namespace != other.namespace) return false
        if (optionName != other.optionName) return false
        if (severity != other.severity) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A message describing the error or warning.
         */
        public var message: kotlin.String? = null
        /**
         * The namespace to which the option belongs.
         */
        public var namespace: kotlin.String? = null
        /**
         * The name of the option.
         */
        public var optionName: kotlin.String? = null
        /**
         * An indication of the severity of this message:
         * + `error`: This message indicates that this is not a valid setting for an option.
         * + `warning`: This message is providing information you should take into account.
         */
        public var severity: aws.sdk.kotlin.services.elasticbeanstalk.model.ValidationSeverity? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elasticbeanstalk.model.ValidationMessage) : this() {
            this.message = x.message
            this.namespace = x.namespace
            this.optionName = x.optionName
            this.severity = x.severity
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy