com.amazonaws.services.mediatailor.model.TimeSignalMessage 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 SCTE-35 time_signal
message can be sent with one or more segmentation_descriptor
* messages. A time_signal
message can be sent only if a single segmentation_descriptor
* message is sent.
*
*
* The time_signal
message contains only the splice_time
field which is constructed using a
* given presentation timestamp. When sending a time_signal
message, the splice_command_type
* field in the splice_info_section
message is set to 6 (0x06).
*
*
* See the time_signal()
table of the 2022 SCTE-35 specification for more information.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class TimeSignalMessage implements Serializable, Cloneable, StructuredPojo {
/**
*
* The configurations for the SCTE-35 segmentation_descriptor
message(s) sent with the
* time_signal
message.
*
*/
private java.util.List segmentationDescriptors;
/**
*
* The configurations for the SCTE-35 segmentation_descriptor
message(s) sent with the
* time_signal
message.
*
*
* @return The configurations for the SCTE-35 segmentation_descriptor
message(s) sent with the
* time_signal
message.
*/
public java.util.List getSegmentationDescriptors() {
return segmentationDescriptors;
}
/**
*
* The configurations for the SCTE-35 segmentation_descriptor
message(s) sent with the
* time_signal
message.
*
*
* @param segmentationDescriptors
* The configurations for the SCTE-35 segmentation_descriptor
message(s) sent with the
* time_signal
message.
*/
public void setSegmentationDescriptors(java.util.Collection segmentationDescriptors) {
if (segmentationDescriptors == null) {
this.segmentationDescriptors = null;
return;
}
this.segmentationDescriptors = new java.util.ArrayList(segmentationDescriptors);
}
/**
*
* The configurations for the SCTE-35 segmentation_descriptor
message(s) sent with the
* time_signal
message.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSegmentationDescriptors(java.util.Collection)} or
* {@link #withSegmentationDescriptors(java.util.Collection)} if you want to override the existing values.
*
*
* @param segmentationDescriptors
* The configurations for the SCTE-35 segmentation_descriptor
message(s) sent with the
* time_signal
message.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TimeSignalMessage withSegmentationDescriptors(SegmentationDescriptor... segmentationDescriptors) {
if (this.segmentationDescriptors == null) {
setSegmentationDescriptors(new java.util.ArrayList(segmentationDescriptors.length));
}
for (SegmentationDescriptor ele : segmentationDescriptors) {
this.segmentationDescriptors.add(ele);
}
return this;
}
/**
*
* The configurations for the SCTE-35 segmentation_descriptor
message(s) sent with the
* time_signal
message.
*
*
* @param segmentationDescriptors
* The configurations for the SCTE-35 segmentation_descriptor
message(s) sent with the
* time_signal
message.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TimeSignalMessage withSegmentationDescriptors(java.util.Collection segmentationDescriptors) {
setSegmentationDescriptors(segmentationDescriptors);
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 (getSegmentationDescriptors() != null)
sb.append("SegmentationDescriptors: ").append(getSegmentationDescriptors());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof TimeSignalMessage == false)
return false;
TimeSignalMessage other = (TimeSignalMessage) obj;
if (other.getSegmentationDescriptors() == null ^ this.getSegmentationDescriptors() == null)
return false;
if (other.getSegmentationDescriptors() != null && other.getSegmentationDescriptors().equals(this.getSegmentationDescriptors()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSegmentationDescriptors() == null) ? 0 : getSegmentationDescriptors().hashCode());
return hashCode;
}
@Override
public TimeSignalMessage clone() {
try {
return (TimeSignalMessage) 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.TimeSignalMessageMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}