deviceid_test.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: deviceid_test.proto
  3. package protocol
  4. import proto "github.com/gogo/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import _ "github.com/gogo/protobuf/gogoproto"
  8. import io "io"
  9. // Reference imports to suppress errors if they are not otherwise used.
  10. var _ = proto.Marshal
  11. var _ = fmt.Errorf
  12. var _ = math.Inf
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the proto package it is being compiled against.
  15. // A compilation error at this line likely means your copy of the
  16. // proto package needs to be updated.
  17. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  18. type TestOldDeviceID struct {
  19. Test []byte `protobuf:"bytes,1,opt,name=test,proto3" json:"test,omitempty"`
  20. }
  21. func (m *TestOldDeviceID) Reset() { *m = TestOldDeviceID{} }
  22. func (m *TestOldDeviceID) String() string { return proto.CompactTextString(m) }
  23. func (*TestOldDeviceID) ProtoMessage() {}
  24. func (*TestOldDeviceID) Descriptor() ([]byte, []int) {
  25. return fileDescriptor_deviceid_test_36bcb89b605bdafe, []int{0}
  26. }
  27. func (m *TestOldDeviceID) XXX_Unmarshal(b []byte) error {
  28. return m.Unmarshal(b)
  29. }
  30. func (m *TestOldDeviceID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  31. if deterministic {
  32. return xxx_messageInfo_TestOldDeviceID.Marshal(b, m, deterministic)
  33. } else {
  34. b = b[:cap(b)]
  35. n, err := m.MarshalTo(b)
  36. if err != nil {
  37. return nil, err
  38. }
  39. return b[:n], nil
  40. }
  41. }
  42. func (dst *TestOldDeviceID) XXX_Merge(src proto.Message) {
  43. xxx_messageInfo_TestOldDeviceID.Merge(dst, src)
  44. }
  45. func (m *TestOldDeviceID) XXX_Size() int {
  46. return m.ProtoSize()
  47. }
  48. func (m *TestOldDeviceID) XXX_DiscardUnknown() {
  49. xxx_messageInfo_TestOldDeviceID.DiscardUnknown(m)
  50. }
  51. var xxx_messageInfo_TestOldDeviceID proto.InternalMessageInfo
  52. type TestNewDeviceID struct {
  53. Test DeviceID `protobuf:"bytes,1,opt,name=test,proto3,customtype=DeviceID" json:"test"`
  54. }
  55. func (m *TestNewDeviceID) Reset() { *m = TestNewDeviceID{} }
  56. func (m *TestNewDeviceID) String() string { return proto.CompactTextString(m) }
  57. func (*TestNewDeviceID) ProtoMessage() {}
  58. func (*TestNewDeviceID) Descriptor() ([]byte, []int) {
  59. return fileDescriptor_deviceid_test_36bcb89b605bdafe, []int{1}
  60. }
  61. func (m *TestNewDeviceID) XXX_Unmarshal(b []byte) error {
  62. return m.Unmarshal(b)
  63. }
  64. func (m *TestNewDeviceID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  65. if deterministic {
  66. return xxx_messageInfo_TestNewDeviceID.Marshal(b, m, deterministic)
  67. } else {
  68. b = b[:cap(b)]
  69. n, err := m.MarshalTo(b)
  70. if err != nil {
  71. return nil, err
  72. }
  73. return b[:n], nil
  74. }
  75. }
  76. func (dst *TestNewDeviceID) XXX_Merge(src proto.Message) {
  77. xxx_messageInfo_TestNewDeviceID.Merge(dst, src)
  78. }
  79. func (m *TestNewDeviceID) XXX_Size() int {
  80. return m.ProtoSize()
  81. }
  82. func (m *TestNewDeviceID) XXX_DiscardUnknown() {
  83. xxx_messageInfo_TestNewDeviceID.DiscardUnknown(m)
  84. }
  85. var xxx_messageInfo_TestNewDeviceID proto.InternalMessageInfo
  86. func init() {
  87. proto.RegisterType((*TestOldDeviceID)(nil), "protocol.TestOldDeviceID")
  88. proto.RegisterType((*TestNewDeviceID)(nil), "protocol.TestNewDeviceID")
  89. }
  90. func (m *TestOldDeviceID) Marshal() (dAtA []byte, err error) {
  91. size := m.ProtoSize()
  92. dAtA = make([]byte, size)
  93. n, err := m.MarshalTo(dAtA)
  94. if err != nil {
  95. return nil, err
  96. }
  97. return dAtA[:n], nil
  98. }
  99. func (m *TestOldDeviceID) MarshalTo(dAtA []byte) (int, error) {
  100. var i int
  101. _ = i
  102. var l int
  103. _ = l
  104. if len(m.Test) > 0 {
  105. dAtA[i] = 0xa
  106. i++
  107. i = encodeVarintDeviceidTest(dAtA, i, uint64(len(m.Test)))
  108. i += copy(dAtA[i:], m.Test)
  109. }
  110. return i, nil
  111. }
  112. func (m *TestNewDeviceID) Marshal() (dAtA []byte, err error) {
  113. size := m.ProtoSize()
  114. dAtA = make([]byte, size)
  115. n, err := m.MarshalTo(dAtA)
  116. if err != nil {
  117. return nil, err
  118. }
  119. return dAtA[:n], nil
  120. }
  121. func (m *TestNewDeviceID) MarshalTo(dAtA []byte) (int, error) {
  122. var i int
  123. _ = i
  124. var l int
  125. _ = l
  126. dAtA[i] = 0xa
  127. i++
  128. i = encodeVarintDeviceidTest(dAtA, i, uint64(m.Test.ProtoSize()))
  129. n1, err := m.Test.MarshalTo(dAtA[i:])
  130. if err != nil {
  131. return 0, err
  132. }
  133. i += n1
  134. return i, nil
  135. }
  136. func encodeVarintDeviceidTest(dAtA []byte, offset int, v uint64) int {
  137. for v >= 1<<7 {
  138. dAtA[offset] = uint8(v&0x7f | 0x80)
  139. v >>= 7
  140. offset++
  141. }
  142. dAtA[offset] = uint8(v)
  143. return offset + 1
  144. }
  145. func (m *TestOldDeviceID) ProtoSize() (n int) {
  146. if m == nil {
  147. return 0
  148. }
  149. var l int
  150. _ = l
  151. l = len(m.Test)
  152. if l > 0 {
  153. n += 1 + l + sovDeviceidTest(uint64(l))
  154. }
  155. return n
  156. }
  157. func (m *TestNewDeviceID) ProtoSize() (n int) {
  158. if m == nil {
  159. return 0
  160. }
  161. var l int
  162. _ = l
  163. l = m.Test.ProtoSize()
  164. n += 1 + l + sovDeviceidTest(uint64(l))
  165. return n
  166. }
  167. func sovDeviceidTest(x uint64) (n int) {
  168. for {
  169. n++
  170. x >>= 7
  171. if x == 0 {
  172. break
  173. }
  174. }
  175. return n
  176. }
  177. func sozDeviceidTest(x uint64) (n int) {
  178. return sovDeviceidTest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  179. }
  180. func (m *TestOldDeviceID) Unmarshal(dAtA []byte) error {
  181. l := len(dAtA)
  182. iNdEx := 0
  183. for iNdEx < l {
  184. preIndex := iNdEx
  185. var wire uint64
  186. for shift := uint(0); ; shift += 7 {
  187. if shift >= 64 {
  188. return ErrIntOverflowDeviceidTest
  189. }
  190. if iNdEx >= l {
  191. return io.ErrUnexpectedEOF
  192. }
  193. b := dAtA[iNdEx]
  194. iNdEx++
  195. wire |= (uint64(b) & 0x7F) << shift
  196. if b < 0x80 {
  197. break
  198. }
  199. }
  200. fieldNum := int32(wire >> 3)
  201. wireType := int(wire & 0x7)
  202. if wireType == 4 {
  203. return fmt.Errorf("proto: TestOldDeviceID: wiretype end group for non-group")
  204. }
  205. if fieldNum <= 0 {
  206. return fmt.Errorf("proto: TestOldDeviceID: illegal tag %d (wire type %d)", fieldNum, wire)
  207. }
  208. switch fieldNum {
  209. case 1:
  210. if wireType != 2 {
  211. return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType)
  212. }
  213. var byteLen int
  214. for shift := uint(0); ; shift += 7 {
  215. if shift >= 64 {
  216. return ErrIntOverflowDeviceidTest
  217. }
  218. if iNdEx >= l {
  219. return io.ErrUnexpectedEOF
  220. }
  221. b := dAtA[iNdEx]
  222. iNdEx++
  223. byteLen |= (int(b) & 0x7F) << shift
  224. if b < 0x80 {
  225. break
  226. }
  227. }
  228. if byteLen < 0 {
  229. return ErrInvalidLengthDeviceidTest
  230. }
  231. postIndex := iNdEx + byteLen
  232. if postIndex > l {
  233. return io.ErrUnexpectedEOF
  234. }
  235. m.Test = append(m.Test[:0], dAtA[iNdEx:postIndex]...)
  236. if m.Test == nil {
  237. m.Test = []byte{}
  238. }
  239. iNdEx = postIndex
  240. default:
  241. iNdEx = preIndex
  242. skippy, err := skipDeviceidTest(dAtA[iNdEx:])
  243. if err != nil {
  244. return err
  245. }
  246. if skippy < 0 {
  247. return ErrInvalidLengthDeviceidTest
  248. }
  249. if (iNdEx + skippy) > l {
  250. return io.ErrUnexpectedEOF
  251. }
  252. iNdEx += skippy
  253. }
  254. }
  255. if iNdEx > l {
  256. return io.ErrUnexpectedEOF
  257. }
  258. return nil
  259. }
  260. func (m *TestNewDeviceID) Unmarshal(dAtA []byte) error {
  261. l := len(dAtA)
  262. iNdEx := 0
  263. for iNdEx < l {
  264. preIndex := iNdEx
  265. var wire uint64
  266. for shift := uint(0); ; shift += 7 {
  267. if shift >= 64 {
  268. return ErrIntOverflowDeviceidTest
  269. }
  270. if iNdEx >= l {
  271. return io.ErrUnexpectedEOF
  272. }
  273. b := dAtA[iNdEx]
  274. iNdEx++
  275. wire |= (uint64(b) & 0x7F) << shift
  276. if b < 0x80 {
  277. break
  278. }
  279. }
  280. fieldNum := int32(wire >> 3)
  281. wireType := int(wire & 0x7)
  282. if wireType == 4 {
  283. return fmt.Errorf("proto: TestNewDeviceID: wiretype end group for non-group")
  284. }
  285. if fieldNum <= 0 {
  286. return fmt.Errorf("proto: TestNewDeviceID: illegal tag %d (wire type %d)", fieldNum, wire)
  287. }
  288. switch fieldNum {
  289. case 1:
  290. if wireType != 2 {
  291. return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType)
  292. }
  293. var byteLen int
  294. for shift := uint(0); ; shift += 7 {
  295. if shift >= 64 {
  296. return ErrIntOverflowDeviceidTest
  297. }
  298. if iNdEx >= l {
  299. return io.ErrUnexpectedEOF
  300. }
  301. b := dAtA[iNdEx]
  302. iNdEx++
  303. byteLen |= (int(b) & 0x7F) << shift
  304. if b < 0x80 {
  305. break
  306. }
  307. }
  308. if byteLen < 0 {
  309. return ErrInvalidLengthDeviceidTest
  310. }
  311. postIndex := iNdEx + byteLen
  312. if postIndex > l {
  313. return io.ErrUnexpectedEOF
  314. }
  315. if err := m.Test.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  316. return err
  317. }
  318. iNdEx = postIndex
  319. default:
  320. iNdEx = preIndex
  321. skippy, err := skipDeviceidTest(dAtA[iNdEx:])
  322. if err != nil {
  323. return err
  324. }
  325. if skippy < 0 {
  326. return ErrInvalidLengthDeviceidTest
  327. }
  328. if (iNdEx + skippy) > l {
  329. return io.ErrUnexpectedEOF
  330. }
  331. iNdEx += skippy
  332. }
  333. }
  334. if iNdEx > l {
  335. return io.ErrUnexpectedEOF
  336. }
  337. return nil
  338. }
  339. func skipDeviceidTest(dAtA []byte) (n int, err error) {
  340. l := len(dAtA)
  341. iNdEx := 0
  342. for iNdEx < l {
  343. var wire uint64
  344. for shift := uint(0); ; shift += 7 {
  345. if shift >= 64 {
  346. return 0, ErrIntOverflowDeviceidTest
  347. }
  348. if iNdEx >= l {
  349. return 0, io.ErrUnexpectedEOF
  350. }
  351. b := dAtA[iNdEx]
  352. iNdEx++
  353. wire |= (uint64(b) & 0x7F) << shift
  354. if b < 0x80 {
  355. break
  356. }
  357. }
  358. wireType := int(wire & 0x7)
  359. switch wireType {
  360. case 0:
  361. for shift := uint(0); ; shift += 7 {
  362. if shift >= 64 {
  363. return 0, ErrIntOverflowDeviceidTest
  364. }
  365. if iNdEx >= l {
  366. return 0, io.ErrUnexpectedEOF
  367. }
  368. iNdEx++
  369. if dAtA[iNdEx-1] < 0x80 {
  370. break
  371. }
  372. }
  373. return iNdEx, nil
  374. case 1:
  375. iNdEx += 8
  376. return iNdEx, nil
  377. case 2:
  378. var length int
  379. for shift := uint(0); ; shift += 7 {
  380. if shift >= 64 {
  381. return 0, ErrIntOverflowDeviceidTest
  382. }
  383. if iNdEx >= l {
  384. return 0, io.ErrUnexpectedEOF
  385. }
  386. b := dAtA[iNdEx]
  387. iNdEx++
  388. length |= (int(b) & 0x7F) << shift
  389. if b < 0x80 {
  390. break
  391. }
  392. }
  393. iNdEx += length
  394. if length < 0 {
  395. return 0, ErrInvalidLengthDeviceidTest
  396. }
  397. return iNdEx, nil
  398. case 3:
  399. for {
  400. var innerWire uint64
  401. var start int = iNdEx
  402. for shift := uint(0); ; shift += 7 {
  403. if shift >= 64 {
  404. return 0, ErrIntOverflowDeviceidTest
  405. }
  406. if iNdEx >= l {
  407. return 0, io.ErrUnexpectedEOF
  408. }
  409. b := dAtA[iNdEx]
  410. iNdEx++
  411. innerWire |= (uint64(b) & 0x7F) << shift
  412. if b < 0x80 {
  413. break
  414. }
  415. }
  416. innerWireType := int(innerWire & 0x7)
  417. if innerWireType == 4 {
  418. break
  419. }
  420. next, err := skipDeviceidTest(dAtA[start:])
  421. if err != nil {
  422. return 0, err
  423. }
  424. iNdEx = start + next
  425. }
  426. return iNdEx, nil
  427. case 4:
  428. return iNdEx, nil
  429. case 5:
  430. iNdEx += 4
  431. return iNdEx, nil
  432. default:
  433. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  434. }
  435. }
  436. panic("unreachable")
  437. }
  438. var (
  439. ErrInvalidLengthDeviceidTest = fmt.Errorf("proto: negative length found during unmarshaling")
  440. ErrIntOverflowDeviceidTest = fmt.Errorf("proto: integer overflow")
  441. )
  442. func init() { proto.RegisterFile("deviceid_test.proto", fileDescriptor_deviceid_test_36bcb89b605bdafe) }
  443. var fileDescriptor_deviceid_test_36bcb89b605bdafe = []byte{
  444. // 182 bytes of a gzipped FileDescriptorProto
  445. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4e, 0x49, 0x2d, 0xcb,
  446. 0x4c, 0x4e, 0xcd, 0x4c, 0x89, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17,
  447. 0xe2, 0x00, 0x53, 0xc9, 0xf9, 0x39, 0x52, 0xca, 0x45, 0xa9, 0x05, 0xf9, 0xc5, 0xfa, 0x60, 0x7e,
  448. 0x52, 0x69, 0x9a, 0x7e, 0x7a, 0x7e, 0x7a, 0x3e, 0x98, 0x03, 0x66, 0x41, 0x94, 0x2b, 0xa9, 0x72,
  449. 0xf1, 0x87, 0xa4, 0x16, 0x97, 0xf8, 0xe7, 0xa4, 0xb8, 0x80, 0x0d, 0xf3, 0x74, 0x11, 0x12, 0xe2,
  450. 0x62, 0x01, 0x99, 0x27, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x13, 0x04, 0x66, 0x2b, 0x99, 0x43, 0x94,
  451. 0xf9, 0xa5, 0x96, 0xc3, 0x95, 0xa9, 0x20, 0x2b, 0x73, 0x12, 0x38, 0x71, 0x4f, 0x9e, 0xe1, 0xd6,
  452. 0x3d, 0x79, 0x0e, 0x98, 0x3c, 0x44, 0xa3, 0x93, 0xc6, 0x89, 0x87, 0x72, 0x0c, 0x17, 0x1e, 0xca,
  453. 0x31, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x0c, 0x2f, 0x1e,
  454. 0xc9, 0x31, 0x4c, 0x78, 0x2c, 0xc7, 0xb0, 0xe0, 0xb1, 0x1c, 0xe3, 0x85, 0xc7, 0x72, 0x0c, 0x37,
  455. 0x1e, 0xcb, 0x31, 0x24, 0xb1, 0x81, 0x1d, 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x96,
  456. 0x3e, 0xc0, 0xd6, 0x00, 0x00, 0x00,
  457. }