// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file contains a message which references a message that implements the
// proto.Message interface but does not have the structure of a normal generated
// message.

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: internal/testprotos/irregular/test.proto

package irregular

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

type Message struct {
	state           protoimpl.MessageState       `protogen:"open.v1"`
	OptionalMessage *IrregularMessage            `protobuf:"bytes,1,opt,name=optional_message,json=optionalMessage" json:"optional_message,omitempty"`
	RepeatedMessage []*IrregularMessage          `protobuf:"bytes,2,rep,name=repeated_message,json=repeatedMessage" json:"repeated_message,omitempty"`
	RequiredMessage *IrregularMessage            `protobuf:"bytes,3,req,name=required_message,json=requiredMessage" json:"required_message,omitempty"`
	MapMessage      map[string]*IrregularMessage `protobuf:"bytes,4,rep,name=map_message,json=mapMessage" json:"map_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	// Types that are valid to be assigned to Union:
	//
	//	*Message_OneofMessage
	//	*Message_OneofAberrantMessage
	Union                   isMessage_Union             `protobuf_oneof:"union"`
	OptionalAberrantMessage *AberrantMessage            `protobuf:"bytes,7,opt,name=optional_aberrant_message,json=optionalAberrantMessage" json:"optional_aberrant_message,omitempty"`
	RepeatedAberrantMessage []*AberrantMessage          `protobuf:"bytes,8,rep,name=repeated_aberrant_message,json=repeatedAberrantMessage" json:"repeated_aberrant_message,omitempty"`
	RequiredAberrantMessage *AberrantMessage            `protobuf:"bytes,9,req,name=required_aberrant_message,json=requiredAberrantMessage" json:"required_aberrant_message,omitempty"`
	MapAberrantMessage      map[string]*AberrantMessage `protobuf:"bytes,10,rep,name=map_aberrant_message,json=mapAberrantMessage" json:"map_aberrant_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	unknownFields           protoimpl.UnknownFields
	sizeCache               protoimpl.SizeCache
}

func (x *Message) Reset() {
	*x = Message{}
	mi := &file_internal_testprotos_irregular_test_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Message) ProtoMessage() {}

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

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

func (x *Message) GetOptionalMessage() *IrregularMessage {
	if x != nil {
		return x.OptionalMessage
	}
	return nil
}

func (x *Message) GetRepeatedMessage() []*IrregularMessage {
	if x != nil {
		return x.RepeatedMessage
	}
	return nil
}

func (x *Message) GetRequiredMessage() *IrregularMessage {
	if x != nil {
		return x.RequiredMessage
	}
	return nil
}

func (x *Message) GetMapMessage() map[string]*IrregularMessage {
	if x != nil {
		return x.MapMessage
	}
	return nil
}

func (x *Message) GetUnion() isMessage_Union {
	if x != nil {
		return x.Union
	}
	return nil
}

func (x *Message) GetOneofMessage() *IrregularMessage {
	if x != nil {
		if x, ok := x.Union.(*Message_OneofMessage); ok {
			return x.OneofMessage
		}
	}
	return nil
}

func (x *Message) GetOneofAberrantMessage() *AberrantMessage {
	if x != nil {
		if x, ok := x.Union.(*Message_OneofAberrantMessage); ok {
			return x.OneofAberrantMessage
		}
	}
	return nil
}

func (x *Message) GetOptionalAberrantMessage() *AberrantMessage {
	if x != nil {
		return x.OptionalAberrantMessage
	}
	return nil
}

func (x *Message) GetRepeatedAberrantMessage() []*AberrantMessage {
	if x != nil {
		return x.RepeatedAberrantMessage
	}
	return nil
}

func (x *Message) GetRequiredAberrantMessage() *AberrantMessage {
	if x != nil {
		return x.RequiredAberrantMessage
	}
	return nil
}

func (x *Message) GetMapAberrantMessage() map[string]*AberrantMessage {
	if x != nil {
		return x.MapAberrantMessage
	}
	return nil
}

type isMessage_Union interface {
	isMessage_Union()
}

type Message_OneofMessage struct {
	OneofMessage *IrregularMessage `protobuf:"bytes,5,opt,name=oneof_message,json=oneofMessage,oneof"`
}

type Message_OneofAberrantMessage struct {
	OneofAberrantMessage *AberrantMessage `protobuf:"bytes,6,opt,name=oneof_aberrant_message,json=oneofAberrantMessage,oneof"`
}

func (*Message_OneofMessage) isMessage_Union() {}

func (*Message_OneofAberrantMessage) isMessage_Union() {}

var File_internal_testprotos_irregular_test_proto protoreflect.FileDescriptor

