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

* The latest status of a stream’s edge to cloud uploader job. *

*/ public class LastUploaderStatus implements Serializable { /** *

* A description of an uploader job’s latest status. *

*/ private String jobStatusDetails; /** *

* The timestamp at which the uploader job was last executed and media * collected to the cloud. *

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

* The timestamp at which the uploader status was last updated. *

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

* The status of the latest uploader job. *

*

* Constraints:
* Allowed Values: SUCCESS, USER_ERROR, SYSTEM_ERROR */ private String uploaderStatus; /** *

* A description of an uploader job’s latest status. *

* * @return

* A description of an uploader job’s latest status. *

*/ public String getJobStatusDetails() { return jobStatusDetails; } /** *

* A description of an uploader job’s latest status. *

* * @param jobStatusDetails

* A description of an uploader job’s latest status. *

*/ public void setJobStatusDetails(String jobStatusDetails) { this.jobStatusDetails = jobStatusDetails; } /** *

* A description of an uploader job’s latest status. *

*

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

* A description of an uploader job’s latest status. *

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

* The timestamp at which the uploader job was last executed and media * collected to the cloud. *

* * @return

* The timestamp at which the uploader job was last executed and * media collected to the cloud. *

*/ public java.util.Date getLastCollectedTime() { return lastCollectedTime; } /** *

* The timestamp at which the uploader job was last executed and media * collected to the cloud. *

* * @param lastCollectedTime

* The timestamp at which the uploader job was last executed and * media collected to the cloud. *

*/ public void setLastCollectedTime(java.util.Date lastCollectedTime) { this.lastCollectedTime = lastCollectedTime; } /** *

* The timestamp at which the uploader job was last executed and media * collected to the cloud. *

*

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

* The timestamp at which the uploader job was last executed and * media collected to the cloud. *

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

* The timestamp at which the uploader status was last updated. *

* * @return

* The timestamp at which the uploader status was last updated. *

*/ public java.util.Date getLastUpdatedTime() { return lastUpdatedTime; } /** *

* The timestamp at which the uploader status was last updated. *

* * @param lastUpdatedTime

* The timestamp at which the uploader status was last updated. *

*/ public void setLastUpdatedTime(java.util.Date lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } /** *

* The timestamp at which the uploader status was last updated. *

*

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

* The timestamp at which the uploader status was last updated. *

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

* The status of the latest uploader job. *

*

* Constraints:
* Allowed Values: SUCCESS, USER_ERROR, SYSTEM_ERROR * * @return

* The status of the latest uploader job. *

* @see UploaderStatus */ public String getUploaderStatus() { return uploaderStatus; } /** *

* The status of the latest uploader job. *

*

* Constraints:
* Allowed Values: SUCCESS, USER_ERROR, SYSTEM_ERROR * * @param uploaderStatus

* The status of the latest uploader job. *

* @see UploaderStatus */ public void setUploaderStatus(String uploaderStatus) { this.uploaderStatus = uploaderStatus; } /** *

* The status of the latest uploader job. *

*

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

* Constraints:
* Allowed Values: SUCCESS, USER_ERROR, SYSTEM_ERROR * * @param uploaderStatus

* The status of the latest uploader job. *

* @return A reference to this updated object so that method calls can be * chained together. * @see UploaderStatus */ public LastUploaderStatus withUploaderStatus(String uploaderStatus) { this.uploaderStatus = uploaderStatus; return this; } /** *

* The status of the latest uploader job. *

*

* Constraints:
* Allowed Values: SUCCESS, USER_ERROR, SYSTEM_ERROR * * @param uploaderStatus

* The status of the latest uploader job. *

* @see UploaderStatus */ public void setUploaderStatus(UploaderStatus uploaderStatus) { this.uploaderStatus = uploaderStatus.toString(); } /** *

* The status of the latest uploader job. *

*

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

* Constraints:
* Allowed Values: SUCCESS, USER_ERROR, SYSTEM_ERROR * * @param uploaderStatus

* The status of the latest uploader job. *

* @return A reference to this updated object so that method calls can be * chained together. * @see UploaderStatus */ public LastUploaderStatus withUploaderStatus(UploaderStatus uploaderStatus) { this.uploaderStatus = uploaderStatus.toString(); 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 (getJobStatusDetails() != null) sb.append("JobStatusDetails: " + getJobStatusDetails() + ","); if (getLastCollectedTime() != null) sb.append("LastCollectedTime: " + getLastCollectedTime() + ","); if (getLastUpdatedTime() != null) sb.append("LastUpdatedTime: " + getLastUpdatedTime() + ","); if (getUploaderStatus() != null) sb.append("UploaderStatus: " + getUploaderStatus()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobStatusDetails() == null) ? 0 : getJobStatusDetails().hashCode()); hashCode = prime * hashCode + ((getLastCollectedTime() == null) ? 0 : getLastCollectedTime().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedTime() == null) ? 0 : getLastUpdatedTime().hashCode()); hashCode = prime * hashCode + ((getUploaderStatus() == null) ? 0 : getUploaderStatus().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LastUploaderStatus == false) return false; LastUploaderStatus other = (LastUploaderStatus) obj; if (other.getJobStatusDetails() == null ^ this.getJobStatusDetails() == null) return false; if (other.getJobStatusDetails() != null && other.getJobStatusDetails().equals(this.getJobStatusDetails()) == false) return false; if (other.getLastCollectedTime() == null ^ this.getLastCollectedTime() == null) return false; if (other.getLastCollectedTime() != null && other.getLastCollectedTime().equals(this.getLastCollectedTime()) == false) return false; if (other.getLastUpdatedTime() == null ^ this.getLastUpdatedTime() == null) return false; if (other.getLastUpdatedTime() != null && other.getLastUpdatedTime().equals(this.getLastUpdatedTime()) == false) return false; if (other.getUploaderStatus() == null ^ this.getUploaderStatus() == null) return false; if (other.getUploaderStatus() != null && other.getUploaderStatus().equals(this.getUploaderStatus()) == false) return false; return true; } }