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

commonMain.aws.sdk.kotlin.services.servicediscovery.model.UpdateInstanceCustomHealthStatusRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.servicediscovery.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateInstanceCustomHealthStatusRequest private constructor(builder: Builder) {
    /**
     * The ID of the instance that you want to change the health status for.
     */
    public val instanceId: kotlin.String? = builder.instanceId
    /**
     * The ID of the service that includes the configuration for the custom health check that you want to change the status for.
     */
    public val serviceId: kotlin.String? = builder.serviceId
    /**
     * The new status of the instance, `HEALTHY` or `UNHEALTHY`.
     */
    public val status: aws.sdk.kotlin.services.servicediscovery.model.CustomHealthStatus? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateInstanceCustomHealthStatusRequest(")
        append("instanceId=$instanceId,")
        append("serviceId=$serviceId,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = instanceId?.hashCode() ?: 0
        result = 31 * result + (serviceId?.hashCode() ?: 0)
        result = 31 * result + (status?.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 UpdateInstanceCustomHealthStatusRequest

        if (instanceId != other.instanceId) return false
        if (serviceId != other.serviceId) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the instance that you want to change the health status for.
         */
        public var instanceId: kotlin.String? = null
        /**
         * The ID of the service that includes the configuration for the custom health check that you want to change the status for.
         */
        public var serviceId: kotlin.String? = null
        /**
         * The new status of the instance, `HEALTHY` or `UNHEALTHY`.
         */
        public var status: aws.sdk.kotlin.services.servicediscovery.model.CustomHealthStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.servicediscovery.model.UpdateInstanceCustomHealthStatusRequest) : this() {
            this.instanceId = x.instanceId
            this.serviceId = x.serviceId
            this.status = x.status
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy