Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 1.03 KB

File metadata and controls

33 lines (23 loc) · 1.03 KB

ExpandableImageIDImageSummaryUnion

ID (default) or expanded summary when using expand parameter

Supported Types

expandableImageIDImageSummaryUnion := components.CreateExpandableImageIDImageSummaryUnionStr(string{/* values here */})

ExpandableImageIDImageSummary

expandableImageIDImageSummaryUnion := components.CreateExpandableImageIDImageSummaryUnionExpandableImageIDImageSummary(components.ExpandableImageIDImageSummary{/* values here */})

Union Discrimination

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

switch expandableImageIDImageSummaryUnion.Type {
	case components.ExpandableImageIDImageSummaryUnionTypeStr:
		// expandableImageIDImageSummaryUnion.Str is populated
	case components.ExpandableImageIDImageSummaryUnionTypeExpandableImageIDImageSummary:
		// expandableImageIDImageSummaryUnion.ExpandableImageIDImageSummary is populated
	default:
		// Unknown type - use expandableImageIDImageSummaryUnion.GetUnknownRaw() for raw JSON
}