// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.32.0
// 	protoc        (unknown)
// source: gofakeit/test/oneofs.proto

package test

import (
	_ "github.com/rodaine/protogofakeit/gen/gofakeit"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type OneOfEnum int32

const (
	OneOfEnum_ONE_OF_ENUM_UNSPECIFIED OneOfEnum = 0
	OneOfEnum_ONE_OF_ENUM_ONE         OneOfEnum = 1
	OneOfEnum_ONE_OF_ENUM_TWO         OneOfEnum = 2
)

// Enum value maps for OneOfEnum.
var (
	OneOfEnum_name = map[int32]string{
		0: "ONE_OF_ENUM_UNSPECIFIED",
		1: "ONE_OF_ENUM_ONE",
		2: "ONE_OF_ENUM_TWO",
	}
	OneOfEnum_value = map[string]int32{
		"ONE_OF_ENUM_UNSPECIFIED": 0,
		"ONE_OF_ENUM_ONE":         1,
		"ONE_OF_ENUM_TWO":         2,
	}
)

func (x OneOfEnum) Enum() *OneOfEnum {
	p := new(OneOfEnum)
	*p = x
	return p
}

func (x OneOfEnum) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (OneOfEnum) Descriptor() protoreflect.EnumDescriptor {
	return file_gofakeit_test_oneofs_proto_enumTypes[0].Descriptor()
}

func (OneOfEnum) Type() protoreflect.EnumType {
	return &file_gofakeit_test_oneofs_proto_enumTypes[0]
}

func (x OneOfEnum) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use OneOfEnum.Descriptor instead.
func (OneOfEnum) EnumDescriptor() ([]byte, []int) {
	return file_gofakeit_test_oneofs_proto_rawDescGZIP(), []int{0}
}

type OneOf struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// Types that are assignable to Fields:
	//
	//	*OneOf_Scalar
	//	*OneOf_Enum
	//	*OneOf_Message
	Fields isOneOf_Fields `protobuf_oneof:"fields"`
}

func (x *OneOf) Reset() {
	*x = OneOf{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gofakeit_test_oneofs_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *OneOf) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*OneOf) ProtoMessage() {}

func (x *OneOf) ProtoReflect() protoreflect.Message {
	mi := &file_gofakeit_test_oneofs_proto_msgTypes[0]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use OneOf.ProtoReflect.Descriptor instead.
func (*OneOf) Descriptor() ([]byte, []int) {
	return file_gofakeit_test_oneofs_proto_rawDescGZIP(), []int{0}
}

func (m *OneOf) GetFields() isOneOf_Fields {
	if m != nil {
		return m.Fields
	}
	return nil
}

func (x *OneOf) GetScalar() string {
	if x, ok := x.GetFields().(*OneOf_Scalar); ok {
		return x.Scalar
	}
	return ""
}

func (x *OneOf) GetEnum() OneOfEnum {
	if x, ok := x.GetFields().(*OneOf_Enum); ok {
		return x.Enum
	}
	return OneOfEnum_ONE_OF_ENUM_UNSPECIFIED
}

func (x *OneOf) GetMessage() *OneOf {
	if x, ok := x.GetFields().(*OneOf_Message); ok {
		return x.Message
	}
	return nil
}

type isOneOf_Fields interface {
	isOneOf_Fields()
}

type OneOf_Scalar struct {
	Scalar string `protobuf:"bytes,1,opt,name=scalar,proto3,oneof"`
}

type OneOf_Enum struct {
	Enum OneOfEnum `protobuf:"varint,2,opt,name=enum,proto3,enum=gofakeit.test.OneOfEnum,oneof"`
}

type OneOf_Message struct {
	Message *OneOf `protobuf:"bytes,3,opt,name=message,proto3,oneof"`
}

func (*OneOf_Scalar) isOneOf_Fields() {}

func (*OneOf_Enum) isOneOf_Fields() {}

func (*OneOf_Message) isOneOf_Fields() {}

// see https://github.com/rodaine/protogofakeit/issues/5
type OneOfMessages struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// Types that are assignable to Kind:
	//
	//	*OneOfMessages_Foo
	//	*OneOfMessages_Bar
	Kind isOneOfMessages_Kind `protobuf_oneof:"kind"`
}

