/* * 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 table route. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AnalysisRouteTableRoute implements Serializable, Cloneable { /** ** The destination IPv4 address, in CIDR notation. *
*/ private String destinationCidr; /** ** The prefix of the Amazon Web Service. *
*/ private String destinationPrefixListId; /** ** The ID of an egress-only internet gateway. *
*/ private String egressOnlyInternetGatewayId; /** ** The ID of the gateway, such as an internet gateway or virtual private gateway. *
*/ private String gatewayId; /** ** The ID of the instance, such as a NAT instance. *
*/ private String instanceId; /** ** The ID of a NAT gateway. *
*/ private String natGatewayId; /** ** The ID of a network interface. *
*/ private String networkInterfaceId; /** ** Describes how the route was created. The following are the possible values: *
** 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. *
** The ID of a transit gateway. *
*/ private String transitGatewayId; /** ** The ID of a VPC peering connection. *
*/ private String vpcPeeringConnectionId; /** ** The state. The following are the possible values: *
** active *
** blackhole *
** The ID of a carrier gateway. *
*/ private String carrierGatewayId; /** ** The Amazon Resource Name (ARN) of a core network. *
*/ private String coreNetworkArn; /** ** The ID of a local gateway. *
*/ private String localGatewayId; /** ** The destination IPv4 address, in CIDR notation. *
* * @param destinationCidr * The destination IPv4 address, in CIDR notation. */ public void setDestinationCidr(String destinationCidr) { this.destinationCidr = destinationCidr; } /** ** The destination IPv4 address, in CIDR notation. *
* * @return The destination IPv4 address, in CIDR notation. */ public String getDestinationCidr() { return this.destinationCidr; } /** ** The destination IPv4 address, in CIDR notation. *
* * @param destinationCidr * The destination IPv4 address, in CIDR notation. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisRouteTableRoute withDestinationCidr(String destinationCidr) { setDestinationCidr(destinationCidr); 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 AnalysisRouteTableRoute withDestinationPrefixListId(String destinationPrefixListId) { setDestinationPrefixListId(destinationPrefixListId); return this; } /** ** The ID of an egress-only internet gateway. *
* * @param egressOnlyInternetGatewayId * The ID of an egress-only internet gateway. */ public void setEgressOnlyInternetGatewayId(String egressOnlyInternetGatewayId) { this.egressOnlyInternetGatewayId = egressOnlyInternetGatewayId; } /** ** The ID of an egress-only internet gateway. *
* * @return The ID of an egress-only internet gateway. */ public String getEgressOnlyInternetGatewayId() { return this.egressOnlyInternetGatewayId; } /** ** The ID of an egress-only internet gateway. *
* * @param egressOnlyInternetGatewayId * The ID of an egress-only internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisRouteTableRoute withEgressOnlyInternetGatewayId(String egressOnlyInternetGatewayId) { setEgressOnlyInternetGatewayId(egressOnlyInternetGatewayId); return this; } /** ** The ID of the gateway, such as an internet gateway or virtual private gateway. *
* * @param gatewayId * The ID of the gateway, such as an internet gateway or virtual private gateway. */ public void setGatewayId(String gatewayId) { this.gatewayId = gatewayId; } /** ** The ID of the gateway, such as an internet gateway or virtual private gateway. *
* * @return The ID of the gateway, such as an internet gateway or virtual private gateway. */ public String getGatewayId() { return this.gatewayId; } /** ** The ID of the gateway, such as an internet gateway or virtual private gateway. *
* * @param gatewayId * The ID of the gateway, such as an internet gateway or virtual private gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisRouteTableRoute withGatewayId(String gatewayId) { setGatewayId(gatewayId); return this; } /** ** The ID of the instance, such as a NAT instance. *
* * @param instanceId * The ID of the instance, such as a NAT instance. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** ** The ID of the instance, such as a NAT instance. *
* * @return The ID of the instance, such as a NAT instance. */ public String getInstanceId() { return this.instanceId; } /** ** The ID of the instance, such as a NAT instance. *
* * @param instanceId * The ID of the instance, such as a NAT instance. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisRouteTableRoute withInstanceId(String instanceId) { setInstanceId(instanceId); 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 AnalysisRouteTableRoute withNatGatewayId(String natGatewayId) { setNatGatewayId(natGatewayId); return this; } /** ** The ID of a network interface. *
* * @param networkInterfaceId * The ID of a network interface. */ public void setNetworkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; } /** ** The ID of a network interface. *
* * @return The ID of a network interface. */ public String getNetworkInterfaceId() { return this.networkInterfaceId; } /** ** The ID of a network interface. *
* * @param networkInterfaceId * The ID of a network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisRouteTableRoute withNetworkInterfaceId(String networkInterfaceId) { setNetworkInterfaceId(networkInterfaceId); return this; } /** ** Describes how the route was created. The following are the possible values: *
** 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. *
** 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. *
** Describes how the route was created. The following are the possible values: *
** 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. *
** 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. *
** Describes how the route was created. The following are the possible values: *
** 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. *
** 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. *
** 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 AnalysisRouteTableRoute withTransitGatewayId(String transitGatewayId) { setTransitGatewayId(transitGatewayId); return this; } /** ** The ID of a VPC peering connection. *
* * @param vpcPeeringConnectionId * The ID of a VPC peering connection. */ public void setVpcPeeringConnectionId(String vpcPeeringConnectionId) { this.vpcPeeringConnectionId = vpcPeeringConnectionId; } /** ** The ID of a VPC peering connection. *
* * @return The ID of a VPC peering connection. */ public String getVpcPeeringConnectionId() { return this.vpcPeeringConnectionId; } /** ** 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. */ public AnalysisRouteTableRoute withVpcPeeringConnectionId(String vpcPeeringConnectionId) { setVpcPeeringConnectionId(vpcPeeringConnectionId); return this; } /** ** The state. The following are the possible values: *
** active *
** blackhole *
** active *
** blackhole *
** The state. The following are the possible values: *
** active *
** blackhole *
** active *
** blackhole *
** The state. The following are the possible values: *
** active *
** blackhole *
** active *
** blackhole *
** The ID of a carrier gateway. *
* * @param carrierGatewayId * The ID of a carrier gateway. */ public void setCarrierGatewayId(String carrierGatewayId) { this.carrierGatewayId = carrierGatewayId; } /** ** The ID of a carrier gateway. *
* * @return The ID of a carrier gateway. */ public String getCarrierGatewayId() { return this.carrierGatewayId; } /** ** The ID of a carrier gateway. *
* * @param carrierGatewayId * The ID of a carrier gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisRouteTableRoute withCarrierGatewayId(String carrierGatewayId) { setCarrierGatewayId(carrierGatewayId); return this; } /** ** The Amazon Resource Name (ARN) of a core network. *
* * @param coreNetworkArn * The Amazon Resource Name (ARN) of a core network. */ public void setCoreNetworkArn(String coreNetworkArn) { this.coreNetworkArn = coreNetworkArn; } /** ** The Amazon Resource Name (ARN) of a core network. *
* * @return The Amazon Resource Name (ARN) of a core network. */ public String getCoreNetworkArn() { return this.coreNetworkArn; } /** ** The Amazon Resource Name (ARN) of a core network. *
* * @param coreNetworkArn * The Amazon Resource Name (ARN) of a core network. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisRouteTableRoute withCoreNetworkArn(String coreNetworkArn) { setCoreNetworkArn(coreNetworkArn); return this; } /** ** The ID of a local gateway. *
* * @param localGatewayId * The ID of a local gateway. */ public void setLocalGatewayId(String localGatewayId) { this.localGatewayId = localGatewayId; } /** ** The ID of a local gateway. *
* * @return The ID of a local gateway. */ public String getLocalGatewayId() { return this.localGatewayId; } /** ** The ID of a local gateway. *
* * @param localGatewayId * The ID of a local gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalysisRouteTableRoute withLocalGatewayId(String localGatewayId) { setLocalGatewayId(localGatewayId); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDestinationCidr() != null) sb.append("DestinationCidr: ").append(getDestinationCidr()).append(","); if (getDestinationPrefixListId() != null) sb.append("DestinationPrefixListId: ").append(getDestinationPrefixListId()).append(","); if (getEgressOnlyInternetGatewayId() != null) sb.append("EgressOnlyInternetGatewayId: ").append(getEgressOnlyInternetGatewayId()).append(","); if (getGatewayId() != null) sb.append("GatewayId: ").append(getGatewayId()).append(","); if (getInstanceId() != null) sb.append("InstanceId: ").append(getInstanceId()).append(","); if (getNatGatewayId() != null) sb.append("NatGatewayId: ").append(getNatGatewayId()).append(","); if (getNetworkInterfaceId() != null) sb.append("NetworkInterfaceId: ").append(getNetworkInterfaceId()).append(","); if (getOrigin() != null) sb.append("Origin: ").append(getOrigin()).append(","); if (getTransitGatewayId() != null) sb.append("TransitGatewayId: ").append(getTransitGatewayId()).append(","); if (getVpcPeeringConnectionId() != null) sb.append("VpcPeeringConnectionId: ").append(getVpcPeeringConnectionId()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getCarrierGatewayId() != null) sb.append("CarrierGatewayId: ").append(getCarrierGatewayId()).append(","); if (getCoreNetworkArn() != null) sb.append("CoreNetworkArn: ").append(getCoreNetworkArn()).append(","); if (getLocalGatewayId() != null) sb.append("LocalGatewayId: ").append(getLocalGatewayId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AnalysisRouteTableRoute == false) return false; AnalysisRouteTableRoute other = (AnalysisRouteTableRoute) obj; if (other.getDestinationCidr() == null ^ this.getDestinationCidr() == null) return false; if (other.getDestinationCidr() != null && other.getDestinationCidr().equals(this.getDestinationCidr()) == false) return false; if (other.getDestinationPrefixListId() == null ^ this.getDestinationPrefixListId() == null) return false; if (other.getDestinationPrefixListId() != null && other.getDestinationPrefixListId().equals(this.getDestinationPrefixListId()) == false) return false; if (other.getEgressOnlyInternetGatewayId() == null ^ this.getEgressOnlyInternetGatewayId() == null) return false; if (other.getEgressOnlyInternetGatewayId() != null && other.getEgressOnlyInternetGatewayId().equals(this.getEgressOnlyInternetGatewayId()) == false) return false; if (other.getGatewayId() == null ^ this.getGatewayId() == null) return false; if (other.getGatewayId() != null && other.getGatewayId().equals(this.getGatewayId()) == false) return false; if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false; if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; if (other.getNatGatewayId() == null ^ this.getNatGatewayId() == null) return false; if (other.getNatGatewayId() != null && other.getNatGatewayId().equals(this.getNatGatewayId()) == false) return false; if (other.getNetworkInterfaceId() == null ^ this.getNetworkInterfaceId() == null) return false; if (other.getNetworkInterfaceId() != null && other.getNetworkInterfaceId().equals(this.getNetworkInterfaceId()) == false) return false; if (other.getOrigin() == null ^ this.getOrigin() == null) return false; if (other.getOrigin() != null && other.getOrigin().equals(this.getOrigin()) == false) return false; if (other.getTransitGatewayId() == null ^ this.getTransitGatewayId() == null) return false; if (other.getTransitGatewayId() != null && other.getTransitGatewayId().equals(this.getTransitGatewayId()) == false) return false; if (other.getVpcPeeringConnectionId() == null ^ this.getVpcPeeringConnectionId() == null) return false; if (other.getVpcPeeringConnectionId() != null && other.getVpcPeeringConnectionId().equals(this.getVpcPeeringConnectionId()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getCarrierGatewayId() == null ^ this.getCarrierGatewayId() == null) return false; if (other.getCarrierGatewayId() != null && other.getCarrierGatewayId().equals(this.getCarrierGatewayId()) == false) return false; if (other.getCoreNetworkArn() == null ^ this.getCoreNetworkArn() == null) return false; if (other.getCoreNetworkArn() != null && other.getCoreNetworkArn().equals(this.getCoreNetworkArn()) == false) return false; if (other.getLocalGatewayId() == null ^ this.getLocalGatewayId() == null) return false; if (other.getLocalGatewayId() != null && other.getLocalGatewayId().equals(this.getLocalGatewayId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDestinationCidr() == null) ? 0 : getDestinationCidr().hashCode()); hashCode = prime * hashCode + ((getDestinationPrefixListId() == null) ? 0 : getDestinationPrefixListId().hashCode()); hashCode = prime * hashCode + ((getEgressOnlyInternetGatewayId() == null) ? 0 : getEgressOnlyInternetGatewayId().hashCode()); hashCode = prime * hashCode + ((getGatewayId() == null) ? 0 : getGatewayId().hashCode()); hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); hashCode = prime * hashCode + ((getNatGatewayId() == null) ? 0 : getNatGatewayId().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaceId() == null) ? 0 : getNetworkInterfaceId().hashCode()); hashCode = prime * hashCode + ((getOrigin() == null) ? 0 : getOrigin().hashCode()); hashCode = prime * hashCode + ((getTransitGatewayId() == null) ? 0 : getTransitGatewayId().hashCode()); hashCode = prime * hashCode + ((getVpcPeeringConnectionId() == null) ? 0 : getVpcPeeringConnectionId().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getCarrierGatewayId() == null) ? 0 : getCarrierGatewayId().hashCode()); hashCode = prime * hashCode + ((getCoreNetworkArn() == null) ? 0 : getCoreNetworkArn().hashCode()); hashCode = prime * hashCode + ((getLocalGatewayId() == null) ? 0 : getLocalGatewayId().hashCode()); return hashCode; } @Override public AnalysisRouteTableRoute clone() { try { return (AnalysisRouteTableRoute) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }