/* * 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.rekognition.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Summary information for an Amazon Rekognition Custom Labels dataset. For more information, see * ProjectDescription. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DatasetMetadata implements Serializable, Cloneable, StructuredPojo { /** ** The Unix timestamp for the date and time that the dataset was created. *
*/ private java.util.Date creationTimestamp; /** ** The type of the dataset. *
*/ private String datasetType; /** ** The Amazon Resource Name (ARN) for the dataset. *
*/ private String datasetArn; /** ** The status for the dataset. *
*/ 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. *
*/ private String statusMessageCode; /** ** The Unix timestamp for the date and time that the dataset was created. *
* * @param creationTimestamp * The Unix timestamp for the date and time that the dataset was created. */ public void setCreationTimestamp(java.util.Date creationTimestamp) { this.creationTimestamp = creationTimestamp; } /** ** The Unix timestamp for the date and time that the dataset was created. *
* * @return The Unix timestamp for the date and time that the dataset was created. */ public java.util.Date getCreationTimestamp() { return this.creationTimestamp; } /** ** The Unix timestamp for the date and time that the dataset was created. *
* * @param creationTimestamp * The Unix timestamp for the date and time that the dataset was created. * @return Returns a reference to this object so that method calls can be chained together. */ public DatasetMetadata withCreationTimestamp(java.util.Date creationTimestamp) { setCreationTimestamp(creationTimestamp); return this; } /** ** The type of the dataset. *
* * @param datasetType * The type of the dataset. * @see DatasetType */ public void setDatasetType(String datasetType) { this.datasetType = datasetType; } /** ** The type of the dataset. *
* * @return The type of the dataset. * @see DatasetType */ public String getDatasetType() { return this.datasetType; } /** ** The type of the dataset. *
* * @param datasetType * The type of the dataset. * @return Returns a reference to this object so that method calls can be chained together. * @see DatasetType */ public DatasetMetadata withDatasetType(String datasetType) { setDatasetType(datasetType); return this; } /** ** The type of the dataset. *
* * @param datasetType * The type of the dataset. * @return Returns a reference to this object so that method calls can be chained together. * @see DatasetType */ public DatasetMetadata withDatasetType(DatasetType datasetType) { this.datasetType = datasetType.toString(); return this; } /** ** The Amazon Resource Name (ARN) for the dataset. *
* * @param datasetArn * The Amazon Resource Name (ARN) for the dataset. */ public void setDatasetArn(String datasetArn) { this.datasetArn = datasetArn; } /** ** The Amazon Resource Name (ARN) for the dataset. *
* * @return The Amazon Resource Name (ARN) for the dataset. */ public String getDatasetArn() { return this.datasetArn; } /** ** The Amazon Resource Name (ARN) for the dataset. *
* * @param datasetArn * The Amazon Resource Name (ARN) for the dataset. * @return Returns a reference to this object so that method calls can be chained together. */ public DatasetMetadata withDatasetArn(String datasetArn) { setDatasetArn(datasetArn); return this; } /** ** The status for the dataset. *
* * @param status * The status for the dataset. * @see DatasetStatus */ public void setStatus(String status) { this.status = status; } /** ** The status for the dataset. *
* * @return The status for the dataset. * @see DatasetStatus */ public String getStatus() { return this.status; } /** ** The status for the dataset. *
* * @param status * The status for the dataset. * @return Returns a reference to this object so that method calls can be chained together. * @see DatasetStatus */ public DatasetMetadata withStatus(String status) { setStatus(status); return this; } /** ** The status for the dataset. *
* * @param status * The status for the dataset. * @return Returns a reference to this object so that method calls can be chained together. * @see DatasetStatus */ public DatasetMetadata withStatus(DatasetStatus status) { this.status = status.toString(); return this; } /** ** 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. *
* * @return The status message for the dataset. */ public String getStatusMessage() { return this.statusMessage; } /** ** The status message for the dataset. *
* * @param statusMessage * The status message for the dataset. * @return Returns a reference to this object so that method calls can be chained together. */ public DatasetMetadata withStatusMessage(String statusMessage) { setStatusMessage(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. *
* * @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. *
* * @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 this.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. *
* * @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 Returns a reference to this object so that method calls can be chained together. * @see DatasetStatusMessageCode */ public DatasetMetadata withStatusMessageCode(String statusMessageCode) { setStatusMessageCode(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. *
* * @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 Returns a reference to this object so that method calls can be chained together. * @see DatasetStatusMessageCode */ public DatasetMetadata withStatusMessageCode(DatasetStatusMessageCode statusMessageCode) { this.statusMessageCode = statusMessageCode.toString(); 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 (getCreationTimestamp() != null) sb.append("CreationTimestamp: ").append(getCreationTimestamp()).append(","); if (getDatasetType() != null) sb.append("DatasetType: ").append(getDatasetType()).append(","); if (getDatasetArn() != null) sb.append("DatasetArn: ").append(getDatasetArn()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getStatusMessage() != null) sb.append("StatusMessage: ").append(getStatusMessage()).append(","); if (getStatusMessageCode() != null) sb.append("StatusMessageCode: ").append(getStatusMessageCode()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DatasetMetadata == false) return false; DatasetMetadata other = (DatasetMetadata) obj; if (other.getCreationTimestamp() == null ^ this.getCreationTimestamp() == null) return false; if (other.getCreationTimestamp() != null && other.getCreationTimestamp().equals(this.getCreationTimestamp()) == false) return false; if (other.getDatasetType() == null ^ this.getDatasetType() == null) return false; if (other.getDatasetType() != null && other.getDatasetType().equals(this.getDatasetType()) == false) return false; if (other.getDatasetArn() == null ^ this.getDatasetArn() == null) return false; if (other.getDatasetArn() != null && other.getDatasetArn().equals(this.getDatasetArn()) == 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; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCreationTimestamp() == null) ? 0 : getCreationTimestamp().hashCode()); hashCode = prime * hashCode + ((getDatasetType() == null) ? 0 : getDatasetType().hashCode()); hashCode = prime * hashCode + ((getDatasetArn() == null) ? 0 : getDatasetArn().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()); return hashCode; } @Override public DatasetMetadata clone() { try { return (DatasetMetadata) 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.rekognition.model.transform.DatasetMetadataMarshaller.getInstance().marshall(this, protocolMarshaller); } }