// Code generated by smithy-go-codegen DO NOT EDIT.

package types_test

import (
	"fmt"
	"github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types"
)

func ExampleUnionPayload_outputUsage() {
	var union types.UnionPayload
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.UnionPayloadMemberGreeting:
		_ = v.Value // Value is string

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

var _ *string

func ExampleXmlUnionShape_outputUsage() {
	var union types.XmlUnionShape
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.XmlUnionShapeMemberBooleanValue:
		_ = v.Value // Value is bool

	case *types.XmlUnionShapeMemberByteValue:
		_ = v.Value // Value is int8

	case *types.XmlUnionShapeMemberDoubleValue:
		_ = v.Value // Value is float64

	case *types.XmlUnionShapeMemberFloatValue:
		_ = v.Value // Value is float32

	case *types.XmlUnionShapeMemberIntegerValue:
		_ = v.Value // Value is int32

	case *types.XmlUnionShapeMemberLongValue:
		_ = v.Value // Value is int64

	case *types.XmlUnionShapeMemberShortValue:
		_ = v.Value // Value is int16

	case *types.XmlUnionShapeMemberStringValue:
		_ = v.Value // Value is string

	case *types.XmlUnionShapeMemberStructValue:
		_ = v.Value // Value is types.XmlNestedUnionStruct

	case *types.XmlUnionShapeMemberUnionValue:
		_ = v.Value // Value is types.XmlUnionShape

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

var _ *string
var _ *int32
var _ *bool
var _ *int64
var _ *float64
var _ *int16
var _ *int8
var _ *types.XmlNestedUnionStruct
var _ types.XmlUnionShape
var _ *float32
