(inputChannelLevels);
}
/**
* Indices and gain values for each input channel that should be remixed into this output channel.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInputChannelLevels(java.util.Collection)} or {@link #withInputChannelLevels(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param inputChannelLevels
* Indices and gain values for each input channel that should be remixed into this output channel.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AudioChannelMapping withInputChannelLevels(InputChannelLevel... inputChannelLevels) {
if (this.inputChannelLevels == null) {
setInputChannelLevels(new java.util.ArrayList(inputChannelLevels.length));
}
for (InputChannelLevel ele : inputChannelLevels) {
this.inputChannelLevels.add(ele);
}
return this;
}
/**
* Indices and gain values for each input channel that should be remixed into this output channel.
*
* @param inputChannelLevels
* Indices and gain values for each input channel that should be remixed into this output channel.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AudioChannelMapping withInputChannelLevels(java.util.Collection inputChannelLevels) {
setInputChannelLevels(inputChannelLevels);
return this;
}
/**
* The index of the output channel being produced.
*
* @param outputChannel
* The index of the output channel being produced.
*/
public void setOutputChannel(Integer outputChannel) {
this.outputChannel = outputChannel;
}
/**
* The index of the output channel being produced.
*
* @return The index of the output channel being produced.
*/
public Integer getOutputChannel() {
return this.outputChannel;
}
/**
* The index of the output channel being produced.
*
* @param outputChannel
* The index of the output channel being produced.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AudioChannelMapping withOutputChannel(Integer outputChannel) {
setOutputChannel(outputChannel);
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 (getInputChannelLevels() != null)
sb.append("InputChannelLevels: ").append(getInputChannelLevels()).append(",");
if (getOutputChannel() != null)
sb.append("OutputChannel: ").append(getOutputChannel());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AudioChannelMapping == false)
return false;
AudioChannelMapping other = (AudioChannelMapping) obj;
if (other.getInputChannelLevels() == null ^ this.getInputChannelLevels() == null)
return false;
if (other.getInputChannelLevels() != null && other.getInputChannelLevels().equals(this.getInputChannelLevels()) == false)
return false;
if (other.getOutputChannel() == null ^ this.getOutputChannel() == null)
return false;
if (other.getOutputChannel() != null && other.getOutputChannel().equals(this.getOutputChannel()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getInputChannelLevels() == null) ? 0 : getInputChannelLevels().hashCode());
hashCode = prime * hashCode + ((getOutputChannel() == null) ? 0 : getOutputChannel().hashCode());
return hashCode;
}
@Override
public AudioChannelMapping clone() {
try {
return (AudioChannelMapping) 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.medialive.model.transform.AudioChannelMappingMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}