commonMain.aws.sdk.kotlin.services.route53.model.GeoLocationDetails.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 contains the codes and full continent, country, and subdivision names for the specified `geolocation` code.
*/
public class GeoLocationDetails private constructor(builder: Builder) {
/**
* The two-letter code for the continent.
*/
public val continentCode: kotlin.String? = builder.continentCode
/**
* The full name of the continent.
*/
public val continentName: kotlin.String? = builder.continentName
/**
* The two-letter code for the country.
*/
public val countryCode: kotlin.String? = builder.countryCode
/**
* The name of the country.
*/
public val countryName: kotlin.String? = builder.countryName
/**
* The code for the subdivision, such as a particular state within the United States. For a list of US state abbreviations, see [Appendix B: Two–Letter State and Possession Abbreviations](https://pe.usps.com/text/pub28/28apb.htm) on the United States Postal Service website. For a list of all supported subdivision codes, use the [ListGeoLocations](https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListGeoLocations.html) API.
*/
public val subdivisionCode: kotlin.String? = builder.subdivisionCode
/**
* The full name of the subdivision. Route 53 currently supports only states in the United States.
*/
public val subdivisionName: kotlin.String? = builder.subdivisionName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53.model.GeoLocationDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GeoLocationDetails(")
append("continentCode=$continentCode,")
append("continentName=$continentName,")
append("countryCode=$countryCode,")
append("countryName=$countryName,")
append("subdivisionCode=$subdivisionCode,")
append("subdivisionName=$subdivisionName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = continentCode?.hashCode() ?: 0
result = 31 * result + (continentName?.hashCode() ?: 0)
result = 31 * result + (countryCode?.hashCode() ?: 0)
result = 31 * result + (countryName?.hashCode() ?: 0)
result = 31 * result + (subdivisionCode?.hashCode() ?: 0)
result = 31 * result + (subdivisionName?.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 GeoLocationDetails
if (continentCode != other.continentCode) return false
if (continentName != other.continentName) return false
if (countryCode != other.countryCode) return false
if (countryName != other.countryName) return false
if (subdivisionCode != other.subdivisionCode) return false
if (subdivisionName != other.subdivisionName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53.model.GeoLocationDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The two-letter code for the continent.
*/
public var continentCode: kotlin.String? = null
/**
* The full name of the continent.
*/
public var continentName: kotlin.String? = null
/**
* The two-letter code for the country.
*/
public var countryCode: kotlin.String? = null
/**
* The name of the country.
*/
public var countryName: kotlin.String? = null
/**
* The code for the subdivision, such as a particular state within the United States. For a list of US state abbreviations, see [Appendix B: Two–Letter State and Possession Abbreviations](https://pe.usps.com/text/pub28/28apb.htm) on the United States Postal Service website. For a list of all supported subdivision codes, use the [ListGeoLocations](https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListGeoLocations.html) API.
*/
public var subdivisionCode: kotlin.String? = null
/**
* The full name of the subdivision. Route 53 currently supports only states in the United States.
*/
public var subdivisionName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53.model.GeoLocationDetails) : this() {
this.continentCode = x.continentCode
this.continentName = x.continentName
this.countryCode = x.countryCode
this.countryName = x.countryName
this.subdivisionCode = x.subdivisionCode
this.subdivisionName = x.subdivisionName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.GeoLocationDetails = GeoLocationDetails(this)
internal fun correctErrors(): Builder {
return this
}
}
}