commonMain.aws.sdk.kotlin.services.route53.model.Coordinates.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
The newest version!
// 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 that lists the coordinates for a geoproximity resource record.
*/
public class Coordinates private constructor(builder: Builder) {
/**
* Specifies a coordinate of the north–south position of a geographic point on the surface of the Earth (-90 - 90).
*/
public val latitude: kotlin.String = requireNotNull(builder.latitude) { "A non-null value must be provided for latitude" }
/**
* Specifies a coordinate of the east–west position of a geographic point on the surface of the Earth (-180 - 180).
*/
public val longitude: kotlin.String = requireNotNull(builder.longitude) { "A non-null value must be provided for longitude" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53.model.Coordinates = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Coordinates(")
append("latitude=$latitude,")
append("longitude=$longitude")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = latitude.hashCode()
result = 31 * result + (longitude.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 Coordinates
if (latitude != other.latitude) return false
if (longitude != other.longitude) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53.model.Coordinates = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies a coordinate of the north–south position of a geographic point on the surface of the Earth (-90 - 90).
*/
public var latitude: kotlin.String? = null
/**
* Specifies a coordinate of the east–west position of a geographic point on the surface of the Earth (-180 - 180).
*/
public var longitude: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53.model.Coordinates) : this() {
this.latitude = x.latitude
this.longitude = x.longitude
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.Coordinates = Coordinates(this)
internal fun correctErrors(): Builder {
if (latitude == null) latitude = ""
if (longitude == null) longitude = ""
return this
}
}
}