...

Source file src/github.com/gogo/protobuf/test/xxxfields/xxxfields.pb.go

Documentation: github.com/gogo/protobuf/test/xxxfields

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: xxxfields.proto
     3  
     4  package test
     5  
     6  import (
     7  	bytes "bytes"
     8  	fmt "fmt"
     9  	_ "github.com/gogo/protobuf/gogoproto"
    10  	proto "github.com/gogo/protobuf/proto"
    11  	math "math"
    12  )
    13  
    14  // Reference imports to suppress errors if they are not otherwise used.
    15  var _ = proto.Marshal
    16  var _ = fmt.Errorf
    17  var _ = math.Inf
    18  
    19  // This is a compile-time assertion to ensure that this generated file
    20  // is compatible with the proto package it is being compiled against.
    21  // A compilation error at this line likely means your copy of the
    22  // proto package needs to be updated.
    23  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    24  
    25  type NativeWithSizeCache struct {
    26  	Field1        *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"`
    27  	Field2        *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"`
    28  	Field3        *int32   `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"`
    29  	Field4        *int64   `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"`
    30  	Field11       uint64   `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"`
    31  	Field13       *bool    `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"`
    32  	Field14       *string  `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"`
    33  	Field15       []byte   `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"`
    34  	XXX_sizecache int32    `json:"-"`
    35  }
    36  
    37  func (m *NativeWithSizeCache) Reset()         { *m = NativeWithSizeCache{} }
    38  func (m *NativeWithSizeCache) String() string { return proto.CompactTextString(m) }
    39  func (*NativeWithSizeCache) ProtoMessage()    {}
    40  func (*NativeWithSizeCache) Descriptor() ([]byte, []int) {
    41  	return fileDescriptor_ba18cdebbd18dc5d, []int{0}
    42  }
    43  func (m *NativeWithSizeCache) XXX_Unmarshal(b []byte) error {
    44  	return xxx_messageInfo_NativeWithSizeCache.Unmarshal(m, b)
    45  }
    46  func (m *NativeWithSizeCache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    47  	return xxx_messageInfo_NativeWithSizeCache.Marshal(b, m, deterministic)
    48  }
    49  func (m *NativeWithSizeCache) XXX_Merge(src proto.Message) {
    50  	xxx_messageInfo_NativeWithSizeCache.Merge(m, src)
    51  }
    52  func (m *NativeWithSizeCache) XXX_Size() int {
    53  	return xxx_messageInfo_NativeWithSizeCache.Size(m)
    54  }
    55  func (m *NativeWithSizeCache) XXX_DiscardUnknown() {
    56  	xxx_messageInfo_NativeWithSizeCache.DiscardUnknown(m)
    57  }
    58  
    59  var xxx_messageInfo_NativeWithSizeCache proto.InternalMessageInfo
    60  
    61  func (m *NativeWithSizeCache) GetField1() float64 {
    62  	if m != nil && m.Field1 != nil {
    63  		return *m.Field1
    64  	}
    65  	return 0
    66  }
    67  
    68  func (m *NativeWithSizeCache) GetField2() float32 {
    69  	if m != nil && m.Field2 != nil {
    70  		return *m.Field2
    71  	}
    72  	return 0
    73  }
    74  
    75  func (m *NativeWithSizeCache) GetField3() int32 {
    76  	if m != nil && m.Field3 != nil {
    77  		return *m.Field3
    78  	}
    79  	return 0
    80  }
    81  
    82  func (m *NativeWithSizeCache) GetField4() int64 {
    83  	if m != nil && m.Field4 != nil {
    84  		return *m.Field4
    85  	}
    86  	return 0
    87  }
    88  
    89  func (m *NativeWithSizeCache) GetField11() uint64 {
    90  	if m != nil {
    91  		return m.Field11
    92  	}
    93  	return 0
    94  }
    95  
    96  func (m *NativeWithSizeCache) GetField13() bool {
    97  	if m != nil && m.Field13 != nil {
    98  		return *m.Field13
    99  	}
   100  	return false
   101  }
   102  
   103  func (m *NativeWithSizeCache) GetField14() string {
   104  	if m != nil && m.Field14 != nil {
   105  		return *m.Field14
   106  	}
   107  	return ""
   108  }
   109  
   110  func (m *NativeWithSizeCache) GetField15() []byte {
   111  	if m != nil {
   112  		return m.Field15
   113  	}
   114  	return nil
   115  }
   116  
   117  type StructWithSizeCache struct {
   118  	Field1        float64                `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"`
   119  	Field2        float32                `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"`
   120  	Field3        NativeWithSizeCache    `protobuf:"bytes,3,opt,name=Field3" json:"Field3"`
   121  	Field6        *uint64                `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"`
   122  	Field7        int32                  `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"`
   123  	Field8        NativeWithoutSizeCache `protobuf:"bytes,8,opt,name=Field8" json:"Field8"`
   124  	Field13       []bool                 `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"`
   125  	Field14       *string                `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"`
   126  	Field15       []byte                 `protobuf:"bytes,15,opt,name=Field15" json:"Field15"`
   127  	XXX_sizecache int32                  `json:"-"`
   128  }
   129  
   130  func (m *StructWithSizeCache) Reset()         { *m = StructWithSizeCache{} }
   131  func (m *StructWithSizeCache) String() string { return proto.CompactTextString(m) }
   132  func (*StructWithSizeCache) ProtoMessage()    {}
   133  func (*StructWithSizeCache) Descriptor() ([]byte, []int) {
   134  	return fileDescriptor_ba18cdebbd18dc5d, []int{1}
   135  }
   136  func (m *StructWithSizeCache) XXX_Unmarshal(b []byte) error {
   137  	return xxx_messageInfo_StructWithSizeCache.Unmarshal(m, b)
   138  }
   139  func (m *StructWithSizeCache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   140  	return xxx_messageInfo_StructWithSizeCache.Marshal(b, m, deterministic)
   141  }
   142  func (m *StructWithSizeCache) XXX_Merge(src proto.Message) {
   143  	xxx_messageInfo_StructWithSizeCache.Merge(m, src)
   144  }
   145  func (m *StructWithSizeCache) XXX_Size() int {
   146  	return xxx_messageInfo_StructWithSizeCache.Size(m)
   147  }
   148  func (m *StructWithSizeCache) XXX_DiscardUnknown() {
   149  	xxx_messageInfo_StructWithSizeCache.DiscardUnknown(m)
   150  }
   151  
   152  var xxx_messageInfo_StructWithSizeCache proto.InternalMessageInfo
   153  
   154  func (m *StructWithSizeCache) GetField1() float64 {
   155  	if m != nil {
   156  		return m.Field1
   157  	}
   158  	return 0
   159  }
   160  
   161  func (m *StructWithSizeCache) GetField2() float32 {
   162  	if m != nil {
   163  		return m.Field2
   164  	}
   165  	return 0
   166  }
   167  
   168  func (m *StructWithSizeCache) GetField3() NativeWithSizeCache {
   169  	if m != nil {
   170  		return m.Field3
   171  	}
   172  	return NativeWithSizeCache{}
   173  }
   174  
   175  func (m *StructWithSizeCache) GetField6() uint64 {
   176  	if m != nil && m.Field6 != nil {
   177  		return *m.Field6
   178  	}
   179  	return 0
   180  }
   181  
   182  func (m *StructWithSizeCache) GetField7() int32 {
   183  	if m != nil {
   184  		return m.Field7
   185  	}
   186  	return 0
   187  }
   188  
   189  func (m *StructWithSizeCache) GetField8() NativeWithoutSizeCache {
   190  	if m != nil {
   191  		return m.Field8
   192  	}
   193  	return NativeWithoutSizeCache{}
   194  }
   195  
   196  func (m *StructWithSizeCache) GetField13() []bool {
   197  	if m != nil {
   198  		return m.Field13
   199  	}
   200  	return nil
   201  }
   202  
   203  func (m *StructWithSizeCache) GetField14() string {
   204  	if m != nil && m.Field14 != nil {
   205  		return *m.Field14
   206  	}
   207  	return ""
   208  }
   209  
   210  func (m *StructWithSizeCache) GetField15() []byte {
   211  	if m != nil {
   212  		return m.Field15
   213  	}
   214  	return nil
   215  }
   216  
   217  type NativeWithoutSizeCache struct {
   218  	Field1  *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"`
   219  	Field2  *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"`
   220  	Field3  *int32   `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"`
   221  	Field4  *int64   `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"`
   222  	Field11 uint64   `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"`
   223  	Field13 *bool    `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"`
   224  	Field14 *string  `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"`
   225  	Field15 []byte   `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"`
   226  }
   227  
   228  func (m *NativeWithoutSizeCache) Reset()         { *m = NativeWithoutSizeCache{} }
   229  func (m *NativeWithoutSizeCache) String() string { return proto.CompactTextString(m) }
   230  func (*NativeWithoutSizeCache) ProtoMessage()    {}
   231  func (*NativeWithoutSizeCache) Descriptor() ([]byte, []int) {
   232  	return fileDescriptor_ba18cdebbd18dc5d, []int{2}
   233  }
   234  func (m *NativeWithoutSizeCache) XXX_Unmarshal(b []byte) error {
   235  	return xxx_messageInfo_NativeWithoutSizeCache.Unmarshal(m, b)
   236  }
   237  func (m *NativeWithoutSizeCache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   238  	return xxx_messageInfo_NativeWithoutSizeCache.Marshal(b, m, deterministic)
   239  }
   240  func (m *NativeWithoutSizeCache) XXX_Merge(src proto.Message) {
   241  	xxx_messageInfo_NativeWithoutSizeCache.Merge(m, src)
   242  }
   243  func (m *NativeWithoutSizeCache) XXX_Size() int {
   244  	return xxx_messageInfo_NativeWithoutSizeCache.Size(m)
   245  }
   246  func (m *NativeWithoutSizeCache) XXX_DiscardUnknown() {
   247  	xxx_messageInfo_NativeWithoutSizeCache.DiscardUnknown(m)
   248  }
   249  
   250  var xxx_messageInfo_NativeWithoutSizeCache proto.InternalMessageInfo
   251  
   252  func (m *NativeWithoutSizeCache) GetField1() float64 {
   253  	if m != nil && m.Field1 != nil {
   254  		return *m.Field1
   255  	}
   256  	return 0
   257  }
   258  
   259  func (m *NativeWithoutSizeCache) GetField2() float32 {
   260  	if m != nil && m.Field2 != nil {
   261  		return *m.Field2
   262  	}
   263  	return 0
   264  }
   265  
   266  func (m *NativeWithoutSizeCache) GetField3() int32 {
   267  	if m != nil && m.Field3 != nil {
   268  		return *m.Field3
   269  	}
   270  	return 0
   271  }
   272  
   273  func (m *NativeWithoutSizeCache) GetField4() int64 {
   274  	if m != nil && m.Field4 != nil {
   275  		return *m.Field4
   276  	}
   277  	return 0
   278  }
   279  
   280  func (m *NativeWithoutSizeCache) GetField11() uint64 {
   281  	if m != nil {
   282  		return m.Field11
   283  	}
   284  	return 0
   285  }
   286  
   287  func (m *NativeWithoutSizeCache) GetField13() bool {
   288  	if m != nil && m.Field13 != nil {
   289  		return *m.Field13
   290  	}
   291  	return false
   292  }
   293  
   294  func (m *NativeWithoutSizeCache) GetField14() string {
   295  	if m != nil && m.Field14 != nil {
   296  		return *m.Field14
   297  	}
   298  	return ""
   299  }
   300  
   301  func (m *NativeWithoutSizeCache) GetField15() []byte {
   302  	if m != nil {
   303  		return m.Field15
   304  	}
   305  	return nil
   306  }
   307  
   308  type StructWithoutSizeCache struct {
   309  	Field1  float64                `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"`
   310  	Field2  float32                `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"`
   311  	Field3  NativeWithSizeCache    `protobuf:"bytes,3,opt,name=Field3" json:"Field3"`
   312  	Field6  *uint64                `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"`
   313  	Field7  int32                  `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"`
   314  	Field8  NativeWithoutSizeCache `protobuf:"bytes,8,opt,name=Field8" json:"Field8"`
   315  	Field13 []bool                 `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"`
   316  	Field14 *string                `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"`
   317  	Field15 []byte                 `protobuf:"bytes,15,opt,name=Field15" json:"Field15"`
   318  }
   319  
   320  func (m *StructWithoutSizeCache) Reset()         { *m = StructWithoutSizeCache{} }
   321  func (m *StructWithoutSizeCache) String() string { return proto.CompactTextString(m) }
   322  func (*StructWithoutSizeCache) ProtoMessage()    {}
   323  func (*StructWithoutSizeCache) Descriptor() ([]byte, []int) {
   324  	return fileDescriptor_ba18cdebbd18dc5d, []int{3}
   325  }
   326  func (m *StructWithoutSizeCache) XXX_Unmarshal(b []byte) error {
   327  	return xxx_messageInfo_StructWithoutSizeCache.Unmarshal(m, b)
   328  }
   329  func (m *StructWithoutSizeCache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   330  	return xxx_messageInfo_StructWithoutSizeCache.Marshal(b, m, deterministic)
   331  }
   332  func (m *StructWithoutSizeCache) XXX_Merge(src proto.Message) {
   333  	xxx_messageInfo_StructWithoutSizeCache.Merge(m, src)
   334  }
   335  func (m *StructWithoutSizeCache) XXX_Size() int {
   336  	return xxx_messageInfo_StructWithoutSizeCache.Size(m)
   337  }
   338  func (m *StructWithoutSizeCache) XXX_DiscardUnknown() {
   339  	xxx_messageInfo_StructWithoutSizeCache.DiscardUnknown(m)
   340  }
   341  
   342  var xxx_messageInfo_StructWithoutSizeCache proto.InternalMessageInfo
   343  
   344  func (m *StructWithoutSizeCache) GetField1() float64 {
   345  	if m != nil {
   346  		return m.Field1
   347  	}
   348  	return 0
   349  }
   350  
   351  func (m *StructWithoutSizeCache) GetField2() float32 {
   352  	if m != nil {
   353  		return m.Field2
   354  	}
   355  	return 0
   356  }
   357  
   358  func (m *StructWithoutSizeCache) GetField3() NativeWithSizeCache {
   359  	if m != nil {
   360  		return m.Field3
   361  	}
   362  	return NativeWithSizeCache{}
   363  }
   364  
   365  func (m *StructWithoutSizeCache) GetField6() uint64 {
   366  	if m != nil && m.Field6 != nil {
   367  		return *m.Field6
   368  	}
   369  	return 0
   370  }
   371  
   372  func (m *StructWithoutSizeCache) GetField7() int32 {
   373  	if m != nil {
   374  		return m.Field7
   375  	}
   376  	return 0
   377  }
   378  
   379  func (m *StructWithoutSizeCache) GetField8() NativeWithoutSizeCache {
   380  	if m != nil {
   381  		return m.Field8
   382  	}
   383  	return NativeWithoutSizeCache{}
   384  }
   385  
   386  func (m *StructWithoutSizeCache) GetField13() []bool {
   387  	if m != nil {
   388  		return m.Field13
   389  	}
   390  	return nil
   391  }
   392  
   393  func (m *StructWithoutSizeCache) GetField14() string {
   394  	if m != nil && m.Field14 != nil {
   395  		return *m.Field14
   396  	}
   397  	return ""
   398  }
   399  
   400  func (m *StructWithoutSizeCache) GetField15() []byte {
   401  	if m != nil {
   402  		return m.Field15
   403  	}
   404  	return nil
   405  }
   406  
   407  func init() {
   408  	proto.RegisterType((*NativeWithSizeCache)(nil), "test.NativeWithSizeCache")
   409  	proto.RegisterType((*StructWithSizeCache)(nil), "test.StructWithSizeCache")
   410  	proto.RegisterType((*NativeWithoutSizeCache)(nil), "test.NativeWithoutSizeCache")
   411  	proto.RegisterType((*StructWithoutSizeCache)(nil), "test.StructWithoutSizeCache")
   412  }
   413  
   414  func init() { proto.RegisterFile("xxxfields.proto", fileDescriptor_ba18cdebbd18dc5d) }
   415  
   416  var fileDescriptor_ba18cdebbd18dc5d = []byte{
   417  	// 375 bytes of a gzipped FileDescriptorProto
   418  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xaf, 0xa8, 0xa8, 0x48,
   419  	0xcb, 0x4c, 0xcd, 0x49, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x29, 0x49, 0x2d,
   420  	0x2e, 0x91, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf,
   421  	0x4f, 0xcf, 0xd7, 0x07, 0x4b, 0x26, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa4,
   422  	0xf4, 0x96, 0x91, 0x4b, 0xd8, 0x2f, 0xb1, 0x24, 0xb3, 0x2c, 0x35, 0x3c, 0xb3, 0x24, 0x23, 0x38,
   423  	0xb3, 0x2a, 0xd5, 0x39, 0x31, 0x39, 0x23, 0x55, 0x48, 0x8c, 0x8b, 0xcd, 0x0d, 0x64, 0xb8, 0xa1,
   424  	0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x94, 0x07, 0x17, 0x37, 0x92, 0x60, 0x52, 0x60, 0xd4,
   425  	0x60, 0x82, 0x8a, 0x1b, 0xc1, 0xc5, 0x8d, 0x25, 0x98, 0x15, 0x18, 0x35, 0x58, 0xa1, 0xe2, 0xc6,
   426  	0x70, 0x71, 0x13, 0x09, 0x16, 0x05, 0x46, 0x0d, 0x66, 0xa8, 0xb8, 0x89, 0x90, 0x1c, 0x17, 0x3b,
   427  	0xc4, 0x44, 0x43, 0x09, 0x6e, 0x05, 0x46, 0x0d, 0x36, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82,
   428  	0x60, 0x82, 0x42, 0x12, 0x30, 0x79, 0x63, 0x09, 0x5e, 0x05, 0x46, 0x0d, 0x0e, 0x98, 0x8c, 0x31,
   429  	0x42, 0xc6, 0x44, 0x82, 0x4f, 0x81, 0x51, 0x83, 0x13, 0x26, 0x63, 0x82, 0x90, 0x31, 0x95, 0xe0,
   430  	0x57, 0x60, 0xd4, 0xe0, 0x81, 0xc9, 0x98, 0x5a, 0x71, 0x5c, 0x58, 0x28, 0xcf, 0x30, 0x63, 0x91,
   431  	0x3c, 0x83, 0xd2, 0x2d, 0x26, 0x2e, 0xe1, 0xe0, 0x92, 0xa2, 0xd2, 0xe4, 0x12, 0x54, 0xff, 0xca,
   432  	0xa0, 0xfa, 0x17, 0xea, 0x1c, 0x98, 0xaf, 0x65, 0x50, 0x7d, 0x8d, 0x22, 0x6b, 0x24, 0x64, 0x8e,
   433  	0xe2, 0x77, 0x6e, 0x23, 0x49, 0x3d, 0x50, 0x4c, 0xe8, 0x61, 0x09, 0x56, 0x14, 0x8d, 0x88, 0xc0,
   434  	0x31, 0x93, 0x60, 0x53, 0x60, 0xd4, 0x60, 0x81, 0x8a, 0x9b, 0xc1, 0xad, 0x33, 0x97, 0x60, 0x57,
   435  	0x60, 0xd4, 0x10, 0x44, 0xd1, 0x65, 0x2e, 0x64, 0x05, 0x95, 0xb5, 0x90, 0xe0, 0x00, 0x5b, 0x27,
   436  	0x83, 0x6e, 0x5d, 0x7e, 0x69, 0x09, 0x76, 0x1b, 0x2d, 0x50, 0x83, 0x95, 0x99, 0xb8, 0x60, 0x95,
   437  	0x43, 0x0b, 0x56, 0xd4, 0xa8, 0x42, 0x0e, 0xdc, 0x2f, 0x8c, 0x5c, 0x62, 0xd8, 0x9d, 0x31, 0xcc,
   438  	0xd2, 0x13, 0x0f, 0xc8, 0xcb, 0x13, 0x16, 0x41, 0xbd, 0xfd, 0x90, 0x89, 0x4b, 0x0c, 0x91, 0xa6,
   439  	0x50, 0xbc, 0x3d, 0x9a, 0xac, 0xc8, 0x4e, 0x56, 0x28, 0x61, 0xec, 0xc4, 0xf3, 0xe3, 0xa1, 0x1c,
   440  	0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x02, 0x02, 0x00, 0x00, 0xff, 0xff, 0x72,
   441  	0x3b, 0x20, 0xc7, 0xfc, 0x04, 0x00, 0x00,
   442  }
   443  
   444  func (this *NativeWithSizeCache) Equal(that interface{}) bool {
   445  	if that == nil {
   446  		return this == nil
   447  	}
   448  
   449  	that1, ok := that.(*NativeWithSizeCache)
   450  	if !ok {
   451  		that2, ok := that.(NativeWithSizeCache)
   452  		if ok {
   453  			that1 = &that2
   454  		} else {
   455  			return false
   456  		}
   457  	}
   458  	if that1 == nil {
   459  		return this == nil
   460  	} else if this == nil {
   461  		return false
   462  	}
   463  	if this.Field1 != nil && that1.Field1 != nil {
   464  		if *this.Field1 != *that1.Field1 {
   465  			return false
   466  		}
   467  	} else if this.Field1 != nil {
   468  		return false
   469  	} else if that1.Field1 != nil {
   470  		return false
   471  	}
   472  	if this.Field2 != nil && that1.Field2 != nil {
   473  		if *this.Field2 != *that1.Field2 {
   474  			return false
   475  		}
   476  	} else if this.Field2 != nil {
   477  		return false
   478  	} else if that1.Field2 != nil {
   479  		return false
   480  	}
   481  	if this.Field3 != nil && that1.Field3 != nil {
   482  		if *this.Field3 != *that1.Field3 {
   483  			return false
   484  		}
   485  	} else if this.Field3 != nil {
   486  		return false
   487  	} else if that1.Field3 != nil {
   488  		return false
   489  	}
   490  	if this.Field4 != nil && that1.Field4 != nil {
   491  		if *this.Field4 != *that1.Field4 {
   492  			return false
   493  		}
   494  	} else if this.Field4 != nil {
   495  		return false
   496  	} else if that1.Field4 != nil {
   497  		return false
   498  	}
   499  	if this.Field11 != that1.Field11 {
   500  		return false
   501  	}
   502  	if this.Field13 != nil && that1.Field13 != nil {
   503  		if *this.Field13 != *that1.Field13 {
   504  			return false
   505  		}
   506  	} else if this.Field13 != nil {
   507  		return false
   508  	} else if that1.Field13 != nil {
   509  		return false
   510  	}
   511  	if this.Field14 != nil && that1.Field14 != nil {
   512  		if *this.Field14 != *that1.Field14 {
   513  			return false
   514  		}
   515  	} else if this.Field14 != nil {
   516  		return false
   517  	} else if that1.Field14 != nil {
   518  		return false
   519  	}
   520  	if !bytes.Equal(this.Field15, that1.Field15) {
   521  		return false
   522  	}
   523  	return true
   524  }
   525  func (this *StructWithSizeCache) Equal(that interface{}) bool {
   526  	if that == nil {
   527  		return this == nil
   528  	}
   529  
   530  	that1, ok := that.(*StructWithSizeCache)
   531  	if !ok {
   532  		that2, ok := that.(StructWithSizeCache)
   533  		if ok {
   534  			that1 = &that2
   535  		} else {
   536  			return false
   537  		}
   538  	}
   539  	if that1 == nil {
   540  		return this == nil
   541  	} else if this == nil {
   542  		return false
   543  	}
   544  	if this.Field1 != that1.Field1 {
   545  		return false
   546  	}
   547  	if this.Field2 != that1.Field2 {
   548  		return false
   549  	}
   550  	if !this.Field3.Equal(&that1.Field3) {
   551  		return false
   552  	}
   553  	if this.Field6 != nil && that1.Field6 != nil {
   554  		if *this.Field6 != *that1.Field6 {
   555  			return false
   556  		}
   557  	} else if this.Field6 != nil {
   558  		return false
   559  	} else if that1.Field6 != nil {
   560  		return false
   561  	}
   562  	if this.Field7 != that1.Field7 {
   563  		return false
   564  	}
   565  	if !this.Field8.Equal(&that1.Field8) {
   566  		return false
   567  	}
   568  	if len(this.Field13) != len(that1.Field13) {
   569  		return false
   570  	}
   571  	for i := range this.Field13 {
   572  		if this.Field13[i] != that1.Field13[i] {
   573  			return false
   574  		}
   575  	}
   576  	if this.Field14 != nil && that1.Field14 != nil {
   577  		if *this.Field14 != *that1.Field14 {
   578  			return false
   579  		}
   580  	} else if this.Field14 != nil {
   581  		return false
   582  	} else if that1.Field14 != nil {
   583  		return false
   584  	}
   585  	if !bytes.Equal(this.Field15, that1.Field15) {
   586  		return false
   587  	}
   588  	return true
   589  }
   590  func (this *NativeWithoutSizeCache) Equal(that interface{}) bool {
   591  	if that == nil {
   592  		return this == nil
   593  	}
   594  
   595  	that1, ok := that.(*NativeWithoutSizeCache)
   596  	if !ok {
   597  		that2, ok := that.(NativeWithoutSizeCache)
   598  		if ok {
   599  			that1 = &that2
   600  		} else {
   601  			return false
   602  		}
   603  	}
   604  	if that1 == nil {
   605  		return this == nil
   606  	} else if this == nil {
   607  		return false
   608  	}
   609  	if this.Field1 != nil && that1.Field1 != nil {
   610  		if *this.Field1 != *that1.Field1 {
   611  			return false
   612  		}
   613  	} else if this.Field1 != nil {
   614  		return false
   615  	} else if that1.Field1 != nil {
   616  		return false
   617  	}
   618  	if this.Field2 != nil && that1.Field2 != nil {
   619  		if *this.Field2 != *that1.Field2 {
   620  			return false
   621  		}
   622  	} else if this.Field2 != nil {
   623  		return false
   624  	} else if that1.Field2 != nil {
   625  		return false
   626  	}
   627  	if this.Field3 != nil && that1.Field3 != nil {
   628  		if *this.Field3 != *that1.Field3 {
   629  			return false
   630  		}
   631  	} else if this.Field3 != nil {
   632  		return false
   633  	} else if that1.Field3 != nil {
   634  		return false
   635  	}
   636  	if this.Field4 != nil && that1.Field4 != nil {
   637  		if *this.Field4 != *that1.Field4 {
   638  			return false
   639  		}
   640  	} else if this.Field4 != nil {
   641  		return false
   642  	} else if that1.Field4 != nil {
   643  		return false
   644  	}
   645  	if this.Field11 != that1.Field11 {
   646  		return false
   647  	}
   648  	if this.Field13 != nil && that1.Field13 != nil {
   649  		if *this.Field13 != *that1.Field13 {
   650  			return false
   651  		}
   652  	} else if this.Field13 != nil {
   653  		return false
   654  	} else if that1.Field13 != nil {
   655  		return false
   656  	}
   657  	if this.Field14 != nil && that1.Field14 != nil {
   658  		if *this.Field14 != *that1.Field14 {
   659  			return false
   660  		}
   661  	} else if this.Field14 != nil {
   662  		return false
   663  	} else if that1.Field14 != nil {
   664  		return false
   665  	}
   666  	if !bytes.Equal(this.Field15, that1.Field15) {
   667  		return false
   668  	}
   669  	return true
   670  }
   671  func (this *StructWithoutSizeCache) Equal(that interface{}) bool {
   672  	if that == nil {
   673  		return this == nil
   674  	}
   675  
   676  	that1, ok := that.(*StructWithoutSizeCache)
   677  	if !ok {
   678  		that2, ok := that.(StructWithoutSizeCache)
   679  		if ok {
   680  			that1 = &that2
   681  		} else {
   682  			return false
   683  		}
   684  	}
   685  	if that1 == nil {
   686  		return this == nil
   687  	} else if this == nil {
   688  		return false
   689  	}
   690  	if this.Field1 != that1.Field1 {
   691  		return false
   692  	}
   693  	if this.Field2 != that1.Field2 {
   694  		return false
   695  	}
   696  	if !this.Field3.Equal(&that1.Field3) {
   697  		return false
   698  	}
   699  	if this.Field6 != nil && that1.Field6 != nil {
   700  		if *this.Field6 != *that1.Field6 {
   701  			return false
   702  		}
   703  	} else if this.Field6 != nil {
   704  		return false
   705  	} else if that1.Field6 != nil {
   706  		return false
   707  	}
   708  	if this.Field7 != that1.Field7 {
   709  		return false
   710  	}
   711  	if !this.Field8.Equal(&that1.Field8) {
   712  		return false
   713  	}
   714  	if len(this.Field13) != len(that1.Field13) {
   715  		return false
   716  	}
   717  	for i := range this.Field13 {
   718  		if this.Field13[i] != that1.Field13[i] {
   719  			return false
   720  		}
   721  	}
   722  	if this.Field14 != nil && that1.Field14 != nil {
   723  		if *this.Field14 != *that1.Field14 {
   724  			return false
   725  		}
   726  	} else if this.Field14 != nil {
   727  		return false
   728  	} else if that1.Field14 != nil {
   729  		return false
   730  	}
   731  	if !bytes.Equal(this.Field15, that1.Field15) {
   732  		return false
   733  	}
   734  	return true
   735  }
   736  func NewPopulatedNativeWithSizeCache(r randyXxxfields, easy bool) *NativeWithSizeCache {
   737  	this := &NativeWithSizeCache{}
   738  	if r.Intn(5) != 0 {
   739  		v1 := float64(r.Float64())
   740  		if r.Intn(2) == 0 {
   741  			v1 *= -1
   742  		}
   743  		this.Field1 = &v1
   744  	}
   745  	if r.Intn(5) != 0 {
   746  		v2 := float32(r.Float32())
   747  		if r.Intn(2) == 0 {
   748  			v2 *= -1
   749  		}
   750  		this.Field2 = &v2
   751  	}
   752  	if r.Intn(5) != 0 {
   753  		v3 := int32(r.Int31())
   754  		if r.Intn(2) == 0 {
   755  			v3 *= -1
   756  		}
   757  		this.Field3 = &v3
   758  	}
   759  	if r.Intn(5) != 0 {
   760  		v4 := int64(r.Int63())
   761  		if r.Intn(2) == 0 {
   762  			v4 *= -1
   763  		}
   764  		this.Field4 = &v4
   765  	}
   766  	this.Field11 = uint64(uint64(r.Uint32()))
   767  	if r.Intn(5) != 0 {
   768  		v5 := bool(bool(r.Intn(2) == 0))
   769  		this.Field13 = &v5
   770  	}
   771  	if r.Intn(5) != 0 {
   772  		v6 := string(randStringXxxfields(r))
   773  		this.Field14 = &v6
   774  	}
   775  	if r.Intn(5) != 0 {
   776  		v7 := r.Intn(100)
   777  		this.Field15 = make([]byte, v7)
   778  		for i := 0; i < v7; i++ {
   779  			this.Field15[i] = byte(r.Intn(256))
   780  		}
   781  	}
   782  	if !easy && r.Intn(10) != 0 {
   783  	}
   784  	return this
   785  }
   786  
   787  func NewPopulatedStructWithSizeCache(r randyXxxfields, easy bool) *StructWithSizeCache {
   788  	this := &StructWithSizeCache{}
   789  	this.Field1 = float64(r.Float64())
   790  	if r.Intn(2) == 0 {
   791  		this.Field1 *= -1
   792  	}
   793  	this.Field2 = float32(r.Float32())
   794  	if r.Intn(2) == 0 {
   795  		this.Field2 *= -1
   796  	}
   797  	v8 := NewPopulatedNativeWithSizeCache(r, easy)
   798  	this.Field3 = *v8
   799  	if r.Intn(5) != 0 {
   800  		v9 := uint64(uint64(r.Uint32()))
   801  		this.Field6 = &v9
   802  	}
   803  	this.Field7 = int32(r.Int31())
   804  	if r.Intn(2) == 0 {
   805  		this.Field7 *= -1
   806  	}
   807  	v10 := NewPopulatedNativeWithoutSizeCache(r, easy)
   808  	this.Field8 = *v10
   809  	if r.Intn(5) != 0 {
   810  		v11 := r.Intn(10)
   811  		this.Field13 = make([]bool, v11)
   812  		for i := 0; i < v11; i++ {
   813  			this.Field13[i] = bool(bool(r.Intn(2) == 0))
   814  		}
   815  	}
   816  	if r.Intn(5) != 0 {
   817  		v12 := string(randStringXxxfields(r))
   818  		this.Field14 = &v12
   819  	}
   820  	v13 := r.Intn(100)
   821  	this.Field15 = make([]byte, v13)
   822  	for i := 0; i < v13; i++ {
   823  		this.Field15[i] = byte(r.Intn(256))
   824  	}
   825  	if !easy && r.Intn(10) != 0 {
   826  	}
   827  	return this
   828  }
   829  
   830  func NewPopulatedNativeWithoutSizeCache(r randyXxxfields, easy bool) *NativeWithoutSizeCache {
   831  	this := &NativeWithoutSizeCache{}
   832  	if r.Intn(5) != 0 {
   833  		v14 := float64(r.Float64())
   834  		if r.Intn(2) == 0 {
   835  			v14 *= -1
   836  		}
   837  		this.Field1 = &v14
   838  	}
   839  	if r.Intn(5) != 0 {
   840  		v15 := float32(r.Float32())
   841  		if r.Intn(2) == 0 {
   842  			v15 *= -1
   843  		}
   844  		this.Field2 = &v15
   845  	}
   846  	if r.Intn(5) != 0 {
   847  		v16 := int32(r.Int31())
   848  		if r.Intn(2) == 0 {
   849  			v16 *= -1
   850  		}
   851  		this.Field3 = &v16
   852  	}
   853  	if r.Intn(5) != 0 {
   854  		v17 := int64(r.Int63())
   855  		if r.Intn(2) == 0 {
   856  			v17 *= -1
   857  		}
   858  		this.Field4 = &v17
   859  	}
   860  	this.Field11 = uint64(uint64(r.Uint32()))
   861  	if r.Intn(5) != 0 {
   862  		v18 := bool(bool(r.Intn(2) == 0))
   863  		this.Field13 = &v18
   864  	}
   865  	if r.Intn(5) != 0 {
   866  		v19 := string(randStringXxxfields(r))
   867  		this.Field14 = &v19
   868  	}
   869  	if r.Intn(5) != 0 {
   870  		v20 := r.Intn(100)
   871  		this.Field15 = make([]byte, v20)
   872  		for i := 0; i < v20; i++ {
   873  			this.Field15[i] = byte(r.Intn(256))
   874  		}
   875  	}
   876  	if !easy && r.Intn(10) != 0 {
   877  	}
   878  	return this
   879  }
   880  
   881  func NewPopulatedStructWithoutSizeCache(r randyXxxfields, easy bool) *StructWithoutSizeCache {
   882  	this := &StructWithoutSizeCache{}
   883  	this.Field1 = float64(r.Float64())
   884  	if r.Intn(2) == 0 {
   885  		this.Field1 *= -1
   886  	}
   887  	this.Field2 = float32(r.Float32())
   888  	if r.Intn(2) == 0 {
   889  		this.Field2 *= -1
   890  	}
   891  	v21 := NewPopulatedNativeWithSizeCache(r, easy)
   892  	this.Field3 = *v21
   893  	if r.Intn(5) != 0 {
   894  		v22 := uint64(uint64(r.Uint32()))
   895  		this.Field6 = &v22
   896  	}
   897  	this.Field7 = int32(r.Int31())
   898  	if r.Intn(2) == 0 {
   899  		this.Field7 *= -1
   900  	}
   901  	v23 := NewPopulatedNativeWithoutSizeCache(r, easy)
   902  	this.Field8 = *v23
   903  	if r.Intn(5) != 0 {
   904  		v24 := r.Intn(10)
   905  		this.Field13 = make([]bool, v24)
   906  		for i := 0; i < v24; i++ {
   907  			this.Field13[i] = bool(bool(r.Intn(2) == 0))
   908  		}
   909  	}
   910  	if r.Intn(5) != 0 {
   911  		v25 := string(randStringXxxfields(r))
   912  		this.Field14 = &v25
   913  	}
   914  	v26 := r.Intn(100)
   915  	this.Field15 = make([]byte, v26)
   916  	for i := 0; i < v26; i++ {
   917  		this.Field15[i] = byte(r.Intn(256))
   918  	}
   919  	if !easy && r.Intn(10) != 0 {
   920  	}
   921  	return this
   922  }
   923  
   924  type randyXxxfields interface {
   925  	Float32() float32
   926  	Float64() float64
   927  	Int63() int64
   928  	Int31() int32
   929  	Uint32() uint32
   930  	Intn(n int) int
   931  }
   932  
   933  func randUTF8RuneXxxfields(r randyXxxfields) rune {
   934  	ru := r.Intn(62)
   935  	if ru < 10 {
   936  		return rune(ru + 48)
   937  	} else if ru < 36 {
   938  		return rune(ru + 55)
   939  	}
   940  	return rune(ru + 61)
   941  }
   942  func randStringXxxfields(r randyXxxfields) string {
   943  	v27 := r.Intn(100)
   944  	tmps := make([]rune, v27)
   945  	for i := 0; i < v27; i++ {
   946  		tmps[i] = randUTF8RuneXxxfields(r)
   947  	}
   948  	return string(tmps)
   949  }
   950  func randUnrecognizedXxxfields(r randyXxxfields, maxFieldNumber int) (dAtA []byte) {
   951  	l := r.Intn(5)
   952  	for i := 0; i < l; i++ {
   953  		wire := r.Intn(4)
   954  		if wire == 3 {
   955  			wire = 5
   956  		}
   957  		fieldNumber := maxFieldNumber + r.Intn(100)
   958  		dAtA = randFieldXxxfields(dAtA, r, fieldNumber, wire)
   959  	}
   960  	return dAtA
   961  }
   962  func randFieldXxxfields(dAtA []byte, r randyXxxfields, fieldNumber int, wire int) []byte {
   963  	key := uint32(fieldNumber)<<3 | uint32(wire)
   964  	switch wire {
   965  	case 0:
   966  		dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(key))
   967  		v28 := r.Int63()
   968  		if r.Intn(2) == 0 {
   969  			v28 *= -1
   970  		}
   971  		dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(v28))
   972  	case 1:
   973  		dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(key))
   974  		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
   975  	case 2:
   976  		dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(key))
   977  		ll := r.Intn(100)
   978  		dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(ll))
   979  		for j := 0; j < ll; j++ {
   980  			dAtA = append(dAtA, byte(r.Intn(256)))
   981  		}
   982  	default:
   983  		dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(key))
   984  		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
   985  	}
   986  	return dAtA
   987  }
   988  func encodeVarintPopulateXxxfields(dAtA []byte, v uint64) []byte {
   989  	for v >= 1<<7 {
   990  		dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
   991  		v >>= 7
   992  	}
   993  	dAtA = append(dAtA, uint8(v))
   994  	return dAtA
   995  }
   996  

View as plain text