/* * 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 properties for a numeric question in an evaluation form. *

*/ public class EvaluationFormNumericQuestionProperties implements Serializable { /** *

* The minimum answer value. *

*/ private Integer minValue; /** *

* The maximum answer value. *

*/ private Integer maxValue; /** *

* The scoring options of the numeric question. *

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

* The automation properties of the numeric question. *

*/ private EvaluationFormNumericQuestionAutomation automation; /** *

* The minimum answer value. *

* * @return

* The minimum answer value. *

*/ public Integer getMinValue() { return minValue; } /** *

* The minimum answer value. *

* * @param minValue

* The minimum answer value. *

*/ public void setMinValue(Integer minValue) { this.minValue = minValue; } /** *

* The minimum answer value. *

*

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

* The minimum answer value. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormNumericQuestionProperties withMinValue(Integer minValue) { this.minValue = minValue; return this; } /** *

* The maximum answer value. *

* * @return

* The maximum answer value. *

*/ public Integer getMaxValue() { return maxValue; } /** *

* The maximum answer value. *

* * @param maxValue

* The maximum answer value. *

*/ public void setMaxValue(Integer maxValue) { this.maxValue = maxValue; } /** *

* The maximum answer value. *

*

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

* The maximum answer value. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormNumericQuestionProperties withMaxValue(Integer maxValue) { this.maxValue = maxValue; return this; } /** *

* The scoring options of the numeric question. *

* * @return

* The scoring options of the numeric question. *

*/ public java.util.List getOptions() { return options; } /** *

* The scoring options of the numeric question. *

* * @param options

* The scoring options of the numeric question. *

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

* The scoring options of the numeric question. *

*

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

* The scoring options of the numeric question. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormNumericQuestionProperties withOptions( EvaluationFormNumericQuestionOption... options) { if (getOptions() == null) { this.options = new java.util.ArrayList( options.length); } for (EvaluationFormNumericQuestionOption value : options) { this.options.add(value); } return this; } /** *

* The scoring options of the numeric question. *

*

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

* The scoring options of the numeric question. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormNumericQuestionProperties withOptions( java.util.Collection options) { setOptions(options); return this; } /** *

* The automation properties of the numeric question. *

* * @return

* The automation properties of the numeric question. *

*/ public EvaluationFormNumericQuestionAutomation getAutomation() { return automation; } /** *

* The automation properties of the numeric question. *

* * @param automation

* The automation properties of the numeric question. *

*/ public void setAutomation(EvaluationFormNumericQuestionAutomation automation) { this.automation = automation; } /** *

* The automation properties of the numeric question. *

*

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

* The automation properties of the numeric question. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormNumericQuestionProperties withAutomation( EvaluationFormNumericQuestionAutomation automation) { this.automation = automation; 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 (getOptions() != null) sb.append("Options: " + getOptions() + ","); if (getAutomation() != null) sb.append("Automation: " + getAutomation()); 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 + ((getOptions() == null) ? 0 : getOptions().hashCode()); hashCode = prime * hashCode + ((getAutomation() == null) ? 0 : getAutomation().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EvaluationFormNumericQuestionProperties == false) return false; EvaluationFormNumericQuestionProperties other = (EvaluationFormNumericQuestionProperties) 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.getOptions() == null ^ this.getOptions() == null) return false; if (other.getOptions() != null && other.getOptions().equals(this.getOptions()) == false) return false; if (other.getAutomation() == null ^ this.getAutomation() == null) return false; if (other.getAutomation() != null && other.getAutomation().equals(this.getAutomation()) == false) return false; return true; } }