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

commonMain.aws.sdk.kotlin.services.configservice.model.RemediationParameterValue.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.configservice.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The value is either a dynamic (resource) value or a static value. You must select either a dynamic value or a static value.
 */
public class RemediationParameterValue private constructor(builder: Builder) {
    /**
     * The value is dynamic and changes at run-time.
     */
    public val resourceValue: aws.sdk.kotlin.services.configservice.model.ResourceValue? = builder.resourceValue
    /**
     * The value is static and does not change at run-time.
     */
    public val staticValue: aws.sdk.kotlin.services.configservice.model.StaticValue? = builder.staticValue

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

    override fun toString(): kotlin.String = buildString {
        append("RemediationParameterValue(")
        append("resourceValue=$resourceValue,")
        append("staticValue=$staticValue")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = resourceValue?.hashCode() ?: 0
        result = 31 * result + (staticValue?.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 RemediationParameterValue

        if (resourceValue != other.resourceValue) return false
        if (staticValue != other.staticValue) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The value is dynamic and changes at run-time.
         */
        public var resourceValue: aws.sdk.kotlin.services.configservice.model.ResourceValue? = null
        /**
         * The value is static and does not change at run-time.
         */
        public var staticValue: aws.sdk.kotlin.services.configservice.model.StaticValue? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.RemediationParameterValue) : this() {
            this.resourceValue = x.resourceValue
            this.staticValue = x.staticValue
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.configservice.model.ResourceValue] inside the given [block]
         */
        public fun resourceValue(block: aws.sdk.kotlin.services.configservice.model.ResourceValue.Builder.() -> kotlin.Unit) {
            this.resourceValue = aws.sdk.kotlin.services.configservice.model.ResourceValue.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.configservice.model.StaticValue] inside the given [block]
         */
        public fun staticValue(block: aws.sdk.kotlin.services.configservice.model.StaticValue.Builder.() -> kotlin.Unit) {
            this.staticValue = aws.sdk.kotlin.services.configservice.model.StaticValue.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy