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

software.amazon.awssdk.services.ec2.model.Route Maven / Gradle / Ivy

/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.ec2.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Describes a route in a route table. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Route implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField DESTINATION_CIDR_BLOCK_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("DestinationCidrBlock") .getter(getter(Route::destinationCidrBlock)) .setter(setter(Builder::destinationCidrBlock)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DestinationCidrBlock") .unmarshallLocationName("destinationCidrBlock").build()).build(); private static final SdkField DESTINATION_IPV6_CIDR_BLOCK_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("DestinationIpv6CidrBlock") .getter(getter(Route::destinationIpv6CidrBlock)) .setter(setter(Builder::destinationIpv6CidrBlock)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DestinationIpv6CidrBlock") .unmarshallLocationName("destinationIpv6CidrBlock").build()).build(); private static final SdkField DESTINATION_PREFIX_LIST_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("DestinationPrefixListId") .getter(getter(Route::destinationPrefixListId)) .setter(setter(Builder::destinationPrefixListId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DestinationPrefixListId") .unmarshallLocationName("destinationPrefixListId").build()).build(); private static final SdkField EGRESS_ONLY_INTERNET_GATEWAY_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("EgressOnlyInternetGatewayId") .getter(getter(Route::egressOnlyInternetGatewayId)) .setter(setter(Builder::egressOnlyInternetGatewayId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EgressOnlyInternetGatewayId") .unmarshallLocationName("egressOnlyInternetGatewayId").build()).build(); private static final SdkField GATEWAY_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("GatewayId") .getter(getter(Route::gatewayId)) .setter(setter(Builder::gatewayId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GatewayId") .unmarshallLocationName("gatewayId").build()).build(); private static final SdkField INSTANCE_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("InstanceId") .getter(getter(Route::instanceId)) .setter(setter(Builder::instanceId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceId") .unmarshallLocationName("instanceId").build()).build(); private static final SdkField INSTANCE_OWNER_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("InstanceOwnerId") .getter(getter(Route::instanceOwnerId)) .setter(setter(Builder::instanceOwnerId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceOwnerId") .unmarshallLocationName("instanceOwnerId").build()).build(); private static final SdkField NAT_GATEWAY_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("NatGatewayId") .getter(getter(Route::natGatewayId)) .setter(setter(Builder::natGatewayId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NatGatewayId") .unmarshallLocationName("natGatewayId").build()).build(); private static final SdkField TRANSIT_GATEWAY_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("TransitGatewayId") .getter(getter(Route::transitGatewayId)) .setter(setter(Builder::transitGatewayId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TransitGatewayId") .unmarshallLocationName("transitGatewayId").build()).build(); private static final SdkField LOCAL_GATEWAY_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("LocalGatewayId") .getter(getter(Route::localGatewayId)) .setter(setter(Builder::localGatewayId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LocalGatewayId") .unmarshallLocationName("localGatewayId").build()).build(); private static final SdkField CARRIER_GATEWAY_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("CarrierGatewayId") .getter(getter(Route::carrierGatewayId)) .setter(setter(Builder::carrierGatewayId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CarrierGatewayId") .unmarshallLocationName("carrierGatewayId").build()).build(); private static final SdkField NETWORK_INTERFACE_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("NetworkInterfaceId") .getter(getter(Route::networkInterfaceId)) .setter(setter(Builder::networkInterfaceId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NetworkInterfaceId") .unmarshallLocationName("networkInterfaceId").build()).build(); private static final SdkField ORIGIN_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("Origin") .getter(getter(Route::originAsString)) .setter(setter(Builder::origin)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Origin") .unmarshallLocationName("origin").build()).build(); private static final SdkField STATE_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("State") .getter(getter(Route::stateAsString)) .setter(setter(Builder::state)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("State") .unmarshallLocationName("state").build()).build(); private static final SdkField VPC_PEERING_CONNECTION_ID_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("VpcPeeringConnectionId") .getter(getter(Route::vpcPeeringConnectionId)) .setter(setter(Builder::vpcPeeringConnectionId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcPeeringConnectionId") .unmarshallLocationName("vpcPeeringConnectionId").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(DESTINATION_CIDR_BLOCK_FIELD, DESTINATION_IPV6_CIDR_BLOCK_FIELD, DESTINATION_PREFIX_LIST_ID_FIELD, EGRESS_ONLY_INTERNET_GATEWAY_ID_FIELD, GATEWAY_ID_FIELD, INSTANCE_ID_FIELD, INSTANCE_OWNER_ID_FIELD, NAT_GATEWAY_ID_FIELD, TRANSIT_GATEWAY_ID_FIELD, LOCAL_GATEWAY_ID_FIELD, CARRIER_GATEWAY_ID_FIELD, NETWORK_INTERFACE_ID_FIELD, ORIGIN_FIELD, STATE_FIELD, VPC_PEERING_CONNECTION_ID_FIELD)); private static final long serialVersionUID = 1L; private final String destinationCidrBlock; private final String destinationIpv6CidrBlock; private final String destinationPrefixListId; private final String egressOnlyInternetGatewayId; private final String gatewayId; private final String instanceId; private final String instanceOwnerId; private final String natGatewayId; private final String transitGatewayId; private final String localGatewayId; private final String carrierGatewayId; private final String networkInterfaceId; private final String origin; private final String state; private final String vpcPeeringConnectionId; private Route(BuilderImpl builder) { this.destinationCidrBlock = builder.destinationCidrBlock; this.destinationIpv6CidrBlock = builder.destinationIpv6CidrBlock; this.destinationPrefixListId = builder.destinationPrefixListId; this.egressOnlyInternetGatewayId = builder.egressOnlyInternetGatewayId; this.gatewayId = builder.gatewayId; this.instanceId = builder.instanceId; this.instanceOwnerId = builder.instanceOwnerId; this.natGatewayId = builder.natGatewayId; this.transitGatewayId = builder.transitGatewayId; this.localGatewayId = builder.localGatewayId; this.carrierGatewayId = builder.carrierGatewayId; this.networkInterfaceId = builder.networkInterfaceId; this.origin = builder.origin; this.state = builder.state; this.vpcPeeringConnectionId = builder.vpcPeeringConnectionId; } /** *

* The IPv4 CIDR block used for the destination match. *

* * @return The IPv4 CIDR block used for the destination match. */ public String destinationCidrBlock() { return destinationCidrBlock; } /** *

* The IPv6 CIDR block used for the destination match. *

* * @return The IPv6 CIDR block used for the destination match. */ public String destinationIpv6CidrBlock() { return destinationIpv6CidrBlock; } /** *

* The prefix of the AWS service. *

* * @return The prefix of the AWS service. */ public String destinationPrefixListId() { return destinationPrefixListId; } /** *

* The ID of the egress-only internet gateway. *

* * @return The ID of the egress-only internet gateway. */ public String egressOnlyInternetGatewayId() { return egressOnlyInternetGatewayId; } /** *

* The ID of a gateway attached to your VPC. *

* * @return The ID of a gateway attached to your VPC. */ public String gatewayId() { return gatewayId; } /** *

* The ID of a NAT instance in your VPC. *

* * @return The ID of a NAT instance in your VPC. */ public String instanceId() { return instanceId; } /** *

* The AWS account ID of the owner of the instance. *

* * @return The AWS account ID of the owner of the instance. */ public String instanceOwnerId() { return instanceOwnerId; } /** *

* The ID of a NAT gateway. *

* * @return The ID of a NAT gateway. */ public String natGatewayId() { return natGatewayId; } /** *

* The ID of a transit gateway. *

* * @return The ID of a transit gateway. */ public String transitGatewayId() { return transitGatewayId; } /** *

* The ID of the local gateway. *

* * @return The ID of the local gateway. */ public String localGatewayId() { return localGatewayId; } /** *

* The ID of the carrier gateway. *

* * @return The ID of the carrier gateway. */ public String carrierGatewayId() { return carrierGatewayId; } /** *

* The ID of the network interface. *

* * @return The ID of the network interface. */ public String networkInterfaceId() { return networkInterfaceId; } /** *

* Describes how the route was created. *

*
    *
  • *

    * CreateRouteTable - The route was automatically created when the route table was created. *

    *
  • *
  • *

    * CreateRoute - The route was manually added to the route table. *

    *
  • *
  • *

    * EnableVgwRoutePropagation - The route was propagated by route propagation. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, {@link #origin} will * return {@link RouteOrigin#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #originAsString}. *

* * @return Describes how the route was created.

*
    *
  • *

    * CreateRouteTable - The route was automatically created when the route table was created. *

    *
  • *
  • *

    * CreateRoute - The route was manually added to the route table. *

    *
  • *
  • *

    * EnableVgwRoutePropagation - The route was propagated by route propagation. *

    *
  • * @see RouteOrigin */ public RouteOrigin origin() { return RouteOrigin.fromValue(origin); } /** *

    * Describes how the route was created. *

    *
      *
    • *

      * CreateRouteTable - The route was automatically created when the route table was created. *

      *
    • *
    • *

      * CreateRoute - The route was manually added to the route table. *

      *
    • *
    • *

      * EnableVgwRoutePropagation - The route was propagated by route propagation. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #origin} will * return {@link RouteOrigin#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #originAsString}. *

    * * @return Describes how the route was created.

    *
      *
    • *

      * CreateRouteTable - The route was automatically created when the route table was created. *

      *
    • *
    • *

      * CreateRoute - The route was manually added to the route table. *

      *
    • *
    • *

      * EnableVgwRoutePropagation - The route was propagated by route propagation. *

      *
    • * @see RouteOrigin */ public String originAsString() { return origin; } /** *

      * The state of the route. The blackhole state indicates that the route's target isn't available (for * example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated). *

      *

      * If the service returns an enum value that is not available in the current SDK version, {@link #state} will return * {@link RouteState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #stateAsString}. *

      * * @return The state of the route. The blackhole state indicates that the route's target isn't * available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance * has been terminated). * @see RouteState */ public RouteState state() { return RouteState.fromValue(state); } /** *

      * The state of the route. The blackhole state indicates that the route's target isn't available (for * example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated). *

      *

      * If the service returns an enum value that is not available in the current SDK version, {@link #state} will return * {@link RouteState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #stateAsString}. *

      * * @return The state of the route. The blackhole state indicates that the route's target isn't * available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance * has been terminated). * @see RouteState */ public String stateAsString() { return state; } /** *

      * The ID of a VPC peering connection. *

      * * @return The ID of a VPC peering connection. */ public String vpcPeeringConnectionId() { return vpcPeeringConnectionId; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(destinationCidrBlock()); hashCode = 31 * hashCode + Objects.hashCode(destinationIpv6CidrBlock()); hashCode = 31 * hashCode + Objects.hashCode(destinationPrefixListId()); hashCode = 31 * hashCode + Objects.hashCode(egressOnlyInternetGatewayId()); hashCode = 31 * hashCode + Objects.hashCode(gatewayId()); hashCode = 31 * hashCode + Objects.hashCode(instanceId()); hashCode = 31 * hashCode + Objects.hashCode(instanceOwnerId()); hashCode = 31 * hashCode + Objects.hashCode(natGatewayId()); hashCode = 31 * hashCode + Objects.hashCode(transitGatewayId()); hashCode = 31 * hashCode + Objects.hashCode(localGatewayId()); hashCode = 31 * hashCode + Objects.hashCode(carrierGatewayId()); hashCode = 31 * hashCode + Objects.hashCode(networkInterfaceId()); hashCode = 31 * hashCode + Objects.hashCode(originAsString()); hashCode = 31 * hashCode + Objects.hashCode(stateAsString()); hashCode = 31 * hashCode + Objects.hashCode(vpcPeeringConnectionId()); return hashCode; } @Override public boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Route)) { return false; } Route other = (Route) obj; return Objects.equals(destinationCidrBlock(), other.destinationCidrBlock()) && Objects.equals(destinationIpv6CidrBlock(), other.destinationIpv6CidrBlock()) && Objects.equals(destinationPrefixListId(), other.destinationPrefixListId()) && Objects.equals(egressOnlyInternetGatewayId(), other.egressOnlyInternetGatewayId()) && Objects.equals(gatewayId(), other.gatewayId()) && Objects.equals(instanceId(), other.instanceId()) && Objects.equals(instanceOwnerId(), other.instanceOwnerId()) && Objects.equals(natGatewayId(), other.natGatewayId()) && Objects.equals(transitGatewayId(), other.transitGatewayId()) && Objects.equals(localGatewayId(), other.localGatewayId()) && Objects.equals(carrierGatewayId(), other.carrierGatewayId()) && Objects.equals(networkInterfaceId(), other.networkInterfaceId()) && Objects.equals(originAsString(), other.originAsString()) && Objects.equals(stateAsString(), other.stateAsString()) && Objects.equals(vpcPeeringConnectionId(), other.vpcPeeringConnectionId()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("Route").add("DestinationCidrBlock", destinationCidrBlock()) .add("DestinationIpv6CidrBlock", destinationIpv6CidrBlock()) .add("DestinationPrefixListId", destinationPrefixListId()) .add("EgressOnlyInternetGatewayId", egressOnlyInternetGatewayId()).add("GatewayId", gatewayId()) .add("InstanceId", instanceId()).add("InstanceOwnerId", instanceOwnerId()).add("NatGatewayId", natGatewayId()) .add("TransitGatewayId", transitGatewayId()).add("LocalGatewayId", localGatewayId()) .add("CarrierGatewayId", carrierGatewayId()).add("NetworkInterfaceId", networkInterfaceId()) .add("Origin", originAsString()).add("State", stateAsString()) .add("VpcPeeringConnectionId", vpcPeeringConnectionId()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "DestinationCidrBlock": return Optional.ofNullable(clazz.cast(destinationCidrBlock())); case "DestinationIpv6CidrBlock": return Optional.ofNullable(clazz.cast(destinationIpv6CidrBlock())); case "DestinationPrefixListId": return Optional.ofNullable(clazz.cast(destinationPrefixListId())); case "EgressOnlyInternetGatewayId": return Optional.ofNullable(clazz.cast(egressOnlyInternetGatewayId())); case "GatewayId": return Optional.ofNullable(clazz.cast(gatewayId())); case "InstanceId": return Optional.ofNullable(clazz.cast(instanceId())); case "InstanceOwnerId": return Optional.ofNullable(clazz.cast(instanceOwnerId())); case "NatGatewayId": return Optional.ofNullable(clazz.cast(natGatewayId())); case "TransitGatewayId": return Optional.ofNullable(clazz.cast(transitGatewayId())); case "LocalGatewayId": return Optional.ofNullable(clazz.cast(localGatewayId())); case "CarrierGatewayId": return Optional.ofNullable(clazz.cast(carrierGatewayId())); case "NetworkInterfaceId": return Optional.ofNullable(clazz.cast(networkInterfaceId())); case "Origin": return Optional.ofNullable(clazz.cast(originAsString())); case "State": return Optional.ofNullable(clazz.cast(stateAsString())); case "VpcPeeringConnectionId": return Optional.ofNullable(clazz.cast(vpcPeeringConnectionId())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Route) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

      * The IPv4 CIDR block used for the destination match. *

      * * @param destinationCidrBlock * The IPv4 CIDR block used for the destination match. * @return Returns a reference to this object so that method calls can be chained together. */ Builder destinationCidrBlock(String destinationCidrBlock); /** *

      * The IPv6 CIDR block used for the destination match. *

      * * @param destinationIpv6CidrBlock * The IPv6 CIDR block used for the destination match. * @return Returns a reference to this object so that method calls can be chained together. */ Builder destinationIpv6CidrBlock(String destinationIpv6CidrBlock); /** *

      * The prefix of the AWS service. *

      * * @param destinationPrefixListId * The prefix of the AWS service. * @return Returns a reference to this object so that method calls can be chained together. */ Builder destinationPrefixListId(String destinationPrefixListId); /** *

      * The ID of the egress-only internet gateway. *

      * * @param egressOnlyInternetGatewayId * The ID of the egress-only internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ Builder egressOnlyInternetGatewayId(String egressOnlyInternetGatewayId); /** *

      * The ID of a gateway attached to your VPC. *

      * * @param gatewayId * The ID of a gateway attached to your VPC. * @return Returns a reference to this object so that method calls can be chained together. */ Builder gatewayId(String gatewayId); /** *

      * The ID of a NAT instance in your VPC. *

      * * @param instanceId * The ID of a NAT instance in your VPC. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceId(String instanceId); /** *

      * The AWS account ID of the owner of the instance. *

      * * @param instanceOwnerId * The AWS account ID of the owner of the instance. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceOwnerId(String instanceOwnerId); /** *

      * The ID of a NAT gateway. *

      * * @param natGatewayId * The ID of a NAT gateway. * @return Returns a reference to this object so that method calls can be chained together. */ Builder natGatewayId(String natGatewayId); /** *

      * The ID of a transit gateway. *

      * * @param transitGatewayId * The ID of a transit gateway. * @return Returns a reference to this object so that method calls can be chained together. */ Builder transitGatewayId(String transitGatewayId); /** *

      * The ID of the local gateway. *

      * * @param localGatewayId * The ID of the local gateway. * @return Returns a reference to this object so that method calls can be chained together. */ Builder localGatewayId(String localGatewayId); /** *

      * The ID of the carrier gateway. *

      * * @param carrierGatewayId * The ID of the carrier gateway. * @return Returns a reference to this object so that method calls can be chained together. */ Builder carrierGatewayId(String carrierGatewayId); /** *

      * The ID of the network interface. *

      * * @param networkInterfaceId * The ID of the network interface. * @return Returns a reference to this object so that method calls can be chained together. */ Builder networkInterfaceId(String networkInterfaceId); /** *

      * Describes how the route was created. *

      *
        *
      • *

        * CreateRouteTable - The route was automatically created when the route table was created. *

        *
      • *
      • *

        * CreateRoute - The route was manually added to the route table. *

        *
      • *
      • *

        * EnableVgwRoutePropagation - The route was propagated by route propagation. *

        *
      • *
      * * @param origin * Describes how the route was created.

      *
        *
      • *

        * CreateRouteTable - The route was automatically created when the route table was created. *

        *
      • *
      • *

        * CreateRoute - The route was manually added to the route table. *

        *
      • *
      • *

        * EnableVgwRoutePropagation - The route was propagated by route propagation. *

        *
      • * @see RouteOrigin * @return Returns a reference to this object so that method calls can be chained together. * @see RouteOrigin */ Builder origin(String origin); /** *

        * Describes how the route was created. *

        *
          *
        • *

          * CreateRouteTable - The route was automatically created when the route table was created. *

          *
        • *
        • *

          * CreateRoute - The route was manually added to the route table. *

          *
        • *
        • *

          * EnableVgwRoutePropagation - The route was propagated by route propagation. *

          *
        • *
        * * @param origin * Describes how the route was created.

        *
          *
        • *

          * CreateRouteTable - The route was automatically created when the route table was created. *

          *
        • *
        • *

          * CreateRoute - The route was manually added to the route table. *

          *
        • *
        • *

          * EnableVgwRoutePropagation - The route was propagated by route propagation. *

          *
        • * @see RouteOrigin * @return Returns a reference to this object so that method calls can be chained together. * @see RouteOrigin */ Builder origin(RouteOrigin origin); /** *

          * The state of the route. The blackhole state indicates that the route's target isn't available * (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been * terminated). *

          * * @param state * The state of the route. The blackhole state indicates that the route's target isn't * available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance * has been terminated). * @see RouteState * @return Returns a reference to this object so that method calls can be chained together. * @see RouteState */ Builder state(String state); /** *

          * The state of the route. The blackhole state indicates that the route's target isn't available * (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been * terminated). *

          * * @param state * The state of the route. The blackhole state indicates that the route's target isn't * available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance * has been terminated). * @see RouteState * @return Returns a reference to this object so that method calls can be chained together. * @see RouteState */ Builder state(RouteState state); /** *

          * The ID of a VPC peering connection. *

          * * @param vpcPeeringConnectionId * The ID of a VPC peering connection. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcPeeringConnectionId(String vpcPeeringConnectionId); } static final class BuilderImpl implements Builder { private String destinationCidrBlock; private String destinationIpv6CidrBlock; private String destinationPrefixListId; private String egressOnlyInternetGatewayId; private String gatewayId; private String instanceId; private String instanceOwnerId; private String natGatewayId; private String transitGatewayId; private String localGatewayId; private String carrierGatewayId; private String networkInterfaceId; private String origin; private String state; private String vpcPeeringConnectionId; private BuilderImpl() { } private BuilderImpl(Route model) { destinationCidrBlock(model.destinationCidrBlock); destinationIpv6CidrBlock(model.destinationIpv6CidrBlock); destinationPrefixListId(model.destinationPrefixListId); egressOnlyInternetGatewayId(model.egressOnlyInternetGatewayId); gatewayId(model.gatewayId); instanceId(model.instanceId); instanceOwnerId(model.instanceOwnerId); natGatewayId(model.natGatewayId); transitGatewayId(model.transitGatewayId); localGatewayId(model.localGatewayId); carrierGatewayId(model.carrierGatewayId); networkInterfaceId(model.networkInterfaceId); origin(model.origin); state(model.state); vpcPeeringConnectionId(model.vpcPeeringConnectionId); } public final String getDestinationCidrBlock() { return destinationCidrBlock; } @Override public final Builder destinationCidrBlock(String destinationCidrBlock) { this.destinationCidrBlock = destinationCidrBlock; return this; } public final void setDestinationCidrBlock(String destinationCidrBlock) { this.destinationCidrBlock = destinationCidrBlock; } public final String getDestinationIpv6CidrBlock() { return destinationIpv6CidrBlock; } @Override public final Builder destinationIpv6CidrBlock(String destinationIpv6CidrBlock) { this.destinationIpv6CidrBlock = destinationIpv6CidrBlock; return this; } public final void setDestinationIpv6CidrBlock(String destinationIpv6CidrBlock) { this.destinationIpv6CidrBlock = destinationIpv6CidrBlock; } public final String getDestinationPrefixListId() { return destinationPrefixListId; } @Override public final Builder destinationPrefixListId(String destinationPrefixListId) { this.destinationPrefixListId = destinationPrefixListId; return this; } public final void setDestinationPrefixListId(String destinationPrefixListId) { this.destinationPrefixListId = destinationPrefixListId; } public final String getEgressOnlyInternetGatewayId() { return egressOnlyInternetGatewayId; } @Override public final Builder egressOnlyInternetGatewayId(String egressOnlyInternetGatewayId) { this.egressOnlyInternetGatewayId = egressOnlyInternetGatewayId; return this; } public final void setEgressOnlyInternetGatewayId(String egressOnlyInternetGatewayId) { this.egressOnlyInternetGatewayId = egressOnlyInternetGatewayId; } public final String getGatewayId() { return gatewayId; } @Override public final Builder gatewayId(String gatewayId) { this.gatewayId = gatewayId; return this; } public final void setGatewayId(String gatewayId) { this.gatewayId = gatewayId; } public final String getInstanceId() { return instanceId; } @Override public final Builder instanceId(String instanceId) { this.instanceId = instanceId; return this; } public final void setInstanceId(String instanceId) { this.instanceId = instanceId; } public final String getInstanceOwnerId() { return instanceOwnerId; } @Override public final Builder instanceOwnerId(String instanceOwnerId) { this.instanceOwnerId = instanceOwnerId; return this; } public final void setInstanceOwnerId(String instanceOwnerId) { this.instanceOwnerId = instanceOwnerId; } public final String getNatGatewayId() { return natGatewayId; } @Override public final Builder natGatewayId(String natGatewayId) { this.natGatewayId = natGatewayId; return this; } public final void setNatGatewayId(String natGatewayId) { this.natGatewayId = natGatewayId; } public final String getTransitGatewayId() { return transitGatewayId; } @Override public final Builder transitGatewayId(String transitGatewayId) { this.transitGatewayId = transitGatewayId; return this; } public final void setTransitGatewayId(String transitGatewayId) { this.transitGatewayId = transitGatewayId; } public final String getLocalGatewayId() { return localGatewayId; } @Override public final Builder localGatewayId(String localGatewayId) { this.localGatewayId = localGatewayId; return this; } public final void setLocalGatewayId(String localGatewayId) { this.localGatewayId = localGatewayId; } public final String getCarrierGatewayId() { return carrierGatewayId; } @Override public final Builder carrierGatewayId(String carrierGatewayId) { this.carrierGatewayId = carrierGatewayId; return this; } public final void setCarrierGatewayId(String carrierGatewayId) { this.carrierGatewayId = carrierGatewayId; } public final String getNetworkInterfaceId() { return networkInterfaceId; } @Override public final Builder networkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; return this; } public final void setNetworkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; } public final String getOrigin() { return origin; } @Override public final Builder origin(String origin) { this.origin = origin; return this; } @Override public final Builder origin(RouteOrigin origin) { this.origin(origin == null ? null : origin.toString()); return this; } public final void setOrigin(String origin) { this.origin = origin; } public final String getState() { return state; } @Override public final Builder state(String state) { this.state = state; return this; } @Override public final Builder state(RouteState state) { this.state(state == null ? null : state.toString()); return this; } public final void setState(String state) { this.state = state; } public final String getVpcPeeringConnectionId() { return vpcPeeringConnectionId; } @Override public final Builder vpcPeeringConnectionId(String vpcPeeringConnectionId) { this.vpcPeeringConnectionId = vpcPeeringConnectionId; return this; } public final void setVpcPeeringConnectionId(String vpcPeeringConnectionId) { this.vpcPeeringConnectionId = vpcPeeringConnectionId; } @Override public Route build() { return new Route(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy