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

Supported Types

allowedToolsUnion := components.CreateAllowedToolsUnionArrayOfStr([]string{/* values here */})

AllowedTools

allowedToolsUnion := components.CreateAllowedToolsUnionAllowedTools(components.AllowedTools{/* values here */})

allowedToolsUnion := components.CreateAllowedToolsUnionAny(any{/* values here */})

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:
switch allowedToolsUnion.Type {
	case components.AllowedToolsUnionTypeArrayOfStr:
		// allowedToolsUnion.ArrayOfStr is populated
	case components.AllowedToolsUnionTypeAllowedTools:
		// allowedToolsUnion.AllowedTools is populated
	case components.AllowedToolsUnionTypeAny:
		// allowedToolsUnion.Any is populated
}