DecisionQuestion
Rust struct goodmem::models::DecisionQuestion: declaration, fields or variants, and implementations.
Struct DecisionQuestion
goodmem::models::DecisionQuestion
Set exactly one of choice, score, noul, or box. Clef requires instructions for every question.
pub struct DecisionQuestion {
pub instructions: Option<Box<DecisionContent>>,
pub choice: Option<Box<DecisionChoiceQuestion>>,
pub score: Option<Box<DecisionScoreQuestion>>,
pub noul: Option<Box<DecisionNoulQuestion>>,
pub r#box: Option<Box<DecisionBoxQuestion>>,
}Referenced types: DecisionBoxQuestion, DecisionChoiceQuestion, DecisionContent, DecisionNoulQuestion, DecisionScoreQuestion.
Fields
instructions
pub instructions: Option<Box<DecisionContent>>
Instructions for this question. Clef requires nonblank text, an object, or an array. Other providers allow omission; to supply JSON null, use {"jsonValue":"null"}.
Wire name: instructions.
choice
pub choice: Option<Box<DecisionChoiceQuestion>>
Choose one labeled option.
Wire name: choice.
score
pub score: Option<Box<DecisionScoreQuestion>>
Score the content against a list of levels ordered from lowest to highest.
Wire name: score.
noul
pub noul: Option<Box<DecisionNoulQuestion>>
Estimate the probability that a statement is true.
Wire name: noul.
r#box
pub r#box: Option<Box<DecisionBoxQuestion>>
Locate an object in an image. A returned box does not guarantee that the object is present.
Wire name: box.
Implementations
validate
pub fn validate(&self) -> crate::Result<()>
Validate the request before sending, without making an HTTP call.
Trait implementations
Clone(derived)Default(derived)PartialEq(derived)Serialize(derived)impl<'de> Deserialize<'de> for DecisionQuestionimpl std::fmt::Debug for DecisionQuestion