Use the Type field to determine which variant is active, then access the corresponding field:
switch variables.Type { case components.VariablesTypeStr: // variables.Str is populated case components.VariablesTypeInputText: // variables.InputText is populated case components.VariablesTypeInputImage: // variables.InputImage is populated case components.VariablesTypeInputFile: // variables.InputFile is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.