github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/swarmkit/protobuf/plugin/deepcopy/test/deepcopy.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/docker/swarmkit/protobuf/plugin/deepcopy/test/deepcopy.proto 3 4 package test 5 6 import ( 7 bytes "bytes" 8 fmt "fmt" 9 github_com_docker_swarmkit_api_deepcopy "github.com/docker/swarmkit/api/deepcopy" 10 _ "github.com/gogo/protobuf/gogoproto" 11 proto "github.com/gogo/protobuf/proto" 12 github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" 13 math "math" 14 reflect "reflect" 15 strings "strings" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the proto package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // proto package needs to be updated. 27 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 28 29 type BasicScalar struct { 30 Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3" json:"Field1,omitempty"` 31 Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3" json:"Field2,omitempty"` 32 Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3" json:"Field3,omitempty"` 33 Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3" json:"Field4,omitempty"` 34 Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3" json:"Field5,omitempty"` 35 Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3" json:"Field6,omitempty"` 36 Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3" json:"Field7,omitempty"` 37 Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3" json:"Field8,omitempty"` 38 Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3" json:"Field9,omitempty"` 39 Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3" json:"Field10,omitempty"` 40 Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3" json:"Field11,omitempty"` 41 Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3" json:"Field12,omitempty"` 42 Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3" json:"Field13,omitempty"` 43 Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3" json:"Field14,omitempty"` 44 Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3" json:"Field15,omitempty"` 45 } 46 47 func (m *BasicScalar) Reset() { *m = BasicScalar{} } 48 func (*BasicScalar) ProtoMessage() {} 49 func (*BasicScalar) Descriptor() ([]byte, []int) { 50 return fileDescriptor_32a357b2839a6c60, []int{0} 51 } 52 func (m *BasicScalar) XXX_Unmarshal(b []byte) error { 53 return xxx_messageInfo_BasicScalar.Unmarshal(m, b) 54 } 55 func (m *BasicScalar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 56 return xxx_messageInfo_BasicScalar.Marshal(b, m, deterministic) 57 } 58 func (m *BasicScalar) XXX_Merge(src proto.Message) { 59 xxx_messageInfo_BasicScalar.Merge(m, src) 60 } 61 func (m *BasicScalar) XXX_Size() int { 62 return xxx_messageInfo_BasicScalar.Size(m) 63 } 64 func (m *BasicScalar) XXX_DiscardUnknown() { 65 xxx_messageInfo_BasicScalar.DiscardUnknown(m) 66 } 67 68 var xxx_messageInfo_BasicScalar proto.InternalMessageInfo 69 70 type RepeatedScalar struct { 71 Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,proto3" json:"Field1,omitempty"` 72 Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,proto3" json:"Field2,omitempty"` 73 Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,proto3" json:"Field3,omitempty"` 74 Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,proto3" json:"Field4,omitempty"` 75 Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,proto3" json:"Field5,omitempty"` 76 Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,proto3" json:"Field6,omitempty"` 77 Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,proto3" json:"Field7,omitempty"` 78 Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,proto3" json:"Field8,omitempty"` 79 Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,proto3" json:"Field9,omitempty"` 80 Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,proto3" json:"Field10,omitempty"` 81 Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,proto3" json:"Field11,omitempty"` 82 Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,proto3" json:"Field12,omitempty"` 83 Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,proto3" json:"Field13,omitempty"` 84 Field14 []string `protobuf:"bytes,14,rep,name=Field14,proto3" json:"Field14,omitempty"` 85 Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15,proto3" json:"Field15,omitempty"` 86 } 87 88 func (m *RepeatedScalar) Reset() { *m = RepeatedScalar{} } 89 func (*RepeatedScalar) ProtoMessage() {} 90 func (*RepeatedScalar) Descriptor() ([]byte, []int) { 91 return fileDescriptor_32a357b2839a6c60, []int{1} 92 } 93 func (m *RepeatedScalar) XXX_Unmarshal(b []byte) error { 94 return xxx_messageInfo_RepeatedScalar.Unmarshal(m, b) 95 } 96 func (m *RepeatedScalar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 97 return xxx_messageInfo_RepeatedScalar.Marshal(b, m, deterministic) 98 } 99 func (m *RepeatedScalar) XXX_Merge(src proto.Message) { 100 xxx_messageInfo_RepeatedScalar.Merge(m, src) 101 } 102 func (m *RepeatedScalar) XXX_Size() int { 103 return xxx_messageInfo_RepeatedScalar.Size(m) 104 } 105 func (m *RepeatedScalar) XXX_DiscardUnknown() { 106 xxx_messageInfo_RepeatedScalar.DiscardUnknown(m) 107 } 108 109 var xxx_messageInfo_RepeatedScalar proto.InternalMessageInfo 110 111 type RepeatedScalarPacked struct { 112 Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1,proto3" json:"Field1,omitempty"` 113 Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2,proto3" json:"Field2,omitempty"` 114 Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3,proto3" json:"Field3,omitempty"` 115 Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4,proto3" json:"Field4,omitempty"` 116 Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5,proto3" json:"Field5,omitempty"` 117 Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6,proto3" json:"Field6,omitempty"` 118 Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7,proto3" json:"Field7,omitempty"` 119 Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8,proto3" json:"Field8,omitempty"` 120 Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9,proto3" json:"Field9,omitempty"` 121 Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10,proto3" json:"Field10,omitempty"` 122 Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11,proto3" json:"Field11,omitempty"` 123 Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12,proto3" json:"Field12,omitempty"` 124 Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13,proto3" json:"Field13,omitempty"` 125 } 126 127 func (m *RepeatedScalarPacked) Reset() { *m = RepeatedScalarPacked{} } 128 func (*RepeatedScalarPacked) ProtoMessage() {} 129 func (*RepeatedScalarPacked) Descriptor() ([]byte, []int) { 130 return fileDescriptor_32a357b2839a6c60, []int{2} 131 } 132 func (m *RepeatedScalarPacked) XXX_Unmarshal(b []byte) error { 133 return xxx_messageInfo_RepeatedScalarPacked.Unmarshal(m, b) 134 } 135 func (m *RepeatedScalarPacked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 136 return xxx_messageInfo_RepeatedScalarPacked.Marshal(b, m, deterministic) 137 } 138 func (m *RepeatedScalarPacked) XXX_Merge(src proto.Message) { 139 xxx_messageInfo_RepeatedScalarPacked.Merge(m, src) 140 } 141 func (m *RepeatedScalarPacked) XXX_Size() int { 142 return xxx_messageInfo_RepeatedScalarPacked.Size(m) 143 } 144 func (m *RepeatedScalarPacked) XXX_DiscardUnknown() { 145 xxx_messageInfo_RepeatedScalarPacked.DiscardUnknown(m) 146 } 147 148 var xxx_messageInfo_RepeatedScalarPacked proto.InternalMessageInfo 149 150 type ExternalStruct struct { 151 Field1 *BasicScalar `protobuf:"bytes,1,opt,name=Field1,proto3" json:"Field1,omitempty"` 152 Field2 *RepeatedScalar `protobuf:"bytes,2,opt,name=Field2,proto3" json:"Field2,omitempty"` 153 Field3 *RepeatedScalarPacked `protobuf:"bytes,3,opt,name=Field3,proto3" json:"Field3,omitempty"` 154 } 155 156 func (m *ExternalStruct) Reset() { *m = ExternalStruct{} } 157 func (*ExternalStruct) ProtoMessage() {} 158 func (*ExternalStruct) Descriptor() ([]byte, []int) { 159 return fileDescriptor_32a357b2839a6c60, []int{3} 160 } 161 func (m *ExternalStruct) XXX_Unmarshal(b []byte) error { 162 return xxx_messageInfo_ExternalStruct.Unmarshal(m, b) 163 } 164 func (m *ExternalStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 165 return xxx_messageInfo_ExternalStruct.Marshal(b, m, deterministic) 166 } 167 func (m *ExternalStruct) XXX_Merge(src proto.Message) { 168 xxx_messageInfo_ExternalStruct.Merge(m, src) 169 } 170 func (m *ExternalStruct) XXX_Size() int { 171 return xxx_messageInfo_ExternalStruct.Size(m) 172 } 173 func (m *ExternalStruct) XXX_DiscardUnknown() { 174 xxx_messageInfo_ExternalStruct.DiscardUnknown(m) 175 } 176 177 var xxx_messageInfo_ExternalStruct proto.InternalMessageInfo 178 179 type RepeatedExternalStruct struct { 180 Field1 []*BasicScalar `protobuf:"bytes,1,rep,name=Field1,proto3" json:"Field1,omitempty"` 181 Field2 []*RepeatedScalar `protobuf:"bytes,2,rep,name=Field2,proto3" json:"Field2,omitempty"` 182 Field3 []*RepeatedScalarPacked `protobuf:"bytes,3,rep,name=Field3,proto3" json:"Field3,omitempty"` 183 } 184 185 func (m *RepeatedExternalStruct) Reset() { *m = RepeatedExternalStruct{} } 186 func (*RepeatedExternalStruct) ProtoMessage() {} 187 func (*RepeatedExternalStruct) Descriptor() ([]byte, []int) { 188 return fileDescriptor_32a357b2839a6c60, []int{4} 189 } 190 func (m *RepeatedExternalStruct) XXX_Unmarshal(b []byte) error { 191 return xxx_messageInfo_RepeatedExternalStruct.Unmarshal(m, b) 192 } 193 func (m *RepeatedExternalStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 194 return xxx_messageInfo_RepeatedExternalStruct.Marshal(b, m, deterministic) 195 } 196 func (m *RepeatedExternalStruct) XXX_Merge(src proto.Message) { 197 xxx_messageInfo_RepeatedExternalStruct.Merge(m, src) 198 } 199 func (m *RepeatedExternalStruct) XXX_Size() int { 200 return xxx_messageInfo_RepeatedExternalStruct.Size(m) 201 } 202 func (m *RepeatedExternalStruct) XXX_DiscardUnknown() { 203 xxx_messageInfo_RepeatedExternalStruct.DiscardUnknown(m) 204 } 205 206 var xxx_messageInfo_RepeatedExternalStruct proto.InternalMessageInfo 207 208 type NonNullableExternalStruct struct { 209 Field1 BasicScalar `protobuf:"bytes,1,opt,name=Field1,proto3" json:"Field1"` 210 Field2 RepeatedScalar `protobuf:"bytes,2,opt,name=Field2,proto3" json:"Field2"` 211 Field3 RepeatedScalarPacked `protobuf:"bytes,3,opt,name=Field3,proto3" json:"Field3"` 212 } 213 214 func (m *NonNullableExternalStruct) Reset() { *m = NonNullableExternalStruct{} } 215 func (*NonNullableExternalStruct) ProtoMessage() {} 216 func (*NonNullableExternalStruct) Descriptor() ([]byte, []int) { 217 return fileDescriptor_32a357b2839a6c60, []int{5} 218 } 219 func (m *NonNullableExternalStruct) XXX_Unmarshal(b []byte) error { 220 return xxx_messageInfo_NonNullableExternalStruct.Unmarshal(m, b) 221 } 222 func (m *NonNullableExternalStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 223 return xxx_messageInfo_NonNullableExternalStruct.Marshal(b, m, deterministic) 224 } 225 func (m *NonNullableExternalStruct) XXX_Merge(src proto.Message) { 226 xxx_messageInfo_NonNullableExternalStruct.Merge(m, src) 227 } 228 func (m *NonNullableExternalStruct) XXX_Size() int { 229 return xxx_messageInfo_NonNullableExternalStruct.Size(m) 230 } 231 func (m *NonNullableExternalStruct) XXX_DiscardUnknown() { 232 xxx_messageInfo_NonNullableExternalStruct.DiscardUnknown(m) 233 } 234 235 var xxx_messageInfo_NonNullableExternalStruct proto.InternalMessageInfo 236 237 type RepeatedNonNullableExternalStruct struct { 238 Field1 []BasicScalar `protobuf:"bytes,1,rep,name=Field1,proto3" json:"Field1"` 239 Field2 []RepeatedScalar `protobuf:"bytes,2,rep,name=Field2,proto3" json:"Field2"` 240 Field3 []RepeatedScalarPacked `protobuf:"bytes,3,rep,name=Field3,proto3" json:"Field3"` 241 } 242 243 func (m *RepeatedNonNullableExternalStruct) Reset() { *m = RepeatedNonNullableExternalStruct{} } 244 func (*RepeatedNonNullableExternalStruct) ProtoMessage() {} 245 func (*RepeatedNonNullableExternalStruct) Descriptor() ([]byte, []int) { 246 return fileDescriptor_32a357b2839a6c60, []int{6} 247 } 248 func (m *RepeatedNonNullableExternalStruct) XXX_Unmarshal(b []byte) error { 249 return xxx_messageInfo_RepeatedNonNullableExternalStruct.Unmarshal(m, b) 250 } 251 func (m *RepeatedNonNullableExternalStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 252 return xxx_messageInfo_RepeatedNonNullableExternalStruct.Marshal(b, m, deterministic) 253 } 254 func (m *RepeatedNonNullableExternalStruct) XXX_Merge(src proto.Message) { 255 xxx_messageInfo_RepeatedNonNullableExternalStruct.Merge(m, src) 256 } 257 func (m *RepeatedNonNullableExternalStruct) XXX_Size() int { 258 return xxx_messageInfo_RepeatedNonNullableExternalStruct.Size(m) 259 } 260 func (m *RepeatedNonNullableExternalStruct) XXX_DiscardUnknown() { 261 xxx_messageInfo_RepeatedNonNullableExternalStruct.DiscardUnknown(m) 262 } 263 264 var xxx_messageInfo_RepeatedNonNullableExternalStruct proto.InternalMessageInfo 265 266 type MapStruct struct { 267 NullableMap map[string]*BasicScalar `protobuf:"bytes,1,rep,name=nullable_map,json=nullableMap,proto3" json:"nullable_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 268 NonnullableMap map[string]BasicScalar `protobuf:"bytes,2,rep,name=nonnullable_map,json=nonnullableMap,proto3" json:"nonnullable_map" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 269 } 270 271 func (m *MapStruct) Reset() { *m = MapStruct{} } 272 func (*MapStruct) ProtoMessage() {} 273 func (*MapStruct) Descriptor() ([]byte, []int) { 274 return fileDescriptor_32a357b2839a6c60, []int{7} 275 } 276 func (m *MapStruct) XXX_Unmarshal(b []byte) error { 277 return xxx_messageInfo_MapStruct.Unmarshal(m, b) 278 } 279 func (m *MapStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 280 return xxx_messageInfo_MapStruct.Marshal(b, m, deterministic) 281 } 282 func (m *MapStruct) XXX_Merge(src proto.Message) { 283 xxx_messageInfo_MapStruct.Merge(m, src) 284 } 285 func (m *MapStruct) XXX_Size() int { 286 return xxx_messageInfo_MapStruct.Size(m) 287 } 288 func (m *MapStruct) XXX_DiscardUnknown() { 289 xxx_messageInfo_MapStruct.DiscardUnknown(m) 290 } 291 292 var xxx_messageInfo_MapStruct proto.InternalMessageInfo 293 294 type OneOf struct { 295 // Types that are valid to be assigned to Fields: 296 // *OneOf_Field1 297 // *OneOf_Field2 298 // *OneOf_Field3 299 // *OneOf_Field4 300 // *OneOf_Field5 301 // *OneOf_Field6 302 // *OneOf_Field7 303 // *OneOf_Field8 304 // *OneOf_Field9 305 Fields isOneOf_Fields `protobuf_oneof:"fields"` 306 // Types that are valid to be assigned to FieldsTwo: 307 // *OneOf_Field10 308 // *OneOf_Field11 309 FieldsTwo isOneOf_FieldsTwo `protobuf_oneof:"fieldsTwo"` 310 } 311 312 func (m *OneOf) Reset() { *m = OneOf{} } 313 func (*OneOf) ProtoMessage() {} 314 func (*OneOf) Descriptor() ([]byte, []int) { 315 return fileDescriptor_32a357b2839a6c60, []int{8} 316 } 317 func (m *OneOf) XXX_Unmarshal(b []byte) error { 318 return xxx_messageInfo_OneOf.Unmarshal(m, b) 319 } 320 func (m *OneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 321 return xxx_messageInfo_OneOf.Marshal(b, m, deterministic) 322 } 323 func (m *OneOf) XXX_Merge(src proto.Message) { 324 xxx_messageInfo_OneOf.Merge(m, src) 325 } 326 func (m *OneOf) XXX_Size() int { 327 return xxx_messageInfo_OneOf.Size(m) 328 } 329 func (m *OneOf) XXX_DiscardUnknown() { 330 xxx_messageInfo_OneOf.DiscardUnknown(m) 331 } 332 333 var xxx_messageInfo_OneOf proto.InternalMessageInfo 334 335 type isOneOf_Fields interface { 336 isOneOf_Fields() 337 Equal(interface{}) bool 338 } 339 type isOneOf_FieldsTwo interface { 340 isOneOf_FieldsTwo() 341 Equal(interface{}) bool 342 } 343 344 type OneOf_Field1 struct { 345 Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` 346 } 347 type OneOf_Field2 struct { 348 Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` 349 } 350 type OneOf_Field3 struct { 351 Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` 352 } 353 type OneOf_Field4 struct { 354 Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` 355 } 356 type OneOf_Field5 struct { 357 Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` 358 } 359 type OneOf_Field6 struct { 360 Field6 string `protobuf:"bytes,6,opt,name=Field6,proto3,oneof"` 361 } 362 type OneOf_Field7 struct { 363 Field7 []byte `protobuf:"bytes,7,opt,name=Field7,proto3,oneof"` 364 } 365 type OneOf_Field8 struct { 366 Field8 *MapStruct `protobuf:"bytes,8,opt,name=Field8,proto3,oneof"` 367 } 368 type OneOf_Field9 struct { 369 Field9 *RepeatedNonNullableExternalStruct `protobuf:"bytes,9,opt,name=Field9,proto3,oneof"` 370 } 371 type OneOf_Field10 struct { 372 Field10 *NonNullableExternalStruct `protobuf:"bytes,10,opt,name=Field10,proto3,oneof"` 373 } 374 type OneOf_Field11 struct { 375 Field11 *RepeatedExternalStruct `protobuf:"bytes,11,opt,name=Field11,proto3,oneof"` 376 } 377 378 func (*OneOf_Field1) isOneOf_Fields() {} 379 func (*OneOf_Field2) isOneOf_Fields() {} 380 func (*OneOf_Field3) isOneOf_Fields() {} 381 func (*OneOf_Field4) isOneOf_Fields() {} 382 func (*OneOf_Field5) isOneOf_Fields() {} 383 func (*OneOf_Field6) isOneOf_Fields() {} 384 func (*OneOf_Field7) isOneOf_Fields() {} 385 func (*OneOf_Field8) isOneOf_Fields() {} 386 func (*OneOf_Field9) isOneOf_Fields() {} 387 func (*OneOf_Field10) isOneOf_FieldsTwo() {} 388 func (*OneOf_Field11) isOneOf_FieldsTwo() {} 389 390 func (m *OneOf) GetFields() isOneOf_Fields { 391 if m != nil { 392 return m.Fields 393 } 394 return nil 395 } 396 func (m *OneOf) GetFieldsTwo() isOneOf_FieldsTwo { 397 if m != nil { 398 return m.FieldsTwo 399 } 400 return nil 401 } 402 403 func (m *OneOf) GetField1() float64 { 404 if x, ok := m.GetFields().(*OneOf_Field1); ok { 405 return x.Field1 406 } 407 return 0 408 } 409 410 func (m *OneOf) GetField2() float32 { 411 if x, ok := m.GetFields().(*OneOf_Field2); ok { 412 return x.Field2 413 } 414 return 0 415 } 416 417 func (m *OneOf) GetField3() int32 { 418 if x, ok := m.GetFields().(*OneOf_Field3); ok { 419 return x.Field3 420 } 421 return 0 422 } 423 424 func (m *OneOf) GetField4() int64 { 425 if x, ok := m.GetFields().(*OneOf_Field4); ok { 426 return x.Field4 427 } 428 return 0 429 } 430 431 func (m *OneOf) GetField5() uint32 { 432 if x, ok := m.GetFields().(*OneOf_Field5); ok { 433 return x.Field5 434 } 435 return 0 436 } 437 438 func (m *OneOf) GetField6() string { 439 if x, ok := m.GetFields().(*OneOf_Field6); ok { 440 return x.Field6 441 } 442 return "" 443 } 444 445 func (m *OneOf) GetField7() []byte { 446 if x, ok := m.GetFields().(*OneOf_Field7); ok { 447 return x.Field7 448 } 449 return nil 450 } 451 452 func (m *OneOf) GetField8() *MapStruct { 453 if x, ok := m.GetFields().(*OneOf_Field8); ok { 454 return x.Field8 455 } 456 return nil 457 } 458 459 func (m *OneOf) GetField9() *RepeatedNonNullableExternalStruct { 460 if x, ok := m.GetFields().(*OneOf_Field9); ok { 461 return x.Field9 462 } 463 return nil 464 } 465 466 func (m *OneOf) GetField10() *NonNullableExternalStruct { 467 if x, ok := m.GetFieldsTwo().(*OneOf_Field10); ok { 468 return x.Field10 469 } 470 return nil 471 } 472 473 func (m *OneOf) GetField11() *RepeatedExternalStruct { 474 if x, ok := m.GetFieldsTwo().(*OneOf_Field11); ok { 475 return x.Field11 476 } 477 return nil 478 } 479 480 // XXX_OneofFuncs is for the internal use of the proto package. 481 func (*OneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { 482 return _OneOf_OneofMarshaler, _OneOf_OneofUnmarshaler, _OneOf_OneofSizer, []interface{}{ 483 (*OneOf_Field1)(nil), 484 (*OneOf_Field2)(nil), 485 (*OneOf_Field3)(nil), 486 (*OneOf_Field4)(nil), 487 (*OneOf_Field5)(nil), 488 (*OneOf_Field6)(nil), 489 (*OneOf_Field7)(nil), 490 (*OneOf_Field8)(nil), 491 (*OneOf_Field9)(nil), 492 (*OneOf_Field10)(nil), 493 (*OneOf_Field11)(nil), 494 } 495 } 496 497 func _OneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { 498 m := msg.(*OneOf) 499 // fields 500 switch x := m.Fields.(type) { 501 case *OneOf_Field1: 502 _ = b.EncodeVarint(1<<3 | proto.WireFixed64) 503 _ = b.EncodeFixed64(math.Float64bits(x.Field1)) 504 case *OneOf_Field2: 505 _ = b.EncodeVarint(2<<3 | proto.WireFixed32) 506 _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) 507 case *OneOf_Field3: 508 _ = b.EncodeVarint(3<<3 | proto.WireVarint) 509 _ = b.EncodeVarint(uint64(x.Field3)) 510 case *OneOf_Field4: 511 _ = b.EncodeVarint(4<<3 | proto.WireVarint) 512 _ = b.EncodeVarint(uint64(x.Field4)) 513 case *OneOf_Field5: 514 _ = b.EncodeVarint(5<<3 | proto.WireVarint) 515 _ = b.EncodeVarint(uint64(x.Field5)) 516 case *OneOf_Field6: 517 _ = b.EncodeVarint(6<<3 | proto.WireBytes) 518 _ = b.EncodeStringBytes(x.Field6) 519 case *OneOf_Field7: 520 _ = b.EncodeVarint(7<<3 | proto.WireBytes) 521 _ = b.EncodeRawBytes(x.Field7) 522 case *OneOf_Field8: 523 _ = b.EncodeVarint(8<<3 | proto.WireBytes) 524 if err := b.EncodeMessage(x.Field8); err != nil { 525 return err 526 } 527 case *OneOf_Field9: 528 _ = b.EncodeVarint(9<<3 | proto.WireBytes) 529 if err := b.EncodeMessage(x.Field9); err != nil { 530 return err 531 } 532 case nil: 533 default: 534 return fmt.Errorf("OneOf.Fields has unexpected type %T", x) 535 } 536 // fieldsTwo 537 switch x := m.FieldsTwo.(type) { 538 case *OneOf_Field10: 539 _ = b.EncodeVarint(10<<3 | proto.WireBytes) 540 if err := b.EncodeMessage(x.Field10); err != nil { 541 return err 542 } 543 case *OneOf_Field11: 544 _ = b.EncodeVarint(11<<3 | proto.WireBytes) 545 if err := b.EncodeMessage(x.Field11); err != nil { 546 return err 547 } 548 case nil: 549 default: 550 return fmt.Errorf("OneOf.FieldsTwo has unexpected type %T", x) 551 } 552 return nil 553 } 554 555 func _OneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { 556 m := msg.(*OneOf) 557 switch tag { 558 case 1: // fields.Field1 559 if wire != proto.WireFixed64 { 560 return true, proto.ErrInternalBadWireType 561 } 562 x, err := b.DecodeFixed64() 563 m.Fields = &OneOf_Field1{math.Float64frombits(x)} 564 return true, err 565 case 2: // fields.Field2 566 if wire != proto.WireFixed32 { 567 return true, proto.ErrInternalBadWireType 568 } 569 x, err := b.DecodeFixed32() 570 m.Fields = &OneOf_Field2{math.Float32frombits(uint32(x))} 571 return true, err 572 case 3: // fields.Field3 573 if wire != proto.WireVarint { 574 return true, proto.ErrInternalBadWireType 575 } 576 x, err := b.DecodeVarint() 577 m.Fields = &OneOf_Field3{int32(x)} 578 return true, err 579 case 4: // fields.Field4 580 if wire != proto.WireVarint { 581 return true, proto.ErrInternalBadWireType 582 } 583 x, err := b.DecodeVarint() 584 m.Fields = &OneOf_Field4{int64(x)} 585 return true, err 586 case 5: // fields.Field5 587 if wire != proto.WireVarint { 588 return true, proto.ErrInternalBadWireType 589 } 590 x, err := b.DecodeVarint() 591 m.Fields = &OneOf_Field5{uint32(x)} 592 return true, err 593 case 6: // fields.Field6 594 if wire != proto.WireBytes { 595 return true, proto.ErrInternalBadWireType 596 } 597 x, err := b.DecodeStringBytes() 598 m.Fields = &OneOf_Field6{x} 599 return true, err 600 case 7: // fields.Field7 601 if wire != proto.WireBytes { 602 return true, proto.ErrInternalBadWireType 603 } 604 x, err := b.DecodeRawBytes(true) 605 m.Fields = &OneOf_Field7{x} 606 return true, err 607 case 8: // fields.Field8 608 if wire != proto.WireBytes { 609 return true, proto.ErrInternalBadWireType 610 } 611 msg := new(MapStruct) 612 err := b.DecodeMessage(msg) 613 m.Fields = &OneOf_Field8{msg} 614 return true, err 615 case 9: // fields.Field9 616 if wire != proto.WireBytes { 617 return true, proto.ErrInternalBadWireType 618 } 619 msg := new(RepeatedNonNullableExternalStruct) 620 err := b.DecodeMessage(msg) 621 m.Fields = &OneOf_Field9{msg} 622 return true, err 623 case 10: // fieldsTwo.Field10 624 if wire != proto.WireBytes { 625 return true, proto.ErrInternalBadWireType 626 } 627 msg := new(NonNullableExternalStruct) 628 err := b.DecodeMessage(msg) 629 m.FieldsTwo = &OneOf_Field10{msg} 630 return true, err 631 case 11: // fieldsTwo.Field11 632 if wire != proto.WireBytes { 633 return true, proto.ErrInternalBadWireType 634 } 635 msg := new(RepeatedExternalStruct) 636 err := b.DecodeMessage(msg) 637 m.FieldsTwo = &OneOf_Field11{msg} 638 return true, err 639 default: 640 return false, nil 641 } 642 } 643 644 func _OneOf_OneofSizer(msg proto.Message) (n int) { 645 m := msg.(*OneOf) 646 // fields 647 switch x := m.Fields.(type) { 648 case *OneOf_Field1: 649 n += 1 // tag and wire 650 n += 8 651 case *OneOf_Field2: 652 n += 1 // tag and wire 653 n += 4 654 case *OneOf_Field3: 655 n += 1 // tag and wire 656 n += proto.SizeVarint(uint64(x.Field3)) 657 case *OneOf_Field4: 658 n += 1 // tag and wire 659 n += proto.SizeVarint(uint64(x.Field4)) 660 case *OneOf_Field5: 661 n += 1 // tag and wire 662 n += proto.SizeVarint(uint64(x.Field5)) 663 case *OneOf_Field6: 664 n += 1 // tag and wire 665 n += proto.SizeVarint(uint64(len(x.Field6))) 666 n += len(x.Field6) 667 case *OneOf_Field7: 668 n += 1 // tag and wire 669 n += proto.SizeVarint(uint64(len(x.Field7))) 670 n += len(x.Field7) 671 case *OneOf_Field8: 672 s := proto.Size(x.Field8) 673 n += 1 // tag and wire 674 n += proto.SizeVarint(uint64(s)) 675 n += s 676 case *OneOf_Field9: 677 s := proto.Size(x.Field9) 678 n += 1 // tag and wire 679 n += proto.SizeVarint(uint64(s)) 680 n += s 681 case nil: 682 default: 683 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) 684 } 685 // fieldsTwo 686 switch x := m.FieldsTwo.(type) { 687 case *OneOf_Field10: 688 s := proto.Size(x.Field10) 689 n += 1 // tag and wire 690 n += proto.SizeVarint(uint64(s)) 691 n += s 692 case *OneOf_Field11: 693 s := proto.Size(x.Field11) 694 n += 1 // tag and wire 695 n += proto.SizeVarint(uint64(s)) 696 n += s 697 case nil: 698 default: 699 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) 700 } 701 return n 702 } 703 704 func init() { 705 proto.RegisterType((*BasicScalar)(nil), "test.BasicScalar") 706 proto.RegisterType((*RepeatedScalar)(nil), "test.RepeatedScalar") 707 proto.RegisterType((*RepeatedScalarPacked)(nil), "test.RepeatedScalarPacked") 708 proto.RegisterType((*ExternalStruct)(nil), "test.ExternalStruct") 709 proto.RegisterType((*RepeatedExternalStruct)(nil), "test.RepeatedExternalStruct") 710 proto.RegisterType((*NonNullableExternalStruct)(nil), "test.NonNullableExternalStruct") 711 proto.RegisterType((*RepeatedNonNullableExternalStruct)(nil), "test.RepeatedNonNullableExternalStruct") 712 proto.RegisterType((*MapStruct)(nil), "test.MapStruct") 713 proto.RegisterMapType((map[string]BasicScalar)(nil), "test.MapStruct.NonnullableMapEntry") 714 proto.RegisterMapType((map[string]*BasicScalar)(nil), "test.MapStruct.NullableMapEntry") 715 proto.RegisterType((*OneOf)(nil), "test.OneOf") 716 } 717 718 func init() { 719 proto.RegisterFile("github.com/docker/swarmkit/protobuf/plugin/deepcopy/test/deepcopy.proto", fileDescriptor_32a357b2839a6c60) 720 } 721 722 var fileDescriptor_32a357b2839a6c60 = []byte{ 723 // 915 bytes of a gzipped FileDescriptorProto 724 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x3f, 0x6f, 0x23, 0x45, 725 0x18, 0x87, 0x67, 0x3c, 0x89, 0x13, 0xcf, 0xe6, 0x92, 0xdc, 0x72, 0x3a, 0x0d, 0x56, 0x34, 0x37, 726 0x98, 0xe2, 0x16, 0x09, 0x6c, 0x3c, 0x6b, 0x27, 0x0e, 0x54, 0x18, 0x1d, 0x5c, 0x73, 0x7f, 0xf0, 727 0x5d, 0x8f, 0x36, 0xf6, 0x26, 0x58, 0x71, 0x76, 0x2d, 0x67, 0xcd, 0x91, 0xee, 0x90, 0xa8, 0xa8, 728 0xf8, 0x02, 0x48, 0x34, 0x48, 0x7c, 0x04, 0xa0, 0xa4, 0x4a, 0x83, 0x94, 0xf2, 0x2a, 0x84, 0xd7, 729 0xcd, 0x95, 0x57, 0x5e, 0x89, 0xec, 0x9d, 0x7d, 0x77, 0xc7, 0x78, 0xc0, 0x81, 0x6e, 0xe7, 0xf7, 730 0xcc, 0x8c, 0xdf, 0xd9, 0x67, 0x3d, 0x7a, 0xe9, 0xa7, 0x27, 0xfd, 0xe8, 0x8b, 0xf1, 0x51, 0xb5, 731 0x1b, 0x9e, 0xd5, 0x7a, 0x61, 0xf7, 0xd4, 0x1f, 0xd5, 0xce, 0x9f, 0x79, 0xa3, 0xb3, 0xd3, 0x7e, 732 0x54, 0x1b, 0x8e, 0xc2, 0x28, 0x3c, 0x1a, 0x1f, 0xd7, 0x86, 0x83, 0xf1, 0x49, 0x3f, 0xa8, 0xf5, 733 0x7c, 0x7f, 0xd8, 0x0d, 0x87, 0x17, 0xb5, 0xc8, 0x3f, 0x8f, 0x60, 0x54, 0x9d, 0x4f, 0xb3, 0xd7, 734 0x66, 0x61, 0xf9, 0xbd, 0xdc, 0x76, 0x27, 0xe1, 0x49, 0x98, 0xed, 0x31, 0x1b, 0xcd, 0x07, 0xf3, 735 0xa7, 0x64, 0x51, 0xe5, 0x6b, 0x42, 0xad, 0xb6, 0x77, 0xde, 0xef, 0x3e, 0xe9, 0x7a, 0x03, 0x6f, 736 0x64, 0xdf, 0xa6, 0xc5, 0x4f, 0xfa, 0xfe, 0xa0, 0x57, 0x67, 0x58, 0x60, 0x07, 0x77, 0xd4, 0x08, 737 0x72, 0xc9, 0x0a, 0x02, 0x3b, 0x05, 0x95, 0x4b, 0xc8, 0x5d, 0x46, 0x04, 0x76, 0xd6, 0x55, 0xee, 738 0x42, 0xde, 0x60, 0x6b, 0x02, 0x3b, 0x44, 0xe5, 0x0d, 0xc8, 0x9b, 0x6c, 0x5d, 0x60, 0xe7, 0x86, 739 0xca, 0x9b, 0x90, 0xef, 0xb3, 0xa2, 0xc0, 0xce, 0x9a, 0xca, 0xf7, 0x21, 0x3f, 0x60, 0x1b, 0x02, 740 0x3b, 0x37, 0x55, 0x7e, 0x00, 0x79, 0x8b, 0x6d, 0x0a, 0xec, 0xd8, 0x2a, 0x6f, 0x41, 0x7e, 0xc8, 741 0x4a, 0x02, 0x3b, 0x1b, 0x2a, 0x3f, 0xb4, 0x19, 0xdd, 0x48, 0x4e, 0xf2, 0x3e, 0xa3, 0x02, 0x3b, 742 0x3b, 0x9d, 0x74, 0x98, 0x91, 0x3a, 0xb3, 0x04, 0x76, 0x8a, 0x29, 0xa9, 0x67, 0x44, 0xb2, 0x2d, 743 0x81, 0x9d, 0xdd, 0x94, 0xc8, 0x8c, 0xb8, 0xec, 0x86, 0xc0, 0xce, 0x66, 0x4a, 0xdc, 0x8c, 0x34, 744 0xd8, 0xb6, 0xc0, 0x4e, 0x29, 0x25, 0x8d, 0x8c, 0x34, 0xd9, 0x8e, 0xc0, 0xce, 0x56, 0x4a, 0x9a, 745 0x95, 0x6f, 0x08, 0xdd, 0xee, 0xf8, 0x43, 0xdf, 0x8b, 0xfc, 0xde, 0x12, 0x0d, 0xc4, 0xa0, 0x81, 746 0x18, 0x34, 0x10, 0x83, 0x06, 0x62, 0xd0, 0x40, 0x0c, 0x1a, 0x88, 0x41, 0x03, 0x31, 0x68, 0x20, 747 0x06, 0x0d, 0xc4, 0xa4, 0x81, 0x18, 0x35, 0x10, 0xa3, 0x06, 0x62, 0xd4, 0x40, 0x8c, 0x1a, 0x88, 748 0x51, 0x03, 0xc9, 0x6b, 0xf8, 0x96, 0xd0, 0x5b, 0xba, 0x86, 0xc7, 0x5e, 0xf7, 0xd4, 0xef, 0xd9, 749 0x65, 0x5d, 0x46, 0xbb, 0xb0, 0x9b, 0x09, 0x29, 0xeb, 0x42, 0x72, 0x4c, 0x02, 0x53, 0x52, 0x72, 750 0xcc, 0x05, 0xa6, 0xc4, 0xe4, 0x58, 0x03, 0x98, 0x92, 0x93, 0x63, 0x4d, 0x60, 0x4a, 0x50, 0x8e, 751 0xed, 0x03, 0x53, 0x92, 0x72, 0xec, 0x00, 0x98, 0x12, 0x95, 0x63, 0x2d, 0x60, 0x4a, 0x56, 0x8e, 752 0x1d, 0xda, 0x7b, 0x0b, 0xc2, 0xe6, 0x10, 0xa4, 0xed, 0x2d, 0x48, 0xcb, 0xd3, 0x7a, 0x46, 0x95, 753 0xb8, 0x3c, 0x95, 0x19, 0x55, 0xf2, 0xf2, 0xd4, 0xad, 0x7c, 0x8f, 0xe9, 0xf6, 0xbd, 0xaf, 0x22, 754 0x7f, 0x14, 0x78, 0x83, 0x27, 0xd1, 0x68, 0xdc, 0x8d, 0xec, 0x77, 0xb4, 0xab, 0xc9, 0x92, 0x37, 755 0xab, 0xb3, 0x0b, 0xaf, 0x9a, 0xbb, 0xbd, 0xc0, 0xca, 0xbb, 0xda, 0x6d, 0x65, 0xc9, 0x5b, 0xc9, 756 0x54, 0xdd, 0x2e, 0x78, 0x92, 0xda, 0x1d, 0x66, 0xc9, 0xf2, 0xb2, 0xd9, 0xc9, 0xb7, 0x90, 0xfa, 757 0xab, 0xfc, 0x88, 0xe9, 0xed, 0x74, 0xc2, 0x3f, 0xd4, 0x49, 0x56, 0xaf, 0x93, 0x5c, 0xab, 0x4e, 758 0xb2, 0x62, 0x9d, 0xbf, 0x62, 0xfa, 0xe6, 0xc3, 0x30, 0x78, 0x38, 0x1e, 0x0c, 0xbc, 0xa3, 0x81, 759 0xbf, 0x50, 0x6a, 0xed, 0x5f, 0x5f, 0x69, 0x7b, 0xed, 0xf2, 0x8f, 0x3b, 0x08, 0x0a, 0x96, 0xab, 760 0xbc, 0x58, 0x6d, 0x8d, 0xb4, 0x5b, 0xab, 0xbf, 0x5e, 0x6d, 0xa5, 0x5b, 0xf9, 0x0d, 0xd3, 0xb7, 761 0xd2, 0x69, 0xab, 0x1d, 0x82, 0x5c, 0xf7, 0x10, 0xe4, 0x3f, 0x1c, 0x82, 0x5c, 0xeb, 0x10, 0xbf, 762 0x17, 0x68, 0xe9, 0x81, 0x37, 0x54, 0xc5, 0x7e, 0x4c, 0xb7, 0x02, 0x75, 0x8c, 0xcf, 0xcf, 0xbc, 763 0xa1, 0x2a, 0x59, 0x24, 0xbb, 0xc1, 0xb4, 0x6a, 0x7a, 0xd4, 0x07, 0xde, 0xf0, 0x5e, 0x10, 0x8d, 764 0x2e, 0x3a, 0x56, 0x90, 0x25, 0x76, 0x87, 0xee, 0x04, 0x61, 0xa0, 0xed, 0x93, 0x9c, 0xe4, 0xed, 765 0xbf, 0xed, 0x93, 0x4d, 0x4b, 0xb7, 0x52, 0xe5, 0x6d, 0x07, 0x1a, 0x2a, 0x7f, 0x46, 0x77, 0x17, 766 0x7f, 0xd4, 0xde, 0xa5, 0xe4, 0xd4, 0xbf, 0x98, 0x7f, 0x1b, 0xa5, 0xce, 0xec, 0xd1, 0xbe, 0x4b, 767 0xd7, 0xbf, 0xf4, 0x06, 0x63, 0x5f, 0xe9, 0x5f, 0xf2, 0x69, 0x27, 0xfc, 0x83, 0x42, 0x0b, 0x97, 768 0x9f, 0xd2, 0x37, 0x96, 0xfc, 0xfe, 0xff, 0xdc, 0xb5, 0xf2, 0x0b, 0xa1, 0xeb, 0x8f, 0x02, 0xff, 769 0xd1, 0xb1, 0xcd, 0xf4, 0x5e, 0xe5, 0x7e, 0x66, 0x98, 0xe9, 0xdd, 0xca, 0xfd, 0xcc, 0x23, 0xd3, 770 0xfb, 0x15, 0x20, 0x2e, 0x10, 0xd5, 0xb1, 0x00, 0x69, 0x00, 0x51, 0x3d, 0x0b, 0x90, 0x26, 0x90, 771 0xa4, 0x6b, 0x29, 0x01, 0xd9, 0x07, 0x92, 0xf4, 0x2d, 0x5b, 0x40, 0x0e, 0xe0, 0x7a, 0x48, 0x3a, 772 0x17, 0x4b, 0xee, 0x2c, 0x38, 0x83, 0xa9, 0x2d, 0xfb, 0x23, 0xad, 0x99, 0xb1, 0xe4, 0x5d, 0xfd, 773 0xa3, 0x33, 0xfe, 0x25, 0x60, 0x8b, 0x43, 0xfb, 0x43, 0xbd, 0xef, 0xb1, 0xe4, 0x9d, 0x64, 0x0f, 774 0xf3, 0xda, 0xdc, 0xf5, 0xde, 0xd2, 0x5b, 0x23, 0x4b, 0xee, 0xe9, 0x05, 0x98, 0x56, 0xd6, 0xdb, 775 0x9b, 0xb4, 0x78, 0x3c, 0x7b, 0x3c, 0x6f, 0x5b, 0xb4, 0x94, 0x3c, 0x3d, 0x7d, 0x16, 0xb6, 0x1f, 776 0x5f, 0x4e, 0x38, 0xba, 0x9a, 0x70, 0xf4, 0x62, 0xc2, 0xd1, 0xcb, 0x09, 0x47, 0xaf, 0x26, 0x1c, 777 0xbd, 0x9e, 0x70, 0xfc, 0x3c, 0xe6, 0xf8, 0xa7, 0x98, 0xe3, 0x9f, 0x63, 0x8e, 0x2f, 0x63, 0x8e, 778 0xae, 0x62, 0x8e, 0xfe, 0x8c, 0x39, 0x7a, 0x19, 0x73, 0xf4, 0x2a, 0xe6, 0xe8, 0x75, 0xcc, 0xd1, 779 0xf3, 0x29, 0x47, 0xdf, 0x4d, 0x39, 0xfa, 0x61, 0xca, 0xd1, 0xd5, 0x94, 0xa3, 0x17, 0x53, 0x8e, 780 0x8e, 0x8a, 0xf3, 0x36, 0xd6, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xf3, 0xe2, 0x1f, 0x5d, 0x46, 781 0x0b, 0x00, 0x00, 782 } 783 784 func (m *BasicScalar) Copy() *BasicScalar { 785 if m == nil { 786 return nil 787 } 788 o := &BasicScalar{} 789 o.CopyFrom(m) 790 return o 791 } 792 793 func (m *BasicScalar) CopyFrom(src interface{}) { 794 795 o := src.(*BasicScalar) 796 *m = *o 797 if o.Field15 != nil { 798 m.Field15 = make([]byte, len(o.Field15)) 799 copy(m.Field15, o.Field15) 800 } 801 } 802 803 func (m *RepeatedScalar) Copy() *RepeatedScalar { 804 if m == nil { 805 return nil 806 } 807 o := &RepeatedScalar{} 808 o.CopyFrom(m) 809 return o 810 } 811 812 func (m *RepeatedScalar) CopyFrom(src interface{}) { 813 814 o := src.(*RepeatedScalar) 815 *m = *o 816 if o.Field1 != nil { 817 m.Field1 = make([]float64, len(o.Field1)) 818 copy(m.Field1, o.Field1) 819 } 820 821 if o.Field2 != nil { 822 m.Field2 = make([]float32, len(o.Field2)) 823 copy(m.Field2, o.Field2) 824 } 825 826 if o.Field3 != nil { 827 m.Field3 = make([]int32, len(o.Field3)) 828 copy(m.Field3, o.Field3) 829 } 830 831 if o.Field4 != nil { 832 m.Field4 = make([]int64, len(o.Field4)) 833 copy(m.Field4, o.Field4) 834 } 835 836 if o.Field5 != nil { 837 m.Field5 = make([]uint32, len(o.Field5)) 838 copy(m.Field5, o.Field5) 839 } 840 841 if o.Field6 != nil { 842 m.Field6 = make([]uint64, len(o.Field6)) 843 copy(m.Field6, o.Field6) 844 } 845 846 if o.Field7 != nil { 847 m.Field7 = make([]int32, len(o.Field7)) 848 copy(m.Field7, o.Field7) 849 } 850 851 if o.Field8 != nil { 852 m.Field8 = make([]int64, len(o.Field8)) 853 copy(m.Field8, o.Field8) 854 } 855 856 if o.Field9 != nil { 857 m.Field9 = make([]uint32, len(o.Field9)) 858 copy(m.Field9, o.Field9) 859 } 860 861 if o.Field10 != nil { 862 m.Field10 = make([]int32, len(o.Field10)) 863 copy(m.Field10, o.Field10) 864 } 865 866 if o.Field11 != nil { 867 m.Field11 = make([]uint64, len(o.Field11)) 868 copy(m.Field11, o.Field11) 869 } 870 871 if o.Field12 != nil { 872 m.Field12 = make([]int64, len(o.Field12)) 873 copy(m.Field12, o.Field12) 874 } 875 876 if o.Field13 != nil { 877 m.Field13 = make([]bool, len(o.Field13)) 878 copy(m.Field13, o.Field13) 879 } 880 881 if o.Field14 != nil { 882 m.Field14 = make([]string, len(o.Field14)) 883 copy(m.Field14, o.Field14) 884 } 885 886 if o.Field15 != nil { 887 m.Field15 = make([][]byte, len(o.Field15)) 888 for i := range m.Field15 { 889 if o.Field15[i] != nil { 890 m.Field15[i] = make([]byte, len(o.Field15[i])) 891 copy(m.Field15[i], o.Field15[i]) 892 } 893 } 894 } 895 896 } 897 898 func (m *RepeatedScalarPacked) Copy() *RepeatedScalarPacked { 899 if m == nil { 900 return nil 901 } 902 o := &RepeatedScalarPacked{} 903 o.CopyFrom(m) 904 return o 905 } 906 907 func (m *RepeatedScalarPacked) CopyFrom(src interface{}) { 908 909 o := src.(*RepeatedScalarPacked) 910 *m = *o 911 if o.Field1 != nil { 912 m.Field1 = make([]float64, len(o.Field1)) 913 copy(m.Field1, o.Field1) 914 } 915 916 if o.Field2 != nil { 917 m.Field2 = make([]float32, len(o.Field2)) 918 copy(m.Field2, o.Field2) 919 } 920 921 if o.Field3 != nil { 922 m.Field3 = make([]int32, len(o.Field3)) 923 copy(m.Field3, o.Field3) 924 } 925 926 if o.Field4 != nil { 927 m.Field4 = make([]int64, len(o.Field4)) 928 copy(m.Field4, o.Field4) 929 } 930 931 if o.Field5 != nil { 932 m.Field5 = make([]uint32, len(o.Field5)) 933 copy(m.Field5, o.Field5) 934 } 935 936 if o.Field6 != nil { 937 m.Field6 = make([]uint64, len(o.Field6)) 938 copy(m.Field6, o.Field6) 939 } 940 941 if o.Field7 != nil { 942 m.Field7 = make([]int32, len(o.Field7)) 943 copy(m.Field7, o.Field7) 944 } 945 946 if o.Field8 != nil { 947 m.Field8 = make([]int64, len(o.Field8)) 948 copy(m.Field8, o.Field8) 949 } 950 951 if o.Field9 != nil { 952 m.Field9 = make([]uint32, len(o.Field9)) 953 copy(m.Field9, o.Field9) 954 } 955 956 if o.Field10 != nil { 957 m.Field10 = make([]int32, len(o.Field10)) 958 copy(m.Field10, o.Field10) 959 } 960 961 if o.Field11 != nil { 962 m.Field11 = make([]uint64, len(o.Field11)) 963 copy(m.Field11, o.Field11) 964 } 965 966 if o.Field12 != nil { 967 m.Field12 = make([]int64, len(o.Field12)) 968 copy(m.Field12, o.Field12) 969 } 970 971 if o.Field13 != nil { 972 m.Field13 = make([]bool, len(o.Field13)) 973 copy(m.Field13, o.Field13) 974 } 975 976 } 977 978 func (m *ExternalStruct) Copy() *ExternalStruct { 979 if m == nil { 980 return nil 981 } 982 o := &ExternalStruct{} 983 o.CopyFrom(m) 984 return o 985 } 986 987 func (m *ExternalStruct) CopyFrom(src interface{}) { 988 989 o := src.(*ExternalStruct) 990 *m = *o 991 if o.Field1 != nil { 992 m.Field1 = &BasicScalar{} 993 github_com_docker_swarmkit_api_deepcopy.Copy(m.Field1, o.Field1) 994 } 995 if o.Field2 != nil { 996 m.Field2 = &RepeatedScalar{} 997 github_com_docker_swarmkit_api_deepcopy.Copy(m.Field2, o.Field2) 998 } 999 if o.Field3 != nil { 1000 m.Field3 = &RepeatedScalarPacked{} 1001 github_com_docker_swarmkit_api_deepcopy.Copy(m.Field3, o.Field3) 1002 } 1003 } 1004 1005 func (m *RepeatedExternalStruct) Copy() *RepeatedExternalStruct { 1006 if m == nil { 1007 return nil 1008 } 1009 o := &RepeatedExternalStruct{} 1010 o.CopyFrom(m) 1011 return o 1012 } 1013 1014 func (m *RepeatedExternalStruct) CopyFrom(src interface{}) { 1015 1016 o := src.(*RepeatedExternalStruct) 1017 *m = *o 1018 if o.Field1 != nil { 1019 m.Field1 = make([]*BasicScalar, len(o.Field1)) 1020 for i := range m.Field1 { 1021 m.Field1[i] = &BasicScalar{} 1022 github_com_docker_swarmkit_api_deepcopy.Copy(m.Field1[i], o.Field1[i]) 1023 } 1024 } 1025 1026 if o.Field2 != nil { 1027 m.Field2 = make([]*RepeatedScalar, len(o.Field2)) 1028 for i := range m.Field2 { 1029 m.Field2[i] = &RepeatedScalar{} 1030 github_com_docker_swarmkit_api_deepcopy.Copy(m.Field2[i], o.Field2[i]) 1031 } 1032 } 1033 1034 if o.Field3 != nil { 1035 m.Field3 = make([]*RepeatedScalarPacked, len(o.Field3)) 1036 for i := range m.Field3 { 1037 m.Field3[i] = &RepeatedScalarPacked{} 1038 github_com_docker_swarmkit_api_deepcopy.Copy(m.Field3[i], o.Field3[i]) 1039 } 1040 } 1041 1042 } 1043 1044 func (m *NonNullableExternalStruct) Copy() *NonNullableExternalStruct { 1045 if m == nil { 1046 return nil 1047 } 1048 o := &NonNullableExternalStruct{} 1049 o.CopyFrom(m) 1050 return o 1051 } 1052 1053 func (m *NonNullableExternalStruct) CopyFrom(src interface{}) { 1054 1055 o := src.(*NonNullableExternalStruct) 1056 *m = *o 1057 github_com_docker_swarmkit_api_deepcopy.Copy(&m.Field1, &o.Field1) 1058 github_com_docker_swarmkit_api_deepcopy.Copy(&m.Field2, &o.Field2) 1059 github_com_docker_swarmkit_api_deepcopy.Copy(&m.Field3, &o.Field3) 1060 } 1061 1062 func (m *RepeatedNonNullableExternalStruct) Copy() *RepeatedNonNullableExternalStruct { 1063 if m == nil { 1064 return nil 1065 } 1066 o := &RepeatedNonNullableExternalStruct{} 1067 o.CopyFrom(m) 1068 return o 1069 } 1070 1071 func (m *RepeatedNonNullableExternalStruct) CopyFrom(src interface{}) { 1072 1073 o := src.(*RepeatedNonNullableExternalStruct) 1074 *m = *o 1075 if o.Field1 != nil { 1076 m.Field1 = make([]BasicScalar, len(o.Field1)) 1077 for i := range m.Field1 { 1078 github_com_docker_swarmkit_api_deepcopy.Copy(&m.Field1[i], &o.Field1[i]) 1079 } 1080 } 1081 1082 if o.Field2 != nil { 1083 m.Field2 = make([]RepeatedScalar, len(o.Field2)) 1084 for i := range m.Field2 { 1085 github_com_docker_swarmkit_api_deepcopy.Copy(&m.Field2[i], &o.Field2[i]) 1086 } 1087 } 1088 1089 if o.Field3 != nil { 1090 m.Field3 = make([]RepeatedScalarPacked, len(o.Field3)) 1091 for i := range m.Field3 { 1092 github_com_docker_swarmkit_api_deepcopy.Copy(&m.Field3[i], &o.Field3[i]) 1093 } 1094 } 1095 1096 } 1097 1098 func (m *MapStruct) Copy() *MapStruct { 1099 if m == nil { 1100 return nil 1101 } 1102 o := &MapStruct{} 1103 o.CopyFrom(m) 1104 return o 1105 } 1106 1107 func (m *MapStruct) CopyFrom(src interface{}) { 1108 1109 o := src.(*MapStruct) 1110 *m = *o 1111 if o.NullableMap != nil { 1112 m.NullableMap = make(map[string]*BasicScalar, len(o.NullableMap)) 1113 for k, v := range o.NullableMap { 1114 m.NullableMap[k] = &BasicScalar{} 1115 github_com_docker_swarmkit_api_deepcopy.Copy(m.NullableMap[k], v) 1116 } 1117 } 1118 1119 if o.NonnullableMap != nil { 1120 m.NonnullableMap = make(map[string]BasicScalar, len(o.NonnullableMap)) 1121 for k, v := range o.NonnullableMap { 1122 n := BasicScalar{} 1123 github_com_docker_swarmkit_api_deepcopy.Copy(&n, &v) 1124 m.NonnullableMap[k] = n 1125 } 1126 } 1127 1128 } 1129 1130 func (m *OneOf) Copy() *OneOf { 1131 if m == nil { 1132 return nil 1133 } 1134 o := &OneOf{} 1135 o.CopyFrom(m) 1136 return o 1137 } 1138 1139 func (m *OneOf) CopyFrom(src interface{}) { 1140 1141 o := src.(*OneOf) 1142 *m = *o 1143 if o.Fields != nil { 1144 switch o.Fields.(type) { 1145 case *OneOf_Field1: 1146 v := OneOf_Field1{ 1147 Field1: o.GetField1(), 1148 } 1149 m.Fields = &v 1150 case *OneOf_Field2: 1151 v := OneOf_Field2{ 1152 Field2: o.GetField2(), 1153 } 1154 m.Fields = &v 1155 case *OneOf_Field3: 1156 v := OneOf_Field3{ 1157 Field3: o.GetField3(), 1158 } 1159 m.Fields = &v 1160 case *OneOf_Field4: 1161 v := OneOf_Field4{ 1162 Field4: o.GetField4(), 1163 } 1164 m.Fields = &v 1165 case *OneOf_Field5: 1166 v := OneOf_Field5{ 1167 Field5: o.GetField5(), 1168 } 1169 m.Fields = &v 1170 case *OneOf_Field6: 1171 v := OneOf_Field6{ 1172 Field6: o.GetField6(), 1173 } 1174 m.Fields = &v 1175 case *OneOf_Field7: 1176 v := OneOf_Field7{ 1177 Field7: make([]byte, len(o.GetField7())), 1178 } 1179 if o.GetField7() != nil { 1180 v.Field7 = make([]byte, len(o.GetField7())) 1181 copy(v.Field7, o.GetField7()) 1182 } 1183 m.Fields = &v 1184 case *OneOf_Field8: 1185 v := OneOf_Field8{ 1186 Field8: &MapStruct{}, 1187 } 1188 github_com_docker_swarmkit_api_deepcopy.Copy(v.Field8, o.GetField8()) 1189 m.Fields = &v 1190 case *OneOf_Field9: 1191 v := OneOf_Field9{ 1192 Field9: &RepeatedNonNullableExternalStruct{}, 1193 } 1194 github_com_docker_swarmkit_api_deepcopy.Copy(v.Field9, o.GetField9()) 1195 m.Fields = &v 1196 } 1197 } 1198 1199 if o.FieldsTwo != nil { 1200 switch o.FieldsTwo.(type) { 1201 case *OneOf_Field10: 1202 v := OneOf_Field10{ 1203 Field10: &NonNullableExternalStruct{}, 1204 } 1205 github_com_docker_swarmkit_api_deepcopy.Copy(v.Field10, o.GetField10()) 1206 m.FieldsTwo = &v 1207 case *OneOf_Field11: 1208 v := OneOf_Field11{ 1209 Field11: &RepeatedExternalStruct{}, 1210 } 1211 github_com_docker_swarmkit_api_deepcopy.Copy(v.Field11, o.GetField11()) 1212 m.FieldsTwo = &v 1213 } 1214 } 1215 1216 } 1217 1218 func (this *BasicScalar) Equal(that interface{}) bool { 1219 if that == nil { 1220 return this == nil 1221 } 1222 1223 that1, ok := that.(*BasicScalar) 1224 if !ok { 1225 that2, ok := that.(BasicScalar) 1226 if ok { 1227 that1 = &that2 1228 } else { 1229 return false 1230 } 1231 } 1232 if that1 == nil { 1233 return this == nil 1234 } else if this == nil { 1235 return false 1236 } 1237 if this.Field1 != that1.Field1 { 1238 return false 1239 } 1240 if this.Field2 != that1.Field2 { 1241 return false 1242 } 1243 if this.Field3 != that1.Field3 { 1244 return false 1245 } 1246 if this.Field4 != that1.Field4 { 1247 return false 1248 } 1249 if this.Field5 != that1.Field5 { 1250 return false 1251 } 1252 if this.Field6 != that1.Field6 { 1253 return false 1254 } 1255 if this.Field7 != that1.Field7 { 1256 return false 1257 } 1258 if this.Field8 != that1.Field8 { 1259 return false 1260 } 1261 if this.Field9 != that1.Field9 { 1262 return false 1263 } 1264 if this.Field10 != that1.Field10 { 1265 return false 1266 } 1267 if this.Field11 != that1.Field11 { 1268 return false 1269 } 1270 if this.Field12 != that1.Field12 { 1271 return false 1272 } 1273 if this.Field13 != that1.Field13 { 1274 return false 1275 } 1276 if this.Field14 != that1.Field14 { 1277 return false 1278 } 1279 if !bytes.Equal(this.Field15, that1.Field15) { 1280 return false 1281 } 1282 return true 1283 } 1284 func (this *RepeatedScalar) Equal(that interface{}) bool { 1285 if that == nil { 1286 return this == nil 1287 } 1288 1289 that1, ok := that.(*RepeatedScalar) 1290 if !ok { 1291 that2, ok := that.(RepeatedScalar) 1292 if ok { 1293 that1 = &that2 1294 } else { 1295 return false 1296 } 1297 } 1298 if that1 == nil { 1299 return this == nil 1300 } else if this == nil { 1301 return false 1302 } 1303 if len(this.Field1) != len(that1.Field1) { 1304 return false 1305 } 1306 for i := range this.Field1 { 1307 if this.Field1[i] != that1.Field1[i] { 1308 return false 1309 } 1310 } 1311 if len(this.Field2) != len(that1.Field2) { 1312 return false 1313 } 1314 for i := range this.Field2 { 1315 if this.Field2[i] != that1.Field2[i] { 1316 return false 1317 } 1318 } 1319 if len(this.Field3) != len(that1.Field3) { 1320 return false 1321 } 1322 for i := range this.Field3 { 1323 if this.Field3[i] != that1.Field3[i] { 1324 return false 1325 } 1326 } 1327 if len(this.Field4) != len(that1.Field4) { 1328 return false 1329 } 1330 for i := range this.Field4 { 1331 if this.Field4[i] != that1.Field4[i] { 1332 return false 1333 } 1334 } 1335 if len(this.Field5) != len(that1.Field5) { 1336 return false 1337 } 1338 for i := range this.Field5 { 1339 if this.Field5[i] != that1.Field5[i] { 1340 return false 1341 } 1342 } 1343 if len(this.Field6) != len(that1.Field6) { 1344 return false 1345 } 1346 for i := range this.Field6 { 1347 if this.Field6[i] != that1.Field6[i] { 1348 return false 1349 } 1350 } 1351 if len(this.Field7) != len(that1.Field7) { 1352 return false 1353 } 1354 for i := range this.Field7 { 1355 if this.Field7[i] != that1.Field7[i] { 1356 return false 1357 } 1358 } 1359 if len(this.Field8) != len(that1.Field8) { 1360 return false 1361 } 1362 for i := range this.Field8 { 1363 if this.Field8[i] != that1.Field8[i] { 1364 return false 1365 } 1366 } 1367 if len(this.Field9) != len(that1.Field9) { 1368 return false 1369 } 1370 for i := range this.Field9 { 1371 if this.Field9[i] != that1.Field9[i] { 1372 return false 1373 } 1374 } 1375 if len(this.Field10) != len(that1.Field10) { 1376 return false 1377 } 1378 for i := range this.Field10 { 1379 if this.Field10[i] != that1.Field10[i] { 1380 return false 1381 } 1382 } 1383 if len(this.Field11) != len(that1.Field11) { 1384 return false 1385 } 1386 for i := range this.Field11 { 1387 if this.Field11[i] != that1.Field11[i] { 1388 return false 1389 } 1390 } 1391 if len(this.Field12) != len(that1.Field12) { 1392 return false 1393 } 1394 for i := range this.Field12 { 1395 if this.Field12[i] != that1.Field12[i] { 1396 return false 1397 } 1398 } 1399 if len(this.Field13) != len(that1.Field13) { 1400 return false 1401 } 1402 for i := range this.Field13 { 1403 if this.Field13[i] != that1.Field13[i] { 1404 return false 1405 } 1406 } 1407 if len(this.Field14) != len(that1.Field14) { 1408 return false 1409 } 1410 for i := range this.Field14 { 1411 if this.Field14[i] != that1.Field14[i] { 1412 return false 1413 } 1414 } 1415 if len(this.Field15) != len(that1.Field15) { 1416 return false 1417 } 1418 for i := range this.Field15 { 1419 if !bytes.Equal(this.Field15[i], that1.Field15[i]) { 1420 return false 1421 } 1422 } 1423 return true 1424 } 1425 func (this *RepeatedScalarPacked) Equal(that interface{}) bool { 1426 if that == nil { 1427 return this == nil 1428 } 1429 1430 that1, ok := that.(*RepeatedScalarPacked) 1431 if !ok { 1432 that2, ok := that.(RepeatedScalarPacked) 1433 if ok { 1434 that1 = &that2 1435 } else { 1436 return false 1437 } 1438 } 1439 if that1 == nil { 1440 return this == nil 1441 } else if this == nil { 1442 return false 1443 } 1444 if len(this.Field1) != len(that1.Field1) { 1445 return false 1446 } 1447 for i := range this.Field1 { 1448 if this.Field1[i] != that1.Field1[i] { 1449 return false 1450 } 1451 } 1452 if len(this.Field2) != len(that1.Field2) { 1453 return false 1454 } 1455 for i := range this.Field2 { 1456 if this.Field2[i] != that1.Field2[i] { 1457 return false 1458 } 1459 } 1460 if len(this.Field3) != len(that1.Field3) { 1461 return false 1462 } 1463 for i := range this.Field3 { 1464 if this.Field3[i] != that1.Field3[i] { 1465 return false 1466 } 1467 } 1468 if len(this.Field4) != len(that1.Field4) { 1469 return false 1470 } 1471 for i := range this.Field4 { 1472 if this.Field4[i] != that1.Field4[i] { 1473 return false 1474 } 1475 } 1476 if len(this.Field5) != len(that1.Field5) { 1477 return false 1478 } 1479 for i := range this.Field5 { 1480 if this.Field5[i] != that1.Field5[i] { 1481 return false 1482 } 1483 } 1484 if len(this.Field6) != len(that1.Field6) { 1485 return false 1486 } 1487 for i := range this.Field6 { 1488 if this.Field6[i] != that1.Field6[i] { 1489 return false 1490 } 1491 } 1492 if len(this.Field7) != len(that1.Field7) { 1493 return false 1494 } 1495 for i := range this.Field7 { 1496 if this.Field7[i] != that1.Field7[i] { 1497 return false 1498 } 1499 } 1500 if len(this.Field8) != len(that1.Field8) { 1501 return false 1502 } 1503 for i := range this.Field8 { 1504 if this.Field8[i] != that1.Field8[i] { 1505 return false 1506 } 1507 } 1508 if len(this.Field9) != len(that1.Field9) { 1509 return false 1510 } 1511 for i := range this.Field9 { 1512 if this.Field9[i] != that1.Field9[i] { 1513 return false 1514 } 1515 } 1516 if len(this.Field10) != len(that1.Field10) { 1517 return false 1518 } 1519 for i := range this.Field10 { 1520 if this.Field10[i] != that1.Field10[i] { 1521 return false 1522 } 1523 } 1524 if len(this.Field11) != len(that1.Field11) { 1525 return false 1526 } 1527 for i := range this.Field11 { 1528 if this.Field11[i] != that1.Field11[i] { 1529 return false 1530 } 1531 } 1532 if len(this.Field12) != len(that1.Field12) { 1533 return false 1534 } 1535 for i := range this.Field12 { 1536 if this.Field12[i] != that1.Field12[i] { 1537 return false 1538 } 1539 } 1540 if len(this.Field13) != len(that1.Field13) { 1541 return false 1542 } 1543 for i := range this.Field13 { 1544 if this.Field13[i] != that1.Field13[i] { 1545 return false 1546 } 1547 } 1548 return true 1549 } 1550 func (this *ExternalStruct) Equal(that interface{}) bool { 1551 if that == nil { 1552 return this == nil 1553 } 1554 1555 that1, ok := that.(*ExternalStruct) 1556 if !ok { 1557 that2, ok := that.(ExternalStruct) 1558 if ok { 1559 that1 = &that2 1560 } else { 1561 return false 1562 } 1563 } 1564 if that1 == nil { 1565 return this == nil 1566 } else if this == nil { 1567 return false 1568 } 1569 if !this.Field1.Equal(that1.Field1) { 1570 return false 1571 } 1572 if !this.Field2.Equal(that1.Field2) { 1573 return false 1574 } 1575 if !this.Field3.Equal(that1.Field3) { 1576 return false 1577 } 1578 return true 1579 } 1580 func (this *RepeatedExternalStruct) Equal(that interface{}) bool { 1581 if that == nil { 1582 return this == nil 1583 } 1584 1585 that1, ok := that.(*RepeatedExternalStruct) 1586 if !ok { 1587 that2, ok := that.(RepeatedExternalStruct) 1588 if ok { 1589 that1 = &that2 1590 } else { 1591 return false 1592 } 1593 } 1594 if that1 == nil { 1595 return this == nil 1596 } else if this == nil { 1597 return false 1598 } 1599 if len(this.Field1) != len(that1.Field1) { 1600 return false 1601 } 1602 for i := range this.Field1 { 1603 if !this.Field1[i].Equal(that1.Field1[i]) { 1604 return false 1605 } 1606 } 1607 if len(this.Field2) != len(that1.Field2) { 1608 return false 1609 } 1610 for i := range this.Field2 { 1611 if !this.Field2[i].Equal(that1.Field2[i]) { 1612 return false 1613 } 1614 } 1615 if len(this.Field3) != len(that1.Field3) { 1616 return false 1617 } 1618 for i := range this.Field3 { 1619 if !this.Field3[i].Equal(that1.Field3[i]) { 1620 return false 1621 } 1622 } 1623 return true 1624 } 1625 func (this *NonNullableExternalStruct) Equal(that interface{}) bool { 1626 if that == nil { 1627 return this == nil 1628 } 1629 1630 that1, ok := that.(*NonNullableExternalStruct) 1631 if !ok { 1632 that2, ok := that.(NonNullableExternalStruct) 1633 if ok { 1634 that1 = &that2 1635 } else { 1636 return false 1637 } 1638 } 1639 if that1 == nil { 1640 return this == nil 1641 } else if this == nil { 1642 return false 1643 } 1644 if !this.Field1.Equal(&that1.Field1) { 1645 return false 1646 } 1647 if !this.Field2.Equal(&that1.Field2) { 1648 return false 1649 } 1650 if !this.Field3.Equal(&that1.Field3) { 1651 return false 1652 } 1653 return true 1654 } 1655 func (this *RepeatedNonNullableExternalStruct) Equal(that interface{}) bool { 1656 if that == nil { 1657 return this == nil 1658 } 1659 1660 that1, ok := that.(*RepeatedNonNullableExternalStruct) 1661 if !ok { 1662 that2, ok := that.(RepeatedNonNullableExternalStruct) 1663 if ok { 1664 that1 = &that2 1665 } else { 1666 return false 1667 } 1668 } 1669 if that1 == nil { 1670 return this == nil 1671 } else if this == nil { 1672 return false 1673 } 1674 if len(this.Field1) != len(that1.Field1) { 1675 return false 1676 } 1677 for i := range this.Field1 { 1678 if !this.Field1[i].Equal(&that1.Field1[i]) { 1679 return false 1680 } 1681 } 1682 if len(this.Field2) != len(that1.Field2) { 1683 return false 1684 } 1685 for i := range this.Field2 { 1686 if !this.Field2[i].Equal(&that1.Field2[i]) { 1687 return false 1688 } 1689 } 1690 if len(this.Field3) != len(that1.Field3) { 1691 return false 1692 } 1693 for i := range this.Field3 { 1694 if !this.Field3[i].Equal(&that1.Field3[i]) { 1695 return false 1696 } 1697 } 1698 return true 1699 } 1700 func (this *MapStruct) Equal(that interface{}) bool { 1701 if that == nil { 1702 return this == nil 1703 } 1704 1705 that1, ok := that.(*MapStruct) 1706 if !ok { 1707 that2, ok := that.(MapStruct) 1708 if ok { 1709 that1 = &that2 1710 } else { 1711 return false 1712 } 1713 } 1714 if that1 == nil { 1715 return this == nil 1716 } else if this == nil { 1717 return false 1718 } 1719 if len(this.NullableMap) != len(that1.NullableMap) { 1720 return false 1721 } 1722 for i := range this.NullableMap { 1723 if !this.NullableMap[i].Equal(that1.NullableMap[i]) { 1724 return false 1725 } 1726 } 1727 if len(this.NonnullableMap) != len(that1.NonnullableMap) { 1728 return false 1729 } 1730 for i := range this.NonnullableMap { 1731 a := this.NonnullableMap[i] 1732 b := that1.NonnullableMap[i] 1733 if !(&a).Equal(&b) { 1734 return false 1735 } 1736 } 1737 return true 1738 } 1739 func (this *OneOf) Equal(that interface{}) bool { 1740 if that == nil { 1741 return this == nil 1742 } 1743 1744 that1, ok := that.(*OneOf) 1745 if !ok { 1746 that2, ok := that.(OneOf) 1747 if ok { 1748 that1 = &that2 1749 } else { 1750 return false 1751 } 1752 } 1753 if that1 == nil { 1754 return this == nil 1755 } else if this == nil { 1756 return false 1757 } 1758 if that1.Fields == nil { 1759 if this.Fields != nil { 1760 return false 1761 } 1762 } else if this.Fields == nil { 1763 return false 1764 } else if !this.Fields.Equal(that1.Fields) { 1765 return false 1766 } 1767 if that1.FieldsTwo == nil { 1768 if this.FieldsTwo != nil { 1769 return false 1770 } 1771 } else if this.FieldsTwo == nil { 1772 return false 1773 } else if !this.FieldsTwo.Equal(that1.FieldsTwo) { 1774 return false 1775 } 1776 return true 1777 } 1778 func (this *OneOf_Field1) Equal(that interface{}) bool { 1779 if that == nil { 1780 return this == nil 1781 } 1782 1783 that1, ok := that.(*OneOf_Field1) 1784 if !ok { 1785 that2, ok := that.(OneOf_Field1) 1786 if ok { 1787 that1 = &that2 1788 } else { 1789 return false 1790 } 1791 } 1792 if that1 == nil { 1793 return this == nil 1794 } else if this == nil { 1795 return false 1796 } 1797 if this.Field1 != that1.Field1 { 1798 return false 1799 } 1800 return true 1801 } 1802 func (this *OneOf_Field2) Equal(that interface{}) bool { 1803 if that == nil { 1804 return this == nil 1805 } 1806 1807 that1, ok := that.(*OneOf_Field2) 1808 if !ok { 1809 that2, ok := that.(OneOf_Field2) 1810 if ok { 1811 that1 = &that2 1812 } else { 1813 return false 1814 } 1815 } 1816 if that1 == nil { 1817 return this == nil 1818 } else if this == nil { 1819 return false 1820 } 1821 if this.Field2 != that1.Field2 { 1822 return false 1823 } 1824 return true 1825 } 1826 func (this *OneOf_Field3) Equal(that interface{}) bool { 1827 if that == nil { 1828 return this == nil 1829 } 1830 1831 that1, ok := that.(*OneOf_Field3) 1832 if !ok { 1833 that2, ok := that.(OneOf_Field3) 1834 if ok { 1835 that1 = &that2 1836 } else { 1837 return false 1838 } 1839 } 1840 if that1 == nil { 1841 return this == nil 1842 } else if this == nil { 1843 return false 1844 } 1845 if this.Field3 != that1.Field3 { 1846 return false 1847 } 1848 return true 1849 } 1850 func (this *OneOf_Field4) Equal(that interface{}) bool { 1851 if that == nil { 1852 return this == nil 1853 } 1854 1855 that1, ok := that.(*OneOf_Field4) 1856 if !ok { 1857 that2, ok := that.(OneOf_Field4) 1858 if ok { 1859 that1 = &that2 1860 } else { 1861 return false 1862 } 1863 } 1864 if that1 == nil { 1865 return this == nil 1866 } else if this == nil { 1867 return false 1868 } 1869 if this.Field4 != that1.Field4 { 1870 return false 1871 } 1872 return true 1873 } 1874 func (this *OneOf_Field5) Equal(that interface{}) bool { 1875 if that == nil { 1876 return this == nil 1877 } 1878 1879 that1, ok := that.(*OneOf_Field5) 1880 if !ok { 1881 that2, ok := that.(OneOf_Field5) 1882 if ok { 1883 that1 = &that2 1884 } else { 1885 return false 1886 } 1887 } 1888 if that1 == nil { 1889 return this == nil 1890 } else if this == nil { 1891 return false 1892 } 1893 if this.Field5 != that1.Field5 { 1894 return false 1895 } 1896 return true 1897 } 1898 func (this *OneOf_Field6) Equal(that interface{}) bool { 1899 if that == nil { 1900 return this == nil 1901 } 1902 1903 that1, ok := that.(*OneOf_Field6) 1904 if !ok { 1905 that2, ok := that.(OneOf_Field6) 1906 if ok { 1907 that1 = &that2 1908 } else { 1909 return false 1910 } 1911 } 1912 if that1 == nil { 1913 return this == nil 1914 } else if this == nil { 1915 return false 1916 } 1917 if this.Field6 != that1.Field6 { 1918 return false 1919 } 1920 return true 1921 } 1922 func (this *OneOf_Field7) Equal(that interface{}) bool { 1923 if that == nil { 1924 return this == nil 1925 } 1926 1927 that1, ok := that.(*OneOf_Field7) 1928 if !ok { 1929 that2, ok := that.(OneOf_Field7) 1930 if ok { 1931 that1 = &that2 1932 } else { 1933 return false 1934 } 1935 } 1936 if that1 == nil { 1937 return this == nil 1938 } else if this == nil { 1939 return false 1940 } 1941 if !bytes.Equal(this.Field7, that1.Field7) { 1942 return false 1943 } 1944 return true 1945 } 1946 func (this *OneOf_Field8) Equal(that interface{}) bool { 1947 if that == nil { 1948 return this == nil 1949 } 1950 1951 that1, ok := that.(*OneOf_Field8) 1952 if !ok { 1953 that2, ok := that.(OneOf_Field8) 1954 if ok { 1955 that1 = &that2 1956 } else { 1957 return false 1958 } 1959 } 1960 if that1 == nil { 1961 return this == nil 1962 } else if this == nil { 1963 return false 1964 } 1965 if !this.Field8.Equal(that1.Field8) { 1966 return false 1967 } 1968 return true 1969 } 1970 func (this *OneOf_Field9) Equal(that interface{}) bool { 1971 if that == nil { 1972 return this == nil 1973 } 1974 1975 that1, ok := that.(*OneOf_Field9) 1976 if !ok { 1977 that2, ok := that.(OneOf_Field9) 1978 if ok { 1979 that1 = &that2 1980 } else { 1981 return false 1982 } 1983 } 1984 if that1 == nil { 1985 return this == nil 1986 } else if this == nil { 1987 return false 1988 } 1989 if !this.Field9.Equal(that1.Field9) { 1990 return false 1991 } 1992 return true 1993 } 1994 func (this *OneOf_Field10) Equal(that interface{}) bool { 1995 if that == nil { 1996 return this == nil 1997 } 1998 1999 that1, ok := that.(*OneOf_Field10) 2000 if !ok { 2001 that2, ok := that.(OneOf_Field10) 2002 if ok { 2003 that1 = &that2 2004 } else { 2005 return false 2006 } 2007 } 2008 if that1 == nil { 2009 return this == nil 2010 } else if this == nil { 2011 return false 2012 } 2013 if !this.Field10.Equal(that1.Field10) { 2014 return false 2015 } 2016 return true 2017 } 2018 func (this *OneOf_Field11) Equal(that interface{}) bool { 2019 if that == nil { 2020 return this == nil 2021 } 2022 2023 that1, ok := that.(*OneOf_Field11) 2024 if !ok { 2025 that2, ok := that.(OneOf_Field11) 2026 if ok { 2027 that1 = &that2 2028 } else { 2029 return false 2030 } 2031 } 2032 if that1 == nil { 2033 return this == nil 2034 } else if this == nil { 2035 return false 2036 } 2037 if !this.Field11.Equal(that1.Field11) { 2038 return false 2039 } 2040 return true 2041 } 2042 func NewPopulatedBasicScalar(r randyDeepcopy, easy bool) *BasicScalar { 2043 this := &BasicScalar{} 2044 this.Field1 = float64(r.Float64()) 2045 if r.Intn(2) == 0 { 2046 this.Field1 *= -1 2047 } 2048 this.Field2 = float32(r.Float32()) 2049 if r.Intn(2) == 0 { 2050 this.Field2 *= -1 2051 } 2052 this.Field3 = int32(r.Int31()) 2053 if r.Intn(2) == 0 { 2054 this.Field3 *= -1 2055 } 2056 this.Field4 = int64(r.Int63()) 2057 if r.Intn(2) == 0 { 2058 this.Field4 *= -1 2059 } 2060 this.Field5 = uint32(r.Uint32()) 2061 this.Field6 = uint64(uint64(r.Uint32())) 2062 this.Field7 = int32(r.Int31()) 2063 if r.Intn(2) == 0 { 2064 this.Field7 *= -1 2065 } 2066 this.Field8 = int64(r.Int63()) 2067 if r.Intn(2) == 0 { 2068 this.Field8 *= -1 2069 } 2070 this.Field9 = uint32(r.Uint32()) 2071 this.Field10 = int32(r.Int31()) 2072 if r.Intn(2) == 0 { 2073 this.Field10 *= -1 2074 } 2075 this.Field11 = uint64(uint64(r.Uint32())) 2076 this.Field12 = int64(r.Int63()) 2077 if r.Intn(2) == 0 { 2078 this.Field12 *= -1 2079 } 2080 this.Field13 = bool(bool(r.Intn(2) == 0)) 2081 this.Field14 = string(randStringDeepcopy(r)) 2082 v1 := r.Intn(100) 2083 this.Field15 = make([]byte, v1) 2084 for i := 0; i < v1; i++ { 2085 this.Field15[i] = byte(r.Intn(256)) 2086 } 2087 if !easy && r.Intn(10) != 0 { 2088 } 2089 return this 2090 } 2091 2092 func NewPopulatedRepeatedScalar(r randyDeepcopy, easy bool) *RepeatedScalar { 2093 this := &RepeatedScalar{} 2094 v2 := r.Intn(10) 2095 this.Field1 = make([]float64, v2) 2096 for i := 0; i < v2; i++ { 2097 this.Field1[i] = float64(r.Float64()) 2098 if r.Intn(2) == 0 { 2099 this.Field1[i] *= -1 2100 } 2101 } 2102 v3 := r.Intn(10) 2103 this.Field2 = make([]float32, v3) 2104 for i := 0; i < v3; i++ { 2105 this.Field2[i] = float32(r.Float32()) 2106 if r.Intn(2) == 0 { 2107 this.Field2[i] *= -1 2108 } 2109 } 2110 v4 := r.Intn(10) 2111 this.Field3 = make([]int32, v4) 2112 for i := 0; i < v4; i++ { 2113 this.Field3[i] = int32(r.Int31()) 2114 if r.Intn(2) == 0 { 2115 this.Field3[i] *= -1 2116 } 2117 } 2118 v5 := r.Intn(10) 2119 this.Field4 = make([]int64, v5) 2120 for i := 0; i < v5; i++ { 2121 this.Field4[i] = int64(r.Int63()) 2122 if r.Intn(2) == 0 { 2123 this.Field4[i] *= -1 2124 } 2125 } 2126 v6 := r.Intn(10) 2127 this.Field5 = make([]uint32, v6) 2128 for i := 0; i < v6; i++ { 2129 this.Field5[i] = uint32(r.Uint32()) 2130 } 2131 v7 := r.Intn(10) 2132 this.Field6 = make([]uint64, v7) 2133 for i := 0; i < v7; i++ { 2134 this.Field6[i] = uint64(uint64(r.Uint32())) 2135 } 2136 v8 := r.Intn(10) 2137 this.Field7 = make([]int32, v8) 2138 for i := 0; i < v8; i++ { 2139 this.Field7[i] = int32(r.Int31()) 2140 if r.Intn(2) == 0 { 2141 this.Field7[i] *= -1 2142 } 2143 } 2144 v9 := r.Intn(10) 2145 this.Field8 = make([]int64, v9) 2146 for i := 0; i < v9; i++ { 2147 this.Field8[i] = int64(r.Int63()) 2148 if r.Intn(2) == 0 { 2149 this.Field8[i] *= -1 2150 } 2151 } 2152 v10 := r.Intn(10) 2153 this.Field9 = make([]uint32, v10) 2154 for i := 0; i < v10; i++ { 2155 this.Field9[i] = uint32(r.Uint32()) 2156 } 2157 v11 := r.Intn(10) 2158 this.Field10 = make([]int32, v11) 2159 for i := 0; i < v11; i++ { 2160 this.Field10[i] = int32(r.Int31()) 2161 if r.Intn(2) == 0 { 2162 this.Field10[i] *= -1 2163 } 2164 } 2165 v12 := r.Intn(10) 2166 this.Field11 = make([]uint64, v12) 2167 for i := 0; i < v12; i++ { 2168 this.Field11[i] = uint64(uint64(r.Uint32())) 2169 } 2170 v13 := r.Intn(10) 2171 this.Field12 = make([]int64, v13) 2172 for i := 0; i < v13; i++ { 2173 this.Field12[i] = int64(r.Int63()) 2174 if r.Intn(2) == 0 { 2175 this.Field12[i] *= -1 2176 } 2177 } 2178 v14 := r.Intn(10) 2179 this.Field13 = make([]bool, v14) 2180 for i := 0; i < v14; i++ { 2181 this.Field13[i] = bool(bool(r.Intn(2) == 0)) 2182 } 2183 v15 := r.Intn(10) 2184 this.Field14 = make([]string, v15) 2185 for i := 0; i < v15; i++ { 2186 this.Field14[i] = string(randStringDeepcopy(r)) 2187 } 2188 v16 := r.Intn(10) 2189 this.Field15 = make([][]byte, v16) 2190 for i := 0; i < v16; i++ { 2191 v17 := r.Intn(100) 2192 this.Field15[i] = make([]byte, v17) 2193 for j := 0; j < v17; j++ { 2194 this.Field15[i][j] = byte(r.Intn(256)) 2195 } 2196 } 2197 if !easy && r.Intn(10) != 0 { 2198 } 2199 return this 2200 } 2201 2202 func NewPopulatedRepeatedScalarPacked(r randyDeepcopy, easy bool) *RepeatedScalarPacked { 2203 this := &RepeatedScalarPacked{} 2204 v18 := r.Intn(10) 2205 this.Field1 = make([]float64, v18) 2206 for i := 0; i < v18; i++ { 2207 this.Field1[i] = float64(r.Float64()) 2208 if r.Intn(2) == 0 { 2209 this.Field1[i] *= -1 2210 } 2211 } 2212 v19 := r.Intn(10) 2213 this.Field2 = make([]float32, v19) 2214 for i := 0; i < v19; i++ { 2215 this.Field2[i] = float32(r.Float32()) 2216 if r.Intn(2) == 0 { 2217 this.Field2[i] *= -1 2218 } 2219 } 2220 v20 := r.Intn(10) 2221 this.Field3 = make([]int32, v20) 2222 for i := 0; i < v20; i++ { 2223 this.Field3[i] = int32(r.Int31()) 2224 if r.Intn(2) == 0 { 2225 this.Field3[i] *= -1 2226 } 2227 } 2228 v21 := r.Intn(10) 2229 this.Field4 = make([]int64, v21) 2230 for i := 0; i < v21; i++ { 2231 this.Field4[i] = int64(r.Int63()) 2232 if r.Intn(2) == 0 { 2233 this.Field4[i] *= -1 2234 } 2235 } 2236 v22 := r.Intn(10) 2237 this.Field5 = make([]uint32, v22) 2238 for i := 0; i < v22; i++ { 2239 this.Field5[i] = uint32(r.Uint32()) 2240 } 2241 v23 := r.Intn(10) 2242 this.Field6 = make([]uint64, v23) 2243 for i := 0; i < v23; i++ { 2244 this.Field6[i] = uint64(uint64(r.Uint32())) 2245 } 2246 v24 := r.Intn(10) 2247 this.Field7 = make([]int32, v24) 2248 for i := 0; i < v24; i++ { 2249 this.Field7[i] = int32(r.Int31()) 2250 if r.Intn(2) == 0 { 2251 this.Field7[i] *= -1 2252 } 2253 } 2254 v25 := r.Intn(10) 2255 this.Field8 = make([]int64, v25) 2256 for i := 0; i < v25; i++ { 2257 this.Field8[i] = int64(r.Int63()) 2258 if r.Intn(2) == 0 { 2259 this.Field8[i] *= -1 2260 } 2261 } 2262 v26 := r.Intn(10) 2263 this.Field9 = make([]uint32, v26) 2264 for i := 0; i < v26; i++ { 2265 this.Field9[i] = uint32(r.Uint32()) 2266 } 2267 v27 := r.Intn(10) 2268 this.Field10 = make([]int32, v27) 2269 for i := 0; i < v27; i++ { 2270 this.Field10[i] = int32(r.Int31()) 2271 if r.Intn(2) == 0 { 2272 this.Field10[i] *= -1 2273 } 2274 } 2275 v28 := r.Intn(10) 2276 this.Field11 = make([]uint64, v28) 2277 for i := 0; i < v28; i++ { 2278 this.Field11[i] = uint64(uint64(r.Uint32())) 2279 } 2280 v29 := r.Intn(10) 2281 this.Field12 = make([]int64, v29) 2282 for i := 0; i < v29; i++ { 2283 this.Field12[i] = int64(r.Int63()) 2284 if r.Intn(2) == 0 { 2285 this.Field12[i] *= -1 2286 } 2287 } 2288 v30 := r.Intn(10) 2289 this.Field13 = make([]bool, v30) 2290 for i := 0; i < v30; i++ { 2291 this.Field13[i] = bool(bool(r.Intn(2) == 0)) 2292 } 2293 if !easy && r.Intn(10) != 0 { 2294 } 2295 return this 2296 } 2297 2298 func NewPopulatedExternalStruct(r randyDeepcopy, easy bool) *ExternalStruct { 2299 this := &ExternalStruct{} 2300 if r.Intn(10) != 0 { 2301 this.Field1 = NewPopulatedBasicScalar(r, easy) 2302 } 2303 if r.Intn(10) != 0 { 2304 this.Field2 = NewPopulatedRepeatedScalar(r, easy) 2305 } 2306 if r.Intn(10) != 0 { 2307 this.Field3 = NewPopulatedRepeatedScalarPacked(r, easy) 2308 } 2309 if !easy && r.Intn(10) != 0 { 2310 } 2311 return this 2312 } 2313 2314 func NewPopulatedRepeatedExternalStruct(r randyDeepcopy, easy bool) *RepeatedExternalStruct { 2315 this := &RepeatedExternalStruct{} 2316 if r.Intn(10) != 0 { 2317 v31 := r.Intn(5) 2318 this.Field1 = make([]*BasicScalar, v31) 2319 for i := 0; i < v31; i++ { 2320 this.Field1[i] = NewPopulatedBasicScalar(r, easy) 2321 } 2322 } 2323 if r.Intn(10) != 0 { 2324 v32 := r.Intn(5) 2325 this.Field2 = make([]*RepeatedScalar, v32) 2326 for i := 0; i < v32; i++ { 2327 this.Field2[i] = NewPopulatedRepeatedScalar(r, easy) 2328 } 2329 } 2330 if r.Intn(10) != 0 { 2331 v33 := r.Intn(5) 2332 this.Field3 = make([]*RepeatedScalarPacked, v33) 2333 for i := 0; i < v33; i++ { 2334 this.Field3[i] = NewPopulatedRepeatedScalarPacked(r, easy) 2335 } 2336 } 2337 if !easy && r.Intn(10) != 0 { 2338 } 2339 return this 2340 } 2341 2342 func NewPopulatedNonNullableExternalStruct(r randyDeepcopy, easy bool) *NonNullableExternalStruct { 2343 this := &NonNullableExternalStruct{} 2344 v34 := NewPopulatedBasicScalar(r, easy) 2345 this.Field1 = *v34 2346 v35 := NewPopulatedRepeatedScalar(r, easy) 2347 this.Field2 = *v35 2348 v36 := NewPopulatedRepeatedScalarPacked(r, easy) 2349 this.Field3 = *v36 2350 if !easy && r.Intn(10) != 0 { 2351 } 2352 return this 2353 } 2354 2355 func NewPopulatedRepeatedNonNullableExternalStruct(r randyDeepcopy, easy bool) *RepeatedNonNullableExternalStruct { 2356 this := &RepeatedNonNullableExternalStruct{} 2357 if r.Intn(10) != 0 { 2358 v37 := r.Intn(5) 2359 this.Field1 = make([]BasicScalar, v37) 2360 for i := 0; i < v37; i++ { 2361 v38 := NewPopulatedBasicScalar(r, easy) 2362 this.Field1[i] = *v38 2363 } 2364 } 2365 if r.Intn(10) != 0 { 2366 v39 := r.Intn(5) 2367 this.Field2 = make([]RepeatedScalar, v39) 2368 for i := 0; i < v39; i++ { 2369 v40 := NewPopulatedRepeatedScalar(r, easy) 2370 this.Field2[i] = *v40 2371 } 2372 } 2373 if r.Intn(10) != 0 { 2374 v41 := r.Intn(5) 2375 this.Field3 = make([]RepeatedScalarPacked, v41) 2376 for i := 0; i < v41; i++ { 2377 v42 := NewPopulatedRepeatedScalarPacked(r, easy) 2378 this.Field3[i] = *v42 2379 } 2380 } 2381 if !easy && r.Intn(10) != 0 { 2382 } 2383 return this 2384 } 2385 2386 func NewPopulatedMapStruct(r randyDeepcopy, easy bool) *MapStruct { 2387 this := &MapStruct{} 2388 if r.Intn(10) != 0 { 2389 v43 := r.Intn(10) 2390 this.NullableMap = make(map[string]*BasicScalar) 2391 for i := 0; i < v43; i++ { 2392 this.NullableMap[randStringDeepcopy(r)] = NewPopulatedBasicScalar(r, easy) 2393 } 2394 } 2395 if r.Intn(10) != 0 { 2396 v44 := r.Intn(10) 2397 this.NonnullableMap = make(map[string]BasicScalar) 2398 for i := 0; i < v44; i++ { 2399 this.NonnullableMap[randStringDeepcopy(r)] = *NewPopulatedBasicScalar(r, easy) 2400 } 2401 } 2402 if !easy && r.Intn(10) != 0 { 2403 } 2404 return this 2405 } 2406 2407 func NewPopulatedOneOf(r randyDeepcopy, easy bool) *OneOf { 2408 this := &OneOf{} 2409 oneofNumber_Fields := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9}[r.Intn(9)] 2410 switch oneofNumber_Fields { 2411 case 1: 2412 this.Fields = NewPopulatedOneOf_Field1(r, easy) 2413 case 2: 2414 this.Fields = NewPopulatedOneOf_Field2(r, easy) 2415 case 3: 2416 this.Fields = NewPopulatedOneOf_Field3(r, easy) 2417 case 4: 2418 this.Fields = NewPopulatedOneOf_Field4(r, easy) 2419 case 5: 2420 this.Fields = NewPopulatedOneOf_Field5(r, easy) 2421 case 6: 2422 this.Fields = NewPopulatedOneOf_Field6(r, easy) 2423 case 7: 2424 this.Fields = NewPopulatedOneOf_Field7(r, easy) 2425 case 8: 2426 this.Fields = NewPopulatedOneOf_Field8(r, easy) 2427 case 9: 2428 this.Fields = NewPopulatedOneOf_Field9(r, easy) 2429 } 2430 oneofNumber_FieldsTwo := []int32{10, 11}[r.Intn(2)] 2431 switch oneofNumber_FieldsTwo { 2432 case 10: 2433 this.FieldsTwo = NewPopulatedOneOf_Field10(r, easy) 2434 case 11: 2435 this.FieldsTwo = NewPopulatedOneOf_Field11(r, easy) 2436 } 2437 if !easy && r.Intn(10) != 0 { 2438 } 2439 return this 2440 } 2441 2442 func NewPopulatedOneOf_Field1(r randyDeepcopy, easy bool) *OneOf_Field1 { 2443 this := &OneOf_Field1{} 2444 this.Field1 = float64(r.Float64()) 2445 if r.Intn(2) == 0 { 2446 this.Field1 *= -1 2447 } 2448 return this 2449 } 2450 func NewPopulatedOneOf_Field2(r randyDeepcopy, easy bool) *OneOf_Field2 { 2451 this := &OneOf_Field2{} 2452 this.Field2 = float32(r.Float32()) 2453 if r.Intn(2) == 0 { 2454 this.Field2 *= -1 2455 } 2456 return this 2457 } 2458 func NewPopulatedOneOf_Field3(r randyDeepcopy, easy bool) *OneOf_Field3 { 2459 this := &OneOf_Field3{} 2460 this.Field3 = int32(r.Int31()) 2461 if r.Intn(2) == 0 { 2462 this.Field3 *= -1 2463 } 2464 return this 2465 } 2466 func NewPopulatedOneOf_Field4(r randyDeepcopy, easy bool) *OneOf_Field4 { 2467 this := &OneOf_Field4{} 2468 this.Field4 = int64(r.Int63()) 2469 if r.Intn(2) == 0 { 2470 this.Field4 *= -1 2471 } 2472 return this 2473 } 2474 func NewPopulatedOneOf_Field5(r randyDeepcopy, easy bool) *OneOf_Field5 { 2475 this := &OneOf_Field5{} 2476 this.Field5 = uint32(r.Uint32()) 2477 return this 2478 } 2479 func NewPopulatedOneOf_Field6(r randyDeepcopy, easy bool) *OneOf_Field6 { 2480 this := &OneOf_Field6{} 2481 this.Field6 = string(randStringDeepcopy(r)) 2482 return this 2483 } 2484 func NewPopulatedOneOf_Field7(r randyDeepcopy, easy bool) *OneOf_Field7 { 2485 this := &OneOf_Field7{} 2486 v45 := r.Intn(100) 2487 this.Field7 = make([]byte, v45) 2488 for i := 0; i < v45; i++ { 2489 this.Field7[i] = byte(r.Intn(256)) 2490 } 2491 return this 2492 } 2493 func NewPopulatedOneOf_Field8(r randyDeepcopy, easy bool) *OneOf_Field8 { 2494 this := &OneOf_Field8{} 2495 this.Field8 = NewPopulatedMapStruct(r, easy) 2496 return this 2497 } 2498 func NewPopulatedOneOf_Field9(r randyDeepcopy, easy bool) *OneOf_Field9 { 2499 this := &OneOf_Field9{} 2500 this.Field9 = NewPopulatedRepeatedNonNullableExternalStruct(r, easy) 2501 return this 2502 } 2503 func NewPopulatedOneOf_Field10(r randyDeepcopy, easy bool) *OneOf_Field10 { 2504 this := &OneOf_Field10{} 2505 this.Field10 = NewPopulatedNonNullableExternalStruct(r, easy) 2506 return this 2507 } 2508 func NewPopulatedOneOf_Field11(r randyDeepcopy, easy bool) *OneOf_Field11 { 2509 this := &OneOf_Field11{} 2510 this.Field11 = NewPopulatedRepeatedExternalStruct(r, easy) 2511 return this 2512 } 2513 2514 type randyDeepcopy interface { 2515 Float32() float32 2516 Float64() float64 2517 Int63() int64 2518 Int31() int32 2519 Uint32() uint32 2520 Intn(n int) int 2521 } 2522 2523 func randUTF8RuneDeepcopy(r randyDeepcopy) rune { 2524 ru := r.Intn(62) 2525 if ru < 10 { 2526 return rune(ru + 48) 2527 } else if ru < 36 { 2528 return rune(ru + 55) 2529 } 2530 return rune(ru + 61) 2531 } 2532 func randStringDeepcopy(r randyDeepcopy) string { 2533 v46 := r.Intn(100) 2534 tmps := make([]rune, v46) 2535 for i := 0; i < v46; i++ { 2536 tmps[i] = randUTF8RuneDeepcopy(r) 2537 } 2538 return string(tmps) 2539 } 2540 func randUnrecognizedDeepcopy(r randyDeepcopy, maxFieldNumber int) (dAtA []byte) { 2541 l := r.Intn(5) 2542 for i := 0; i < l; i++ { 2543 wire := r.Intn(4) 2544 if wire == 3 { 2545 wire = 5 2546 } 2547 fieldNumber := maxFieldNumber + r.Intn(100) 2548 dAtA = randFieldDeepcopy(dAtA, r, fieldNumber, wire) 2549 } 2550 return dAtA 2551 } 2552 func randFieldDeepcopy(dAtA []byte, r randyDeepcopy, fieldNumber int, wire int) []byte { 2553 key := uint32(fieldNumber)<<3 | uint32(wire) 2554 switch wire { 2555 case 0: 2556 dAtA = encodeVarintPopulateDeepcopy(dAtA, uint64(key)) 2557 v47 := r.Int63() 2558 if r.Intn(2) == 0 { 2559 v47 *= -1 2560 } 2561 dAtA = encodeVarintPopulateDeepcopy(dAtA, uint64(v47)) 2562 case 1: 2563 dAtA = encodeVarintPopulateDeepcopy(dAtA, uint64(key)) 2564 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))) 2565 case 2: 2566 dAtA = encodeVarintPopulateDeepcopy(dAtA, uint64(key)) 2567 ll := r.Intn(100) 2568 dAtA = encodeVarintPopulateDeepcopy(dAtA, uint64(ll)) 2569 for j := 0; j < ll; j++ { 2570 dAtA = append(dAtA, byte(r.Intn(256))) 2571 } 2572 default: 2573 dAtA = encodeVarintPopulateDeepcopy(dAtA, uint64(key)) 2574 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 2575 } 2576 return dAtA 2577 } 2578 func encodeVarintPopulateDeepcopy(dAtA []byte, v uint64) []byte { 2579 for v >= 1<<7 { 2580 dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) 2581 v >>= 7 2582 } 2583 dAtA = append(dAtA, uint8(v)) 2584 return dAtA 2585 } 2586 func (this *BasicScalar) String() string { 2587 if this == nil { 2588 return "nil" 2589 } 2590 s := strings.Join([]string{`&BasicScalar{`, 2591 `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, 2592 `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, 2593 `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, 2594 `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, 2595 `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, 2596 `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, 2597 `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, 2598 `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, 2599 `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, 2600 `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, 2601 `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, 2602 `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, 2603 `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, 2604 `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, 2605 `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, 2606 `}`, 2607 }, "") 2608 return s 2609 } 2610 func (this *RepeatedScalar) String() string { 2611 if this == nil { 2612 return "nil" 2613 } 2614 s := strings.Join([]string{`&RepeatedScalar{`, 2615 `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, 2616 `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, 2617 `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, 2618 `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, 2619 `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, 2620 `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, 2621 `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, 2622 `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, 2623 `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, 2624 `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, 2625 `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, 2626 `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, 2627 `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, 2628 `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, 2629 `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, 2630 `}`, 2631 }, "") 2632 return s 2633 } 2634 func (this *RepeatedScalarPacked) String() string { 2635 if this == nil { 2636 return "nil" 2637 } 2638 s := strings.Join([]string{`&RepeatedScalarPacked{`, 2639 `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, 2640 `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, 2641 `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, 2642 `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, 2643 `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, 2644 `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, 2645 `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, 2646 `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, 2647 `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, 2648 `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, 2649 `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, 2650 `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, 2651 `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, 2652 `}`, 2653 }, "") 2654 return s 2655 } 2656 func (this *ExternalStruct) String() string { 2657 if this == nil { 2658 return "nil" 2659 } 2660 s := strings.Join([]string{`&ExternalStruct{`, 2661 `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "BasicScalar", "BasicScalar", 1) + `,`, 2662 `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "RepeatedScalar", "RepeatedScalar", 1) + `,`, 2663 `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "RepeatedScalarPacked", "RepeatedScalarPacked", 1) + `,`, 2664 `}`, 2665 }, "") 2666 return s 2667 } 2668 func (this *RepeatedExternalStruct) String() string { 2669 if this == nil { 2670 return "nil" 2671 } 2672 s := strings.Join([]string{`&RepeatedExternalStruct{`, 2673 `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "BasicScalar", "BasicScalar", 1) + `,`, 2674 `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "RepeatedScalar", "RepeatedScalar", 1) + `,`, 2675 `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "RepeatedScalarPacked", "RepeatedScalarPacked", 1) + `,`, 2676 `}`, 2677 }, "") 2678 return s 2679 } 2680 func (this *NonNullableExternalStruct) String() string { 2681 if this == nil { 2682 return "nil" 2683 } 2684 s := strings.Join([]string{`&NonNullableExternalStruct{`, 2685 `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "BasicScalar", "BasicScalar", 1), `&`, ``, 1) + `,`, 2686 `Field2:` + strings.Replace(strings.Replace(this.Field2.String(), "RepeatedScalar", "RepeatedScalar", 1), `&`, ``, 1) + `,`, 2687 `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "RepeatedScalarPacked", "RepeatedScalarPacked", 1), `&`, ``, 1) + `,`, 2688 `}`, 2689 }, "") 2690 return s 2691 } 2692 func (this *RepeatedNonNullableExternalStruct) String() string { 2693 if this == nil { 2694 return "nil" 2695 } 2696 s := strings.Join([]string{`&RepeatedNonNullableExternalStruct{`, 2697 `Field1:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field1), "BasicScalar", "BasicScalar", 1), `&`, ``, 1) + `,`, 2698 `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "RepeatedScalar", "RepeatedScalar", 1), `&`, ``, 1) + `,`, 2699 `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "RepeatedScalarPacked", "RepeatedScalarPacked", 1), `&`, ``, 1) + `,`, 2700 `}`, 2701 }, "") 2702 return s 2703 } 2704 func (this *MapStruct) String() string { 2705 if this == nil { 2706 return "nil" 2707 } 2708 keysForNullableMap := make([]string, 0, len(this.NullableMap)) 2709 for k, _ := range this.NullableMap { 2710 keysForNullableMap = append(keysForNullableMap, k) 2711 } 2712 github_com_gogo_protobuf_sortkeys.Strings(keysForNullableMap) 2713 mapStringForNullableMap := "map[string]*BasicScalar{" 2714 for _, k := range keysForNullableMap { 2715 mapStringForNullableMap += fmt.Sprintf("%v: %v,", k, this.NullableMap[k]) 2716 } 2717 mapStringForNullableMap += "}" 2718 keysForNonnullableMap := make([]string, 0, len(this.NonnullableMap)) 2719 for k, _ := range this.NonnullableMap { 2720 keysForNonnullableMap = append(keysForNonnullableMap, k) 2721 } 2722 github_com_gogo_protobuf_sortkeys.Strings(keysForNonnullableMap) 2723 mapStringForNonnullableMap := "map[string]BasicScalar{" 2724 for _, k := range keysForNonnullableMap { 2725 mapStringForNonnullableMap += fmt.Sprintf("%v: %v,", k, this.NonnullableMap[k]) 2726 } 2727 mapStringForNonnullableMap += "}" 2728 s := strings.Join([]string{`&MapStruct{`, 2729 `NullableMap:` + mapStringForNullableMap + `,`, 2730 `NonnullableMap:` + mapStringForNonnullableMap + `,`, 2731 `}`, 2732 }, "") 2733 return s 2734 } 2735 func (this *OneOf) String() string { 2736 if this == nil { 2737 return "nil" 2738 } 2739 s := strings.Join([]string{`&OneOf{`, 2740 `Fields:` + fmt.Sprintf("%v", this.Fields) + `,`, 2741 `FieldsTwo:` + fmt.Sprintf("%v", this.FieldsTwo) + `,`, 2742 `}`, 2743 }, "") 2744 return s 2745 } 2746 func (this *OneOf_Field1) String() string { 2747 if this == nil { 2748 return "nil" 2749 } 2750 s := strings.Join([]string{`&OneOf_Field1{`, 2751 `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, 2752 `}`, 2753 }, "") 2754 return s 2755 } 2756 func (this *OneOf_Field2) String() string { 2757 if this == nil { 2758 return "nil" 2759 } 2760 s := strings.Join([]string{`&OneOf_Field2{`, 2761 `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, 2762 `}`, 2763 }, "") 2764 return s 2765 } 2766 func (this *OneOf_Field3) String() string { 2767 if this == nil { 2768 return "nil" 2769 } 2770 s := strings.Join([]string{`&OneOf_Field3{`, 2771 `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, 2772 `}`, 2773 }, "") 2774 return s 2775 } 2776 func (this *OneOf_Field4) String() string { 2777 if this == nil { 2778 return "nil" 2779 } 2780 s := strings.Join([]string{`&OneOf_Field4{`, 2781 `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, 2782 `}`, 2783 }, "") 2784 return s 2785 } 2786 func (this *OneOf_Field5) String() string { 2787 if this == nil { 2788 return "nil" 2789 } 2790 s := strings.Join([]string{`&OneOf_Field5{`, 2791 `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, 2792 `}`, 2793 }, "") 2794 return s 2795 } 2796 func (this *OneOf_Field6) String() string { 2797 if this == nil { 2798 return "nil" 2799 } 2800 s := strings.Join([]string{`&OneOf_Field6{`, 2801 `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, 2802 `}`, 2803 }, "") 2804 return s 2805 } 2806 func (this *OneOf_Field7) String() string { 2807 if this == nil { 2808 return "nil" 2809 } 2810 s := strings.Join([]string{`&OneOf_Field7{`, 2811 `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, 2812 `}`, 2813 }, "") 2814 return s 2815 } 2816 func (this *OneOf_Field8) String() string { 2817 if this == nil { 2818 return "nil" 2819 } 2820 s := strings.Join([]string{`&OneOf_Field8{`, 2821 `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "MapStruct", "MapStruct", 1) + `,`, 2822 `}`, 2823 }, "") 2824 return s 2825 } 2826 func (this *OneOf_Field9) String() string { 2827 if this == nil { 2828 return "nil" 2829 } 2830 s := strings.Join([]string{`&OneOf_Field9{`, 2831 `Field9:` + strings.Replace(fmt.Sprintf("%v", this.Field9), "RepeatedNonNullableExternalStruct", "RepeatedNonNullableExternalStruct", 1) + `,`, 2832 `}`, 2833 }, "") 2834 return s 2835 } 2836 func (this *OneOf_Field10) String() string { 2837 if this == nil { 2838 return "nil" 2839 } 2840 s := strings.Join([]string{`&OneOf_Field10{`, 2841 `Field10:` + strings.Replace(fmt.Sprintf("%v", this.Field10), "NonNullableExternalStruct", "NonNullableExternalStruct", 1) + `,`, 2842 `}`, 2843 }, "") 2844 return s 2845 } 2846 func (this *OneOf_Field11) String() string { 2847 if this == nil { 2848 return "nil" 2849 } 2850 s := strings.Join([]string{`&OneOf_Field11{`, 2851 `Field11:` + strings.Replace(fmt.Sprintf("%v", this.Field11), "RepeatedExternalStruct", "RepeatedExternalStruct", 1) + `,`, 2852 `}`, 2853 }, "") 2854 return s 2855 } 2856 func valueToStringDeepcopy(v interface{}) string { 2857 rv := reflect.ValueOf(v) 2858 if rv.IsNil() { 2859 return "nil" 2860 } 2861 pv := reflect.Indirect(rv).Interface() 2862 return fmt.Sprintf("*%v", pv) 2863 }