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

com.amazonaws.services.ec2.model.LocalGatewayRoute Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EC2 module holds the client classes that are used for communicating with Amazon EC2 Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2019-2024 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 for a local gateway route table. *

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

* The CIDR block used for destination matches. *

*/ private String destinationCidrBlock; /** *

* The ID of the virtual interface group. *

*/ private String localGatewayVirtualInterfaceGroupId; /** *

* The route type. *

*/ private String type; /** *

* The state of the route. *

*/ private String state; /** *

* The ID of the local gateway route table. *

*/ private String localGatewayRouteTableId; /** *

* The Amazon Resource Name (ARN) of the local gateway route table. *

*/ private String localGatewayRouteTableArn; /** *

* The ID of the Amazon Web Services account that owns the local gateway route. *

*/ private String ownerId; /** *

* The ID of the subnet. *

*/ private String subnetId; /** *

* The ID of the customer-owned address pool. *

*/ private String coipPoolId; /** *

* The ID of the network interface. *

*/ private String networkInterfaceId; /** *

* The ID of the prefix list. *

*/ private String destinationPrefixListId; /** *

* The CIDR block used for destination matches. *

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

* The CIDR block used for destination matches. *

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

* The CIDR block used for destination matches. *

* * @param destinationCidrBlock * The CIDR block used for destination matches. * @return Returns a reference to this object so that method calls can be chained together. */ public LocalGatewayRoute withDestinationCidrBlock(String destinationCidrBlock) { setDestinationCidrBlock(destinationCidrBlock); return this; } /** *

* The ID of the virtual interface group. *

* * @param localGatewayVirtualInterfaceGroupId * The ID of the virtual interface group. */ public void setLocalGatewayVirtualInterfaceGroupId(String localGatewayVirtualInterfaceGroupId) { this.localGatewayVirtualInterfaceGroupId = localGatewayVirtualInterfaceGroupId; } /** *

* The ID of the virtual interface group. *

* * @return The ID of the virtual interface group. */ public String getLocalGatewayVirtualInterfaceGroupId() { return this.localGatewayVirtualInterfaceGroupId; } /** *

* The ID of the virtual interface group. *

* * @param localGatewayVirtualInterfaceGroupId * The ID of the virtual interface group. * @return Returns a reference to this object so that method calls can be chained together. */ public LocalGatewayRoute withLocalGatewayVirtualInterfaceGroupId(String localGatewayVirtualInterfaceGroupId) { setLocalGatewayVirtualInterfaceGroupId(localGatewayVirtualInterfaceGroupId); return this; } /** *

* The route type. *

* * @param type * The route type. * @see LocalGatewayRouteType */ public void setType(String type) { this.type = type; } /** *

* The route type. *

* * @return The route type. * @see LocalGatewayRouteType */ public String getType() { return this.type; } /** *

* The route type. *

* * @param type * The route type. * @return Returns a reference to this object so that method calls can be chained together. * @see LocalGatewayRouteType */ public LocalGatewayRoute withType(String type) { setType(type); return this; } /** *

* The route type. *

* * @param type * The route type. * @return Returns a reference to this object so that method calls can be chained together. * @see LocalGatewayRouteType */ public LocalGatewayRoute withType(LocalGatewayRouteType type) { this.type = type.toString(); return this; } /** *

* The state of the route. *

* * @param state * The state of the route. * @see LocalGatewayRouteState */ public void setState(String state) { this.state = state; } /** *

* The state of the route. *

* * @return The state of the route. * @see LocalGatewayRouteState */ public String getState() { return this.state; } /** *

* The state of the route. *

* * @param state * The state of the route. * @return Returns a reference to this object so that method calls can be chained together. * @see LocalGatewayRouteState */ public LocalGatewayRoute withState(String state) { setState(state); return this; } /** *

* The state of the route. *

* * @param state * The state of the route. * @return Returns a reference to this object so that method calls can be chained together. * @see LocalGatewayRouteState */ public LocalGatewayRoute withState(LocalGatewayRouteState state) { this.state = state.toString(); return this; } /** *

* The ID of the local gateway route table. *

* * @param localGatewayRouteTableId * The ID of the local gateway route table. */ public void setLocalGatewayRouteTableId(String localGatewayRouteTableId) { this.localGatewayRouteTableId = localGatewayRouteTableId; } /** *

* The ID of the local gateway route table. *

* * @return The ID of the local gateway route table. */ public String getLocalGatewayRouteTableId() { return this.localGatewayRouteTableId; } /** *

* The ID of the local gateway route table. *

* * @param localGatewayRouteTableId * The ID of the local gateway route table. * @return Returns a reference to this object so that method calls can be chained together. */ public LocalGatewayRoute withLocalGatewayRouteTableId(String localGatewayRouteTableId) { setLocalGatewayRouteTableId(localGatewayRouteTableId); return this; } /** *

* The Amazon Resource Name (ARN) of the local gateway route table. *

* * @param localGatewayRouteTableArn * The Amazon Resource Name (ARN) of the local gateway route table. */ public void setLocalGatewayRouteTableArn(String localGatewayRouteTableArn) { this.localGatewayRouteTableArn = localGatewayRouteTableArn; } /** *

* The Amazon Resource Name (ARN) of the local gateway route table. *

* * @return The Amazon Resource Name (ARN) of the local gateway route table. */ public String getLocalGatewayRouteTableArn() { return this.localGatewayRouteTableArn; } /** *

* The Amazon Resource Name (ARN) of the local gateway route table. *

* * @param localGatewayRouteTableArn * The Amazon Resource Name (ARN) of the local gateway route table. * @return Returns a reference to this object so that method calls can be chained together. */ public LocalGatewayRoute withLocalGatewayRouteTableArn(String localGatewayRouteTableArn) { setLocalGatewayRouteTableArn(localGatewayRouteTableArn); return this; } /** *

* The ID of the Amazon Web Services account that owns the local gateway route. *

* * @param ownerId * The ID of the Amazon Web Services account that owns the local gateway route. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** *

* The ID of the Amazon Web Services account that owns the local gateway route. *

* * @return The ID of the Amazon Web Services account that owns the local gateway route. */ public String getOwnerId() { return this.ownerId; } /** *

* The ID of the Amazon Web Services account that owns the local gateway route. *

* * @param ownerId * The ID of the Amazon Web Services account that owns the local gateway route. * @return Returns a reference to this object so that method calls can be chained together. */ public LocalGatewayRoute withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** *

