Use the Type field to determine which variant is active, then access the corresponding field:
switch action.Type { case components.ActionTypeSearchValue: // action.OutputWebSearchCallItemActionSearch is populated case components.ActionTypeOpenPage: // action.ActionOpenPage is populated case components.ActionTypeFindInPage: // action.ActionFindInPage is populated default: // Unknown type - use action.GetUnknownRaw() for raw JSON}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.