/* * Copyright 2018-2023 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 com.amazonaws.services.ec2.model; import java.io.Serializable; import javax.annotation.Generated; /** *

* Describes a route in a route table. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Route implements Serializable, Cloneable { /** *

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

*/ private String destinationCidrBlock; /** *

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

*/ private String destinationIpv6CidrBlock; /** *

* The prefix of the Amazon Web Service. *

*/ private String destinationPrefixListId; /** *

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

*/ private String egressOnlyInternetGatewayId; /** *

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

*/ private String gatewayId; /** *

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

*/ private String instanceId; /** *

* The ID of Amazon Web Services account that owns the instance. *

*/ private String instanceOwnerId; /** *

* The ID of a NAT gateway. *

*/ private String natGatewayId; /** *

* The ID of a transit gateway. *

*/ private String transitGatewayId; /** *

* The ID of the local gateway. *

*/ private String localGatewayId; /** *

* The ID of the carrier gateway. *

*/ private String carrierGatewayId; /** *

* The ID of the network interface. *

*/ private String networkInterfaceId; /** *

* Describes how the route was created. *

* */ private String 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). *

*/ private String state; /** *

* The ID of a VPC peering connection. *

*/ private String vpcPeeringConnectionId; /** *

* The Amazon Resource Name (ARN) of the core network. *

*/ private String coreNetworkArn; /** *

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

* * @param destinationCidrBlock * The IPv4 CIDR block used for the destination match. */ public void setDestinationCidrBlock(String destinationCidrBlock) { this.destinationCidrBlock = destinationCidrBlock; } /** *

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

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

* 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. */ public Route withDestinationCidrBlock(String destinationCidrBlock) { setDestinationCidrBlock(destinationCidrBlock); return this; } /** *

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

* * @param destinationIpv6CidrBlock * The IPv6 CIDR block used for the destination match. */ public void setDestinationIpv6CidrBlock(String destinationIpv6CidrBlock) { this.destinationIpv6CidrBlock = destinationIpv6CidrBlock; } /** *

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

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

* 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. */ public Route withDestinationIpv6CidrBlock(String destinationIpv6CidrBlock) { setDestinationIpv6CidrBlock(destinationIpv6CidrBlock); return this; } /** *

* The prefix of the Amazon Web Service. *

* * @param destinationPrefixListId * The prefix of the Amazon Web Service. */ public void setDestinationPrefixListId(String destinationPrefixListId) { this.destinationPrefixListId = destinationPrefixListId; } /** *

* The prefix of the Amazon Web Service. *

* * @return The prefix of the Amazon Web Service. */ public String getDestinationPrefixListId() { return this.destinationPrefixListId; } /** *

* The prefix of the Amazon Web Service. *

* * @param destinationPrefixListId * The prefix of the Amazon Web Service. * @return Returns a reference to this object so that method calls can be chained together. */ public Route withDestinationPrefixListId(String destinationPrefixListId) { setDestinationPrefixListId(destinationPrefixListId); return this; } /** *

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

* * @param egressOnlyInternetGatewayId * The ID of the egress-only internet gateway. */ public void setEgressOnlyInternetGatewayId(String egressOnlyInternetGatewayId) { this.egressOnlyInternetGatewayId = egressOnlyInternetGatewayId; } /** *

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

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

* 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. */ public Route withEgressOnlyInternetGatewayId(String egressOnlyInternetGatewayId) { setEgressOnlyInternetGatewayId(egressOnlyInternetGatewayId); return this; } /** *

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

* * @param gatewayId * The ID of a gateway attached to your VPC. */ public void setGatewayId(String gatewayId) { this.gatewayId = gatewayId; } /** *

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

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

* 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. */ public Route withGatewayId(String gatewayId) { setGatewayId(gatewayId); return this; } /** *

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

* * @param instanceId * The ID of a NAT instance in your VPC. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** *

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

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

* 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. */ public Route withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** *

* The ID of Amazon Web Services account that owns the instance. *

* * @param instanceOwnerId * The ID of Amazon Web Services account that owns the instance. */ public void setInstanceOwnerId(String instanceOwnerId) { this.instanceOwnerId = instanceOwnerId; } /** *

* The ID of Amazon Web Services account that owns the instance. *

* * @return The ID of Amazon Web Services account that owns the instance. */ public String getInstanceOwnerId() { return this.instanceOwnerId; } /** *

* The ID of Amazon Web Services account that owns the instance. *

* * @param instanceOwnerId * The ID of Amazon Web Services account that owns the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public Route withInstanceOwnerId(String instanceOwnerId) { setInstanceOwnerId(instanceOwnerId); return this; } /** *

* The ID of a NAT gateway. *

* * @param natGatewayId * The ID of a NAT gateway. */ public void setNatGatewayId(String natGatewayId) { this.natGatewayId = natGatewayId; } /** *

* The ID of a NAT gateway. *

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

* 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. */ public Route withNatGatewayId(String natGatewayId) { setNatGatewayId(natGatewayId); return this; } /** *

* The ID of a transit gateway. *

* * @param transitGatewayId * The ID of a transit gateway. */ public void setTransitGatewayId(String transitGatewayId) { this.transitGatewayId = transitGatewayId; } /** *

* The ID of a transit gateway. *

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

* 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. */ public Route withTransitGatewayId(String transitGatewayId) { setTransitGatewayId(transitGatewayId); return this; } /** *

* The ID of the local gateway. *

* * @param localGatewayId * The ID of the local gateway. */ public void setLocalGatewayId(String localGatewayId) { this.localGatewayId = localGatewayId; } /** *

* The ID of the local gateway. *

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

* 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. */ public Route withLocalGatewayId(String localGatewayId) { setLocalGatewayId(localGatewayId); return this; } /** *

* The ID of the carrier gateway. *

* * @param carrierGatewayId * The ID of the carrier gateway. */ public void setCarrierGatewayId(String carrierGatewayId) { this.carrierGatewayId = carrierGatewayId; } /** *

* The ID of the carrier gateway. *

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

* 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. */ public Route withCarrierGatewayId(String carrierGatewayId) { setCarrierGatewayId(carrierGatewayId); return this; } /** *

* The ID of the network interface. *

* * @param networkInterfaceId * The ID of the network interface. */ public void setNetworkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; } /** *

* The ID of the network interface. *

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

* 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. */ public Route withNetworkInterfaceId(String networkInterfaceId) { setNetworkInterfaceId(networkInterfaceId); return this; } /** *

* Describes how the route was created. *

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

*