deviceid_test.pb.go 12 KB

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