com.amazonaws.services.securityhub.model.AwsEc2RouteTableDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub Show documentation
/*
* 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.securityhub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides details about a route table for the specified VPC.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AwsEc2RouteTableDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The associations between a route table and one or more subnets or a gateway.
*
*/
private java.util.List associationSet;
/**
*
* The ID of the Amazon Web Services account that owns the route table.
*
*/
private String ownerId;
/**
*
* Describes a virtual private gateway propagating route.
*
*/
private java.util.List propagatingVgwSet;
/**
*
* The ID of the route table.
*
*/
private String routeTableId;
/**
*
* The routes in the route table.
*
*/
private java.util.List routeSet;
/**
*
* The ID of the virtual private cloud (VPC).
*
*/
private String vpcId;
/**
*
* The associations between a route table and one or more subnets or a gateway.
*
*
* @return The associations between a route table and one or more subnets or a gateway.
*/
public java.util.List getAssociationSet() {
return associationSet;
}
/**
*
* The associations between a route table and one or more subnets or a gateway.
*
*
* @param associationSet
* The associations between a route table and one or more subnets or a gateway.
*/
public void setAssociationSet(java.util.Collection associationSet) {
if (associationSet == null) {
this.associationSet = null;
return;
}
this.associationSet = new java.util.ArrayList(associationSet);
}
/**
*
* The associations between a route table and one or more subnets or a gateway.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAssociationSet(java.util.Collection)} or {@link #withAssociationSet(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param associationSet
* The associations between a route table and one or more subnets or a gateway.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEc2RouteTableDetails withAssociationSet(AssociationSetDetails... associationSet) {
if (this.associationSet == null) {
setAssociationSet(new java.util.ArrayList(associationSet.length));
}
for (AssociationSetDetails ele : associationSet) {
this.associationSet.add(ele);
}
return this;
}
/**
*
* The associations between a route table and one or more subnets or a gateway.
*
*
* @param associationSet
* The associations between a route table and one or more subnets or a gateway.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEc2RouteTableDetails withAssociationSet(java.util.Collection associationSet) {
setAssociationSet(associationSet);
return this;
}
/**
*
* The ID of the Amazon Web Services account that owns the route table.
*
*
* @param ownerId
* The ID of the Amazon Web Services account that owns the route table.
*/
public void setOwnerId(String ownerId) {
this.ownerId = ownerId;
}
/**
*
* The ID of the Amazon Web Services account that owns the route table.
*
*
* @return The ID of the Amazon Web Services account that owns the route table.
*/
public String getOwnerId() {
return this.ownerId;
}
/**
*
* The ID of the Amazon Web Services account that owns the route table.
*
*
* @param ownerId
* The ID of the Amazon Web Services account that owns the route table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEc2RouteTableDetails withOwnerId(String ownerId) {
setOwnerId(ownerId);
return this;
}
/**
*
* Describes a virtual private gateway propagating route.
*
*
* @return Describes a virtual private gateway propagating route.
*/
public java.util.List getPropagatingVgwSet() {
return propagatingVgwSet;
}
/**
*
* Describes a virtual private gateway propagating route.
*
*
* @param propagatingVgwSet
* Describes a virtual private gateway propagating route.
*/
public void setPropagatingVgwSet(java.util.Collection propagatingVgwSet) {
if (propagatingVgwSet == null) {
this.propagatingVgwSet = null;
return;
}
this.propagatingVgwSet = new java.util.ArrayList(propagatingVgwSet);
}
/**
*
* Describes a virtual private gateway propagating route.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setPropagatingVgwSet(java.util.Collection)} or {@link #withPropagatingVgwSet(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param propagatingVgwSet
* Describes a virtual private gateway propagating route.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEc2RouteTableDetails withPropagatingVgwSet(PropagatingVgwSetDetails... propagatingVgwSet) {
if (this.propagatingVgwSet == null) {
setPropagatingVgwSet(new java.util.ArrayList(propagatingVgwSet.length));
}
for (PropagatingVgwSetDetails ele : propagatingVgwSet) {
this.propagatingVgwSet.add(ele);
}
return this;
}
/**
*
* Describes a virtual private gateway propagating route.
*
*
* @param propagatingVgwSet
* Describes a virtual private gateway propagating route.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEc2RouteTableDetails withPropagatingVgwSet(java.util.Collection propagatingVgwSet) {
setPropagatingVgwSet(propagatingVgwSet);
return this;
}
/**
*
* The ID of the route table.
*
*
* @param routeTableId
* The ID of the route table.
*/
public void setRouteTableId(String routeTableId) {
this.routeTableId = routeTableId;
}
/**
*
* The ID of the route table.
*
*
* @return The ID of the route table.
*/
public String getRouteTableId() {
return this.routeTableId;
}
/**
*
* The ID of the route table.
*
*
* @param routeTableId
* The ID of the route table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEc2RouteTableDetails withRouteTableId(String routeTableId) {
setRouteTableId(routeTableId);
return this;
}
/**
*
* The routes in the route table.
*
*
* @return The routes in the route table.
*/
public java.util.List getRouteSet() {
return routeSet;
}
/**
*
* The routes in the route table.
*
*
* @param routeSet
* The routes in the route table.
*/
public void setRouteSet(java.util.Collection routeSet) {
if (routeSet == null) {
this.routeSet = null;
return;
}
this.routeSet = new java.util.ArrayList(routeSet);
}
/**
*
* The routes in the route table.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRouteSet(java.util.Collection)} or {@link #withRouteSet(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param routeSet
* The routes in the route table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEc2RouteTableDetails withRouteSet(RouteSetDetails... routeSet) {
if (this.routeSet == null) {
setRouteSet(new java.util.ArrayList(routeSet.length));
}
for (RouteSetDetails ele : routeSet) {
this.routeSet.add(ele);
}
return this;
}
/**
*
* The routes in the route table.
*
*
* @param routeSet
* The routes in the route table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEc2RouteTableDetails withRouteSet(java.util.Collection routeSet) {
setRouteSet(routeSet);
return this;
}
/**
*
* The ID of the virtual private cloud (VPC).
*
*
* @param vpcId
* The ID of the virtual private cloud (VPC).
*/
public void setVpcId(String vpcId) {
this.vpcId = vpcId;
}
/**
*
* The ID of the virtual private cloud (VPC).
*
*
* @return The ID of the virtual private cloud (VPC).
*/
public String getVpcId() {
return this.vpcId;
}
/**
*
* The ID of the virtual private cloud (VPC).
*
*
* @param vpcId
* The ID of the virtual private cloud (VPC).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEc2RouteTableDetails withVpcId(String vpcId) {
setVpcId(vpcId);
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 (getAssociationSet() != null)
sb.append("AssociationSet: ").append(getAssociationSet()).append(",");
if (getOwnerId() != null)
sb.append("OwnerId: ").append(getOwnerId()).append(",");
if (getPropagatingVgwSet() != null)
sb.append("PropagatingVgwSet: ").append(getPropagatingVgwSet()).append(",");
if (getRouteTableId() != null)
sb.append("RouteTableId: ").append(getRouteTableId()).append(",");
if (getRouteSet() != null)
sb.append("RouteSet: ").append(getRouteSet()).append(",");
if (getVpcId() != null)
sb.append("VpcId: ").append(getVpcId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AwsEc2RouteTableDetails == false)
return false;
AwsEc2RouteTableDetails other = (AwsEc2RouteTableDetails) obj;
if (other.getAssociationSet() == null ^ this.getAssociationSet() == null)
return false;
if (other.getAssociationSet() != null && other.getAssociationSet().equals(this.getAssociationSet()) == 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.getPropagatingVgwSet() == null ^ this.getPropagatingVgwSet() == null)
return false;
if (other.getPropagatingVgwSet() != null && other.getPropagatingVgwSet().equals(this.getPropagatingVgwSet()) == false)
return false;
if (other.getRouteTableId() == null ^ this.getRouteTableId() == null)
return false;
if (other.getRouteTableId() != null && other.getRouteTableId().equals(this.getRouteTableId()) == false)
return false;
if (other.getRouteSet() == null ^ this.getRouteSet() == null)
return false;
if (other.getRouteSet() != null && other.getRouteSet().equals(this.getRouteSet()) == false)
return false;
if (other.getVpcId() == null ^ this.getVpcId() == null)
return false;
if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAssociationSet() == null) ? 0 : getAssociationSet().hashCode());
hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode());
hashCode = prime * hashCode + ((getPropagatingVgwSet() == null) ? 0 : getPropagatingVgwSet().hashCode());
hashCode = prime * hashCode + ((getRouteTableId() == null) ? 0 : getRouteTableId().hashCode());
hashCode = prime * hashCode + ((getRouteSet() == null) ? 0 : getRouteSet().hashCode());
hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode());
return hashCode;
}
@Override
public AwsEc2RouteTableDetails clone() {
try {
return (AwsEc2RouteTableDetails) 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.securityhub.model.transform.AwsEc2RouteTableDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}