/* * 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 of an Amazon Rekognition Custom Labels project. For more * information, see DescribeProjects. *

*/ public class ProjectDescription implements Serializable { /** *

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

*

* Constraints:
* Length: 20 - 2048
* Pattern: * (^arn:[a-z\d-]+:rekognition:[a-z\d-]+:\d{12}:project\/[a-zA * -Z0-9_.\-]{1,255}\/[0-9]+$)
*/ private String projectArn; /** *

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

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

* The current status of the project. *

*

* Constraints:
* Allowed Values: CREATING, CREATED, DELETING */ private String status; /** *

* Information about the training and test datasets in the project. *

*/ private java.util.List datasets; /** *

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

*

* Constraints:
* Length: 20 - 2048
* Pattern: * (^arn:[a-z\d-]+:rekognition:[a-z\d-]+:\d{12}:project\/[a-zA * -Z0-9_.\-]{1,255}\/[0-9]+$)
* * @return

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

*/ public String getProjectArn() { return projectArn; } /** *

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

*

* Constraints:
* Length: 20 - 2048
* Pattern: * (^arn:[a-z\d-]+:rekognition:[a-z\d-]+:\d{12}:project\/[a-zA * -Z0-9_.\-]{1,255}\/[0-9]+$)
* * @param projectArn

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

*/ public void setProjectArn(String projectArn) { this.projectArn = projectArn; } /** *

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

*

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

* Constraints:
* Length: 20 - 2048
* Pattern: * (^arn:[a-z\d-]+:rekognition:[a-z\d-]+:\d{12}:project\/[a-zA * -Z0-9_.\-]{1,255}\/[0-9]+$)
* * @param projectArn

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

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

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

* * @return

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

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

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

* * @param creationTimestamp

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

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

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

*

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

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

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

* The current status of the project. *

*

* Constraints:
* Allowed Values: CREATING, CREATED, DELETING * * @return

* The current status of the project. *

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

* The current status of the project. *

*

* Constraints:
* Allowed Values: CREATING, CREATED, DELETING * * @param status

* The current status of the project. *

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

* The current status of the project. *

*

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

* Constraints:
* Allowed Values: CREATING, CREATED, DELETING * * @param status

* The current status of the project. *

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

* The current status of the project. *

*

* Constraints:
* Allowed Values: CREATING, CREATED, DELETING * * @param status

* The current status of the project. *

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

* The current status of the project. *

*

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

* Constraints:
* Allowed Values: CREATING, CREATED, DELETING * * @param status

* The current status of the project. *

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

* Information about the training and test datasets in the project. *

* * @return

* Information about the training and test datasets in the project. *

*/ public java.util.List getDatasets() { return datasets; } /** *

* Information about the training and test datasets in the project. *

* * @param datasets

* Information about the training and test datasets in the * project. *

*/ public void setDatasets(java.util.Collection datasets) { if (datasets == null) { this.datasets = null; return; } this.datasets = new java.util.ArrayList(datasets); } /** *

* Information about the training and test datasets in the project. *

*

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

* Information about the training and test datasets in the * project. *

* @return A reference to this updated object so that method calls can be * chained together. */ public ProjectDescription withDatasets(DatasetMetadata... datasets) { if (getDatasets() == null) { this.datasets = new java.util.ArrayList(datasets.length); } for (DatasetMetadata value : datasets) { this.datasets.add(value); } return this; } /** *

* Information about the training and test datasets in the project. *

*

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

* Information about the training and test datasets in the * project. *

* @return A reference to this updated object so that method calls can be * chained together. */ public ProjectDescription withDatasets(java.util.Collection datasets) { setDatasets(datasets); 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 (getProjectArn() != null) sb.append("ProjectArn: " + getProjectArn() + ","); if (getCreationTimestamp() != null) sb.append("CreationTimestamp: " + getCreationTimestamp() + ","); if (getStatus() != null) sb.append("Status: " + getStatus() + ","); if (getDatasets() != null) sb.append("Datasets: " + getDatasets()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProjectArn() == null) ? 0 : getProjectArn().hashCode()); hashCode = prime * hashCode + ((getCreationTimestamp() == null) ? 0 : getCreationTimestamp().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getDatasets() == null) ? 0 : getDatasets().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProjectDescription == false) return false; ProjectDescription other = (ProjectDescription) obj; if (other.getProjectArn() == null ^ this.getProjectArn() == null) return false; if (other.getProjectArn() != null && other.getProjectArn().equals(this.getProjectArn()) == false) return false; if (other.getCreationTimestamp() == null ^ this.getCreationTimestamp() == null) return false; if (other.getCreationTimestamp() != null && other.getCreationTimestamp().equals(this.getCreationTimestamp()) == 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.getDatasets() == null ^ this.getDatasets() == null) return false; if (other.getDatasets() != null && other.getDatasets().equals(this.getDatasets()) == false) return false; return true; } }