(securityGroupIds);
}
/**
* Security Group IDs to be used on ENI.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSecurityGroupIds(java.util.Collection)} or {@link #withSecurityGroupIds(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param securityGroupIds
* Security Group IDs to be used on ENI.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcInterfaceRequest withSecurityGroupIds(String... securityGroupIds) {
if (this.securityGroupIds == null) {
setSecurityGroupIds(new java.util.ArrayList(securityGroupIds.length));
}
for (String ele : securityGroupIds) {
this.securityGroupIds.add(ele);
}
return this;
}
/**
* Security Group IDs to be used on ENI.
*
* @param securityGroupIds
* Security Group IDs to be used on ENI.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcInterfaceRequest withSecurityGroupIds(java.util.Collection securityGroupIds) {
setSecurityGroupIds(securityGroupIds);
return this;
}
/**
* Subnet must be in the AZ of the Flow
*
* @param subnetId
* Subnet must be in the AZ of the Flow
*/
public void setSubnetId(String subnetId) {
this.subnetId = subnetId;
}
/**
* Subnet must be in the AZ of the Flow
*
* @return Subnet must be in the AZ of the Flow
*/
public String getSubnetId() {
return this.subnetId;
}
/**
* Subnet must be in the AZ of the Flow
*
* @param subnetId
* Subnet must be in the AZ of the Flow
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcInterfaceRequest withSubnetId(String subnetId) {
setSubnetId(subnetId);
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 (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getNetworkInterfaceType() != null)
sb.append("NetworkInterfaceType: ").append(getNetworkInterfaceType()).append(",");
if (getRoleArn() != null)
sb.append("RoleArn: ").append(getRoleArn()).append(",");
if (getSecurityGroupIds() != null)
sb.append("SecurityGroupIds: ").append(getSecurityGroupIds()).append(",");
if (getSubnetId() != null)
sb.append("SubnetId: ").append(getSubnetId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof VpcInterfaceRequest == false)
return false;
VpcInterfaceRequest other = (VpcInterfaceRequest) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getNetworkInterfaceType() == null ^ this.getNetworkInterfaceType() == null)
return false;
if (other.getNetworkInterfaceType() != null && other.getNetworkInterfaceType().equals(this.getNetworkInterfaceType()) == false)
return false;
if (other.getRoleArn() == null ^ this.getRoleArn() == null)
return false;
if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
return false;
if (other.getSecurityGroupIds() == null ^ this.getSecurityGroupIds() == null)
return false;
if (other.getSecurityGroupIds() != null && other.getSecurityGroupIds().equals(this.getSecurityGroupIds()) == false)
return false;
if (other.getSubnetId() == null ^ this.getSubnetId() == null)
return false;
if (other.getSubnetId() != null && other.getSubnetId().equals(this.getSubnetId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getNetworkInterfaceType() == null) ? 0 : getNetworkInterfaceType().hashCode());
hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
hashCode = prime * hashCode + ((getSecurityGroupIds() == null) ? 0 : getSecurityGroupIds().hashCode());
hashCode = prime * hashCode + ((getSubnetId() == null) ? 0 : getSubnetId().hashCode());
return hashCode;
}
@Override
public VpcInterfaceRequest clone() {
try {
return (VpcInterfaceRequest) 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.VpcInterfaceRequestMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}