(inputAttachments);
}
/**
* List of input attachments for channel.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInputAttachments(java.util.Collection)} or {@link #withInputAttachments(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param inputAttachments
* List of input attachments for channel.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateChannelRequest withInputAttachments(InputAttachment... inputAttachments) {
if (this.inputAttachments == null) {
setInputAttachments(new java.util.ArrayList(inputAttachments.length));
}
for (InputAttachment ele : inputAttachments) {
this.inputAttachments.add(ele);
}
return this;
}
/**
* List of input attachments for channel.
*
* @param inputAttachments
* List of input attachments for channel.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateChannelRequest withInputAttachments(java.util.Collection inputAttachments) {
setInputAttachments(inputAttachments);
return this;
}
/**
* Specification of network and file inputs for this channel
*
* @param inputSpecification
* Specification of network and file inputs for this channel
*/
public void setInputSpecification(InputSpecification inputSpecification) {
this.inputSpecification = inputSpecification;
}
/**
* Specification of network and file inputs for this channel
*
* @return Specification of network and file inputs for this channel
*/
public InputSpecification getInputSpecification() {
return this.inputSpecification;
}
/**
* Specification of network and file inputs for this channel
*
* @param inputSpecification
* Specification of network and file inputs for this channel
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateChannelRequest withInputSpecification(InputSpecification inputSpecification) {
setInputSpecification(inputSpecification);
return this;
}
/**
* The log level to write to CloudWatch Logs.
*
* @param logLevel
* The log level to write to CloudWatch Logs.
* @see LogLevel
*/
public void setLogLevel(String logLevel) {
this.logLevel = logLevel;
}
/**
* The log level to write to CloudWatch Logs.
*
* @return The log level to write to CloudWatch Logs.
* @see LogLevel
*/
public String getLogLevel() {
return this.logLevel;
}
/**
* The log level to write to CloudWatch Logs.
*
* @param logLevel
* The log level to write to CloudWatch Logs.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LogLevel
*/
public CreateChannelRequest withLogLevel(String logLevel) {
setLogLevel(logLevel);
return this;
}
/**
* The log level to write to CloudWatch Logs.
*
* @param logLevel
* The log level to write to CloudWatch Logs.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LogLevel
*/
public CreateChannelRequest withLogLevel(LogLevel logLevel) {
this.logLevel = logLevel.toString();
return this;
}
/**
* Maintenance settings for this channel.
*
* @param maintenance
* Maintenance settings for this channel.
*/
public void setMaintenance(MaintenanceCreateSettings maintenance) {
this.maintenance = maintenance;
}
/**
* Maintenance settings for this channel.
*
* @return Maintenance settings for this channel.
*/
public MaintenanceCreateSettings getMaintenance() {
return this.maintenance;
}
/**
* Maintenance settings for this channel.
*
* @param maintenance
* Maintenance settings for this channel.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateChannelRequest withMaintenance(MaintenanceCreateSettings maintenance) {
setMaintenance(maintenance);
return this;
}
/**
* Name of channel.
*
* @param name
* Name of channel.
*/
public void setName(String name) {
this.name = name;
}
/**
* Name of channel.
*
* @return Name of channel.
*/
public String getName() {
return this.name;
}
/**
* Name of channel.
*
* @param name
* Name of channel.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateChannelRequest withName(String name) {
setName(name);
return this;
}
/**
* Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
*
* @param requestId
* Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
*/
public void setRequestId(String requestId) {
this.requestId = requestId;
}
/**
* Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
*
* @return Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
*/
public String getRequestId() {
return this.requestId;
}
/**
* Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
*
* @param requestId
* Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateChannelRequest withRequestId(String requestId) {
setRequestId(requestId);
return this;
}
/**
* Deprecated field that's only usable by whitelisted customers.
*
* @param reserved
* Deprecated field that's only usable by whitelisted customers.
*/
@Deprecated
public void setReserved(String reserved) {
this.reserved = reserved;
}
/**
* Deprecated field that's only usable by whitelisted customers.
*
* @return Deprecated field that's only usable by whitelisted customers.
*/
@Deprecated
public String getReserved() {
return this.reserved;
}
/**
* Deprecated field that's only usable by whitelisted customers.
*
* @param reserved
* Deprecated field that's only usable by whitelisted customers.
* @return Returns a reference to this object so that method calls can be chained together.
*/
@Deprecated
public CreateChannelRequest withReserved(String reserved) {
setReserved(reserved);
return this;
}
/**
* An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
*
* @param roleArn
* An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
*/
public void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
/**
* An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
*
* @return An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
*/
public String getRoleArn() {
return this.roleArn;
}
/**
* An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
*
* @param roleArn
* An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateChannelRequest withRoleArn(String roleArn) {
setRoleArn(roleArn);
return this;
}
/**
* A collection of key-value pairs.
*
* @return A collection of key-value pairs.
*/
public java.util.Map getTags() {
return tags;
}
/**
* A collection of key-value pairs.
*
* @param tags
* A collection of key-value pairs.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
* A collection of key-value pairs.
*
* @param tags
* A collection of key-value pairs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateChannelRequest withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see CreateChannelRequest#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateChannelRequest addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap();
}
if (this.tags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.tags.put(key, value);
return this;
}
/**
* Removes all the entries added into Tags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateChannelRequest clearTagsEntries() {
this.tags = null;
return this;
}
/**
* Settings for the VPC outputs
*
* @param vpc
* Settings for the VPC outputs
*/
public void setVpc(VpcOutputSettings vpc) {
this.vpc = vpc;
}
/**
* Settings for the VPC outputs
*
* @return Settings for the VPC outputs
*/
public VpcOutputSettings getVpc() {
return this.vpc;
}
/**
* Settings for the VPC outputs
*
* @param vpc
* Settings for the VPC outputs
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateChannelRequest withVpc(VpcOutputSettings vpc) {
setVpc(vpc);
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 (getCdiInputSpecification() != null)
sb.append("CdiInputSpecification: ").append(getCdiInputSpecification()).append(",");
if (getChannelClass() != null)
sb.append("ChannelClass: ").append(getChannelClass()).append(",");
if (getDestinations() != null)
sb.append("Destinations: ").append(getDestinations()).append(",");
if (getEncoderSettings() != null)
sb.append("EncoderSettings: ").append(getEncoderSettings()).append(",");
if (getInputAttachments() != null)
sb.append("InputAttachments: ").append(getInputAttachments()).append(",");
if (getInputSpecification() != null)
sb.append("InputSpecification: ").append(getInputSpecification()).append(",");
if (getLogLevel() != null)
sb.append("LogLevel: ").append(getLogLevel()).append(",");
if (getMaintenance() != null)
sb.append("Maintenance: ").append(getMaintenance()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getRequestId() != null)
sb.append("RequestId: ").append(getRequestId()).append(",");
if (getReserved() != null)
sb.append("Reserved: ").append(getReserved()).append(",");
if (getRoleArn() != null)
sb.append("RoleArn: ").append(getRoleArn()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getVpc() != null)
sb.append("Vpc: ").append(getVpc());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateChannelRequest == false)
return false;
CreateChannelRequest other = (CreateChannelRequest) obj;
if (other.getCdiInputSpecification() == null ^ this.getCdiInputSpecification() == null)
return false;
if (other.getCdiInputSpecification() != null && other.getCdiInputSpecification().equals(this.getCdiInputSpecification()) == false)
return false;
if (other.getChannelClass() == null ^ this.getChannelClass() == null)
return false;
if (other.getChannelClass() != null && other.getChannelClass().equals(this.getChannelClass()) == false)
return false;
if (other.getDestinations() == null ^ this.getDestinations() == null)
return false;
if (other.getDestinations() != null && other.getDestinations().equals(this.getDestinations()) == false)
return false;
if (other.getEncoderSettings() == null ^ this.getEncoderSettings() == null)
return false;
if (other.getEncoderSettings() != null && other.getEncoderSettings().equals(this.getEncoderSettings()) == false)
return false;
if (other.getInputAttachments() == null ^ this.getInputAttachments() == null)
return false;
if (other.getInputAttachments() != null && other.getInputAttachments().equals(this.getInputAttachments()) == false)
return false;
if (other.getInputSpecification() == null ^ this.getInputSpecification() == null)
return false;
if (other.getInputSpecification() != null && other.getInputSpecification().equals(this.getInputSpecification()) == false)
return false;
if (other.getLogLevel() == null ^ this.getLogLevel() == null)
return false;
if (other.getLogLevel() != null && other.getLogLevel().equals(this.getLogLevel()) == false)
return false;
if (other.getMaintenance() == null ^ this.getMaintenance() == null)
return false;
if (other.getMaintenance() != null && other.getMaintenance().equals(this.getMaintenance()) == 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.getRequestId() == null ^ this.getRequestId() == null)
return false;
if (other.getRequestId() != null && other.getRequestId().equals(this.getRequestId()) == false)
return false;
if (other.getReserved() == null ^ this.getReserved() == null)
return false;
if (other.getReserved() != null && other.getReserved().equals(this.getReserved()) == 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.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getVpc() == null ^ this.getVpc() == null)
return false;
if (other.getVpc() != null && other.getVpc().equals(this.getVpc()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCdiInputSpecification() == null) ? 0 : getCdiInputSpecification().hashCode());
hashCode = prime * hashCode + ((getChannelClass() == null) ? 0 : getChannelClass().hashCode());
hashCode = prime * hashCode + ((getDestinations() == null) ? 0 : getDestinations().hashCode());
hashCode = prime * hashCode + ((getEncoderSettings() == null) ? 0 : getEncoderSettings().hashCode());
hashCode = prime * hashCode + ((getInputAttachments() == null) ? 0 : getInputAttachments().hashCode());
hashCode = prime * hashCode + ((getInputSpecification() == null) ? 0 : getInputSpecification().hashCode());
hashCode = prime * hashCode + ((getLogLevel() == null) ? 0 : getLogLevel().hashCode());
hashCode = prime * hashCode + ((getMaintenance() == null) ? 0 : getMaintenance().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getRequestId() == null) ? 0 : getRequestId().hashCode());
hashCode = prime * hashCode + ((getReserved() == null) ? 0 : getReserved().hashCode());
hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getVpc() == null) ? 0 : getVpc().hashCode());
return hashCode;
}
@Override
public CreateChannelRequest clone() {
return (CreateChannelRequest) super.clone();
}
}