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

commonMain.aws.sdk.kotlin.services.route53.model.GetGeoLocationRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show 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 request for information about whether a specified geographic location is supported for Amazon Route 53 geolocation resource record sets.
 */
public class GetGeoLocationRequest private constructor(builder: Builder) {
    /**
     * For geolocation resource record sets, a two-letter abbreviation that identifies a continent. Amazon Route 53 supports the following continent codes:
     * + **AF**: Africa
     * + **AN**: Antarctica
     * + **AS**: Asia
     * + **EU**: Europe
     * + **OC**: Oceania
     * + **NA**: North America
     * + **SA**: South America
     */
    public val continentCode: kotlin.String? = builder.continentCode
    /**
     * Amazon Route 53 uses the two-letter country codes that are specified in [ISO standard 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
     *
     * Route 53 also supports the country code **UA** for Ukraine.
     */
    public val countryCode: kotlin.String? = builder.countryCode
    /**
     * 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

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

    override fun toString(): kotlin.String = buildString {
        append("GetGeoLocationRequest(")
        append("continentCode=$continentCode,")
        append("countryCode=$countryCode,")
        append("subdivisionCode=$subdivisionCode")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = continentCode?.hashCode() ?: 0
        result = 31 * result + (countryCode?.hashCode() ?: 0)
        result = 31 * result + (subdivisionCode?.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 GetGeoLocationRequest

        if (continentCode != other.continentCode) return false
        if (countryCode != other.countryCode) return false
        if (subdivisionCode != other.subdivisionCode) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * For geolocation resource record sets, a two-letter abbreviation that identifies a continent. Amazon Route 53 supports the following continent codes:
         * + **AF**: Africa
         * + **AN**: Antarctica
         * + **AS**: Asia
         * + **EU**: Europe
         * + **OC**: Oceania
         * + **NA**: North America
         * + **SA**: South America
         */
        public var continentCode: kotlin.String? = null
        /**
         * Amazon Route 53 uses the two-letter country codes that are specified in [ISO standard 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
         *
         * Route 53 also supports the country code **UA** for Ukraine.
         */
        public var countryCode: 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

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53.model.GetGeoLocationRequest) : this() {
            this.continentCode = x.continentCode
            this.countryCode = x.countryCode
            this.subdivisionCode = x.subdivisionCode
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy