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

Supported Types

imageConfig := components.CreateImageConfigStr(string{/* values here */})

imageConfig := components.CreateImageConfigNumber(float64{/* values here */})

imageConfig := components.CreateImageConfigArrayOfAny([]any{/* values here */})

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:
switch imageConfig.Type {
	case components.ImageConfigTypeStr:
		// imageConfig.Str is populated
	case components.ImageConfigTypeNumber:
		// imageConfig.Number is populated
	case components.ImageConfigTypeArrayOfAny:
		// imageConfig.ArrayOfAny is populated
}