* The ID of the subnet. *

* * @param subnetId * The ID of the subnet. */ public void setSubnetId(String subnetId) { this.subnetId = subnetId; } /** *

* The ID of the subnet. *

* * @return The ID of the subnet. */ public String getSubnetId() { return this.subnetId; } /** *

* The ID of the subnet. *

* * @param subnetId * The ID of the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public LocalGatewayRoute withSubnetId(String subnetId) { setSubnetId(subnetId); return this; } /** *

* The ID of the customer-owned address pool. *

* * @param coipPoolId * The ID of the customer-owned address pool. */ public void setCoipPoolId(String coipPoolId) { this.coipPoolId = coipPoolId; } /** *

* The ID of the customer-owned address pool. *

* * @return The ID of the customer-owned address pool. */ public String getCoipPoolId() { return this.coipPoolId; } /** *

* The ID of the customer-owned address pool. *

* * @param coipPoolId * The ID of the customer-owned address pool. * @return Returns a reference to this object so that method calls can be chained together. */ public LocalGatewayRoute withCoipPoolId(String coipPoolId) { setCoipPoolId(coipPoolId); 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 LocalGatewayRoute withNetworkInterfaceId(String networkInterfaceId) { setNetworkInterfaceId(networkInterfaceId); return this; } /** *

* The ID of the prefix list. *

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

* The ID of the prefix list. *

* * @return The ID of the prefix list. */ public String getDestinationPrefixListId() { return this.destinationPrefixListId; } /** *

* The ID of the prefix list. *

* * @param destinationPrefixListId * The ID of the prefix list. * @return Returns a reference to this object so that method calls can be chained together. */ public LocalGatewayRoute withDestinationPrefixListId(String destinationPrefixListId) { setDestinationPrefixListId(destinationPrefixListId); 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 (getDestinationCidrBlock() != null) sb.append("DestinationCidrBlock: ").append(getDestinationCidrBlock()).append(","); if (getLocalGatewayVirtualInterfaceGroupId() != null) sb.append("LocalGatewayVirtualInterfaceGroupId: ").append(getLocalGatewayVirtualInterfaceGroupId()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getLocalGatewayRouteTableId() != null) sb.append("LocalGatewayRouteTableId: ").append(getLocalGatewayRouteTableId()).append(","); if (getLocalGatewayRouteTableArn() != null) sb.append("LocalGatewayRouteTableArn: ").append(getLocalGatewayRouteTableArn()).append(","); if (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()).append(","); if (getSubnetId() != null) sb.append("SubnetId: ").append(getSubnetId()).append(","); if (getCoipPoolId() != null) sb.append("CoipPoolId: ").append(getCoipPoolId()).append(","); if (getNetworkInterfaceId() != null) sb.append("NetworkInterfaceId: ").append(getNetworkInterfaceId()).append(","); if (getDestinationPrefixListId() != null) sb.append("DestinationPrefixListId: ").append(getDestinationPrefixListId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LocalGatewayRoute == false) return false; LocalGatewayRoute other = (LocalGatewayRoute) obj; if (other.getDestinationCidrBlock() == null ^ this.getDestinationCidrBlock() == null) return false; if (other.getDestinationCidrBlock() != null && other.getDestinationCidrBlock().equals(this.getDestinationCidrBlock()) == false) return false; if (other.getLocalGatewayVirtualInterfaceGroupId() == null ^ this.getLocalGatewayVirtualInterfaceGroupId() == null) return false; if (other.getLocalGatewayVirtualInterfaceGroupId() != null && other.getLocalGatewayVirtualInterfaceGroupId().equals(this.getLocalGatewayVirtualInterfaceGroupId()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == 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.getLocalGatewayRouteTableId() == null ^ this.getLocalGatewayRouteTableId() == null) return false; if (other.getLocalGatewayRouteTableId() != null && other.getLocalGatewayRouteTableId().equals(this.getLocalGatewayRouteTableId()) == false) return false; if (other.getLocalGatewayRouteTableArn() == null ^ this.getLocalGatewayRouteTableArn() == null) return false; if (other.getLocalGatewayRouteTableArn() != null && other.getLocalGatewayRouteTableArn().equals(this.getLocalGatewayRouteTableArn()) == false) return false; if (other.getOwnerId() == null ^ this.getOwnerId() == null) return false; if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == false) return false; if (other.getSubnetId() == null ^ this.getSubnetId() == null) return false; if (other.getSubnetId() != null && other.getSubnetId().equals(this.getSubnetId()) == false) return false; if (other.getCoipPoolId() == null ^ this.getCoipPoolId() == null) return false; if (other.getCoipPoolId() != null && other.getCoipPoolId().equals(this.getCoipPoolId()) == 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.getDestinationPrefixListId() == null ^ this.getDestinationPrefixListId() == null) return false; if (other.getDestinationPrefixListId() != null && other.getDestinationPrefixListId().equals(this.getDestinationPrefixListId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDestinationCidrBlock() == null) ? 0 : getDestinationCidrBlock().hashCode()); hashCode = prime * hashCode + ((getLocalGatewayVirtualInterfaceGroupId() == null) ? 0 : getLocalGatewayVirtualInterfaceGroupId().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getLocalGatewayRouteTableId() == null) ? 0 : getLocalGatewayRouteTableId().hashCode()); hashCode = prime * hashCode + ((getLocalGatewayRouteTableArn() == null) ? 0 : getLocalGatewayRouteTableArn().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode()); hashCode = prime * hashCode + ((getCoipPoolId() == null) ? 0 : getCoipPoolId().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaceId() == null) ? 0 : getNetworkInterfaceId().hashCode()); hashCode = prime * hashCode + ((getDestinationPrefixListId() == null) ? 0 : getDestinationPrefixListId().hashCode()); return hashCode; } @Override public LocalGatewayRoute clone() { try { return (LocalGatewayRoute) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy