1// Code generated by protoc-gen-gogo. DO NOT EDIT. 2// source: google/protobuf/empty.proto 3 4package types 5 6import proto "github.com/gogo/protobuf/proto" 7import fmt "fmt" 8import math "math" 9 10import bytes "bytes" 11 12import strings "strings" 13import reflect "reflect" 14 15import io "io" 16 17// Reference imports to suppress errors if they are not otherwise used. 18var _ = proto.Marshal 19var _ = fmt.Errorf 20var _ = math.Inf 21 22// This is a compile-time assertion to ensure that this generated file 23// is compatible with the proto package it is being compiled against. 24// A compilation error at this line likely means your copy of the 25// proto package needs to be updated. 26const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 27 28// A generic empty message that you can re-use to avoid defining duplicated 29// empty messages in your APIs. A typical example is to use it as the request 30// or the response type of an API method. For instance: 31// 32// service Foo { 33// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 34// } 35// 36// The JSON representation for `Empty` is empty JSON object `{}`. 37type Empty struct { 38 XXX_NoUnkeyedLiteral struct{} `json:"-"` 39 XXX_unrecognized []byte `json:"-"` 40 XXX_sizecache int32 `json:"-"` 41} 42 43func (m *Empty) Reset() { *m = Empty{} } 44func (*Empty) ProtoMessage() {} 45func (*Empty) Descriptor() ([]byte, []int) { 46 return fileDescriptor_empty_fa64318be3e23895, []int{0} 47} 48func (*Empty) XXX_WellKnownType() string { return "Empty" } 49func (m *Empty) XXX_Unmarshal(b []byte) error { 50 return m.Unmarshal(b) 51} 52func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 53 if deterministic { 54 return xxx_messageInfo_Empty.Marshal(b, m, deterministic) 55 } else { 56 b = b[:cap(b)] 57 n, err := m.MarshalTo(b) 58 if err != nil { 59 return nil, err 60 } 61 return b[:n], nil 62 } 63} 64func (dst *Empty) XXX_Merge(src proto.Message) { 65 xxx_messageInfo_Empty.Merge(dst, src) 66} 67func (m *Empty) XXX_Size() int { 68 return m.Size() 69} 70func (m *Empty) XXX_DiscardUnknown() { 71 xxx_messageInfo_Empty.DiscardUnknown(m) 72} 73 74var xxx_messageInfo_Empty proto.InternalMessageInfo 75 76func (*Empty) XXX_MessageName() string { 77 return "google.protobuf.Empty" 78} 79func init() { 80 proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") 81} 82func (this *Empty) Compare(that interface{}) int { 83 if that == nil { 84 if this == nil { 85 return 0 86 } 87 return 1 88 } 89 90 that1, ok := that.(*Empty) 91 if !ok { 92 that2, ok := that.(Empty) 93 if ok { 94 that1 = &that2 95 } else { 96 return 1 97 } 98 } 99 if that1 == nil { 100 if this == nil { 101 return 0 102 } 103 return 1 104 } else if this == nil { 105 return -1 106 } 107 if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { 108 return c 109 } 110 return 0 111} 112func (this *Empty) Equal(that interface{}) bool { 113 if that == nil { 114 return this == nil 115 } 116 117 that1, ok := that.(*Empty) 118 if !ok { 119 that2, ok := that.(Empty) 120 if ok { 121 that1 = &that2 122 } else { 123 return false 124 } 125 } 126 if that1 == nil { 127 return this == nil 128 } else if this == nil { 129 return false 130 } 131 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { 132 return false 133 } 134 return true 135} 136func (this *Empty) GoString() string { 137 if this == nil { 138 return "nil" 139 } 140 s := make([]string, 0, 4) 141 s = append(s, "&types.Empty{") 142 if this.XXX_unrecognized != nil { 143 s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") 144 } 145 s = append(s, "}") 146 return strings.Join(s, "") 147} 148func valueToGoStringEmpty(v interface{}, typ string) string { 149 rv := reflect.ValueOf(v) 150 if rv.IsNil() { 151 return "nil" 152 } 153 pv := reflect.Indirect(rv).Interface() 154 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 155} 156func (m *Empty) Marshal() (dAtA []byte, err error) { 157 size := m.Size() 158 dAtA = make([]byte, size) 159 n, err := m.MarshalTo(dAtA) 160 if err != nil { 161 return nil, err 162 } 163 return dAtA[:n], nil 164} 165 166func (m *Empty) MarshalTo(dAtA []byte) (int, error) { 167 var i int 168 _ = i 169 var l int 170 _ = l 171 if m.XXX_unrecognized != nil { 172 i += copy(dAtA[i:], m.XXX_unrecognized) 173 } 174 return i, nil 175} 176 177func encodeVarintEmpty(dAtA []byte, offset int, v uint64) int { 178 for v >= 1<<7 { 179 dAtA[offset] = uint8(v&0x7f | 0x80) 180 v >>= 7 181 offset++ 182 } 183 dAtA[offset] = uint8(v) 184 return offset + 1 185} 186func NewPopulatedEmpty(r randyEmpty, easy bool) *Empty { 187 this := &Empty{} 188 if !easy && r.Intn(10) != 0 { 189 this.XXX_unrecognized = randUnrecognizedEmpty(r, 1) 190 } 191 return this 192} 193 194type randyEmpty interface { 195 Float32() float32 196 Float64() float64 197 Int63() int64 198 Int31() int32 199 Uint32() uint32 200 Intn(n int) int 201} 202 203func randUTF8RuneEmpty(r randyEmpty) rune { 204 ru := r.Intn(62) 205 if ru < 10 { 206 return rune(ru + 48) 207 } else if ru < 36 { 208 return rune(ru + 55) 209 } 210 return rune(ru + 61) 211} 212func randStringEmpty(r randyEmpty) string { 213 v1 := r.Intn(100) 214 tmps := make([]rune, v1) 215 for i := 0; i < v1; i++ { 216 tmps[i] = randUTF8RuneEmpty(r) 217 } 218 return string(tmps) 219} 220func randUnrecognizedEmpty(r randyEmpty, maxFieldNumber int) (dAtA []byte) { 221 l := r.Intn(5) 222 for i := 0; i < l; i++ { 223 wire := r.Intn(4) 224 if wire == 3 { 225 wire = 5 226 } 227 fieldNumber := maxFieldNumber + r.Intn(100) 228 dAtA = randFieldEmpty(dAtA, r, fieldNumber, wire) 229 } 230 return dAtA 231} 232func randFieldEmpty(dAtA []byte, r randyEmpty, fieldNumber int, wire int) []byte { 233 key := uint32(fieldNumber)<<3 | uint32(wire) 234 switch wire { 235 case 0: 236 dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) 237 v2 := r.Int63() 238 if r.Intn(2) == 0 { 239 v2 *= -1 240 } 241 dAtA = encodeVarintPopulateEmpty(dAtA, uint64(v2)) 242 case 1: 243 dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) 244 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))) 245 case 2: 246 dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) 247 ll := r.Intn(100) 248 dAtA = encodeVarintPopulateEmpty(dAtA, uint64(ll)) 249 for j := 0; j < ll; j++ { 250 dAtA = append(dAtA, byte(r.Intn(256))) 251 } 252 default: 253 dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) 254 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 255 } 256 return dAtA 257} 258func encodeVarintPopulateEmpty(dAtA []byte, v uint64) []byte { 259 for v >= 1<<7 { 260 dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) 261 v >>= 7 262 } 263 dAtA = append(dAtA, uint8(v)) 264 return dAtA 265} 266func (m *Empty) Size() (n int) { 267 var l int 268 _ = l 269 if m.XXX_unrecognized != nil { 270 n += len(m.XXX_unrecognized) 271 } 272 return n 273} 274 275func sovEmpty(x uint64) (n int) { 276 for { 277 n++ 278 x >>= 7 279 if x == 0 { 280 break 281 } 282 } 283 return n 284} 285func sozEmpty(x uint64) (n int) { 286 return sovEmpty(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 287} 288func (this *Empty) String() string { 289 if this == nil { 290 return "nil" 291 } 292 s := strings.Join([]string{`&Empty{`, 293 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 294 `}`, 295 }, "") 296 return s 297} 298func valueToStringEmpty(v interface{}) string { 299 rv := reflect.ValueOf(v) 300 if rv.IsNil() { 301 return "nil" 302 } 303 pv := reflect.Indirect(rv).Interface() 304 return fmt.Sprintf("*%v", pv) 305} 306func (m *Empty) Unmarshal(dAtA []byte) error { 307 l := len(dAtA) 308 iNdEx := 0 309 for iNdEx < l { 310 preIndex := iNdEx 311 var wire uint64 312 for shift := uint(0); ; shift += 7 { 313 if shift >= 64 { 314 return ErrIntOverflowEmpty 315 } 316 if iNdEx >= l { 317 return io.ErrUnexpectedEOF 318 } 319 b := dAtA[iNdEx] 320 iNdEx++ 321 wire |= (uint64(b) & 0x7F) << shift 322 if b < 0x80 { 323 break 324 } 325 } 326 fieldNum := int32(wire >> 3) 327 wireType := int(wire & 0x7) 328 if wireType == 4 { 329 return fmt.Errorf("proto: Empty: wiretype end group for non-group") 330 } 331 if fieldNum <= 0 { 332 return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) 333 } 334 switch fieldNum { 335 default: 336 iNdEx = preIndex 337 skippy, err := skipEmpty(dAtA[iNdEx:]) 338 if err != nil { 339 return err 340 } 341 if skippy < 0 { 342 return ErrInvalidLengthEmpty 343 } 344 if (iNdEx + skippy) > l { 345 return io.ErrUnexpectedEOF 346 } 347 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 348 iNdEx += skippy 349 } 350 } 351 352 if iNdEx > l { 353 return io.ErrUnexpectedEOF 354 } 355 return nil 356} 357func skipEmpty(dAtA []byte) (n int, err error) { 358 l := len(dAtA) 359 iNdEx := 0 360 for iNdEx < l { 361 var wire uint64 362 for shift := uint(0); ; shift += 7 { 363 if shift >= 64 { 364 return 0, ErrIntOverflowEmpty 365 } 366 if iNdEx >= l { 367 return 0, io.ErrUnexpectedEOF 368 } 369 b := dAtA[iNdEx] 370 iNdEx++ 371 wire |= (uint64(b) & 0x7F) << shift 372 if b < 0x80 { 373 break 374 } 375 } 376 wireType := int(wire & 0x7) 377 switch wireType { 378 case 0: 379 for shift := uint(0); ; shift += 7 { 380 if shift >= 64 { 381 return 0, ErrIntOverflowEmpty 382 } 383 if iNdEx >= l { 384 return 0, io.ErrUnexpectedEOF 385 } 386 iNdEx++ 387 if dAtA[iNdEx-1] < 0x80 { 388 break 389 } 390 } 391 return iNdEx, nil 392 case 1: 393 iNdEx += 8 394 return iNdEx, nil 395 case 2: 396 var length int 397 for shift := uint(0); ; shift += 7 { 398 if shift >= 64 { 399 return 0, ErrIntOverflowEmpty 400 } 401 if iNdEx >= l { 402 return 0, io.ErrUnexpectedEOF 403 } 404 b := dAtA[iNdEx] 405 iNdEx++ 406 length |= (int(b) & 0x7F) << shift 407 if b < 0x80 { 408 break 409 } 410 } 411 iNdEx += length 412 if length < 0 { 413 return 0, ErrInvalidLengthEmpty 414 } 415 return iNdEx, nil 416 case 3: 417 for { 418 var innerWire uint64 419 var start int = iNdEx 420 for shift := uint(0); ; shift += 7 { 421 if shift >= 64 { 422 return 0, ErrIntOverflowEmpty 423 } 424 if iNdEx >= l { 425 return 0, io.ErrUnexpectedEOF 426 } 427 b := dAtA[iNdEx] 428 iNdEx++ 429 innerWire |= (uint64(b) & 0x7F) << shift 430 if b < 0x80 { 431 break 432 } 433 } 434 innerWireType := int(innerWire & 0x7) 435 if innerWireType == 4 { 436 break 437 } 438 next, err := skipEmpty(dAtA[start:]) 439 if err != nil { 440 return 0, err 441 } 442 iNdEx = start + next 443 } 444 return iNdEx, nil 445 case 4: 446 return iNdEx, nil 447 case 5: 448 iNdEx += 4 449 return iNdEx, nil 450 default: 451 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 452 } 453 } 454 panic("unreachable") 455} 456 457var ( 458 ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") 459 ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") 460) 461 462func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_empty_fa64318be3e23895) } 463 464var fileDescriptor_empty_fa64318be3e23895 = []byte{ 465 // 180 bytes of a gzipped FileDescriptorProto 466 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, 467 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28, 468 0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57, 469 0x90, 0xbc, 0x53, 0x07, 0xe3, 0x85, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31, 0x7c, 0x78, 0x28, 470 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 471 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, 472 0x80, 0xc4, 0x1f, 0xcb, 0x31, 0x9e, 0x78, 0x2c, 0xc7, 0xc8, 0x25, 0x9c, 0x9c, 0x9f, 0xab, 0x87, 473 0x66, 0xa8, 0x13, 0x17, 0xd8, 0xc8, 0x00, 0x10, 0x37, 0x80, 0x31, 0x8a, 0xb5, 0xa4, 0xb2, 0x20, 474 0xb5, 0xf8, 0x07, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10, 475 0xf5, 0x01, 0x50, 0xf5, 0x7a, 0xe1, 0xa9, 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x20, 476 0x95, 0x49, 0x6c, 0x60, 0x83, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x07, 0x8c, 0xf8, 0x26, 477 0xca, 0x00, 0x00, 0x00, 478} 479