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

commonMain.aws.sdk.kotlin.services.fms.model.Ec2ReplaceRouteTableAssociationAction.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.fms.model



/**
 * Information about the ReplaceRouteTableAssociation action in Amazon EC2.
 */
public class Ec2ReplaceRouteTableAssociationAction private constructor(builder: Builder) {
    /**
     * Information about the association ID.
     */
    public val associationId: aws.sdk.kotlin.services.fms.model.ActionTarget? = builder.associationId
    /**
     * A description of the ReplaceRouteTableAssociation action in Amazon EC2.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Information about the ID of the new route table to associate with the subnet.
     */
    public val routeTableId: aws.sdk.kotlin.services.fms.model.ActionTarget? = builder.routeTableId

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

    override fun toString(): kotlin.String = buildString {
        append("Ec2ReplaceRouteTableAssociationAction(")
        append("associationId=$associationId,")
        append("description=$description,")
        append("routeTableId=$routeTableId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = associationId?.hashCode() ?: 0
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (routeTableId?.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 Ec2ReplaceRouteTableAssociationAction

        if (associationId != other.associationId) return false
        if (description != other.description) return false
        if (routeTableId != other.routeTableId) return false

        return true
    }

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

    public class Builder {
        /**
         * Information about the association ID.
         */
        public var associationId: aws.sdk.kotlin.services.fms.model.ActionTarget? = null
        /**
         * A description of the ReplaceRouteTableAssociation action in Amazon EC2.
         */
        public var description: kotlin.String? = null
        /**
         * Information about the ID of the new route table to associate with the subnet.
         */
        public var routeTableId: aws.sdk.kotlin.services.fms.model.ActionTarget? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.fms.model.Ec2ReplaceRouteTableAssociationAction) : this() {
            this.associationId = x.associationId
            this.description = x.description
            this.routeTableId = x.routeTableId
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy