Use the Type field to determine which variant is active, then access the corresponding field:
switch mode.Type { case components.ModeTypeModeAuto: // mode.ModeAuto is populated case components.ModeTypeModeRequired: // mode.ModeRequired is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.