/* * 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; /** *
* Sagemaker Groundtruth format manifest files for the input, output and * validation datasets that are used and created during testing. *
*/ public class TestingDataResult implements Serializable { /** ** The testing dataset that was supplied for training. *
*/ private TestingData input; /** ** The subset of the dataset that was actually tested. Some images (assets) * might not be tested due to file formatting and other issues. *
*/ private TestingData output; /** ** The location of the data validation manifest. The data validation * manifest is created for the test dataset during model training. *
*/ private ValidationData validation; /** ** The testing dataset that was supplied for training. *
* * @return* The testing dataset that was supplied for training. *
*/ public TestingData getInput() { return input; } /** ** The testing dataset that was supplied for training. *
* * @param input* The testing dataset that was supplied for training. *
*/ public void setInput(TestingData input) { this.input = input; } /** ** The testing dataset that was supplied for training. *
** Returns a reference to this object so that method calls can be chained * together. * * @param input
* The testing dataset that was supplied for training. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TestingDataResult withInput(TestingData input) { this.input = input; return this; } /** ** The subset of the dataset that was actually tested. Some images (assets) * might not be tested due to file formatting and other issues. *
* * @return* The subset of the dataset that was actually tested. Some images * (assets) might not be tested due to file formatting and other * issues. *
*/ public TestingData getOutput() { return output; } /** ** The subset of the dataset that was actually tested. Some images (assets) * might not be tested due to file formatting and other issues. *
* * @param output* The subset of the dataset that was actually tested. Some * images (assets) might not be tested due to file formatting and * other issues. *
*/ public void setOutput(TestingData output) { this.output = output; } /** ** The subset of the dataset that was actually tested. Some images (assets) * might not be tested due to file formatting and other issues. *
** Returns a reference to this object so that method calls can be chained * together. * * @param output
* The subset of the dataset that was actually tested. Some * images (assets) might not be tested due to file formatting and * other issues. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TestingDataResult withOutput(TestingData output) { this.output = output; return this; } /** ** The location of the data validation manifest. The data validation * manifest is created for the test dataset during model training. *
* * @return* The location of the data validation manifest. The data validation * manifest is created for the test dataset during model training. *
*/ public ValidationData getValidation() { return validation; } /** ** The location of the data validation manifest. The data validation * manifest is created for the test dataset during model training. *
* * @param validation* The location of the data validation manifest. The data * validation manifest is created for the test dataset during * model training. *
*/ public void setValidation(ValidationData validation) { this.validation = validation; } /** ** The location of the data validation manifest. The data validation * manifest is created for the test dataset during model training. *
** Returns a reference to this object so that method calls can be chained * together. * * @param validation
* The location of the data validation manifest. The data * validation manifest is created for the test dataset during * model training. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TestingDataResult withValidation(ValidationData validation) { this.validation = validation; 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 (getInput() != null) sb.append("Input: " + getInput() + ","); if (getOutput() != null) sb.append("Output: " + getOutput() + ","); if (getValidation() != null) sb.append("Validation: " + getValidation()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInput() == null) ? 0 : getInput().hashCode()); hashCode = prime * hashCode + ((getOutput() == null) ? 0 : getOutput().hashCode()); hashCode = prime * hashCode + ((getValidation() == null) ? 0 : getValidation().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TestingDataResult == false) return false; TestingDataResult other = (TestingDataResult) obj; if (other.getInput() == null ^ this.getInput() == null) return false; if (other.getInput() != null && other.getInput().equals(this.getInput()) == false) return false; if (other.getOutput() == null ^ this.getOutput() == null) return false; if (other.getOutput() != null && other.getOutput().equals(this.getOutput()) == false) return false; if (other.getValidation() == null ^ this.getValidation() == null) return false; if (other.getValidation() != null && other.getValidation().equals(this.getValidation()) == false) return false; return true; } }