Use the Type field to determine which variant is active, then access the corresponding field:
switch createImagesResponse.Type { case operations.CreateImagesResponseTypeImageGenerationResponse: // createImagesResponse.ImageGenerationResponse is populated case operations.CreateImagesResponseTypeEventStream: // createImagesResponse.EventStream is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.