Class DecisionAnswer

java.lang.Object
com.alibaba.dashscope.legacy_2x.decision.DecisionAnswer

@Deprecated public class DecisionAnswer extends Object
Deprecated.
The answer of a single decision question. Which fields are populated depends on type:
  • choice: choice, confidence, probabilities (keyed by option name).
  • noul: noul only — confidence and probabilities are null per the documented example.
  • score: score, confidence, legend, probabilities (keyed by stringified level index "0", "1", ...).
  • Constructor Details

    • DecisionAnswer

      public DecisionAnswer()
      Deprecated.
    • DecisionAnswer

      public DecisionAnswer(String type, String choice, Double noul, Double score, Double confidence, Map<String,Double> probabilities, Map<String,String> legend)
      Deprecated.
      Creates a new DecisionAnswer instance.
      Parameters:
      type - The question type, one of choice/noul/score.
      choice - The selected option name, only for choice questions.
      noul - P(yes) in [0, 1], only for noul questions.
      score - Probability-weighted expectation of the level index, only for score questions. May fall between two integer levels (e.g. 1.43).
      confidence - The confidence of the answer, for choice and score questions.
      probabilities - The probability of each option or level; sums to 1.
      legend - Level index to level description, only for score questions.
  • Method Details

    • builder

      public static DecisionAnswer.DecisionAnswerBuilder builder()
      Deprecated.
    • getType

      public String getType()
      Deprecated.
      The question type, one of choice/noul/score.
    • getChoice

      public String getChoice()
      Deprecated.
      The selected option name, only for choice questions.
    • getNoul

      public Double getNoul()
      Deprecated.
      P(yes) in [0, 1], only for noul questions.
    • getScore

      public Double getScore()
      Deprecated.
      Probability-weighted expectation of the level index, only for score questions. May fall between two integer levels (e.g. 1.43).
    • getConfidence

      public Double getConfidence()
      Deprecated.
      The confidence of the answer, for choice and score questions.
    • getProbabilities

      public Map<String,Double> getProbabilities()
      Deprecated.
      The probability of each option or level; sums to 1.
    • getLegend

      public Map<String,String> getLegend()
      Deprecated.
      Level index to level description, only for score questions.
    • setType

      public void setType(String type)
      Deprecated.
      The question type, one of choice/noul/score.
    • setChoice

      public void setChoice(String choice)
      Deprecated.
      The selected option name, only for choice questions.
    • setNoul

      public void setNoul(Double noul)
      Deprecated.
      P(yes) in [0, 1], only for noul questions.
    • setScore

      public void setScore(Double score)
      Deprecated.
      Probability-weighted expectation of the level index, only for score questions. May fall between two integer levels (e.g. 1.43).
    • setConfidence

      public void setConfidence(Double confidence)
      Deprecated.
      The confidence of the answer, for choice and score questions.
    • setProbabilities

      public void setProbabilities(Map<String,Double> probabilities)
      Deprecated.
      The probability of each option or level; sums to 1.
    • setLegend

      public void setLegend(Map<String,String> legend)
      Deprecated.
      Level index to level description, only for score questions.
    • equals

      public boolean equals(Object o)
      Deprecated.
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
      Deprecated.
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object