Supported Types
DecisionsBoxAnswer
DecisionsChoiceAnswer
DecisionsNoulAnswer
DecisionsScoreAnswer
Union Discrimination
Use theType field to determine which variant is active, then access the corresponding field:
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
decisionsResponseAnswers := components.CreateDecisionsResponseAnswersBox(components.DecisionsBoxAnswer{/* values here */})
decisionsResponseAnswers := components.CreateDecisionsResponseAnswersChoice(components.DecisionsChoiceAnswer{/* values here */})
decisionsResponseAnswers := components.CreateDecisionsResponseAnswersNoul(components.DecisionsNoulAnswer{/* values here */})
decisionsResponseAnswers := components.CreateDecisionsResponseAnswersScore(components.DecisionsScoreAnswer{/* values here */})
Type field to determine which variant is active, then access the corresponding field:
switch decisionsResponseAnswers.Type {
case components.DecisionsResponseAnswersTypeBox:
// decisionsResponseAnswers.DecisionsBoxAnswer is populated
case components.DecisionsResponseAnswersTypeChoice:
// decisionsResponseAnswers.DecisionsChoiceAnswer is populated
case components.DecisionsResponseAnswersTypeNoul:
// decisionsResponseAnswers.DecisionsNoulAnswer is populated
case components.DecisionsResponseAnswersTypeScore:
// decisionsResponseAnswers.DecisionsScoreAnswer is populated
default:
// Unknown type - use decisionsResponseAnswers.GetUnknownRaw() for raw JSON
}
Was this page helpful?
Suggestions