deviceid_test.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. // Code generated by protoc-gen-gogo.
  2. // source: deviceid_test.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package protocol is a generated protocol buffer package.
  6. It is generated from these files:
  7. deviceid_test.proto
  8. It has these top-level messages:
  9. TestOldDeviceID
  10. TestNewDeviceID
  11. */
  12. package protocol
  13. import proto "github.com/gogo/protobuf/proto"
  14. import fmt "fmt"
  15. import math "math"
  16. import _ "github.com/gogo/protobuf/gogoproto"
  17. import io "io"
  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. // 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.
  26. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  27. type TestOldDeviceID struct {
  28. Test []byte `protobuf:"bytes,1,opt,name=test,proto3" json:"test,omitempty"`
  29. }
  30. func (m *TestOldDeviceID) Reset() { *m = TestOldDeviceID{} }
  31. func (m *TestOldDeviceID) String() string { return proto.CompactTextString(m) }
  32. func (*TestOldDeviceID) ProtoMessage() {}
  33. func (*TestOldDeviceID) Descriptor() ([]byte, []int) { return fileDescriptorDeviceidTest, []int{0} }
  34. type TestNewDeviceID struct {
  35. Test DeviceID `protobuf:"bytes,1,opt,name=test,proto3,customtype=DeviceID" json:"test"`
  36. }
  37. func (m *TestNewDeviceID) Reset() { *m = TestNewDeviceID{} }
  38. func (m *TestNewDeviceID) String() string { return proto.CompactTextString(m) }
  39. func (*TestNewDeviceID) ProtoMessage() {}
  40. func (*TestNewDeviceID) Descriptor() ([]byte, []int) { return fileDescriptorDeviceidTest, []int{1} }
  41. func init() {
  42. proto.RegisterType((*TestOldDeviceID)(nil), "protocol.TestOldDeviceID")
  43. proto.RegisterType((*TestNewDeviceID)(nil), "protocol.TestNewDeviceID")
  44. }
  45. func (m *TestOldDeviceID) Marshal() (dAtA []byte, err error) {
  46. size := m.ProtoSize()
  47. dAtA = make([]byte, size)
  48. n, err := m.MarshalTo(dAtA)
  49. if err != nil {
  50. return nil, err
  51. }
  52. return dAtA[:n], nil
  53. }
  54. func (m *TestOldDeviceID) MarshalTo(dAtA []byte) (int, error) {
  55. var i int
  56. _ = i
  57. var l int
  58. _ = l
  59. if len(m.Test) > 0 {
  60. dAtA[i] = 0xa
  61. i++
  62. i = encodeVarintDeviceidTest(dAtA, i, uint64(len(m.Test)))
  63. i += copy(dAtA[i:], m.Test)
  64. }
  65. return i, nil
  66. }
  67. func (m *TestNewDeviceID) Marshal() (dAtA []byte, err error) {
  68. size := m.ProtoSize()
  69. dAtA = make([]byte, size)
  70. n, err := m.MarshalTo(dAtA)
  71. if err != nil {
  72. return nil, err
  73. }
  74. return dAtA[:n], nil
  75. }
  76. func (m *TestNewDeviceID) MarshalTo(dAtA []byte) (int, error) {
  77. var i int
  78. _ = i
  79. var l int
  80. _ = l
  81. dAtA[i] = 0xa
  82. i++
  83. i = encodeVarintDeviceidTest(dAtA, i, uint64(m.Test.ProtoSize()))
  84. n1, err := m.Test.MarshalTo(dAtA[i:])
  85. if err != nil {
  86. return 0, err
  87. }
  88. i += n1
  89. return i, nil
  90. }
  91. func encodeFixed64DeviceidTest(dAtA []byte, offset int, v uint64) int {
  92. dAtA[offset] = uint8(v)
  93. dAtA[offset+1] = uint8(v >> 8)
  94. dAtA[offset+2] = uint8(v >> 16)
  95. dAtA[offset+3] = uint8(v >> 24)
  96. dAtA[offset+4] = uint8(v >> 32)
  97. dAtA[offset+5] = uint8(v >> 40)
  98. dAtA[offset+6] = uint8(v >> 48)
  99. dAtA[offset+7] = uint8(v >> 56)
  100. return offset + 8
  101. }
  102. func encodeFixed32DeviceidTest(dAtA []byte, offset int, v uint32) int {
  103. dAtA[offset] = uint8(v)
  104. dAtA[offset+1] = uint8(v >> 8)
  105. dAtA[offset+2] = uint8(v >> 16)
  106. dAtA[offset+3] = uint8(v >> 24)
  107. return offset + 4
  108. }
  109. func encodeVarintDeviceidTest(dAtA []byte, offset int, v uint64) int {
  110. for v >= 1<<7 {
  111. dAtA[offset] = uint8(v&0x7f | 0x80)
  112. v >>= 7
  113. offset++
  114. }
  115. dAtA[offset] = uint8(v)
  116. return offset + 1
  117. }
  118. func (m *TestOldDeviceID) ProtoSize() (n int) {
  119. var l int
  120. _ = l
  121. l = len(m.Test)
  122. if l > 0 {
  123. n += 1 + l + sovDeviceidTest(uint64(l))
  124. }
  125. return n
  126. }
  127. func (m *TestNewDeviceID) ProtoSize() (n int) {
  128. var l int
  129. _ = l
  130. l = m.Test.ProtoSize()
  131. n += 1 + l + sovDeviceidTest(uint64(l))
  132. return n
  133. }
  134. func sovDeviceidTest(x uint64) (n int) {
  135. for {
  136. n++
  137. x >>= 7
  138. if x == 0 {
  139. break
  140. }
  141. }
  142. return n
  143. }
  144. func sozDeviceidTest(x uint64) (n int) {
  145. return sovDeviceidTest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  146. }
  147. func (m *TestOldDeviceID) Unmarshal(dAtA []byte) error {
  148. l := len(dAtA)
  149. iNdEx := 0
  150. for iNdEx < l {
  151. preIndex := iNdEx
  152. var wire uint64
  153. for shift := uint(0); ; shift += 7 {
  154. if shift >= 64 {
  155. return ErrIntOverflowDeviceidTest
  156. }
  157. if iNdEx >= l {
  158. return io.ErrUnexpectedEOF
  159. }
  160. b := dAtA[iNdEx]
  161. iNdEx++
  162. wire |= (uint64(b) & 0x7F) << shift
  163. if b < 0x80 {
  164. break
  165. }
  166. }
  167. fieldNum := int32(wire >> 3)
  168. wireType := int(wire & 0x7)
  169. if wireType == 4 {
  170. return fmt.Errorf("proto: TestOldDeviceID: wiretype end group for non-group")
  171. }
  172. if fieldNum <= 0 {
  173. return fmt.Errorf("proto: TestOldDeviceID: illegal tag %d (wire type %d)", fieldNum, wire)
  174. }
  175. switch fieldNum {
  176. case 1:
  177. if wireType != 2 {
  178. return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType)
  179. }
  180. var byteLen int
  181. for shift := uint(0); ; shift += 7 {
  182. if shift >= 64 {
  183. return ErrIntOverflowDeviceidTest
  184. }
  185. if iNdEx >= l {
  186. return io.ErrUnexpectedEOF
  187. }
  188. b := dAtA[iNdEx]
  189. iNdEx++
  190. byteLen |= (int(b) & 0x7F) << shift
  191. if b < 0x80 {
  192. break
  193. }
  194. }
  195. if byteLen < 0 {
  196. return ErrInvalidLengthDeviceidTest
  197. }
  198. postIndex := iNdEx + byteLen
  199. if postIndex > l {
  200. return io.ErrUnexpectedEOF
  201. }
  202. m.Test = append(m.Test[:0], dAtA[iNdEx:postIndex]...)
  203. if m.Test == nil {
  204. m.Test = []byte{}
  205. }
  206. iNdEx = postIndex
  207. default:
  208. iNdEx = preIndex
  209. skippy, err := skipDeviceidTest(dAtA[iNdEx:])
  210. if err != nil {
  211. return err
  212. }
  213. if skippy < 0 {
  214. return ErrInvalidLengthDeviceidTest
  215. }
  216. if (iNdEx + skippy) > l {
  217. return io.ErrUnexpectedEOF
  218. }
  219. iNdEx += skippy
  220. }
  221. }
  222. if iNdEx > l {
  223. return io.ErrUnexpectedEOF
  224. }
  225. return nil
  226. }
  227. func (m *TestNewDeviceID) Unmarshal(dAtA []byte) error {
  228. l := len(dAtA)
  229. iNdEx := 0
  230. for iNdEx < l {
  231. preIndex := iNdEx
  232. var wire uint64
  233. for shift := uint(0); ; shift += 7 {
  234. if shift >= 64 {
  235. return ErrIntOverflowDeviceidTest
  236. }
  237. if iNdEx >= l {
  238. return io.ErrUnexpectedEOF
  239. }
  240. b := dAtA[iNdEx]
  241. iNdEx++
  242. wire |= (uint64(b) & 0x7F) << shift
  243. if b < 0x80 {
  244. break
  245. }
  246. }
  247. fieldNum := int32(wire >> 3)
  248. wireType := int(wire & 0x7)
  249. if wireType == 4 {
  250. return fmt.Errorf("proto: TestNewDeviceID: wiretype end group for non-group")
  251. }
  252. if fieldNum <= 0 {
  253. return fmt.Errorf("proto: TestNewDeviceID: illegal tag %d (wire type %d)", fieldNum, wire)
  254. }
  255. switch fieldNum {
  256. case 1:
  257. if wireType != 2 {
  258. return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType)
  259. }
  260. var byteLen int
  261. for shift := uint(0); ; shift += 7 {
  262. if shift >= 64 {
  263. return ErrIntOverflowDeviceidTest
  264. }
  265. if iNdEx >= l {
  266. return io.ErrUnexpectedEOF
  267. }
  268. b := dAtA[iNdEx]
  269. iNdEx++
  270. byteLen |= (int(b) & 0x7F) << shift
  271. if b < 0x80 {
  272. break
  273. }
  274. }
  275. if byteLen < 0 {
  276. return ErrInvalidLengthDeviceidTest
  277. }
  278. postIndex := iNdEx + byteLen
  279. if postIndex > l {
  280. return io.ErrUnexpectedEOF
  281. }
  282. if err := m.Test.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  283. return err
  284. }
  285. iNdEx = postIndex
  286. default:
  287. iNdEx = preIndex
  288. skippy, err := skipDeviceidTest(dAtA[iNdEx:])
  289. if err != nil {
  290. return err
  291. }
  292. if skippy < 0 {
  293. return ErrInvalidLengthDeviceidTest
  294. }
  295. if (iNdEx + skippy) > l {
  296. return io.ErrUnexpectedEOF
  297. }
  298. iNdEx += skippy
  299. }
  300. }
  301. if iNdEx > l {
  302. return io.ErrUnexpectedEOF
  303. }
  304. return nil
  305. }
  306. func skipDeviceidTest(dAtA []byte) (n int, err error) {
  307. l := len(dAtA)
  308. iNdEx := 0
  309. for iNdEx < l {
  310. var wire uint64
  311. for shift := uint(0); ; shift += 7 {
  312. if shift >= 64 {
  313. return 0, ErrIntOverflowDeviceidTest
  314. }
  315. if iNdEx >= l {
  316. return 0, io.ErrUnexpectedEOF
  317. }
  318. b := dAtA[iNdEx]
  319. iNdEx++
  320. wire |= (uint64(b) & 0x7F) << shift
  321. if b < 0x80 {
  322. break
  323. }
  324. }
  325. wireType := int(wire & 0x7)
  326. switch wireType {
  327. case 0:
  328. for shift := uint(0); ; shift += 7 {
  329. if shift >= 64 {
  330. return 0, ErrIntOverflowDeviceidTest
  331. }
  332. if iNdEx >= l {
  333. return 0, io.ErrUnexpectedEOF
  334. }
  335. iNdEx++
  336. if dAtA[iNdEx-1] < 0x80 {
  337. break
  338. }
  339. }
  340. return iNdEx, nil
  341. case 1:
  342. iNdEx += 8
  343. return iNdEx, nil
  344. case 2:
  345. var length int
  346. for shift := uint(0); ; shift += 7 {
  347. if shift >= 64 {
  348. return 0, ErrIntOverflowDeviceidTest
  349. }
  350. if iNdEx >= l {
  351. return 0, io.ErrUnexpectedEOF
  352. }
  353. b := dAtA[iNdEx]
  354. iNdEx++
  355. length |= (int(b) & 0x7F) << shift
  356. if b < 0x80 {
  357. break
  358. }
  359. }
  360. iNdEx += length
  361. if length < 0 {
  362. return 0, ErrInvalidLengthDeviceidTest
  363. }
  364. return iNdEx, nil
  365. case 3:
  366. for {
  367. var innerWire uint64
  368. var start int = iNdEx
  369. for shift := uint(0); ; shift += 7 {
  370. if shift >= 64 {
  371. return 0, ErrIntOverflowDeviceidTest
  372. }
  373. if iNdEx >= l {
  374. return 0, io.ErrUnexpectedEOF
  375. }
  376. b := dAtA[iNdEx]
  377. iNdEx++
  378. innerWire |= (uint64(b) & 0x7F) << shift
  379. if b < 0x80 {
  380. break
  381. }
  382. }
  383. innerWireType := int(innerWire & 0x7)
  384. if innerWireType == 4 {
  385. break
  386. }
  387. next, err := skipDeviceidTest(dAtA[start:])
  388. if err != nil {
  389. return 0, err
  390. }
  391. iNdEx = start + next
  392. }
  393. return iNdEx, nil
  394. case 4:
  395. return iNdEx, nil
  396. case 5:
  397. iNdEx += 4
  398. return iNdEx, nil
  399. default:
  400. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  401. }
  402. }
  403. panic("unreachable")
  404. }
  405. var (
  406. ErrInvalidLengthDeviceidTest = fmt.Errorf("proto: negative length found during unmarshaling")
  407. ErrIntOverflowDeviceidTest = fmt.Errorf("proto: integer overflow")
  408. )
  409. func init() { proto.RegisterFile("deviceid_test.proto", fileDescriptorDeviceidTest) }
  410. var fileDescriptorDeviceidTest = []byte{
  411. // 176 bytes of a gzipped FileDescriptorProto
  412. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4e, 0x49, 0x2d, 0xcb,
  413. 0x4c, 0x4e, 0xcd, 0x4c, 0x89, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17,
  414. 0xe2, 0x00, 0x53, 0xc9, 0xf9, 0x39, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9,
  415. 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0x99, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc,
  416. 0x01, 0xb3, 0x20, 0x1a, 0x95, 0x54, 0xb9, 0xf8, 0x43, 0x52, 0x8b, 0x4b, 0xfc, 0x73, 0x52, 0x5c,
  417. 0xc0, 0xc6, 0x7a, 0xba, 0x08, 0x09, 0x71, 0xb1, 0x80, 0x4c, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0,
  418. 0x09, 0x02, 0xb3, 0x95, 0xcc, 0x21, 0xca, 0xfc, 0x52, 0xcb, 0xe1, 0xca, 0x54, 0x90, 0x95, 0x39,
  419. 0x09, 0x9c, 0xb8, 0x27, 0xcf, 0x70, 0xeb, 0x9e, 0x3c, 0x07, 0x4c, 0x1e, 0xa2, 0xd1, 0x49, 0xe6,
  420. 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e,
  421. 0xf1, 0xc1, 0x23, 0x39, 0x86, 0x17, 0x8f, 0xe4, 0x18, 0x16, 0x3c, 0x96, 0x63, 0x4c, 0x62, 0x03,
  422. 0x3b, 0xc2, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x35, 0x9c, 0x00, 0x78, 0xd4, 0x00, 0x00, 0x00,
  423. }