commonMain.aws.sdk.kotlin.services.route53.model.CreateHealthCheckResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53-jvm Show documentation
Show all versions of route53-jvm Show documentation
The AWS SDK for Kotlin client for Route 53
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A complex type containing the response information for the new health check.
*/
public class CreateHealthCheckResponse private constructor(builder: Builder) {
/**
* A complex type that contains identifying information about the health check.
*/
public val healthCheck: aws.sdk.kotlin.services.route53.model.HealthCheck? = builder.healthCheck
/**
* The unique URL representing the new health check.
*/
public val location: kotlin.String = requireNotNull(builder.location) { "A non-null value must be provided for location" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53.model.CreateHealthCheckResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateHealthCheckResponse(")
append("healthCheck=$healthCheck,")
append("location=$location")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = healthCheck?.hashCode() ?: 0
result = 31 * result + (location.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 CreateHealthCheckResponse
if (healthCheck != other.healthCheck) return false
if (location != other.location) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53.model.CreateHealthCheckResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A complex type that contains identifying information about the health check.
*/
public var healthCheck: aws.sdk.kotlin.services.route53.model.HealthCheck? = null
/**
* The unique URL representing the new health check.
*/
public var location: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53.model.CreateHealthCheckResponse) : this() {
this.healthCheck = x.healthCheck
this.location = x.location
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.CreateHealthCheckResponse = CreateHealthCheckResponse(this)
/**
* construct an [aws.sdk.kotlin.services.route53.model.HealthCheck] inside the given [block]
*/
public fun healthCheck(block: aws.sdk.kotlin.services.route53.model.HealthCheck.Builder.() -> kotlin.Unit) {
this.healthCheck = aws.sdk.kotlin.services.route53.model.HealthCheck.invoke(block)
}
internal fun correctErrors(): Builder {
if (location == null) location = ""
return this
}
}
}