Debian Codegraph @

cmd/protoc-gen-go/testdata/protoeditions/maps_and_delimited.pb.go

raw
1 // Copyright 2024 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Code generated by protoc-gen-go. DO NOT EDIT.
6 // source: cmd/protoc-gen-go/testdata/protoeditions/maps_and_delimited.proto
7
8 package protoeditions
9
10 import (
11 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
12 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
13 reflect "reflect"
14 sync "sync"
15 unsafe "unsafe"
16 )
17
18 type MessageWithMaps struct {
19 state protoimpl.MessageState `protogen:"open.v1"`
20 MapWithoutMessage map[string]string `protobuf:"bytes,1,rep,name=map_without_message,json=mapWithoutMessage" json:"map_without_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
21 MapWithoutMessageB map[uint32][]byte `protobuf:"bytes,2,rep,name=map_without_message_b,json=mapWithoutMessageB" json:"map_without_message_b,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
22 MapWithMessage map[int64]*MessageWithMaps_NestedMessage `protobuf:"bytes,3,rep,name=map_with_message,json=mapWithMessage" json:"map_with_message,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
23 NestedMessage *MessageWithMaps_NestedMessage `protobuf:"group,4,opt,name=NestedMessage,json=nestedMessage" json:"nested_message,omitempty"`
24 RepeatedMessage []*MessageWithMaps_NestedMessage `protobuf:"group,5,rep,name=NestedMessage,json=repeatedMessage" json:"repeated_message,omitempty"`
25 unknownFields protoimpl.UnknownFields
26 sizeCache protoimpl.SizeCache
27 }
28
29 func (x *MessageWithMaps) Reset() {
30 *x = MessageWithMaps{}
31 mi := &file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_msgTypes[0]
32 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
33 ms.StoreMessageInfo(mi)
34 }
35
36 func (x *MessageWithMaps) String() string {
37 return protoimpl.X.MessageStringOf(x)
38 }
39
40 func (*MessageWithMaps) ProtoMessage() {}
41
42 func (x *MessageWithMaps) ProtoReflect() protoreflect.Message {
43 mi := &file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_msgTypes[0]
44 if x != nil {
45 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
46 if ms.LoadMessageInfo() == nil {
47 ms.StoreMessageInfo(mi)
48 }
49 return ms
50 }
51 return mi.MessageOf(x)
52 }
53
54 // Deprecated: Use MessageWithMaps.ProtoReflect.Descriptor instead.
55 func (*MessageWithMaps) Descriptor() ([]byte, []int) {
56 return file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDescGZIP(), []int{0}
57 }
58
59 func (x *MessageWithMaps) GetMapWithoutMessage() map[string]string {
60 if x != nil {
61 return x.MapWithoutMessage
62 }
63 return nil
64 }
65
66 func (x *MessageWithMaps) GetMapWithoutMessageB() map[uint32][]byte {
67 if x != nil {
68 return x.MapWithoutMessageB
69 }
70 return nil
71 }
72
73 func (x *MessageWithMaps) GetMapWithMessage() map[int64]*MessageWithMaps_NestedMessage {
74 if x != nil {
75 return x.MapWithMessage
76 }
77 return nil
78 }
79
80 func (x *MessageWithMaps) GetNestedMessage() *MessageWithMaps_NestedMessage {
81 if x != nil {
82 return x.NestedMessage
83 }
84 return nil
85 }
86
87 func (x *MessageWithMaps) GetRepeatedMessage() []*MessageWithMaps_NestedMessage {
88 if x != nil {
89 return x.RepeatedMessage
90 }
91 return nil
92 }
93
94 type MessageWithMaps_NestedMessage struct {
95 state protoimpl.MessageState `protogen:"open.v1"`
96 Id *uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
97 Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
98 unknownFields protoimpl.UnknownFields
99 sizeCache protoimpl.SizeCache
100 }
101
102 func (x *MessageWithMaps_NestedMessage) Reset() {
103 *x = MessageWithMaps_NestedMessage{}
104 mi := &file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_msgTypes[4]
105 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
106 ms.StoreMessageInfo(mi)
107 }
108
109 func (x *MessageWithMaps_NestedMessage) String() string {
110 return protoimpl.X.MessageStringOf(x)
111 }
112
113 func (*MessageWithMaps_NestedMessage) ProtoMessage() {}
114
115 func (x *MessageWithMaps_NestedMessage) ProtoReflect() protoreflect.Message {
116 mi := &file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_msgTypes[4]
117 if x != nil {
118 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
119 if ms.LoadMessageInfo() == nil {
120 ms.StoreMessageInfo(mi)
121 }
122 return ms
123 }
124 return mi.MessageOf(x)
125 }
126
127 // Deprecated: Use MessageWithMaps_NestedMessage.ProtoReflect.Descriptor instead.
128 func (*MessageWithMaps_NestedMessage) Descriptor() ([]byte, []int) {
129 return file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDescGZIP(), []int{0, 3}
130 }
131
132 func (x *MessageWithMaps_NestedMessage) GetId() uint64 {
133 if x != nil && x.Id != nil {
134 return *x.Id
135 }
136 return 0
137 }
138
139 func (x *MessageWithMaps_NestedMessage) GetName() string {
140 if x != nil && x.Name != nil {
141 return *x.Name
142 }
143 return ""
144 }
145
146 var File_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto protoreflect.FileDescriptor
147
148 const file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDesc = "" +
149 "\n" +
150 "Acmd/protoc-gen-go/testdata/protoeditions/maps_and_delimited.proto\x12\x1cgoproto.protoc.protoeditions\"\xfc\x06\n" +
151 "\x0fMessageWithMaps\x12t\n" +
152 "\x13map_without_message\x18\x01 \x03(\v2D.goproto.protoc.protoeditions.MessageWithMaps.MapWithoutMessageEntryR\x11mapWithoutMessage\x12x\n" +
153 "\x15map_without_message_b\x18\x02 \x03(\v2E.goproto.protoc.protoeditions.MessageWithMaps.MapWithoutMessageBEntryR\x12mapWithoutMessageB\x12k\n" +
154 "\x10map_with_message\x18\x03 \x03(\v2A.goproto.protoc.protoeditions.MessageWithMaps.MapWithMessageEntryR\x0emapWithMessage\x12b\n" +
155 "\x0enested_message\x18\x04 \x01(\v2;.goproto.protoc.protoeditions.MessageWithMaps.NestedMessageR\rnestedMessage\x12f\n" +
156 "\x10repeated_message\x18\x05 \x03(\v2;.goproto.protoc.protoeditions.MessageWithMaps.NestedMessageR\x0frepeatedMessage\x1aD\n" +
157 "\x16MapWithoutMessageEntry\x12\x10\n" +
158 "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
159 "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aE\n" +
160 "\x17MapWithoutMessageBEntry\x12\x10\n" +
161 "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" +
162 "\x05value\x18\x02 \x01(\fR\x05value:\x028\x01\x1a~\n" +
163 "\x13MapWithMessageEntry\x12\x10\n" +
164 "\x03key\x18\x01 \x01(\x03R\x03key\x12Q\n" +
165 "\x05value\x18\x02 \x01(\v2;.goproto.protoc.protoeditions.MessageWithMaps.NestedMessageR\x05value:\x028\x01\x1a3\n" +
166 "\rNestedMessage\x12\x0e\n" +
167 "\x02id\x18\x01 \x01(\x04R\x02id\x12\x12\n" +
168 "\x04name\x18\x02 \x01(\tR\x04nameBJZCgoogle.golang.org/protobuf/cmd/protoc-gen-go/testdata/protoeditions\x92\x03\x02(\x02b\beditionsp\xe8\a"
169
170 var (
171 file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDescOnce sync.Once
172 file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDescData []byte
173 )
174
175 func file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDescGZIP() []byte {
176 file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDescOnce.Do(func() {
177 file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDesc), len(file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDesc)))
178 })
179 return file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDescData
180 }
181
182 var file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
183 var file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_goTypes = []any{
184 (*MessageWithMaps)(nil), // 0: goproto.protoc.protoeditions.MessageWithMaps
185 nil, // 1: goproto.protoc.protoeditions.MessageWithMaps.MapWithoutMessageEntry
186 nil, // 2: goproto.protoc.protoeditions.MessageWithMaps.MapWithoutMessageBEntry
187 nil, // 3: goproto.protoc.protoeditions.MessageWithMaps.MapWithMessageEntry
188 (*MessageWithMaps_NestedMessage)(nil), // 4: goproto.protoc.protoeditions.MessageWithMaps.NestedMessage
189 }
190 var file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_depIdxs = []int32{
191 1, // 0: goproto.protoc.protoeditions.MessageWithMaps.map_without_message:type_name -> goproto.protoc.protoeditions.MessageWithMaps.MapWithoutMessageEntry
192 2, // 1: goproto.protoc.protoeditions.MessageWithMaps.map_without_message_b:type_name -> goproto.protoc.protoeditions.MessageWithMaps.MapWithoutMessageBEntry
193 3, // 2: goproto.protoc.protoeditions.MessageWithMaps.map_with_message:type_name -> goproto.protoc.protoeditions.MessageWithMaps.MapWithMessageEntry
194 4, // 3: goproto.protoc.protoeditions.MessageWithMaps.nested_message:type_name -> goproto.protoc.protoeditions.MessageWithMaps.NestedMessage
195 4, // 4: goproto.protoc.protoeditions.MessageWithMaps.repeated_message:type_name -> goproto.protoc.protoeditions.MessageWithMaps.NestedMessage
196 4, // 5: goproto.protoc.protoeditions.MessageWithMaps.MapWithMessageEntry.value:type_name -> goproto.protoc.protoeditions.MessageWithMaps.NestedMessage
197 6, // [6:6] is the sub-list for method output_type
198 6, // [6:6] is the sub-list for method input_type
199 6, // [6:6] is the sub-list for extension type_name
200 6, // [6:6] is the sub-list for extension extendee
201 0, // [0:6] is the sub-list for field type_name
202 }
203
204 func init() { file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_init() }
205 func file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_init() {
206 if File_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto != nil {
207 return
208 }
209 type x struct{}
210 out := protoimpl.TypeBuilder{
211 File: protoimpl.DescBuilder{
212 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
213 RawDescriptor: unsafe.Slice(unsafe.StringData(file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDesc), len(file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_rawDesc)),
214 NumEnums: 0,
215 NumMessages: 5,
216 NumExtensions: 0,
217 NumServices: 0,
218 },
219 GoTypes: file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_goTypes,
220 DependencyIndexes: file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_depIdxs,
221 MessageInfos: file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_msgTypes,
222 }.Build()
223 File_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto = out.File
224 file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_goTypes = nil
225 file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_depIdxs = nil
226 }