com.amazonaws.services.ec2.model.ModifyLocalGatewayRouteRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* 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;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.ModifyLocalGatewayRouteRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ModifyLocalGatewayRouteRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
DryRunSupportedRequest {
/**
*
* The CIDR block used for destination matches. The value that you provide must match the CIDR of an existing route
* in the table.
*
*/
private String destinationCidrBlock;
/**
*
* The ID of the local gateway route table.
*
*/
private String localGatewayRouteTableId;
/**
*
* The ID of the virtual interface group.
*
*/
private String localGatewayVirtualInterfaceGroupId;
/**
*
* The ID of the network interface.
*
*/
private String networkInterfaceId;
/**
*
* The ID of the prefix list. Use a prefix list in place of DestinationCidrBlock
. You cannot use
* DestinationPrefixListId
and DestinationCidrBlock
in the same request.
*
*/
private String destinationPrefixListId;
/**
*
* The CIDR block used for destination matches. The value that you provide must match the CIDR of an existing route
* in the table.
*
*
* @param destinationCidrBlock
* The CIDR block used for destination matches. The value that you provide must match the CIDR of an existing
* route in the table.
*/
public void setDestinationCidrBlock(String destinationCidrBlock) {
this.destinationCidrBlock = destinationCidrBlock;
}
/**
*
* The CIDR block used for destination matches. The value that you provide must match the CIDR of an existing route
* in the table.
*
*
* @return The CIDR block used for destination matches. The value that you provide must match the CIDR of an
* existing route in the table.
*/
public String getDestinationCidrBlock() {
return this.destinationCidrBlock;
}
/**
*
* The CIDR block used for destination matches. The value that you provide must match the CIDR of an existing route
* in the table.
*
*
* @param destinationCidrBlock
* The CIDR block used for destination matches. The value that you provide must match the CIDR of an existing
* route in the table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyLocalGatewayRouteRequest withDestinationCidrBlock(String destinationCidrBlock) {
setDestinationCidrBlock(destinationCidrBlock);
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 ModifyLocalGatewayRouteRequest withLocalGatewayRouteTableId(String localGatewayRouteTableId) {
setLocalGatewayRouteTableId(localGatewayRouteTableId);
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 ModifyLocalGatewayRouteRequest withLocalGatewayVirtualInterfaceGroupId(String localGatewayVirtualInterfaceGroupId) {
setLocalGatewayVirtualInterfaceGroupId(localGatewayVirtualInterfaceGroupId);
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 ModifyLocalGatewayRouteRequest withNetworkInterfaceId(String networkInterfaceId) {
setNetworkInterfaceId(networkInterfaceId);
return this;
}
/**
*
* The ID of the prefix list. Use a prefix list in place of DestinationCidrBlock
. You cannot use
* DestinationPrefixListId
and DestinationCidrBlock
in the same request.
*
*
* @param destinationPrefixListId
* The ID of the prefix list. Use a prefix list in place of DestinationCidrBlock
. You cannot use
* DestinationPrefixListId
and DestinationCidrBlock
in the same request.
*/
public void setDestinationPrefixListId(String destinationPrefixListId) {
this.destinationPrefixListId = destinationPrefixListId;
}
/**
*
* The ID of the prefix list. Use a prefix list in place of DestinationCidrBlock
. You cannot use
* DestinationPrefixListId
and DestinationCidrBlock
in the same request.
*
*
* @return The ID of the prefix list. Use a prefix list in place of DestinationCidrBlock
. You cannot
* use DestinationPrefixListId
and DestinationCidrBlock
in the same request.
*/
public String getDestinationPrefixListId() {
return this.destinationPrefixListId;
}
/**
*
* The ID of the prefix list. Use a prefix list in place of DestinationCidrBlock
. You cannot use
* DestinationPrefixListId
and DestinationCidrBlock
in the same request.
*
*
* @param destinationPrefixListId
* The ID of the prefix list. Use a prefix list in place of DestinationCidrBlock
. You cannot use
* DestinationPrefixListId
and DestinationCidrBlock
in the same request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyLocalGatewayRouteRequest withDestinationPrefixListId(String destinationPrefixListId) {
setDestinationPrefixListId(destinationPrefixListId);
return this;
}
/**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/
@Override
public Request getDryRunRequest() {
Request request = new ModifyLocalGatewayRouteRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
}
/**
* 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 (getLocalGatewayRouteTableId() != null)
sb.append("LocalGatewayRouteTableId: ").append(getLocalGatewayRouteTableId()).append(",");
if (getLocalGatewayVirtualInterfaceGroupId() != null)
sb.append("LocalGatewayVirtualInterfaceGroupId: ").append(getLocalGatewayVirtualInterfaceGroupId()).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 ModifyLocalGatewayRouteRequest == false)
return false;
ModifyLocalGatewayRouteRequest other = (ModifyLocalGatewayRouteRequest) obj;
if (other.getDestinationCidrBlock() == null ^ this.getDestinationCidrBlock() == null)
return false;
if (other.getDestinationCidrBlock() != null && other.getDestinationCidrBlock().equals(this.getDestinationCidrBlock()) == 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.getLocalGatewayVirtualInterfaceGroupId() == null ^ this.getLocalGatewayVirtualInterfaceGroupId() == null)
return false;
if (other.getLocalGatewayVirtualInterfaceGroupId() != null
&& other.getLocalGatewayVirtualInterfaceGroupId().equals(this.getLocalGatewayVirtualInterfaceGroupId()) == 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 + ((getLocalGatewayRouteTableId() == null) ? 0 : getLocalGatewayRouteTableId().hashCode());
hashCode = prime * hashCode + ((getLocalGatewayVirtualInterfaceGroupId() == null) ? 0 : getLocalGatewayVirtualInterfaceGroupId().hashCode());
hashCode = prime * hashCode + ((getNetworkInterfaceId() == null) ? 0 : getNetworkInterfaceId().hashCode());
hashCode = prime * hashCode + ((getDestinationPrefixListId() == null) ? 0 : getDestinationPrefixListId().hashCode());
return hashCode;
}
@Override
public ModifyLocalGatewayRouteRequest clone() {
return (ModifyLocalGatewayRouteRequest) super.clone();
}
}