/* * 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 options in single select questions. *
*/ public class EvaluationFormSingleSelectQuestionProperties implements Serializable { /** ** The answer options of the single select question. *
*/ private java.util.List* The display mode of the single select question. *
*
* Constraints:
* Allowed Values: DROPDOWN, RADIO
*/
private String displayAs;
/**
*
* The display mode of the single select question. *
*/ private EvaluationFormSingleSelectQuestionAutomation automation; /** ** The answer options of the single select question. *
* * @return* The answer options of the single select question. *
*/ public java.util.List* The answer options of the single select question. *
* * @param options* The answer options of the single select question. *
*/ public void setOptions(java.util.Collection* The answer options of the single select question. *
** Returns a reference to this object so that method calls can be chained * together. * * @param options
* The answer options of the single select question. *
* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormSingleSelectQuestionProperties withOptions( EvaluationFormSingleSelectQuestionOption... options) { if (getOptions() == null) { this.options = new java.util.ArrayList* The answer options of the single select question. *
** Returns a reference to this object so that method calls can be chained * together. * * @param options
* The answer options of the single select question. *
* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormSingleSelectQuestionProperties withOptions( java.util.Collection* The display mode of the single select question. *
*
* Constraints:
* Allowed Values: DROPDOWN, RADIO
*
* @return
* The display mode of the single select question. *
* @see EvaluationFormSingleSelectQuestionDisplayMode */ public String getDisplayAs() { return displayAs; } /** ** The display mode of the single select question. *
*
* Constraints:
* Allowed Values: DROPDOWN, RADIO
*
* @param displayAs
* The display mode of the single select question. *
* @see EvaluationFormSingleSelectQuestionDisplayMode */ public void setDisplayAs(String displayAs) { this.displayAs = displayAs; } /** ** The display mode of the single select question. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: DROPDOWN, RADIO
*
* @param displayAs
* The display mode of the single select question. *
* @return A reference to this updated object so that method calls can be * chained together. * @see EvaluationFormSingleSelectQuestionDisplayMode */ public EvaluationFormSingleSelectQuestionProperties withDisplayAs(String displayAs) { this.displayAs = displayAs; return this; } /** ** The display mode of the single select question. *
*
* Constraints:
* Allowed Values: DROPDOWN, RADIO
*
* @param displayAs
* The display mode of the single select question. *
* @see EvaluationFormSingleSelectQuestionDisplayMode */ public void setDisplayAs(EvaluationFormSingleSelectQuestionDisplayMode displayAs) { this.displayAs = displayAs.toString(); } /** ** The display mode of the single select question. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: DROPDOWN, RADIO
*
* @param displayAs
* The display mode of the single select question. *
* @return A reference to this updated object so that method calls can be * chained together. * @see EvaluationFormSingleSelectQuestionDisplayMode */ public EvaluationFormSingleSelectQuestionProperties withDisplayAs( EvaluationFormSingleSelectQuestionDisplayMode displayAs) { this.displayAs = displayAs.toString(); return this; } /** ** The display mode of the single select question. *
* * @return* The display mode of the single select question. *
*/ public EvaluationFormSingleSelectQuestionAutomation getAutomation() { return automation; } /** ** The display mode of the single select question. *
* * @param automation* The display mode of the single select question. *
*/ public void setAutomation(EvaluationFormSingleSelectQuestionAutomation automation) { this.automation = automation; } /** ** The display mode of the single select question. *
** Returns a reference to this object so that method calls can be chained * together. * * @param automation
* The display mode of the single select question. *
* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationFormSingleSelectQuestionProperties withAutomation( EvaluationFormSingleSelectQuestionAutomation 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 (getOptions() != null) sb.append("Options: " + getOptions() + ","); if (getDisplayAs() != null) sb.append("DisplayAs: " + getDisplayAs() + ","); 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 + ((getOptions() == null) ? 0 : getOptions().hashCode()); hashCode = prime * hashCode + ((getDisplayAs() == null) ? 0 : getDisplayAs().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 EvaluationFormSingleSelectQuestionProperties == false) return false; EvaluationFormSingleSelectQuestionProperties other = (EvaluationFormSingleSelectQuestionProperties) obj; if (other.getOptions() == null ^ this.getOptions() == null) return false; if (other.getOptions() != null && other.getOptions().equals(this.getOptions()) == false) return false; if (other.getDisplayAs() == null ^ this.getDisplayAs() == null) return false; if (other.getDisplayAs() != null && other.getDisplayAs().equals(this.getDisplayAs()) == 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; } }