(rules);
}
/**
* Optional. Use Automated ABR rules to specify restrictions for the rendition sizes MediaConvert will create in
* your ABR stack. You can use these rules if your ABR workflow has specific rendition size requirements, but you
* still want MediaConvert to optimize for video quality and overall file size.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRules(java.util.Collection)} or {@link #withRules(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param rules
* Optional. Use Automated ABR rules to specify restrictions for the rendition sizes MediaConvert will create
* in your ABR stack. You can use these rules if your ABR workflow has specific rendition size requirements,
* but you still want MediaConvert to optimize for video quality and overall file size.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AutomatedAbrSettings withRules(AutomatedAbrRule... rules) {
if (this.rules == null) {
setRules(new java.util.ArrayList(rules.length));
}
for (AutomatedAbrRule ele : rules) {
this.rules.add(ele);
}
return this;
}
/**
* Optional. Use Automated ABR rules to specify restrictions for the rendition sizes MediaConvert will create in
* your ABR stack. You can use these rules if your ABR workflow has specific rendition size requirements, but you
* still want MediaConvert to optimize for video quality and overall file size.
*
* @param rules
* Optional. Use Automated ABR rules to specify restrictions for the rendition sizes MediaConvert will create
* in your ABR stack. You can use these rules if your ABR workflow has specific rendition size requirements,
* but you still want MediaConvert to optimize for video quality and overall file size.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AutomatedAbrSettings withRules(java.util.Collection rules) {
setRules(rules);
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 (getMaxAbrBitrate() != null)
sb.append("MaxAbrBitrate: ").append(getMaxAbrBitrate()).append(",");
if (getMaxRenditions() != null)
sb.append("MaxRenditions: ").append(getMaxRenditions()).append(",");
if (getMinAbrBitrate() != null)
sb.append("MinAbrBitrate: ").append(getMinAbrBitrate()).append(",");
if (getRules() != null)
sb.append("Rules: ").append(getRules());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AutomatedAbrSettings == false)
return false;
AutomatedAbrSettings other = (AutomatedAbrSettings) obj;
if (other.getMaxAbrBitrate() == null ^ this.getMaxAbrBitrate() == null)
return false;
if (other.getMaxAbrBitrate() != null && other.getMaxAbrBitrate().equals(this.getMaxAbrBitrate()) == false)
return false;
if (other.getMaxRenditions() == null ^ this.getMaxRenditions() == null)
return false;
if (other.getMaxRenditions() != null && other.getMaxRenditions().equals(this.getMaxRenditions()) == false)
return false;
if (other.getMinAbrBitrate() == null ^ this.getMinAbrBitrate() == null)
return false;
if (other.getMinAbrBitrate() != null && other.getMinAbrBitrate().equals(this.getMinAbrBitrate()) == false)
return false;
if (other.getRules() == null ^ this.getRules() == null)
return false;
if (other.getRules() != null && other.getRules().equals(this.getRules()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getMaxAbrBitrate() == null) ? 0 : getMaxAbrBitrate().hashCode());
hashCode = prime * hashCode + ((getMaxRenditions() == null) ? 0 : getMaxRenditions().hashCode());
hashCode = prime * hashCode + ((getMinAbrBitrate() == null) ? 0 : getMinAbrBitrate().hashCode());
hashCode = prime * hashCode + ((getRules() == null) ? 0 : getRules().hashCode());
return hashCode;
}
@Override
public AutomatedAbrSettings clone() {
try {
return (AutomatedAbrSettings) 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.mediaconvert.model.transform.AutomatedAbrSettingsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}