![JAR search and dependency download from the Maven repository](/logo.png)
com.amazonaws.services.ec2.model.AdditionalDetail 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;
/**
*
* Describes an additional detail for a path analysis. For more information, see Reachability Analyzer
* additional detail codes.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AdditionalDetail implements Serializable, Cloneable {
/**
*
* The additional detail code.
*
*/
private String additionalDetailType;
/**
*
* The path component.
*
*/
private AnalysisComponent component;
/**
*
* The VPC endpoint service.
*
*/
private AnalysisComponent vpcEndpointService;
/**
*
* The rule options.
*
*/
private com.amazonaws.internal.SdkInternalList ruleOptions;
/**
*
* The rule group type.
*
*/
private com.amazonaws.internal.SdkInternalList ruleGroupTypePairs;
/**
*
* The rule options.
*
*/
private com.amazonaws.internal.SdkInternalList ruleGroupRuleOptionsPairs;
/**
*
* The name of the VPC endpoint service.
*
*/
private String serviceName;
/**
*
* The load balancers.
*
*/
private com.amazonaws.internal.SdkInternalList loadBalancers;
/**
*
* The additional detail code.
*
*
* @param additionalDetailType
* The additional detail code.
*/
public void setAdditionalDetailType(String additionalDetailType) {
this.additionalDetailType = additionalDetailType;
}
/**
*
* The additional detail code.
*
*
* @return The additional detail code.
*/
public String getAdditionalDetailType() {
return this.additionalDetailType;
}
/**
*
* The additional detail code.
*
*
* @param additionalDetailType
* The additional detail code.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withAdditionalDetailType(String additionalDetailType) {
setAdditionalDetailType(additionalDetailType);
return this;
}
/**
*
* The path component.
*
*
* @param component
* The path component.
*/
public void setComponent(AnalysisComponent component) {
this.component = component;
}
/**
*
* The path component.
*
*
* @return The path component.
*/
public AnalysisComponent getComponent() {
return this.component;
}
/**
*
* The path component.
*
*
* @param component
* The path component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withComponent(AnalysisComponent component) {
setComponent(component);
return this;
}
/**
*
* The VPC endpoint service.
*
*
* @param vpcEndpointService
* The VPC endpoint service.
*/
public void setVpcEndpointService(AnalysisComponent vpcEndpointService) {
this.vpcEndpointService = vpcEndpointService;
}
/**
*
* The VPC endpoint service.
*
*
* @return The VPC endpoint service.
*/
public AnalysisComponent getVpcEndpointService() {
return this.vpcEndpointService;
}
/**
*
* The VPC endpoint service.
*
*
* @param vpcEndpointService
* The VPC endpoint service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withVpcEndpointService(AnalysisComponent vpcEndpointService) {
setVpcEndpointService(vpcEndpointService);
return this;
}
/**
*
* The rule options.
*
*
* @return The rule options.
*/
public java.util.List getRuleOptions() {
if (ruleOptions == null) {
ruleOptions = new com.amazonaws.internal.SdkInternalList();
}
return ruleOptions;
}
/**
*
* The rule options.
*
*
* @param ruleOptions
* The rule options.
*/
public void setRuleOptions(java.util.Collection ruleOptions) {
if (ruleOptions == null) {
this.ruleOptions = null;
return;
}
this.ruleOptions = new com.amazonaws.internal.SdkInternalList(ruleOptions);
}
/**
*
* The rule options.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRuleOptions(java.util.Collection)} or {@link #withRuleOptions(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param ruleOptions
* The rule options.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withRuleOptions(RuleOption... ruleOptions) {
if (this.ruleOptions == null) {
setRuleOptions(new com.amazonaws.internal.SdkInternalList(ruleOptions.length));
}
for (RuleOption ele : ruleOptions) {
this.ruleOptions.add(ele);
}
return this;
}
/**
*
* The rule options.
*
*
* @param ruleOptions
* The rule options.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withRuleOptions(java.util.Collection ruleOptions) {
setRuleOptions(ruleOptions);
return this;
}
/**
*
* The rule group type.
*
*
* @return The rule group type.
*/
public java.util.List getRuleGroupTypePairs() {
if (ruleGroupTypePairs == null) {
ruleGroupTypePairs = new com.amazonaws.internal.SdkInternalList();
}
return ruleGroupTypePairs;
}
/**
*
* The rule group type.
*
*
* @param ruleGroupTypePairs
* The rule group type.
*/
public void setRuleGroupTypePairs(java.util.Collection ruleGroupTypePairs) {
if (ruleGroupTypePairs == null) {
this.ruleGroupTypePairs = null;
return;
}
this.ruleGroupTypePairs = new com.amazonaws.internal.SdkInternalList(ruleGroupTypePairs);
}
/**
*
* The rule group type.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRuleGroupTypePairs(java.util.Collection)} or {@link #withRuleGroupTypePairs(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param ruleGroupTypePairs
* The rule group type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withRuleGroupTypePairs(RuleGroupTypePair... ruleGroupTypePairs) {
if (this.ruleGroupTypePairs == null) {
setRuleGroupTypePairs(new com.amazonaws.internal.SdkInternalList(ruleGroupTypePairs.length));
}
for (RuleGroupTypePair ele : ruleGroupTypePairs) {
this.ruleGroupTypePairs.add(ele);
}
return this;
}
/**
*
* The rule group type.
*
*
* @param ruleGroupTypePairs
* The rule group type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withRuleGroupTypePairs(java.util.Collection ruleGroupTypePairs) {
setRuleGroupTypePairs(ruleGroupTypePairs);
return this;
}
/**
*
* The rule options.
*
*
* @return The rule options.
*/
public java.util.List getRuleGroupRuleOptionsPairs() {
if (ruleGroupRuleOptionsPairs == null) {
ruleGroupRuleOptionsPairs = new com.amazonaws.internal.SdkInternalList();
}
return ruleGroupRuleOptionsPairs;
}
/**
*
* The rule options.
*
*
* @param ruleGroupRuleOptionsPairs
* The rule options.
*/
public void setRuleGroupRuleOptionsPairs(java.util.Collection ruleGroupRuleOptionsPairs) {
if (ruleGroupRuleOptionsPairs == null) {
this.ruleGroupRuleOptionsPairs = null;
return;
}
this.ruleGroupRuleOptionsPairs = new com.amazonaws.internal.SdkInternalList(ruleGroupRuleOptionsPairs);
}
/**
*
* The rule options.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRuleGroupRuleOptionsPairs(java.util.Collection)} or
* {@link #withRuleGroupRuleOptionsPairs(java.util.Collection)} if you want to override the existing values.
*
*
* @param ruleGroupRuleOptionsPairs
* The rule options.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withRuleGroupRuleOptionsPairs(RuleGroupRuleOptionsPair... ruleGroupRuleOptionsPairs) {
if (this.ruleGroupRuleOptionsPairs == null) {
setRuleGroupRuleOptionsPairs(new com.amazonaws.internal.SdkInternalList(ruleGroupRuleOptionsPairs.length));
}
for (RuleGroupRuleOptionsPair ele : ruleGroupRuleOptionsPairs) {
this.ruleGroupRuleOptionsPairs.add(ele);
}
return this;
}
/**
*
* The rule options.
*
*
* @param ruleGroupRuleOptionsPairs
* The rule options.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withRuleGroupRuleOptionsPairs(java.util.Collection ruleGroupRuleOptionsPairs) {
setRuleGroupRuleOptionsPairs(ruleGroupRuleOptionsPairs);
return this;
}
/**
*
* The name of the VPC endpoint service.
*
*
* @param serviceName
* The name of the VPC endpoint service.
*/
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
/**
*
* The name of the VPC endpoint service.
*
*
* @return The name of the VPC endpoint service.
*/
public String getServiceName() {
return this.serviceName;
}
/**
*
* The name of the VPC endpoint service.
*
*
* @param serviceName
* The name of the VPC endpoint service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withServiceName(String serviceName) {
setServiceName(serviceName);
return this;
}
/**
*
* The load balancers.
*
*
* @return The load balancers.
*/
public java.util.List getLoadBalancers() {
if (loadBalancers == null) {
loadBalancers = new com.amazonaws.internal.SdkInternalList();
}
return loadBalancers;
}
/**
*
* The load balancers.
*
*
* @param loadBalancers
* The load balancers.
*/
public void setLoadBalancers(java.util.Collection loadBalancers) {
if (loadBalancers == null) {
this.loadBalancers = null;
return;
}
this.loadBalancers = new com.amazonaws.internal.SdkInternalList(loadBalancers);
}
/**
*
* The load balancers.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLoadBalancers(java.util.Collection)} or {@link #withLoadBalancers(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param loadBalancers
* The load balancers.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withLoadBalancers(AnalysisComponent... loadBalancers) {
if (this.loadBalancers == null) {
setLoadBalancers(new com.amazonaws.internal.SdkInternalList(loadBalancers.length));
}
for (AnalysisComponent ele : loadBalancers) {
this.loadBalancers.add(ele);
}
return this;
}
/**
*
* The load balancers.
*
*
* @param loadBalancers
* The load balancers.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalDetail withLoadBalancers(java.util.Collection loadBalancers) {
setLoadBalancers(loadBalancers);
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 (getAdditionalDetailType() != null)
sb.append("AdditionalDetailType: ").append(getAdditionalDetailType()).append(",");
if (getComponent() != null)
sb.append("Component: ").append(getComponent()).append(",");
if (getVpcEndpointService() != null)
sb.append("VpcEndpointService: ").append(getVpcEndpointService()).append(",");
if (getRuleOptions() != null)
sb.append("RuleOptions: ").append(getRuleOptions()).append(",");
if (getRuleGroupTypePairs() != null)
sb.append("RuleGroupTypePairs: ").append(getRuleGroupTypePairs()).append(",");
if (getRuleGroupRuleOptionsPairs() != null)
sb.append("RuleGroupRuleOptionsPairs: ").append(getRuleGroupRuleOptionsPairs()).append(",");
if (getServiceName() != null)
sb.append("ServiceName: ").append(getServiceName()).append(",");
if (getLoadBalancers() != null)
sb.append("LoadBalancers: ").append(getLoadBalancers());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AdditionalDetail == false)
return false;
AdditionalDetail other = (AdditionalDetail) obj;
if (other.getAdditionalDetailType() == null ^ this.getAdditionalDetailType() == null)
return false;
if (other.getAdditionalDetailType() != null && other.getAdditionalDetailType().equals(this.getAdditionalDetailType()) == 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.getVpcEndpointService() == null ^ this.getVpcEndpointService() == null)
return false;
if (other.getVpcEndpointService() != null && other.getVpcEndpointService().equals(this.getVpcEndpointService()) == false)
return false;
if (other.getRuleOptions() == null ^ this.getRuleOptions() == null)
return false;
if (other.getRuleOptions() != null && other.getRuleOptions().equals(this.getRuleOptions()) == false)
return false;
if (other.getRuleGroupTypePairs() == null ^ this.getRuleGroupTypePairs() == null)
return false;
if (other.getRuleGroupTypePairs() != null && other.getRuleGroupTypePairs().equals(this.getRuleGroupTypePairs()) == false)
return false;
if (other.getRuleGroupRuleOptionsPairs() == null ^ this.getRuleGroupRuleOptionsPairs() == null)
return false;
if (other.getRuleGroupRuleOptionsPairs() != null && other.getRuleGroupRuleOptionsPairs().equals(this.getRuleGroupRuleOptionsPairs()) == false)
return false;
if (other.getServiceName() == null ^ this.getServiceName() == null)
return false;
if (other.getServiceName() != null && other.getServiceName().equals(this.getServiceName()) == false)
return false;
if (other.getLoadBalancers() == null ^ this.getLoadBalancers() == null)
return false;
if (other.getLoadBalancers() != null && other.getLoadBalancers().equals(this.getLoadBalancers()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAdditionalDetailType() == null) ? 0 : getAdditionalDetailType().hashCode());
hashCode = prime * hashCode + ((getComponent() == null) ? 0 : getComponent().hashCode());
hashCode = prime * hashCode + ((getVpcEndpointService() == null) ? 0 : getVpcEndpointService().hashCode());
hashCode = prime * hashCode + ((getRuleOptions() == null) ? 0 : getRuleOptions().hashCode());
hashCode = prime * hashCode + ((getRuleGroupTypePairs() == null) ? 0 : getRuleGroupTypePairs().hashCode());
hashCode = prime * hashCode + ((getRuleGroupRuleOptionsPairs() == null) ? 0 : getRuleGroupRuleOptionsPairs().hashCode());
hashCode = prime * hashCode + ((getServiceName() == null) ? 0 : getServiceName().hashCode());
hashCode = prime * hashCode + ((getLoadBalancers() == null) ? 0 : getLoadBalancers().hashCode());
return hashCode;
}
@Override
public AdditionalDetail clone() {
try {
return (AdditionalDetail) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}