InputsUnion - Go SDK

InputsUnion type definition

The Go SDK and docs are currently in beta. Report issues on GitHub.

Input for a response request - can be a string or array of items

Supported Types

1inputsUnion := components.CreateInputsUnionStr(string{/* values here */})

1inputsUnion := components.CreateInputsUnionArrayOfInputsUnion1([]components.InputsUnion1{/* values here */})

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:

1switch inputsUnion.Type {
2 case components.InputsUnionTypeStr:
3 // inputsUnion.Str is populated
4 case components.InputsUnionTypeArrayOfInputsUnion1:
5 // inputsUnion.ArrayOfInputsUnion1 is populated
6}