com.amazonaws.services.ivs.model.StreamSessionSummary Maven / Gradle / Ivy
/*
* Copyright 2017-2022 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.ivs.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Summary information about a stream session.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class StreamSessionSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* UTC ISO-8601 formatted timestamp of when the channel went offline. For live streams, this is NULL
.
*
*/
private java.util.Date endTime;
/**
*
* If true
, this stream encountered a quota breach or failure.
*
*/
private Boolean hasErrorEvent;
/**
*
* UTC ISO-8601 formatted timestamp of when the channel went live.
*
*/
private java.util.Date startTime;
/**
*
* Unique identifier for a live or previously live stream in the specified channel.
*
*/
private String streamId;
/**
*
* UTC ISO-8601 formatted timestamp of when the channel went offline. For live streams, this is NULL
.
*
*
* @param endTime
* UTC ISO-8601 formatted timestamp of when the channel went offline. For live streams, this is
* NULL
.
*/
public void setEndTime(java.util.Date endTime) {
this.endTime = endTime;
}
/**
*
* UTC ISO-8601 formatted timestamp of when the channel went offline. For live streams, this is NULL
.
*
*
* @return UTC ISO-8601 formatted timestamp of when the channel went offline. For live streams, this is
* NULL
.
*/
public java.util.Date getEndTime() {
return this.endTime;
}
/**
*
* UTC ISO-8601 formatted timestamp of when the channel went offline. For live streams, this is NULL
.
*
*
* @param endTime
* UTC ISO-8601 formatted timestamp of when the channel went offline. For live streams, this is
* NULL
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StreamSessionSummary withEndTime(java.util.Date endTime) {
setEndTime(endTime);
return this;
}
/**
*
* If true
, this stream encountered a quota breach or failure.
*
*
* @param hasErrorEvent
* If true
, this stream encountered a quota breach or failure.
*/
public void setHasErrorEvent(Boolean hasErrorEvent) {
this.hasErrorEvent = hasErrorEvent;
}
/**
*
* If true
, this stream encountered a quota breach or failure.
*
*
* @return If true
, this stream encountered a quota breach or failure.
*/
public Boolean getHasErrorEvent() {
return this.hasErrorEvent;
}
/**
*
* If true
, this stream encountered a quota breach or failure.
*
*
* @param hasErrorEvent
* If true
, this stream encountered a quota breach or failure.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StreamSessionSummary withHasErrorEvent(Boolean hasErrorEvent) {
setHasErrorEvent(hasErrorEvent);
return this;
}
/**
*
* If true
, this stream encountered a quota breach or failure.
*
*
* @return If true
, this stream encountered a quota breach or failure.
*/
public Boolean isHasErrorEvent() {
return this.hasErrorEvent;
}
/**
*
* UTC ISO-8601 formatted timestamp of when the channel went live.
*
*
* @param startTime
* UTC ISO-8601 formatted timestamp of when the channel went live.
*/
public void setStartTime(java.util.Date startTime) {
this.startTime = startTime;
}
/**
*
* UTC ISO-8601 formatted timestamp of when the channel went live.
*
*
* @return UTC ISO-8601 formatted timestamp of when the channel went live.
*/
public java.util.Date getStartTime() {
return this.startTime;
}
/**
*
* UTC ISO-8601 formatted timestamp of when the channel went live.
*
*
* @param startTime
* UTC ISO-8601 formatted timestamp of when the channel went live.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StreamSessionSummary withStartTime(java.util.Date startTime) {
setStartTime(startTime);
return this;
}
/**
*
* Unique identifier for a live or previously live stream in the specified channel.
*
*
* @param streamId
* Unique identifier for a live or previously live stream in the specified channel.
*/
public void setStreamId(String streamId) {
this.streamId = streamId;
}
/**
*
* Unique identifier for a live or previously live stream in the specified channel.
*
*
* @return Unique identifier for a live or previously live stream in the specified channel.
*/
public String getStreamId() {
return this.streamId;
}
/**
*
* Unique identifier for a live or previously live stream in the specified channel.
*
*
* @param streamId
* Unique identifier for a live or previously live stream in the specified channel.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StreamSessionSummary withStreamId(String streamId) {
setStreamId(streamId);
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 (getEndTime() != null)
sb.append("EndTime: ").append(getEndTime()).append(",");
if (getHasErrorEvent() != null)
sb.append("HasErrorEvent: ").append(getHasErrorEvent()).append(",");
if (getStartTime() != null)
sb.append("StartTime: ").append(getStartTime()).append(",");
if (getStreamId() != null)
sb.append("StreamId: ").append(getStreamId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof StreamSessionSummary == false)
return false;
StreamSessionSummary other = (StreamSessionSummary) obj;
if (other.getEndTime() == null ^ this.getEndTime() == null)
return false;
if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false)
return false;
if (other.getHasErrorEvent() == null ^ this.getHasErrorEvent() == null)
return false;
if (other.getHasErrorEvent() != null && other.getHasErrorEvent().equals(this.getHasErrorEvent()) == false)
return false;
if (other.getStartTime() == null ^ this.getStartTime() == null)
return false;
if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false)
return false;
if (other.getStreamId() == null ^ this.getStreamId() == null)
return false;
if (other.getStreamId() != null && other.getStreamId().equals(this.getStreamId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
hashCode = prime * hashCode + ((getHasErrorEvent() == null) ? 0 : getHasErrorEvent().hashCode());
hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
hashCode = prime * hashCode + ((getStreamId() == null) ? 0 : getStreamId().hashCode());
return hashCode;
}
@Override
public StreamSessionSummary clone() {
try {
return (StreamSessionSummary) 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.ivs.model.transform.StreamSessionSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}