enumdeclall.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: enumdeclall.proto
  3. /*
  4. Package enumdeclall is a generated protocol buffer package.
  5. It is generated from these files:
  6. enumdeclall.proto
  7. It has these top-level messages:
  8. Message
  9. */
  10. package enumdeclall
  11. import proto "github.com/gogo/protobuf/proto"
  12. import fmt "fmt"
  13. import math "math"
  14. import _ "github.com/gogo/protobuf/gogoproto"
  15. import io "io"
  16. // Reference imports to suppress errors if they are not otherwise used.
  17. var _ = proto.Marshal
  18. var _ = fmt.Errorf
  19. var _ = math.Inf
  20. // This is a compile-time assertion to ensure that this generated file
  21. // is compatible with the proto package it is being compiled against.
  22. // A compilation error at this line likely means your copy of the
  23. // proto package needs to be updated.
  24. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  25. var MyEnum_name = map[int32]string{
  26. 0: "A",
  27. 1: "B",
  28. }
  29. var MyEnum_value = map[string]int32{
  30. "A": 0,
  31. "B": 1,
  32. }
  33. func (x MyEnum) String() string {
  34. return proto.EnumName(MyEnum_name, int32(x))
  35. }
  36. func (MyEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorEnumdeclall, []int{0} }
  37. type MyOtherEnum int32
  38. const (
  39. C MyOtherEnum = 0
  40. D MyOtherEnum = 1
  41. )
  42. var MyOtherEnum_name = map[int32]string{
  43. 0: "C",
  44. 1: "D",
  45. }
  46. var MyOtherEnum_value = map[string]int32{
  47. "C": 0,
  48. "D": 1,
  49. }
  50. func (x MyOtherEnum) String() string {
  51. return proto.EnumName(MyOtherEnum_name, int32(x))
  52. }
  53. func (MyOtherEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorEnumdeclall, []int{1} }
  54. type Message struct {
  55. EnumeratedField MyEnum `protobuf:"varint,1,opt,name=enumerated_field,json=enumeratedField,proto3,enum=enumdeclall.MyEnum" json:"enumerated_field,omitempty"`
  56. OtherenumeratedField MyOtherEnum `protobuf:"varint,2,opt,name=otherenumerated_field,json=otherenumeratedField,proto3,enum=enumdeclall.MyOtherEnum" json:"otherenumerated_field,omitempty"`
  57. }
  58. func (m *Message) Reset() { *m = Message{} }
  59. func (m *Message) String() string { return proto.CompactTextString(m) }
  60. func (*Message) ProtoMessage() {}
  61. func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorEnumdeclall, []int{0} }
  62. func (m *Message) GetEnumeratedField() MyEnum {
  63. if m != nil {
  64. return m.EnumeratedField
  65. }
  66. return A
  67. }
  68. func (m *Message) GetOtherenumeratedField() MyOtherEnum {
  69. if m != nil {
  70. return m.OtherenumeratedField
  71. }
  72. return C
  73. }
  74. func init() {
  75. proto.RegisterType((*Message)(nil), "enumdeclall.Message")
  76. proto.RegisterEnum("enumdeclall.MyEnum", MyEnum_name, MyEnum_value)
  77. proto.RegisterEnum("enumdeclall.MyOtherEnum", MyOtherEnum_name, MyOtherEnum_value)
  78. }
  79. func (this *Message) VerboseEqual(that interface{}) error {
  80. if that == nil {
  81. if this == nil {
  82. return nil
  83. }
  84. return fmt.Errorf("that == nil && this != nil")
  85. }
  86. that1, ok := that.(*Message)
  87. if !ok {
  88. that2, ok := that.(Message)
  89. if ok {
  90. that1 = &that2
  91. } else {
  92. return fmt.Errorf("that is not of type *Message")
  93. }
  94. }
  95. if that1 == nil {
  96. if this == nil {
  97. return nil
  98. }
  99. return fmt.Errorf("that is type *Message but is nil && this != nil")
  100. } else if this == nil {
  101. return fmt.Errorf("that is type *Message but is not nil && this == nil")
  102. }
  103. if this.EnumeratedField != that1.EnumeratedField {
  104. return fmt.Errorf("EnumeratedField this(%v) Not Equal that(%v)", this.EnumeratedField, that1.EnumeratedField)
  105. }
  106. if this.OtherenumeratedField != that1.OtherenumeratedField {
  107. return fmt.Errorf("OtherenumeratedField this(%v) Not Equal that(%v)", this.OtherenumeratedField, that1.OtherenumeratedField)
  108. }
  109. return nil
  110. }
  111. func (this *Message) Equal(that interface{}) bool {
  112. if that == nil {
  113. if this == nil {
  114. return true
  115. }
  116. return false
  117. }
  118. that1, ok := that.(*Message)
  119. if !ok {
  120. that2, ok := that.(Message)
  121. if ok {
  122. that1 = &that2
  123. } else {
  124. return false
  125. }
  126. }
  127. if that1 == nil {
  128. if this == nil {
  129. return true
  130. }
  131. return false
  132. } else if this == nil {
  133. return false
  134. }
  135. if this.EnumeratedField != that1.EnumeratedField {
  136. return false
  137. }
  138. if this.OtherenumeratedField != that1.OtherenumeratedField {
  139. return false
  140. }
  141. return true
  142. }
  143. func (m *Message) Marshal() (dAtA []byte, err error) {
  144. size := m.Size()
  145. dAtA = make([]byte, size)
  146. n, err := m.MarshalTo(dAtA)
  147. if err != nil {
  148. return nil, err
  149. }
  150. return dAtA[:n], nil
  151. }
  152. func (m *Message) MarshalTo(dAtA []byte) (int, error) {
  153. var i int
  154. _ = i
  155. var l int
  156. _ = l
  157. if m.EnumeratedField != 0 {
  158. dAtA[i] = 0x8
  159. i++
  160. i = encodeVarintEnumdeclall(dAtA, i, uint64(m.EnumeratedField))
  161. }
  162. if m.OtherenumeratedField != 0 {
  163. dAtA[i] = 0x10
  164. i++
  165. i = encodeVarintEnumdeclall(dAtA, i, uint64(m.OtherenumeratedField))
  166. }
  167. return i, nil
  168. }
  169. func encodeVarintEnumdeclall(dAtA []byte, offset int, v uint64) int {
  170. for v >= 1<<7 {
  171. dAtA[offset] = uint8(v&0x7f | 0x80)
  172. v >>= 7
  173. offset++
  174. }
  175. dAtA[offset] = uint8(v)
  176. return offset + 1
  177. }
  178. func NewPopulatedMessage(r randyEnumdeclall, easy bool) *Message {
  179. this := &Message{}
  180. this.EnumeratedField = MyEnum([]int32{0, 1}[r.Intn(2)])
  181. this.OtherenumeratedField = MyOtherEnum([]int32{0, 1}[r.Intn(2)])
  182. if !easy && r.Intn(10) != 0 {
  183. }
  184. return this
  185. }
  186. type randyEnumdeclall interface {
  187. Float32() float32
  188. Float64() float64
  189. Int63() int64
  190. Int31() int32
  191. Uint32() uint32
  192. Intn(n int) int
  193. }
  194. func randUTF8RuneEnumdeclall(r randyEnumdeclall) rune {
  195. ru := r.Intn(62)
  196. if ru < 10 {
  197. return rune(ru + 48)
  198. } else if ru < 36 {
  199. return rune(ru + 55)
  200. }
  201. return rune(ru + 61)
  202. }
  203. func randStringEnumdeclall(r randyEnumdeclall) string {
  204. v1 := r.Intn(100)
  205. tmps := make([]rune, v1)
  206. for i := 0; i < v1; i++ {
  207. tmps[i] = randUTF8RuneEnumdeclall(r)
  208. }
  209. return string(tmps)
  210. }
  211. func randUnrecognizedEnumdeclall(r randyEnumdeclall, maxFieldNumber int) (dAtA []byte) {
  212. l := r.Intn(5)
  213. for i := 0; i < l; i++ {
  214. wire := r.Intn(4)
  215. if wire == 3 {
  216. wire = 5
  217. }
  218. fieldNumber := maxFieldNumber + r.Intn(100)
  219. dAtA = randFieldEnumdeclall(dAtA, r, fieldNumber, wire)
  220. }
  221. return dAtA
  222. }
  223. func randFieldEnumdeclall(dAtA []byte, r randyEnumdeclall, fieldNumber int, wire int) []byte {
  224. key := uint32(fieldNumber)<<3 | uint32(wire)
  225. switch wire {
  226. case 0:
  227. dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key))
  228. v2 := r.Int63()
  229. if r.Intn(2) == 0 {
  230. v2 *= -1
  231. }
  232. dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(v2))
  233. case 1:
  234. dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key))
  235. 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)))
  236. case 2:
  237. dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key))
  238. ll := r.Intn(100)
  239. dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(ll))
  240. for j := 0; j < ll; j++ {
  241. dAtA = append(dAtA, byte(r.Intn(256)))
  242. }
  243. default:
  244. dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key))
  245. dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
  246. }
  247. return dAtA
  248. }
  249. func encodeVarintPopulateEnumdeclall(dAtA []byte, v uint64) []byte {
  250. for v >= 1<<7 {
  251. dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
  252. v >>= 7
  253. }
  254. dAtA = append(dAtA, uint8(v))
  255. return dAtA
  256. }
  257. func (m *Message) Size() (n int) {
  258. var l int
  259. _ = l
  260. if m.EnumeratedField != 0 {
  261. n += 1 + sovEnumdeclall(uint64(m.EnumeratedField))
  262. }
  263. if m.OtherenumeratedField != 0 {
  264. n += 1 + sovEnumdeclall(uint64(m.OtherenumeratedField))
  265. }
  266. return n
  267. }
  268. func sovEnumdeclall(x uint64) (n int) {
  269. for {
  270. n++
  271. x >>= 7
  272. if x == 0 {
  273. break
  274. }
  275. }
  276. return n
  277. }
  278. func sozEnumdeclall(x uint64) (n int) {
  279. return sovEnumdeclall(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  280. }
  281. func (m *Message) Unmarshal(dAtA []byte) error {
  282. l := len(dAtA)
  283. iNdEx := 0
  284. for iNdEx < l {
  285. preIndex := iNdEx
  286. var wire uint64
  287. for shift := uint(0); ; shift += 7 {
  288. if shift >= 64 {
  289. return ErrIntOverflowEnumdeclall
  290. }
  291. if iNdEx >= l {
  292. return io.ErrUnexpectedEOF
  293. }
  294. b := dAtA[iNdEx]
  295. iNdEx++
  296. wire |= (uint64(b) & 0x7F) << shift
  297. if b < 0x80 {
  298. break
  299. }
  300. }
  301. fieldNum := int32(wire >> 3)
  302. wireType := int(wire & 0x7)
  303. if wireType == 4 {
  304. return fmt.Errorf("proto: Message: wiretype end group for non-group")
  305. }
  306. if fieldNum <= 0 {
  307. return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire)
  308. }
  309. switch fieldNum {
  310. case 1:
  311. if wireType != 0 {
  312. return fmt.Errorf("proto: wrong wireType = %d for field EnumeratedField", wireType)
  313. }
  314. m.EnumeratedField = 0
  315. for shift := uint(0); ; shift += 7 {
  316. if shift >= 64 {
  317. return ErrIntOverflowEnumdeclall
  318. }
  319. if iNdEx >= l {
  320. return io.ErrUnexpectedEOF
  321. }
  322. b := dAtA[iNdEx]
  323. iNdEx++
  324. m.EnumeratedField |= (MyEnum(b) & 0x7F) << shift
  325. if b < 0x80 {
  326. break
  327. }
  328. }
  329. case 2:
  330. if wireType != 0 {
  331. return fmt.Errorf("proto: wrong wireType = %d for field OtherenumeratedField", wireType)
  332. }
  333. m.OtherenumeratedField = 0
  334. for shift := uint(0); ; shift += 7 {
  335. if shift >= 64 {
  336. return ErrIntOverflowEnumdeclall
  337. }
  338. if iNdEx >= l {
  339. return io.ErrUnexpectedEOF
  340. }
  341. b := dAtA[iNdEx]
  342. iNdEx++
  343. m.OtherenumeratedField |= (MyOtherEnum(b) & 0x7F) << shift
  344. if b < 0x80 {
  345. break
  346. }
  347. }
  348. default:
  349. iNdEx = preIndex
  350. skippy, err := skipEnumdeclall(dAtA[iNdEx:])
  351. if err != nil {
  352. return err
  353. }
  354. if skippy < 0 {
  355. return ErrInvalidLengthEnumdeclall
  356. }
  357. if (iNdEx + skippy) > l {
  358. return io.ErrUnexpectedEOF
  359. }
  360. iNdEx += skippy
  361. }
  362. }
  363. if iNdEx > l {
  364. return io.ErrUnexpectedEOF
  365. }
  366. return nil
  367. }
  368. func skipEnumdeclall(dAtA []byte) (n int, err error) {
  369. l := len(dAtA)
  370. iNdEx := 0
  371. for iNdEx < l {
  372. var wire uint64
  373. for shift := uint(0); ; shift += 7 {
  374. if shift >= 64 {
  375. return 0, ErrIntOverflowEnumdeclall
  376. }
  377. if iNdEx >= l {
  378. return 0, io.ErrUnexpectedEOF
  379. }
  380. b := dAtA[iNdEx]
  381. iNdEx++
  382. wire |= (uint64(b) & 0x7F) << shift
  383. if b < 0x80 {
  384. break
  385. }
  386. }
  387. wireType := int(wire & 0x7)
  388. switch wireType {
  389. case 0:
  390. for shift := uint(0); ; shift += 7 {
  391. if shift >= 64 {
  392. return 0, ErrIntOverflowEnumdeclall
  393. }
  394. if iNdEx >= l {
  395. return 0, io.ErrUnexpectedEOF
  396. }
  397. iNdEx++
  398. if dAtA[iNdEx-1] < 0x80 {
  399. break
  400. }
  401. }
  402. return iNdEx, nil
  403. case 1:
  404. iNdEx += 8
  405. return iNdEx, nil
  406. case 2:
  407. var length int
  408. for shift := uint(0); ; shift += 7 {
  409. if shift >= 64 {
  410. return 0, ErrIntOverflowEnumdeclall
  411. }
  412. if iNdEx >= l {
  413. return 0, io.ErrUnexpectedEOF
  414. }
  415. b := dAtA[iNdEx]
  416. iNdEx++
  417. length |= (int(b) & 0x7F) << shift
  418. if b < 0x80 {
  419. break
  420. }
  421. }
  422. iNdEx += length
  423. if length < 0 {
  424. return 0, ErrInvalidLengthEnumdeclall
  425. }
  426. return iNdEx, nil
  427. case 3:
  428. for {
  429. var innerWire uint64
  430. var start int = iNdEx
  431. for shift := uint(0); ; shift += 7 {
  432. if shift >= 64 {
  433. return 0, ErrIntOverflowEnumdeclall
  434. }
  435. if iNdEx >= l {
  436. return 0, io.ErrUnexpectedEOF
  437. }
  438. b := dAtA[iNdEx]
  439. iNdEx++
  440. innerWire |= (uint64(b) & 0x7F) << shift
  441. if b < 0x80 {
  442. break
  443. }
  444. }
  445. innerWireType := int(innerWire & 0x7)
  446. if innerWireType == 4 {
  447. break
  448. }
  449. next, err := skipEnumdeclall(dAtA[start:])
  450. if err != nil {
  451. return 0, err
  452. }
  453. iNdEx = start + next
  454. }
  455. return iNdEx, nil
  456. case 4:
  457. return iNdEx, nil
  458. case 5:
  459. iNdEx += 4
  460. return iNdEx, nil
  461. default:
  462. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  463. }
  464. }
  465. panic("unreachable")
  466. }
  467. var (
  468. ErrInvalidLengthEnumdeclall = fmt.Errorf("proto: negative length found during unmarshaling")
  469. ErrIntOverflowEnumdeclall = fmt.Errorf("proto: integer overflow")
  470. )
  471. func init() { proto.RegisterFile("enumdeclall.proto", fileDescriptorEnumdeclall) }
  472. var fileDescriptorEnumdeclall = []byte{
  473. // 260 bytes of a gzipped FileDescriptorProto
  474. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4c, 0xcd, 0x2b, 0xcd,
  475. 0x4d, 0x49, 0x4d, 0xce, 0x49, 0xcc, 0xc9, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46,
  476. 0x12, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf,
  477. 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x49, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x57,
  478. 0x69, 0x06, 0x23, 0x17, 0xbb, 0x6f, 0x6a, 0x71, 0x71, 0x62, 0x7a, 0xaa, 0x90, 0x1d, 0x97, 0x00,
  479. 0xc8, 0xa4, 0xd4, 0xa2, 0xc4, 0x92, 0xd4, 0x94, 0xf8, 0xb4, 0xcc, 0xd4, 0x9c, 0x14, 0x09, 0x46,
  480. 0x05, 0x46, 0x0d, 0x3e, 0x23, 0x61, 0x3d, 0x64, 0x5b, 0x7d, 0x2b, 0x5d, 0xf3, 0x4a, 0x73, 0x83,
  481. 0xf8, 0x11, 0x8a, 0xdd, 0x40, 0x6a, 0x85, 0x7c, 0xb9, 0x44, 0xf3, 0x4b, 0x32, 0x52, 0x8b, 0x30,
  482. 0x0c, 0x61, 0x02, 0x1b, 0x22, 0x81, 0x66, 0x88, 0x3f, 0x48, 0x2d, 0xd8, 0x24, 0x11, 0x34, 0x6d,
  483. 0x60, 0xe3, 0xb4, 0x64, 0xb8, 0xd8, 0x20, 0x36, 0x09, 0xb1, 0x72, 0x31, 0x3a, 0x0a, 0x30, 0x80,
  484. 0x28, 0x27, 0x01, 0x46, 0x29, 0x96, 0x8e, 0xc5, 0x72, 0x0c, 0x5a, 0xaa, 0x5c, 0xdc, 0x48, 0x46,
  485. 0x80, 0xe4, 0x9c, 0x21, 0x4a, 0x5c, 0x04, 0x18, 0xa5, 0x38, 0x40, 0x4a, 0x0e, 0x2c, 0x91, 0x63,
  486. 0x74, 0xd2, 0x79, 0xf0, 0x50, 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77,
  487. 0x3c, 0x92, 0x63, 0x3c, 0xf0, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18,
  488. 0x1f, 0x3c, 0x92, 0x63, 0xfc, 0xf1, 0x48, 0x8e, 0xa1, 0xe1, 0xb1, 0x1c, 0xc3, 0x8e, 0xc7, 0x72,
  489. 0x0c, 0x49, 0x6c, 0xe0, 0x40, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x91, 0xd9, 0xaf,
  490. 0x65, 0x01, 0x00, 0x00,
  491. }