func (x *OneOfMessages) Reset() {
	*x = OneOfMessages{}
	if protoimpl.UnsafeEnabled {
		mi := &file_gofakeit_test_oneofs_proto_msgTypes[1]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *OneOfMessages) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*OneOfMessages) ProtoMessage() {}

func (x *OneOfMessages) ProtoReflect() protoreflect.Message {
	mi := &file_gofakeit_test_oneofs_proto_msgTypes[1]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use OneOfMessages.ProtoReflect.Descriptor instead.
func (*OneOfMessages) Descriptor() ([]byte, []int) {
	return file_gofakeit_test_oneofs_proto_rawDescGZIP(), []int{1}
}

func (m *OneOfMessages) GetKind() isOneOfMessages_Kind {
	if m != nil {
		return m.Kind
	}
	return nil
}

func (x *OneOfMessages) GetFoo() *OneOfMessages {
	if x, ok := x.GetKind().(*OneOfMessages_Foo); ok {
		return x.Foo
	}
	return nil
}

func (x *OneOfMessages) GetBar() *OneOfMessages {
	if x, ok := x.GetKind().(*OneOfMessages_Bar); ok {
		return x.Bar
	}
	return nil
}

type isOneOfMessages_Kind interface {
	isOneOfMessages_Kind()
}

type OneOfMessages_Foo struct {
	Foo *OneOfMessages `protobuf:"bytes,1,opt,name=foo,proto3,oneof"`
}

type OneOfMessages_Bar struct {
	Bar *OneOfMessages `protobuf:"bytes,2,opt,name=bar,proto3,oneof"`
}

func (*OneOfMessages_Foo) isOneOfMessages_Kind() {}

func (*OneOfMessages_Bar) isOneOfMessages_Kind() {}

var File_gofakeit_test_oneofs_proto protoreflect.FileDescriptor

var file_gofakeit_test_oneofs_proto_rawDesc = []byte{
	0x0a, 0x1a, 0x67, 0x6f, 0x66, 0x61, 0x6b, 0x65, 0x69, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f,
	0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x67, 0x6f,
	0x66, 0x61, 0x6b, 0x65, 0x69, 0x74, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x67, 0x6f, 0x66,
	0x61, 0x6b, 0x65, 0x69, 0x74, 0x2f, 0x67, 0x6f, 0x66, 0x61, 0x6b, 0x65, 0x69, 0x74, 0x2e, 0x70,
	0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x12, 0x18,
	0x0a, 0x06, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
	0x52, 0x06, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x12, 0x2e, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d,
	0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x66, 0x61, 0x6b, 0x65, 0x69,
	0x74, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x45, 0x6e, 0x75, 0x6d,
	0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x30, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73,
	0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x66, 0x61,
	0x6b, 0x65, 0x69, 0x74, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x48,
	0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x66, 0x69,
	0x65, 0x6c, 0x64, 0x73, 0x22, 0x7b, 0x0a, 0x0d, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x4d, 0x65, 0x73,
	0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01,
	0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x66, 0x61, 0x6b, 0x65, 0x69, 0x74, 0x2e, 0x74, 0x65,
	0x73, 0x74, 0x2e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73,
	0x48, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x30, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x02,
	0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x66, 0x61, 0x6b, 0x65, 0x69, 0x74, 0x2e,
	0x74, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
	0x65, 0x73, 0x48, 0x00, 0x52, 0x03, 0x62, 0x61, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e,
	0x64, 0x2a, 0x52, 0x0a, 0x09, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x1b,
	0x0a, 0x17, 0x4f, 0x4e, 0x45, 0x5f, 0x4f, 0x46, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e,
	0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4f,
	0x4e, 0x45, 0x5f, 0x4f, 0x46, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01,
	0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x4e, 0x45, 0x5f, 0x4f, 0x46, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f,
	0x54, 0x57, 0x4f, 0x10, 0x02, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
	0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x64, 0x61, 0x69, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
	0x6f, 0x67, 0x6f, 0x66, 0x61, 0x6b, 0x65, 0x69, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f,
	0x66, 0x61, 0x6b, 0x65, 0x69, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f,
	0x74, 0x6f, 0x33,
}

var (
	file_gofakeit_test_oneofs_proto_rawDescOnce sync.Once
	file_gofakeit_test_oneofs_proto_rawDescData = file_gofakeit_test_oneofs_proto_rawDesc
)

func file_gofakeit_test_oneofs_proto_rawDescGZIP() []byte {
	file_gofakeit_test_oneofs_proto_rawDescOnce.Do(func() {
		file_gofakeit_test_oneofs_proto_rawDescData = protoimpl.X.CompressGZIP(file_gofakeit_test_oneofs_proto_rawDescData)
	})
	return file_gofakeit_test_oneofs_proto_rawDescData
}

var file_gofakeit_test_oneofs_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_gofakeit_test_oneofs_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_gofakeit_test_oneofs_proto_goTypes = []interface{}{
	(OneOfEnum)(0),        // 0: gofakeit.test.OneOfEnum
	(*OneOf)(nil),         // 1: gofakeit.test.OneOf
	(*OneOfMessages)(nil), // 2: gofakeit.test.OneOfMessages
}
var file_gofakeit_test_oneofs_proto_depIdxs = []int32{
	0, // 0: gofakeit.test.OneOf.enum:type_name -> gofakeit.test.OneOfEnum
	1, // 1: gofakeit.test.OneOf.message:type_name -> gofakeit.test.OneOf
	2, // 2: gofakeit.test.OneOfMessages.foo:type_name -> gofakeit.test.OneOfMessages
	2, // 3: gofakeit.test.OneOfMessages.bar:type_name -> gofakeit.test.OneOfMessages
	4, // [4:4] is the sub-list for method output_type
	4, // [4:4] is the sub-list for method input_type
	4, // [4:4] is the sub-list for extension type_name
	4, // [4:4] is the sub-list for extension extendee
	0, // [0:4] is the sub-list for field type_name
}

func init() { file_gofakeit_test_oneofs_proto_init() }
func file_gofakeit_test_oneofs_proto_init() {
	if File_gofakeit_test_oneofs_proto != nil {
		return
	}
	if !protoimpl.UnsafeEnabled {
		file_gofakeit_test_oneofs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*OneOf); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_gofakeit_test_oneofs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*OneOfMessages); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	file_gofakeit_test_oneofs_proto_msgTypes[0].OneofWrappers = []interface{}{
		(*OneOf_Scalar)(nil),
		(*OneOf_Enum)(nil),
		(*OneOf_Message)(nil),
	}
	file_gofakeit_test_oneofs_proto_msgTypes[1].OneofWrappers = []interface{}{
		(*OneOfMessages_Foo)(nil),
		(*OneOfMessages_Bar)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: file_gofakeit_test_oneofs_proto_rawDesc,
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_gofakeit_test_oneofs_proto_goTypes,
		DependencyIndexes: file_gofakeit_test_oneofs_proto_depIdxs,
		EnumInfos:         file_gofakeit_test_oneofs_proto_enumTypes,
		MessageInfos:      file_gofakeit_test_oneofs_proto_msgTypes,
	}.Build()
	File_gofakeit_test_oneofs_proto = out.File
	file_gofakeit_test_oneofs_proto_rawDesc = nil
	file_gofakeit_test_oneofs_proto_goTypes = nil
	file_gofakeit_test_oneofs_proto_depIdxs = nil
}
