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_b366a5cbb7c614df, []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 if m == nil { 268 return 0 269 } 270 var l int 271 _ = l 272 if m.XXX_unrecognized != nil { 273 n += len(m.XXX_unrecognized) 274 } 275 return n 276} 277 278func sovEmpty(x uint64) (n int) { 279 for { 280 n++ 281 x >>= 7 282 if x == 0 { 283 break 284 } 285 } 286 return n 287} 288func sozEmpty(x uint64) (n int) { 289 return sovEmpty(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 290} 291func (this *Empty) String() string { 292 if this == nil { 293 return "nil" 294 } 295 s := strings.Join([]string{`&Empty{`, 296 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 297 `}`, 298 }, "") 299 return s 300} 301func valueToStringEmpty(v interface{}) string { 302 rv := reflect.ValueOf(v) 303 if rv.IsNil() { 304 return "nil" 305 } 306 pv := reflect.Indirect(rv).Interface() 307 return fmt.Sprintf("*%v", pv) 308} 309func (m *Empty) Unmarshal(dAtA []byte) error { 310 l := len(dAtA) 311 iNdEx := 0 312 for iNdEx < l { 313 preIndex := iNdEx 314 var wire uint64 315 for shift := uint(0); ; shift += 7 { 316 if shift >= 64 { 317 return ErrIntOverflowEmpty 318 } 319 if iNdEx >= l { 320 return io.ErrUnexpectedEOF 321 } 322 b := dAtA[iNdEx] 323 iNdEx++ 324 wire |= (uint64(b) & 0x7F) << shift 325 if b < 0x80 { 326 break 327 } 328 } 329 fieldNum := int32(wire >> 3) 330 wireType := int(wire & 0x7) 331 if wireType == 4 { 332 return fmt.Errorf("proto: Empty: wiretype end group for non-group") 333 } 334 if fieldNum <= 0 { 335 return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) 336 } 337 switch fieldNum { 338 default: 339 iNdEx = preIndex 340 skippy, err := skipEmpty(dAtA[iNdEx:]) 341 if err != nil { 342 return err 343 } 344 if skippy < 0 { 345 return ErrInvalidLengthEmpty 346 } 347 if (iNdEx + skippy) > l { 348 return io.ErrUnexpectedEOF 349 } 350 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 351 iNdEx += skippy 352 } 353 } 354 355 if iNdEx > l { 356 return io.ErrUnexpectedEOF 357 } 358 return nil 359} 360func skipEmpty(dAtA []byte) (n int, err error) { 361 l := len(dAtA) 362 iNdEx := 0 363 for iNdEx < l { 364 var wire uint64 365 for shift := uint(0); ; shift += 7 { 366 if shift >= 64 { 367 return 0, ErrIntOverflowEmpty 368 } 369 if iNdEx >= l { 370 return 0, io.ErrUnexpectedEOF 371 } 372 b := dAtA[iNdEx] 373 iNdEx++ 374 wire |= (uint64(b) & 0x7F) << shift 375 if b < 0x80 { 376 break 377 } 378 } 379 wireType := int(wire & 0x7) 380 switch wireType { 381 case 0: 382 for shift := uint(0); ; shift += 7 { 383 if shift >= 64 { 384 return 0, ErrIntOverflowEmpty 385 } 386 if iNdEx >= l { 387 return 0, io.ErrUnexpectedEOF 388 } 389 iNdEx++ 390 if dAtA[iNdEx-1] < 0x80 { 391 break 392 } 393 } 394 return iNdEx, nil 395 case 1: 396 iNdEx += 8 397 return iNdEx, nil 398 case 2: 399 var length int 400 for shift := uint(0); ; shift += 7 { 401 if shift >= 64 { 402 return 0, ErrIntOverflowEmpty 403 } 404 if iNdEx >= l { 405 return 0, io.ErrUnexpectedEOF 406 } 407 b := dAtA[iNdEx] 408 iNdEx++ 409 length |= (int(b) & 0x7F) << shift 410 if b < 0x80 { 411 break 412 } 413 } 414 iNdEx += length 415 if length < 0 { 416 return 0, ErrInvalidLengthEmpty 417 } 418 return iNdEx, nil 419 case 3: 420 for { 421 var innerWire uint64 422 var start int = iNdEx 423 for shift := uint(0); ; shift += 7 { 424 if shift >= 64 { 425 return 0, ErrIntOverflowEmpty 426 } 427 if iNdEx >= l { 428 return 0, io.ErrUnexpectedEOF 429 } 430 b := dAtA[iNdEx] 431 iNdEx++ 432 innerWire |= (uint64(b) & 0x7F) << shift 433 if b < 0x80 { 434 break 435 } 436 } 437 innerWireType := int(innerWire & 0x7) 438 if innerWireType == 4 { 439 break 440 } 441 next, err := skipEmpty(dAtA[start:]) 442 if err != nil { 443 return 0, err 444 } 445 iNdEx = start + next 446 } 447 return iNdEx, nil 448 case 4: 449 return iNdEx, nil 450 case 5: 451 iNdEx += 4 452 return iNdEx, nil 453 default: 454 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 455 } 456 } 457 panic("unreachable") 458} 459 460var ( 461 ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") 462 ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") 463) 464 465func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_empty_b366a5cbb7c614df) } 466 467var fileDescriptor_empty_b366a5cbb7c614df = []byte{ 468 // 176 bytes of a gzipped FileDescriptorProto 469 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, 470 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28, 471 0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57, 472 0x90, 0xbc, 0x53, 0x0b, 0xe3, 0x8d, 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, 473 0xc7, 0xd8, 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 474 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x20, 0xf1, 0xc7, 0x72, 475 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x19, 0xe8, 0xc4, 0x05, 476 0x36, 0x2e, 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x62, 0x2d, 0xa9, 0x2c, 0x48, 0x2d, 0xfe, 0xc1, 0xc8, 477 0xb8, 0x88, 0x89, 0xd9, 0x3d, 0xc0, 0x69, 0x15, 0x93, 0x9c, 0x3b, 0x44, 0x7d, 0x00, 0x54, 0xbd, 478 0x5e, 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x65, 0x12, 0x1b, 0xd8, 479 0x20, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0xbe, 0xb6, 0x31, 0xc6, 0x00, 0x00, 0x00, 480} 481