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

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

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

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



/**
 * Information about the CreateRoute action in Amazon EC2.
 */
public class Ec2CreateRouteAction private constructor(builder: Builder) {
    /**
     * A description of CreateRoute action in Amazon EC2.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Information about the IPv4 CIDR address block used for the destination match.
     */
    public val destinationCidrBlock: kotlin.String? = builder.destinationCidrBlock
    /**
     * Information about the IPv6 CIDR block destination.
     */
    public val destinationIpv6CidrBlock: kotlin.String? = builder.destinationIpv6CidrBlock
    /**
     * Information about the ID of a prefix list used for the destination match.
     */
    public val destinationPrefixListId: kotlin.String? = builder.destinationPrefixListId
    /**
     * Information about the ID of an internet gateway or virtual private gateway attached to your VPC.
     */
    public val gatewayId: aws.sdk.kotlin.services.fms.model.ActionTarget? = builder.gatewayId
    /**
     * Information about the ID of the route table for the route.
     */
    public val routeTableId: aws.sdk.kotlin.services.fms.model.ActionTarget? = builder.routeTableId
    /**
     * Information about the ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
     */
    public val vpcEndpointId: aws.sdk.kotlin.services.fms.model.ActionTarget? = builder.vpcEndpointId

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

    override fun toString(): kotlin.String = buildString {
        append("Ec2CreateRouteAction(")
        append("description=$description,")
        append("destinationCidrBlock=$destinationCidrBlock,")
        append("destinationIpv6CidrBlock=$destinationIpv6CidrBlock,")
        append("destinationPrefixListId=$destinationPrefixListId,")
        append("gatewayId=$gatewayId,")
        append("routeTableId=$routeTableId,")
        append("vpcEndpointId=$vpcEndpointId")
        append(")")
    }

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

        if (description != other.description) return false
        if (destinationCidrBlock != other.destinationCidrBlock) return false
        if (destinationIpv6CidrBlock != other.destinationIpv6CidrBlock) return false
        if (destinationPrefixListId != other.destinationPrefixListId) return false
        if (gatewayId != other.gatewayId) return false
        if (routeTableId != other.routeTableId) return false
        if (vpcEndpointId != other.vpcEndpointId) return false

        return true
    }

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

    public class Builder {
        /**
         * A description of CreateRoute action in Amazon EC2.
         */
        public var description: kotlin.String? = null
        /**
         * Information about the IPv4 CIDR address block used for the destination match.
         */
        public var destinationCidrBlock: kotlin.String? = null
        /**
         * Information about the IPv6 CIDR block destination.
         */
        public var destinationIpv6CidrBlock: kotlin.String? = null
        /**
         * Information about the ID of a prefix list used for the destination match.
         */
        public var destinationPrefixListId: kotlin.String? = null
        /**
         * Information about the ID of an internet gateway or virtual private gateway attached to your VPC.
         */
        public var gatewayId: aws.sdk.kotlin.services.fms.model.ActionTarget? = null
        /**
         * Information about the ID of the route table for the route.
         */
        public var routeTableId: aws.sdk.kotlin.services.fms.model.ActionTarget? = null
        /**
         * Information about the ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
         */
        public var vpcEndpointId: aws.sdk.kotlin.services.fms.model.ActionTarget? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.fms.model.Ec2CreateRouteAction) : this() {
            this.description = x.description
            this.destinationCidrBlock = x.destinationCidrBlock
            this.destinationIpv6CidrBlock = x.destinationIpv6CidrBlock
            this.destinationPrefixListId = x.destinationPrefixListId
            this.gatewayId = x.gatewayId
            this.routeTableId = x.routeTableId
            this.vpcEndpointId = x.vpcEndpointId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.fms.model.Ec2CreateRouteAction = Ec2CreateRouteAction(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 vpcEndpointId(block: aws.sdk.kotlin.services.fms.model.ActionTarget.Builder.() -> kotlin.Unit) {
            this.vpcEndpointId = aws.sdk.kotlin.services.fms.model.ActionTarget.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy