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

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

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

/**
 * (Resource record sets only): A complex type that lets you specify where your resources are located. Only one of `LocalZoneGroup`, `Coordinates`, or `Amazon Web ServicesRegion` is allowed per request at a time.
 *
 * For more information about geoproximity routing, see [Geoproximity routing](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-geoproximity.html) in the *Amazon Route 53 Developer Guide*.
 */
public class GeoProximityLocation private constructor(builder: Builder) {
    /**
     * The Amazon Web Services Region the resource you are directing DNS traffic to, is in.
     */
    public val awsRegion: kotlin.String? = builder.awsRegion
    /**
     * The bias increases or decreases the size of the geographic region from which Route 53 routes traffic to a resource.
     *
     * To use `Bias` to change the size of the geographic region, specify the applicable value for the bias:
     * + To expand the size of the geographic region from which Route 53 routes traffic to a resource, specify a positive integer from 1 to 99 for the bias. Route 53 shrinks the size of adjacent regions.
     * + To shrink the size of the geographic region from which Route 53 routes traffic to a resource, specify a negative bias of -1 to -99. Route 53 expands the size of adjacent regions.
     */
    public val bias: kotlin.Int? = builder.bias
    /**
     * Contains the longitude and latitude for a geographic region.
     */
    public val coordinates: aws.sdk.kotlin.services.route53.model.Coordinates? = builder.coordinates
    /**
     * Specifies an Amazon Web Services Local Zone Group.
     *
     * A local Zone Group is usually the Local Zone code without the ending character. For example, if the Local Zone is `us-east-1-bue-1a` the Local Zone Group is `us-east-1-bue-1`.
     *
     * You can identify the Local Zones Group for a specific Local Zone by using the [describe-availability-zones](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-availability-zones.html) CLI command:
     *
     * This command returns: `"GroupName": "us-west-2-den-1"`, specifying that the Local Zone `us-west-2-den-1a` belongs to the Local Zone Group `us-west-2-den-1`.
     */
    public val localZoneGroup: kotlin.String? = builder.localZoneGroup

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

    override fun toString(): kotlin.String = buildString {
        append("GeoProximityLocation(")
        append("awsRegion=$awsRegion,")
        append("bias=$bias,")
        append("coordinates=$coordinates,")
        append("localZoneGroup=$localZoneGroup")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = awsRegion?.hashCode() ?: 0
        result = 31 * result + (bias ?: 0)
        result = 31 * result + (coordinates?.hashCode() ?: 0)
        result = 31 * result + (localZoneGroup?.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 GeoProximityLocation

        if (awsRegion != other.awsRegion) return false
        if (bias != other.bias) return false
        if (coordinates != other.coordinates) return false
        if (localZoneGroup != other.localZoneGroup) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Web Services Region the resource you are directing DNS traffic to, is in.
         */
        public var awsRegion: kotlin.String? = null
        /**
         * The bias increases or decreases the size of the geographic region from which Route 53 routes traffic to a resource.
         *
         * To use `Bias` to change the size of the geographic region, specify the applicable value for the bias:
         * + To expand the size of the geographic region from which Route 53 routes traffic to a resource, specify a positive integer from 1 to 99 for the bias. Route 53 shrinks the size of adjacent regions.
         * + To shrink the size of the geographic region from which Route 53 routes traffic to a resource, specify a negative bias of -1 to -99. Route 53 expands the size of adjacent regions.
         */
        public var bias: kotlin.Int? = null
        /**
         * Contains the longitude and latitude for a geographic region.
         */
        public var coordinates: aws.sdk.kotlin.services.route53.model.Coordinates? = null
        /**
         * Specifies an Amazon Web Services Local Zone Group.
         *
         * A local Zone Group is usually the Local Zone code without the ending character. For example, if the Local Zone is `us-east-1-bue-1a` the Local Zone Group is `us-east-1-bue-1`.
         *
         * You can identify the Local Zones Group for a specific Local Zone by using the [describe-availability-zones](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-availability-zones.html) CLI command:
         *
         * This command returns: `"GroupName": "us-west-2-den-1"`, specifying that the Local Zone `us-west-2-den-1a` belongs to the Local Zone Group `us-west-2-den-1`.
         */
        public var localZoneGroup: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53.model.GeoProximityLocation) : this() {
            this.awsRegion = x.awsRegion
            this.bias = x.bias
            this.coordinates = x.coordinates
            this.localZoneGroup = x.localZoneGroup
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy