(instanceMessages);
}
/**
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInstanceMessages(java.util.Collection)} or {@link #withInstanceMessages(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param instanceMessages
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GatewayInstance withInstanceMessages(MessageDetail... instanceMessages) {
if (this.instanceMessages == null) {
setInstanceMessages(new java.util.ArrayList(instanceMessages.length));
}
for (MessageDetail ele : instanceMessages) {
this.instanceMessages.add(ele);
}
return this;
}
/**
* @param instanceMessages
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GatewayInstance withInstanceMessages(java.util.Collection instanceMessages) {
setInstanceMessages(instanceMessages);
return this;
}
/**
* The status of the instance.
*
* @param instanceState
* The status of the instance.
* @see InstanceState
*/
public void setInstanceState(String instanceState) {
this.instanceState = instanceState;
}
/**
* The status of the instance.
*
* @return The status of the instance.
* @see InstanceState
*/
public String getInstanceState() {
return this.instanceState;
}
/**
* The status of the instance.
*
* @param instanceState
* The status of the instance.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceState
*/
public GatewayInstance withInstanceState(String instanceState) {
setInstanceState(instanceState);
return this;
}
/**
* The status of the instance.
*
* @param instanceState
* The status of the instance.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceState
*/
public GatewayInstance withInstanceState(InstanceState instanceState) {
this.instanceState = instanceState.toString();
return this;
}
/**
* The running bridge count.
*
* @param runningBridgeCount
* The running bridge count.
*/
public void setRunningBridgeCount(Integer runningBridgeCount) {
this.runningBridgeCount = runningBridgeCount;
}
/**
* The running bridge count.
*
* @return The running bridge count.
*/
public Integer getRunningBridgeCount() {
return this.runningBridgeCount;
}
/**
* The running bridge count.
*
* @param runningBridgeCount
* The running bridge count.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GatewayInstance withRunningBridgeCount(Integer runningBridgeCount) {
setRunningBridgeCount(runningBridgeCount);
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 (getBridgePlacement() != null)
sb.append("BridgePlacement: ").append(getBridgePlacement()).append(",");
if (getConnectionStatus() != null)
sb.append("ConnectionStatus: ").append(getConnectionStatus()).append(",");
if (getGatewayArn() != null)
sb.append("GatewayArn: ").append(getGatewayArn()).append(",");
if (getGatewayInstanceArn() != null)
sb.append("GatewayInstanceArn: ").append(getGatewayInstanceArn()).append(",");
if (getInstanceId() != null)
sb.append("InstanceId: ").append(getInstanceId()).append(",");
if (getInstanceMessages() != null)
sb.append("InstanceMessages: ").append(getInstanceMessages()).append(",");
if (getInstanceState() != null)
sb.append("InstanceState: ").append(getInstanceState()).append(",");
if (getRunningBridgeCount() != null)
sb.append("RunningBridgeCount: ").append(getRunningBridgeCount());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GatewayInstance == false)
return false;
GatewayInstance other = (GatewayInstance) obj;
if (other.getBridgePlacement() == null ^ this.getBridgePlacement() == null)
return false;
if (other.getBridgePlacement() != null && other.getBridgePlacement().equals(this.getBridgePlacement()) == false)
return false;
if (other.getConnectionStatus() == null ^ this.getConnectionStatus() == null)
return false;
if (other.getConnectionStatus() != null && other.getConnectionStatus().equals(this.getConnectionStatus()) == false)
return false;
if (other.getGatewayArn() == null ^ this.getGatewayArn() == null)
return false;
if (other.getGatewayArn() != null && other.getGatewayArn().equals(this.getGatewayArn()) == false)
return false;
if (other.getGatewayInstanceArn() == null ^ this.getGatewayInstanceArn() == null)
return false;
if (other.getGatewayInstanceArn() != null && other.getGatewayInstanceArn().equals(this.getGatewayInstanceArn()) == false)
return false;
if (other.getInstanceId() == null ^ this.getInstanceId() == null)
return false;
if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false)
return false;
if (other.getInstanceMessages() == null ^ this.getInstanceMessages() == null)
return false;
if (other.getInstanceMessages() != null && other.getInstanceMessages().equals(this.getInstanceMessages()) == false)
return false;
if (other.getInstanceState() == null ^ this.getInstanceState() == null)
return false;
if (other.getInstanceState() != null && other.getInstanceState().equals(this.getInstanceState()) == false)
return false;
if (other.getRunningBridgeCount() == null ^ this.getRunningBridgeCount() == null)
return false;
if (other.getRunningBridgeCount() != null && other.getRunningBridgeCount().equals(this.getRunningBridgeCount()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getBridgePlacement() == null) ? 0 : getBridgePlacement().hashCode());
hashCode = prime * hashCode + ((getConnectionStatus() == null) ? 0 : getConnectionStatus().hashCode());
hashCode = prime * hashCode + ((getGatewayArn() == null) ? 0 : getGatewayArn().hashCode());
hashCode = prime * hashCode + ((getGatewayInstanceArn() == null) ? 0 : getGatewayInstanceArn().hashCode());
hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
hashCode = prime * hashCode + ((getInstanceMessages() == null) ? 0 : getInstanceMessages().hashCode());
hashCode = prime * hashCode + ((getInstanceState() == null) ? 0 : getInstanceState().hashCode());
hashCode = prime * hashCode + ((getRunningBridgeCount() == null) ? 0 : getRunningBridgeCount().hashCode());
return hashCode;
}
@Override
public GatewayInstance clone() {
try {
return (GatewayInstance) 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.mediaconnect.model.transform.GatewayInstanceMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}