/* * 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.fms.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about the ReplaceRoute action in Amazon EC2. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EC2ReplaceRouteAction implements Serializable, Cloneable, StructuredPojo { /** ** A description of the ReplaceRoute action in Amazon EC2. *
*/ private String description; /** ** Information about the IPv4 CIDR address block used for the destination match. The value that you provide must * match the CIDR of an existing route in the table. *
*/ private String destinationCidrBlock; /** ** Information about the ID of the prefix list for the route. *
*/ private String destinationPrefixListId; /** ** Information about the IPv6 CIDR address block used for the destination match. The value that you provide must * match the CIDR of an existing route in the table. *
*/ private String destinationIpv6CidrBlock; /** ** Information about the ID of an internet gateway or virtual private gateway. *
*/ private ActionTarget gatewayId; /** ** Information about the ID of the route table. *
*/ private ActionTarget routeTableId; /** ** A description of the ReplaceRoute action in Amazon EC2. *
* * @param description * A description of the ReplaceRoute action in Amazon EC2. */ public void setDescription(String description) { this.description = description; } /** ** A description of the ReplaceRoute action in Amazon EC2. *
* * @return A description of the ReplaceRoute action in Amazon EC2. */ public String getDescription() { return this.description; } /** ** A description of the ReplaceRoute action in Amazon EC2. *
* * @param description * A description of the ReplaceRoute action in Amazon EC2. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ReplaceRouteAction withDescription(String description) { setDescription(description); return this; } /** ** Information about the IPv4 CIDR address block used for the destination match. The value that you provide must * match the CIDR of an existing route in the table. *
* * @param destinationCidrBlock * Information about the IPv4 CIDR address block used for the destination match. The value that you provide * must match the CIDR of an existing route in the table. */ public void setDestinationCidrBlock(String destinationCidrBlock) { this.destinationCidrBlock = destinationCidrBlock; } /** ** Information about the IPv4 CIDR address block used for the destination match. The value that you provide must * match the CIDR of an existing route in the table. *
* * @return Information about the IPv4 CIDR address block used for the destination match. The value that you provide * must match the CIDR of an existing route in the table. */ public String getDestinationCidrBlock() { return this.destinationCidrBlock; } /** ** Information about the IPv4 CIDR address block used for the destination match. The value that you provide must * match the CIDR of an existing route in the table. *
* * @param destinationCidrBlock * Information about the IPv4 CIDR address block used for the destination match. 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 EC2ReplaceRouteAction withDestinationCidrBlock(String destinationCidrBlock) { setDestinationCidrBlock(destinationCidrBlock); return this; } /** ** Information about the ID of the prefix list for the route. *
* * @param destinationPrefixListId * Information about the ID of the prefix list for the route. */ public void setDestinationPrefixListId(String destinationPrefixListId) { this.destinationPrefixListId = destinationPrefixListId; } /** ** Information about the ID of the prefix list for the route. *
* * @return Information about the ID of the prefix list for the route. */ public String getDestinationPrefixListId() { return this.destinationPrefixListId; } /** ** Information about the ID of the prefix list for the route. *
* * @param destinationPrefixListId * Information about the ID of the prefix list for the route. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ReplaceRouteAction withDestinationPrefixListId(String destinationPrefixListId) { setDestinationPrefixListId(destinationPrefixListId); return this; } /** ** Information about the IPv6 CIDR address block used for the destination match. The value that you provide must * match the CIDR of an existing route in the table. *
* * @param destinationIpv6CidrBlock * Information about the IPv6 CIDR address block used for the destination match. The value that you provide * must match the CIDR of an existing route in the table. */ public void setDestinationIpv6CidrBlock(String destinationIpv6CidrBlock) { this.destinationIpv6CidrBlock = destinationIpv6CidrBlock; } /** ** Information about the IPv6 CIDR address block used for the destination match. The value that you provide must * match the CIDR of an existing route in the table. *
* * @return Information about the IPv6 CIDR address block used for the destination match. The value that you provide * must match the CIDR of an existing route in the table. */ public String getDestinationIpv6CidrBlock() { return this.destinationIpv6CidrBlock; } /** ** Information about the IPv6 CIDR address block used for the destination match. The value that you provide must * match the CIDR of an existing route in the table. *
* * @param destinationIpv6CidrBlock * Information about the IPv6 CIDR address block used for the destination match. 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 EC2ReplaceRouteAction withDestinationIpv6CidrBlock(String destinationIpv6CidrBlock) { setDestinationIpv6CidrBlock(destinationIpv6CidrBlock); return this; } /** ** Information about the ID of an internet gateway or virtual private gateway. *
* * @param gatewayId * Information about the ID of an internet gateway or virtual private gateway. */ public void setGatewayId(ActionTarget gatewayId) { this.gatewayId = gatewayId; } /** ** Information about the ID of an internet gateway or virtual private gateway. *
* * @return Information about the ID of an internet gateway or virtual private gateway. */ public ActionTarget getGatewayId() { return this.gatewayId; } /** ** Information about the ID of an internet gateway or virtual private gateway. *
* * @param gatewayId * Information about the ID of an internet gateway or virtual private gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ReplaceRouteAction withGatewayId(ActionTarget gatewayId) { setGatewayId(gatewayId); return this; } /** ** Information about the ID of the route table. *
* * @param routeTableId * Information about the ID of the route table. */ public void setRouteTableId(ActionTarget routeTableId) { this.routeTableId = routeTableId; } /** ** Information about the ID of the route table. *
* * @return Information about the ID of the route table. */ public ActionTarget getRouteTableId() { return this.routeTableId; } /** ** Information about the ID of the route table. *
* * @param routeTableId * Information about the ID of the route table. * @return Returns a reference to this object so that method calls can be chained together. */ public EC2ReplaceRouteAction withRouteTableId(ActionTarget routeTableId) { setRouteTableId(routeTableId); 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 (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getDestinationCidrBlock() != null) sb.append("DestinationCidrBlock: ").append(getDestinationCidrBlock()).append(","); if (getDestinationPrefixListId() != null) sb.append("DestinationPrefixListId: ").append(getDestinationPrefixListId()).append(","); if (getDestinationIpv6CidrBlock() != null) sb.append("DestinationIpv6CidrBlock: ").append(getDestinationIpv6CidrBlock()).append(","); if (getGatewayId() != null) sb.append("GatewayId: ").append(getGatewayId()).append(","); if (getRouteTableId() != null) sb.append("RouteTableId: ").append(getRouteTableId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EC2ReplaceRouteAction == false) return false; EC2ReplaceRouteAction other = (EC2ReplaceRouteAction) obj; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getDestinationCidrBlock() == null ^ this.getDestinationCidrBlock() == null) return false; if (other.getDestinationCidrBlock() != null && other.getDestinationCidrBlock().equals(this.getDestinationCidrBlock()) == 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.getDestinationIpv6CidrBlock() == null ^ this.getDestinationIpv6CidrBlock() == null) return false; if (other.getDestinationIpv6CidrBlock() != null && other.getDestinationIpv6CidrBlock().equals(this.getDestinationIpv6CidrBlock()) == 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.getRouteTableId() == null ^ this.getRouteTableId() == null) return false; if (other.getRouteTableId() != null && other.getRouteTableId().equals(this.getRouteTableId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getDestinationCidrBlock() == null) ? 0 : getDestinationCidrBlock().hashCode()); hashCode = prime * hashCode + ((getDestinationPrefixListId() == null) ? 0 : getDestinationPrefixListId().hashCode()); hashCode = prime * hashCode + ((getDestinationIpv6CidrBlock() == null) ? 0 : getDestinationIpv6CidrBlock().hashCode()); hashCode = prime * hashCode + ((getGatewayId() == null) ? 0 : getGatewayId().hashCode()); hashCode = prime * hashCode + ((getRouteTableId() == null) ? 0 : getRouteTableId().hashCode()); return hashCode; } @Override public EC2ReplaceRouteAction clone() { try { return (EC2ReplaceRouteAction) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.fms.model.transform.EC2ReplaceRouteActionMarshaller.getInstance().marshall(this, protocolMarshaller); } }