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

Supported Types

functionCallOutputItemOutputUnion2 := components.CreateFunctionCallOutputItemOutputUnion2Str(string{/* values here */})

functionCallOutputItemOutputUnion2 := components.CreateFunctionCallOutputItemOutputUnion2ArrayOfFunctionCallOutputItemOutputUnion1([]components.FunctionCallOutputItemOutputUnion1{/* values here */})

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:
switch functionCallOutputItemOutputUnion2.Type {
	case components.FunctionCallOutputItemOutputUnion2TypeStr:
		// functionCallOutputItemOutputUnion2.Str is populated
	case components.FunctionCallOutputItemOutputUnion2TypeArrayOfFunctionCallOutputItemOutputUnion1:
		// functionCallOutputItemOutputUnion2.ArrayOfFunctionCallOutputItemOutputUnion1 is populated
}