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

* A description of a version of an Amazon Rekognition Custom Labels model. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ProjectVersionDescription implements Serializable, Cloneable, StructuredPojo { /** *

* The Amazon Resource Name (ARN) of the model version. *

*/ private String projectVersionArn; /** *

* The Unix datetime for the date and time that training started. *

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

* The minimum number of inference units used by the model. For more information, see StartProjectVersion. *

*/ private Integer minInferenceUnits; /** *

* The current status of the model version. *

*/ private String status; /** *

* A descriptive message for an error or warning that occurred. *

*/ private String statusMessage; /** *

* The duration, in seconds, that you were billed for a successful training of the model version. This value is only * returned if the model version has been successfully trained. *

*/ private Long billableTrainingTimeInSeconds; /** *

* The Unix date and time that training of the model ended. *

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

* The location where training results are saved. *

*/ private OutputConfig outputConfig; /** *

* Contains information about the training results. *

*/ private TrainingDataResult trainingDataResult; /** *

* Contains information about the testing results. *

*/ private TestingDataResult testingDataResult; /** *

* The training results. EvaluationResult is only returned if training is successful. *

*/ private EvaluationResult evaluationResult; /** *

* The location of the summary manifest. The summary manifest provides aggregate data validation results for the * training and test datasets. *

*/ private GroundTruthManifest manifestSummary; /** *

* The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model during * training. *

*/ private String kmsKeyId; /** *

* The maximum number of inference units Amazon Rekognition Custom Labels uses to auto-scale the model. For more * information, see StartProjectVersion. *

*/ private Integer maxInferenceUnits; /** *

* If the model version was copied from a different project, SourceProjectVersionArn contains the ARN * of the source model version. *

*/ private String sourceProjectVersionArn; /** *

* The Amazon Resource Name (ARN) of the model version. *

* * @param projectVersionArn * The Amazon Resource Name (ARN) of the model version. */ public void setProjectVersionArn(String projectVersionArn) { this.projectVersionArn = projectVersionArn; } /** *

* The Amazon Resource Name (ARN) of the model version. *

* * @return The Amazon Resource Name (ARN) of the model version. */ public String getProjectVersionArn() { return this.projectVersionArn; } /** *

* The Amazon Resource Name (ARN) of the model version. *

* * @param projectVersionArn * The Amazon Resource Name (ARN) of the model version. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withProjectVersionArn(String projectVersionArn) { setProjectVersionArn(projectVersionArn); return this; } /** *

* The Unix datetime for the date and time that training started. *

* * @param creationTimestamp * The Unix datetime for the date and time that training started. */ public void setCreationTimestamp(java.util.Date creationTimestamp) { this.creationTimestamp = creationTimestamp; } /** *

* The Unix datetime for the date and time that training started. *

* * @return The Unix datetime for the date and time that training started. */ public java.util.Date getCreationTimestamp() { return this.creationTimestamp; } /** *

* The Unix datetime for the date and time that training started. *

* * @param creationTimestamp * The Unix datetime for the date and time that training started. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withCreationTimestamp(java.util.Date creationTimestamp) { setCreationTimestamp(creationTimestamp); return this; } /** *

* The minimum number of inference units used by the model. For more information, see StartProjectVersion. *

* * @param minInferenceUnits * The minimum number of inference units used by the model. For more information, see * StartProjectVersion. */ public void setMinInferenceUnits(Integer minInferenceUnits) { this.minInferenceUnits = minInferenceUnits; } /** *

* The minimum number of inference units used by the model. For more information, see StartProjectVersion. *

* * @return The minimum number of inference units used by the model. For more information, see * StartProjectVersion. */ public Integer getMinInferenceUnits() { return this.minInferenceUnits; } /** *

* The minimum number of inference units used by the model. For more information, see StartProjectVersion. *

* * @param minInferenceUnits * The minimum number of inference units used by the model. For more information, see * StartProjectVersion. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withMinInferenceUnits(Integer minInferenceUnits) { setMinInferenceUnits(minInferenceUnits); return this; } /** *

* The current status of the model version. *

* * @param status * The current status of the model version. * @see ProjectVersionStatus */ public void setStatus(String status) { this.status = status; } /** *

* The current status of the model version. *

* * @return The current status of the model version. * @see ProjectVersionStatus */ public String getStatus() { return this.status; } /** *

* The current status of the model version. *

* * @param status * The current status of the model version. * @return Returns a reference to this object so that method calls can be chained together. * @see ProjectVersionStatus */ public ProjectVersionDescription withStatus(String status) { setStatus(status); return this; } /** *

* The current status of the model version. *

* * @param status * The current status of the model version. * @return Returns a reference to this object so that method calls can be chained together. * @see ProjectVersionStatus */ public ProjectVersionDescription withStatus(ProjectVersionStatus status) { this.status = status.toString(); return this; } /** *

* A descriptive message for an error or warning that occurred. *

* * @param statusMessage * A descriptive message for an error or warning that occurred. */ public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } /** *

* A descriptive message for an error or warning that occurred. *

* * @return A descriptive message for an error or warning that occurred. */ public String getStatusMessage() { return this.statusMessage; } /** *

* A descriptive message for an error or warning that occurred. *

* * @param statusMessage * A descriptive message for an error or warning that occurred. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withStatusMessage(String statusMessage) { setStatusMessage(statusMessage); return this; } /** *

* The duration, in seconds, that you were billed for a successful training of the model version. This value is only * returned if the model version has been successfully trained. *

* * @param billableTrainingTimeInSeconds * The duration, in seconds, that you were billed for a successful training of the model version. This value * is only returned if the model version has been successfully trained. */ public void setBillableTrainingTimeInSeconds(Long billableTrainingTimeInSeconds) { this.billableTrainingTimeInSeconds = billableTrainingTimeInSeconds; } /** *

* The duration, in seconds, that you were billed for a successful training of the model version. This value is only * returned if the model version has been successfully trained. *

* * @return The duration, in seconds, that you were billed for a successful training of the model version. This value * is only returned if the model version has been successfully trained. */ public Long getBillableTrainingTimeInSeconds() { return this.billableTrainingTimeInSeconds; } /** *

* The duration, in seconds, that you were billed for a successful training of the model version. This value is only * returned if the model version has been successfully trained. *

* * @param billableTrainingTimeInSeconds * The duration, in seconds, that you were billed for a successful training of the model version. This value * is only returned if the model version has been successfully trained. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withBillableTrainingTimeInSeconds(Long billableTrainingTimeInSeconds) { setBillableTrainingTimeInSeconds(billableTrainingTimeInSeconds); return this; } /** *

* The Unix date and time that training of the model ended. *

* * @param trainingEndTimestamp * The Unix date and time that training of the model ended. */ public void setTrainingEndTimestamp(java.util.Date trainingEndTimestamp) { this.trainingEndTimestamp = trainingEndTimestamp; } /** *

* The Unix date and time that training of the model ended. *

* * @return The Unix date and time that training of the model ended. */ public java.util.Date getTrainingEndTimestamp() { return this.trainingEndTimestamp; } /** *

* The Unix date and time that training of the model ended. *

* * @param trainingEndTimestamp * The Unix date and time that training of the model ended. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withTrainingEndTimestamp(java.util.Date trainingEndTimestamp) { setTrainingEndTimestamp(trainingEndTimestamp); return this; } /** *

* The location where training results are saved. *

* * @param outputConfig * The location where training results are saved. */ public void setOutputConfig(OutputConfig outputConfig) { this.outputConfig = outputConfig; } /** *

* The location where training results are saved. *

* * @return The location where training results are saved. */ public OutputConfig getOutputConfig() { return this.outputConfig; } /** *

* The location where training results are saved. *

* * @param outputConfig * The location where training results are saved. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withOutputConfig(OutputConfig outputConfig) { setOutputConfig(outputConfig); return this; } /** *

* Contains information about the training results. *

* * @param trainingDataResult * Contains information about the training results. */ public void setTrainingDataResult(TrainingDataResult trainingDataResult) { this.trainingDataResult = trainingDataResult; } /** *

* Contains information about the training results. *

* * @return Contains information about the training results. */ public TrainingDataResult getTrainingDataResult() { return this.trainingDataResult; } /** *

* Contains information about the training results. *

* * @param trainingDataResult * Contains information about the training results. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withTrainingDataResult(TrainingDataResult trainingDataResult) { setTrainingDataResult(trainingDataResult); return this; } /** *

* Contains information about the testing results. *

* * @param testingDataResult * Contains information about the testing results. */ public void setTestingDataResult(TestingDataResult testingDataResult) { this.testingDataResult = testingDataResult; } /** *

* Contains information about the testing results. *

* * @return Contains information about the testing results. */ public TestingDataResult getTestingDataResult() { return this.testingDataResult; } /** *

* Contains information about the testing results. *

* * @param testingDataResult * Contains information about the testing results. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withTestingDataResult(TestingDataResult testingDataResult) { setTestingDataResult(testingDataResult); return this; } /** *

* The training results. EvaluationResult is only returned if training is successful. *

* * @param evaluationResult * The training results. EvaluationResult is only returned if training is successful. */ public void setEvaluationResult(EvaluationResult evaluationResult) { this.evaluationResult = evaluationResult; } /** *

* The training results. EvaluationResult is only returned if training is successful. *

* * @return The training results. EvaluationResult is only returned if training is successful. */ public EvaluationResult getEvaluationResult() { return this.evaluationResult; } /** *

* The training results. EvaluationResult is only returned if training is successful. *

* * @param evaluationResult * The training results. EvaluationResult is only returned if training is successful. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withEvaluationResult(EvaluationResult evaluationResult) { setEvaluationResult(evaluationResult); return this; } /** *

* The location of the summary manifest. The summary manifest provides aggregate data validation results for the * training and test datasets. *

* * @param manifestSummary * The location of the summary manifest. The summary manifest provides aggregate data validation results for * the training and test datasets. */ public void setManifestSummary(GroundTruthManifest manifestSummary) { this.manifestSummary = manifestSummary; } /** *

* The location of the summary manifest. The summary manifest provides aggregate data validation results for the * training and test datasets. *

* * @return The location of the summary manifest. The summary manifest provides aggregate data validation results for * the training and test datasets. */ public GroundTruthManifest getManifestSummary() { return this.manifestSummary; } /** *

* The location of the summary manifest. The summary manifest provides aggregate data validation results for the * training and test datasets. *

* * @param manifestSummary * The location of the summary manifest. The summary manifest provides aggregate data validation results for * the training and test datasets. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withManifestSummary(GroundTruthManifest manifestSummary) { setManifestSummary(manifestSummary); return this; } /** *

* The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model during * training. *

* * @param kmsKeyId * The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model * during training. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *

* The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model during * training. *

* * @return The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model * during training. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *

* The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model during * training. *

* * @param kmsKeyId * The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model * during training. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *

* The maximum number of inference units Amazon Rekognition Custom Labels uses to auto-scale the model. For more * information, see StartProjectVersion. *

* * @param maxInferenceUnits * The maximum number of inference units Amazon Rekognition Custom Labels uses to auto-scale the model. For * more information, see StartProjectVersion. */ public void setMaxInferenceUnits(Integer maxInferenceUnits) { this.maxInferenceUnits = maxInferenceUnits; } /** *

* The maximum number of inference units Amazon Rekognition Custom Labels uses to auto-scale the model. For more * information, see StartProjectVersion. *

* * @return The maximum number of inference units Amazon Rekognition Custom Labels uses to auto-scale the model. For * more information, see StartProjectVersion. */ public Integer getMaxInferenceUnits() { return this.maxInferenceUnits; } /** *

* The maximum number of inference units Amazon Rekognition Custom Labels uses to auto-scale the model. For more * information, see StartProjectVersion. *

* * @param maxInferenceUnits * The maximum number of inference units Amazon Rekognition Custom Labels uses to auto-scale the model. For * more information, see StartProjectVersion. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withMaxInferenceUnits(Integer maxInferenceUnits) { setMaxInferenceUnits(maxInferenceUnits); return this; } /** *

* If the model version was copied from a different project, SourceProjectVersionArn contains the ARN * of the source model version. *

* * @param sourceProjectVersionArn * If the model version was copied from a different project, SourceProjectVersionArn contains * the ARN of the source model version. */ public void setSourceProjectVersionArn(String sourceProjectVersionArn) { this.sourceProjectVersionArn = sourceProjectVersionArn; } /** *

* If the model version was copied from a different project, SourceProjectVersionArn contains the ARN * of the source model version. *

* * @return If the model version was copied from a different project, SourceProjectVersionArn contains * the ARN of the source model version. */ public String getSourceProjectVersionArn() { return this.sourceProjectVersionArn; } /** *

* If the model version was copied from a different project, SourceProjectVersionArn contains the ARN * of the source model version. *

* * @param sourceProjectVersionArn * If the model version was copied from a different project, SourceProjectVersionArn contains * the ARN of the source model version. * @return Returns a reference to this object so that method calls can be chained together. */ public ProjectVersionDescription withSourceProjectVersionArn(String sourceProjectVersionArn) { setSourceProjectVersionArn(sourceProjectVersionArn); 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 (getProjectVersionArn() != null) sb.append("ProjectVersionArn: ").append(getProjectVersionArn()).append(","); if (getCreationTimestamp() != null) sb.append("CreationTimestamp: ").append(getCreationTimestamp()).append(","); if (getMinInferenceUnits() != null) sb.append("MinInferenceUnits: ").append(getMinInferenceUnits()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getStatusMessage() != null) sb.append("StatusMessage: ").append(getStatusMessage()).append(","); if (getBillableTrainingTimeInSeconds() != null) sb.append("BillableTrainingTimeInSeconds: ").append(getBillableTrainingTimeInSeconds()).append(","); if (getTrainingEndTimestamp() != null) sb.append("TrainingEndTimestamp: ").append(getTrainingEndTimestamp()).append(","); if (getOutputConfig() != null) sb.append("OutputConfig: ").append(getOutputConfig()).append(","); if (getTrainingDataResult() != null) sb.append("TrainingDataResult: ").append(getTrainingDataResult()).append(","); if (getTestingDataResult() != null) sb.append("TestingDataResult: ").append(getTestingDataResult()).append(","); if (getEvaluationResult() != null) sb.append("EvaluationResult: ").append(getEvaluationResult()).append(","); if (getManifestSummary() != null) sb.append("ManifestSummary: ").append(getManifestSummary()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getMaxInferenceUnits() != null) sb.append("MaxInferenceUnits: ").append(getMaxInferenceUnits()).append(","); if (getSourceProjectVersionArn() != null) sb.append("SourceProjectVersionArn: ").append(getSourceProjectVersionArn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProjectVersionDescription == false) return false; ProjectVersionDescription other = (ProjectVersionDescription) obj; if (other.getProjectVersionArn() == null ^ this.getProjectVersionArn() == null) return false; if (other.getProjectVersionArn() != null && other.getProjectVersionArn().equals(this.getProjectVersionArn()) == 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.getMinInferenceUnits() == null ^ this.getMinInferenceUnits() == null) return false; if (other.getMinInferenceUnits() != null && other.getMinInferenceUnits().equals(this.getMinInferenceUnits()) == 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.getBillableTrainingTimeInSeconds() == null ^ this.getBillableTrainingTimeInSeconds() == null) return false; if (other.getBillableTrainingTimeInSeconds() != null && other.getBillableTrainingTimeInSeconds().equals(this.getBillableTrainingTimeInSeconds()) == false) return false; if (other.getTrainingEndTimestamp() == null ^ this.getTrainingEndTimestamp() == null) return false; if (other.getTrainingEndTimestamp() != null && other.getTrainingEndTimestamp().equals(this.getTrainingEndTimestamp()) == false) return false; if (other.getOutputConfig() == null ^ this.getOutputConfig() == null) return false; if (other.getOutputConfig() != null && other.getOutputConfig().equals(this.getOutputConfig()) == false) return false; if (other.getTrainingDataResult() == null ^ this.getTrainingDataResult() == null) return false; if (other.getTrainingDataResult() != null && other.getTrainingDataResult().equals(this.getTrainingDataResult()) == false) return false; if (other.getTestingDataResult() == null ^ this.getTestingDataResult() == null) return false; if (other.getTestingDataResult() != null && other.getTestingDataResult().equals(this.getTestingDataResult()) == false) return false; if (other.getEvaluationResult() == null ^ this.getEvaluationResult() == null) return false; if (other.getEvaluationResult() != null && other.getEvaluationResult().equals(this.getEvaluationResult()) == false) return false; if (other.getManifestSummary() == null ^ this.getManifestSummary() == null) return false; if (other.getManifestSummary() != null && other.getManifestSummary().equals(this.getManifestSummary()) == 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.getMaxInferenceUnits() == null ^ this.getMaxInferenceUnits() == null) return false; if (other.getMaxInferenceUnits() != null && other.getMaxInferenceUnits().equals(this.getMaxInferenceUnits()) == false) return false; if (other.getSourceProjectVersionArn() == null ^ this.getSourceProjectVersionArn() == null) return false; if (other.getSourceProjectVersionArn() != null && other.getSourceProjectVersionArn().equals(this.getSourceProjectVersionArn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProjectVersionArn() == null) ? 0 : getProjectVersionArn().hashCode()); hashCode = prime * hashCode + ((getCreationTimestamp() == null) ? 0 : getCreationTimestamp().hashCode()); hashCode = prime * hashCode + ((getMinInferenceUnits() == null) ? 0 : getMinInferenceUnits().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode()); hashCode = prime * hashCode + ((getBillableTrainingTimeInSeconds() == null) ? 0 : getBillableTrainingTimeInSeconds().hashCode()); hashCode = prime * hashCode + ((getTrainingEndTimestamp() == null) ? 0 : getTrainingEndTimestamp().hashCode()); hashCode = prime * hashCode + ((getOutputConfig() == null) ? 0 : getOutputConfig().hashCode()); hashCode = prime * hashCode + ((getTrainingDataResult() == null) ? 0 : getTrainingDataResult().hashCode()); hashCode = prime * hashCode + ((getTestingDataResult() == null) ? 0 : getTestingDataResult().hashCode()); hashCode = prime * hashCode + ((getEvaluationResult() == null) ? 0 : getEvaluationResult().hashCode()); hashCode = prime * hashCode + ((getManifestSummary() == null) ? 0 : getManifestSummary().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getMaxInferenceUnits() == null) ? 0 : getMaxInferenceUnits().hashCode()); hashCode = prime * hashCode + ((getSourceProjectVersionArn() == null) ? 0 : getSourceProjectVersionArn().hashCode()); return hashCode; } @Override public ProjectVersionDescription clone() { try { return (ProjectVersionDescription) 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.ProjectVersionDescriptionMarshaller.getInstance().marshall(this, protocolMarshaller); } }