Debian Codegraph @

encoders/protobuf/testdata/pbtest.pb.go

raw
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // versions:
3 // protoc-gen-go v1.21.0
4 // protoc v3.11.4
5 // source: pbtest.proto
6
7 package testdata
8
9 import (
10 proto "github.com/golang/protobuf/proto"
11 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
12 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
13 reflect "reflect"
14 sync "sync"
15 )
16
17 const (
18 // Verify that this generated code is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
20 // Verify that runtime/protoimpl is sufficiently up-to-date.
21 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
22 )
23
24 // This is a compile-time assertion that a sufficiently up-to-date version
25 // of the legacy proto package is being used.
26 const _ = proto.ProtoPackageIsVersion4
27
28 type Person struct {
29 state protoimpl.MessageState
30 sizeCache protoimpl.SizeCache
31 unknownFields protoimpl.UnknownFields
32
33 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
34 Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
35 Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
36 Children map[string]*Person `protobuf:"bytes,10,rep,name=children,proto3" json:"children,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
37 }
38
39 func (x *Person) Reset() {
40 *x = Person{}
41 if protoimpl.UnsafeEnabled {
42 mi := &file_pbtest_proto_msgTypes[0]
43 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
44 ms.StoreMessageInfo(mi)
45 }
46 }
47
48 func (x *Person) String() string {
49 return protoimpl.X.MessageStringOf(x)
50 }
51
52 func (*Person) ProtoMessage() {}
53
54 func (x *Person) ProtoReflect() protoreflect.Message {
55 mi := &file_pbtest_proto_msgTypes[0]
56 if protoimpl.UnsafeEnabled && x != nil {
57 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
58 if ms.LoadMessageInfo() == nil {
59 ms.StoreMessageInfo(mi)
60 }
61 return ms
62 }
63 return mi.MessageOf(x)
64 }
65
66 // Deprecated: Use Person.ProtoReflect.Descriptor instead.
67 func (*Person) Descriptor() ([]byte, []int) {
68 return file_pbtest_proto_rawDescGZIP(), []int{0}
69 }
70
71 func (x *Person) GetName() string {
72 if x != nil {
73 return x.Name
74 }
75 return ""
76 }
77
78 func (x *Person) GetAge() int32 {
79 if x != nil {
80 return x.Age
81 }
82 return 0
83 }
84
85 func (x *Person) GetAddress() string {
86 if x != nil {
87 return x.Address
88 }
89 return ""
90 }
91
92 func (x *Person) GetChildren() map[string]*Person {
93 if x != nil {
94 return x.Children
95 }
96 return nil
97 }
98
99 var File_pbtest_proto protoreflect.FileDescriptor
100
101 var file_pbtest_proto_rawDesc = []byte{
102 0x0a, 0x0c, 0x70, 0x62, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08,
103 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd3, 0x01, 0x0a, 0x06, 0x50, 0x65, 0x72,
104 0x73, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
105 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x02,
106 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64,
107 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72,
108 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18,
109 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61,
110 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e,
111 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x1a,
112 0x4d, 0x0a, 0x0d, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79,
113 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
114 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
115 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x72,
116 0x73, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x62, 0x06,
117 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
118 }
119
120 var (
121 file_pbtest_proto_rawDescOnce sync.Once
122 file_pbtest_proto_rawDescData = file_pbtest_proto_rawDesc
123 )
124
125 func file_pbtest_proto_rawDescGZIP() []byte {
126 file_pbtest_proto_rawDescOnce.Do(func() {
127 file_pbtest_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbtest_proto_rawDescData)
128 })
129 return file_pbtest_proto_rawDescData
130 }
131
132 var file_pbtest_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
133 var file_pbtest_proto_goTypes = []any{
134 (*Person)(nil), // 0: testdata.Person
135 nil, // 1: testdata.Person.ChildrenEntry
136 }
137 var file_pbtest_proto_depIdxs = []int32{
138 1, // 0: testdata.Person.children:type_name -> testdata.Person.ChildrenEntry
139 0, // 1: testdata.Person.ChildrenEntry.value:type_name -> testdata.Person
140 2, // [2:2] is the sub-list for method output_type
141 2, // [2:2] is the sub-list for method input_type
142 2, // [2:2] is the sub-list for extension type_name
143 2, // [2:2] is the sub-list for extension extendee
144 0, // [0:2] is the sub-list for field type_name
145 }
146
147 func init() { file_pbtest_proto_init() }
148 func file_pbtest_proto_init() {
149 if File_pbtest_proto != nil {
150 return
151 }
152 if !protoimpl.UnsafeEnabled {
153 file_pbtest_proto_msgTypes[0].Exporter = func(v any, i int) any {
154 switch v := v.(*Person); i {
155 case 0:
156 return &v.state
157 case 1:
158 return &v.sizeCache
159 case 2:
160 return &v.unknownFields
161 default:
162 return nil
163 }
164 }
165 }
166 type x struct{}
167 out := protoimpl.TypeBuilder{
168 File: protoimpl.DescBuilder{
169 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
170 RawDescriptor: file_pbtest_proto_rawDesc,
171 NumEnums: 0,
172 NumMessages: 2,
173 NumExtensions: 0,
174 NumServices: 0,
175 },
176 GoTypes: file_pbtest_proto_goTypes,
177 DependencyIndexes: file_pbtest_proto_depIdxs,
178 MessageInfos: file_pbtest_proto_msgTypes,
179 }.Build()
180 File_pbtest_proto = out.File
181 file_pbtest_proto_rawDesc = nil
182 file_pbtest_proto_goTypes = nil
183 file_pbtest_proto_depIdxs = nil
184 }