const file_internal_testprotos_irregular_test_proto_rawDesc = "" +
	"\n" +
	"(internal/testprotos/irregular/test.proto\x12\x17goproto.proto.irregular\x1a-internal/testprotos/irregular/irregular.proto\"\x94\t\n" +
	"\aMessage\x12T\n" +
	"\x10optional_message\x18\x01 \x01(\v2).goproto.proto.irregular.IrregularMessageR\x0foptionalMessage\x12T\n" +
	"\x10repeated_message\x18\x02 \x03(\v2).goproto.proto.irregular.IrregularMessageR\x0frepeatedMessage\x12T\n" +
	"\x10required_message\x18\x03 \x02(\v2).goproto.proto.irregular.IrregularMessageR\x0frequiredMessage\x12Q\n" +
	"\vmap_message\x18\x04 \x03(\v20.goproto.proto.irregular.Message.MapMessageEntryR\n" +
	"mapMessage\x12P\n" +
	"\roneof_message\x18\x05 \x01(\v2).goproto.proto.irregular.IrregularMessageH\x00R\foneofMessage\x12`\n" +
	"\x16oneof_aberrant_message\x18\x06 \x01(\v2(.goproto.proto.irregular.AberrantMessageH\x00R\x14oneofAberrantMessage\x12d\n" +
	"\x19optional_aberrant_message\x18\a \x01(\v2(.goproto.proto.irregular.AberrantMessageR\x17optionalAberrantMessage\x12d\n" +
	"\x19repeated_aberrant_message\x18\b \x03(\v2(.goproto.proto.irregular.AberrantMessageR\x17repeatedAberrantMessage\x12d\n" +
	"\x19required_aberrant_message\x18\t \x02(\v2(.goproto.proto.irregular.AberrantMessageR\x17requiredAberrantMessage\x12j\n" +
	"\x14map_aberrant_message\x18\n" +
	" \x03(\v28.goproto.proto.irregular.Message.MapAberrantMessageEntryR\x12mapAberrantMessage\x1ah\n" +
	"\x0fMapMessageEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12?\n" +
	"\x05value\x18\x02 \x01(\v2).goproto.proto.irregular.IrregularMessageR\x05value:\x028\x01\x1ao\n" +
	"\x17MapAberrantMessageEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12>\n" +
	"\x05value\x18\x02 \x01(\v2(.goproto.proto.irregular.AberrantMessageR\x05value:\x028\x01B\a\n" +
	"\x05unionB:Z8google.golang.org/protobuf/internal/testprotos/irregular"

var (
	file_internal_testprotos_irregular_test_proto_rawDescOnce sync.Once
	file_internal_testprotos_irregular_test_proto_rawDescData []byte
)

func file_internal_testprotos_irregular_test_proto_rawDescGZIP() []byte {
	file_internal_testprotos_irregular_test_proto_rawDescOnce.Do(func() {
		file_internal_testprotos_irregular_test_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_internal_testprotos_irregular_test_proto_rawDesc), len(file_internal_testprotos_irregular_test_proto_rawDesc)))
	})
	return file_internal_testprotos_irregular_test_proto_rawDescData
}

var file_internal_testprotos_irregular_test_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_internal_testprotos_irregular_test_proto_goTypes = []any{
	(*Message)(nil),          // 0: goproto.proto.irregular.Message
	nil,                      // 1: goproto.proto.irregular.Message.MapMessageEntry
	nil,                      // 2: goproto.proto.irregular.Message.MapAberrantMessageEntry
	(*IrregularMessage)(nil), // 3: goproto.proto.irregular.IrregularMessage
	(*AberrantMessage)(nil),  // 4: goproto.proto.irregular.AberrantMessage
}
var file_internal_testprotos_irregular_test_proto_depIdxs = []int32{
	3,  // 0: goproto.proto.irregular.Message.optional_message:type_name -> goproto.proto.irregular.IrregularMessage
	3,  // 1: goproto.proto.irregular.Message.repeated_message:type_name -> goproto.proto.irregular.IrregularMessage
	3,  // 2: goproto.proto.irregular.Message.required_message:type_name -> goproto.proto.irregular.IrregularMessage
	1,  // 3: goproto.proto.irregular.Message.map_message:type_name -> goproto.proto.irregular.Message.MapMessageEntry
	3,  // 4: goproto.proto.irregular.Message.oneof_message:type_name -> goproto.proto.irregular.IrregularMessage
	4,  // 5: goproto.proto.irregular.Message.oneof_aberrant_message:type_name -> goproto.proto.irregular.AberrantMessage
	4,  // 6: goproto.proto.irregular.Message.optional_aberrant_message:type_name -> goproto.proto.irregular.AberrantMessage
	4,  // 7: goproto.proto.irregular.Message.repeated_aberrant_message:type_name -> goproto.proto.irregular.AberrantMessage
	4,  // 8: goproto.proto.irregular.Message.required_aberrant_message:type_name -> goproto.proto.irregular.AberrantMessage
	2,  // 9: goproto.proto.irregular.Message.map_aberrant_message:type_name -> goproto.proto.irregular.Message.MapAberrantMessageEntry
	3,  // 10: goproto.proto.irregular.Message.MapMessageEntry.value:type_name -> goproto.proto.irregular.IrregularMessage
	4,  // 11: goproto.proto.irregular.Message.MapAberrantMessageEntry.value:type_name -> goproto.proto.irregular.AberrantMessage
	12, // [12:12] is the sub-list for method output_type
	12, // [12:12] is the sub-list for method input_type
	12, // [12:12] is the sub-list for extension type_name
	12, // [12:12] is the sub-list for extension extendee
	0,  // [0:12] is the sub-list for field type_name
}

func init() { file_internal_testprotos_irregular_test_proto_init() }
func file_internal_testprotos_irregular_test_proto_init() {
	if File_internal_testprotos_irregular_test_proto != nil {
		return
	}
	file_internal_testprotos_irregular_irregular_proto_init()
	file_internal_testprotos_irregular_test_proto_msgTypes[0].OneofWrappers = []any{
		(*Message_OneofMessage)(nil),
		(*Message_OneofAberrantMessage)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_internal_testprotos_irregular_test_proto_rawDesc), len(file_internal_testprotos_irregular_test_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_internal_testprotos_irregular_test_proto_goTypes,
		DependencyIndexes: file_internal_testprotos_irregular_test_proto_depIdxs,
		MessageInfos:      file_internal_testprotos_irregular_test_proto_msgTypes,
	}.Build()
	File_internal_testprotos_irregular_test_proto = out.File
	file_internal_testprotos_irregular_test_proto_goTypes = nil
	file_internal_testprotos_irregular_test_proto_depIdxs = nil
}
