(outputs);
}
/**
* The outputs that you want to add to this bridge.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setOutputs(java.util.Collection)} or {@link #withOutputs(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param outputs
* The outputs that you want to add to this bridge.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateBridgeRequest withOutputs(AddBridgeOutputRequest... outputs) {
if (this.outputs == null) {
setOutputs(new java.util.ArrayList(outputs.length));
}
for (AddBridgeOutputRequest ele : outputs) {
this.outputs.add(ele);
}
return this;
}
/**
* The outputs that you want to add to this bridge.
*
* @param outputs
* The outputs that you want to add to this bridge.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateBridgeRequest withOutputs(java.util.Collection outputs) {
setOutputs(outputs);
return this;
}
/**
* The bridge placement Amazon Resource Number (ARN).
*
* @param placementArn
* The bridge placement Amazon Resource Number (ARN).
*/
public void setPlacementArn(String placementArn) {
this.placementArn = placementArn;
}
/**
* The bridge placement Amazon Resource Number (ARN).
*
* @return The bridge placement Amazon Resource Number (ARN).
*/
public String getPlacementArn() {
return this.placementArn;
}
/**
* The bridge placement Amazon Resource Number (ARN).
*
* @param placementArn
* The bridge placement Amazon Resource Number (ARN).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateBridgeRequest withPlacementArn(String placementArn) {
setPlacementArn(placementArn);
return this;
}
/**
* The settings for source failover.
*
* @param sourceFailoverConfig
* The settings for source failover.
*/
public void setSourceFailoverConfig(FailoverConfig sourceFailoverConfig) {
this.sourceFailoverConfig = sourceFailoverConfig;
}
/**
* The settings for source failover.
*
* @return The settings for source failover.
*/
public FailoverConfig getSourceFailoverConfig() {
return this.sourceFailoverConfig;
}
/**
* The settings for source failover.
*
* @param sourceFailoverConfig
* The settings for source failover.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateBridgeRequest withSourceFailoverConfig(FailoverConfig sourceFailoverConfig) {
setSourceFailoverConfig(sourceFailoverConfig);
return this;
}
/**
* The sources that you want to add to this bridge.
*
* @return The sources that you want to add to this bridge.
*/
public java.util.List getSources() {
return sources;
}
/**
* The sources that you want to add to this bridge.
*
* @param sources
* The sources that you want to add to this bridge.
*/
public void setSources(java.util.Collection sources) {
if (sources == null) {
this.sources = null;
return;
}
this.sources = new java.util.ArrayList(sources);
}
/**
* The sources that you want to add to this bridge.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSources(java.util.Collection)} or {@link #withSources(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param sources
* The sources that you want to add to this bridge.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateBridgeRequest withSources(AddBridgeSourceRequest... sources) {
if (this.sources == null) {
setSources(new java.util.ArrayList(sources.length));
}
for (AddBridgeSourceRequest ele : sources) {
this.sources.add(ele);
}
return this;
}
/**
* The sources that you want to add to this bridge.
*
* @param sources
* The sources that you want to add to this bridge.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateBridgeRequest withSources(java.util.Collection sources) {
setSources(sources);
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 (getEgressGatewayBridge() != null)
sb.append("EgressGatewayBridge: ").append(getEgressGatewayBridge()).append(",");
if (getIngressGatewayBridge() != null)
sb.append("IngressGatewayBridge: ").append(getIngressGatewayBridge()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getOutputs() != null)
sb.append("Outputs: ").append(getOutputs()).append(",");
if (getPlacementArn() != null)
sb.append("PlacementArn: ").append(getPlacementArn()).append(",");
if (getSourceFailoverConfig() != null)
sb.append("SourceFailoverConfig: ").append(getSourceFailoverConfig()).append(",");
if (getSources() != null)
sb.append("Sources: ").append(getSources());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateBridgeRequest == false)
return false;
CreateBridgeRequest other = (CreateBridgeRequest) obj;
if (other.getEgressGatewayBridge() == null ^ this.getEgressGatewayBridge() == null)
return false;
if (other.getEgressGatewayBridge() != null && other.getEgressGatewayBridge().equals(this.getEgressGatewayBridge()) == false)
return false;
if (other.getIngressGatewayBridge() == null ^ this.getIngressGatewayBridge() == null)
return false;
if (other.getIngressGatewayBridge() != null && other.getIngressGatewayBridge().equals(this.getIngressGatewayBridge()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getOutputs() == null ^ this.getOutputs() == null)
return false;
if (other.getOutputs() != null && other.getOutputs().equals(this.getOutputs()) == false)
return false;
if (other.getPlacementArn() == null ^ this.getPlacementArn() == null)
return false;
if (other.getPlacementArn() != null && other.getPlacementArn().equals(this.getPlacementArn()) == false)
return false;
if (other.getSourceFailoverConfig() == null ^ this.getSourceFailoverConfig() == null)
return false;
if (other.getSourceFailoverConfig() != null && other.getSourceFailoverConfig().equals(this.getSourceFailoverConfig()) == false)
return false;
if (other.getSources() == null ^ this.getSources() == null)
return false;
if (other.getSources() != null && other.getSources().equals(this.getSources()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEgressGatewayBridge() == null) ? 0 : getEgressGatewayBridge().hashCode());
hashCode = prime * hashCode + ((getIngressGatewayBridge() == null) ? 0 : getIngressGatewayBridge().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getOutputs() == null) ? 0 : getOutputs().hashCode());
hashCode = prime * hashCode + ((getPlacementArn() == null) ? 0 : getPlacementArn().hashCode());
hashCode = prime * hashCode + ((getSourceFailoverConfig() == null) ? 0 : getSourceFailoverConfig().hashCode());
hashCode = prime * hashCode + ((getSources() == null) ? 0 : getSources().hashCode());
return hashCode;
}
@Override
public CreateBridgeRequest clone() {
return (CreateBridgeRequest) super.clone();
}
}