com.amazonaws.services.mediatailor.model.UpdateProgramRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-mediatailor Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.mediatailor.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateProgramRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ad break configuration settings.
*
*/
private java.util.List adBreaks;
/**
*
* The list of AudienceMedia defined in program.
*
*/
private java.util.List audienceMedia;
/**
*
* The name of the channel for this Program.
*
*/
private String channelName;
/**
*
* The name of the Program.
*
*/
private String programName;
/**
*
* The schedule configuration settings.
*
*/
private UpdateProgramScheduleConfiguration scheduleConfiguration;
/**
*
* The ad break configuration settings.
*
*
* @return The ad break configuration settings.
*/
public java.util.List getAdBreaks() {
return adBreaks;
}
/**
*
* The ad break configuration settings.
*
*
* @param adBreaks
* The ad break configuration settings.
*/
public void setAdBreaks(java.util.Collection adBreaks) {
if (adBreaks == null) {
this.adBreaks = null;
return;
}
this.adBreaks = new java.util.ArrayList(adBreaks);
}
/**
*
* The ad break configuration settings.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAdBreaks(java.util.Collection)} or {@link #withAdBreaks(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param adBreaks
* The ad break configuration settings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProgramRequest withAdBreaks(AdBreak... adBreaks) {
if (this.adBreaks == null) {
setAdBreaks(new java.util.ArrayList(adBreaks.length));
}
for (AdBreak ele : adBreaks) {
this.adBreaks.add(ele);
}
return this;
}
/**
*
* The ad break configuration settings.
*
*
* @param adBreaks
* The ad break configuration settings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProgramRequest withAdBreaks(java.util.Collection adBreaks) {
setAdBreaks(adBreaks);
return this;
}
/**
*
* The list of AudienceMedia defined in program.
*
*
* @return The list of AudienceMedia defined in program.
*/
public java.util.List getAudienceMedia() {
return audienceMedia;
}
/**
*
* The list of AudienceMedia defined in program.
*
*
* @param audienceMedia
* The list of AudienceMedia defined in program.
*/
public void setAudienceMedia(java.util.Collection audienceMedia) {
if (audienceMedia == null) {
this.audienceMedia = null;
return;
}
this.audienceMedia = new java.util.ArrayList(audienceMedia);
}
/**
*
* The list of AudienceMedia defined in program.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAudienceMedia(java.util.Collection)} or {@link #withAudienceMedia(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param audienceMedia
* The list of AudienceMedia defined in program.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProgramRequest withAudienceMedia(AudienceMedia... audienceMedia) {
if (this.audienceMedia == null) {
setAudienceMedia(new java.util.ArrayList(audienceMedia.length));
}
for (AudienceMedia ele : audienceMedia) {
this.audienceMedia.add(ele);
}
return this;
}
/**
*
* The list of AudienceMedia defined in program.
*
*
* @param audienceMedia
* The list of AudienceMedia defined in program.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProgramRequest withAudienceMedia(java.util.Collection audienceMedia) {
setAudienceMedia(audienceMedia);
return this;
}
/**
*
* The name of the channel for this Program.
*
*
* @param channelName
* The name of the channel for this Program.
*/
public void setChannelName(String channelName) {
this.channelName = channelName;
}
/**
*
* The name of the channel for this Program.
*
*
* @return The name of the channel for this Program.
*/
public String getChannelName() {
return this.channelName;
}
/**
*
* The name of the channel for this Program.
*
*
* @param channelName
* The name of the channel for this Program.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProgramRequest withChannelName(String channelName) {
setChannelName(channelName);
return this;
}
/**
*
* The name of the Program.
*
*
* @param programName
* The name of the Program.
*/
public void setProgramName(String programName) {
this.programName = programName;
}
/**
*
* The name of the Program.
*
*
* @return The name of the Program.
*/
public String getProgramName() {
return this.programName;
}
/**
*
* The name of the Program.
*
*
* @param programName
* The name of the Program.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProgramRequest withProgramName(String programName) {
setProgramName(programName);
return this;
}
/**
*
* The schedule configuration settings.
*
*
* @param scheduleConfiguration
* The schedule configuration settings.
*/
public void setScheduleConfiguration(UpdateProgramScheduleConfiguration scheduleConfiguration) {
this.scheduleConfiguration = scheduleConfiguration;
}
/**
*
* The schedule configuration settings.
*
*
* @return The schedule configuration settings.
*/
public UpdateProgramScheduleConfiguration getScheduleConfiguration() {
return this.scheduleConfiguration;
}
/**
*
* The schedule configuration settings.
*
*
* @param scheduleConfiguration
* The schedule configuration settings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateProgramRequest withScheduleConfiguration(UpdateProgramScheduleConfiguration scheduleConfiguration) {
setScheduleConfiguration(scheduleConfiguration);
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 (getAdBreaks() != null)
sb.append("AdBreaks: ").append(getAdBreaks()).append(",");
if (getAudienceMedia() != null)
sb.append("AudienceMedia: ").append(getAudienceMedia()).append(",");
if (getChannelName() != null)
sb.append("ChannelName: ").append(getChannelName()).append(",");
if (getProgramName() != null)
sb.append("ProgramName: ").append(getProgramName()).append(",");
if (getScheduleConfiguration() != null)
sb.append("ScheduleConfiguration: ").append(getScheduleConfiguration());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateProgramRequest == false)
return false;
UpdateProgramRequest other = (UpdateProgramRequest) obj;
if (other.getAdBreaks() == null ^ this.getAdBreaks() == null)
return false;
if (other.getAdBreaks() != null && other.getAdBreaks().equals(this.getAdBreaks()) == false)
return false;
if (other.getAudienceMedia() == null ^ this.getAudienceMedia() == null)
return false;
if (other.getAudienceMedia() != null && other.getAudienceMedia().equals(this.getAudienceMedia()) == false)
return false;
if (other.getChannelName() == null ^ this.getChannelName() == null)
return false;
if (other.getChannelName() != null && other.getChannelName().equals(this.getChannelName()) == false)
return false;
if (other.getProgramName() == null ^ this.getProgramName() == null)
return false;
if (other.getProgramName() != null && other.getProgramName().equals(this.getProgramName()) == false)
return false;
if (other.getScheduleConfiguration() == null ^ this.getScheduleConfiguration() == null)
return false;
if (other.getScheduleConfiguration() != null && other.getScheduleConfiguration().equals(this.getScheduleConfiguration()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAdBreaks() == null) ? 0 : getAdBreaks().hashCode());
hashCode = prime * hashCode + ((getAudienceMedia() == null) ? 0 : getAudienceMedia().hashCode());
hashCode = prime * hashCode + ((getChannelName() == null) ? 0 : getChannelName().hashCode());
hashCode = prime * hashCode + ((getProgramName() == null) ? 0 : getProgramName().hashCode());
hashCode = prime * hashCode + ((getScheduleConfiguration() == null) ? 0 : getScheduleConfiguration().hashCode());
return hashCode;
}
@Override
public UpdateProgramRequest clone() {
return (UpdateProgramRequest) super.clone();
}
}