/* * Copyright 2010-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; /** *

* An object describing a Kinesis video stream. *

*/ public class StreamInfo implements Serializable { /** *

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

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.-]+
*/ private String deviceName; /** *

* The name of the stream. *

*

* Constraints:
* Length: 1 - 256
* Pattern: [a-zA-Z0-9_.-]+
*/ private String streamName; /** *

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

*

* Constraints:
* Length: 1 - 1024
* Pattern: * arn:[a-z\d-]+:kinesisvideo:[a-z0-9-]+:[0-9]+:[a-z]+/[a-zA- * Z0-9_.-]+/[0-9]+
*/ private String streamARN; /** *

* The MediaType of the stream. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [\w\-\.\+]+/[\w\-\.\+]+(,[\w\-\.\+]+/[\w\-\.\+]+)*
*/ private String mediaType; /** *

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

*

* Constraints:
* Length: 1 - 2048
* Pattern: .+
*/ private String kmsKeyId; /** *

* The version of the stream. *

*

* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9]+
*/ private String version; /** *

* The status of the stream. *

*

* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING */ 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. *

*

* Constraints:
* Range: 0 -
*/ private Integer dataRetentionInHours; /** *

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

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.-]+
* * @return

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

*/ public String getDeviceName() { return deviceName; } /** *

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

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.-]+
* * @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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.-]+
* * @param deviceName

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

* @return A reference to this updated object so that method calls can be * chained together. */ public StreamInfo withDeviceName(String deviceName) { this.deviceName = deviceName; return this; } /** *

* The name of the stream. *

*

* Constraints:
* Length: 1 - 256
* Pattern: [a-zA-Z0-9_.-]+
* * @return

* The name of the stream. *

*/ public String getStreamName() { return streamName; } /** *

* The name of the stream. *

*

* Constraints:
* Length: 1 - 256
* Pattern: [a-zA-Z0-9_.-]+
* * @param streamName

* The name of the stream. *

*/ public void setStreamName(String streamName) { this.streamName = streamName; } /** *

* The name of the stream. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 256
* Pattern: [a-zA-Z0-9_.-]+
* * @param streamName

* The name of the stream. *

* @return A reference to this updated object so that method calls can be * chained together. */ public StreamInfo withStreamName(String streamName) { this.streamName = streamName; return this; } /** *

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

*

* Constraints:
* Length: 1 - 1024
* Pattern: * arn:[a-z\d-]+:kinesisvideo:[a-z0-9-]+:[0-9]+:[a-z]+/[a-zA- * Z0-9_.-]+/[0-9]+
* * @return

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

*/ public String getStreamARN() { return streamARN; } /** *

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

*

* Constraints:
* Length: 1 - 1024
* Pattern: * arn:[a-z\d-]+:kinesisvideo:[a-z0-9-]+:[0-9]+:[a-z]+/[a-zA- * Z0-9_.-]+/[0-9]+
* * @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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 1024
* Pattern: * arn:[a-z\d-]+:kinesisvideo:[a-z0-9-]+:[0-9]+:[a-z]+/[a-zA- * Z0-9_.-]+/[0-9]+
* * @param streamARN

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

* @return A reference to this updated object so that method calls can be * chained together. */ public StreamInfo withStreamARN(String streamARN) { this.streamARN = streamARN; return this; } /** *

* The MediaType of the stream. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [\w\-\.\+]+/[\w\-\.\+]+(,[\w\-\.\+]+/[\w\-\.\+]+)*
* * @return

* The MediaType of the stream. *

*/ public String getMediaType() { return mediaType; } /** *

* The MediaType of the stream. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [\w\-\.\+]+/[\w\-\.\+]+(,[\w\-\.\+]+/[\w\-\.\+]+)*
* * @param mediaType

* The MediaType of the stream. *

*/ public void setMediaType(String mediaType) { this.mediaType = mediaType; } /** *

* The MediaType of the stream. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 128
* Pattern: [\w\-\.\+]+/[\w\-\.\+]+(,[\w\-\.\+]+/[\w\-\.\+]+)*
* * @param mediaType

* The MediaType of the stream. *

* @return A reference to this updated object so that method calls can be * chained together. */ public StreamInfo withMediaType(String mediaType) { this.mediaType = mediaType; return this; } /** *

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

*

* Constraints:
* Length: 1 - 2048
* Pattern: .+
* * @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 kmsKeyId; } /** *

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

*

* Constraints:
* Length: 1 - 2048
* Pattern: .+
* * @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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 2048
* Pattern: .+
* * @param kmsKeyId

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

* @return A reference to this updated object so that method calls can be * chained together. */ public StreamInfo withKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; return this; } /** *

* The version of the stream. *

*

* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9]+
* * @return

* The version of the stream. *

*/ public String getVersion() { return version; } /** *

* The version of the stream. *

*

* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9]+
* * @param version

* The version of the stream. *

*/ public void setVersion(String version) { this.version = version; } /** *

* The version of the stream. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9]+
* * @param version

* The version of the stream. *

* @return A reference to this updated object so that method calls can be * chained together. */ public StreamInfo withVersion(String version) { this.version = version; return this; } /** *

* The status of the stream. *

*

* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING * * @return

* The status of the stream. *

* @see Status */ public String getStatus() { return status; } /** *

* The status of the stream. *

*

* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING * * @param status

* The status of the stream. *

* @see Status */ public void setStatus(String status) { this.status = status; } /** *

* The status of the stream. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING * * @param status

* The status of the stream. *

* @return A reference to this updated object so that method calls can be * chained together. * @see Status */ public StreamInfo withStatus(String status) { this.status = status; return this; } /** *

* The status of the stream. *

*

* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING * * @param status

* The status of the stream. *

* @see Status */ public void setStatus(Status status) { this.status = status.toString(); } /** *

* The status of the stream. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING * * @param status

* The status of the stream. *

* @return A reference to this updated 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. *

* * @return

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

*/ public java.util.Date getCreationTime() { return creationTime; } /** *

* 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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param creationTime

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

* @return A reference to this updated object so that method calls can be * chained together. */ public StreamInfo withCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; return this; } /** *

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

*

* Constraints:
* Range: 0 -
* * @return

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

*/ public Integer getDataRetentionInHours() { return dataRetentionInHours; } /** *

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

*

* Constraints:
* Range: 0 -
* * @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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Range: 0 -
* * @param dataRetentionInHours

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

* @return A reference to this updated object so that method calls can be * chained together. */ public StreamInfo withDataRetentionInHours(Integer dataRetentionInHours) { this.dataRetentionInHours = dataRetentionInHours; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @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: " + getDeviceName() + ","); if (getStreamName() != null) sb.append("StreamName: " + getStreamName() + ","); if (getStreamARN() != null) sb.append("StreamARN: " + getStreamARN() + ","); if (getMediaType() != null) sb.append("MediaType: " + getMediaType() + ","); if (getKmsKeyId() != null) sb.append("KmsKeyId: " + getKmsKeyId() + ","); if (getVersion() != null) sb.append("Version: " + getVersion() + ","); if (getStatus() != null) sb.append("Status: " + getStatus() + ","); if (getCreationTime() != null) sb.append("CreationTime: " + getCreationTime() + ","); if (getDataRetentionInHours() != null) sb.append("DataRetentionInHours: " + getDataRetentionInHours()); sb.append("}"); return sb.toString(); } @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 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; } }