com.amazonaws.services.mediatailor.model.ScheduleEntry 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The properties for a schedule.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ScheduleEntry implements Serializable, Cloneable, StructuredPojo {
/**
*
* The approximate duration of this program, in seconds.
*
*/
private Long approximateDurationSeconds;
/**
*
* The approximate time that the program will start playing.
*
*/
private java.util.Date approximateStartTime;
/**
*
* The ARN of the program.
*
*/
private String arn;
/**
*
* The list of audiences defined in ScheduleEntry.
*
*/
private java.util.List audiences;
/**
*
* The name of the channel that uses this schedule.
*
*/
private String channelName;
/**
*
* The name of the live source used for the program.
*
*/
private String liveSourceName;
/**
*
* The name of the program.
*
*/
private String programName;
/**
*
* The schedule's ad break properties.
*
*/
private java.util.List scheduleAdBreaks;
/**
*
* The type of schedule entry.
*
*/
private String scheduleEntryType;
/**
*
* The name of the source location.
*
*/
private String sourceLocationName;
/**
*
* The name of the VOD source.
*
*/
private String vodSourceName;
/**
*
* The approximate duration of this program, in seconds.
*
*
* @param approximateDurationSeconds
* The approximate duration of this program, in seconds.
*/
public void setApproximateDurationSeconds(Long approximateDurationSeconds) {
this.approximateDurationSeconds = approximateDurationSeconds;
}
/**
*
* The approximate duration of this program, in seconds.
*
*
* @return The approximate duration of this program, in seconds.
*/
public Long getApproximateDurationSeconds() {
return this.approximateDurationSeconds;
}
/**
*
* The approximate duration of this program, in seconds.
*
*
* @param approximateDurationSeconds
* The approximate duration of this program, in seconds.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduleEntry withApproximateDurationSeconds(Long approximateDurationSeconds) {
setApproximateDurationSeconds(approximateDurationSeconds);
return this;
}
/**
*
* The approximate time that the program will start playing.
*
*
* @param approximateStartTime
* The approximate time that the program will start playing.
*/
public void setApproximateStartTime(java.util.Date approximateStartTime) {
this.approximateStartTime = approximateStartTime;
}
/**
*
* The approximate time that the program will start playing.
*
*
* @return The approximate time that the program will start playing.
*/
public java.util.Date getApproximateStartTime() {
return this.approximateStartTime;
}
/**
*
* The approximate time that the program will start playing.
*
*
* @param approximateStartTime
* The approximate time that the program will start playing.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduleEntry withApproximateStartTime(java.util.Date approximateStartTime) {
setApproximateStartTime(approximateStartTime);
return this;
}
/**
*
* The ARN of the program.
*
*
* @param arn
* The ARN of the program.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN of the program.
*
*
* @return The ARN of the program.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN of the program.
*
*
* @param arn
* The ARN of the program.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduleEntry withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The list of audiences defined in ScheduleEntry.
*
*
* @return The list of audiences defined in ScheduleEntry.
*/
public java.util.List getAudiences() {
return audiences;
}
/**
*
* The list of audiences defined in ScheduleEntry.
*
*
* @param audiences
* The list of audiences defined in ScheduleEntry.
*/
public void setAudiences(java.util.Collection audiences) {
if (audiences == null) {
this.audiences = null;
return;
}
this.audiences = new java.util.ArrayList(audiences);
}
/**
*
* The list of audiences defined in ScheduleEntry.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAudiences(java.util.Collection)} or {@link #withAudiences(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param audiences
* The list of audiences defined in ScheduleEntry.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduleEntry withAudiences(String... audiences) {
if (this.audiences == null) {
setAudiences(new java.util.ArrayList(audiences.length));
}
for (String ele : audiences) {
this.audiences.add(ele);
}
return this;
}
/**
*
* The list of audiences defined in ScheduleEntry.
*
*
* @param audiences
* The list of audiences defined in ScheduleEntry.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduleEntry withAudiences(java.util.Collection audiences) {
setAudiences(audiences);
return this;
}
/**
*
* The name of the channel that uses this schedule.
*
*
* @param channelName
* The name of the channel that uses this schedule.
*/
public void setChannelName(String channelName) {
this.channelName = channelName;
}
/**
*
* The name of the channel that uses this schedule.
*
*
* @return The name of the channel that uses this schedule.
*/
public String getChannelName() {
return this.channelName;
}
/**
*
* The name of the channel that uses this schedule.
*
*
* @param channelName
* The name of the channel that uses this schedule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduleEntry withChannelName(String channelName) {
setChannelName(channelName);
return this;
}
/**
*
* The name of the live source used for the program.
*
*
* @param liveSourceName
* The name of the live source used for the program.
*/
public void setLiveSourceName(String liveSourceName) {
this.liveSourceName = liveSourceName;
}
/**
*
* The name of the live source used for the program.
*
*
* @return The name of the live source used for the program.
*/
public String getLiveSourceName() {
return this.liveSourceName;
}
/**
*
* The name of the live source used for the program.
*
*
* @param liveSourceName
* The name of the live source used for the program.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduleEntry withLiveSourceName(String liveSourceName) {
setLiveSourceName(liveSourceName);
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 ScheduleEntry withProgramName(String programName) {
setProgramName(programName);
return this;
}
/**
*
* The schedule's ad break properties.
*
*
* @return The schedule's ad break properties.
*/
public java.util.List getScheduleAdBreaks() {
return scheduleAdBreaks;
}
/**
*
* The schedule's ad break properties.
*
*
* @param scheduleAdBreaks
* The schedule's ad break properties.
*/
public void setScheduleAdBreaks(java.util.Collection scheduleAdBreaks) {
if (scheduleAdBreaks == null) {
this.scheduleAdBreaks = null;
return;
}
this.scheduleAdBreaks = new java.util.ArrayList(scheduleAdBreaks);
}
/**
*
* The schedule's ad break properties.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setScheduleAdBreaks(java.util.Collection)} or {@link #withScheduleAdBreaks(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param scheduleAdBreaks
* The schedule's ad break properties.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduleEntry withScheduleAdBreaks(ScheduleAdBreak... scheduleAdBreaks) {
if (this.scheduleAdBreaks == null) {
setScheduleAdBreaks(new java.util.ArrayList(scheduleAdBreaks.length));
}
for (ScheduleAdBreak ele : scheduleAdBreaks) {
this.scheduleAdBreaks.add(ele);
}
return this;
}
/**
*
* The schedule's ad break properties.
*
*
* @param scheduleAdBreaks
* The schedule's ad break properties.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduleEntry withScheduleAdBreaks(java.util.Collection scheduleAdBreaks) {
setScheduleAdBreaks(scheduleAdBreaks);
return this;
}
/**
*
* The type of schedule entry.
*
*
* @param scheduleEntryType
* The type of schedule entry.
* @see ScheduleEntryType
*/
public void setScheduleEntryType(String scheduleEntryType) {
this.scheduleEntryType = scheduleEntryType;
}
/**
*
* The type of schedule entry.
*
*
* @return The type of schedule entry.
* @see ScheduleEntryType
*/
public String getScheduleEntryType() {
return this.scheduleEntryType;
}
/**
*
* The type of schedule entry.
*
*
* @param scheduleEntryType
* The type of schedule entry.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ScheduleEntryType
*/
public ScheduleEntry withScheduleEntryType(String scheduleEntryType) {
setScheduleEntryType(scheduleEntryType);
return this;
}
/**
*
* The type of schedule entry.
*
*
* @param scheduleEntryType
* The type of schedule entry.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ScheduleEntryType
*/
public ScheduleEntry withScheduleEntryType(ScheduleEntryType scheduleEntryType) {
this.scheduleEntryType = scheduleEntryType.toString();
return this;
}
/**
*
* The name of the source location.
*
*
* @param sourceLocationName
* The name of the source location.
*/
public void setSourceLocationName(String sourceLocationName) {
this.sourceLocationName = sourceLocationName;
}
/**
*
* The name of the source location.
*
*
* @return The name of the source location.
*/
public String getSourceLocationName() {
return this.sourceLocationName;
}
/**
*
* The name of the source location.
*
*
* @param sourceLocationName
* The name of the source location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduleEntry withSourceLocationName(String sourceLocationName) {
setSourceLocationName(sourceLocationName);
return this;
}
/**
*
* The name of the VOD source.
*
*
* @param vodSourceName
* The name of the VOD source.
*/
public void setVodSourceName(String vodSourceName) {
this.vodSourceName = vodSourceName;
}
/**
*
* The name of the VOD source.
*
*
* @return The name of the VOD source.
*/
public String getVodSourceName() {
return this.vodSourceName;
}
/**
*
* The name of the VOD source.
*
*
* @param vodSourceName
* The name of the VOD source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ScheduleEntry withVodSourceName(String vodSourceName) {
setVodSourceName(vodSourceName);
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 (getApproximateDurationSeconds() != null)
sb.append("ApproximateDurationSeconds: ").append(getApproximateDurationSeconds()).append(",");
if (getApproximateStartTime() != null)
sb.append("ApproximateStartTime: ").append(getApproximateStartTime()).append(",");
if (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getAudiences() != null)
sb.append("Audiences: ").append(getAudiences()).append(",");
if (getChannelName() != null)
sb.append("ChannelName: ").append(getChannelName()).append(",");
if (getLiveSourceName() != null)
sb.append("LiveSourceName: ").append(getLiveSourceName()).append(",");
if (getProgramName() != null)
sb.append("ProgramName: ").append(getProgramName()).append(",");
if (getScheduleAdBreaks() != null)
sb.append("ScheduleAdBreaks: ").append(getScheduleAdBreaks()).append(",");
if (getScheduleEntryType() != null)
sb.append("ScheduleEntryType: ").append(getScheduleEntryType()).append(",");
if (getSourceLocationName() != null)
sb.append("SourceLocationName: ").append(getSourceLocationName()).append(",");
if (getVodSourceName() != null)
sb.append("VodSourceName: ").append(getVodSourceName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ScheduleEntry == false)
return false;
ScheduleEntry other = (ScheduleEntry) obj;
if (other.getApproximateDurationSeconds() == null ^ this.getApproximateDurationSeconds() == null)
return false;
if (other.getApproximateDurationSeconds() != null && other.getApproximateDurationSeconds().equals(this.getApproximateDurationSeconds()) == false)
return false;
if (other.getApproximateStartTime() == null ^ this.getApproximateStartTime() == null)
return false;
if (other.getApproximateStartTime() != null && other.getApproximateStartTime().equals(this.getApproximateStartTime()) == false)
return false;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getAudiences() == null ^ this.getAudiences() == null)
return false;
if (other.getAudiences() != null && other.getAudiences().equals(this.getAudiences()) == 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.getLiveSourceName() == null ^ this.getLiveSourceName() == null)
return false;
if (other.getLiveSourceName() != null && other.getLiveSourceName().equals(this.getLiveSourceName()) == 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.getScheduleAdBreaks() == null ^ this.getScheduleAdBreaks() == null)
return false;
if (other.getScheduleAdBreaks() != null && other.getScheduleAdBreaks().equals(this.getScheduleAdBreaks()) == false)
return false;
if (other.getScheduleEntryType() == null ^ this.getScheduleEntryType() == null)
return false;
if (other.getScheduleEntryType() != null && other.getScheduleEntryType().equals(this.getScheduleEntryType()) == false)
return false;
if (other.getSourceLocationName() == null ^ this.getSourceLocationName() == null)
return false;
if (other.getSourceLocationName() != null && other.getSourceLocationName().equals(this.getSourceLocationName()) == false)
return false;
if (other.getVodSourceName() == null ^ this.getVodSourceName() == null)
return false;
if (other.getVodSourceName() != null && other.getVodSourceName().equals(this.getVodSourceName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getApproximateDurationSeconds() == null) ? 0 : getApproximateDurationSeconds().hashCode());
hashCode = prime * hashCode + ((getApproximateStartTime() == null) ? 0 : getApproximateStartTime().hashCode());
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getAudiences() == null) ? 0 : getAudiences().hashCode());
hashCode = prime * hashCode + ((getChannelName() == null) ? 0 : getChannelName().hashCode());
hashCode = prime * hashCode + ((getLiveSourceName() == null) ? 0 : getLiveSourceName().hashCode());
hashCode = prime * hashCode + ((getProgramName() == null) ? 0 : getProgramName().hashCode());
hashCode = prime * hashCode + ((getScheduleAdBreaks() == null) ? 0 : getScheduleAdBreaks().hashCode());
hashCode = prime * hashCode + ((getScheduleEntryType() == null) ? 0 : getScheduleEntryType().hashCode());
hashCode = prime * hashCode + ((getSourceLocationName() == null) ? 0 : getSourceLocationName().hashCode());
hashCode = prime * hashCode + ((getVodSourceName() == null) ? 0 : getVodSourceName().hashCode());
return hashCode;
}
@Override
public ScheduleEntry clone() {
try {
return (ScheduleEntry) 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.mediatailor.model.transform.ScheduleEntryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}