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

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

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

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



/**
 * The action of associating an EC2 resource, such as a subnet or internet gateway, with a route table.
 */
public class Ec2AssociateRouteTableAction private constructor(builder: Builder) {
    /**
     * A description of the EC2 route table that is associated with the remediation action.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The ID of the gateway to be used with the EC2 route table that is associated with the remediation action.
     */
    public val gatewayId: aws.sdk.kotlin.services.fms.model.ActionTarget? = builder.gatewayId
    /**
     * The ID of the EC2 route table that is associated with the remediation action.
     */
    public val routeTableId: aws.sdk.kotlin.services.fms.model.ActionTarget? = builder.routeTableId
    /**
     * The ID of the subnet for the EC2 route table that is associated with the remediation action.
     */
    public val subnetId: aws.sdk.kotlin.services.fms.model.ActionTarget? = builder.subnetId

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

    override fun toString(): kotlin.String = buildString {
        append("Ec2AssociateRouteTableAction(")
        append("description=$description,")
        append("gatewayId=$gatewayId,")
        append("routeTableId=$routeTableId,")
        append("subnetId=$subnetId")
        append(")")
    }

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

        if (description != other.description) return false
        if (gatewayId != other.gatewayId) return false
        if (routeTableId != other.routeTableId) return false
        if (subnetId != other.subnetId) return false

        return true
    }

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

    public class Builder {
        /**
         * A description of the EC2 route table that is associated with the remediation action.
         */
        public var description: kotlin.String? = null
        /**
         * The ID of the gateway to be used with the EC2 route table that is associated with the remediation action.
         */
        public var gatewayId: aws.sdk.kotlin.services.fms.model.ActionTarget? = null
        /**
         * The ID of the EC2 route table that is associated with the remediation action.
         */
        public var routeTableId: aws.sdk.kotlin.services.fms.model.ActionTarget? = null
        /**
         * The ID of the subnet for the EC2 route table that is associated with the remediation action.
         */
        public var subnetId: aws.sdk.kotlin.services.fms.model.ActionTarget? = null

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

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

        /**
         * construct an [aws.sdk.kotlin.services.fms.model.ActionTarget] inside the given [block]
         */
        public fun gatewayId(block: aws.sdk.kotlin.services.fms.model.ActionTarget.Builder.() -> kotlin.Unit) {
            this.gatewayId = 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)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy