Skip to main content
The Go SDK and docs are currently in beta. Report issues on GitHub.

Supported Types

OutputWebSearchCallItemActionSearch

action := components.CreateActionSearch(components.OutputWebSearchCallItemActionSearch{/* values here */})

ActionOpenPage

action := components.CreateActionOpenPage(components.ActionOpenPage{/* values here */})

ActionFindInPage

action := components.CreateActionFindInPage(components.ActionFindInPage{/* values here */})

Union Discrimination

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
}