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

commonMain.aws.sdk.kotlin.services.route53.model.UpdateTrafficPolicyInstanceRequest.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 complex type that contains information about the resource record sets that you want to update based on a specified traffic policy instance.
 */
public class UpdateTrafficPolicyInstanceRequest private constructor(builder: Builder) {
    /**
     * The ID of the traffic policy instance that you want to update.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The ID of the traffic policy that you want Amazon Route 53 to use to update resource record sets for the specified traffic policy instance.
     */
    public val trafficPolicyId: kotlin.String? = builder.trafficPolicyId
    /**
     * The version of the traffic policy that you want Amazon Route 53 to use to update resource record sets for the specified traffic policy instance.
     */
    public val trafficPolicyVersion: kotlin.Int? = builder.trafficPolicyVersion
    /**
     * The TTL that you want Amazon Route 53 to assign to all of the updated resource record sets.
     */
    public val ttl: kotlin.Long? = builder.ttl

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateTrafficPolicyInstanceRequest(")
        append("id=$id,")
        append("trafficPolicyId=$trafficPolicyId,")
        append("trafficPolicyVersion=$trafficPolicyVersion,")
        append("ttl=$ttl")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = id?.hashCode() ?: 0
        result = 31 * result + (trafficPolicyId?.hashCode() ?: 0)
        result = 31 * result + (trafficPolicyVersion ?: 0)
        result = 31 * result + (ttl?.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 UpdateTrafficPolicyInstanceRequest

        if (id != other.id) return false
        if (trafficPolicyId != other.trafficPolicyId) return false
        if (trafficPolicyVersion != other.trafficPolicyVersion) return false
        if (ttl != other.ttl) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the traffic policy instance that you want to update.
         */
        public var id: kotlin.String? = null
        /**
         * The ID of the traffic policy that you want Amazon Route 53 to use to update resource record sets for the specified traffic policy instance.
         */
        public var trafficPolicyId: kotlin.String? = null
        /**
         * The version of the traffic policy that you want Amazon Route 53 to use to update resource record sets for the specified traffic policy instance.
         */
        public var trafficPolicyVersion: kotlin.Int? = null
        /**
         * The TTL that you want Amazon Route 53 to assign to all of the updated resource record sets.
         */
        public var ttl: kotlin.Long? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53.model.UpdateTrafficPolicyInstanceRequest) : this() {
            this.id = x.id
            this.trafficPolicyId = x.trafficPolicyId
            this.trafficPolicyVersion = x.trafficPolicyVersion
            this.ttl = x.ttl
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy