From 385865fd5ad64d6a2f1211e054db5e1ba0bca701 Mon Sep 17 00:00:00 2001 From: Joshua Benjamin Date: Sun, 2 May 2021 15:57:47 -0700 Subject: [PATCH] (+semver: fix) Fix recursive message type handling Signed-off-by: Joshua Benjamin --- docs/testing/proto/gen/generated.proto | 2 + docs/testing/proto/v1/enums.proto | 1 + docs/testing/proto/v1/recursive.proto | 15 + docs/testing/proto/v1/testObject.proto | 1 + docs/testing/proto/v1/testObject2.proto | 1 + docs/testing/proto/v1/testObject3.proto | 1 + docs/testing/proto/v1/testObjects.proto | 2 +- go.mod | 1 + .../testing/testProto/gen/generated.pb.go | 1245 +++++++++++------ internal/testing/testProto/v1/enums.pb.go | 296 ++-- internal/testing/testProto/v1/recursive.pb.go | 252 ++++ .../testing/testProto/v1/testObject.pb.go | 335 +++-- .../testing/testProto/v1/testObject2.pb.go | 234 +++- .../testing/testProto/v1/testObject3.pb.go | 299 ++-- .../testing/testProto/v1/testObjects.pb.go | 245 +++- makefile | 4 +- pkg/protobuf/extractor.go | 26 +- pkg/protobuf/extractor_test.go | 23 + 18 files changed, 2050 insertions(+), 933 deletions(-) create mode 100644 docs/testing/proto/v1/recursive.proto create mode 100644 internal/testing/testProto/v1/recursive.pb.go diff --git a/docs/testing/proto/gen/generated.proto b/docs/testing/proto/gen/generated.proto index 94d9e6a..9e01113 100644 --- a/docs/testing/proto/gen/generated.proto +++ b/docs/testing/proto/gen/generated.proto @@ -1,5 +1,7 @@ syntax = "proto3"; package gen; +option go_package = "github.com/syncromatics/proto-schema-registry/internal/test/testProto/gen"; + message google_protobuf_StringValue { string value = 1; } diff --git a/docs/testing/proto/v1/enums.proto b/docs/testing/proto/v1/enums.proto index 1d5a9b0..b517aec 100644 --- a/docs/testing/proto/v1/enums.proto +++ b/docs/testing/proto/v1/enums.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package v1; +option go_package = "github.com/syncromatics/proto-schema-registry/internal/test/testProto/v1"; enum Enum1 { ZERO = 0; diff --git a/docs/testing/proto/v1/recursive.proto b/docs/testing/proto/v1/recursive.proto new file mode 100644 index 0000000..9c6225b --- /dev/null +++ b/docs/testing/proto/v1/recursive.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package v1; +option go_package = "github.com/syncromatics/proto-schema-registry/internal/test/testProto/v1"; + +message AnyValue { + oneof value { + ArrayValue array_value = 1; + string string_value = 2; + } +} + +message ArrayValue { + repeated AnyValue values = 1; +} diff --git a/docs/testing/proto/v1/testObject.proto b/docs/testing/proto/v1/testObject.proto index e449ab2..9eb9b12 100644 --- a/docs/testing/proto/v1/testObject.proto +++ b/docs/testing/proto/v1/testObject.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package v1; import "google/protobuf/wrappers.proto"; +option go_package = "github.com/syncromatics/proto-schema-registry/internal/test/testProto/v1"; message TestObject { int64 id = 1; diff --git a/docs/testing/proto/v1/testObject2.proto b/docs/testing/proto/v1/testObject2.proto index a2ab85d..6697308 100644 --- a/docs/testing/proto/v1/testObject2.proto +++ b/docs/testing/proto/v1/testObject2.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package v1; +option go_package = "github.com/syncromatics/proto-schema-registry/internal/test/testProto/v1"; import "google/protobuf/wrappers.proto"; import "v1/testObject.proto"; diff --git a/docs/testing/proto/v1/testObject3.proto b/docs/testing/proto/v1/testObject3.proto index 2f13951..13a4ef8 100644 --- a/docs/testing/proto/v1/testObject3.proto +++ b/docs/testing/proto/v1/testObject3.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package v1; +option go_package = "github.com/syncromatics/proto-schema-registry/internal/test/testProto/v1"; import "v1/testObject.proto"; import "v1/testObject2.proto"; diff --git a/docs/testing/proto/v1/testObjects.proto b/docs/testing/proto/v1/testObjects.proto index 210b1ca..27f3445 100644 --- a/docs/testing/proto/v1/testObjects.proto +++ b/docs/testing/proto/v1/testObjects.proto @@ -1,13 +1,13 @@ syntax = "proto3"; package v1; +option go_package = "github.com/syncromatics/proto-schema-registry/internal/test/testProto/v1"; import "v1/testObject.proto"; import "v1/testObject2.proto"; import "v1/testObject3.proto"; import "v1/enums.proto"; -option go_package = "v1"; message TestObjects { TestObject object = 1; diff --git a/go.mod b/go.mod index 45cb51b..559f204 100644 --- a/go.mod +++ b/go.mod @@ -27,6 +27,7 @@ require ( golang.org/x/text v0.3.2 // indirect google.golang.org/genproto v0.0.0-20200413115906-b5235f65be36 // indirect google.golang.org/grpc v1.28.1 + google.golang.org/protobuf v1.21.0 // indirect gotest.tools v2.2.0+incompatible ) diff --git a/internal/testing/testProto/gen/generated.pb.go b/internal/testing/testProto/gen/generated.pb.go index 6d2111f..78d68de 100644 --- a/internal/testing/testProto/gen/generated.pb.go +++ b/internal/testing/testProto/gen/generated.pb.go @@ -1,24 +1,24 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.15.8 // source: gen/generated.proto package gen import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +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 V1_Enum1 int32 @@ -30,28 +30,49 @@ const ( V1_Enum1_FOUR V1_Enum1 = 4 ) -var V1_Enum1_name = map[int32]string{ - 0: "ZERO", - 1: "ONE", - 2: "TWO", - 3: "THREE", - 4: "FOUR", -} +// Enum value maps for V1_Enum1. +var ( + V1_Enum1_name = map[int32]string{ + 0: "ZERO", + 1: "ONE", + 2: "TWO", + 3: "THREE", + 4: "FOUR", + } + V1_Enum1_value = map[string]int32{ + "ZERO": 0, + "ONE": 1, + "TWO": 2, + "THREE": 3, + "FOUR": 4, + } +) -var V1_Enum1_value = map[string]int32{ - "ZERO": 0, - "ONE": 1, - "TWO": 2, - "THREE": 3, - "FOUR": 4, +func (x V1_Enum1) Enum() *V1_Enum1 { + p := new(V1_Enum1) + *p = x + return p } func (x V1_Enum1) String() string { - return proto.EnumName(V1_Enum1_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } +func (V1_Enum1) Descriptor() protoreflect.EnumDescriptor { + return file_gen_generated_proto_enumTypes[0].Descriptor() +} + +func (V1_Enum1) Type() protoreflect.EnumType { + return &file_gen_generated_proto_enumTypes[0] +} + +func (x V1_Enum1) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use V1_Enum1.Descriptor instead. func (V1_Enum1) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_273b4d767eeed8e1, []int{0} + return file_gen_generated_proto_rawDescGZIP(), []int{0} } type V1_EnumMessage_Enum2 int32 @@ -61,418 +82,465 @@ const ( V1_EnumMessage_PIE V1_EnumMessage_Enum2 = 1 ) -var V1_EnumMessage_Enum2_name = map[int32]string{ - 0: "STUFF", - 1: "PIE", -} +// Enum value maps for V1_EnumMessage_Enum2. +var ( + V1_EnumMessage_Enum2_name = map[int32]string{ + 0: "STUFF", + 1: "PIE", + } + V1_EnumMessage_Enum2_value = map[string]int32{ + "STUFF": 0, + "PIE": 1, + } +) -var V1_EnumMessage_Enum2_value = map[string]int32{ - "STUFF": 0, - "PIE": 1, +func (x V1_EnumMessage_Enum2) Enum() *V1_EnumMessage_Enum2 { + p := new(V1_EnumMessage_Enum2) + *p = x + return p } func (x V1_EnumMessage_Enum2) String() string { - return proto.EnumName(V1_EnumMessage_Enum2_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (V1_EnumMessage_Enum2) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_273b4d767eeed8e1, []int{6, 0} +func (V1_EnumMessage_Enum2) Descriptor() protoreflect.EnumDescriptor { + return file_gen_generated_proto_enumTypes[1].Descriptor() } -type GoogleProtobuf_StringValue struct { - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (V1_EnumMessage_Enum2) Type() protoreflect.EnumType { + return &file_gen_generated_proto_enumTypes[1] } -func (m *GoogleProtobuf_StringValue) Reset() { *m = GoogleProtobuf_StringValue{} } -func (m *GoogleProtobuf_StringValue) String() string { return proto.CompactTextString(m) } -func (*GoogleProtobuf_StringValue) ProtoMessage() {} -func (*GoogleProtobuf_StringValue) Descriptor() ([]byte, []int) { - return fileDescriptor_273b4d767eeed8e1, []int{0} +func (x V1_EnumMessage_Enum2) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *GoogleProtobuf_StringValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GoogleProtobuf_StringValue.Unmarshal(m, b) +// Deprecated: Use V1_EnumMessage_Enum2.Descriptor instead. +func (V1_EnumMessage_Enum2) EnumDescriptor() ([]byte, []int) { + return file_gen_generated_proto_rawDescGZIP(), []int{6, 0} } -func (m *GoogleProtobuf_StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GoogleProtobuf_StringValue.Marshal(b, m, deterministic) + +type GoogleProtobuf_StringValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (m *GoogleProtobuf_StringValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_GoogleProtobuf_StringValue.Merge(m, src) + +func (x *GoogleProtobuf_StringValue) Reset() { + *x = GoogleProtobuf_StringValue{} + if protoimpl.UnsafeEnabled { + mi := &file_gen_generated_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GoogleProtobuf_StringValue) XXX_Size() int { - return xxx_messageInfo_GoogleProtobuf_StringValue.Size(m) + +func (x *GoogleProtobuf_StringValue) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GoogleProtobuf_StringValue) XXX_DiscardUnknown() { - xxx_messageInfo_GoogleProtobuf_StringValue.DiscardUnknown(m) + +func (*GoogleProtobuf_StringValue) ProtoMessage() {} + +func (x *GoogleProtobuf_StringValue) ProtoReflect() protoreflect.Message { + mi := &file_gen_generated_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) } -var xxx_messageInfo_GoogleProtobuf_StringValue proto.InternalMessageInfo +// Deprecated: Use GoogleProtobuf_StringValue.ProtoReflect.Descriptor instead. +func (*GoogleProtobuf_StringValue) Descriptor() ([]byte, []int) { + return file_gen_generated_proto_rawDescGZIP(), []int{0} +} -func (m *GoogleProtobuf_StringValue) GetValue() string { - if m != nil { - return m.Value +func (x *GoogleProtobuf_StringValue) GetValue() string { + if x != nil { + return x.Value } return "" } type V1_TestObject struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Stuff *GoogleProtobuf_StringValue `protobuf:"bytes,2,opt,name=stuff,proto3" json:"stuff,omitempty"` - BoolMessage bool `protobuf:"varint,3,opt,name=bool_message,json=boolMessage,proto3" json:"bool_message,omitempty"` - BytesMessage []byte `protobuf:"bytes,4,opt,name=bytes_message,json=bytesMessage,proto3" json:"bytes_message,omitempty"` - DoubleMessage float64 `protobuf:"fixed64,5,opt,name=double_message,json=doubleMessage,proto3" json:"double_message,omitempty"` - Fixed32Message uint32 `protobuf:"fixed32,6,opt,name=fixed32_message,json=fixed32Message,proto3" json:"fixed32_message,omitempty"` - Fixed64Message uint64 `protobuf:"fixed64,7,opt,name=fixed64_message,json=fixed64Message,proto3" json:"fixed64_message,omitempty"` - FloatMessage float32 `protobuf:"fixed32,8,opt,name=float_message,json=floatMessage,proto3" json:"float_message,omitempty"` - Sfixed32Message int32 `protobuf:"fixed32,9,opt,name=sfixed32_message,json=sfixed32Message,proto3" json:"sfixed32_message,omitempty"` - Sfixed64Message int64 `protobuf:"fixed64,10,opt,name=sfixed64_message,json=sfixed64Message,proto3" json:"sfixed64_message,omitempty"` - Sint32Message int32 `protobuf:"zigzag32,11,opt,name=sint32_message,json=sint32Message,proto3" json:"sint32_message,omitempty"` - Sint64Message int64 `protobuf:"zigzag64,12,opt,name=sint64_message,json=sint64Message,proto3" json:"sint64_message,omitempty"` - Uint32Message uint32 `protobuf:"varint,13,opt,name=uint32_message,json=uint32Message,proto3" json:"uint32_message,omitempty"` - Uint64Message uint64 `protobuf:"varint,14,opt,name=uint64_message,json=uint64Message,proto3" json:"uint64_message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *V1_TestObject) Reset() { *m = V1_TestObject{} } -func (m *V1_TestObject) String() string { return proto.CompactTextString(m) } -func (*V1_TestObject) ProtoMessage() {} -func (*V1_TestObject) Descriptor() ([]byte, []int) { - return fileDescriptor_273b4d767eeed8e1, []int{1} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Stuff *GoogleProtobuf_StringValue `protobuf:"bytes,2,opt,name=stuff,proto3" json:"stuff,omitempty"` + BoolMessage bool `protobuf:"varint,3,opt,name=bool_message,json=boolMessage,proto3" json:"bool_message,omitempty"` + BytesMessage []byte `protobuf:"bytes,4,opt,name=bytes_message,json=bytesMessage,proto3" json:"bytes_message,omitempty"` + DoubleMessage float64 `protobuf:"fixed64,5,opt,name=double_message,json=doubleMessage,proto3" json:"double_message,omitempty"` + Fixed32Message uint32 `protobuf:"fixed32,6,opt,name=fixed32_message,json=fixed32Message,proto3" json:"fixed32_message,omitempty"` + Fixed64Message uint64 `protobuf:"fixed64,7,opt,name=fixed64_message,json=fixed64Message,proto3" json:"fixed64_message,omitempty"` + FloatMessage float32 `protobuf:"fixed32,8,opt,name=float_message,json=floatMessage,proto3" json:"float_message,omitempty"` + Sfixed32Message int32 `protobuf:"fixed32,9,opt,name=sfixed32_message,json=sfixed32Message,proto3" json:"sfixed32_message,omitempty"` + Sfixed64Message int64 `protobuf:"fixed64,10,opt,name=sfixed64_message,json=sfixed64Message,proto3" json:"sfixed64_message,omitempty"` + Sint32Message int32 `protobuf:"zigzag32,11,opt,name=sint32_message,json=sint32Message,proto3" json:"sint32_message,omitempty"` + Sint64Message int64 `protobuf:"zigzag64,12,opt,name=sint64_message,json=sint64Message,proto3" json:"sint64_message,omitempty"` + Uint32Message uint32 `protobuf:"varint,13,opt,name=uint32_message,json=uint32Message,proto3" json:"uint32_message,omitempty"` + Uint64Message uint64 `protobuf:"varint,14,opt,name=uint64_message,json=uint64Message,proto3" json:"uint64_message,omitempty"` +} + +func (x *V1_TestObject) Reset() { + *x = V1_TestObject{} + if protoimpl.UnsafeEnabled { + mi := &file_gen_generated_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *V1_TestObject) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_V1_TestObject.Unmarshal(m, b) +func (x *V1_TestObject) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *V1_TestObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_V1_TestObject.Marshal(b, m, deterministic) -} -func (m *V1_TestObject) XXX_Merge(src proto.Message) { - xxx_messageInfo_V1_TestObject.Merge(m, src) -} -func (m *V1_TestObject) XXX_Size() int { - return xxx_messageInfo_V1_TestObject.Size(m) -} -func (m *V1_TestObject) XXX_DiscardUnknown() { - xxx_messageInfo_V1_TestObject.DiscardUnknown(m) + +func (*V1_TestObject) ProtoMessage() {} + +func (x *V1_TestObject) ProtoReflect() protoreflect.Message { + mi := &file_gen_generated_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) } -var xxx_messageInfo_V1_TestObject proto.InternalMessageInfo +// Deprecated: Use V1_TestObject.ProtoReflect.Descriptor instead. +func (*V1_TestObject) Descriptor() ([]byte, []int) { + return file_gen_generated_proto_rawDescGZIP(), []int{1} +} -func (m *V1_TestObject) GetId() int64 { - if m != nil { - return m.Id +func (x *V1_TestObject) GetId() int64 { + if x != nil { + return x.Id } return 0 } -func (m *V1_TestObject) GetStuff() *GoogleProtobuf_StringValue { - if m != nil { - return m.Stuff +func (x *V1_TestObject) GetStuff() *GoogleProtobuf_StringValue { + if x != nil { + return x.Stuff } return nil } -func (m *V1_TestObject) GetBoolMessage() bool { - if m != nil { - return m.BoolMessage +func (x *V1_TestObject) GetBoolMessage() bool { + if x != nil { + return x.BoolMessage } return false } -func (m *V1_TestObject) GetBytesMessage() []byte { - if m != nil { - return m.BytesMessage +func (x *V1_TestObject) GetBytesMessage() []byte { + if x != nil { + return x.BytesMessage } return nil } -func (m *V1_TestObject) GetDoubleMessage() float64 { - if m != nil { - return m.DoubleMessage +func (x *V1_TestObject) GetDoubleMessage() float64 { + if x != nil { + return x.DoubleMessage } return 0 } -func (m *V1_TestObject) GetFixed32Message() uint32 { - if m != nil { - return m.Fixed32Message +func (x *V1_TestObject) GetFixed32Message() uint32 { + if x != nil { + return x.Fixed32Message } return 0 } -func (m *V1_TestObject) GetFixed64Message() uint64 { - if m != nil { - return m.Fixed64Message +func (x *V1_TestObject) GetFixed64Message() uint64 { + if x != nil { + return x.Fixed64Message } return 0 } -func (m *V1_TestObject) GetFloatMessage() float32 { - if m != nil { - return m.FloatMessage +func (x *V1_TestObject) GetFloatMessage() float32 { + if x != nil { + return x.FloatMessage } return 0 } -func (m *V1_TestObject) GetSfixed32Message() int32 { - if m != nil { - return m.Sfixed32Message +func (x *V1_TestObject) GetSfixed32Message() int32 { + if x != nil { + return x.Sfixed32Message } return 0 } -func (m *V1_TestObject) GetSfixed64Message() int64 { - if m != nil { - return m.Sfixed64Message +func (x *V1_TestObject) GetSfixed64Message() int64 { + if x != nil { + return x.Sfixed64Message } return 0 } -func (m *V1_TestObject) GetSint32Message() int32 { - if m != nil { - return m.Sint32Message +func (x *V1_TestObject) GetSint32Message() int32 { + if x != nil { + return x.Sint32Message } return 0 } -func (m *V1_TestObject) GetSint64Message() int64 { - if m != nil { - return m.Sint64Message +func (x *V1_TestObject) GetSint64Message() int64 { + if x != nil { + return x.Sint64Message } return 0 } -func (m *V1_TestObject) GetUint32Message() uint32 { - if m != nil { - return m.Uint32Message +func (x *V1_TestObject) GetUint32Message() uint32 { + if x != nil { + return x.Uint32Message } return 0 } -func (m *V1_TestObject) GetUint64Message() uint64 { - if m != nil { - return m.Uint64Message +func (x *V1_TestObject) GetUint64Message() uint64 { + if x != nil { + return x.Uint64Message } return 0 } type V1_TestObject2_MapObjectsEntry struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value *V1_TestObject `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *V1_TestObject2_MapObjectsEntry) Reset() { *m = V1_TestObject2_MapObjectsEntry{} } -func (m *V1_TestObject2_MapObjectsEntry) String() string { return proto.CompactTextString(m) } -func (*V1_TestObject2_MapObjectsEntry) ProtoMessage() {} -func (*V1_TestObject2_MapObjectsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_273b4d767eeed8e1, []int{2} + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value *V1_TestObject `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *V1_TestObject2_MapObjectsEntry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_V1_TestObject2_MapObjectsEntry.Unmarshal(m, b) -} -func (m *V1_TestObject2_MapObjectsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_V1_TestObject2_MapObjectsEntry.Marshal(b, m, deterministic) -} -func (m *V1_TestObject2_MapObjectsEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_V1_TestObject2_MapObjectsEntry.Merge(m, src) +func (x *V1_TestObject2_MapObjectsEntry) Reset() { + *x = V1_TestObject2_MapObjectsEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_gen_generated_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *V1_TestObject2_MapObjectsEntry) XXX_Size() int { - return xxx_messageInfo_V1_TestObject2_MapObjectsEntry.Size(m) + +func (x *V1_TestObject2_MapObjectsEntry) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *V1_TestObject2_MapObjectsEntry) XXX_DiscardUnknown() { - xxx_messageInfo_V1_TestObject2_MapObjectsEntry.DiscardUnknown(m) + +func (*V1_TestObject2_MapObjectsEntry) ProtoMessage() {} + +func (x *V1_TestObject2_MapObjectsEntry) ProtoReflect() protoreflect.Message { + mi := &file_gen_generated_proto_msgTypes[2] + 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) } -var xxx_messageInfo_V1_TestObject2_MapObjectsEntry proto.InternalMessageInfo +// Deprecated: Use V1_TestObject2_MapObjectsEntry.ProtoReflect.Descriptor instead. +func (*V1_TestObject2_MapObjectsEntry) Descriptor() ([]byte, []int) { + return file_gen_generated_proto_rawDescGZIP(), []int{2} +} -func (m *V1_TestObject2_MapObjectsEntry) GetKey() string { - if m != nil { - return m.Key +func (x *V1_TestObject2_MapObjectsEntry) GetKey() string { + if x != nil { + return x.Key } return "" } -func (m *V1_TestObject2_MapObjectsEntry) GetValue() *V1_TestObject { - if m != nil { - return m.Value +func (x *V1_TestObject2_MapObjectsEntry) GetValue() *V1_TestObject { + if x != nil { + return x.Value } return nil } type V1_TestObject2_StringMapsEntry struct { - Key int32 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *V1_TestObject2_StringMapsEntry) Reset() { *m = V1_TestObject2_StringMapsEntry{} } -func (m *V1_TestObject2_StringMapsEntry) String() string { return proto.CompactTextString(m) } -func (*V1_TestObject2_StringMapsEntry) ProtoMessage() {} -func (*V1_TestObject2_StringMapsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_273b4d767eeed8e1, []int{3} + Key int32 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *V1_TestObject2_StringMapsEntry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_V1_TestObject2_StringMapsEntry.Unmarshal(m, b) -} -func (m *V1_TestObject2_StringMapsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_V1_TestObject2_StringMapsEntry.Marshal(b, m, deterministic) -} -func (m *V1_TestObject2_StringMapsEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_V1_TestObject2_StringMapsEntry.Merge(m, src) +func (x *V1_TestObject2_StringMapsEntry) Reset() { + *x = V1_TestObject2_StringMapsEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_gen_generated_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *V1_TestObject2_StringMapsEntry) XXX_Size() int { - return xxx_messageInfo_V1_TestObject2_StringMapsEntry.Size(m) + +func (x *V1_TestObject2_StringMapsEntry) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *V1_TestObject2_StringMapsEntry) XXX_DiscardUnknown() { - xxx_messageInfo_V1_TestObject2_StringMapsEntry.DiscardUnknown(m) + +func (*V1_TestObject2_StringMapsEntry) ProtoMessage() {} + +func (x *V1_TestObject2_StringMapsEntry) ProtoReflect() protoreflect.Message { + mi := &file_gen_generated_proto_msgTypes[3] + 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) } -var xxx_messageInfo_V1_TestObject2_StringMapsEntry proto.InternalMessageInfo +// Deprecated: Use V1_TestObject2_StringMapsEntry.ProtoReflect.Descriptor instead. +func (*V1_TestObject2_StringMapsEntry) Descriptor() ([]byte, []int) { + return file_gen_generated_proto_rawDescGZIP(), []int{3} +} -func (m *V1_TestObject2_StringMapsEntry) GetKey() int32 { - if m != nil { - return m.Key +func (x *V1_TestObject2_StringMapsEntry) GetKey() int32 { + if x != nil { + return x.Key } return 0 } -func (m *V1_TestObject2_StringMapsEntry) GetValue() string { - if m != nil { - return m.Value +func (x *V1_TestObject2_StringMapsEntry) GetValue() string { + if x != nil { + return x.Value } return "" } type V1_TestObject2 struct { - Strings []*GoogleProtobuf_StringValue `protobuf:"bytes,1,rep,name=strings,proto3" json:"strings,omitempty"` - MapObjects []*V1_TestObject2_MapObjectsEntry `protobuf:"bytes,2,rep,name=map_objects,json=mapObjects,proto3" json:"map_objects,omitempty"` - StringMaps []*V1_TestObject2_StringMapsEntry `protobuf:"bytes,3,rep,name=string_maps,json=stringMaps,proto3" json:"string_maps,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *V1_TestObject2) Reset() { *m = V1_TestObject2{} } -func (m *V1_TestObject2) String() string { return proto.CompactTextString(m) } -func (*V1_TestObject2) ProtoMessage() {} -func (*V1_TestObject2) Descriptor() ([]byte, []int) { - return fileDescriptor_273b4d767eeed8e1, []int{4} + Strings []*GoogleProtobuf_StringValue `protobuf:"bytes,1,rep,name=strings,proto3" json:"strings,omitempty"` + MapObjects []*V1_TestObject2_MapObjectsEntry `protobuf:"bytes,2,rep,name=map_objects,json=mapObjects,proto3" json:"map_objects,omitempty"` + StringMaps []*V1_TestObject2_StringMapsEntry `protobuf:"bytes,3,rep,name=string_maps,json=stringMaps,proto3" json:"string_maps,omitempty"` } -func (m *V1_TestObject2) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_V1_TestObject2.Unmarshal(m, b) -} -func (m *V1_TestObject2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_V1_TestObject2.Marshal(b, m, deterministic) -} -func (m *V1_TestObject2) XXX_Merge(src proto.Message) { - xxx_messageInfo_V1_TestObject2.Merge(m, src) +func (x *V1_TestObject2) Reset() { + *x = V1_TestObject2{} + if protoimpl.UnsafeEnabled { + mi := &file_gen_generated_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *V1_TestObject2) XXX_Size() int { - return xxx_messageInfo_V1_TestObject2.Size(m) + +func (x *V1_TestObject2) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *V1_TestObject2) XXX_DiscardUnknown() { - xxx_messageInfo_V1_TestObject2.DiscardUnknown(m) + +func (*V1_TestObject2) ProtoMessage() {} + +func (x *V1_TestObject2) ProtoReflect() protoreflect.Message { + mi := &file_gen_generated_proto_msgTypes[4] + 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) } -var xxx_messageInfo_V1_TestObject2 proto.InternalMessageInfo +// Deprecated: Use V1_TestObject2.ProtoReflect.Descriptor instead. +func (*V1_TestObject2) Descriptor() ([]byte, []int) { + return file_gen_generated_proto_rawDescGZIP(), []int{4} +} -func (m *V1_TestObject2) GetStrings() []*GoogleProtobuf_StringValue { - if m != nil { - return m.Strings +func (x *V1_TestObject2) GetStrings() []*GoogleProtobuf_StringValue { + if x != nil { + return x.Strings } return nil } -func (m *V1_TestObject2) GetMapObjects() []*V1_TestObject2_MapObjectsEntry { - if m != nil { - return m.MapObjects +func (x *V1_TestObject2) GetMapObjects() []*V1_TestObject2_MapObjectsEntry { + if x != nil { + return x.MapObjects } return nil } -func (m *V1_TestObject2) GetStringMaps() []*V1_TestObject2_StringMapsEntry { - if m != nil { - return m.StringMaps +func (x *V1_TestObject2) GetStringMaps() []*V1_TestObject2_StringMapsEntry { + if x != nil { + return x.StringMaps } return nil } type V1_TestObject3 struct { - // Types that are valid to be assigned to Oneof_0: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Oneof_0: // *V1_TestObject3_RequestTestObject // *V1_TestObject3_RequestTestObject_2 // *V1_TestObject3_RequestString Oneof_0 isV1_TestObject3_Oneof_0 `protobuf_oneof:"oneof_0"` Bla string `protobuf:"bytes,3,opt,name=bla,proto3" json:"bla,omitempty"` - // Types that are valid to be assigned to Oneof_1: + // Types that are assignable to Oneof_1: // *V1_TestObject3_Request2String // *V1_TestObject3_Request2Int32 - Oneof_1 isV1_TestObject3_Oneof_1 `protobuf_oneof:"oneof_1"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Oneof_1 isV1_TestObject3_Oneof_1 `protobuf_oneof:"oneof_1"` } -func (m *V1_TestObject3) Reset() { *m = V1_TestObject3{} } -func (m *V1_TestObject3) String() string { return proto.CompactTextString(m) } -func (*V1_TestObject3) ProtoMessage() {} -func (*V1_TestObject3) Descriptor() ([]byte, []int) { - return fileDescriptor_273b4d767eeed8e1, []int{5} +func (x *V1_TestObject3) Reset() { + *x = V1_TestObject3{} + if protoimpl.UnsafeEnabled { + mi := &file_gen_generated_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *V1_TestObject3) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_V1_TestObject3.Unmarshal(m, b) -} -func (m *V1_TestObject3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_V1_TestObject3.Marshal(b, m, deterministic) -} -func (m *V1_TestObject3) XXX_Merge(src proto.Message) { - xxx_messageInfo_V1_TestObject3.Merge(m, src) -} -func (m *V1_TestObject3) XXX_Size() int { - return xxx_messageInfo_V1_TestObject3.Size(m) +func (x *V1_TestObject3) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *V1_TestObject3) XXX_DiscardUnknown() { - xxx_messageInfo_V1_TestObject3.DiscardUnknown(m) -} - -var xxx_messageInfo_V1_TestObject3 proto.InternalMessageInfo -type isV1_TestObject3_Oneof_0 interface { - isV1_TestObject3_Oneof_0() -} +func (*V1_TestObject3) ProtoMessage() {} -type V1_TestObject3_RequestTestObject struct { - RequestTestObject *V1_TestObject `protobuf:"bytes,1,opt,name=request_test_object,json=requestTestObject,proto3,oneof"` -} - -type V1_TestObject3_RequestTestObject_2 struct { - RequestTestObject_2 *V1_TestObject2 `protobuf:"bytes,2,opt,name=request_test_object_2,json=requestTestObject2,proto3,oneof"` +func (x *V1_TestObject3) ProtoReflect() protoreflect.Message { + mi := &file_gen_generated_proto_msgTypes[5] + 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) } -type V1_TestObject3_RequestString struct { - RequestString string `protobuf:"bytes,4,opt,name=request_string,json=requestString,proto3,oneof"` +// Deprecated: Use V1_TestObject3.ProtoReflect.Descriptor instead. +func (*V1_TestObject3) Descriptor() ([]byte, []int) { + return file_gen_generated_proto_rawDescGZIP(), []int{5} } -func (*V1_TestObject3_RequestTestObject) isV1_TestObject3_Oneof_0() {} - -func (*V1_TestObject3_RequestTestObject_2) isV1_TestObject3_Oneof_0() {} - -func (*V1_TestObject3_RequestString) isV1_TestObject3_Oneof_0() {} - func (m *V1_TestObject3) GetOneof_0() isV1_TestObject3_Oneof_0 { if m != nil { return m.Oneof_0 @@ -480,50 +548,34 @@ func (m *V1_TestObject3) GetOneof_0() isV1_TestObject3_Oneof_0 { return nil } -func (m *V1_TestObject3) GetRequestTestObject() *V1_TestObject { - if x, ok := m.GetOneof_0().(*V1_TestObject3_RequestTestObject); ok { +func (x *V1_TestObject3) GetRequestTestObject() *V1_TestObject { + if x, ok := x.GetOneof_0().(*V1_TestObject3_RequestTestObject); ok { return x.RequestTestObject } return nil } -func (m *V1_TestObject3) GetRequestTestObject_2() *V1_TestObject2 { - if x, ok := m.GetOneof_0().(*V1_TestObject3_RequestTestObject_2); ok { +func (x *V1_TestObject3) GetRequestTestObject_2() *V1_TestObject2 { + if x, ok := x.GetOneof_0().(*V1_TestObject3_RequestTestObject_2); ok { return x.RequestTestObject_2 } return nil } -func (m *V1_TestObject3) GetRequestString() string { - if x, ok := m.GetOneof_0().(*V1_TestObject3_RequestString); ok { +func (x *V1_TestObject3) GetRequestString() string { + if x, ok := x.GetOneof_0().(*V1_TestObject3_RequestString); ok { return x.RequestString } return "" } -func (m *V1_TestObject3) GetBla() string { - if m != nil { - return m.Bla +func (x *V1_TestObject3) GetBla() string { + if x != nil { + return x.Bla } return "" } -type isV1_TestObject3_Oneof_1 interface { - isV1_TestObject3_Oneof_1() -} - -type V1_TestObject3_Request2String struct { - Request2String string `protobuf:"bytes,5,opt,name=request2_string,json=request2String,proto3,oneof"` -} - -type V1_TestObject3_Request2Int32 struct { - Request2Int32 int32 `protobuf:"varint,6,opt,name=request2_int32,json=request2Int32,proto3,oneof"` -} - -func (*V1_TestObject3_Request2String) isV1_TestObject3_Oneof_1() {} - -func (*V1_TestObject3_Request2Int32) isV1_TestObject3_Oneof_1() {} - func (m *V1_TestObject3) GetOneof_1() isV1_TestObject3_Oneof_1 { if m != nil { return m.Oneof_1 @@ -531,213 +583,494 @@ func (m *V1_TestObject3) GetOneof_1() isV1_TestObject3_Oneof_1 { return nil } -func (m *V1_TestObject3) GetRequest2String() string { - if x, ok := m.GetOneof_1().(*V1_TestObject3_Request2String); ok { +func (x *V1_TestObject3) GetRequest2String() string { + if x, ok := x.GetOneof_1().(*V1_TestObject3_Request2String); ok { return x.Request2String } return "" } -func (m *V1_TestObject3) GetRequest2Int32() int32 { - if x, ok := m.GetOneof_1().(*V1_TestObject3_Request2Int32); ok { +func (x *V1_TestObject3) GetRequest2Int32() int32 { + if x, ok := x.GetOneof_1().(*V1_TestObject3_Request2Int32); ok { return x.Request2Int32 } return 0 } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*V1_TestObject3) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*V1_TestObject3_RequestTestObject)(nil), - (*V1_TestObject3_RequestTestObject_2)(nil), - (*V1_TestObject3_RequestString)(nil), - (*V1_TestObject3_Request2String)(nil), - (*V1_TestObject3_Request2Int32)(nil), - } +type isV1_TestObject3_Oneof_0 interface { + isV1_TestObject3_Oneof_0() } -type V1_EnumMessage struct { - Enum1Message V1_Enum1 `protobuf:"varint,1,opt,name=enum1_message,json=enum1Message,proto3,enum=gen.V1_Enum1" json:"enum1_message,omitempty"` - Enum2Message V1_EnumMessage_Enum2 `protobuf:"varint,2,opt,name=enum2_message,json=enum2Message,proto3,enum=gen.V1_EnumMessage_Enum2" json:"enum2_message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type V1_TestObject3_RequestTestObject struct { + RequestTestObject *V1_TestObject `protobuf:"bytes,1,opt,name=request_test_object,json=requestTestObject,proto3,oneof"` } -func (m *V1_EnumMessage) Reset() { *m = V1_EnumMessage{} } -func (m *V1_EnumMessage) String() string { return proto.CompactTextString(m) } -func (*V1_EnumMessage) ProtoMessage() {} -func (*V1_EnumMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_273b4d767eeed8e1, []int{6} +type V1_TestObject3_RequestTestObject_2 struct { + RequestTestObject_2 *V1_TestObject2 `protobuf:"bytes,2,opt,name=request_test_object_2,json=requestTestObject2,proto3,oneof"` +} + +type V1_TestObject3_RequestString struct { + RequestString string `protobuf:"bytes,4,opt,name=request_string,json=requestString,proto3,oneof"` +} + +func (*V1_TestObject3_RequestTestObject) isV1_TestObject3_Oneof_0() {} + +func (*V1_TestObject3_RequestTestObject_2) isV1_TestObject3_Oneof_0() {} + +func (*V1_TestObject3_RequestString) isV1_TestObject3_Oneof_0() {} + +type isV1_TestObject3_Oneof_1 interface { + isV1_TestObject3_Oneof_1() } -func (m *V1_EnumMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_V1_EnumMessage.Unmarshal(m, b) +type V1_TestObject3_Request2String struct { + Request2String string `protobuf:"bytes,5,opt,name=request2_string,json=request2String,proto3,oneof"` } -func (m *V1_EnumMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_V1_EnumMessage.Marshal(b, m, deterministic) + +type V1_TestObject3_Request2Int32 struct { + Request2Int32 int32 `protobuf:"varint,6,opt,name=request2_int32,json=request2Int32,proto3,oneof"` } -func (m *V1_EnumMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_V1_EnumMessage.Merge(m, src) + +func (*V1_TestObject3_Request2String) isV1_TestObject3_Oneof_1() {} + +func (*V1_TestObject3_Request2Int32) isV1_TestObject3_Oneof_1() {} + +type V1_EnumMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Enum1Message V1_Enum1 `protobuf:"varint,1,opt,name=enum1_message,json=enum1Message,proto3,enum=gen.V1_Enum1" json:"enum1_message,omitempty"` + Enum2Message V1_EnumMessage_Enum2 `protobuf:"varint,2,opt,name=enum2_message,json=enum2Message,proto3,enum=gen.V1_EnumMessage_Enum2" json:"enum2_message,omitempty"` } -func (m *V1_EnumMessage) XXX_Size() int { - return xxx_messageInfo_V1_EnumMessage.Size(m) + +func (x *V1_EnumMessage) Reset() { + *x = V1_EnumMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_gen_generated_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *V1_EnumMessage) XXX_DiscardUnknown() { - xxx_messageInfo_V1_EnumMessage.DiscardUnknown(m) + +func (x *V1_EnumMessage) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_V1_EnumMessage proto.InternalMessageInfo +func (*V1_EnumMessage) ProtoMessage() {} -func (m *V1_EnumMessage) GetEnum1Message() V1_Enum1 { - if m != nil { - return m.Enum1Message +func (x *V1_EnumMessage) ProtoReflect() protoreflect.Message { + mi := &file_gen_generated_proto_msgTypes[6] + 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 V1_EnumMessage.ProtoReflect.Descriptor instead. +func (*V1_EnumMessage) Descriptor() ([]byte, []int) { + return file_gen_generated_proto_rawDescGZIP(), []int{6} +} + +func (x *V1_EnumMessage) GetEnum1Message() V1_Enum1 { + if x != nil { + return x.Enum1Message } return V1_Enum1_ZERO } -func (m *V1_EnumMessage) GetEnum2Message() V1_EnumMessage_Enum2 { - if m != nil { - return m.Enum2Message +func (x *V1_EnumMessage) GetEnum2Message() V1_EnumMessage_Enum2 { + if x != nil { + return x.Enum2Message } return V1_EnumMessage_STUFF } type Record struct { - Object *V1_TestObject `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` - Object_2 *V1_TestObject2 `protobuf:"bytes,2,opt,name=object_2,json=object2,proto3" json:"object_2,omitempty"` - Object_3 *V1_TestObject3 `protobuf:"bytes,3,opt,name=object_3,json=object3,proto3" json:"object_3,omitempty"` - EnumMessage *V1_EnumMessage `protobuf:"bytes,4,opt,name=enum_message,json=enumMessage,proto3" json:"enum_message,omitempty"` - EnumInsideMessage V1_EnumMessage_Enum2 `protobuf:"varint,5,opt,name=enum_inside_message,json=enumInsideMessage,proto3,enum=gen.V1_EnumMessage_Enum2" json:"enum_inside_message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Record) Reset() { *m = Record{} } -func (m *Record) String() string { return proto.CompactTextString(m) } -func (*Record) ProtoMessage() {} -func (*Record) Descriptor() ([]byte, []int) { - return fileDescriptor_273b4d767eeed8e1, []int{7} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Object *V1_TestObject `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` + Object_2 *V1_TestObject2 `protobuf:"bytes,2,opt,name=object_2,json=object2,proto3" json:"object_2,omitempty"` + Object_3 *V1_TestObject3 `protobuf:"bytes,3,opt,name=object_3,json=object3,proto3" json:"object_3,omitempty"` + EnumMessage *V1_EnumMessage `protobuf:"bytes,4,opt,name=enum_message,json=enumMessage,proto3" json:"enum_message,omitempty"` + EnumInsideMessage V1_EnumMessage_Enum2 `protobuf:"varint,5,opt,name=enum_inside_message,json=enumInsideMessage,proto3,enum=gen.V1_EnumMessage_Enum2" json:"enum_inside_message,omitempty"` +} + +func (x *Record) Reset() { + *x = Record{} + if protoimpl.UnsafeEnabled { + mi := &file_gen_generated_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Record) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Record.Unmarshal(m, b) -} -func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Record.Marshal(b, m, deterministic) -} -func (m *Record) XXX_Merge(src proto.Message) { - xxx_messageInfo_Record.Merge(m, src) -} -func (m *Record) XXX_Size() int { - return xxx_messageInfo_Record.Size(m) +func (x *Record) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Record) XXX_DiscardUnknown() { - xxx_messageInfo_Record.DiscardUnknown(m) + +func (*Record) ProtoMessage() {} + +func (x *Record) ProtoReflect() protoreflect.Message { + mi := &file_gen_generated_proto_msgTypes[7] + 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) } -var xxx_messageInfo_Record proto.InternalMessageInfo +// Deprecated: Use Record.ProtoReflect.Descriptor instead. +func (*Record) Descriptor() ([]byte, []int) { + return file_gen_generated_proto_rawDescGZIP(), []int{7} +} -func (m *Record) GetObject() *V1_TestObject { - if m != nil { - return m.Object +func (x *Record) GetObject() *V1_TestObject { + if x != nil { + return x.Object } return nil } -func (m *Record) GetObject_2() *V1_TestObject2 { - if m != nil { - return m.Object_2 +func (x *Record) GetObject_2() *V1_TestObject2 { + if x != nil { + return x.Object_2 } return nil } -func (m *Record) GetObject_3() *V1_TestObject3 { - if m != nil { - return m.Object_3 +func (x *Record) GetObject_3() *V1_TestObject3 { + if x != nil { + return x.Object_3 } return nil } -func (m *Record) GetEnumMessage() *V1_EnumMessage { - if m != nil { - return m.EnumMessage +func (x *Record) GetEnumMessage() *V1_EnumMessage { + if x != nil { + return x.EnumMessage } return nil } -func (m *Record) GetEnumInsideMessage() V1_EnumMessage_Enum2 { - if m != nil { - return m.EnumInsideMessage +func (x *Record) GetEnumInsideMessage() V1_EnumMessage_Enum2 { + if x != nil { + return x.EnumInsideMessage } return V1_EnumMessage_STUFF } -func init() { - proto.RegisterEnum("gen.V1_Enum1", V1_Enum1_name, V1_Enum1_value) - proto.RegisterEnum("gen.V1_EnumMessage_Enum2", V1_EnumMessage_Enum2_name, V1_EnumMessage_Enum2_value) - proto.RegisterType((*GoogleProtobuf_StringValue)(nil), "gen.google_protobuf_StringValue") - proto.RegisterType((*V1_TestObject)(nil), "gen.v1_TestObject") - proto.RegisterType((*V1_TestObject2_MapObjectsEntry)(nil), "gen.v1_TestObject2_MapObjectsEntry") - proto.RegisterType((*V1_TestObject2_StringMapsEntry)(nil), "gen.v1_TestObject2_StringMapsEntry") - proto.RegisterType((*V1_TestObject2)(nil), "gen.v1_TestObject2") - proto.RegisterType((*V1_TestObject3)(nil), "gen.v1_TestObject3") - proto.RegisterType((*V1_EnumMessage)(nil), "gen.v1_EnumMessage") - proto.RegisterType((*Record)(nil), "gen.record") -} - -func init() { proto.RegisterFile("gen/generated.proto", fileDescriptor_273b4d767eeed8e1) } - -var fileDescriptor_273b4d767eeed8e1 = []byte{ - // 783 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcb, 0x6e, 0xc2, 0x46, - 0x14, 0x65, 0x6c, 0xcc, 0xe3, 0x82, 0x8d, 0x33, 0xa4, 0x12, 0x55, 0xa4, 0x6a, 0x4a, 0x14, 0xc5, - 0xc9, 0x82, 0x16, 0x13, 0xb1, 0x68, 0xa5, 0x2e, 0xaa, 0x10, 0xc1, 0x22, 0xa5, 0x9a, 0x90, 0x56, - 0xaa, 0x2a, 0x59, 0x26, 0x0c, 0x16, 0x2d, 0xd8, 0x14, 0xdb, 0x51, 0xf3, 0x25, 0x5d, 0xf7, 0x0b, - 0xfa, 0x15, 0xfd, 0x87, 0x7e, 0x4e, 0xe5, 0x19, 0x8f, 0xb1, 0x81, 0xa6, 0xd9, 0x44, 0x37, 0x87, - 0x73, 0xce, 0x9d, 0xfb, 0x32, 0xb4, 0x3d, 0xe6, 0x7f, 0xe1, 0x31, 0x9f, 0xed, 0xdc, 0x88, 0x2d, - 0x7a, 0xdb, 0x5d, 0x10, 0x05, 0x58, 0xf5, 0x98, 0xdf, 0x1d, 0xc0, 0x85, 0x17, 0x04, 0xde, 0x9a, - 0x39, 0x1c, 0x9c, 0xc7, 0x4b, 0xe7, 0x29, 0xda, 0xad, 0x7c, 0xef, 0x07, 0x77, 0x1d, 0x33, 0x7c, - 0x0e, 0xda, 0x6b, 0x12, 0x74, 0x10, 0x41, 0x56, 0x9d, 0x8a, 0x7f, 0xba, 0x7f, 0x95, 0x41, 0x7f, - 0xed, 0x3b, 0x33, 0x16, 0x46, 0xd3, 0xf9, 0x2f, 0xec, 0x25, 0xc2, 0x06, 0x28, 0xab, 0x05, 0x27, - 0xa9, 0x54, 0x59, 0x2d, 0xf0, 0x10, 0xb4, 0x30, 0x8a, 0x97, 0xcb, 0x8e, 0x42, 0x90, 0xd5, 0xb0, - 0x49, 0xcf, 0x63, 0x7e, 0xef, 0x9d, 0x44, 0x54, 0xd0, 0xf1, 0xe7, 0xd0, 0x9c, 0x07, 0xc1, 0xda, - 0xd9, 0xb0, 0x30, 0x74, 0x3d, 0xd6, 0x51, 0x09, 0xb2, 0x6a, 0xb4, 0x91, 0x60, 0x8f, 0x02, 0xc2, - 0x97, 0xa0, 0xcf, 0xdf, 0x22, 0x16, 0x66, 0x9c, 0x32, 0x41, 0x56, 0x93, 0x36, 0x39, 0x28, 0x49, - 0x57, 0x60, 0x2c, 0x82, 0x78, 0xbe, 0x66, 0x19, 0x4b, 0x23, 0xc8, 0x42, 0x54, 0x17, 0xa8, 0xa4, - 0x5d, 0x43, 0x6b, 0xb9, 0xfa, 0x9d, 0x2d, 0x06, 0x76, 0xc6, 0xab, 0x10, 0x64, 0x55, 0xa9, 0x91, - 0xc2, 0x87, 0xc4, 0xe1, 0x5d, 0x46, 0xac, 0x12, 0x64, 0x55, 0x52, 0xe2, 0xf0, 0x2e, 0xf7, 0xba, - 0xe5, 0x3a, 0x70, 0xa3, 0x8c, 0x56, 0x23, 0xc8, 0x52, 0x68, 0x93, 0x83, 0x92, 0x74, 0x03, 0x66, - 0x78, 0x98, 0xb7, 0x4e, 0x90, 0xd5, 0xa2, 0xad, 0xf0, 0x20, 0x71, 0x46, 0xcd, 0x65, 0x06, 0x82, - 0x2c, 0x53, 0x52, 0xf7, 0xa9, 0xaf, 0xc0, 0x08, 0x57, 0x7e, 0x94, 0xf3, 0x6c, 0x10, 0x64, 0x9d, - 0x51, 0x5d, 0xa0, 0x07, 0xb4, 0x9c, 0x5f, 0x93, 0x20, 0x0b, 0x0b, 0x5a, 0xc1, 0x2d, 0x2e, 0xba, - 0xe9, 0x04, 0x59, 0x3a, 0xd5, 0xe3, 0x43, 0xb7, 0xb8, 0xe8, 0x66, 0x10, 0x64, 0x95, 0x05, 0x2d, - 0x73, 0xeb, 0xfe, 0x0c, 0x9f, 0x15, 0x16, 0xc6, 0x76, 0x1e, 0xdd, 0xad, 0x08, 0xc3, 0x91, 0x1f, - 0xed, 0xde, 0xb0, 0x09, 0xea, 0xaf, 0xec, 0x2d, 0xdd, 0xb3, 0x24, 0xc4, 0x96, 0xdc, 0x3d, 0xb1, - 0x43, 0x98, 0xef, 0x50, 0xc1, 0x45, 0xee, 0xe3, 0xf8, 0xc8, 0x5d, 0xac, 0xd6, 0xa3, 0xbb, 0x3d, - 0x76, 0xd7, 0x84, 0xfb, 0x79, 0xde, 0x3d, 0xdb, 0xec, 0x7f, 0x10, 0x18, 0x45, 0x2b, 0xfc, 0x15, - 0x54, 0x43, 0xee, 0x16, 0x76, 0x10, 0x51, 0x3f, 0xb4, 0xcc, 0x52, 0x80, 0xef, 0xa1, 0xb1, 0x71, - 0xb7, 0x4e, 0x20, 0x0a, 0xed, 0x28, 0x5c, 0x7f, 0x79, 0x5c, 0xc8, 0x51, 0x3b, 0x28, 0x6c, 0x32, - 0x20, 0x71, 0x11, 0x86, 0xce, 0xc6, 0xdd, 0x86, 0x1d, 0xf5, 0xbf, 0x5d, 0x0e, 0xca, 0xa6, 0x10, - 0x66, 0x40, 0xf7, 0x6f, 0xe5, 0xa0, 0xb4, 0x01, 0xbe, 0x87, 0xf6, 0x8e, 0xfd, 0x16, 0xb3, 0x30, - 0x72, 0xa2, 0xe4, 0x8f, 0x78, 0x27, 0xef, 0xd2, 0xc9, 0x7e, 0x8f, 0x4b, 0xf4, 0x2c, 0x15, 0xe4, - 0x6e, 0x7f, 0x0c, 0x9f, 0x9c, 0x70, 0x71, 0xec, 0x74, 0x6e, 0xed, 0x13, 0x0f, 0x1d, 0x97, 0x28, - 0x3e, 0x32, 0xb2, 0xf1, 0x35, 0x18, 0xd2, 0x49, 0x3c, 0x9c, 0xdf, 0x76, 0x7d, 0x5c, 0xa2, 0x7a, - 0x8a, 0x8b, 0x02, 0x93, 0x71, 0xce, 0xd7, 0x2e, 0xff, 0x3a, 0xd4, 0x69, 0x12, 0xe2, 0x1b, 0x68, - 0xa5, 0x14, 0x5b, 0x6a, 0x35, 0xae, 0x45, 0x54, 0x7a, 0xda, 0xa9, 0x78, 0x9f, 0xc5, 0x76, 0xf8, - 0x2e, 0xf3, 0x9b, 0xd7, 0xc6, 0x28, 0xcb, 0x62, 0x4f, 0x12, 0xf8, 0xdb, 0x3a, 0x54, 0x03, 0x9f, - 0x05, 0x4b, 0xe7, 0xcb, 0x7d, 0xd8, 0xef, 0xfe, 0x29, 0x56, 0x64, 0xe4, 0xc7, 0x1b, 0x79, 0x04, - 0x36, 0xe8, 0xcc, 0x8f, 0x37, 0xfd, 0xec, 0x06, 0x92, 0x0e, 0x1a, 0xb6, 0x2e, 0x2b, 0x4f, 0xb8, - 0x7d, 0xda, 0xe4, 0x1c, 0xa9, 0xf9, 0x46, 0x68, 0xf6, 0xe7, 0xa5, 0x70, 0xcd, 0xa7, 0x79, 0x4d, - 0xca, 0xed, 0x25, 0xb1, 0x2d, 0xf4, 0xf2, 0xf0, 0xba, 0x17, 0xa0, 0x71, 0x18, 0xd7, 0x41, 0x7b, - 0x9a, 0x3d, 0x3f, 0x3c, 0x98, 0x25, 0x5c, 0x05, 0xf5, 0xfb, 0xc9, 0xc8, 0x44, 0xdd, 0x3f, 0x14, - 0xa8, 0xec, 0xd8, 0x4b, 0xb0, 0x5b, 0xe0, 0x5b, 0xa8, 0xfc, 0xdf, 0x58, 0x69, 0xca, 0xc0, 0x3d, - 0xa8, 0x7d, 0x60, 0x78, 0xb4, 0x1a, 0xa4, 0xf3, 0xda, 0xf3, 0x07, 0x7c, 0x16, 0x27, 0xf9, 0x03, - 0xc9, 0x1f, 0xe0, 0x21, 0xf0, 0x1a, 0x0a, 0x5f, 0xee, 0x9c, 0x26, 0x57, 0x32, 0x6d, 0xb0, 0x5c, - 0x7f, 0x27, 0xd0, 0xe6, 0xba, 0x95, 0x1f, 0xae, 0x16, 0xc5, 0x4f, 0xfa, 0xbb, 0x1d, 0x3b, 0x4b, - 0x54, 0x13, 0x2e, 0x4a, 0x7f, 0xb8, 0xfd, 0x1a, 0x6a, 0x72, 0x20, 0xb8, 0x06, 0xe5, 0x9f, 0x46, - 0x74, 0x2a, 0x1a, 0x37, 0xfd, 0x6e, 0x64, 0xa2, 0x24, 0x98, 0xfd, 0x38, 0x35, 0x95, 0xa4, 0xab, - 0xb3, 0x31, 0x1d, 0x8d, 0x4c, 0x35, 0xa1, 0x3d, 0x4c, 0x9f, 0xa9, 0x59, 0x9e, 0x57, 0xf8, 0xb5, - 0x0f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x56, 0xb8, 0xa8, 0x02, 0x4f, 0x07, 0x00, 0x00, +var File_gen_generated_proto protoreflect.FileDescriptor + +var file_gen_generated_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x67, 0x65, 0x6e, 0x22, 0x33, 0x0a, 0x1b, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0xaf, 0x04, 0x0a, 0x0d, 0x76, 0x31, 0x5f, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x74, 0x75, 0x66, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x05, 0x73, 0x74, 0x75, 0x66, 0x66, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6f, 0x6f, + 0x6c, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x64, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x33, 0x32, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x07, 0x52, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0e, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x36, 0x34, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x02, 0x52, 0x0c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x29, 0x0a, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x10, 0x52, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0d, 0x73, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, + 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x12, 0x52, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x75, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x22, 0x5c, 0x0a, 0x1e, 0x76, 0x31, 0x5f, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x32, 0x5f, 0x4d, 0x61, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x5f, 0x54, 0x65, + 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x48, 0x0a, 0x1e, 0x76, 0x31, 0x5f, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x32, 0x5f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd8, 0x01, 0x0a, 0x0e, 0x76, 0x31, + 0x5f, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x12, 0x3a, 0x0a, 0x07, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x67, 0x65, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x5f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x44, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x67, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x5f, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x32, 0x5f, 0x4d, 0x61, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x44, + 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x5f, 0x54, 0x65, 0x73, + 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x5f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, + 0x61, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x4d, 0x61, 0x70, 0x73, 0x22, 0xc5, 0x02, 0x0a, 0x0e, 0x76, 0x31, 0x5f, 0x54, 0x65, 0x73, 0x74, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x33, 0x12, 0x44, 0x0a, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x5f, 0x54, 0x65, + 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x48, 0x0a, + 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, + 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x5f, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x32, 0x48, 0x00, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x65, 0x73, 0x74, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x12, 0x27, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x12, 0x10, 0x0a, 0x03, 0x62, 0x6c, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, + 0x6c, 0x61, 0x12, 0x29, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x5f, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0e, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x0a, + 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, + 0x30, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x31, 0x22, 0xa1, 0x01, 0x0a, + 0x0e, 0x76, 0x31, 0x5f, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x32, 0x0a, 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x31, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x67, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x5f, + 0x45, 0x6e, 0x75, 0x6d, 0x31, 0x52, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x31, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x32, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x65, 0x6e, + 0x2e, 0x76, 0x31, 0x5f, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x32, 0x52, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x32, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x22, 0x1b, 0x0a, 0x05, 0x45, 0x6e, 0x75, 0x6d, 0x32, 0x12, 0x09, 0x0a, 0x05, + 0x53, 0x54, 0x55, 0x46, 0x46, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x49, 0x45, 0x10, 0x01, + 0x22, 0x97, 0x02, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x65, + 0x6e, 0x2e, 0x76, 0x31, 0x5f, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2e, 0x0a, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x65, 0x6e, 0x2e, + 0x76, 0x31, 0x5f, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x52, 0x07, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x12, 0x2e, 0x0a, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x65, 0x6e, 0x2e, + 0x76, 0x31, 0x5f, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x33, 0x52, 0x07, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x33, 0x12, 0x36, 0x0a, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x5f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x67, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x5f, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x49, 0x0a, 0x13, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, + 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x5f, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x32, 0x52, 0x11, 0x65, 0x6e, 0x75, 0x6d, 0x49, 0x6e, 0x73, + 0x69, 0x64, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x3b, 0x0a, 0x08, 0x76, 0x31, + 0x5f, 0x45, 0x6e, 0x75, 0x6d, 0x31, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x57, 0x4f, + 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0x03, 0x12, 0x08, 0x0a, + 0x04, 0x46, 0x4f, 0x55, 0x52, 0x10, 0x04, 0x42, 0x4b, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x72, 0x6f, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2d, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gen_generated_proto_rawDescOnce sync.Once + file_gen_generated_proto_rawDescData = file_gen_generated_proto_rawDesc +) + +func file_gen_generated_proto_rawDescGZIP() []byte { + file_gen_generated_proto_rawDescOnce.Do(func() { + file_gen_generated_proto_rawDescData = protoimpl.X.CompressGZIP(file_gen_generated_proto_rawDescData) + }) + return file_gen_generated_proto_rawDescData +} + +var file_gen_generated_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_gen_generated_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_gen_generated_proto_goTypes = []interface{}{ + (V1_Enum1)(0), // 0: gen.v1_Enum1 + (V1_EnumMessage_Enum2)(0), // 1: gen.v1_EnumMessage.Enum2 + (*GoogleProtobuf_StringValue)(nil), // 2: gen.google_protobuf_StringValue + (*V1_TestObject)(nil), // 3: gen.v1_TestObject + (*V1_TestObject2_MapObjectsEntry)(nil), // 4: gen.v1_TestObject2_MapObjectsEntry + (*V1_TestObject2_StringMapsEntry)(nil), // 5: gen.v1_TestObject2_StringMapsEntry + (*V1_TestObject2)(nil), // 6: gen.v1_TestObject2 + (*V1_TestObject3)(nil), // 7: gen.v1_TestObject3 + (*V1_EnumMessage)(nil), // 8: gen.v1_EnumMessage + (*Record)(nil), // 9: gen.record +} +var file_gen_generated_proto_depIdxs = []int32{ + 2, // 0: gen.v1_TestObject.stuff:type_name -> gen.google_protobuf_StringValue + 3, // 1: gen.v1_TestObject2_MapObjectsEntry.value:type_name -> gen.v1_TestObject + 2, // 2: gen.v1_TestObject2.strings:type_name -> gen.google_protobuf_StringValue + 4, // 3: gen.v1_TestObject2.map_objects:type_name -> gen.v1_TestObject2_MapObjectsEntry + 5, // 4: gen.v1_TestObject2.string_maps:type_name -> gen.v1_TestObject2_StringMapsEntry + 3, // 5: gen.v1_TestObject3.request_test_object:type_name -> gen.v1_TestObject + 6, // 6: gen.v1_TestObject3.request_test_object_2:type_name -> gen.v1_TestObject2 + 0, // 7: gen.v1_EnumMessage.enum1_message:type_name -> gen.v1_Enum1 + 1, // 8: gen.v1_EnumMessage.enum2_message:type_name -> gen.v1_EnumMessage.Enum2 + 3, // 9: gen.record.object:type_name -> gen.v1_TestObject + 6, // 10: gen.record.object_2:type_name -> gen.v1_TestObject2 + 7, // 11: gen.record.object_3:type_name -> gen.v1_TestObject3 + 8, // 12: gen.record.enum_message:type_name -> gen.v1_EnumMessage + 1, // 13: gen.record.enum_inside_message:type_name -> gen.v1_EnumMessage.Enum2 + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_gen_generated_proto_init() } +func file_gen_generated_proto_init() { + if File_gen_generated_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gen_generated_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GoogleProtobuf_StringValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gen_generated_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*V1_TestObject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gen_generated_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*V1_TestObject2_MapObjectsEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gen_generated_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*V1_TestObject2_StringMapsEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gen_generated_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*V1_TestObject2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gen_generated_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*V1_TestObject3); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gen_generated_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*V1_EnumMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gen_generated_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Record); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_gen_generated_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*V1_TestObject3_RequestTestObject)(nil), + (*V1_TestObject3_RequestTestObject_2)(nil), + (*V1_TestObject3_RequestString)(nil), + (*V1_TestObject3_Request2String)(nil), + (*V1_TestObject3_Request2Int32)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gen_generated_proto_rawDesc, + NumEnums: 2, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_gen_generated_proto_goTypes, + DependencyIndexes: file_gen_generated_proto_depIdxs, + EnumInfos: file_gen_generated_proto_enumTypes, + MessageInfos: file_gen_generated_proto_msgTypes, + }.Build() + File_gen_generated_proto = out.File + file_gen_generated_proto_rawDesc = nil + file_gen_generated_proto_goTypes = nil + file_gen_generated_proto_depIdxs = nil } diff --git a/internal/testing/testProto/v1/enums.pb.go b/internal/testing/testProto/v1/enums.pb.go index b30b011..3c4d2be 100644 --- a/internal/testing/testProto/v1/enums.pb.go +++ b/internal/testing/testProto/v1/enums.pb.go @@ -1,24 +1,24 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.15.8 // source: v1/enums.proto package v1 import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +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 Enum1 int32 @@ -30,28 +30,49 @@ const ( Enum1_FOUR Enum1 = 4 ) -var Enum1_name = map[int32]string{ - 0: "ZERO", - 1: "ONE", - 2: "TWO", - 3: "THREE", - 4: "FOUR", -} +// Enum value maps for Enum1. +var ( + Enum1_name = map[int32]string{ + 0: "ZERO", + 1: "ONE", + 2: "TWO", + 3: "THREE", + 4: "FOUR", + } + Enum1_value = map[string]int32{ + "ZERO": 0, + "ONE": 1, + "TWO": 2, + "THREE": 3, + "FOUR": 4, + } +) -var Enum1_value = map[string]int32{ - "ZERO": 0, - "ONE": 1, - "TWO": 2, - "THREE": 3, - "FOUR": 4, +func (x Enum1) Enum() *Enum1 { + p := new(Enum1) + *p = x + return p } func (x Enum1) String() string { - return proto.EnumName(Enum1_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Enum1) Descriptor() protoreflect.EnumDescriptor { + return file_v1_enums_proto_enumTypes[0].Descriptor() +} + +func (Enum1) Type() protoreflect.EnumType { + return &file_v1_enums_proto_enumTypes[0] } +func (x Enum1) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Enum1.Descriptor instead. func (Enum1) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_80c7ec401998e878, []int{0} + return file_v1_enums_proto_rawDescGZIP(), []int{0} } type EnumMessage_Enum2 int32 @@ -61,91 +82,190 @@ const ( EnumMessage_PIE EnumMessage_Enum2 = 1 ) -var EnumMessage_Enum2_name = map[int32]string{ - 0: "STUFF", - 1: "PIE", -} +// Enum value maps for EnumMessage_Enum2. +var ( + EnumMessage_Enum2_name = map[int32]string{ + 0: "STUFF", + 1: "PIE", + } + EnumMessage_Enum2_value = map[string]int32{ + "STUFF": 0, + "PIE": 1, + } +) -var EnumMessage_Enum2_value = map[string]int32{ - "STUFF": 0, - "PIE": 1, +func (x EnumMessage_Enum2) Enum() *EnumMessage_Enum2 { + p := new(EnumMessage_Enum2) + *p = x + return p } func (x EnumMessage_Enum2) String() string { - return proto.EnumName(EnumMessage_Enum2_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (EnumMessage_Enum2) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_80c7ec401998e878, []int{0, 0} +func (EnumMessage_Enum2) Descriptor() protoreflect.EnumDescriptor { + return file_v1_enums_proto_enumTypes[1].Descriptor() } -type EnumMessage struct { - Enum1Message Enum1 `protobuf:"varint,1,opt,name=enum1_message,json=enum1Message,proto3,enum=v1.Enum1" json:"enum1_message,omitempty"` - Enum2Message EnumMessage_Enum2 `protobuf:"varint,2,opt,name=enum2_message,json=enum2Message,proto3,enum=v1.EnumMessage_Enum2" json:"enum2_message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (EnumMessage_Enum2) Type() protoreflect.EnumType { + return &file_v1_enums_proto_enumTypes[1] } -func (m *EnumMessage) Reset() { *m = EnumMessage{} } -func (m *EnumMessage) String() string { return proto.CompactTextString(m) } -func (*EnumMessage) ProtoMessage() {} -func (*EnumMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_80c7ec401998e878, []int{0} +func (x EnumMessage_Enum2) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *EnumMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EnumMessage.Unmarshal(m, b) +// Deprecated: Use EnumMessage_Enum2.Descriptor instead. +func (EnumMessage_Enum2) EnumDescriptor() ([]byte, []int) { + return file_v1_enums_proto_rawDescGZIP(), []int{0, 0} } -func (m *EnumMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EnumMessage.Marshal(b, m, deterministic) + +type EnumMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Enum1Message Enum1 `protobuf:"varint,1,opt,name=enum1_message,json=enum1Message,proto3,enum=v1.Enum1" json:"enum1_message,omitempty"` + Enum2Message EnumMessage_Enum2 `protobuf:"varint,2,opt,name=enum2_message,json=enum2Message,proto3,enum=v1.EnumMessage_Enum2" json:"enum2_message,omitempty"` } -func (m *EnumMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnumMessage.Merge(m, src) + +func (x *EnumMessage) Reset() { + *x = EnumMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_enums_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *EnumMessage) XXX_Size() int { - return xxx_messageInfo_EnumMessage.Size(m) + +func (x *EnumMessage) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EnumMessage) XXX_DiscardUnknown() { - xxx_messageInfo_EnumMessage.DiscardUnknown(m) + +func (*EnumMessage) ProtoMessage() {} + +func (x *EnumMessage) ProtoReflect() protoreflect.Message { + mi := &file_v1_enums_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) } -var xxx_messageInfo_EnumMessage proto.InternalMessageInfo +// Deprecated: Use EnumMessage.ProtoReflect.Descriptor instead. +func (*EnumMessage) Descriptor() ([]byte, []int) { + return file_v1_enums_proto_rawDescGZIP(), []int{0} +} -func (m *EnumMessage) GetEnum1Message() Enum1 { - if m != nil { - return m.Enum1Message +func (x *EnumMessage) GetEnum1Message() Enum1 { + if x != nil { + return x.Enum1Message } return Enum1_ZERO } -func (m *EnumMessage) GetEnum2Message() EnumMessage_Enum2 { - if m != nil { - return m.Enum2Message +func (x *EnumMessage) GetEnum2Message() EnumMessage_Enum2 { + if x != nil { + return x.Enum2Message } return EnumMessage_STUFF } -func init() { - proto.RegisterEnum("v1.Enum1", Enum1_name, Enum1_value) - proto.RegisterEnum("v1.EnumMessage_Enum2", EnumMessage_Enum2_name, EnumMessage_Enum2_value) - proto.RegisterType((*EnumMessage)(nil), "v1.EnumMessage") -} - -func init() { proto.RegisterFile("v1/enums.proto", fileDescriptor_80c7ec401998e878) } - -var fileDescriptor_80c7ec401998e878 = []byte{ - // 188 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0x33, 0xd4, 0x4f, - 0xcd, 0x2b, 0xcd, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x33, 0x54, 0x9a, - 0xc6, 0xc8, 0xc5, 0xed, 0x9a, 0x57, 0x9a, 0xeb, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0x2a, 0xa4, - 0xc7, 0xc5, 0x0b, 0x52, 0x62, 0x18, 0x9f, 0x0b, 0x11, 0x90, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x33, - 0xe2, 0xd4, 0x2b, 0x33, 0xd4, 0x03, 0xa9, 0x33, 0x0c, 0xe2, 0x01, 0xcb, 0xc3, 0xd4, 0x5b, 0x41, - 0xd4, 0x1b, 0xc1, 0xd5, 0x33, 0x81, 0xd5, 0x8b, 0xc2, 0xd4, 0x43, 0xd5, 0x81, 0xd9, 0x46, 0x10, - 0xbd, 0x46, 0x50, 0x31, 0x25, 0x69, 0x2e, 0x56, 0xb0, 0xb0, 0x10, 0x27, 0x17, 0x6b, 0x70, 0x48, - 0xa8, 0x9b, 0x9b, 0x00, 0x83, 0x10, 0x3b, 0x17, 0x73, 0x80, 0xa7, 0xab, 0x00, 0xa3, 0x96, 0x05, - 0x44, 0xd2, 0x50, 0x88, 0x83, 0x8b, 0x25, 0xca, 0x35, 0xc8, 0x1f, 0x22, 0xe7, 0xef, 0xe7, 0x2a, - 0xc0, 0x08, 0x62, 0x84, 0x84, 0xfb, 0x0b, 0x30, 0x81, 0x34, 0x86, 0x78, 0x04, 0xb9, 0xba, 0x0a, - 0x30, 0x83, 0x94, 0xb9, 0xf9, 0x87, 0x06, 0x09, 0xb0, 0x24, 0xb1, 0x81, 0x7d, 0x67, 0x0c, 0x08, - 0x00, 0x00, 0xff, 0xff, 0x78, 0x41, 0x3a, 0x3f, 0xef, 0x00, 0x00, 0x00, +var File_v1_enums_proto protoreflect.FileDescriptor + +var file_v1_enums_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x02, 0x76, 0x31, 0x22, 0x96, 0x01, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x31, 0x5f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x31, 0x52, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x31, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x32, 0x5f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x32, 0x52, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x1b, 0x0a, 0x05, 0x45, 0x6e, 0x75, 0x6d, 0x32, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x55, + 0x46, 0x46, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x49, 0x45, 0x10, 0x01, 0x2a, 0x38, 0x0a, + 0x05, 0x45, 0x6e, 0x75, 0x6d, 0x31, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x57, 0x4f, + 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0x03, 0x12, 0x08, 0x0a, + 0x04, 0x46, 0x4f, 0x55, 0x52, 0x10, 0x04, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x72, 0x6f, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2d, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_v1_enums_proto_rawDescOnce sync.Once + file_v1_enums_proto_rawDescData = file_v1_enums_proto_rawDesc +) + +func file_v1_enums_proto_rawDescGZIP() []byte { + file_v1_enums_proto_rawDescOnce.Do(func() { + file_v1_enums_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_enums_proto_rawDescData) + }) + return file_v1_enums_proto_rawDescData +} + +var file_v1_enums_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_v1_enums_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_v1_enums_proto_goTypes = []interface{}{ + (Enum1)(0), // 0: v1.Enum1 + (EnumMessage_Enum2)(0), // 1: v1.EnumMessage.Enum2 + (*EnumMessage)(nil), // 2: v1.EnumMessage +} +var file_v1_enums_proto_depIdxs = []int32{ + 0, // 0: v1.EnumMessage.enum1_message:type_name -> v1.Enum1 + 1, // 1: v1.EnumMessage.enum2_message:type_name -> v1.EnumMessage.Enum2 + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_v1_enums_proto_init() } +func file_v1_enums_proto_init() { + if File_v1_enums_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_v1_enums_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnumMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_v1_enums_proto_rawDesc, + NumEnums: 2, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_v1_enums_proto_goTypes, + DependencyIndexes: file_v1_enums_proto_depIdxs, + EnumInfos: file_v1_enums_proto_enumTypes, + MessageInfos: file_v1_enums_proto_msgTypes, + }.Build() + File_v1_enums_proto = out.File + file_v1_enums_proto_rawDesc = nil + file_v1_enums_proto_goTypes = nil + file_v1_enums_proto_depIdxs = nil } diff --git a/internal/testing/testProto/v1/recursive.pb.go b/internal/testing/testProto/v1/recursive.pb.go new file mode 100644 index 0000000..e508b69 --- /dev/null +++ b/internal/testing/testProto/v1/recursive.pb.go @@ -0,0 +1,252 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.15.8 +// source: v1/recursive.proto + +package v1 + +import ( + 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 AnyValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Value: + // *AnyValue_ArrayValue + // *AnyValue_StringValue + Value isAnyValue_Value `protobuf_oneof:"value"` +} + +func (x *AnyValue) Reset() { + *x = AnyValue{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_recursive_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnyValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnyValue) ProtoMessage() {} + +func (x *AnyValue) ProtoReflect() protoreflect.Message { + mi := &file_v1_recursive_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 AnyValue.ProtoReflect.Descriptor instead. +func (*AnyValue) Descriptor() ([]byte, []int) { + return file_v1_recursive_proto_rawDescGZIP(), []int{0} +} + +func (m *AnyValue) GetValue() isAnyValue_Value { + if m != nil { + return m.Value + } + return nil +} + +func (x *AnyValue) GetArrayValue() *ArrayValue { + if x, ok := x.GetValue().(*AnyValue_ArrayValue); ok { + return x.ArrayValue + } + return nil +} + +func (x *AnyValue) GetStringValue() string { + if x, ok := x.GetValue().(*AnyValue_StringValue); ok { + return x.StringValue + } + return "" +} + +type isAnyValue_Value interface { + isAnyValue_Value() +} + +type AnyValue_ArrayValue struct { + ArrayValue *ArrayValue `protobuf:"bytes,1,opt,name=array_value,json=arrayValue,proto3,oneof"` +} + +type AnyValue_StringValue struct { + StringValue string `protobuf:"bytes,2,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +func (*AnyValue_ArrayValue) isAnyValue_Value() {} + +func (*AnyValue_StringValue) isAnyValue_Value() {} + +type ArrayValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Values []*AnyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *ArrayValue) Reset() { + *x = ArrayValue{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_recursive_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArrayValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArrayValue) ProtoMessage() {} + +func (x *ArrayValue) ProtoReflect() protoreflect.Message { + mi := &file_v1_recursive_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 ArrayValue.ProtoReflect.Descriptor instead. +func (*ArrayValue) Descriptor() ([]byte, []int) { + return file_v1_recursive_proto_rawDescGZIP(), []int{1} +} + +func (x *ArrayValue) GetValues() []*AnyValue { + if x != nil { + return x.Values + } + return nil +} + +var File_v1_recursive_proto protoreflect.FileDescriptor + +var file_v1_recursive_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x22, 0x6b, 0x0a, 0x08, 0x41, 0x6e, 0x79, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x72, 0x72, + 0x61, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x32, 0x0a, 0x0a, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x72, 0x6f, 0x6d, 0x61, + 0x74, 0x69, 0x63, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_v1_recursive_proto_rawDescOnce sync.Once + file_v1_recursive_proto_rawDescData = file_v1_recursive_proto_rawDesc +) + +func file_v1_recursive_proto_rawDescGZIP() []byte { + file_v1_recursive_proto_rawDescOnce.Do(func() { + file_v1_recursive_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_recursive_proto_rawDescData) + }) + return file_v1_recursive_proto_rawDescData +} + +var file_v1_recursive_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_v1_recursive_proto_goTypes = []interface{}{ + (*AnyValue)(nil), // 0: v1.AnyValue + (*ArrayValue)(nil), // 1: v1.ArrayValue +} +var file_v1_recursive_proto_depIdxs = []int32{ + 1, // 0: v1.AnyValue.array_value:type_name -> v1.ArrayValue + 0, // 1: v1.ArrayValue.values:type_name -> v1.AnyValue + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_v1_recursive_proto_init() } +func file_v1_recursive_proto_init() { + if File_v1_recursive_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_v1_recursive_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnyValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_v1_recursive_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArrayValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_v1_recursive_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*AnyValue_ArrayValue)(nil), + (*AnyValue_StringValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_v1_recursive_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_v1_recursive_proto_goTypes, + DependencyIndexes: file_v1_recursive_proto_depIdxs, + MessageInfos: file_v1_recursive_proto_msgTypes, + }.Build() + File_v1_recursive_proto = out.File + file_v1_recursive_proto_rawDesc = nil + file_v1_recursive_proto_goTypes = nil + file_v1_recursive_proto_depIdxs = nil +} diff --git a/internal/testing/testProto/v1/testObject.pb.go b/internal/testing/testProto/v1/testObject.pb.go index 544ee9f..0b898be 100644 --- a/internal/testing/testProto/v1/testObject.pb.go +++ b/internal/testing/testProto/v1/testObject.pb.go @@ -1,196 +1,287 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.15.8 // source: v1/testObject.proto package v1 import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +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 TestObject struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Stuff *wrappers.StringValue `protobuf:"bytes,2,opt,name=stuff,proto3" json:"stuff,omitempty"` - BoolMessage bool `protobuf:"varint,3,opt,name=bool_message,json=boolMessage,proto3" json:"bool_message,omitempty"` - BytesMessage []byte `protobuf:"bytes,4,opt,name=bytes_message,json=bytesMessage,proto3" json:"bytes_message,omitempty"` - DoubleMessage float64 `protobuf:"fixed64,5,opt,name=double_message,json=doubleMessage,proto3" json:"double_message,omitempty"` - Fixed32Message uint32 `protobuf:"fixed32,6,opt,name=fixed32_message,json=fixed32Message,proto3" json:"fixed32_message,omitempty"` - Fixed64Message uint64 `protobuf:"fixed64,7,opt,name=fixed64_message,json=fixed64Message,proto3" json:"fixed64_message,omitempty"` - FloatMessage float32 `protobuf:"fixed32,8,opt,name=float_message,json=floatMessage,proto3" json:"float_message,omitempty"` - Sfixed32Message int32 `protobuf:"fixed32,9,opt,name=sfixed32_message,json=sfixed32Message,proto3" json:"sfixed32_message,omitempty"` - Sfixed64Message int64 `protobuf:"fixed64,10,opt,name=sfixed64_message,json=sfixed64Message,proto3" json:"sfixed64_message,omitempty"` - Sint32Message int32 `protobuf:"zigzag32,11,opt,name=sint32_message,json=sint32Message,proto3" json:"sint32_message,omitempty"` - Sint64Message int64 `protobuf:"zigzag64,12,opt,name=sint64_message,json=sint64Message,proto3" json:"sint64_message,omitempty"` - Uint32Message uint32 `protobuf:"varint,13,opt,name=uint32_message,json=uint32Message,proto3" json:"uint32_message,omitempty"` - Uint64Message uint64 `protobuf:"varint,14,opt,name=uint64_message,json=uint64Message,proto3" json:"uint64_message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TestObject) Reset() { *m = TestObject{} } -func (m *TestObject) String() string { return proto.CompactTextString(m) } -func (*TestObject) ProtoMessage() {} -func (*TestObject) Descriptor() ([]byte, []int) { - return fileDescriptor_f9d293925e30013b, []int{0} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TestObject) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TestObject.Unmarshal(m, b) + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Stuff *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=stuff,proto3" json:"stuff,omitempty"` + BoolMessage bool `protobuf:"varint,3,opt,name=bool_message,json=boolMessage,proto3" json:"bool_message,omitempty"` + BytesMessage []byte `protobuf:"bytes,4,opt,name=bytes_message,json=bytesMessage,proto3" json:"bytes_message,omitempty"` + DoubleMessage float64 `protobuf:"fixed64,5,opt,name=double_message,json=doubleMessage,proto3" json:"double_message,omitempty"` + Fixed32Message uint32 `protobuf:"fixed32,6,opt,name=fixed32_message,json=fixed32Message,proto3" json:"fixed32_message,omitempty"` + Fixed64Message uint64 `protobuf:"fixed64,7,opt,name=fixed64_message,json=fixed64Message,proto3" json:"fixed64_message,omitempty"` + FloatMessage float32 `protobuf:"fixed32,8,opt,name=float_message,json=floatMessage,proto3" json:"float_message,omitempty"` + Sfixed32Message int32 `protobuf:"fixed32,9,opt,name=sfixed32_message,json=sfixed32Message,proto3" json:"sfixed32_message,omitempty"` + Sfixed64Message int64 `protobuf:"fixed64,10,opt,name=sfixed64_message,json=sfixed64Message,proto3" json:"sfixed64_message,omitempty"` + Sint32Message int32 `protobuf:"zigzag32,11,opt,name=sint32_message,json=sint32Message,proto3" json:"sint32_message,omitempty"` + Sint64Message int64 `protobuf:"zigzag64,12,opt,name=sint64_message,json=sint64Message,proto3" json:"sint64_message,omitempty"` + Uint32Message uint32 `protobuf:"varint,13,opt,name=uint32_message,json=uint32Message,proto3" json:"uint32_message,omitempty"` + Uint64Message uint64 `protobuf:"varint,14,opt,name=uint64_message,json=uint64Message,proto3" json:"uint64_message,omitempty"` } -func (m *TestObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TestObject.Marshal(b, m, deterministic) -} -func (m *TestObject) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestObject.Merge(m, src) + +func (x *TestObject) Reset() { + *x = TestObject{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_testObject_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TestObject) XXX_Size() int { - return xxx_messageInfo_TestObject.Size(m) + +func (x *TestObject) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TestObject) XXX_DiscardUnknown() { - xxx_messageInfo_TestObject.DiscardUnknown(m) + +func (*TestObject) ProtoMessage() {} + +func (x *TestObject) ProtoReflect() protoreflect.Message { + mi := &file_v1_testObject_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) } -var xxx_messageInfo_TestObject proto.InternalMessageInfo +// Deprecated: Use TestObject.ProtoReflect.Descriptor instead. +func (*TestObject) Descriptor() ([]byte, []int) { + return file_v1_testObject_proto_rawDescGZIP(), []int{0} +} -func (m *TestObject) GetId() int64 { - if m != nil { - return m.Id +func (x *TestObject) GetId() int64 { + if x != nil { + return x.Id } return 0 } -func (m *TestObject) GetStuff() *wrappers.StringValue { - if m != nil { - return m.Stuff +func (x *TestObject) GetStuff() *wrapperspb.StringValue { + if x != nil { + return x.Stuff } return nil } -func (m *TestObject) GetBoolMessage() bool { - if m != nil { - return m.BoolMessage +func (x *TestObject) GetBoolMessage() bool { + if x != nil { + return x.BoolMessage } return false } -func (m *TestObject) GetBytesMessage() []byte { - if m != nil { - return m.BytesMessage +func (x *TestObject) GetBytesMessage() []byte { + if x != nil { + return x.BytesMessage } return nil } -func (m *TestObject) GetDoubleMessage() float64 { - if m != nil { - return m.DoubleMessage +func (x *TestObject) GetDoubleMessage() float64 { + if x != nil { + return x.DoubleMessage } return 0 } -func (m *TestObject) GetFixed32Message() uint32 { - if m != nil { - return m.Fixed32Message +func (x *TestObject) GetFixed32Message() uint32 { + if x != nil { + return x.Fixed32Message } return 0 } -func (m *TestObject) GetFixed64Message() uint64 { - if m != nil { - return m.Fixed64Message +func (x *TestObject) GetFixed64Message() uint64 { + if x != nil { + return x.Fixed64Message } return 0 } -func (m *TestObject) GetFloatMessage() float32 { - if m != nil { - return m.FloatMessage +func (x *TestObject) GetFloatMessage() float32 { + if x != nil { + return x.FloatMessage } return 0 } -func (m *TestObject) GetSfixed32Message() int32 { - if m != nil { - return m.Sfixed32Message +func (x *TestObject) GetSfixed32Message() int32 { + if x != nil { + return x.Sfixed32Message } return 0 } -func (m *TestObject) GetSfixed64Message() int64 { - if m != nil { - return m.Sfixed64Message +func (x *TestObject) GetSfixed64Message() int64 { + if x != nil { + return x.Sfixed64Message } return 0 } -func (m *TestObject) GetSint32Message() int32 { - if m != nil { - return m.Sint32Message +func (x *TestObject) GetSint32Message() int32 { + if x != nil { + return x.Sint32Message } return 0 } -func (m *TestObject) GetSint64Message() int64 { - if m != nil { - return m.Sint64Message +func (x *TestObject) GetSint64Message() int64 { + if x != nil { + return x.Sint64Message } return 0 } -func (m *TestObject) GetUint32Message() uint32 { - if m != nil { - return m.Uint32Message +func (x *TestObject) GetUint32Message() uint32 { + if x != nil { + return x.Uint32Message } return 0 } -func (m *TestObject) GetUint64Message() uint64 { - if m != nil { - return m.Uint64Message +func (x *TestObject) GetUint64Message() uint64 { + if x != nil { + return x.Uint64Message } return 0 } -func init() { - proto.RegisterType((*TestObject)(nil), "v1.TestObject") -} - -func init() { proto.RegisterFile("v1/testObject.proto", fileDescriptor_f9d293925e30013b) } - -var fileDescriptor_f9d293925e30013b = []byte{ - // 326 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0xd1, 0xdf, 0x4e, 0xa3, 0x40, - 0x14, 0xc7, 0xf1, 0x1c, 0xfa, 0x77, 0xa7, 0x40, 0xbb, 0xec, 0x4d, 0xb3, 0xd9, 0x6c, 0x8e, 0x9a, - 0xc6, 0xe3, 0x0d, 0x4d, 0xff, 0xa4, 0x6f, 0x61, 0x4c, 0x46, 0xe3, 0xad, 0x01, 0x19, 0x08, 0x06, - 0x3b, 0x0d, 0x33, 0x54, 0x7d, 0x23, 0x1f, 0xd3, 0xc8, 0x94, 0x91, 0x72, 0xfb, 0xcb, 0x87, 0xef, - 0x21, 0x19, 0xf6, 0xe7, 0xb8, 0x5a, 0x6a, 0xa1, 0xf4, 0x5d, 0xfc, 0x22, 0x9e, 0x75, 0x78, 0x28, - 0xa5, 0x96, 0x81, 0x73, 0x5c, 0xfd, 0xfd, 0x9f, 0x49, 0x99, 0x15, 0x62, 0x59, 0x2f, 0x71, 0x95, - 0x2e, 0xdf, 0xca, 0xe8, 0x70, 0x10, 0xa5, 0x32, 0xe6, 0xf2, 0xb3, 0xcf, 0xd8, 0x83, 0xfd, 0x30, - 0xf0, 0x99, 0x93, 0x27, 0x73, 0x40, 0xa0, 0x1e, 0x77, 0xf2, 0x24, 0x58, 0xb3, 0x81, 0xd2, 0x55, - 0x9a, 0xce, 0x1d, 0x04, 0x9a, 0xac, 0xff, 0x85, 0x26, 0x17, 0x36, 0xb9, 0xf0, 0x5e, 0x97, 0xf9, - 0x3e, 0x7b, 0x8c, 0x8a, 0x4a, 0x70, 0x43, 0x83, 0x0b, 0xe6, 0xc6, 0x52, 0x16, 0x4f, 0xaf, 0x42, - 0xa9, 0x28, 0x13, 0xf3, 0x1e, 0x02, 0x8d, 0xf9, 0xe4, 0x7b, 0xbb, 0x35, 0x53, 0x70, 0xc5, 0xbc, - 0xf8, 0x43, 0x0b, 0x65, 0x4d, 0x1f, 0x81, 0x5c, 0xee, 0xd6, 0x63, 0x83, 0x16, 0xcc, 0x4f, 0x64, - 0x15, 0x17, 0xc2, 0xaa, 0x01, 0x02, 0x01, 0xf7, 0xcc, 0xda, 0xb0, 0x6b, 0x36, 0x4d, 0xf3, 0x77, - 0x91, 0x6c, 0xd6, 0xd6, 0x0d, 0x11, 0x68, 0xc4, 0xfd, 0xd3, 0xdc, 0x85, 0xbb, 0xad, 0x85, 0x23, - 0x04, 0x1a, 0x9e, 0xe0, 0x6e, 0xdb, 0xfa, 0xbb, 0xb4, 0x90, 0x91, 0xb6, 0x6c, 0x8c, 0x40, 0x0e, - 0x77, 0xeb, 0xb1, 0x41, 0x37, 0x6c, 0xa6, 0xba, 0x77, 0x7f, 0x21, 0xd0, 0x94, 0x4f, 0x55, 0xe7, - 0xb0, 0xa5, 0xad, 0xcb, 0x0c, 0x81, 0x66, 0x0d, 0xfd, 0x39, 0xbd, 0x60, 0xbe, 0xca, 0xf7, 0xba, - 0xd5, 0x9c, 0x20, 0xd0, 0x6f, 0xee, 0x99, 0xb5, 0xc3, 0x5a, 0x3d, 0x17, 0x81, 0x02, 0xc3, 0xce, - 0x6a, 0xd5, 0x79, 0xcd, 0x43, 0x20, 0x8f, 0x7b, 0x55, 0xb7, 0x56, 0x9d, 0xd7, 0x7c, 0x04, 0xea, - 0x1b, 0x66, 0x6b, 0xf1, 0xb0, 0x7e, 0xf4, 0xcd, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0xee, - 0xca, 0x2e, 0x6c, 0x02, 0x00, 0x00, +var File_v1_testObject_proto protoreflect.FileDescriptor + +var file_v1_testObject_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, + 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x04, 0x0a, 0x0a, 0x54, 0x65, + 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x05, 0x73, 0x74, 0x75, 0x66, + 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x73, 0x74, 0x75, 0x66, 0x66, 0x12, 0x21, 0x0a, 0x0c, + 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x64, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x07, 0x52, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0e, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, + 0x0d, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x0f, 0x73, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, + 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x10, 0x52, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, + 0x34, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x74, + 0x33, 0x32, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x11, + 0x52, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x25, 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, + 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, + 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x72, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2d, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, + 0x65, 0x73, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_v1_testObject_proto_rawDescOnce sync.Once + file_v1_testObject_proto_rawDescData = file_v1_testObject_proto_rawDesc +) + +func file_v1_testObject_proto_rawDescGZIP() []byte { + file_v1_testObject_proto_rawDescOnce.Do(func() { + file_v1_testObject_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_testObject_proto_rawDescData) + }) + return file_v1_testObject_proto_rawDescData +} + +var file_v1_testObject_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_v1_testObject_proto_goTypes = []interface{}{ + (*TestObject)(nil), // 0: v1.TestObject + (*wrapperspb.StringValue)(nil), // 1: google.protobuf.StringValue +} +var file_v1_testObject_proto_depIdxs = []int32{ + 1, // 0: v1.TestObject.stuff:type_name -> google.protobuf.StringValue + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_v1_testObject_proto_init() } +func file_v1_testObject_proto_init() { + if File_v1_testObject_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_v1_testObject_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestObject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_v1_testObject_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_v1_testObject_proto_goTypes, + DependencyIndexes: file_v1_testObject_proto_depIdxs, + MessageInfos: file_v1_testObject_proto_msgTypes, + }.Build() + File_v1_testObject_proto = out.File + file_v1_testObject_proto_rawDesc = nil + file_v1_testObject_proto_goTypes = nil + file_v1_testObject_proto_depIdxs = nil } diff --git a/internal/testing/testProto/v1/testObject2.pb.go b/internal/testing/testProto/v1/testObject2.pb.go index 12663e9..a7eeff3 100644 --- a/internal/testing/testProto/v1/testObject2.pb.go +++ b/internal/testing/testProto/v1/testObject2.pb.go @@ -1,106 +1,194 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.15.8 // source: v1/testObject2.proto package v1 import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +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 TestObject2 struct { - Strings []*wrappers.StringValue `protobuf:"bytes,1,rep,name=strings,proto3" json:"strings,omitempty"` - MapObjects map[string]*TestObject `protobuf:"bytes,2,rep,name=map_objects,json=mapObjects,proto3" json:"map_objects,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StringMaps map[int32]string `protobuf:"bytes,3,rep,name=string_maps,json=stringMaps,proto3" json:"string_maps,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TestObject2) Reset() { *m = TestObject2{} } -func (m *TestObject2) String() string { return proto.CompactTextString(m) } -func (*TestObject2) ProtoMessage() {} -func (*TestObject2) Descriptor() ([]byte, []int) { - return fileDescriptor_7fc4307b3585cf93, []int{0} + Strings []*wrapperspb.StringValue `protobuf:"bytes,1,rep,name=strings,proto3" json:"strings,omitempty"` + MapObjects map[string]*TestObject `protobuf:"bytes,2,rep,name=map_objects,json=mapObjects,proto3" json:"map_objects,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringMaps map[int32]string `protobuf:"bytes,3,rep,name=string_maps,json=stringMaps,proto3" json:"string_maps,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *TestObject2) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TestObject2.Unmarshal(m, b) -} -func (m *TestObject2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TestObject2.Marshal(b, m, deterministic) -} -func (m *TestObject2) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestObject2.Merge(m, src) +func (x *TestObject2) Reset() { + *x = TestObject2{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_testObject2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TestObject2) XXX_Size() int { - return xxx_messageInfo_TestObject2.Size(m) + +func (x *TestObject2) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TestObject2) XXX_DiscardUnknown() { - xxx_messageInfo_TestObject2.DiscardUnknown(m) + +func (*TestObject2) ProtoMessage() {} + +func (x *TestObject2) ProtoReflect() protoreflect.Message { + mi := &file_v1_testObject2_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) } -var xxx_messageInfo_TestObject2 proto.InternalMessageInfo +// Deprecated: Use TestObject2.ProtoReflect.Descriptor instead. +func (*TestObject2) Descriptor() ([]byte, []int) { + return file_v1_testObject2_proto_rawDescGZIP(), []int{0} +} -func (m *TestObject2) GetStrings() []*wrappers.StringValue { - if m != nil { - return m.Strings +func (x *TestObject2) GetStrings() []*wrapperspb.StringValue { + if x != nil { + return x.Strings } return nil } -func (m *TestObject2) GetMapObjects() map[string]*TestObject { - if m != nil { - return m.MapObjects +func (x *TestObject2) GetMapObjects() map[string]*TestObject { + if x != nil { + return x.MapObjects } return nil } -func (m *TestObject2) GetStringMaps() map[int32]string { - if m != nil { - return m.StringMaps +func (x *TestObject2) GetStringMaps() map[int32]string { + if x != nil { + return x.StringMaps } return nil } -func init() { - proto.RegisterType((*TestObject2)(nil), "v1.TestObject2") - proto.RegisterMapType((map[string]*TestObject)(nil), "v1.TestObject2.MapObjectsEntry") - proto.RegisterMapType((map[int32]string)(nil), "v1.TestObject2.StringMapsEntry") +var File_v1_testObject2_proto protoreflect.FileDescriptor + +var file_v1_testObject2_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, + 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x76, 0x31, 0x2f, 0x74, + 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xd7, 0x02, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x12, + 0x36, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x2e, 0x4d, 0x61, + 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6d, + 0x61, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x73, 0x1a, 0x4d, 0x0a, 0x0f, 0x4d, + 0x61, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x72, 0x6f, 0x6d, 0x61, + 0x74, 0x69, 0x63, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_v1_testObject2_proto_rawDescOnce sync.Once + file_v1_testObject2_proto_rawDescData = file_v1_testObject2_proto_rawDesc +) + +func file_v1_testObject2_proto_rawDescGZIP() []byte { + file_v1_testObject2_proto_rawDescOnce.Do(func() { + file_v1_testObject2_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_testObject2_proto_rawDescData) + }) + return file_v1_testObject2_proto_rawDescData } -func init() { proto.RegisterFile("v1/testObject2.proto", fileDescriptor_7fc4307b3585cf93) } - -var fileDescriptor_7fc4307b3585cf93 = []byte{ - // 258 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xd0, 0x41, 0x4b, 0xc3, 0x30, - 0x14, 0x07, 0x70, 0x92, 0x32, 0x65, 0xaf, 0xe0, 0x24, 0xee, 0x10, 0x8a, 0x68, 0x11, 0x0f, 0x3d, - 0xa5, 0xb4, 0x82, 0x88, 0x20, 0x78, 0xf1, 0x58, 0x84, 0x2a, 0x5e, 0x47, 0x2a, 0xb1, 0xa8, 0xeb, - 0x12, 0x92, 0xac, 0xb2, 0x4f, 0xea, 0xd7, 0x91, 0x26, 0x74, 0x66, 0x63, 0xb7, 0xf0, 0x7f, 0xef, - 0xfd, 0xfe, 0xa5, 0x30, 0xef, 0x8b, 0xdc, 0x0a, 0x63, 0x9f, 0x9b, 0x2f, 0xf1, 0x6e, 0x4b, 0xa6, - 0xb4, 0xb4, 0x92, 0xe0, 0xbe, 0x48, 0x2e, 0x5a, 0x29, 0xdb, 0xa5, 0xc8, 0x5d, 0xd2, 0xac, 0x3f, - 0xf2, 0x1f, 0xcd, 0x95, 0x12, 0xda, 0xf8, 0x9d, 0xe4, 0x6c, 0xe7, 0xd2, 0x87, 0x57, 0xbf, 0x18, - 0xe2, 0xd7, 0x7f, 0x8e, 0xdc, 0xc2, 0xb1, 0xb1, 0xfa, 0x73, 0xd5, 0x1a, 0x8a, 0xd2, 0x28, 0x8b, - 0xcb, 0x73, 0xe6, 0x59, 0x36, 0xb2, 0xec, 0xc5, 0xcd, 0xdf, 0xf8, 0x72, 0x2d, 0xea, 0x71, 0x99, - 0x3c, 0x42, 0xdc, 0x71, 0xb5, 0x90, 0x8e, 0x31, 0x14, 0xbb, 0xdb, 0x4b, 0xd6, 0x17, 0x2c, 0xd0, - 0x59, 0xc5, 0x95, 0x7f, 0x9a, 0xa7, 0x95, 0xd5, 0x9b, 0x1a, 0xba, 0x6d, 0x30, 0x08, 0x1e, 0x5b, - 0x74, 0x5c, 0x19, 0x1a, 0x1d, 0x16, 0x7c, 0x79, 0xc5, 0xd5, 0x28, 0x98, 0x6d, 0x90, 0x54, 0x30, - 0xdb, 0x2b, 0x20, 0xa7, 0x10, 0x7d, 0x8b, 0x0d, 0x45, 0x29, 0xca, 0xa6, 0xf5, 0xf0, 0x24, 0xd7, - 0x30, 0xe9, 0x87, 0x4f, 0xa7, 0x38, 0x45, 0x59, 0x5c, 0x9e, 0xec, 0x16, 0xd4, 0x7e, 0x78, 0x8f, - 0xef, 0x50, 0xf2, 0x00, 0xb3, 0xbd, 0xb6, 0x90, 0x9b, 0x78, 0x6e, 0x1e, 0x72, 0xd3, 0xe0, 0xbc, - 0x39, 0x72, 0x3f, 0xec, 0xe6, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xe5, 0xc9, 0x53, 0x3d, 0xb1, 0x01, - 0x00, 0x00, +var file_v1_testObject2_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_v1_testObject2_proto_goTypes = []interface{}{ + (*TestObject2)(nil), // 0: v1.TestObject2 + nil, // 1: v1.TestObject2.MapObjectsEntry + nil, // 2: v1.TestObject2.StringMapsEntry + (*wrapperspb.StringValue)(nil), // 3: google.protobuf.StringValue + (*TestObject)(nil), // 4: v1.TestObject +} +var file_v1_testObject2_proto_depIdxs = []int32{ + 3, // 0: v1.TestObject2.strings:type_name -> google.protobuf.StringValue + 1, // 1: v1.TestObject2.map_objects:type_name -> v1.TestObject2.MapObjectsEntry + 2, // 2: v1.TestObject2.string_maps:type_name -> v1.TestObject2.StringMapsEntry + 4, // 3: v1.TestObject2.MapObjectsEntry.value:type_name -> v1.TestObject + 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_v1_testObject2_proto_init() } +func file_v1_testObject2_proto_init() { + if File_v1_testObject2_proto != nil { + return + } + file_v1_testObject_proto_init() + if !protoimpl.UnsafeEnabled { + file_v1_testObject2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestObject2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_v1_testObject2_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_v1_testObject2_proto_goTypes, + DependencyIndexes: file_v1_testObject2_proto_depIdxs, + MessageInfos: file_v1_testObject2_proto_msgTypes, + }.Build() + File_v1_testObject2_proto = out.File + file_v1_testObject2_proto_rawDesc = nil + file_v1_testObject2_proto_goTypes = nil + file_v1_testObject2_proto_depIdxs = nil } diff --git a/internal/testing/testProto/v1/testObject3.pb.go b/internal/testing/testProto/v1/testObject3.pb.go index 32a7786..0bf6b88 100644 --- a/internal/testing/testProto/v1/testObject3.pb.go +++ b/internal/testing/testProto/v1/testObject3.pb.go @@ -1,88 +1,74 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.15.8 // source: v1/testObject3.proto package v1 import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +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 TestObject3 struct { - // Types that are valid to be assigned to Request: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Request: // *TestObject3_RequestTestObject // *TestObject3_RequestTestObject_2 // *TestObject3_RequestString Request isTestObject3_Request `protobuf_oneof:"request"` Bla string `protobuf:"bytes,3,opt,name=bla,proto3" json:"bla,omitempty"` - // Types that are valid to be assigned to Request2: + // Types that are assignable to Request2: // *TestObject3_Request2String // *TestObject3_Request2Int32 - Request2 isTestObject3_Request2 `protobuf_oneof:"request2"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TestObject3) Reset() { *m = TestObject3{} } -func (m *TestObject3) String() string { return proto.CompactTextString(m) } -func (*TestObject3) ProtoMessage() {} -func (*TestObject3) Descriptor() ([]byte, []int) { - return fileDescriptor_9b3ae9f05d77f413, []int{0} + Request2 isTestObject3_Request2 `protobuf_oneof:"request2"` } -func (m *TestObject3) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TestObject3.Unmarshal(m, b) -} -func (m *TestObject3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TestObject3.Marshal(b, m, deterministic) -} -func (m *TestObject3) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestObject3.Merge(m, src) -} -func (m *TestObject3) XXX_Size() int { - return xxx_messageInfo_TestObject3.Size(m) -} -func (m *TestObject3) XXX_DiscardUnknown() { - xxx_messageInfo_TestObject3.DiscardUnknown(m) +func (x *TestObject3) Reset() { + *x = TestObject3{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_testObject3_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -var xxx_messageInfo_TestObject3 proto.InternalMessageInfo - -type isTestObject3_Request interface { - isTestObject3_Request() +func (x *TestObject3) String() string { + return protoimpl.X.MessageStringOf(x) } -type TestObject3_RequestTestObject struct { - RequestTestObject *TestObject `protobuf:"bytes,1,opt,name=request_test_object,json=requestTestObject,proto3,oneof"` -} +func (*TestObject3) ProtoMessage() {} -type TestObject3_RequestTestObject_2 struct { - RequestTestObject_2 *TestObject2 `protobuf:"bytes,2,opt,name=request_test_object_2,json=requestTestObject2,proto3,oneof"` +func (x *TestObject3) ProtoReflect() protoreflect.Message { + mi := &file_v1_testObject3_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) } -type TestObject3_RequestString struct { - RequestString string `protobuf:"bytes,4,opt,name=request_string,json=requestString,proto3,oneof"` +// Deprecated: Use TestObject3.ProtoReflect.Descriptor instead. +func (*TestObject3) Descriptor() ([]byte, []int) { + return file_v1_testObject3_proto_rawDescGZIP(), []int{0} } -func (*TestObject3_RequestTestObject) isTestObject3_Request() {} - -func (*TestObject3_RequestTestObject_2) isTestObject3_Request() {} - -func (*TestObject3_RequestString) isTestObject3_Request() {} - func (m *TestObject3) GetRequest() isTestObject3_Request { if m != nil { return m.Request @@ -90,34 +76,77 @@ func (m *TestObject3) GetRequest() isTestObject3_Request { return nil } -func (m *TestObject3) GetRequestTestObject() *TestObject { - if x, ok := m.GetRequest().(*TestObject3_RequestTestObject); ok { +func (x *TestObject3) GetRequestTestObject() *TestObject { + if x, ok := x.GetRequest().(*TestObject3_RequestTestObject); ok { return x.RequestTestObject } return nil } -func (m *TestObject3) GetRequestTestObject_2() *TestObject2 { - if x, ok := m.GetRequest().(*TestObject3_RequestTestObject_2); ok { +func (x *TestObject3) GetRequestTestObject_2() *TestObject2 { + if x, ok := x.GetRequest().(*TestObject3_RequestTestObject_2); ok { return x.RequestTestObject_2 } return nil } -func (m *TestObject3) GetRequestString() string { - if x, ok := m.GetRequest().(*TestObject3_RequestString); ok { +func (x *TestObject3) GetRequestString() string { + if x, ok := x.GetRequest().(*TestObject3_RequestString); ok { return x.RequestString } return "" } -func (m *TestObject3) GetBla() string { +func (x *TestObject3) GetBla() string { + if x != nil { + return x.Bla + } + return "" +} + +func (m *TestObject3) GetRequest2() isTestObject3_Request2 { if m != nil { - return m.Bla + return m.Request2 + } + return nil +} + +func (x *TestObject3) GetRequest2String() string { + if x, ok := x.GetRequest2().(*TestObject3_Request2String); ok { + return x.Request2String } return "" } +func (x *TestObject3) GetRequest2Int32() int32 { + if x, ok := x.GetRequest2().(*TestObject3_Request2Int32); ok { + return x.Request2Int32 + } + return 0 +} + +type isTestObject3_Request interface { + isTestObject3_Request() +} + +type TestObject3_RequestTestObject struct { + RequestTestObject *TestObject `protobuf:"bytes,1,opt,name=request_test_object,json=requestTestObject,proto3,oneof"` +} + +type TestObject3_RequestTestObject_2 struct { + RequestTestObject_2 *TestObject2 `protobuf:"bytes,2,opt,name=request_test_object_2,json=requestTestObject2,proto3,oneof"` +} + +type TestObject3_RequestString struct { + RequestString string `protobuf:"bytes,4,opt,name=request_string,json=requestString,proto3,oneof"` +} + +func (*TestObject3_RequestTestObject) isTestObject3_Request() {} + +func (*TestObject3_RequestTestObject_2) isTestObject3_Request() {} + +func (*TestObject3_RequestString) isTestObject3_Request() {} + type isTestObject3_Request2 interface { isTestObject3_Request2() } @@ -134,59 +163,113 @@ func (*TestObject3_Request2String) isTestObject3_Request2() {} func (*TestObject3_Request2Int32) isTestObject3_Request2() {} -func (m *TestObject3) GetRequest2() isTestObject3_Request2 { - if m != nil { - return m.Request2 - } - return nil +var File_v1_testObject3_proto protoreflect.FileDescriptor + +var file_v1_testObject3_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x1a, 0x13, 0x76, 0x31, 0x2f, 0x74, + 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x14, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x02, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x33, 0x12, 0x40, 0x0a, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x65, 0x73, + 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x44, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x32, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x48, 0x00, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x12, 0x27, 0x0a, + 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x6c, 0x61, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x6c, 0x61, 0x12, 0x29, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x32, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x12, 0x27, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x5f, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0d, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x09, 0x0a, 0x07, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x32, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x72, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x73, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2d, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, + 0x73, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -func (m *TestObject3) GetRequest2String() string { - if x, ok := m.GetRequest2().(*TestObject3_Request2String); ok { - return x.Request2String - } - return "" +var ( + file_v1_testObject3_proto_rawDescOnce sync.Once + file_v1_testObject3_proto_rawDescData = file_v1_testObject3_proto_rawDesc +) + +func file_v1_testObject3_proto_rawDescGZIP() []byte { + file_v1_testObject3_proto_rawDescOnce.Do(func() { + file_v1_testObject3_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_testObject3_proto_rawDescData) + }) + return file_v1_testObject3_proto_rawDescData } -func (m *TestObject3) GetRequest2Int32() int32 { - if x, ok := m.GetRequest2().(*TestObject3_Request2Int32); ok { - return x.Request2Int32 - } - return 0 +var file_v1_testObject3_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_v1_testObject3_proto_goTypes = []interface{}{ + (*TestObject3)(nil), // 0: v1.TestObject3 + (*TestObject)(nil), // 1: v1.TestObject + (*TestObject2)(nil), // 2: v1.TestObject2 +} +var file_v1_testObject3_proto_depIdxs = []int32{ + 1, // 0: v1.TestObject3.request_test_object:type_name -> v1.TestObject + 2, // 1: v1.TestObject3.request_test_object_2:type_name -> v1.TestObject2 + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*TestObject3) XXX_OneofWrappers() []interface{} { - return []interface{}{ +func init() { file_v1_testObject3_proto_init() } +func file_v1_testObject3_proto_init() { + if File_v1_testObject3_proto != nil { + return + } + file_v1_testObject_proto_init() + file_v1_testObject2_proto_init() + if !protoimpl.UnsafeEnabled { + file_v1_testObject3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestObject3); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_v1_testObject3_proto_msgTypes[0].OneofWrappers = []interface{}{ (*TestObject3_RequestTestObject)(nil), (*TestObject3_RequestTestObject_2)(nil), (*TestObject3_RequestString)(nil), (*TestObject3_Request2String)(nil), (*TestObject3_Request2Int32)(nil), } -} - -func init() { - proto.RegisterType((*TestObject3)(nil), "v1.TestObject3") -} - -func init() { proto.RegisterFile("v1/testObject3.proto", fileDescriptor_9b3ae9f05d77f413) } - -var fileDescriptor_9b3ae9f05d77f413 = []byte{ - // 234 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0x33, 0xd4, 0x2f, - 0x49, 0x2d, 0x2e, 0xf1, 0x4f, 0xca, 0x4a, 0x4d, 0x2e, 0x31, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0x62, 0x2a, 0x33, 0x94, 0x12, 0x46, 0x91, 0x81, 0x48, 0x48, 0xa1, 0x2a, 0x37, 0x82, 0x88, - 0x2a, 0xed, 0x66, 0xe2, 0xe2, 0x0e, 0x41, 0x18, 0x22, 0xe4, 0xc0, 0x25, 0x5c, 0x94, 0x5a, 0x58, - 0x9a, 0x5a, 0x5c, 0x12, 0x0f, 0x52, 0x1c, 0x9f, 0x0f, 0x16, 0x97, 0x60, 0x54, 0x60, 0xd4, 0xe0, - 0x36, 0xe2, 0xd3, 0x2b, 0x33, 0xd4, 0x43, 0xa8, 0xf6, 0x60, 0x08, 0x12, 0x84, 0x2a, 0x46, 0x08, - 0x0a, 0xb9, 0x70, 0x89, 0x62, 0x31, 0x21, 0xde, 0x48, 0x82, 0x09, 0x6c, 0x06, 0x3f, 0xaa, 0x19, - 0x46, 0x1e, 0x0c, 0x41, 0x42, 0x18, 0x86, 0x18, 0x09, 0xa9, 0x73, 0xf1, 0xc1, 0x4c, 0x29, 0x2e, - 0x29, 0xca, 0xcc, 0x4b, 0x97, 0x60, 0x51, 0x60, 0xd4, 0xe0, 0xf4, 0x60, 0x08, 0xe2, 0x85, 0x8a, - 0x07, 0x83, 0x85, 0x85, 0x04, 0xb8, 0x98, 0x93, 0x72, 0x12, 0x25, 0x98, 0x41, 0xb2, 0x41, 0x20, - 0xa6, 0x90, 0x26, 0x17, 0x3f, 0x54, 0x89, 0x11, 0x4c, 0x2f, 0x2b, 0x58, 0x2f, 0x63, 0x10, 0xcc, - 0x4c, 0x23, 0xa8, 0x66, 0x84, 0x2d, 0x46, 0xf1, 0x99, 0x79, 0x25, 0xc6, 0x46, 0x12, 0x6c, 0x0a, - 0x8c, 0x1a, 0xac, 0x1e, 0x8c, 0x70, 0x5b, 0x8c, 0x3c, 0x41, 0xc2, 0x4e, 0x9c, 0x5c, 0xec, 0x50, - 0x01, 0x27, 0x2e, 0x2e, 0x0e, 0x98, 0x5c, 0x12, 0x1b, 0x38, 0x10, 0x8d, 0x01, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x6c, 0x02, 0xd9, 0x07, 0x8b, 0x01, 0x00, 0x00, + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_v1_testObject3_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_v1_testObject3_proto_goTypes, + DependencyIndexes: file_v1_testObject3_proto_depIdxs, + MessageInfos: file_v1_testObject3_proto_msgTypes, + }.Build() + File_v1_testObject3_proto = out.File + file_v1_testObject3_proto_rawDesc = nil + file_v1_testObject3_proto_goTypes = nil + file_v1_testObject3_proto_depIdxs = nil } diff --git a/internal/testing/testProto/v1/testObjects.pb.go b/internal/testing/testProto/v1/testObjects.pb.go index 158dead..286db71 100644 --- a/internal/testing/testProto/v1/testObjects.pb.go +++ b/internal/testing/testProto/v1/testObjects.pb.go @@ -1,116 +1,211 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.15.8 // source: v1/testObjects.proto package v1 import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +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 TestObjects struct { - Object *TestObject `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` - Object_2 *TestObject2 `protobuf:"bytes,2,opt,name=object_2,json=object2,proto3" json:"object_2,omitempty"` - Object_3 *TestObject3 `protobuf:"bytes,3,opt,name=object_3,json=object3,proto3" json:"object_3,omitempty"` - EnumMessage *EnumMessage `protobuf:"bytes,4,opt,name=enum_message,json=enumMessage,proto3" json:"enum_message,omitempty"` - EnumInsideMessage EnumMessage_Enum2 `protobuf:"varint,5,opt,name=enum_inside_message,json=enumInsideMessage,proto3,enum=v1.EnumMessage_Enum2" json:"enum_inside_message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Object *TestObject `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` + Object_2 *TestObject2 `protobuf:"bytes,2,opt,name=object_2,json=object2,proto3" json:"object_2,omitempty"` + Object_3 *TestObject3 `protobuf:"bytes,3,opt,name=object_3,json=object3,proto3" json:"object_3,omitempty"` + EnumMessage *EnumMessage `protobuf:"bytes,4,opt,name=enum_message,json=enumMessage,proto3" json:"enum_message,omitempty"` + EnumInsideMessage EnumMessage_Enum2 `protobuf:"varint,5,opt,name=enum_inside_message,json=enumInsideMessage,proto3,enum=v1.EnumMessage_Enum2" json:"enum_inside_message,omitempty"` } -func (m *TestObjects) Reset() { *m = TestObjects{} } -func (m *TestObjects) String() string { return proto.CompactTextString(m) } -func (*TestObjects) ProtoMessage() {} -func (*TestObjects) Descriptor() ([]byte, []int) { - return fileDescriptor_216169bec99a1bfa, []int{0} +func (x *TestObjects) Reset() { + *x = TestObjects{} + if protoimpl.UnsafeEnabled { + mi := &file_v1_testObjects_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TestObjects) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TestObjects.Unmarshal(m, b) -} -func (m *TestObjects) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TestObjects.Marshal(b, m, deterministic) -} -func (m *TestObjects) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestObjects.Merge(m, src) +func (x *TestObjects) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TestObjects) XXX_Size() int { - return xxx_messageInfo_TestObjects.Size(m) -} -func (m *TestObjects) XXX_DiscardUnknown() { - xxx_messageInfo_TestObjects.DiscardUnknown(m) + +func (*TestObjects) ProtoMessage() {} + +func (x *TestObjects) ProtoReflect() protoreflect.Message { + mi := &file_v1_testObjects_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) } -var xxx_messageInfo_TestObjects proto.InternalMessageInfo +// Deprecated: Use TestObjects.ProtoReflect.Descriptor instead. +func (*TestObjects) Descriptor() ([]byte, []int) { + return file_v1_testObjects_proto_rawDescGZIP(), []int{0} +} -func (m *TestObjects) GetObject() *TestObject { - if m != nil { - return m.Object +func (x *TestObjects) GetObject() *TestObject { + if x != nil { + return x.Object } return nil } -func (m *TestObjects) GetObject_2() *TestObject2 { - if m != nil { - return m.Object_2 +func (x *TestObjects) GetObject_2() *TestObject2 { + if x != nil { + return x.Object_2 } return nil } -func (m *TestObjects) GetObject_3() *TestObject3 { - if m != nil { - return m.Object_3 +func (x *TestObjects) GetObject_3() *TestObject3 { + if x != nil { + return x.Object_3 } return nil } -func (m *TestObjects) GetEnumMessage() *EnumMessage { - if m != nil { - return m.EnumMessage +func (x *TestObjects) GetEnumMessage() *EnumMessage { + if x != nil { + return x.EnumMessage } return nil } -func (m *TestObjects) GetEnumInsideMessage() EnumMessage_Enum2 { - if m != nil { - return m.EnumInsideMessage +func (x *TestObjects) GetEnumInsideMessage() EnumMessage_Enum2 { + if x != nil { + return x.EnumInsideMessage } return EnumMessage_STUFF } -func init() { - proto.RegisterType((*TestObjects)(nil), "v1.TestObjects") +var File_v1_testObjects_proto protoreflect.FileDescriptor + +var file_v1_testObjects_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x1a, 0x13, 0x76, 0x31, 0x2f, 0x74, + 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x14, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x76, 0x31, 0x2f, + 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x02, 0x0a, 0x0b, + 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x2a, 0x0a, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x32, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x12, + 0x2a, 0x0a, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x33, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x33, 0x12, 0x32, 0x0a, 0x0c, 0x65, + 0x6e, 0x75, 0x6d, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x45, 0x0a, 0x13, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x32, 0x52, 0x11, 0x65, 0x6e, 0x75, 0x6d, 0x49, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x72, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, + 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2d, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_v1_testObjects_proto_rawDescOnce sync.Once + file_v1_testObjects_proto_rawDescData = file_v1_testObjects_proto_rawDesc +) + +func file_v1_testObjects_proto_rawDescGZIP() []byte { + file_v1_testObjects_proto_rawDescOnce.Do(func() { + file_v1_testObjects_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_testObjects_proto_rawDescData) + }) + return file_v1_testObjects_proto_rawDescData +} + +var file_v1_testObjects_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_v1_testObjects_proto_goTypes = []interface{}{ + (*TestObjects)(nil), // 0: v1.TestObjects + (*TestObject)(nil), // 1: v1.TestObject + (*TestObject2)(nil), // 2: v1.TestObject2 + (*TestObject3)(nil), // 3: v1.TestObject3 + (*EnumMessage)(nil), // 4: v1.EnumMessage + (EnumMessage_Enum2)(0), // 5: v1.EnumMessage.Enum2 +} +var file_v1_testObjects_proto_depIdxs = []int32{ + 1, // 0: v1.TestObjects.object:type_name -> v1.TestObject + 2, // 1: v1.TestObjects.object_2:type_name -> v1.TestObject2 + 3, // 2: v1.TestObjects.object_3:type_name -> v1.TestObject3 + 4, // 3: v1.TestObjects.enum_message:type_name -> v1.EnumMessage + 5, // 4: v1.TestObjects.enum_inside_message:type_name -> v1.EnumMessage.Enum2 + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } -func init() { proto.RegisterFile("v1/testObjects.proto", fileDescriptor_216169bec99a1bfa) } - -var fileDescriptor_216169bec99a1bfa = []byte{ - // 215 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0x33, 0xd4, 0x2f, - 0x49, 0x2d, 0x2e, 0xf1, 0x4f, 0xca, 0x4a, 0x4d, 0x2e, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0x62, 0x2a, 0x33, 0x94, 0x12, 0x46, 0x91, 0x81, 0x48, 0x48, 0xa1, 0x2a, 0x37, 0xc2, 0x2a, - 0x6a, 0x0c, 0x15, 0xe5, 0x2b, 0x33, 0xd4, 0x4f, 0xcd, 0x2b, 0xcd, 0x85, 0x1a, 0xaa, 0xd4, 0xc1, - 0xc4, 0xc5, 0x1d, 0x82, 0xb0, 0x4a, 0x48, 0x8d, 0x8b, 0x2d, 0x1f, 0xcc, 0x94, 0x60, 0x54, 0x60, - 0xd4, 0xe0, 0x36, 0xe2, 0xd3, 0x2b, 0x33, 0xd4, 0x43, 0x28, 0x08, 0x82, 0xca, 0x0a, 0x69, 0x71, - 0x71, 0x40, 0x58, 0xf1, 0x46, 0x12, 0x4c, 0x60, 0x95, 0xfc, 0xa8, 0x2a, 0x8d, 0x82, 0xd8, 0x21, - 0x0a, 0x8c, 0x90, 0xd4, 0x1a, 0x4b, 0x30, 0x63, 0x53, 0x6b, 0x0c, 0x53, 0x6b, 0x2c, 0x64, 0xc4, - 0xc5, 0x03, 0x72, 0x5e, 0x7c, 0x6e, 0x6a, 0x71, 0x71, 0x62, 0x7a, 0xaa, 0x04, 0x0b, 0x42, 0xbd, - 0x6b, 0x5e, 0x69, 0xae, 0x2f, 0x44, 0x38, 0x88, 0x3b, 0x15, 0xc1, 0x11, 0x72, 0xe5, 0x12, 0x06, - 0xeb, 0xc9, 0xcc, 0x2b, 0xce, 0x4c, 0x49, 0x85, 0x6b, 0x65, 0x55, 0x60, 0xd4, 0xe0, 0x33, 0x12, - 0x45, 0xd3, 0x0a, 0x66, 0x1b, 0x05, 0x09, 0x82, 0x74, 0x78, 0x82, 0x35, 0x40, 0x25, 0x9c, 0x58, - 0xa2, 0x98, 0xca, 0x0c, 0x93, 0xd8, 0xc0, 0xe1, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x01, - 0xd9, 0x82, 0x26, 0x84, 0x01, 0x00, 0x00, +func init() { file_v1_testObjects_proto_init() } +func file_v1_testObjects_proto_init() { + if File_v1_testObjects_proto != nil { + return + } + file_v1_testObject_proto_init() + file_v1_testObject2_proto_init() + file_v1_testObject3_proto_init() + file_v1_enums_proto_init() + if !protoimpl.UnsafeEnabled { + file_v1_testObjects_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestObjects); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_v1_testObjects_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_v1_testObjects_proto_goTypes, + DependencyIndexes: file_v1_testObjects_proto_depIdxs, + MessageInfos: file_v1_testObjects_proto_msgTypes, + }.Build() + File_v1_testObjects_proto = out.File + file_v1_testObjects_proto_rawDesc = nil + file_v1_testObjects_proto_goTypes = nil + file_v1_testObjects_proto_depIdxs = nil } diff --git a/makefile b/makefile index d19b8a5..d003ea2 100644 --- a/makefile +++ b/makefile @@ -15,8 +15,8 @@ proto-generate: proto-lint test-proto-generate: mkdir -p internal/testing/testProto/v1 - protoc -I docs/testing/proto/ --go_out=.:internal/testing/testProto/ docs/testing/proto/v1/*.proto - protoc -I docs/testing/proto/ --go_out=.:internal/testing/testProto/ docs/testing/proto/gen/*.proto + protoc --proto_path=docs/testing/proto/ --go_out=paths=source_relative:internal/testing/testProto/ docs/testing/proto/v1/*.proto + protoc --proto_path=docs/testing/proto/ --go_out=paths=source_relative:internal/testing/testProto/ docs/testing/proto/gen/*.proto ship: docker login --username ${DOCKER_USERNAME} --password ${DOCKER_PASSWORD} diff --git a/pkg/protobuf/extractor.go b/pkg/protobuf/extractor.go index 351615e..f68f8b1 100644 --- a/pkg/protobuf/extractor.go +++ b/pkg/protobuf/extractor.go @@ -25,7 +25,7 @@ func ExtractSchema(message descriptor.Message) (string, error) { } types := &typesGroup{ - messageTypes: map[string]*protobuf.DescriptorProto{}, + messageTypes: map[string]*typeHolder{}, enumTypes: map[string]enumType{}, seenPackages: map[string]struct{}{}, } @@ -82,8 +82,13 @@ type enumType struct { pkg string } +type typeHolder struct { + messageType *protobuf.DescriptorProto + visited bool +} + type typesGroup struct { - messageTypes map[string]*protobuf.DescriptorProto + messageTypes map[string]*typeHolder enumTypes map[string]enumType seenPackages map[string]struct{} } @@ -109,11 +114,11 @@ func getTypes(pkg *protobuf.FileDescriptorProto, types *typesGroup) error { name := fmt.Sprintf(".%s.%s", *pkg.Package, *m.Name) - types.messageTypes[name] = m + types.messageTypes[name] = &typeHolder{messageType: m} for _, nt := range m.NestedType { name := fmt.Sprintf(".%s.%s.%s", *pkg.Package, *m.Name, *nt.Name) - types.messageTypes[name] = nt + types.messageTypes[name] = &typeHolder{messageType: nt} } for _, enum := range m.EnumType { @@ -201,7 +206,7 @@ func buildTree(tree *node, d *protobuf.DescriptorProto, types *typesGroup) error } leaf.Value = et.parentName - err := buildTree(leaf, parent, types) + err := buildTree(leaf, parent.messageType, types) if err != nil { return err } @@ -212,9 +217,14 @@ func buildTree(tree *node, d *protobuf.DescriptorProto, types *typesGroup) error } } + if ty.visited { + continue + } + ty.visited = true + tree.Leaves = append(tree.Leaves, leaf) - err := buildTree(leaf, ty, types) + err := buildTree(leaf, ty.messageType, types) if err != nil { return err } @@ -264,7 +274,7 @@ func writeTree(tree *node, job *writeTreeJob) error { job.builder.WriteString(fmt.Sprintf("message %s {\n", name)) inOnOf := false - for _, v := range t.Field { + for _, v := range t.messageType.Field { if v.OneofIndex != nil && !inOnOf { job.builder.WriteString(fmt.Sprintf(" oneof oneof_%d {\n", *v.OneofIndex)) @@ -371,7 +381,7 @@ func writeTree(tree *node, job *writeTreeJob) error { job.builder.WriteString(" }\n") } - for _, e := range t.EnumType { + for _, e := range t.messageType.EnumType { job.builder.WriteString(fmt.Sprintf(" enum %s {\n", *e.Name)) for _, o := range e.Value { job.builder.WriteString(fmt.Sprintf(" %s = %d;\n", *o.Name, *o.Number)) diff --git a/pkg/protobuf/extractor_test.go b/pkg/protobuf/extractor_test.go index b3ea88f..b3f18d5 100644 --- a/pkg/protobuf/extractor_test.go +++ b/pkg/protobuf/extractor_test.go @@ -155,3 +155,26 @@ func Test_UnmarshalWithGen(t *testing.T) { assert.Equal(t, new.String(), message.String()) } + +func Test_SchemaExtractor_ShouldHandleRecursiveMessage(t *testing.T) { + o := &v1.AnyValue{} + s, err := protobuf.ExtractSchema(o) + if err != nil { + t.Fatal(err) + } + + expected := `syntax = "proto3"; +package gen; +message record { + oneof oneof_0 { + v1_ArrayValue array_value = 1; + string string_value = 2; + } +} +message v1_ArrayValue { + repeated v1_AnyValue values = 1; +} +` + + assert.Equal(t, expected, s) +}