(subscribers);
}
/**
* The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be
* allowed to create their own flows using your content as the source.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSubscribers(java.util.Collection)} or {@link #withSubscribers(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param subscribers
* The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be
* allowed to create their own flows using your content as the source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GrantEntitlementRequest withSubscribers(String... subscribers) {
if (this.subscribers == null) {
setSubscribers(new java.util.ArrayList(subscribers.length));
}
for (String ele : subscribers) {
this.subscribers.add(ele);
}
return this;
}
/**
* The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be
* allowed to create their own flows using your content as the source.
*
* @param subscribers
* The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be
* allowed to create their own flows using your content as the source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GrantEntitlementRequest withSubscribers(java.util.Collection subscribers) {
setSubscribers(subscribers);
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 (getDataTransferSubscriberFeePercent() != null)
sb.append("DataTransferSubscriberFeePercent: ").append(getDataTransferSubscriberFeePercent()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getEncryption() != null)
sb.append("Encryption: ").append(getEncryption()).append(",");
if (getEntitlementStatus() != null)
sb.append("EntitlementStatus: ").append(getEntitlementStatus()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getSubscribers() != null)
sb.append("Subscribers: ").append(getSubscribers());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GrantEntitlementRequest == false)
return false;
GrantEntitlementRequest other = (GrantEntitlementRequest) obj;
if (other.getDataTransferSubscriberFeePercent() == null ^ this.getDataTransferSubscriberFeePercent() == null)
return false;
if (other.getDataTransferSubscriberFeePercent() != null
&& other.getDataTransferSubscriberFeePercent().equals(this.getDataTransferSubscriberFeePercent()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getEncryption() == null ^ this.getEncryption() == null)
return false;
if (other.getEncryption() != null && other.getEncryption().equals(this.getEncryption()) == false)
return false;
if (other.getEntitlementStatus() == null ^ this.getEntitlementStatus() == null)
return false;
if (other.getEntitlementStatus() != null && other.getEntitlementStatus().equals(this.getEntitlementStatus()) == 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.getSubscribers() == null ^ this.getSubscribers() == null)
return false;
if (other.getSubscribers() != null && other.getSubscribers().equals(this.getSubscribers()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDataTransferSubscriberFeePercent() == null) ? 0 : getDataTransferSubscriberFeePercent().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getEncryption() == null) ? 0 : getEncryption().hashCode());
hashCode = prime * hashCode + ((getEntitlementStatus() == null) ? 0 : getEntitlementStatus().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getSubscribers() == null) ? 0 : getSubscribers().hashCode());
return hashCode;
}
@Override
public GrantEntitlementRequest clone() {
try {
return (GrantEntitlementRequest) 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.GrantEntitlementRequestMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}