github.com/onosproject/onos-api/go@v0.10.32/onos/config/v3/object.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: onos/config/v3/object.proto 3 4 package v3 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 _ "github.com/gogo/protobuf/types" 11 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 time "time" 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 var _ = time.Kitchen 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 29 30 type ObjectMeta struct { 31 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 32 Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` 33 Revision Revision `protobuf:"varint,3,opt,name=revision,proto3,casttype=Revision" json:"revision,omitempty"` 34 Created time.Time `protobuf:"bytes,4,opt,name=created,proto3,stdtime" json:"created"` 35 Updated time.Time `protobuf:"bytes,5,opt,name=updated,proto3,stdtime" json:"updated"` 36 Deleted *time.Time `protobuf:"bytes,6,opt,name=deleted,proto3,stdtime" json:"deleted,omitempty"` 37 } 38 39 func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } 40 func (m *ObjectMeta) String() string { return proto.CompactTextString(m) } 41 func (*ObjectMeta) ProtoMessage() {} 42 func (*ObjectMeta) Descriptor() ([]byte, []int) { 43 return fileDescriptor_b78568cfc6f29733, []int{0} 44 } 45 func (m *ObjectMeta) XXX_Unmarshal(b []byte) error { 46 return m.Unmarshal(b) 47 } 48 func (m *ObjectMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 49 if deterministic { 50 return xxx_messageInfo_ObjectMeta.Marshal(b, m, deterministic) 51 } else { 52 b = b[:cap(b)] 53 n, err := m.MarshalToSizedBuffer(b) 54 if err != nil { 55 return nil, err 56 } 57 return b[:n], nil 58 } 59 } 60 func (m *ObjectMeta) XXX_Merge(src proto.Message) { 61 xxx_messageInfo_ObjectMeta.Merge(m, src) 62 } 63 func (m *ObjectMeta) XXX_Size() int { 64 return m.Size() 65 } 66 func (m *ObjectMeta) XXX_DiscardUnknown() { 67 xxx_messageInfo_ObjectMeta.DiscardUnknown(m) 68 } 69 70 var xxx_messageInfo_ObjectMeta proto.InternalMessageInfo 71 72 func (m *ObjectMeta) GetKey() string { 73 if m != nil { 74 return m.Key 75 } 76 return "" 77 } 78 79 func (m *ObjectMeta) GetVersion() uint64 { 80 if m != nil { 81 return m.Version 82 } 83 return 0 84 } 85 86 func (m *ObjectMeta) GetRevision() Revision { 87 if m != nil { 88 return m.Revision 89 } 90 return 0 91 } 92 93 func (m *ObjectMeta) GetCreated() time.Time { 94 if m != nil { 95 return m.Created 96 } 97 return time.Time{} 98 } 99 100 func (m *ObjectMeta) GetUpdated() time.Time { 101 if m != nil { 102 return m.Updated 103 } 104 return time.Time{} 105 } 106 107 func (m *ObjectMeta) GetDeleted() *time.Time { 108 if m != nil { 109 return m.Deleted 110 } 111 return nil 112 } 113 114 type Target struct { 115 ID TargetID `protobuf:"bytes,1,opt,name=id,proto3,casttype=TargetID" json:"id,omitempty"` 116 Type TargetType `protobuf:"bytes,2,opt,name=type,proto3,casttype=TargetType" json:"type,omitempty"` 117 Version TargetVersion `protobuf:"bytes,3,opt,name=version,proto3,casttype=TargetVersion" json:"version,omitempty"` 118 } 119 120 func (m *Target) Reset() { *m = Target{} } 121 func (m *Target) String() string { return proto.CompactTextString(m) } 122 func (*Target) ProtoMessage() {} 123 func (*Target) Descriptor() ([]byte, []int) { 124 return fileDescriptor_b78568cfc6f29733, []int{1} 125 } 126 func (m *Target) XXX_Unmarshal(b []byte) error { 127 return m.Unmarshal(b) 128 } 129 func (m *Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 130 if deterministic { 131 return xxx_messageInfo_Target.Marshal(b, m, deterministic) 132 } else { 133 b = b[:cap(b)] 134 n, err := m.MarshalToSizedBuffer(b) 135 if err != nil { 136 return nil, err 137 } 138 return b[:n], nil 139 } 140 } 141 func (m *Target) XXX_Merge(src proto.Message) { 142 xxx_messageInfo_Target.Merge(m, src) 143 } 144 func (m *Target) XXX_Size() int { 145 return m.Size() 146 } 147 func (m *Target) XXX_DiscardUnknown() { 148 xxx_messageInfo_Target.DiscardUnknown(m) 149 } 150 151 var xxx_messageInfo_Target proto.InternalMessageInfo 152 153 func (m *Target) GetID() TargetID { 154 if m != nil { 155 return m.ID 156 } 157 return "" 158 } 159 160 func (m *Target) GetType() TargetType { 161 if m != nil { 162 return m.Type 163 } 164 return "" 165 } 166 167 func (m *Target) GetVersion() TargetVersion { 168 if m != nil { 169 return m.Version 170 } 171 return "" 172 } 173 174 func init() { 175 proto.RegisterType((*ObjectMeta)(nil), "onos.config.v3.ObjectMeta") 176 proto.RegisterType((*Target)(nil), "onos.config.v3.Target") 177 } 178 179 func init() { proto.RegisterFile("onos/config/v3/object.proto", fileDescriptor_b78568cfc6f29733) } 180 181 var fileDescriptor_b78568cfc6f29733 = []byte{ 182 // 352 bytes of a gzipped FileDescriptorProto 183 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xbf, 0x6a, 0xeb, 0x30, 184 0x1c, 0x85, 0x2d, 0xc7, 0x37, 0x7f, 0x74, 0xef, 0x0d, 0xad, 0xe8, 0x60, 0x52, 0xb0, 0x82, 0x27, 185 0x43, 0xc1, 0x86, 0x66, 0xeb, 0xd0, 0xc1, 0x64, 0xc9, 0x50, 0x0a, 0x22, 0x74, 0x77, 0xe2, 0x5f, 186 0x8c, 0xdb, 0x24, 0x32, 0x8e, 0x62, 0xc8, 0xd0, 0x77, 0xc8, 0x13, 0xf4, 0x79, 0x32, 0x66, 0xec, 187 0xe4, 0x16, 0xe7, 0x2d, 0x32, 0x15, 0x49, 0x71, 0x3a, 0x96, 0x6e, 0x92, 0xbf, 0xf3, 0x99, 0xa3, 188 0x83, 0xaf, 0xf9, 0x92, 0xaf, 0x82, 0x29, 0x5f, 0xce, 0xd2, 0x24, 0x28, 0x06, 0x01, 0x9f, 0x3c, 189 0xc3, 0x54, 0xf8, 0x59, 0xce, 0x05, 0x27, 0x5d, 0x09, 0x7d, 0x0d, 0xfd, 0x62, 0xd0, 0xbb, 0x4a, 190 0x78, 0xc2, 0x15, 0x0a, 0xe4, 0x49, 0xa7, 0x7a, 0x34, 0xe1, 0x3c, 0x99, 0x43, 0xa0, 0x6e, 0x93, 191 0xf5, 0x2c, 0x10, 0xe9, 0x02, 0x56, 0x22, 0x5a, 0x64, 0x3a, 0xe0, 0xbe, 0x99, 0x18, 0x3f, 0xaa, 192 0xff, 0x3e, 0x80, 0x88, 0xc8, 0x05, 0x6e, 0xbc, 0xc0, 0xc6, 0x46, 0x7d, 0xe4, 0x75, 0x98, 0x3c, 193 0x12, 0x1b, 0xb7, 0x0a, 0xc8, 0x57, 0x29, 0x5f, 0xda, 0x66, 0x1f, 0x79, 0x16, 0xab, 0xaf, 0xc4, 194 0xc3, 0xed, 0x1c, 0x8a, 0x54, 0xa1, 0x86, 0x44, 0xe1, 0xbf, 0x63, 0x49, 0xdb, 0xec, 0xf4, 0x8d, 195 0x9d, 0x29, 0xb9, 0xc7, 0xad, 0x69, 0x0e, 0x91, 0x80, 0xd8, 0xb6, 0xfa, 0xc8, 0xfb, 0x7b, 0xdb, 196 0xf3, 0x75, 0x2f, 0xbf, 0xee, 0xe5, 0x8f, 0xeb, 0x5e, 0x61, 0x7b, 0x57, 0x52, 0x63, 0xfb, 0x41, 197 0x11, 0xab, 0x25, 0xe9, 0xaf, 0xb3, 0x58, 0xf9, 0x7f, 0x7e, 0xe3, 0x9f, 0x24, 0x72, 0x87, 0x5b, 198 0x31, 0xcc, 0x41, 0xfa, 0xcd, 0x1f, 0x7d, 0x4b, 0xbb, 0x27, 0xc1, 0x7d, 0xc5, 0xcd, 0x71, 0x94, 199 0x27, 0x20, 0x88, 0x8b, 0xcd, 0x34, 0xd6, 0xd3, 0x84, 0xa4, 0x2a, 0xa9, 0x39, 0x1a, 0xca, 0xf7, 200 0x6a, 0x3a, 0x1a, 0x32, 0x33, 0x8d, 0x89, 0x8b, 0x2d, 0xb1, 0xc9, 0x40, 0x4d, 0xd5, 0x09, 0xbb, 201 0xc7, 0x92, 0x62, 0xcd, 0xc7, 0x9b, 0x0c, 0x98, 0x62, 0xe4, 0xe6, 0x7b, 0xd1, 0x86, 0x8a, 0x5d, 202 0x1e, 0x4b, 0xfa, 0x5f, 0xc7, 0x9e, 0x34, 0x38, 0x8f, 0x1c, 0xda, 0xbb, 0xca, 0x41, 0xfb, 0xca, 203 0x41, 0x9f, 0x95, 0x83, 0xb6, 0x07, 0xc7, 0xd8, 0x1f, 0x1c, 0xe3, 0xfd, 0xe0, 0x18, 0x93, 0xa6, 204 0xea, 0x3e, 0xf8, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xde, 0x9f, 0x0f, 0x4b, 0x26, 0x02, 0x00, 0x00, 205 } 206 207 func (m *ObjectMeta) Marshal() (dAtA []byte, err error) { 208 size := m.Size() 209 dAtA = make([]byte, size) 210 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 211 if err != nil { 212 return nil, err 213 } 214 return dAtA[:n], nil 215 } 216 217 func (m *ObjectMeta) MarshalTo(dAtA []byte) (int, error) { 218 size := m.Size() 219 return m.MarshalToSizedBuffer(dAtA[:size]) 220 } 221 222 func (m *ObjectMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { 223 i := len(dAtA) 224 _ = i 225 var l int 226 _ = l 227 if m.Deleted != nil { 228 n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Deleted, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Deleted):]) 229 if err1 != nil { 230 return 0, err1 231 } 232 i -= n1 233 i = encodeVarintObject(dAtA, i, uint64(n1)) 234 i-- 235 dAtA[i] = 0x32 236 } 237 n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Updated, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Updated):]) 238 if err2 != nil { 239 return 0, err2 240 } 241 i -= n2 242 i = encodeVarintObject(dAtA, i, uint64(n2)) 243 i-- 244 dAtA[i] = 0x2a 245 n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Created, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Created):]) 246 if err3 != nil { 247 return 0, err3 248 } 249 i -= n3 250 i = encodeVarintObject(dAtA, i, uint64(n3)) 251 i-- 252 dAtA[i] = 0x22 253 if m.Revision != 0 { 254 i = encodeVarintObject(dAtA, i, uint64(m.Revision)) 255 i-- 256 dAtA[i] = 0x18 257 } 258 if m.Version != 0 { 259 i = encodeVarintObject(dAtA, i, uint64(m.Version)) 260 i-- 261 dAtA[i] = 0x10 262 } 263 if len(m.Key) > 0 { 264 i -= len(m.Key) 265 copy(dAtA[i:], m.Key) 266 i = encodeVarintObject(dAtA, i, uint64(len(m.Key))) 267 i-- 268 dAtA[i] = 0xa 269 } 270 return len(dAtA) - i, nil 271 } 272 273 func (m *Target) Marshal() (dAtA []byte, err error) { 274 size := m.Size() 275 dAtA = make([]byte, size) 276 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 277 if err != nil { 278 return nil, err 279 } 280 return dAtA[:n], nil 281 } 282 283 func (m *Target) MarshalTo(dAtA []byte) (int, error) { 284 size := m.Size() 285 return m.MarshalToSizedBuffer(dAtA[:size]) 286 } 287 288 func (m *Target) MarshalToSizedBuffer(dAtA []byte) (int, error) { 289 i := len(dAtA) 290 _ = i 291 var l int 292 _ = l 293 if len(m.Version) > 0 { 294 i -= len(m.Version) 295 copy(dAtA[i:], m.Version) 296 i = encodeVarintObject(dAtA, i, uint64(len(m.Version))) 297 i-- 298 dAtA[i] = 0x1a 299 } 300 if len(m.Type) > 0 { 301 i -= len(m.Type) 302 copy(dAtA[i:], m.Type) 303 i = encodeVarintObject(dAtA, i, uint64(len(m.Type))) 304 i-- 305 dAtA[i] = 0x12 306 } 307 if len(m.ID) > 0 { 308 i -= len(m.ID) 309 copy(dAtA[i:], m.ID) 310 i = encodeVarintObject(dAtA, i, uint64(len(m.ID))) 311 i-- 312 dAtA[i] = 0xa 313 } 314 return len(dAtA) - i, nil 315 } 316 317 func encodeVarintObject(dAtA []byte, offset int, v uint64) int { 318 offset -= sovObject(v) 319 base := offset 320 for v >= 1<<7 { 321 dAtA[offset] = uint8(v&0x7f | 0x80) 322 v >>= 7 323 offset++ 324 } 325 dAtA[offset] = uint8(v) 326 return base 327 } 328 func (m *ObjectMeta) Size() (n int) { 329 if m == nil { 330 return 0 331 } 332 var l int 333 _ = l 334 l = len(m.Key) 335 if l > 0 { 336 n += 1 + l + sovObject(uint64(l)) 337 } 338 if m.Version != 0 { 339 n += 1 + sovObject(uint64(m.Version)) 340 } 341 if m.Revision != 0 { 342 n += 1 + sovObject(uint64(m.Revision)) 343 } 344 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Created) 345 n += 1 + l + sovObject(uint64(l)) 346 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Updated) 347 n += 1 + l + sovObject(uint64(l)) 348 if m.Deleted != nil { 349 l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Deleted) 350 n += 1 + l + sovObject(uint64(l)) 351 } 352 return n 353 } 354 355 func (m *Target) Size() (n int) { 356 if m == nil { 357 return 0 358 } 359 var l int 360 _ = l 361 l = len(m.ID) 362 if l > 0 { 363 n += 1 + l + sovObject(uint64(l)) 364 } 365 l = len(m.Type) 366 if l > 0 { 367 n += 1 + l + sovObject(uint64(l)) 368 } 369 l = len(m.Version) 370 if l > 0 { 371 n += 1 + l + sovObject(uint64(l)) 372 } 373 return n 374 } 375 376 func sovObject(x uint64) (n int) { 377 return (math_bits.Len64(x|1) + 6) / 7 378 } 379 func sozObject(x uint64) (n int) { 380 return sovObject(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 381 } 382 func (m *ObjectMeta) Unmarshal(dAtA []byte) error { 383 l := len(dAtA) 384 iNdEx := 0 385 for iNdEx < l { 386 preIndex := iNdEx 387 var wire uint64 388 for shift := uint(0); ; shift += 7 { 389 if shift >= 64 { 390 return ErrIntOverflowObject 391 } 392 if iNdEx >= l { 393 return io.ErrUnexpectedEOF 394 } 395 b := dAtA[iNdEx] 396 iNdEx++ 397 wire |= uint64(b&0x7F) << shift 398 if b < 0x80 { 399 break 400 } 401 } 402 fieldNum := int32(wire >> 3) 403 wireType := int(wire & 0x7) 404 if wireType == 4 { 405 return fmt.Errorf("proto: ObjectMeta: wiretype end group for non-group") 406 } 407 if fieldNum <= 0 { 408 return fmt.Errorf("proto: ObjectMeta: illegal tag %d (wire type %d)", fieldNum, wire) 409 } 410 switch fieldNum { 411 case 1: 412 if wireType != 2 { 413 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 414 } 415 var stringLen uint64 416 for shift := uint(0); ; shift += 7 { 417 if shift >= 64 { 418 return ErrIntOverflowObject 419 } 420 if iNdEx >= l { 421 return io.ErrUnexpectedEOF 422 } 423 b := dAtA[iNdEx] 424 iNdEx++ 425 stringLen |= uint64(b&0x7F) << shift 426 if b < 0x80 { 427 break 428 } 429 } 430 intStringLen := int(stringLen) 431 if intStringLen < 0 { 432 return ErrInvalidLengthObject 433 } 434 postIndex := iNdEx + intStringLen 435 if postIndex < 0 { 436 return ErrInvalidLengthObject 437 } 438 if postIndex > l { 439 return io.ErrUnexpectedEOF 440 } 441 m.Key = string(dAtA[iNdEx:postIndex]) 442 iNdEx = postIndex 443 case 2: 444 if wireType != 0 { 445 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 446 } 447 m.Version = 0 448 for shift := uint(0); ; shift += 7 { 449 if shift >= 64 { 450 return ErrIntOverflowObject 451 } 452 if iNdEx >= l { 453 return io.ErrUnexpectedEOF 454 } 455 b := dAtA[iNdEx] 456 iNdEx++ 457 m.Version |= uint64(b&0x7F) << shift 458 if b < 0x80 { 459 break 460 } 461 } 462 case 3: 463 if wireType != 0 { 464 return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) 465 } 466 m.Revision = 0 467 for shift := uint(0); ; shift += 7 { 468 if shift >= 64 { 469 return ErrIntOverflowObject 470 } 471 if iNdEx >= l { 472 return io.ErrUnexpectedEOF 473 } 474 b := dAtA[iNdEx] 475 iNdEx++ 476 m.Revision |= Revision(b&0x7F) << shift 477 if b < 0x80 { 478 break 479 } 480 } 481 case 4: 482 if wireType != 2 { 483 return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType) 484 } 485 var msglen int 486 for shift := uint(0); ; shift += 7 { 487 if shift >= 64 { 488 return ErrIntOverflowObject 489 } 490 if iNdEx >= l { 491 return io.ErrUnexpectedEOF 492 } 493 b := dAtA[iNdEx] 494 iNdEx++ 495 msglen |= int(b&0x7F) << shift 496 if b < 0x80 { 497 break 498 } 499 } 500 if msglen < 0 { 501 return ErrInvalidLengthObject 502 } 503 postIndex := iNdEx + msglen 504 if postIndex < 0 { 505 return ErrInvalidLengthObject 506 } 507 if postIndex > l { 508 return io.ErrUnexpectedEOF 509 } 510 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Created, dAtA[iNdEx:postIndex]); err != nil { 511 return err 512 } 513 iNdEx = postIndex 514 case 5: 515 if wireType != 2 { 516 return fmt.Errorf("proto: wrong wireType = %d for field Updated", wireType) 517 } 518 var msglen int 519 for shift := uint(0); ; shift += 7 { 520 if shift >= 64 { 521 return ErrIntOverflowObject 522 } 523 if iNdEx >= l { 524 return io.ErrUnexpectedEOF 525 } 526 b := dAtA[iNdEx] 527 iNdEx++ 528 msglen |= int(b&0x7F) << shift 529 if b < 0x80 { 530 break 531 } 532 } 533 if msglen < 0 { 534 return ErrInvalidLengthObject 535 } 536 postIndex := iNdEx + msglen 537 if postIndex < 0 { 538 return ErrInvalidLengthObject 539 } 540 if postIndex > l { 541 return io.ErrUnexpectedEOF 542 } 543 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Updated, dAtA[iNdEx:postIndex]); err != nil { 544 return err 545 } 546 iNdEx = postIndex 547 case 6: 548 if wireType != 2 { 549 return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) 550 } 551 var msglen int 552 for shift := uint(0); ; shift += 7 { 553 if shift >= 64 { 554 return ErrIntOverflowObject 555 } 556 if iNdEx >= l { 557 return io.ErrUnexpectedEOF 558 } 559 b := dAtA[iNdEx] 560 iNdEx++ 561 msglen |= int(b&0x7F) << shift 562 if b < 0x80 { 563 break 564 } 565 } 566 if msglen < 0 { 567 return ErrInvalidLengthObject 568 } 569 postIndex := iNdEx + msglen 570 if postIndex < 0 { 571 return ErrInvalidLengthObject 572 } 573 if postIndex > l { 574 return io.ErrUnexpectedEOF 575 } 576 if m.Deleted == nil { 577 m.Deleted = new(time.Time) 578 } 579 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.Deleted, dAtA[iNdEx:postIndex]); err != nil { 580 return err 581 } 582 iNdEx = postIndex 583 default: 584 iNdEx = preIndex 585 skippy, err := skipObject(dAtA[iNdEx:]) 586 if err != nil { 587 return err 588 } 589 if (skippy < 0) || (iNdEx+skippy) < 0 { 590 return ErrInvalidLengthObject 591 } 592 if (iNdEx + skippy) > l { 593 return io.ErrUnexpectedEOF 594 } 595 iNdEx += skippy 596 } 597 } 598 599 if iNdEx > l { 600 return io.ErrUnexpectedEOF 601 } 602 return nil 603 } 604 func (m *Target) Unmarshal(dAtA []byte) error { 605 l := len(dAtA) 606 iNdEx := 0 607 for iNdEx < l { 608 preIndex := iNdEx 609 var wire uint64 610 for shift := uint(0); ; shift += 7 { 611 if shift >= 64 { 612 return ErrIntOverflowObject 613 } 614 if iNdEx >= l { 615 return io.ErrUnexpectedEOF 616 } 617 b := dAtA[iNdEx] 618 iNdEx++ 619 wire |= uint64(b&0x7F) << shift 620 if b < 0x80 { 621 break 622 } 623 } 624 fieldNum := int32(wire >> 3) 625 wireType := int(wire & 0x7) 626 if wireType == 4 { 627 return fmt.Errorf("proto: Target: wiretype end group for non-group") 628 } 629 if fieldNum <= 0 { 630 return fmt.Errorf("proto: Target: illegal tag %d (wire type %d)", fieldNum, wire) 631 } 632 switch fieldNum { 633 case 1: 634 if wireType != 2 { 635 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 636 } 637 var stringLen uint64 638 for shift := uint(0); ; shift += 7 { 639 if shift >= 64 { 640 return ErrIntOverflowObject 641 } 642 if iNdEx >= l { 643 return io.ErrUnexpectedEOF 644 } 645 b := dAtA[iNdEx] 646 iNdEx++ 647 stringLen |= uint64(b&0x7F) << shift 648 if b < 0x80 { 649 break 650 } 651 } 652 intStringLen := int(stringLen) 653 if intStringLen < 0 { 654 return ErrInvalidLengthObject 655 } 656 postIndex := iNdEx + intStringLen 657 if postIndex < 0 { 658 return ErrInvalidLengthObject 659 } 660 if postIndex > l { 661 return io.ErrUnexpectedEOF 662 } 663 m.ID = TargetID(dAtA[iNdEx:postIndex]) 664 iNdEx = postIndex 665 case 2: 666 if wireType != 2 { 667 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 668 } 669 var stringLen uint64 670 for shift := uint(0); ; shift += 7 { 671 if shift >= 64 { 672 return ErrIntOverflowObject 673 } 674 if iNdEx >= l { 675 return io.ErrUnexpectedEOF 676 } 677 b := dAtA[iNdEx] 678 iNdEx++ 679 stringLen |= uint64(b&0x7F) << shift 680 if b < 0x80 { 681 break 682 } 683 } 684 intStringLen := int(stringLen) 685 if intStringLen < 0 { 686 return ErrInvalidLengthObject 687 } 688 postIndex := iNdEx + intStringLen 689 if postIndex < 0 { 690 return ErrInvalidLengthObject 691 } 692 if postIndex > l { 693 return io.ErrUnexpectedEOF 694 } 695 m.Type = TargetType(dAtA[iNdEx:postIndex]) 696 iNdEx = postIndex 697 case 3: 698 if wireType != 2 { 699 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 700 } 701 var stringLen uint64 702 for shift := uint(0); ; shift += 7 { 703 if shift >= 64 { 704 return ErrIntOverflowObject 705 } 706 if iNdEx >= l { 707 return io.ErrUnexpectedEOF 708 } 709 b := dAtA[iNdEx] 710 iNdEx++ 711 stringLen |= uint64(b&0x7F) << shift 712 if b < 0x80 { 713 break 714 } 715 } 716 intStringLen := int(stringLen) 717 if intStringLen < 0 { 718 return ErrInvalidLengthObject 719 } 720 postIndex := iNdEx + intStringLen 721 if postIndex < 0 { 722 return ErrInvalidLengthObject 723 } 724 if postIndex > l { 725 return io.ErrUnexpectedEOF 726 } 727 m.Version = TargetVersion(dAtA[iNdEx:postIndex]) 728 iNdEx = postIndex 729 default: 730 iNdEx = preIndex 731 skippy, err := skipObject(dAtA[iNdEx:]) 732 if err != nil { 733 return err 734 } 735 if (skippy < 0) || (iNdEx+skippy) < 0 { 736 return ErrInvalidLengthObject 737 } 738 if (iNdEx + skippy) > l { 739 return io.ErrUnexpectedEOF 740 } 741 iNdEx += skippy 742 } 743 } 744 745 if iNdEx > l { 746 return io.ErrUnexpectedEOF 747 } 748 return nil 749 } 750 func skipObject(dAtA []byte) (n int, err error) { 751 l := len(dAtA) 752 iNdEx := 0 753 depth := 0 754 for iNdEx < l { 755 var wire uint64 756 for shift := uint(0); ; shift += 7 { 757 if shift >= 64 { 758 return 0, ErrIntOverflowObject 759 } 760 if iNdEx >= l { 761 return 0, io.ErrUnexpectedEOF 762 } 763 b := dAtA[iNdEx] 764 iNdEx++ 765 wire |= (uint64(b) & 0x7F) << shift 766 if b < 0x80 { 767 break 768 } 769 } 770 wireType := int(wire & 0x7) 771 switch wireType { 772 case 0: 773 for shift := uint(0); ; shift += 7 { 774 if shift >= 64 { 775 return 0, ErrIntOverflowObject 776 } 777 if iNdEx >= l { 778 return 0, io.ErrUnexpectedEOF 779 } 780 iNdEx++ 781 if dAtA[iNdEx-1] < 0x80 { 782 break 783 } 784 } 785 case 1: 786 iNdEx += 8 787 case 2: 788 var length int 789 for shift := uint(0); ; shift += 7 { 790 if shift >= 64 { 791 return 0, ErrIntOverflowObject 792 } 793 if iNdEx >= l { 794 return 0, io.ErrUnexpectedEOF 795 } 796 b := dAtA[iNdEx] 797 iNdEx++ 798 length |= (int(b) & 0x7F) << shift 799 if b < 0x80 { 800 break 801 } 802 } 803 if length < 0 { 804 return 0, ErrInvalidLengthObject 805 } 806 iNdEx += length 807 case 3: 808 depth++ 809 case 4: 810 if depth == 0 { 811 return 0, ErrUnexpectedEndOfGroupObject 812 } 813 depth-- 814 case 5: 815 iNdEx += 4 816 default: 817 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 818 } 819 if iNdEx < 0 { 820 return 0, ErrInvalidLengthObject 821 } 822 if depth == 0 { 823 return iNdEx, nil 824 } 825 } 826 return 0, io.ErrUnexpectedEOF 827 } 828 829 var ( 830 ErrInvalidLengthObject = fmt.Errorf("proto: negative length found during unmarshaling") 831 ErrIntOverflowObject = fmt.Errorf("proto: integer overflow") 832 ErrUnexpectedEndOfGroupObject = fmt.Errorf("proto: unexpected end of group") 833 )