(whitelist);
}
/**
* A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setWhitelist(java.util.Collection)} or {@link #withWhitelist(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param whitelist
* A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OriginEndpoint withWhitelist(String... whitelist) {
if (this.whitelist == null) {
setWhitelist(new java.util.ArrayList(whitelist.length));
}
for (String ele : whitelist) {
this.whitelist.add(ele);
}
return this;
}
/**
* A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
*
* @param whitelist
* A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OriginEndpoint withWhitelist(java.util.Collection whitelist) {
setWhitelist(whitelist);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getAuthorization() != null)
sb.append("Authorization: ").append(getAuthorization()).append(",");
if (getChannelId() != null)
sb.append("ChannelId: ").append(getChannelId()).append(",");
if (getCmafPackage() != null)
sb.append("CmafPackage: ").append(getCmafPackage()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getDashPackage() != null)
sb.append("DashPackage: ").append(getDashPackage()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getHlsPackage() != null)
sb.append("HlsPackage: ").append(getHlsPackage()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getManifestName() != null)
sb.append("ManifestName: ").append(getManifestName()).append(",");
if (getMssPackage() != null)
sb.append("MssPackage: ").append(getMssPackage()).append(",");
if (getOrigination() != null)
sb.append("Origination: ").append(getOrigination()).append(",");
if (getStartoverWindowSeconds() != null)
sb.append("StartoverWindowSeconds: ").append(getStartoverWindowSeconds()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getTimeDelaySeconds() != null)
sb.append("TimeDelaySeconds: ").append(getTimeDelaySeconds()).append(",");
if (getUrl() != null)
sb.append("Url: ").append(getUrl()).append(",");
if (getWhitelist() != null)
sb.append("Whitelist: ").append(getWhitelist());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof OriginEndpoint == false)
return false;
OriginEndpoint other = (OriginEndpoint) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getAuthorization() == null ^ this.getAuthorization() == null)
return false;
if (other.getAuthorization() != null && other.getAuthorization().equals(this.getAuthorization()) == false)
return false;
if (other.getChannelId() == null ^ this.getChannelId() == null)
return false;
if (other.getChannelId() != null && other.getChannelId().equals(this.getChannelId()) == false)
return false;
if (other.getCmafPackage() == null ^ this.getCmafPackage() == null)
return false;
if (other.getCmafPackage() != null && other.getCmafPackage().equals(this.getCmafPackage()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getDashPackage() == null ^ this.getDashPackage() == null)
return false;
if (other.getDashPackage() != null && other.getDashPackage().equals(this.getDashPackage()) == 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.getHlsPackage() == null ^ this.getHlsPackage() == null)
return false;
if (other.getHlsPackage() != null && other.getHlsPackage().equals(this.getHlsPackage()) == false)
return false;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getManifestName() == null ^ this.getManifestName() == null)
return false;
if (other.getManifestName() != null && other.getManifestName().equals(this.getManifestName()) == false)
return false;
if (other.getMssPackage() == null ^ this.getMssPackage() == null)
return false;
if (other.getMssPackage() != null && other.getMssPackage().equals(this.getMssPackage()) == false)
return false;
if (other.getOrigination() == null ^ this.getOrigination() == null)
return false;
if (other.getOrigination() != null && other.getOrigination().equals(this.getOrigination()) == false)
return false;
if (other.getStartoverWindowSeconds() == null ^ this.getStartoverWindowSeconds() == null)
return false;
if (other.getStartoverWindowSeconds() != null && other.getStartoverWindowSeconds().equals(this.getStartoverWindowSeconds()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getTimeDelaySeconds() == null ^ this.getTimeDelaySeconds() == null)
return false;
if (other.getTimeDelaySeconds() != null && other.getTimeDelaySeconds().equals(this.getTimeDelaySeconds()) == false)
return false;
if (other.getUrl() == null ^ this.getUrl() == null)
return false;
if (other.getUrl() != null && other.getUrl().equals(this.getUrl()) == false)
return false;
if (other.getWhitelist() == null ^ this.getWhitelist() == null)
return false;
if (other.getWhitelist() != null && other.getWhitelist().equals(this.getWhitelist()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getAuthorization() == null) ? 0 : getAuthorization().hashCode());
hashCode = prime * hashCode + ((getChannelId() == null) ? 0 : getChannelId().hashCode());
hashCode = prime * hashCode + ((getCmafPackage() == null) ? 0 : getCmafPackage().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getDashPackage() == null) ? 0 : getDashPackage().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getHlsPackage() == null) ? 0 : getHlsPackage().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getManifestName() == null) ? 0 : getManifestName().hashCode());
hashCode = prime * hashCode + ((getMssPackage() == null) ? 0 : getMssPackage().hashCode());
hashCode = prime * hashCode + ((getOrigination() == null) ? 0 : getOrigination().hashCode());
hashCode = prime * hashCode + ((getStartoverWindowSeconds() == null) ? 0 : getStartoverWindowSeconds().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getTimeDelaySeconds() == null) ? 0 : getTimeDelaySeconds().hashCode());
hashCode = prime * hashCode + ((getUrl() == null) ? 0 : getUrl().hashCode());
hashCode = prime * hashCode + ((getWhitelist() == null) ? 0 : getWhitelist().hashCode());
return hashCode;
}
@Override
public OriginEndpoint clone() {
try {
return (OriginEndpoint) 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.mediapackage.model.transform.OriginEndpointMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}