1
2
3
4 package deterministic
5
6 import (
7 bytes "bytes"
8 fmt "fmt"
9 _ "github.com/gogo/protobuf/gogoproto"
10 proto "github.com/gogo/protobuf/proto"
11 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
12 math "math"
13 math_bits "math/bits"
14 )
15
16
17 var _ = proto.Marshal
18 var _ = fmt.Errorf
19 var _ = math.Inf
20
21
22
23
24
25 const _ = proto.GoGoProtoPackageIsVersion3
26
27 type OrderedMap struct {
28 StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
29 XXX_NoUnkeyedLiteral struct{} `json:"-"`
30 XXX_unrecognized []byte `json:"-"`
31 XXX_sizecache int32 `json:"-"`
32 }
33
34 func (m *OrderedMap) Reset() { *m = OrderedMap{} }
35 func (m *OrderedMap) String() string { return proto.CompactTextString(m) }
36 func (*OrderedMap) ProtoMessage() {}
37 func (*OrderedMap) Descriptor() ([]byte, []int) {
38 return fileDescriptor_c4c11acb40b6bc2e, []int{0}
39 }
40 func (m *OrderedMap) XXX_Unmarshal(b []byte) error {
41 return xxx_messageInfo_OrderedMap.Unmarshal(m, b)
42 }
43 func (m *OrderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
44 b = b[:cap(b)]
45 n, err := m.MarshalToSizedBuffer(b)
46 if err != nil {
47 return nil, err
48 }
49 return b[:n], nil
50 }
51 func (m *OrderedMap) XXX_Merge(src proto.Message) {
52 xxx_messageInfo_OrderedMap.Merge(m, src)
53 }
54 func (m *OrderedMap) XXX_Size() int {
55 return m.Size()
56 }
57 func (m *OrderedMap) XXX_DiscardUnknown() {
58 xxx_messageInfo_OrderedMap.DiscardUnknown(m)
59 }
60
61 var xxx_messageInfo_OrderedMap proto.InternalMessageInfo
62
63 func (m *OrderedMap) GetStringMap() map[string]string {
64 if m != nil {
65 return m.StringMap
66 }
67 return nil
68 }
69
70 type UnorderedMap struct {
71 StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
72 XXX_NoUnkeyedLiteral struct{} `json:"-"`
73 XXX_unrecognized []byte `json:"-"`
74 XXX_sizecache int32 `json:"-"`
75 }
76
77 func (m *UnorderedMap) Reset() { *m = UnorderedMap{} }
78 func (m *UnorderedMap) String() string { return proto.CompactTextString(m) }
79 func (*UnorderedMap) ProtoMessage() {}
80 func (*UnorderedMap) Descriptor() ([]byte, []int) {
81 return fileDescriptor_c4c11acb40b6bc2e, []int{1}
82 }
83 func (m *UnorderedMap) XXX_Unmarshal(b []byte) error {
84 return xxx_messageInfo_UnorderedMap.Unmarshal(m, b)
85 }
86 func (m *UnorderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
87 if deterministic {
88 return xxx_messageInfo_UnorderedMap.Marshal(b, m, deterministic)
89 } else {
90 b = b[:cap(b)]
91 n, err := m.MarshalToSizedBuffer(b)
92 if err != nil {
93 return nil, err
94 }
95 return b[:n], nil
96 }
97 }
98 func (m *UnorderedMap) XXX_Merge(src proto.Message) {
99 xxx_messageInfo_UnorderedMap.Merge(m, src)
100 }
101 func (m *UnorderedMap) XXX_Size() int {
102 return m.Size()
103 }
104 func (m *UnorderedMap) XXX_DiscardUnknown() {
105 xxx_messageInfo_UnorderedMap.DiscardUnknown(m)
106 }
107
108 var xxx_messageInfo_UnorderedMap proto.InternalMessageInfo
109
110 func (m *UnorderedMap) GetStringMap() map[string]string {
111 if m != nil {
112 return m.StringMap
113 }
114 return nil
115 }
116
117 type MapNoMarshaler struct {
118 StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
119 XXX_NoUnkeyedLiteral struct{} `json:"-"`
120 XXX_unrecognized []byte `json:"-"`
121 XXX_sizecache int32 `json:"-"`
122 }
123
124 func (m *MapNoMarshaler) Reset() { *m = MapNoMarshaler{} }
125 func (m *MapNoMarshaler) String() string { return proto.CompactTextString(m) }
126 func (*MapNoMarshaler) ProtoMessage() {}
127 func (*MapNoMarshaler) Descriptor() ([]byte, []int) {
128 return fileDescriptor_c4c11acb40b6bc2e, []int{2}
129 }
130 func (m *MapNoMarshaler) XXX_Unmarshal(b []byte) error {
131 return xxx_messageInfo_MapNoMarshaler.Unmarshal(m, b)
132 }
133 func (m *MapNoMarshaler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
134 return xxx_messageInfo_MapNoMarshaler.Marshal(b, m, deterministic)
135 }
136 func (m *MapNoMarshaler) XXX_Merge(src proto.Message) {
137 xxx_messageInfo_MapNoMarshaler.Merge(m, src)
138 }
139 func (m *MapNoMarshaler) XXX_Size() int {
140 return xxx_messageInfo_MapNoMarshaler.Size(m)
141 }
142 func (m *MapNoMarshaler) XXX_DiscardUnknown() {
143 xxx_messageInfo_MapNoMarshaler.DiscardUnknown(m)
144 }
145
146 var xxx_messageInfo_MapNoMarshaler proto.InternalMessageInfo
147
148 func (m *MapNoMarshaler) GetStringMap() map[string]string {
149 if m != nil {
150 return m.StringMap
151 }
152 return nil
153 }
154
155 type NestedOrderedMap struct {
156 StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
157 NestedMap *NestedMap1 `protobuf:"bytes,2,opt,name=NestedMap,proto3" json:"NestedMap,omitempty"`
158 XXX_NoUnkeyedLiteral struct{} `json:"-"`
159 XXX_unrecognized []byte `json:"-"`
160 XXX_sizecache int32 `json:"-"`
161 }
162
163 func (m *NestedOrderedMap) Reset() { *m = NestedOrderedMap{} }
164 func (m *NestedOrderedMap) String() string { return proto.CompactTextString(m) }
165 func (*NestedOrderedMap) ProtoMessage() {}
166 func (*NestedOrderedMap) Descriptor() ([]byte, []int) {
167 return fileDescriptor_c4c11acb40b6bc2e, []int{3}
168 }
169 func (m *NestedOrderedMap) XXX_Unmarshal(b []byte) error {
170 return xxx_messageInfo_NestedOrderedMap.Unmarshal(m, b)
171 }
172 func (m *NestedOrderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
173 b = b[:cap(b)]
174 n, err := m.MarshalToSizedBuffer(b)
175 if err != nil {
176 return nil, err
177 }
178 return b[:n], nil
179 }
180 func (m *NestedOrderedMap) XXX_Merge(src proto.Message) {
181 xxx_messageInfo_NestedOrderedMap.Merge(m, src)
182 }
183 func (m *NestedOrderedMap) XXX_Size() int {
184 return m.Size()
185 }
186 func (m *NestedOrderedMap) XXX_DiscardUnknown() {
187 xxx_messageInfo_NestedOrderedMap.DiscardUnknown(m)
188 }
189
190 var xxx_messageInfo_NestedOrderedMap proto.InternalMessageInfo
191
192 func (m *NestedOrderedMap) GetStringMap() map[string]string {
193 if m != nil {
194 return m.StringMap
195 }
196 return nil
197 }
198
199 func (m *NestedOrderedMap) GetNestedMap() *NestedMap1 {
200 if m != nil {
201 return m.NestedMap
202 }
203 return nil
204 }
205
206 type NestedMap1 struct {
207 NestedStringMap map[string]string `protobuf:"bytes,1,rep,name=NestedStringMap,proto3" json:"NestedStringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
208 XXX_NoUnkeyedLiteral struct{} `json:"-"`
209 XXX_unrecognized []byte `json:"-"`
210 XXX_sizecache int32 `json:"-"`
211 }
212
213 func (m *NestedMap1) Reset() { *m = NestedMap1{} }
214 func (m *NestedMap1) String() string { return proto.CompactTextString(m) }
215 func (*NestedMap1) ProtoMessage() {}
216 func (*NestedMap1) Descriptor() ([]byte, []int) {
217 return fileDescriptor_c4c11acb40b6bc2e, []int{4}
218 }
219 func (m *NestedMap1) XXX_Unmarshal(b []byte) error {
220 return xxx_messageInfo_NestedMap1.Unmarshal(m, b)
221 }
222 func (m *NestedMap1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
223 b = b[:cap(b)]
224 n, err := m.MarshalToSizedBuffer(b)
225 if err != nil {
226 return nil, err
227 }
228 return b[:n], nil
229 }
230 func (m *NestedMap1) XXX_Merge(src proto.Message) {
231 xxx_messageInfo_NestedMap1.Merge(m, src)
232 }
233 func (m *NestedMap1) XXX_Size() int {
234 return m.Size()
235 }
236 func (m *NestedMap1) XXX_DiscardUnknown() {
237 xxx_messageInfo_NestedMap1.DiscardUnknown(m)
238 }
239
240 var xxx_messageInfo_NestedMap1 proto.InternalMessageInfo
241
242 func (m *NestedMap1) GetNestedStringMap() map[string]string {
243 if m != nil {
244 return m.NestedStringMap
245 }
246 return nil
247 }
248
249 type NestedUnorderedMap struct {
250 StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
251 NestedMap *NestedMap2 `protobuf:"bytes,2,opt,name=NestedMap,proto3" json:"NestedMap,omitempty"`
252 XXX_NoUnkeyedLiteral struct{} `json:"-"`
253 XXX_unrecognized []byte `json:"-"`
254 XXX_sizecache int32 `json:"-"`
255 }
256
257 func (m *NestedUnorderedMap) Reset() { *m = NestedUnorderedMap{} }
258 func (m *NestedUnorderedMap) String() string { return proto.CompactTextString(m) }
259 func (*NestedUnorderedMap) ProtoMessage() {}
260 func (*NestedUnorderedMap) Descriptor() ([]byte, []int) {
261 return fileDescriptor_c4c11acb40b6bc2e, []int{5}
262 }
263 func (m *NestedUnorderedMap) XXX_Unmarshal(b []byte) error {
264 return xxx_messageInfo_NestedUnorderedMap.Unmarshal(m, b)
265 }
266 func (m *NestedUnorderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
267 if deterministic {
268 return xxx_messageInfo_NestedUnorderedMap.Marshal(b, m, deterministic)
269 } else {
270 b = b[:cap(b)]
271 n, err := m.MarshalToSizedBuffer(b)
272 if err != nil {
273 return nil, err
274 }
275 return b[:n], nil
276 }
277 }
278 func (m *NestedUnorderedMap) XXX_Merge(src proto.Message) {
279 xxx_messageInfo_NestedUnorderedMap.Merge(m, src)
280 }
281 func (m *NestedUnorderedMap) XXX_Size() int {
282 return m.Size()
283 }
284 func (m *NestedUnorderedMap) XXX_DiscardUnknown() {
285 xxx_messageInfo_NestedUnorderedMap.DiscardUnknown(m)
286 }
287
288 var xxx_messageInfo_NestedUnorderedMap proto.InternalMessageInfo
289
290 func (m *NestedUnorderedMap) GetStringMap() map[string]string {
291 if m != nil {
292 return m.StringMap
293 }
294 return nil
295 }
296
297 func (m *NestedUnorderedMap) GetNestedMap() *NestedMap2 {
298 if m != nil {
299 return m.NestedMap
300 }
301 return nil
302 }
303
304 type NestedMap2 struct {
305 NestedStringMap map[string]string `protobuf:"bytes,1,rep,name=NestedStringMap,proto3" json:"NestedStringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
306 XXX_NoUnkeyedLiteral struct{} `json:"-"`
307 XXX_unrecognized []byte `json:"-"`
308 XXX_sizecache int32 `json:"-"`
309 }
310
311 func (m *NestedMap2) Reset() { *m = NestedMap2{} }
312 func (m *NestedMap2) String() string { return proto.CompactTextString(m) }
313 func (*NestedMap2) ProtoMessage() {}
314 func (*NestedMap2) Descriptor() ([]byte, []int) {
315 return fileDescriptor_c4c11acb40b6bc2e, []int{6}
316 }
317 func (m *NestedMap2) XXX_Unmarshal(b []byte) error {
318 return xxx_messageInfo_NestedMap2.Unmarshal(m, b)
319 }
320 func (m *NestedMap2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
321 if deterministic {
322 return xxx_messageInfo_NestedMap2.Marshal(b, m, deterministic)
323 } else {
324 b = b[:cap(b)]
325 n, err := m.MarshalToSizedBuffer(b)
326 if err != nil {
327 return nil, err
328 }
329 return b[:n], nil
330 }
331 }
332 func (m *NestedMap2) XXX_Merge(src proto.Message) {
333 xxx_messageInfo_NestedMap2.Merge(m, src)
334 }
335 func (m *NestedMap2) XXX_Size() int {
336 return m.Size()
337 }
338 func (m *NestedMap2) XXX_DiscardUnknown() {
339 xxx_messageInfo_NestedMap2.DiscardUnknown(m)
340 }
341
342 var xxx_messageInfo_NestedMap2 proto.InternalMessageInfo
343
344 func (m *NestedMap2) GetNestedStringMap() map[string]string {
345 if m != nil {
346 return m.NestedStringMap
347 }
348 return nil
349 }
350
351 func init() {
352 proto.RegisterType((*OrderedMap)(nil), "deterministic.OrderedMap")
353 proto.RegisterMapType((map[string]string)(nil), "deterministic.OrderedMap.StringMapEntry")
354 proto.RegisterType((*UnorderedMap)(nil), "deterministic.UnorderedMap")
355 proto.RegisterMapType((map[string]string)(nil), "deterministic.UnorderedMap.StringMapEntry")
356 proto.RegisterType((*MapNoMarshaler)(nil), "deterministic.MapNoMarshaler")
357 proto.RegisterMapType((map[string]string)(nil), "deterministic.MapNoMarshaler.StringMapEntry")
358 proto.RegisterType((*NestedOrderedMap)(nil), "deterministic.NestedOrderedMap")
359 proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedOrderedMap.StringMapEntry")
360 proto.RegisterType((*NestedMap1)(nil), "deterministic.NestedMap1")
361 proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedMap1.NestedStringMapEntry")
362 proto.RegisterType((*NestedUnorderedMap)(nil), "deterministic.NestedUnorderedMap")
363 proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedUnorderedMap.StringMapEntry")
364 proto.RegisterType((*NestedMap2)(nil), "deterministic.NestedMap2")
365 proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedMap2.NestedStringMapEntry")
366 }
367
368 func init() { proto.RegisterFile("deterministic.proto", fileDescriptor_c4c11acb40b6bc2e) }
369
370 var fileDescriptor_c4c11acb40b6bc2e = []byte{
371
372 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4e, 0x49, 0x2d, 0x49,
373 0x2d, 0xca, 0xcd, 0xcc, 0xcb, 0x2c, 0x2e, 0xc9, 0x4c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17,
374 0xe2, 0x45, 0x11, 0x94, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5,
375 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x4a, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b,
376 0xa2, 0x5b, 0x69, 0x0e, 0x23, 0x17, 0x97, 0x7f, 0x51, 0x4a, 0x6a, 0x51, 0x6a, 0x8a, 0x6f, 0x62,
377 0x81, 0x90, 0x1b, 0x17, 0x67, 0x70, 0x49, 0x51, 0x66, 0x5e, 0xba, 0x6f, 0x62, 0x81, 0x04, 0xa3,
378 0x02, 0xb3, 0x06, 0xb7, 0x91, 0x86, 0x1e, 0xaa, 0xad, 0x08, 0xd5, 0x7a, 0x70, 0xa5, 0xae, 0x79,
379 0x25, 0x45, 0x95, 0x41, 0x08, 0xad, 0x52, 0x36, 0x5c, 0x7c, 0xa8, 0x92, 0x42, 0x02, 0x5c, 0xcc,
380 0xd9, 0xa9, 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x20, 0xa6, 0x90, 0x08, 0x17, 0x6b,
381 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x13, 0x58, 0x0c, 0xc2, 0xb1, 0x62, 0xb2, 0x60, 0xb4, 0xe2,
382 0xe8, 0x58, 0x28, 0xcf, 0x38, 0x63, 0xa1, 0x3c, 0xa3, 0xd2, 0x02, 0x46, 0x2e, 0x9e, 0xd0, 0xbc,
383 0x7c, 0x84, 0x03, 0x3d, 0x30, 0x1d, 0xa8, 0x85, 0xe6, 0x40, 0x64, 0xf5, 0x34, 0x77, 0x22, 0x03,
384 0xc8, 0x89, 0x7c, 0xbe, 0x89, 0x05, 0x7e, 0xf9, 0xbe, 0x89, 0x45, 0xc5, 0x19, 0x89, 0x39, 0xa9,
385 0x45, 0x42, 0x5e, 0x98, 0x8e, 0xd4, 0x41, 0x73, 0x24, 0xaa, 0x0e, 0x9a, 0x39, 0x93, 0xa5, 0x03,
386 0xe4, 0xc4, 0x87, 0x8c, 0x5c, 0x02, 0x7e, 0xa9, 0xc5, 0x25, 0xa9, 0x29, 0x48, 0x51, 0xed, 0x83,
387 0xe9, 0x48, 0x3d, 0x34, 0x47, 0xa2, 0xeb, 0xc1, 0xed, 0x4c, 0x21, 0x73, 0x2e, 0x4e, 0x88, 0x6a,
388 0x90, 0x69, 0x20, 0x67, 0x70, 0x1b, 0x49, 0x62, 0x35, 0xcd, 0x37, 0xb1, 0xc0, 0x30, 0x08, 0xa1,
389 0x96, 0x6a, 0x29, 0x65, 0x0b, 0x23, 0x17, 0x17, 0xc2, 0x06, 0xa1, 0x08, 0x2e, 0x7e, 0x08, 0x8f,
390 0x38, 0x3f, 0x82, 0xf4, 0xe8, 0xa1, 0x69, 0x80, 0xf8, 0x11, 0xdd, 0x18, 0x29, 0x27, 0x2e, 0x11,
391 0x6c, 0x0a, 0xc9, 0x74, 0xf6, 0x53, 0x46, 0x2e, 0x21, 0x88, 0x71, 0x28, 0xc9, 0xdc, 0x0f, 0x33,
392 0x72, 0x0c, 0xb0, 0x3a, 0x9c, 0xb8, 0xc4, 0x4e, 0x52, 0xf4, 0x18, 0x51, 0x3f, 0x7a, 0x18, 0x50,
393 0xa3, 0xc7, 0x88, 0x8c, 0xe8, 0x31, 0x1a, 0x80, 0xe8, 0x61, 0x70, 0x12, 0x78, 0xf0, 0x50, 0x8e,
394 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x3f, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03,
395 0x97, 0x9b, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa0, 0xcf, 0x58, 0xa8, 0x8c, 0x05, 0x00,
396 0x00,
397 }
398
399 func (this *OrderedMap) VerboseEqual(that interface{}) error {
400 if that == nil {
401 if this == nil {
402 return nil
403 }
404 return fmt.Errorf("that == nil && this != nil")
405 }
406
407 that1, ok := that.(*OrderedMap)
408 if !ok {
409 that2, ok := that.(OrderedMap)
410 if ok {
411 that1 = &that2
412 } else {
413 return fmt.Errorf("that is not of type *OrderedMap")
414 }
415 }
416 if that1 == nil {
417 if this == nil {
418 return nil
419 }
420 return fmt.Errorf("that is type *OrderedMap but is nil && this != nil")
421 } else if this == nil {
422 return fmt.Errorf("that is type *OrderedMap but is not nil && this == nil")
423 }
424 if len(this.StringMap) != len(that1.StringMap) {
425 return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap))
426 }
427 for i := range this.StringMap {
428 if this.StringMap[i] != that1.StringMap[i] {
429 return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i])
430 }
431 }
432 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
433 return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
434 }
435 return nil
436 }
437 func (this *OrderedMap) Equal(that interface{}) bool {
438 if that == nil {
439 return this == nil
440 }
441
442 that1, ok := that.(*OrderedMap)
443 if !ok {
444 that2, ok := that.(OrderedMap)
445 if ok {
446 that1 = &that2
447 } else {
448 return false
449 }
450 }
451 if that1 == nil {
452 return this == nil
453 } else if this == nil {
454 return false
455 }
456 if len(this.StringMap) != len(that1.StringMap) {
457 return false
458 }
459 for i := range this.StringMap {
460 if this.StringMap[i] != that1.StringMap[i] {
461 return false
462 }
463 }
464 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
465 return false
466 }
467 return true
468 }
469 func (this *UnorderedMap) VerboseEqual(that interface{}) error {
470 if that == nil {
471 if this == nil {
472 return nil
473 }
474 return fmt.Errorf("that == nil && this != nil")
475 }
476
477 that1, ok := that.(*UnorderedMap)
478 if !ok {
479 that2, ok := that.(UnorderedMap)
480 if ok {
481 that1 = &that2
482 } else {
483 return fmt.Errorf("that is not of type *UnorderedMap")
484 }
485 }
486 if that1 == nil {
487 if this == nil {
488 return nil
489 }
490 return fmt.Errorf("that is type *UnorderedMap but is nil && this != nil")
491 } else if this == nil {
492 return fmt.Errorf("that is type *UnorderedMap but is not nil && this == nil")
493 }
494 if len(this.StringMap) != len(that1.StringMap) {
495 return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap))
496 }
497 for i := range this.StringMap {
498 if this.StringMap[i] != that1.StringMap[i] {
499 return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i])
500 }
501 }
502 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
503 return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
504 }
505 return nil
506 }
507 func (this *UnorderedMap) Equal(that interface{}) bool {
508 if that == nil {
509 return this == nil
510 }
511
512 that1, ok := that.(*UnorderedMap)
513 if !ok {
514 that2, ok := that.(UnorderedMap)
515 if ok {
516 that1 = &that2
517 } else {
518 return false
519 }
520 }
521 if that1 == nil {
522 return this == nil
523 } else if this == nil {
524 return false
525 }
526 if len(this.StringMap) != len(that1.StringMap) {
527 return false
528 }
529 for i := range this.StringMap {
530 if this.StringMap[i] != that1.StringMap[i] {
531 return false
532 }
533 }
534 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
535 return false
536 }
537 return true
538 }
539 func (this *MapNoMarshaler) VerboseEqual(that interface{}) error {
540 if that == nil {
541 if this == nil {
542 return nil
543 }
544 return fmt.Errorf("that == nil && this != nil")
545 }
546
547 that1, ok := that.(*MapNoMarshaler)
548 if !ok {
549 that2, ok := that.(MapNoMarshaler)
550 if ok {
551 that1 = &that2
552 } else {
553 return fmt.Errorf("that is not of type *MapNoMarshaler")
554 }
555 }
556 if that1 == nil {
557 if this == nil {
558 return nil
559 }
560 return fmt.Errorf("that is type *MapNoMarshaler but is nil && this != nil")
561 } else if this == nil {
562 return fmt.Errorf("that is type *MapNoMarshaler but is not nil && this == nil")
563 }
564 if len(this.StringMap) != len(that1.StringMap) {
565 return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap))
566 }
567 for i := range this.StringMap {
568 if this.StringMap[i] != that1.StringMap[i] {
569 return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i])
570 }
571 }
572 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
573 return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
574 }
575 return nil
576 }
577 func (this *MapNoMarshaler) Equal(that interface{}) bool {
578 if that == nil {
579 return this == nil
580 }
581
582 that1, ok := that.(*MapNoMarshaler)
583 if !ok {
584 that2, ok := that.(MapNoMarshaler)
585 if ok {
586 that1 = &that2
587 } else {
588 return false
589 }
590 }
591 if that1 == nil {
592 return this == nil
593 } else if this == nil {
594 return false
595 }
596 if len(this.StringMap) != len(that1.StringMap) {
597 return false
598 }
599 for i := range this.StringMap {
600 if this.StringMap[i] != that1.StringMap[i] {
601 return false
602 }
603 }
604 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
605 return false
606 }
607 return true
608 }
609 func (this *NestedOrderedMap) VerboseEqual(that interface{}) error {
610 if that == nil {
611 if this == nil {
612 return nil
613 }
614 return fmt.Errorf("that == nil && this != nil")
615 }
616
617 that1, ok := that.(*NestedOrderedMap)
618 if !ok {
619 that2, ok := that.(NestedOrderedMap)
620 if ok {
621 that1 = &that2
622 } else {
623 return fmt.Errorf("that is not of type *NestedOrderedMap")
624 }
625 }
626 if that1 == nil {
627 if this == nil {
628 return nil
629 }
630 return fmt.Errorf("that is type *NestedOrderedMap but is nil && this != nil")
631 } else if this == nil {
632 return fmt.Errorf("that is type *NestedOrderedMap but is not nil && this == nil")
633 }
634 if len(this.StringMap) != len(that1.StringMap) {
635 return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap))
636 }
637 for i := range this.StringMap {
638 if this.StringMap[i] != that1.StringMap[i] {
639 return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i])
640 }
641 }
642 if !this.NestedMap.Equal(that1.NestedMap) {
643 return fmt.Errorf("NestedMap this(%v) Not Equal that(%v)", this.NestedMap, that1.NestedMap)
644 }
645 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
646 return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
647 }
648 return nil
649 }
650 func (this *NestedOrderedMap) Equal(that interface{}) bool {
651 if that == nil {
652 return this == nil
653 }
654
655 that1, ok := that.(*NestedOrderedMap)
656 if !ok {
657 that2, ok := that.(NestedOrderedMap)
658 if ok {
659 that1 = &that2
660 } else {
661 return false
662 }
663 }
664 if that1 == nil {
665 return this == nil
666 } else if this == nil {
667 return false
668 }
669 if len(this.StringMap) != len(that1.StringMap) {
670 return false
671 }
672 for i := range this.StringMap {
673 if this.StringMap[i] != that1.StringMap[i] {
674 return false
675 }
676 }
677 if !this.NestedMap.Equal(that1.NestedMap) {
678 return false
679 }
680 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
681 return false
682 }
683 return true
684 }
685 func (this *NestedMap1) VerboseEqual(that interface{}) error {
686 if that == nil {
687 if this == nil {
688 return nil
689 }
690 return fmt.Errorf("that == nil && this != nil")
691 }
692
693 that1, ok := that.(*NestedMap1)
694 if !ok {
695 that2, ok := that.(NestedMap1)
696 if ok {
697 that1 = &that2
698 } else {
699 return fmt.Errorf("that is not of type *NestedMap1")
700 }
701 }
702 if that1 == nil {
703 if this == nil {
704 return nil
705 }
706 return fmt.Errorf("that is type *NestedMap1 but is nil && this != nil")
707 } else if this == nil {
708 return fmt.Errorf("that is type *NestedMap1 but is not nil && this == nil")
709 }
710 if len(this.NestedStringMap) != len(that1.NestedStringMap) {
711 return fmt.Errorf("NestedStringMap this(%v) Not Equal that(%v)", len(this.NestedStringMap), len(that1.NestedStringMap))
712 }
713 for i := range this.NestedStringMap {
714 if this.NestedStringMap[i] != that1.NestedStringMap[i] {
715 return fmt.Errorf("NestedStringMap this[%v](%v) Not Equal that[%v](%v)", i, this.NestedStringMap[i], i, that1.NestedStringMap[i])
716 }
717 }
718 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
719 return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
720 }
721 return nil
722 }
723 func (this *NestedMap1) Equal(that interface{}) bool {
724 if that == nil {
725 return this == nil
726 }
727
728 that1, ok := that.(*NestedMap1)
729 if !ok {
730 that2, ok := that.(NestedMap1)
731 if ok {
732 that1 = &that2
733 } else {
734 return false
735 }
736 }
737 if that1 == nil {
738 return this == nil
739 } else if this == nil {
740 return false
741 }
742 if len(this.NestedStringMap) != len(that1.NestedStringMap) {
743 return false
744 }
745 for i := range this.NestedStringMap {
746 if this.NestedStringMap[i] != that1.NestedStringMap[i] {
747 return false
748 }
749 }
750 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
751 return false
752 }
753 return true
754 }
755 func (this *NestedUnorderedMap) VerboseEqual(that interface{}) error {
756 if that == nil {
757 if this == nil {
758 return nil
759 }
760 return fmt.Errorf("that == nil && this != nil")
761 }
762
763 that1, ok := that.(*NestedUnorderedMap)
764 if !ok {
765 that2, ok := that.(NestedUnorderedMap)
766 if ok {
767 that1 = &that2
768 } else {
769 return fmt.Errorf("that is not of type *NestedUnorderedMap")
770 }
771 }
772 if that1 == nil {
773 if this == nil {
774 return nil
775 }
776 return fmt.Errorf("that is type *NestedUnorderedMap but is nil && this != nil")
777 } else if this == nil {
778 return fmt.Errorf("that is type *NestedUnorderedMap but is not nil && this == nil")
779 }
780 if len(this.StringMap) != len(that1.StringMap) {
781 return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap))
782 }
783 for i := range this.StringMap {
784 if this.StringMap[i] != that1.StringMap[i] {
785 return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i])
786 }
787 }
788 if !this.NestedMap.Equal(that1.NestedMap) {
789 return fmt.Errorf("NestedMap this(%v) Not Equal that(%v)", this.NestedMap, that1.NestedMap)
790 }
791 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
792 return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
793 }
794 return nil
795 }
796 func (this *NestedUnorderedMap) Equal(that interface{}) bool {
797 if that == nil {
798 return this == nil
799 }
800
801 that1, ok := that.(*NestedUnorderedMap)
802 if !ok {
803 that2, ok := that.(NestedUnorderedMap)
804 if ok {
805 that1 = &that2
806 } else {
807 return false
808 }
809 }
810 if that1 == nil {
811 return this == nil
812 } else if this == nil {
813 return false
814 }
815 if len(this.StringMap) != len(that1.StringMap) {
816 return false
817 }
818 for i := range this.StringMap {
819 if this.StringMap[i] != that1.StringMap[i] {
820 return false
821 }
822 }
823 if !this.NestedMap.Equal(that1.NestedMap) {
824 return false
825 }
826 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
827 return false
828 }
829 return true
830 }
831 func (this *NestedMap2) VerboseEqual(that interface{}) error {
832 if that == nil {
833 if this == nil {
834 return nil
835 }
836 return fmt.Errorf("that == nil && this != nil")
837 }
838
839 that1, ok := that.(*NestedMap2)
840 if !ok {
841 that2, ok := that.(NestedMap2)
842 if ok {
843 that1 = &that2
844 } else {
845 return fmt.Errorf("that is not of type *NestedMap2")
846 }
847 }
848 if that1 == nil {
849 if this == nil {
850 return nil
851 }
852 return fmt.Errorf("that is type *NestedMap2 but is nil && this != nil")
853 } else if this == nil {
854 return fmt.Errorf("that is type *NestedMap2 but is not nil && this == nil")
855 }
856 if len(this.NestedStringMap) != len(that1.NestedStringMap) {
857 return fmt.Errorf("NestedStringMap this(%v) Not Equal that(%v)", len(this.NestedStringMap), len(that1.NestedStringMap))
858 }
859 for i := range this.NestedStringMap {
860 if this.NestedStringMap[i] != that1.NestedStringMap[i] {
861 return fmt.Errorf("NestedStringMap this[%v](%v) Not Equal that[%v](%v)", i, this.NestedStringMap[i], i, that1.NestedStringMap[i])
862 }
863 }
864 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
865 return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized)
866 }
867 return nil
868 }
869 func (this *NestedMap2) Equal(that interface{}) bool {
870 if that == nil {
871 return this == nil
872 }
873
874 that1, ok := that.(*NestedMap2)
875 if !ok {
876 that2, ok := that.(NestedMap2)
877 if ok {
878 that1 = &that2
879 } else {
880 return false
881 }
882 }
883 if that1 == nil {
884 return this == nil
885 } else if this == nil {
886 return false
887 }
888 if len(this.NestedStringMap) != len(that1.NestedStringMap) {
889 return false
890 }
891 for i := range this.NestedStringMap {
892 if this.NestedStringMap[i] != that1.NestedStringMap[i] {
893 return false
894 }
895 }
896 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
897 return false
898 }
899 return true
900 }
901 func (m *OrderedMap) Marshal() (dAtA []byte, err error) {
902 size := m.Size()
903 dAtA = make([]byte, size)
904 n, err := m.MarshalToSizedBuffer(dAtA[:size])
905 if err != nil {
906 return nil, err
907 }
908 return dAtA[:n], nil
909 }
910
911 func (m *OrderedMap) MarshalTo(dAtA []byte) (int, error) {
912 size := m.Size()
913 return m.MarshalToSizedBuffer(dAtA[:size])
914 }
915
916 func (m *OrderedMap) MarshalToSizedBuffer(dAtA []byte) (int, error) {
917 i := len(dAtA)
918 _ = i
919 var l int
920 _ = l
921 if m.XXX_unrecognized != nil {
922 i -= len(m.XXX_unrecognized)
923 copy(dAtA[i:], m.XXX_unrecognized)
924 }
925 if len(m.StringMap) > 0 {
926 keysForStringMap := make([]string, 0, len(m.StringMap))
927 for k := range m.StringMap {
928 keysForStringMap = append(keysForStringMap, string(k))
929 }
930 github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap)
931 for iNdEx := len(keysForStringMap) - 1; iNdEx >= 0; iNdEx-- {
932 v := m.StringMap[string(keysForStringMap[iNdEx])]
933 baseI := i
934 i -= len(v)
935 copy(dAtA[i:], v)
936 i = encodeVarintDeterministic(dAtA, i, uint64(len(v)))
937 i--
938 dAtA[i] = 0x12
939 i -= len(keysForStringMap[iNdEx])
940 copy(dAtA[i:], keysForStringMap[iNdEx])
941 i = encodeVarintDeterministic(dAtA, i, uint64(len(keysForStringMap[iNdEx])))
942 i--
943 dAtA[i] = 0xa
944 i = encodeVarintDeterministic(dAtA, i, uint64(baseI-i))
945 i--
946 dAtA[i] = 0xa
947 }
948 }
949 return len(dAtA) - i, nil
950 }
951
952 func (m *UnorderedMap) Marshal() (dAtA []byte, err error) {
953 size := m.Size()
954 dAtA = make([]byte, size)
955 n, err := m.MarshalToSizedBuffer(dAtA[:size])
956 if err != nil {
957 return nil, err
958 }
959 return dAtA[:n], nil
960 }
961
962 func (m *UnorderedMap) MarshalTo(dAtA []byte) (int, error) {
963 size := m.Size()
964 return m.MarshalToSizedBuffer(dAtA[:size])
965 }
966
967 func (m *UnorderedMap) MarshalToSizedBuffer(dAtA []byte) (int, error) {
968 i := len(dAtA)
969 _ = i
970 var l int
971 _ = l
972 if m.XXX_unrecognized != nil {
973 i -= len(m.XXX_unrecognized)
974 copy(dAtA[i:], m.XXX_unrecognized)
975 }
976 if len(m.StringMap) > 0 {
977 for k := range m.StringMap {
978 v := m.StringMap[k]
979 baseI := i
980 i -= len(v)
981 copy(dAtA[i:], v)
982 i = encodeVarintDeterministic(dAtA, i, uint64(len(v)))
983 i--
984 dAtA[i] = 0x12
985 i -= len(k)
986 copy(dAtA[i:], k)
987 i = encodeVarintDeterministic(dAtA, i, uint64(len(k)))
988 i--
989 dAtA[i] = 0xa
990 i = encodeVarintDeterministic(dAtA, i, uint64(baseI-i))
991 i--
992 dAtA[i] = 0xa
993 }
994 }
995 return len(dAtA) - i, nil
996 }
997
998 func (m *NestedOrderedMap) Marshal() (dAtA []byte, err error) {
999 size := m.Size()
1000 dAtA = make([]byte, size)
1001 n, err := m.MarshalToSizedBuffer(dAtA[:size])
1002 if err != nil {
1003 return nil, err
1004 }
1005 return dAtA[:n], nil
1006 }
1007
1008 func (m *NestedOrderedMap) MarshalTo(dAtA []byte) (int, error) {
1009 size := m.Size()
1010 return m.MarshalToSizedBuffer(dAtA[:size])
1011 }
1012
1013 func (m *NestedOrderedMap) MarshalToSizedBuffer(dAtA []byte) (int, error) {
1014 i := len(dAtA)
1015 _ = i
1016 var l int
1017 _ = l
1018 if m.XXX_unrecognized != nil {
1019 i -= len(m.XXX_unrecognized)
1020 copy(dAtA[i:], m.XXX_unrecognized)
1021 }
1022 if m.NestedMap != nil {
1023 {
1024 size, err := m.NestedMap.MarshalToSizedBuffer(dAtA[:i])
1025 if err != nil {
1026 return 0, err
1027 }
1028 i -= size
1029 i = encodeVarintDeterministic(dAtA, i, uint64(size))
1030 }
1031 i--
1032 dAtA[i] = 0x12
1033 }
1034 if len(m.StringMap) > 0 {
1035 keysForStringMap := make([]string, 0, len(m.StringMap))
1036 for k := range m.StringMap {
1037 keysForStringMap = append(keysForStringMap, string(k))
1038 }
1039 github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap)
1040 for iNdEx := len(keysForStringMap) - 1; iNdEx >= 0; iNdEx-- {
1041 v := m.StringMap[string(keysForStringMap[iNdEx])]
1042 baseI := i
1043 i -= len(v)
1044 copy(dAtA[i:], v)
1045 i = encodeVarintDeterministic(dAtA, i, uint64(len(v)))
1046 i--
1047 dAtA[i] = 0x12
1048 i -= len(keysForStringMap[iNdEx])
1049 copy(dAtA[i:], keysForStringMap[iNdEx])
1050 i = encodeVarintDeterministic(dAtA, i, uint64(len(keysForStringMap[iNdEx])))
1051 i--
1052 dAtA[i] = 0xa
1053 i = encodeVarintDeterministic(dAtA, i, uint64(baseI-i))
1054 i--
1055 dAtA[i] = 0xa
1056 }
1057 }
1058 return len(dAtA) - i, nil
1059 }
1060
1061 func (m *NestedMap1) Marshal() (dAtA []byte, err error) {
1062 size := m.Size()
1063 dAtA = make([]byte, size)
1064 n, err := m.MarshalToSizedBuffer(dAtA[:size])
1065 if err != nil {
1066 return nil, err
1067 }
1068 return dAtA[:n], nil
1069 }
1070
1071 func (m *NestedMap1) MarshalTo(dAtA []byte) (int, error) {
1072 size := m.Size()
1073 return m.MarshalToSizedBuffer(dAtA[:size])
1074 }
1075
1076 func (m *NestedMap1) MarshalToSizedBuffer(dAtA []byte) (int, error) {
1077 i := len(dAtA)
1078 _ = i
1079 var l int
1080 _ = l
1081 if m.XXX_unrecognized != nil {
1082 i -= len(m.XXX_unrecognized)
1083 copy(dAtA[i:], m.XXX_unrecognized)
1084 }
1085 if len(m.NestedStringMap) > 0 {
1086 keysForNestedStringMap := make([]string, 0, len(m.NestedStringMap))
1087 for k := range m.NestedStringMap {
1088 keysForNestedStringMap = append(keysForNestedStringMap, string(k))
1089 }
1090 github_com_gogo_protobuf_sortkeys.Strings(keysForNestedStringMap)
1091 for iNdEx := len(keysForNestedStringMap) - 1; iNdEx >= 0; iNdEx-- {
1092 v := m.NestedStringMap[string(keysForNestedStringMap[iNdEx])]
1093 baseI := i
1094 i -= len(v)
1095 copy(dAtA[i:], v)
1096 i = encodeVarintDeterministic(dAtA, i, uint64(len(v)))
1097 i--
1098 dAtA[i] = 0x12
1099 i -= len(keysForNestedStringMap[iNdEx])
1100 copy(dAtA[i:], keysForNestedStringMap[iNdEx])
1101 i = encodeVarintDeterministic(dAtA, i, uint64(len(keysForNestedStringMap[iNdEx])))
1102 i--
1103 dAtA[i] = 0xa
1104 i = encodeVarintDeterministic(dAtA, i, uint64(baseI-i))
1105 i--
1106 dAtA[i] = 0xa
1107 }
1108 }
1109 return len(dAtA) - i, nil
1110 }
1111
1112 func (m *NestedUnorderedMap) Marshal() (dAtA []byte, err error) {
1113 size := m.Size()
1114 dAtA = make([]byte, size)
1115 n, err := m.MarshalToSizedBuffer(dAtA[:size])
1116 if err != nil {
1117 return nil, err
1118 }
1119 return dAtA[:n], nil
1120 }
1121
1122 func (m *NestedUnorderedMap) MarshalTo(dAtA []byte) (int, error) {
1123 size := m.Size()
1124 return m.MarshalToSizedBuffer(dAtA[:size])
1125 }
1126
1127 func (m *NestedUnorderedMap) MarshalToSizedBuffer(dAtA []byte) (int, error) {
1128 i := len(dAtA)
1129 _ = i
1130 var l int
1131 _ = l
1132 if m.XXX_unrecognized != nil {
1133 i -= len(m.XXX_unrecognized)
1134 copy(dAtA[i:], m.XXX_unrecognized)
1135 }
1136 if m.NestedMap != nil {
1137 {
1138 size, err := m.NestedMap.MarshalToSizedBuffer(dAtA[:i])
1139 if err != nil {
1140 return 0, err
1141 }
1142 i -= size
1143 i = encodeVarintDeterministic(dAtA, i, uint64(size))
1144 }
1145 i--
1146 dAtA[i] = 0x12
1147 }
1148 if len(m.StringMap) > 0 {
1149 for k := range m.StringMap {
1150 v := m.StringMap[k]
1151 baseI := i
1152 i -= len(v)
1153 copy(dAtA[i:], v)
1154 i = encodeVarintDeterministic(dAtA, i, uint64(len(v)))
1155 i--
1156 dAtA[i] = 0x12
1157 i -= len(k)
1158 copy(dAtA[i:], k)
1159 i = encodeVarintDeterministic(dAtA, i, uint64(len(k)))
1160 i--
1161 dAtA[i] = 0xa
1162 i = encodeVarintDeterministic(dAtA, i, uint64(baseI-i))
1163 i--
1164 dAtA[i] = 0xa
1165 }
1166 }
1167 return len(dAtA) - i, nil
1168 }
1169
1170 func (m *NestedMap2) Marshal() (dAtA []byte, err error) {
1171 size := m.Size()
1172 dAtA = make([]byte, size)
1173 n, err := m.MarshalToSizedBuffer(dAtA[:size])
1174 if err != nil {
1175 return nil, err
1176 }
1177 return dAtA[:n], nil
1178 }
1179
1180 func (m *NestedMap2) MarshalTo(dAtA []byte) (int, error) {
1181 size := m.Size()
1182 return m.MarshalToSizedBuffer(dAtA[:size])
1183 }
1184
1185 func (m *NestedMap2) MarshalToSizedBuffer(dAtA []byte) (int, error) {
1186 i := len(dAtA)
1187 _ = i
1188 var l int
1189 _ = l
1190 if m.XXX_unrecognized != nil {
1191 i -= len(m.XXX_unrecognized)
1192 copy(dAtA[i:], m.XXX_unrecognized)
1193 }
1194 if len(m.NestedStringMap) > 0 {
1195 for k := range m.NestedStringMap {
1196 v := m.NestedStringMap[k]
1197 baseI := i
1198 i -= len(v)
1199 copy(dAtA[i:], v)
1200 i = encodeVarintDeterministic(dAtA, i, uint64(len(v)))
1201 i--
1202 dAtA[i] = 0x12
1203 i -= len(k)
1204 copy(dAtA[i:], k)
1205 i = encodeVarintDeterministic(dAtA, i, uint64(len(k)))
1206 i--
1207 dAtA[i] = 0xa
1208 i = encodeVarintDeterministic(dAtA, i, uint64(baseI-i))
1209 i--
1210 dAtA[i] = 0xa
1211 }
1212 }
1213 return len(dAtA) - i, nil
1214 }
1215
1216 func encodeVarintDeterministic(dAtA []byte, offset int, v uint64) int {
1217 offset -= sovDeterministic(v)
1218 base := offset
1219 for v >= 1<<7 {
1220 dAtA[offset] = uint8(v&0x7f | 0x80)
1221 v >>= 7
1222 offset++
1223 }
1224 dAtA[offset] = uint8(v)
1225 return base
1226 }
1227 func (m *OrderedMap) Size() (n int) {
1228 if m == nil {
1229 return 0
1230 }
1231 var l int
1232 _ = l
1233 if len(m.StringMap) > 0 {
1234 for k, v := range m.StringMap {
1235 _ = k
1236 _ = v
1237 mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v)))
1238 n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize))
1239 }
1240 }
1241 if m.XXX_unrecognized != nil {
1242 n += len(m.XXX_unrecognized)
1243 }
1244 return n
1245 }
1246
1247 func (m *UnorderedMap) Size() (n int) {
1248 if m == nil {
1249 return 0
1250 }
1251 var l int
1252 _ = l
1253 if len(m.StringMap) > 0 {
1254 for k, v := range m.StringMap {
1255 _ = k
1256 _ = v
1257 mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v)))
1258 n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize))
1259 }
1260 }
1261 if m.XXX_unrecognized != nil {
1262 n += len(m.XXX_unrecognized)
1263 }
1264 return n
1265 }
1266
1267 func (m *MapNoMarshaler) Size() (n int) {
1268 if m == nil {
1269 return 0
1270 }
1271 var l int
1272 _ = l
1273 if len(m.StringMap) > 0 {
1274 for k, v := range m.StringMap {
1275 _ = k
1276 _ = v
1277 mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v)))
1278 n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize))
1279 }
1280 }
1281 if m.XXX_unrecognized != nil {
1282 n += len(m.XXX_unrecognized)
1283 }
1284 return n
1285 }
1286
1287 func (m *NestedOrderedMap) Size() (n int) {
1288 if m == nil {
1289 return 0
1290 }
1291 var l int
1292 _ = l
1293 if len(m.StringMap) > 0 {
1294 for k, v := range m.StringMap {
1295 _ = k
1296 _ = v
1297 mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v)))
1298 n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize))
1299 }
1300 }
1301 if m.NestedMap != nil {
1302 l = m.NestedMap.Size()
1303 n += 1 + l + sovDeterministic(uint64(l))
1304 }
1305 if m.XXX_unrecognized != nil {
1306 n += len(m.XXX_unrecognized)
1307 }
1308 return n
1309 }
1310
1311 func (m *NestedMap1) Size() (n int) {
1312 if m == nil {
1313 return 0
1314 }
1315 var l int
1316 _ = l
1317 if len(m.NestedStringMap) > 0 {
1318 for k, v := range m.NestedStringMap {
1319 _ = k
1320 _ = v
1321 mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v)))
1322 n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize))
1323 }
1324 }
1325 if m.XXX_unrecognized != nil {
1326 n += len(m.XXX_unrecognized)
1327 }
1328 return n
1329 }
1330
1331 func (m *NestedUnorderedMap) Size() (n int) {
1332 if m == nil {
1333 return 0
1334 }
1335 var l int
1336 _ = l
1337 if len(m.StringMap) > 0 {
1338 for k, v := range m.StringMap {
1339 _ = k
1340 _ = v
1341 mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v)))
1342 n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize))
1343 }
1344 }
1345 if m.NestedMap != nil {
1346 l = m.NestedMap.Size()
1347 n += 1 + l + sovDeterministic(uint64(l))
1348 }
1349 if m.XXX_unrecognized != nil {
1350 n += len(m.XXX_unrecognized)
1351 }
1352 return n
1353 }
1354
1355 func (m *NestedMap2) Size() (n int) {
1356 if m == nil {
1357 return 0
1358 }
1359 var l int
1360 _ = l
1361 if len(m.NestedStringMap) > 0 {
1362 for k, v := range m.NestedStringMap {
1363 _ = k
1364 _ = v
1365 mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v)))
1366 n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize))
1367 }
1368 }
1369 if m.XXX_unrecognized != nil {
1370 n += len(m.XXX_unrecognized)
1371 }
1372 return n
1373 }
1374
1375 func sovDeterministic(x uint64) (n int) {
1376 return (math_bits.Len64(x|1) + 6) / 7
1377 }
1378 func sozDeterministic(x uint64) (n int) {
1379 return sovDeterministic(uint64((x << 1) ^ uint64((int64(x) >> 63))))
1380 }
1381
View as plain text