com.amazonaws.services.ec2.model.PathComponent Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* Copyright 2017-2022 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 path component.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PathComponent implements Serializable, Cloneable {
/**
*
* The sequence number.
*
*/
private Integer sequenceNumber;
/**
*
* The network ACL rule.
*
*/
private AnalysisAclRule aclRule;
/**
*
* The resource to which the path component is attached.
*
*/
private AnalysisComponent attachedTo;
/**
*
* The component.
*
*/
private AnalysisComponent component;
/**
*
* The destination VPC.
*
*/
private AnalysisComponent destinationVpc;
/**
*
* The outbound header.
*
*/
private AnalysisPacketHeader outboundHeader;
/**
*
* The inbound header.
*
*/
private AnalysisPacketHeader inboundHeader;
/**
*
* The route table route.
*
*/
private AnalysisRouteTableRoute routeTableRoute;
/**
*
* The security group rule.
*
*/
private AnalysisSecurityGroupRule securityGroupRule;
/**
*
* The source VPC.
*
*/
private AnalysisComponent sourceVpc;
/**
*
* The subnet.
*
*/
private AnalysisComponent subnet;
/**
*
* The component VPC.
*
*/
private AnalysisComponent vpc;
/**
*
* The sequence number.
*
*
* @param sequenceNumber
* The sequence number.
*/
public void setSequenceNumber(Integer sequenceNumber) {
this.sequenceNumber = sequenceNumber;
}
/**
*
* The sequence number.
*
*
* @return The sequence number.
*/
public Integer getSequenceNumber() {
return this.sequenceNumber;
}
/**
*
* The sequence number.
*
*
* @param sequenceNumber
* The sequence number.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withSequenceNumber(Integer sequenceNumber) {
setSequenceNumber(sequenceNumber);
return this;
}
/**
*
* The network ACL rule.
*
*
* @param aclRule
* The network ACL rule.
*/
public void setAclRule(AnalysisAclRule aclRule) {
this.aclRule = aclRule;
}
/**
*
* The network ACL rule.
*
*
* @return The network ACL rule.
*/
public AnalysisAclRule getAclRule() {
return this.aclRule;
}
/**
*
* The network ACL rule.
*
*
* @param aclRule
* The network ACL rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withAclRule(AnalysisAclRule aclRule) {
setAclRule(aclRule);
return this;
}
/**
*
* The resource to which the path component is attached.
*
*
* @param attachedTo
* The resource to which the path component is attached.
*/
public void setAttachedTo(AnalysisComponent attachedTo) {
this.attachedTo = attachedTo;
}
/**
*
* The resource to which the path component is attached.
*
*
* @return The resource to which the path component is attached.
*/
public AnalysisComponent getAttachedTo() {
return this.attachedTo;
}
/**
*
* The resource to which the path component is attached.
*
*
* @param attachedTo
* The resource to which the path component is attached.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withAttachedTo(AnalysisComponent attachedTo) {
setAttachedTo(attachedTo);
return this;
}
/**
*
* The component.
*
*
* @param component
* The component.
*/
public void setComponent(AnalysisComponent component) {
this.component = component;
}
/**
*
* The component.
*
*
* @return The component.
*/
public AnalysisComponent getComponent() {
return this.component;
}
/**
*
* The component.
*
*
* @param component
* The component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withComponent(AnalysisComponent component) {
setComponent(component);
return this;
}
/**
*
* The destination VPC.
*
*
* @param destinationVpc
* The destination VPC.
*/
public void setDestinationVpc(AnalysisComponent destinationVpc) {
this.destinationVpc = destinationVpc;
}
/**
*
* The destination VPC.
*
*
* @return The destination VPC.
*/
public AnalysisComponent getDestinationVpc() {
return this.destinationVpc;
}
/**
*
* The destination VPC.
*
*
* @param destinationVpc
* The destination VPC.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withDestinationVpc(AnalysisComponent destinationVpc) {
setDestinationVpc(destinationVpc);
return this;
}
/**
*
* The outbound header.
*
*
* @param outboundHeader
* The outbound header.
*/
public void setOutboundHeader(AnalysisPacketHeader outboundHeader) {
this.outboundHeader = outboundHeader;
}
/**
*
* The outbound header.
*
*
* @return The outbound header.
*/
public AnalysisPacketHeader getOutboundHeader() {
return this.outboundHeader;
}
/**
*
* The outbound header.
*
*
* @param outboundHeader
* The outbound header.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withOutboundHeader(AnalysisPacketHeader outboundHeader) {
setOutboundHeader(outboundHeader);
return this;
}
/**
*
* The inbound header.
*
*
* @param inboundHeader
* The inbound header.
*/
public void setInboundHeader(AnalysisPacketHeader inboundHeader) {
this.inboundHeader = inboundHeader;
}
/**
*
* The inbound header.
*
*
* @return The inbound header.
*/
public AnalysisPacketHeader getInboundHeader() {
return this.inboundHeader;
}
/**
*
* The inbound header.
*
*
* @param inboundHeader
* The inbound header.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withInboundHeader(AnalysisPacketHeader inboundHeader) {
setInboundHeader(inboundHeader);
return this;
}
/**
*
* The route table route.
*
*
* @param routeTableRoute
* The route table route.
*/
public void setRouteTableRoute(AnalysisRouteTableRoute routeTableRoute) {
this.routeTableRoute = routeTableRoute;
}
/**
*
* The route table route.
*
*
* @return The route table route.
*/
public AnalysisRouteTableRoute getRouteTableRoute() {
return this.routeTableRoute;
}
/**
*
* The route table route.
*
*
* @param routeTableRoute
* The route table route.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withRouteTableRoute(AnalysisRouteTableRoute routeTableRoute) {
setRouteTableRoute(routeTableRoute);
return this;
}
/**
*
* The security group rule.
*
*
* @param securityGroupRule
* The security group rule.
*/
public void setSecurityGroupRule(AnalysisSecurityGroupRule securityGroupRule) {
this.securityGroupRule = securityGroupRule;
}
/**
*
* The security group rule.
*
*
* @return The security group rule.
*/
public AnalysisSecurityGroupRule getSecurityGroupRule() {
return this.securityGroupRule;
}
/**
*
* The security group rule.
*
*
* @param securityGroupRule
* The security group rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withSecurityGroupRule(AnalysisSecurityGroupRule securityGroupRule) {
setSecurityGroupRule(securityGroupRule);
return this;
}
/**
*
* The source VPC.
*
*
* @param sourceVpc
* The source VPC.
*/
public void setSourceVpc(AnalysisComponent sourceVpc) {
this.sourceVpc = sourceVpc;
}
/**
*
* The source VPC.
*
*
* @return The source VPC.
*/
public AnalysisComponent getSourceVpc() {
return this.sourceVpc;
}
/**
*
* The source VPC.
*
*
* @param sourceVpc
* The source VPC.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withSourceVpc(AnalysisComponent sourceVpc) {
setSourceVpc(sourceVpc);
return this;
}
/**
*
* The subnet.
*
*
* @param subnet
* The subnet.
*/
public void setSubnet(AnalysisComponent subnet) {
this.subnet = subnet;
}
/**
*
* The subnet.
*
*
* @return The subnet.
*/
public AnalysisComponent getSubnet() {
return this.subnet;
}
/**
*
* The subnet.
*
*
* @param subnet
* The subnet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withSubnet(AnalysisComponent subnet) {
setSubnet(subnet);
return this;
}
/**
*
* The component VPC.
*
*
* @param vpc
* The component VPC.
*/
public void setVpc(AnalysisComponent vpc) {
this.vpc = vpc;
}
/**
*
* The component VPC.
*
*
* @return The component VPC.
*/
public AnalysisComponent getVpc() {
return this.vpc;
}
/**
*
* The component VPC.
*
*
* @param vpc
* The component VPC.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PathComponent withVpc(AnalysisComponent vpc) {
setVpc(vpc);
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 (getSequenceNumber() != null)
sb.append("SequenceNumber: ").append(getSequenceNumber()).append(",");
if (getAclRule() != null)
sb.append("AclRule: ").append(getAclRule()).append(",");
if (getAttachedTo() != null)
sb.append("AttachedTo: ").append(getAttachedTo()).append(",");
if (getComponent() != null)
sb.append("Component: ").append(getComponent()).append(",");
if (getDestinationVpc() != null)
sb.append("DestinationVpc: ").append(getDestinationVpc()).append(",");
if (getOutboundHeader() != null)
sb.append("OutboundHeader: ").append(getOutboundHeader()).append(",");
if (getInboundHeader() != null)
sb.append("InboundHeader: ").append(getInboundHeader()).append(",");
if (getRouteTableRoute() != null)
sb.append("RouteTableRoute: ").append(getRouteTableRoute()).append(",");
if (getSecurityGroupRule() != null)
sb.append("SecurityGroupRule: ").append(getSecurityGroupRule()).append(",");
if (getSourceVpc() != null)
sb.append("SourceVpc: ").append(getSourceVpc()).append(",");
if (getSubnet() != null)
sb.append("Subnet: ").append(getSubnet()).append(",");
if (getVpc() != null)
sb.append("Vpc: ").append(getVpc());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PathComponent == false)
return false;
PathComponent other = (PathComponent) obj;
if (other.getSequenceNumber() == null ^ this.getSequenceNumber() == null)
return false;
if (other.getSequenceNumber() != null && other.getSequenceNumber().equals(this.getSequenceNumber()) == false)
return false;
if (other.getAclRule() == null ^ this.getAclRule() == null)
return false;
if (other.getAclRule() != null && other.getAclRule().equals(this.getAclRule()) == false)
return false;
if (other.getAttachedTo() == null ^ this.getAttachedTo() == null)
return false;
if (other.getAttachedTo() != null && other.getAttachedTo().equals(this.getAttachedTo()) == false)
return false;
if (other.getComponent() == null ^ this.getComponent() == null)
return false;
if (other.getComponent() != null && other.getComponent().equals(this.getComponent()) == false)
return false;
if (other.getDestinationVpc() == null ^ this.getDestinationVpc() == null)
return false;
if (other.getDestinationVpc() != null && other.getDestinationVpc().equals(this.getDestinationVpc()) == false)
return false;
if (other.getOutboundHeader() == null ^ this.getOutboundHeader() == null)
return false;
if (other.getOutboundHeader() != null && other.getOutboundHeader().equals(this.getOutboundHeader()) == false)
return false;
if (other.getInboundHeader() == null ^ this.getInboundHeader() == null)
return false;
if (other.getInboundHeader() != null && other.getInboundHeader().equals(this.getInboundHeader()) == false)
return false;
if (other.getRouteTableRoute() == null ^ this.getRouteTableRoute() == null)
return false;
if (other.getRouteTableRoute() != null && other.getRouteTableRoute().equals(this.getRouteTableRoute()) == false)
return false;
if (other.getSecurityGroupRule() == null ^ this.getSecurityGroupRule() == null)
return false;
if (other.getSecurityGroupRule() != null && other.getSecurityGroupRule().equals(this.getSecurityGroupRule()) == false)
return false;
if (other.getSourceVpc() == null ^ this.getSourceVpc() == null)
return false;
if (other.getSourceVpc() != null && other.getSourceVpc().equals(this.getSourceVpc()) == false)
return false;
if (other.getSubnet() == null ^ this.getSubnet() == null)
return false;
if (other.getSubnet() != null && other.getSubnet().equals(this.getSubnet()) == false)
return false;
if (other.getVpc() == null ^ this.getVpc() == null)
return false;
if (other.getVpc() != null && other.getVpc().equals(this.getVpc()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSequenceNumber() == null) ? 0 : getSequenceNumber().hashCode());
hashCode = prime * hashCode + ((getAclRule() == null) ? 0 : getAclRule().hashCode());
hashCode = prime * hashCode + ((getAttachedTo() == null) ? 0 : getAttachedTo().hashCode());
hashCode = prime * hashCode + ((getComponent() == null) ? 0 : getComponent().hashCode());
hashCode = prime * hashCode + ((getDestinationVpc() == null) ? 0 : getDestinationVpc().hashCode());
hashCode = prime * hashCode + ((getOutboundHeader() == null) ? 0 : getOutboundHeader().hashCode());
hashCode = prime * hashCode + ((getInboundHeader() == null) ? 0 : getInboundHeader().hashCode());
hashCode = prime * hashCode + ((getRouteTableRoute() == null) ? 0 : getRouteTableRoute().hashCode());
hashCode = prime * hashCode + ((getSecurityGroupRule() == null) ? 0 : getSecurityGroupRule().hashCode());
hashCode = prime * hashCode + ((getSourceVpc() == null) ? 0 : getSourceVpc().hashCode());
hashCode = prime * hashCode + ((getSubnet() == null) ? 0 : getSubnet().hashCode());
hashCode = prime * hashCode + ((getVpc() == null) ? 0 : getVpc().hashCode());
return hashCode;
}
@Override
public PathComponent clone() {
try {
return (PathComponent) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}