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

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

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

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



/**
 * The dynamic value of the resource.
 */
public class ResourceValue private constructor(builder: Builder) {
    /**
     * The value is a resource ID.
     */
    public val value: aws.sdk.kotlin.services.configservice.model.ResourceValueType = requireNotNull(builder.value) { "A non-null value must be provided for value" }

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

    override fun toString(): kotlin.String = buildString {
        append("ResourceValue(")
        append("value=$value")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = value.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 ResourceValue

        if (value != other.value) return false

        return true
    }

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

    public class Builder {
        /**
         * The value is a resource ID.
         */
        public var value: aws.sdk.kotlin.services.configservice.model.ResourceValueType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.ResourceValue) : this() {
            this.value = x.value
        }

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

        internal fun correctErrors(): Builder {
            if (value == null) value = ResourceValueType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy