/* * Copyright 2018-2023 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.kinesisvideo.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* An object describing a Kinesis video stream. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StreamInfo implements Serializable, Cloneable, StructuredPojo { /** *

* The name of the device that is associated with the stream. *

*/ private String deviceName; /** *

* The name of the stream. *

*/ private String streamName; /** *

* The Amazon Resource Name (ARN) of the stream. *

*/ private String streamARN; /** *

* The MediaType of the stream. *

*/ private String mediaType; /** *

* The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the stream. *

*/ private String kmsKeyId; /** *

* The version of the stream. *

*/ private String version; /** *

* The status of the stream. *

*/ private String status; /** *

* A time stamp that indicates when the stream was created. *

*/ private java.util.Date creationTime; /** *

* How long the stream retains data, in hours. *

*/ private Integer dataRetentionInHours; /** *

* The name of the device that is associated with the stream. *

* * @param deviceName * The name of the device that is associated with the stream. */ public void setDeviceName(String deviceName) { this.deviceName = deviceName; } /** *

* The name of the device that is associated with the stream. *

* * @return The name of the device that is associated with the stream. */ public String getDeviceName() { return this.deviceName; } /** *

* The name of the device that is associated with the stream. *

* * @param deviceName * The name of the device that is associated with the stream. * @return Returns a reference to this object so that method calls can be chained together. */ public StreamInfo withDeviceName(String deviceName) { setDeviceName(deviceName); return this; } /** *

* The name of the stream. *

* * @param streamName * The name of the stream. */ public void setStreamName(String streamName) { this.streamName = streamName; } /** *

* The name of the stream. *

* * @return The name of the stream. */ public String getStreamName() { return this.streamName; } /** *

* The name of the stream. *

* * @param streamName * The name of the stream. * @return Returns a reference to this object so that method calls can be chained together. */ public StreamInfo withStreamName(String streamName) { setStreamName(streamName); return this; } /** *

* The Amazon Resource Name (ARN) of the stream. *

* * @param streamARN * The Amazon Resource Name (ARN) of the stream. */ public void setStreamARN(String streamARN) { this.streamARN = streamARN; } /** *

* The Amazon Resource Name (ARN) of the stream. *

* * @return The Amazon Resource Name (ARN) of the stream. */ public String getStreamARN() { return this.streamARN; } /** *

* The Amazon Resource Name (ARN) of the stream. *

* * @param streamARN * The Amazon Resource Name (ARN) of the stream. * @return Returns a reference to this object so that method calls can be chained together. */ public StreamInfo withStreamARN(String streamARN) { setStreamARN(streamARN); return this; } /** *

* The MediaType of the stream. *

* * @param mediaType * The MediaType of the stream. */ public void setMediaType(String mediaType) { this.mediaType = mediaType; } /** *

* The MediaType of the stream. *

* * @return The MediaType of the stream. */ public String getMediaType() { return this.mediaType; } /** *

* The MediaType of the stream. *

* * @param mediaType * The MediaType of the stream. * @return Returns a reference to this object so that method calls can be chained together. */ public StreamInfo withMediaType(String mediaType) { setMediaType(mediaType); return this; } /** *

* The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the stream. *

* * @param kmsKeyId * The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the * stream. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *

* The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the stream. *

* * @return The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the * stream. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *

* The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the stream. *

* * @param kmsKeyId * The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the * stream. * @return Returns a reference to this object so that method calls can be chained together. */ public StreamInfo withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *

* The version of the stream. *

* * @param version * The version of the stream. */ public void setVersion(String version) { this.version = version; } /** *

* The version of the stream. *

* * @return The version of the stream. */ public String getVersion() { return this.version; } /** *

* The version of the stream. *

* * @param version * The version of the stream. * @return Returns a reference to this object so that method calls can be chained together. */ public StreamInfo withVersion(String version) { setVersion(version); return this; } /** *

* The status of the stream. *

* * @param status * The status of the stream. * @see Status */ public void setStatus(String status) { this.status = status; } /** *

* The status of the stream. *

* * @return The status of the stream. * @see Status */ public String getStatus() { return this.status; } /** *

* The status of the stream. *

* * @param status * The status of the stream. * @return Returns a reference to this object so that method calls can be chained together. * @see Status */ public StreamInfo withStatus(String status) { setStatus(status); return this; } /** *

* The status of the stream. *

* * @param status * The status of the stream. * @return Returns a reference to this object so that method calls can be chained together. * @see Status */ public StreamInfo withStatus(Status status) { this.status = status.toString(); return this; } /** *

* A time stamp that indicates when the stream was created. *

* * @param creationTime * A time stamp that indicates when the stream was created. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

* A time stamp that indicates when the stream was created. *

* * @return A time stamp that indicates when the stream was created. */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

* A time stamp that indicates when the stream was created. *

* * @param creationTime * A time stamp that indicates when the stream was created. * @return Returns a reference to this object so that method calls can be chained together. */ public StreamInfo withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** *

* How long the stream retains data, in hours. *

* * @param dataRetentionInHours * How long the stream retains data, in hours. */ public void setDataRetentionInHours(Integer dataRetentionInHours) { this.dataRetentionInHours = dataRetentionInHours; } /** *

* How long the stream retains data, in hours. *

* * @return How long the stream retains data, in hours. */ public Integer getDataRetentionInHours() { return this.dataRetentionInHours; } /** *

* How long the stream retains data, in hours. *

* * @param dataRetentionInHours * How long the stream retains data, in hours. * @return Returns a reference to this object so that method calls can be chained together. */ public StreamInfo withDataRetentionInHours(Integer dataRetentionInHours) { setDataRetentionInHours(dataRetentionInHours); 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 (getDeviceName() != null) sb.append("DeviceName: ").append(getDeviceName()).append(","); if (getStreamName() != null) sb.append("StreamName: ").append(getStreamName()).append(","); if (getStreamARN() != null) sb.append("StreamARN: ").append(getStreamARN()).append(","); if (getMediaType() != null) sb.append("MediaType: ").append(getMediaType()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getDataRetentionInHours() != null) sb.append("DataRetentionInHours: ").append(getDataRetentionInHours()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StreamInfo == false) return false; StreamInfo other = (StreamInfo) obj; if (other.getDeviceName() == null ^ this.getDeviceName() == null) return false; if (other.getDeviceName() != null && other.getDeviceName().equals(this.getDeviceName()) == false) return false; if (other.getStreamName() == null ^ this.getStreamName() == null) return false; if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == false) return false; if (other.getStreamARN() == null ^ this.getStreamARN() == null) return false; if (other.getStreamARN() != null && other.getStreamARN().equals(this.getStreamARN()) == false) return false; if (other.getMediaType() == null ^ this.getMediaType() == null) return false; if (other.getMediaType() != null && other.getMediaType().equals(this.getMediaType()) == false) return false; if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null) return false; if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getDataRetentionInHours() == null ^ this.getDataRetentionInHours() == null) return false; if (other.getDataRetentionInHours() != null && other.getDataRetentionInHours().equals(this.getDataRetentionInHours()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode()); hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode()); hashCode = prime * hashCode + ((getStreamARN() == null) ? 0 : getStreamARN().hashCode()); hashCode = prime * hashCode + ((getMediaType() == null) ? 0 : getMediaType().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getDataRetentionInHours() == null) ? 0 : getDataRetentionInHours().hashCode()); return hashCode; } @Override public StreamInfo clone() { try { return (StreamInfo) 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.kinesisvideo.model.transform.StreamInfoMarshaller.getInstance().marshall(this, protocolMarshaller); } }