com.amazonaws.services.mediapackagev2.model.Segment Maven / Gradle / Ivy
Show all versions of aws-java-sdk-mediapackagev2 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.mediapackagev2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The segment configuration, including the segment name, duration, and other configuration values.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Segment implements Serializable, Cloneable, StructuredPojo {
/**
*
* The duration (in seconds) of each segment. Enter a value equal to, or a multiple of, the input segment duration.
* If the value that you enter is different from the input segment duration, MediaPackage rounds segments to the
* nearest multiple of the input segment duration.
*
*/
private Integer segmentDurationSeconds;
/**
*
* The name that describes the segment. The name is the base name of the segment used in all content manifests
* inside of the endpoint. You can't use spaces in the name.
*
*/
private String segmentName;
/**
*
* When selected, MediaPackage bundles all audio tracks in a rendition group. All other tracks in the stream can be
* used with any audio rendition from the group.
*
*/
private Boolean tsUseAudioRenditionGroup;
/**
*
* When selected, the stream set includes an additional I-frame only stream, along with the other tracks. If false,
* this extra stream is not included. MediaPackage generates an I-frame only stream from the first rendition in the
* manifest. The service inserts EXT-I-FRAMES-ONLY tags in the output manifest, and then generates and includes an
* I-frames only playlist in the stream. This playlist permits player functionality like fast forward and rewind.
*
*/
private Boolean includeIframeOnlyStreams;
/**
*
* By default, MediaPackage excludes all digital video broadcasting (DVB) subtitles from the output. When selected,
* MediaPackage passes through DVB subtitles into the output.
*
*/
private Boolean tsIncludeDvbSubtitles;
/**
*
* The SCTE configuration options in the segment settings.
*
*/
private Scte scte;
private Encryption encryption;
/**
*
* The duration (in seconds) of each segment. Enter a value equal to, or a multiple of, the input segment duration.
* If the value that you enter is different from the input segment duration, MediaPackage rounds segments to the
* nearest multiple of the input segment duration.
*
*
* @param segmentDurationSeconds
* The duration (in seconds) of each segment. Enter a value equal to, or a multiple of, the input segment
* duration. If the value that you enter is different from the input segment duration, MediaPackage rounds
* segments to the nearest multiple of the input segment duration.
*/
public void setSegmentDurationSeconds(Integer segmentDurationSeconds) {
this.segmentDurationSeconds = segmentDurationSeconds;
}
/**
*
* The duration (in seconds) of each segment. Enter a value equal to, or a multiple of, the input segment duration.
* If the value that you enter is different from the input segment duration, MediaPackage rounds segments to the
* nearest multiple of the input segment duration.
*
*
* @return The duration (in seconds) of each segment. Enter a value equal to, or a multiple of, the input segment
* duration. If the value that you enter is different from the input segment duration, MediaPackage rounds
* segments to the nearest multiple of the input segment duration.
*/
public Integer getSegmentDurationSeconds() {
return this.segmentDurationSeconds;
}
/**
*
* The duration (in seconds) of each segment. Enter a value equal to, or a multiple of, the input segment duration.
* If the value that you enter is different from the input segment duration, MediaPackage rounds segments to the
* nearest multiple of the input segment duration.
*
*
* @param segmentDurationSeconds
* The duration (in seconds) of each segment. Enter a value equal to, or a multiple of, the input segment
* duration. If the value that you enter is different from the input segment duration, MediaPackage rounds
* segments to the nearest multiple of the input segment duration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Segment withSegmentDurationSeconds(Integer segmentDurationSeconds) {
setSegmentDurationSeconds(segmentDurationSeconds);
return this;
}
/**
*
* The name that describes the segment. The name is the base name of the segment used in all content manifests
* inside of the endpoint. You can't use spaces in the name.
*
*
* @param segmentName
* The name that describes the segment. The name is the base name of the segment used in all content
* manifests inside of the endpoint. You can't use spaces in the name.
*/
public void setSegmentName(String segmentName) {
this.segmentName = segmentName;
}
/**
*
* The name that describes the segment. The name is the base name of the segment used in all content manifests
* inside of the endpoint. You can't use spaces in the name.
*
*
* @return The name that describes the segment. The name is the base name of the segment used in all content
* manifests inside of the endpoint. You can't use spaces in the name.
*/
public String getSegmentName() {
return this.segmentName;
}
/**
*
* The name that describes the segment. The name is the base name of the segment used in all content manifests
* inside of the endpoint. You can't use spaces in the name.
*
*
* @param segmentName
* The name that describes the segment. The name is the base name of the segment used in all content
* manifests inside of the endpoint. You can't use spaces in the name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Segment withSegmentName(String segmentName) {
setSegmentName(segmentName);
return this;
}
/**
*
* When selected, MediaPackage bundles all audio tracks in a rendition group. All other tracks in the stream can be
* used with any audio rendition from the group.
*
*
* @param tsUseAudioRenditionGroup
* When selected, MediaPackage bundles all audio tracks in a rendition group. All other tracks in the stream
* can be used with any audio rendition from the group.
*/
public void setTsUseAudioRenditionGroup(Boolean tsUseAudioRenditionGroup) {
this.tsUseAudioRenditionGroup = tsUseAudioRenditionGroup;
}
/**
*
* When selected, MediaPackage bundles all audio tracks in a rendition group. All other tracks in the stream can be
* used with any audio rendition from the group.
*
*
* @return When selected, MediaPackage bundles all audio tracks in a rendition group. All other tracks in the stream
* can be used with any audio rendition from the group.
*/
public Boolean getTsUseAudioRenditionGroup() {
return this.tsUseAudioRenditionGroup;
}
/**
*
* When selected, MediaPackage bundles all audio tracks in a rendition group. All other tracks in the stream can be
* used with any audio rendition from the group.
*
*
* @param tsUseAudioRenditionGroup
* When selected, MediaPackage bundles all audio tracks in a rendition group. All other tracks in the stream
* can be used with any audio rendition from the group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Segment withTsUseAudioRenditionGroup(Boolean tsUseAudioRenditionGroup) {
setTsUseAudioRenditionGroup(tsUseAudioRenditionGroup);
return this;
}
/**
*
* When selected, MediaPackage bundles all audio tracks in a rendition group. All other tracks in the stream can be
* used with any audio rendition from the group.
*
*
* @return When selected, MediaPackage bundles all audio tracks in a rendition group. All other tracks in the stream
* can be used with any audio rendition from the group.
*/
public Boolean isTsUseAudioRenditionGroup() {
return this.tsUseAudioRenditionGroup;
}
/**
*
* When selected, the stream set includes an additional I-frame only stream, along with the other tracks. If false,
* this extra stream is not included. MediaPackage generates an I-frame only stream from the first rendition in the
* manifest. The service inserts EXT-I-FRAMES-ONLY tags in the output manifest, and then generates and includes an
* I-frames only playlist in the stream. This playlist permits player functionality like fast forward and rewind.
*
*
* @param includeIframeOnlyStreams
* When selected, the stream set includes an additional I-frame only stream, along with the other tracks. If
* false, this extra stream is not included. MediaPackage generates an I-frame only stream from the first
* rendition in the manifest. The service inserts EXT-I-FRAMES-ONLY tags in the output manifest, and then
* generates and includes an I-frames only playlist in the stream. This playlist permits player functionality
* like fast forward and rewind.
*/
public void setIncludeIframeOnlyStreams(Boolean includeIframeOnlyStreams) {
this.includeIframeOnlyStreams = includeIframeOnlyStreams;
}
/**
*
* When selected, the stream set includes an additional I-frame only stream, along with the other tracks. If false,
* this extra stream is not included. MediaPackage generates an I-frame only stream from the first rendition in the
* manifest. The service inserts EXT-I-FRAMES-ONLY tags in the output manifest, and then generates and includes an
* I-frames only playlist in the stream. This playlist permits player functionality like fast forward and rewind.
*
*
* @return When selected, the stream set includes an additional I-frame only stream, along with the other tracks. If
* false, this extra stream is not included. MediaPackage generates an I-frame only stream from the first
* rendition in the manifest. The service inserts EXT-I-FRAMES-ONLY tags in the output manifest, and then
* generates and includes an I-frames only playlist in the stream. This playlist permits player
* functionality like fast forward and rewind.
*/
public Boolean getIncludeIframeOnlyStreams() {
return this.includeIframeOnlyStreams;
}
/**
*
* When selected, the stream set includes an additional I-frame only stream, along with the other tracks. If false,
* this extra stream is not included. MediaPackage generates an I-frame only stream from the first rendition in the
* manifest. The service inserts EXT-I-FRAMES-ONLY tags in the output manifest, and then generates and includes an
* I-frames only playlist in the stream. This playlist permits player functionality like fast forward and rewind.
*
*
* @param includeIframeOnlyStreams
* When selected, the stream set includes an additional I-frame only stream, along with the other tracks. If
* false, this extra stream is not included. MediaPackage generates an I-frame only stream from the first
* rendition in the manifest. The service inserts EXT-I-FRAMES-ONLY tags in the output manifest, and then
* generates and includes an I-frames only playlist in the stream. This playlist permits player functionality
* like fast forward and rewind.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Segment withIncludeIframeOnlyStreams(Boolean includeIframeOnlyStreams) {
setIncludeIframeOnlyStreams(includeIframeOnlyStreams);
return this;
}
/**
*
* When selected, the stream set includes an additional I-frame only stream, along with the other tracks. If false,
* this extra stream is not included. MediaPackage generates an I-frame only stream from the first rendition in the
* manifest. The service inserts EXT-I-FRAMES-ONLY tags in the output manifest, and then generates and includes an
* I-frames only playlist in the stream. This playlist permits player functionality like fast forward and rewind.
*
*
* @return When selected, the stream set includes an additional I-frame only stream, along with the other tracks. If
* false, this extra stream is not included. MediaPackage generates an I-frame only stream from the first
* rendition in the manifest. The service inserts EXT-I-FRAMES-ONLY tags in the output manifest, and then
* generates and includes an I-frames only playlist in the stream. This playlist permits player
* functionality like fast forward and rewind.
*/
public Boolean isIncludeIframeOnlyStreams() {
return this.includeIframeOnlyStreams;
}
/**
*
* By default, MediaPackage excludes all digital video broadcasting (DVB) subtitles from the output. When selected,
* MediaPackage passes through DVB subtitles into the output.
*
*
* @param tsIncludeDvbSubtitles
* By default, MediaPackage excludes all digital video broadcasting (DVB) subtitles from the output. When
* selected, MediaPackage passes through DVB subtitles into the output.
*/
public void setTsIncludeDvbSubtitles(Boolean tsIncludeDvbSubtitles) {
this.tsIncludeDvbSubtitles = tsIncludeDvbSubtitles;
}
/**
*
* By default, MediaPackage excludes all digital video broadcasting (DVB) subtitles from the output. When selected,
* MediaPackage passes through DVB subtitles into the output.
*
*
* @return By default, MediaPackage excludes all digital video broadcasting (DVB) subtitles from the output. When
* selected, MediaPackage passes through DVB subtitles into the output.
*/
public Boolean getTsIncludeDvbSubtitles() {
return this.tsIncludeDvbSubtitles;
}
/**
*
* By default, MediaPackage excludes all digital video broadcasting (DVB) subtitles from the output. When selected,
* MediaPackage passes through DVB subtitles into the output.
*
*
* @param tsIncludeDvbSubtitles
* By default, MediaPackage excludes all digital video broadcasting (DVB) subtitles from the output. When
* selected, MediaPackage passes through DVB subtitles into the output.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Segment withTsIncludeDvbSubtitles(Boolean tsIncludeDvbSubtitles) {
setTsIncludeDvbSubtitles(tsIncludeDvbSubtitles);
return this;
}
/**
*
* By default, MediaPackage excludes all digital video broadcasting (DVB) subtitles from the output. When selected,
* MediaPackage passes through DVB subtitles into the output.
*
*
* @return By default, MediaPackage excludes all digital video broadcasting (DVB) subtitles from the output. When
* selected, MediaPackage passes through DVB subtitles into the output.
*/
public Boolean isTsIncludeDvbSubtitles() {
return this.tsIncludeDvbSubtitles;
}
/**
*
* The SCTE configuration options in the segment settings.
*
*
* @param scte
* The SCTE configuration options in the segment settings.
*/
public void setScte(Scte scte) {
this.scte = scte;
}
/**
*
* The SCTE configuration options in the segment settings.
*
*
* @return The SCTE configuration options in the segment settings.
*/
public Scte getScte() {
return this.scte;
}
/**
*
* The SCTE configuration options in the segment settings.
*
*
* @param scte
* The SCTE configuration options in the segment settings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Segment withScte(Scte scte) {
setScte(scte);
return this;
}
/**
* @param encryption
*/
public void setEncryption(Encryption encryption) {
this.encryption = encryption;
}
/**
* @return
*/
public Encryption getEncryption() {
return this.encryption;
}
/**
* @param encryption
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Segment withEncryption(Encryption encryption) {
setEncryption(encryption);
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 (getSegmentDurationSeconds() != null)
sb.append("SegmentDurationSeconds: ").append(getSegmentDurationSeconds()).append(",");
if (getSegmentName() != null)
sb.append("SegmentName: ").append(getSegmentName()).append(",");
if (getTsUseAudioRenditionGroup() != null)
sb.append("TsUseAudioRenditionGroup: ").append(getTsUseAudioRenditionGroup()).append(",");
if (getIncludeIframeOnlyStreams() != null)
sb.append("IncludeIframeOnlyStreams: ").append(getIncludeIframeOnlyStreams()).append(",");
if (getTsIncludeDvbSubtitles() != null)
sb.append("TsIncludeDvbSubtitles: ").append(getTsIncludeDvbSubtitles()).append(",");
if (getScte() != null)
sb.append("Scte: ").append(getScte()).append(",");
if (getEncryption() != null)
sb.append("Encryption: ").append(getEncryption());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Segment == false)
return false;
Segment other = (Segment) obj;
if (other.getSegmentDurationSeconds() == null ^ this.getSegmentDurationSeconds() == null)
return false;
if (other.getSegmentDurationSeconds() != null && other.getSegmentDurationSeconds().equals(this.getSegmentDurationSeconds()) == false)
return false;
if (other.getSegmentName() == null ^ this.getSegmentName() == null)
return false;
if (other.getSegmentName() != null && other.getSegmentName().equals(this.getSegmentName()) == false)
return false;
if (other.getTsUseAudioRenditionGroup() == null ^ this.getTsUseAudioRenditionGroup() == null)
return false;
if (other.getTsUseAudioRenditionGroup() != null && other.getTsUseAudioRenditionGroup().equals(this.getTsUseAudioRenditionGroup()) == false)
return false;
if (other.getIncludeIframeOnlyStreams() == null ^ this.getIncludeIframeOnlyStreams() == null)
return false;
if (other.getIncludeIframeOnlyStreams() != null && other.getIncludeIframeOnlyStreams().equals(this.getIncludeIframeOnlyStreams()) == false)
return false;
if (other.getTsIncludeDvbSubtitles() == null ^ this.getTsIncludeDvbSubtitles() == null)
return false;
if (other.getTsIncludeDvbSubtitles() != null && other.getTsIncludeDvbSubtitles().equals(this.getTsIncludeDvbSubtitles()) == false)
return false;
if (other.getScte() == null ^ this.getScte() == null)
return false;
if (other.getScte() != null && other.getScte().equals(this.getScte()) == false)
return false;
if (other.getEncryption() == null ^ this.getEncryption() == null)
return false;
if (other.getEncryption() != null && other.getEncryption().equals(this.getEncryption()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSegmentDurationSeconds() == null) ? 0 : getSegmentDurationSeconds().hashCode());
hashCode = prime * hashCode + ((getSegmentName() == null) ? 0 : getSegmentName().hashCode());
hashCode = prime * hashCode + ((getTsUseAudioRenditionGroup() == null) ? 0 : getTsUseAudioRenditionGroup().hashCode());
hashCode = prime * hashCode + ((getIncludeIframeOnlyStreams() == null) ? 0 : getIncludeIframeOnlyStreams().hashCode());
hashCode = prime * hashCode + ((getTsIncludeDvbSubtitles() == null) ? 0 : getTsIncludeDvbSubtitles().hashCode());
hashCode = prime * hashCode + ((getScte() == null) ? 0 : getScte().hashCode());
hashCode = prime * hashCode + ((getEncryption() == null) ? 0 : getEncryption().hashCode());
return hashCode;
}
@Override
public Segment clone() {
try {
return (Segment) 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.mediapackagev2.model.transform.SegmentMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}