/* * 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.rekognition.model; import java.io.Serializable; /** *

* A description for a dataset. For more information, see * DescribeDataset. *

*

* The status fields Status, StatusMessage, and * StatusMessageCode reflect the last operation on the dataset. *

*/ public class DatasetDescription implements Serializable { /** *

* The Unix timestamp for the time and date that the dataset was created. *

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

* The Unix timestamp for the date and time that the dataset was last * updated. *

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

* The status of the dataset. *

*

* Constraints:
* Allowed Values: CREATE_IN_PROGRESS, CREATE_COMPLETE, * CREATE_FAILED, UPDATE_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_FAILED, * DELETE_IN_PROGRESS */ private String status; /** *

* The status message for the dataset. *

*/ private String statusMessage; /** *

* The status message code for the dataset operation. If a service error * occurs, try the API call again later. If a client error occurs, check the * input parameters to the dataset API call that failed. *

*

* Constraints:
* Allowed Values: SUCCESS, SERVICE_ERROR, CLIENT_ERROR */ private String statusMessageCode; /** *

* The status message code for the dataset. *

*/ private DatasetStats datasetStats; /** *

* The Unix timestamp for the time and date that the dataset was created. *

* * @return

* The Unix timestamp for the time and date that the dataset was * created. *

*/ public java.util.Date getCreationTimestamp() { return creationTimestamp; } /** *

* The Unix timestamp for the time and date that the dataset was created. *

* * @param creationTimestamp

* The Unix timestamp for the time and date that the dataset was * created. *

*/ public void setCreationTimestamp(java.util.Date creationTimestamp) { this.creationTimestamp = creationTimestamp; } /** *

* The Unix timestamp for the time and date that the dataset was created. *

*

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

* The Unix timestamp for the time and date that the dataset was * created. *

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

* The Unix timestamp for the date and time that the dataset was last * updated. *

* * @return

* The Unix timestamp for the date and time that the dataset was * last updated. *

*/ public java.util.Date getLastUpdatedTimestamp() { return lastUpdatedTimestamp; } /** *

* The Unix timestamp for the date and time that the dataset was last * updated. *

* * @param lastUpdatedTimestamp

* The Unix timestamp for the date and time that the dataset was * last updated. *

*/ public void setLastUpdatedTimestamp(java.util.Date lastUpdatedTimestamp) { this.lastUpdatedTimestamp = lastUpdatedTimestamp; } /** *

* The Unix timestamp for the date and time that the dataset was last * updated. *

*

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

* The Unix timestamp for the date and time that the dataset was * last updated. *

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

* The status of the dataset. *

*

* Constraints:
* Allowed Values: CREATE_IN_PROGRESS, CREATE_COMPLETE, * CREATE_FAILED, UPDATE_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_FAILED, * DELETE_IN_PROGRESS * * @return

* The status of the dataset. *

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

* The status of the dataset. *

*

* Constraints:
* Allowed Values: CREATE_IN_PROGRESS, CREATE_COMPLETE, * CREATE_FAILED, UPDATE_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_FAILED, * DELETE_IN_PROGRESS * * @param status

* The status of the dataset. *

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

* The status of the dataset. *

*

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

* Constraints:
* Allowed Values: CREATE_IN_PROGRESS, CREATE_COMPLETE, * CREATE_FAILED, UPDATE_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_FAILED, * DELETE_IN_PROGRESS * * @param status

* The status of the dataset. *

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

* The status of the dataset. *

*

* Constraints:
* Allowed Values: CREATE_IN_PROGRESS, CREATE_COMPLETE, * CREATE_FAILED, UPDATE_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_FAILED, * DELETE_IN_PROGRESS * * @param status

* The status of the dataset. *

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

* The status of the dataset. *

*

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

* Constraints:
* Allowed Values: CREATE_IN_PROGRESS, CREATE_COMPLETE, * CREATE_FAILED, UPDATE_IN_PROGRESS, UPDATE_COMPLETE, UPDATE_FAILED, * DELETE_IN_PROGRESS * * @param status

* The status of the dataset. *

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

* The status message for the dataset. *

* * @return

* The status message for the dataset. *

*/ public String getStatusMessage() { return statusMessage; } /** *

* The status message for the dataset. *

* * @param statusMessage

* The status message for the dataset. *

*/ public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } /** *

* The status message for the dataset. *

*

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

* The status message for the dataset. *

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

* The status message code for the dataset operation. If a service error * occurs, try the API call again later. If a client error occurs, check the * input parameters to the dataset API call that failed. *

*

* Constraints:
* Allowed Values: SUCCESS, SERVICE_ERROR, CLIENT_ERROR * * @return

* The status message code for the dataset operation. If a service * error occurs, try the API call again later. If a client error * occurs, check the input parameters to the dataset API call that * failed. *

* @see DatasetStatusMessageCode */ public String getStatusMessageCode() { return statusMessageCode; } /** *

* The status message code for the dataset operation. If a service error * occurs, try the API call again later. If a client error occurs, check the * input parameters to the dataset API call that failed. *

*

* Constraints:
* Allowed Values: SUCCESS, SERVICE_ERROR, CLIENT_ERROR * * @param statusMessageCode

* The status message code for the dataset operation. If a * service error occurs, try the API call again later. If a * client error occurs, check the input parameters to the dataset * API call that failed. *

* @see DatasetStatusMessageCode */ public void setStatusMessageCode(String statusMessageCode) { this.statusMessageCode = statusMessageCode; } /** *

* The status message code for the dataset operation. If a service error * occurs, try the API call again later. If a client error occurs, check the * input parameters to the dataset API call that failed. *

*

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

* Constraints:
* Allowed Values: SUCCESS, SERVICE_ERROR, CLIENT_ERROR * * @param statusMessageCode

* The status message code for the dataset operation. If a * service error occurs, try the API call again later. If a * client error occurs, check the input parameters to the dataset * API call that failed. *

* @return A reference to this updated object so that method calls can be * chained together. * @see DatasetStatusMessageCode */ public DatasetDescription withStatusMessageCode(String statusMessageCode) { this.statusMessageCode = statusMessageCode; return this; } /** *

* The status message code for the dataset operation. If a service error * occurs, try the API call again later. If a client error occurs, check the * input parameters to the dataset API call that failed. *

*

* Constraints:
* Allowed Values: SUCCESS, SERVICE_ERROR, CLIENT_ERROR * * @param statusMessageCode

* The status message code for the dataset operation. If a * service error occurs, try the API call again later. If a * client error occurs, check the input parameters to the dataset * API call that failed. *

* @see DatasetStatusMessageCode */ public void setStatusMessageCode(DatasetStatusMessageCode statusMessageCode) { this.statusMessageCode = statusMessageCode.toString(); } /** *

* The status message code for the dataset operation. If a service error * occurs, try the API call again later. If a client error occurs, check the * input parameters to the dataset API call that failed. *

*

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

* Constraints:
* Allowed Values: SUCCESS, SERVICE_ERROR, CLIENT_ERROR * * @param statusMessageCode

* The status message code for the dataset operation. If a * service error occurs, try the API call again later. If a * client error occurs, check the input parameters to the dataset * API call that failed. *

* @return A reference to this updated object so that method calls can be * chained together. * @see DatasetStatusMessageCode */ public DatasetDescription withStatusMessageCode(DatasetStatusMessageCode statusMessageCode) { this.statusMessageCode = statusMessageCode.toString(); return this; } /** *

* The status message code for the dataset. *

* * @return

* The status message code for the dataset. *

*/ public DatasetStats getDatasetStats() { return datasetStats; } /** *

* The status message code for the dataset. *

* * @param datasetStats

* The status message code for the dataset. *

*/ public void setDatasetStats(DatasetStats datasetStats) { this.datasetStats = datasetStats; } /** *

* The status message code for the dataset. *

*

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

* The status message code for the dataset. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetDescription withDatasetStats(DatasetStats datasetStats) { this.datasetStats = datasetStats; 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 (getCreationTimestamp() != null) sb.append("CreationTimestamp: " + getCreationTimestamp() + ","); if (getLastUpdatedTimestamp() != null) sb.append("LastUpdatedTimestamp: " + getLastUpdatedTimestamp() + ","); if (getStatus() != null) sb.append("Status: " + getStatus() + ","); if (getStatusMessage() != null) sb.append("StatusMessage: " + getStatusMessage() + ","); if (getStatusMessageCode() != null) sb.append("StatusMessageCode: " + getStatusMessageCode() + ","); if (getDatasetStats() != null) sb.append("DatasetStats: " + getDatasetStats()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCreationTimestamp() == null) ? 0 : getCreationTimestamp().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedTimestamp() == null) ? 0 : getLastUpdatedTimestamp().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); hashCode = prime * hashCode + ((getStatusMessageCode() == null) ? 0 : getStatusMessageCode().hashCode()); hashCode = prime * hashCode + ((getDatasetStats() == null) ? 0 : getDatasetStats().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DatasetDescription == false) return false; DatasetDescription other = (DatasetDescription) obj; if (other.getCreationTimestamp() == null ^ this.getCreationTimestamp() == null) return false; if (other.getCreationTimestamp() != null && other.getCreationTimestamp().equals(this.getCreationTimestamp()) == false) return false; if (other.getLastUpdatedTimestamp() == null ^ this.getLastUpdatedTimestamp() == null) return false; if (other.getLastUpdatedTimestamp() != null && other.getLastUpdatedTimestamp().equals(this.getLastUpdatedTimestamp()) == 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.getStatusMessage() == null ^ this.getStatusMessage() == null) return false; if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == false) return false; if (other.getStatusMessageCode() == null ^ this.getStatusMessageCode() == null) return false; if (other.getStatusMessageCode() != null && other.getStatusMessageCode().equals(this.getStatusMessageCode()) == false) return false; if (other.getDatasetStats() == null ^ this.getDatasetStats() == null) return false; if (other.getDatasetStats() != null && other.getDatasetStats().equals(this.getDatasetStats()) == false) return false; return true; } }