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

commonMain.aws.sdk.kotlin.services.servicediscovery.model.ServiceChange.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

/**
 * A complex type that contains changes to an existing service.
 */
public class ServiceChange private constructor(builder: Builder) {
    /**
     * A description for the service.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Information about the Route 53 DNS records that you want Cloud Map to create when you register an instance.
     */
    public val dnsConfig: aws.sdk.kotlin.services.servicediscovery.model.DnsConfigChange? = builder.dnsConfig
    /**
     * *Public DNS and HTTP namespaces only.* Settings for an optional health check. If you specify settings for a health check, Cloud Map associates the health check with the records that you specify in `DnsConfig`.
     */
    public val healthCheckConfig: aws.sdk.kotlin.services.servicediscovery.model.HealthCheckConfig? = builder.healthCheckConfig

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

    override fun toString(): kotlin.String = buildString {
        append("ServiceChange(")
        append("description=$description,")
        append("dnsConfig=$dnsConfig,")
        append("healthCheckConfig=$healthCheckConfig")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (dnsConfig?.hashCode() ?: 0)
        result = 31 * result + (healthCheckConfig?.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 ServiceChange

        if (description != other.description) return false
        if (dnsConfig != other.dnsConfig) return false
        if (healthCheckConfig != other.healthCheckConfig) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A description for the service.
         */
        public var description: kotlin.String? = null
        /**
         * Information about the Route 53 DNS records that you want Cloud Map to create when you register an instance.
         */
        public var dnsConfig: aws.sdk.kotlin.services.servicediscovery.model.DnsConfigChange? = null
        /**
         * *Public DNS and HTTP namespaces only.* Settings for an optional health check. If you specify settings for a health check, Cloud Map associates the health check with the records that you specify in `DnsConfig`.
         */
        public var healthCheckConfig: aws.sdk.kotlin.services.servicediscovery.model.HealthCheckConfig? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.servicediscovery.model.ServiceChange) : this() {
            this.description = x.description
            this.dnsConfig = x.dnsConfig
            this.healthCheckConfig = x.healthCheckConfig
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy