/* * 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.connect.model; import java.io.Serializable; /** *
* Information about the option range used for scoring in numeric questions. *
*/ public class EvaluationFormNumericQuestionOption implements Serializable { /** ** The minimum answer value of the range option. *
*/ private Integer minValue; /** ** The maximum answer value of the range option. *
*/ private Integer maxValue; /** ** The score assigned to answer values within the range option. *
*
* Constraints:
* Range: 0 - 10
*/
private Integer score;
/**
*
* The flag to mark the option as automatic fail. If an automatic fail * answer is provided, the overall evaluation gets a score of 0. *
*/ private Boolean automaticFail; /** ** The minimum answer value of the range option. *
* * @return* The minimum answer value of the range option. *
*/ public Integer getMinValue() { return minValue; } /** ** The minimum answer value of the range option. *
* * @param minValue* The minimum answer value of the range option. *
*/ public void setMinValue(Integer minValue) { this.minValue = minValue; } /** ** The minimum answer value of the range option. *
** Returns a reference to this object so that method calls can be chained * together. * * @param minValue
* The minimum answer value of the range option. *
* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormNumericQuestionOption withMinValue(Integer minValue) { this.minValue = minValue; return this; } /** ** The maximum answer value of the range option. *
* * @return* The maximum answer value of the range option. *
*/ public Integer getMaxValue() { return maxValue; } /** ** The maximum answer value of the range option. *
* * @param maxValue* The maximum answer value of the range option. *
*/ public void setMaxValue(Integer maxValue) { this.maxValue = maxValue; } /** ** The maximum answer value of the range option. *
** Returns a reference to this object so that method calls can be chained * together. * * @param maxValue
* The maximum answer value of the range option. *
* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormNumericQuestionOption withMaxValue(Integer maxValue) { this.maxValue = maxValue; return this; } /** ** The score assigned to answer values within the range option. *
*
* Constraints:
* Range: 0 - 10
*
* @return
* The score assigned to answer values within the range option. *
*/ public Integer getScore() { return score; } /** ** The score assigned to answer values within the range option. *
*
* Constraints:
* Range: 0 - 10
*
* @param score
* The score assigned to answer values within the range option. *
*/ public void setScore(Integer score) { this.score = score; } /** ** The score assigned to answer values within the range option. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0 - 10
*
* @param score
* The score assigned to answer values within the range option. *
* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormNumericQuestionOption withScore(Integer score) { this.score = score; return this; } /** ** The flag to mark the option as automatic fail. If an automatic fail * answer is provided, the overall evaluation gets a score of 0. *
* * @return* The flag to mark the option as automatic fail. If an automatic * fail answer is provided, the overall evaluation gets a score of * 0. *
*/ public Boolean isAutomaticFail() { return automaticFail; } /** ** The flag to mark the option as automatic fail. If an automatic fail * answer is provided, the overall evaluation gets a score of 0. *
* * @return* The flag to mark the option as automatic fail. If an automatic * fail answer is provided, the overall evaluation gets a score of * 0. *
*/ public Boolean getAutomaticFail() { return automaticFail; } /** ** The flag to mark the option as automatic fail. If an automatic fail * answer is provided, the overall evaluation gets a score of 0. *
* * @param automaticFail* The flag to mark the option as automatic fail. If an automatic * fail answer is provided, the overall evaluation gets a score * of 0. *
*/ public void setAutomaticFail(Boolean automaticFail) { this.automaticFail = automaticFail; } /** ** The flag to mark the option as automatic fail. If an automatic fail * answer is provided, the overall evaluation gets a score of 0. *
** Returns a reference to this object so that method calls can be chained * together. * * @param automaticFail
* The flag to mark the option as automatic fail. If an automatic * fail answer is provided, the overall evaluation gets a score * of 0. *
* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormNumericQuestionOption withAutomaticFail(Boolean automaticFail) { this.automaticFail = automaticFail; 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 (getMinValue() != null) sb.append("MinValue: " + getMinValue() + ","); if (getMaxValue() != null) sb.append("MaxValue: " + getMaxValue() + ","); if (getScore() != null) sb.append("Score: " + getScore() + ","); if (getAutomaticFail() != null) sb.append("AutomaticFail: " + getAutomaticFail()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMinValue() == null) ? 0 : getMinValue().hashCode()); hashCode = prime * hashCode + ((getMaxValue() == null) ? 0 : getMaxValue().hashCode()); hashCode = prime * hashCode + ((getScore() == null) ? 0 : getScore().hashCode()); hashCode = prime * hashCode + ((getAutomaticFail() == null) ? 0 : getAutomaticFail().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EvaluationFormNumericQuestionOption == false) return false; EvaluationFormNumericQuestionOption other = (EvaluationFormNumericQuestionOption) obj; if (other.getMinValue() == null ^ this.getMinValue() == null) return false; if (other.getMinValue() != null && other.getMinValue().equals(this.getMinValue()) == false) return false; if (other.getMaxValue() == null ^ this.getMaxValue() == null) return false; if (other.getMaxValue() != null && other.getMaxValue().equals(this.getMaxValue()) == false) return false; if (other.getScore() == null ^ this.getScore() == null) return false; if (other.getScore() != null && other.getScore().equals(this.getScore()) == false) return false; if (other.getAutomaticFail() == null ^ this.getAutomaticFail() == null) return false; if (other.getAutomaticFail() != null && other.getAutomaticFail().equals(this.getAutomaticFail()) == false) return false; return true; } }