coupon.pb.go 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: coupon.proto
  3. /*
  4. Package model is a generated protocol buffer package.
  5. It is generated from these files:
  6. coupon.proto
  7. It has these top-level messages:
  8. CouponInfo
  9. PointInfoList
  10. CouponBalanceInfo
  11. CouponBalanceList
  12. CouponAllowanceInfo
  13. CouponAllowanceList
  14. */
  15. package model
  16. import proto "github.com/golang/protobuf/proto"
  17. import fmt "fmt"
  18. import math "math"
  19. import _ "github.com/gogo/protobuf/gogoproto"
  20. import go_common_library_time "go-common/library/time"
  21. import binary "encoding/binary"
  22. import io "io"
  23. // Reference imports to suppress errors if they are not otherwise used.
  24. var _ = proto.Marshal
  25. var _ = fmt.Errorf
  26. var _ = math.Inf
  27. // This is a compile-time assertion to ensure that this generated file
  28. // is compatible with the proto package it is being compiled against.
  29. // A compilation error at this line likely means your copy of the
  30. // proto package needs to be updated.
  31. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  32. type CouponInfo struct {
  33. ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"_"`
  34. CouponToken string `protobuf:"bytes,2,opt,name=CouponToken,proto3" json:"coupon_token"`
  35. Mid int64 `protobuf:"varint,3,opt,name=Mid,proto3" json:"mid"`
  36. State int64 `protobuf:"varint,4,opt,name=State,proto3" json:"state"`
  37. StartTime int64 `protobuf:"varint,5,opt,name=StartTime,proto3" json:"start_time"`
  38. ExpireTime int64 `protobuf:"varint,6,opt,name=ExpireTime,proto3" json:"expire_time"`
  39. Origin int64 `protobuf:"varint,7,opt,name=Origin,proto3" json:"origin"`
  40. CouponType int64 `protobuf:"varint,8,opt,name=CouponType,proto3" json:"coupon_type"`
  41. OrderNO string `protobuf:"bytes,9,opt,name=OrderNO,proto3" json:"order_no"`
  42. Ver int64 `protobuf:"varint,10,opt,name=Ver,proto3" json:"ver"`
  43. Oid int64 `protobuf:"varint,11,opt,name=Oid,proto3" json:"oid"`
  44. Remark string `protobuf:"bytes,12,opt,name=Remark,proto3" json:"remark"`
  45. UseVer int64 `protobuf:"varint,13,opt,name=UseVer,proto3" json:"use_ver"`
  46. CTime go_common_library_time.Time `protobuf:"varint,14,opt,name=CTime,proto3,casttype=go-common/library/time.Time" json:"-"`
  47. MTime go_common_library_time.Time `protobuf:"varint,15,opt,name=MTime,proto3,casttype=go-common/library/time.Time" json:"-"`
  48. BatchToken string `protobuf:"bytes,16,opt,name=BatchToken,proto3" json:"batch_token"`
  49. }
  50. func (m *CouponInfo) Reset() { *m = CouponInfo{} }
  51. func (m *CouponInfo) String() string { return proto.CompactTextString(m) }
  52. func (*CouponInfo) ProtoMessage() {}
  53. func (*CouponInfo) Descriptor() ([]byte, []int) { return fileDescriptorCoupon, []int{0} }
  54. type PointInfoList struct {
  55. PointInfoList []*CouponInfo `protobuf:"bytes,1,rep,name=pointInfoList" json:"pointInfoList,omitempty"`
  56. }
  57. func (m *PointInfoList) Reset() { *m = PointInfoList{} }
  58. func (m *PointInfoList) String() string { return proto.CompactTextString(m) }
  59. func (*PointInfoList) ProtoMessage() {}
  60. func (*PointInfoList) Descriptor() ([]byte, []int) { return fileDescriptorCoupon, []int{1} }
  61. type CouponBalanceInfo struct {
  62. ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"_"`
  63. BatchToken string `protobuf:"bytes,2,opt,name=BatchToken,proto3" json:"batch_token"`
  64. Mid int64 `protobuf:"varint,3,opt,name=Mid,proto3" json:"mid"`
  65. Balance int64 `protobuf:"varint,4,opt,name=Balance,proto3" json:"balance"`
  66. StartTime int64 `protobuf:"varint,5,opt,name=StartTime,proto3" json:"start_time"`
  67. ExpireTime int64 `protobuf:"varint,6,opt,name=ExpireTime,proto3" json:"expire_time"`
  68. Origin int64 `protobuf:"varint,7,opt,name=Origin,proto3" json:"origin"`
  69. CouponType int64 `protobuf:"varint,8,opt,name=CouponType,proto3" json:"coupon_type"`
  70. Ver int64 `protobuf:"varint,9,opt,name=Ver,proto3" json:"ver"`
  71. CTime go_common_library_time.Time `protobuf:"varint,10,opt,name=CTime,proto3,casttype=go-common/library/time.Time" json:"-"`
  72. MTime go_common_library_time.Time `protobuf:"varint,11,opt,name=MTime,proto3,casttype=go-common/library/time.Time" json:"-"`
  73. }
  74. func (m *CouponBalanceInfo) Reset() { *m = CouponBalanceInfo{} }
  75. func (m *CouponBalanceInfo) String() string { return proto.CompactTextString(m) }
  76. func (*CouponBalanceInfo) ProtoMessage() {}
  77. func (*CouponBalanceInfo) Descriptor() ([]byte, []int) { return fileDescriptorCoupon, []int{2} }
  78. type CouponBalanceList struct {
  79. CouponBalanceList []*CouponBalanceInfo `protobuf:"bytes,1,rep,name=couponBalanceList" json:"couponBalanceList,omitempty"`
  80. }
  81. func (m *CouponBalanceList) Reset() { *m = CouponBalanceList{} }
  82. func (m *CouponBalanceList) String() string { return proto.CompactTextString(m) }
  83. func (*CouponBalanceList) ProtoMessage() {}
  84. func (*CouponBalanceList) Descriptor() ([]byte, []int) { return fileDescriptorCoupon, []int{3} }
  85. type CouponAllowanceInfo struct {
  86. ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"_"`
  87. CouponToken string `protobuf:"bytes,2,opt,name=CouponToken,proto3" json:"coupon_token"`
  88. Mid int64 `protobuf:"varint,3,opt,name=Mid,proto3" json:"mid"`
  89. State int32 `protobuf:"varint,4,opt,name=State,proto3" json:"state"`
  90. StartTime int64 `protobuf:"varint,5,opt,name=StartTime,proto3" json:"start_time"`
  91. ExpireTime int64 `protobuf:"varint,6,opt,name=ExpireTime,proto3" json:"expire_time"`
  92. Origin int64 `protobuf:"varint,7,opt,name=Origin,proto3" json:"origin"`
  93. OrderNO string `protobuf:"bytes,8,opt,name=OrderNO,proto3" json:"order_no"`
  94. Ver int64 `protobuf:"varint,9,opt,name=Ver,proto3" json:"ver"`
  95. Remark string `protobuf:"bytes,10,opt,name=Remark,proto3" json:"remark"`
  96. CTime go_common_library_time.Time `protobuf:"varint,11,opt,name=CTime,proto3,casttype=go-common/library/time.Time" json:"-"`
  97. MTime go_common_library_time.Time `protobuf:"varint,12,opt,name=MTime,proto3,casttype=go-common/library/time.Time" json:"-"`
  98. BatchToken string `protobuf:"bytes,13,opt,name=BatchToken,proto3" json:"batch_token"`
  99. Amount float64 `protobuf:"fixed64,14,opt,name=Amount,proto3" json:"amount"`
  100. FullAmount float64 `protobuf:"fixed64,15,opt,name=FullAmount,proto3" json:"full_amount"`
  101. AppID int64 `protobuf:"varint,16,opt,name=AppID,proto3" json:"app_id"`
  102. }
  103. func (m *CouponAllowanceInfo) Reset() { *m = CouponAllowanceInfo{} }
  104. func (m *CouponAllowanceInfo) String() string { return proto.CompactTextString(m) }
  105. func (*CouponAllowanceInfo) ProtoMessage() {}
  106. func (*CouponAllowanceInfo) Descriptor() ([]byte, []int) { return fileDescriptorCoupon, []int{4} }
  107. type CouponAllowanceList struct {
  108. CouponAllowanceList []*CouponAllowanceInfo `protobuf:"bytes,1,rep,name=couponAllowanceList" json:"couponAllowanceList,omitempty"`
  109. }
  110. func (m *CouponAllowanceList) Reset() { *m = CouponAllowanceList{} }
  111. func (m *CouponAllowanceList) String() string { return proto.CompactTextString(m) }
  112. func (*CouponAllowanceList) ProtoMessage() {}
  113. func (*CouponAllowanceList) Descriptor() ([]byte, []int) { return fileDescriptorCoupon, []int{5} }
  114. func init() {
  115. proto.RegisterType((*CouponInfo)(nil), "model.CouponInfo")
  116. proto.RegisterType((*PointInfoList)(nil), "model.PointInfoList")
  117. proto.RegisterType((*CouponBalanceInfo)(nil), "model.CouponBalanceInfo")
  118. proto.RegisterType((*CouponBalanceList)(nil), "model.CouponBalanceList")
  119. proto.RegisterType((*CouponAllowanceInfo)(nil), "model.CouponAllowanceInfo")
  120. proto.RegisterType((*CouponAllowanceList)(nil), "model.CouponAllowanceList")
  121. }
  122. func (m *CouponInfo) Marshal() (dAtA []byte, err error) {
  123. size := m.Size()
  124. dAtA = make([]byte, size)
  125. n, err := m.MarshalTo(dAtA)
  126. if err != nil {
  127. return nil, err
  128. }
  129. return dAtA[:n], nil
  130. }
  131. func (m *CouponInfo) MarshalTo(dAtA []byte) (int, error) {
  132. var i int
  133. _ = i
  134. var l int
  135. _ = l
  136. if m.ID != 0 {
  137. dAtA[i] = 0x8
  138. i++
  139. i = encodeVarintCoupon(dAtA, i, uint64(m.ID))
  140. }
  141. if len(m.CouponToken) > 0 {
  142. dAtA[i] = 0x12
  143. i++
  144. i = encodeVarintCoupon(dAtA, i, uint64(len(m.CouponToken)))
  145. i += copy(dAtA[i:], m.CouponToken)
  146. }
  147. if m.Mid != 0 {
  148. dAtA[i] = 0x18
  149. i++
  150. i = encodeVarintCoupon(dAtA, i, uint64(m.Mid))
  151. }
  152. if m.State != 0 {
  153. dAtA[i] = 0x20
  154. i++
  155. i = encodeVarintCoupon(dAtA, i, uint64(m.State))
  156. }
  157. if m.StartTime != 0 {
  158. dAtA[i] = 0x28
  159. i++
  160. i = encodeVarintCoupon(dAtA, i, uint64(m.StartTime))
  161. }
  162. if m.ExpireTime != 0 {
  163. dAtA[i] = 0x30
  164. i++
  165. i = encodeVarintCoupon(dAtA, i, uint64(m.ExpireTime))
  166. }
  167. if m.Origin != 0 {
  168. dAtA[i] = 0x38
  169. i++
  170. i = encodeVarintCoupon(dAtA, i, uint64(m.Origin))
  171. }
  172. if m.CouponType != 0 {
  173. dAtA[i] = 0x40
  174. i++
  175. i = encodeVarintCoupon(dAtA, i, uint64(m.CouponType))
  176. }
  177. if len(m.OrderNO) > 0 {
  178. dAtA[i] = 0x4a
  179. i++
  180. i = encodeVarintCoupon(dAtA, i, uint64(len(m.OrderNO)))
  181. i += copy(dAtA[i:], m.OrderNO)
  182. }
  183. if m.Ver != 0 {
  184. dAtA[i] = 0x50
  185. i++
  186. i = encodeVarintCoupon(dAtA, i, uint64(m.Ver))
  187. }
  188. if m.Oid != 0 {
  189. dAtA[i] = 0x58
  190. i++
  191. i = encodeVarintCoupon(dAtA, i, uint64(m.Oid))
  192. }
  193. if len(m.Remark) > 0 {
  194. dAtA[i] = 0x62
  195. i++
  196. i = encodeVarintCoupon(dAtA, i, uint64(len(m.Remark)))
  197. i += copy(dAtA[i:], m.Remark)
  198. }
  199. if m.UseVer != 0 {
  200. dAtA[i] = 0x68
  201. i++
  202. i = encodeVarintCoupon(dAtA, i, uint64(m.UseVer))
  203. }
  204. if m.CTime != 0 {
  205. dAtA[i] = 0x70
  206. i++
  207. i = encodeVarintCoupon(dAtA, i, uint64(m.CTime))
  208. }
  209. if m.MTime != 0 {
  210. dAtA[i] = 0x78
  211. i++
  212. i = encodeVarintCoupon(dAtA, i, uint64(m.MTime))
  213. }
  214. if len(m.BatchToken) > 0 {
  215. dAtA[i] = 0x82
  216. i++
  217. dAtA[i] = 0x1
  218. i++
  219. i = encodeVarintCoupon(dAtA, i, uint64(len(m.BatchToken)))
  220. i += copy(dAtA[i:], m.BatchToken)
  221. }
  222. return i, nil
  223. }
  224. func (m *PointInfoList) Marshal() (dAtA []byte, err error) {
  225. size := m.Size()
  226. dAtA = make([]byte, size)
  227. n, err := m.MarshalTo(dAtA)
  228. if err != nil {
  229. return nil, err
  230. }
  231. return dAtA[:n], nil
  232. }
  233. func (m *PointInfoList) MarshalTo(dAtA []byte) (int, error) {
  234. var i int
  235. _ = i
  236. var l int
  237. _ = l
  238. if len(m.PointInfoList) > 0 {
  239. for _, msg := range m.PointInfoList {
  240. dAtA[i] = 0xa
  241. i++
  242. i = encodeVarintCoupon(dAtA, i, uint64(msg.Size()))
  243. n, err := msg.MarshalTo(dAtA[i:])
  244. if err != nil {
  245. return 0, err
  246. }
  247. i += n
  248. }
  249. }
  250. return i, nil
  251. }
  252. func (m *CouponBalanceInfo) Marshal() (dAtA []byte, err error) {
  253. size := m.Size()
  254. dAtA = make([]byte, size)
  255. n, err := m.MarshalTo(dAtA)
  256. if err != nil {
  257. return nil, err
  258. }
  259. return dAtA[:n], nil
  260. }
  261. func (m *CouponBalanceInfo) MarshalTo(dAtA []byte) (int, error) {
  262. var i int
  263. _ = i
  264. var l int
  265. _ = l
  266. if m.ID != 0 {
  267. dAtA[i] = 0x8
  268. i++
  269. i = encodeVarintCoupon(dAtA, i, uint64(m.ID))
  270. }
  271. if len(m.BatchToken) > 0 {
  272. dAtA[i] = 0x12
  273. i++
  274. i = encodeVarintCoupon(dAtA, i, uint64(len(m.BatchToken)))
  275. i += copy(dAtA[i:], m.BatchToken)
  276. }
  277. if m.Mid != 0 {
  278. dAtA[i] = 0x18
  279. i++
  280. i = encodeVarintCoupon(dAtA, i, uint64(m.Mid))
  281. }
  282. if m.Balance != 0 {
  283. dAtA[i] = 0x20
  284. i++
  285. i = encodeVarintCoupon(dAtA, i, uint64(m.Balance))
  286. }
  287. if m.StartTime != 0 {
  288. dAtA[i] = 0x28
  289. i++
  290. i = encodeVarintCoupon(dAtA, i, uint64(m.StartTime))
  291. }
  292. if m.ExpireTime != 0 {
  293. dAtA[i] = 0x30
  294. i++
  295. i = encodeVarintCoupon(dAtA, i, uint64(m.ExpireTime))
  296. }
  297. if m.Origin != 0 {
  298. dAtA[i] = 0x38
  299. i++
  300. i = encodeVarintCoupon(dAtA, i, uint64(m.Origin))
  301. }
  302. if m.CouponType != 0 {
  303. dAtA[i] = 0x40
  304. i++
  305. i = encodeVarintCoupon(dAtA, i, uint64(m.CouponType))
  306. }
  307. if m.Ver != 0 {
  308. dAtA[i] = 0x48
  309. i++
  310. i = encodeVarintCoupon(dAtA, i, uint64(m.Ver))
  311. }
  312. if m.CTime != 0 {
  313. dAtA[i] = 0x50
  314. i++
  315. i = encodeVarintCoupon(dAtA, i, uint64(m.CTime))
  316. }
  317. if m.MTime != 0 {
  318. dAtA[i] = 0x58
  319. i++
  320. i = encodeVarintCoupon(dAtA, i, uint64(m.MTime))
  321. }
  322. return i, nil
  323. }
  324. func (m *CouponBalanceList) Marshal() (dAtA []byte, err error) {
  325. size := m.Size()
  326. dAtA = make([]byte, size)
  327. n, err := m.MarshalTo(dAtA)
  328. if err != nil {
  329. return nil, err
  330. }
  331. return dAtA[:n], nil
  332. }
  333. func (m *CouponBalanceList) MarshalTo(dAtA []byte) (int, error) {
  334. var i int
  335. _ = i
  336. var l int
  337. _ = l
  338. if len(m.CouponBalanceList) > 0 {
  339. for _, msg := range m.CouponBalanceList {
  340. dAtA[i] = 0xa
  341. i++
  342. i = encodeVarintCoupon(dAtA, i, uint64(msg.Size()))
  343. n, err := msg.MarshalTo(dAtA[i:])
  344. if err != nil {
  345. return 0, err
  346. }
  347. i += n
  348. }
  349. }
  350. return i, nil
  351. }
  352. func (m *CouponAllowanceInfo) Marshal() (dAtA []byte, err error) {
  353. size := m.Size()
  354. dAtA = make([]byte, size)
  355. n, err := m.MarshalTo(dAtA)
  356. if err != nil {
  357. return nil, err
  358. }
  359. return dAtA[:n], nil
  360. }
  361. func (m *CouponAllowanceInfo) MarshalTo(dAtA []byte) (int, error) {
  362. var i int
  363. _ = i
  364. var l int
  365. _ = l
  366. if m.ID != 0 {
  367. dAtA[i] = 0x8
  368. i++
  369. i = encodeVarintCoupon(dAtA, i, uint64(m.ID))
  370. }
  371. if len(m.CouponToken) > 0 {
  372. dAtA[i] = 0x12
  373. i++
  374. i = encodeVarintCoupon(dAtA, i, uint64(len(m.CouponToken)))
  375. i += copy(dAtA[i:], m.CouponToken)
  376. }
  377. if m.Mid != 0 {
  378. dAtA[i] = 0x18
  379. i++
  380. i = encodeVarintCoupon(dAtA, i, uint64(m.Mid))
  381. }
  382. if m.State != 0 {
  383. dAtA[i] = 0x20
  384. i++
  385. i = encodeVarintCoupon(dAtA, i, uint64(m.State))
  386. }
  387. if m.StartTime != 0 {
  388. dAtA[i] = 0x28
  389. i++
  390. i = encodeVarintCoupon(dAtA, i, uint64(m.StartTime))
  391. }
  392. if m.ExpireTime != 0 {
  393. dAtA[i] = 0x30
  394. i++
  395. i = encodeVarintCoupon(dAtA, i, uint64(m.ExpireTime))
  396. }
  397. if m.Origin != 0 {
  398. dAtA[i] = 0x38
  399. i++
  400. i = encodeVarintCoupon(dAtA, i, uint64(m.Origin))
  401. }
  402. if len(m.OrderNO) > 0 {
  403. dAtA[i] = 0x42
  404. i++
  405. i = encodeVarintCoupon(dAtA, i, uint64(len(m.OrderNO)))
  406. i += copy(dAtA[i:], m.OrderNO)
  407. }
  408. if m.Ver != 0 {
  409. dAtA[i] = 0x48
  410. i++
  411. i = encodeVarintCoupon(dAtA, i, uint64(m.Ver))
  412. }
  413. if len(m.Remark) > 0 {
  414. dAtA[i] = 0x52
  415. i++
  416. i = encodeVarintCoupon(dAtA, i, uint64(len(m.Remark)))
  417. i += copy(dAtA[i:], m.Remark)
  418. }
  419. if m.CTime != 0 {
  420. dAtA[i] = 0x58
  421. i++
  422. i = encodeVarintCoupon(dAtA, i, uint64(m.CTime))
  423. }
  424. if m.MTime != 0 {
  425. dAtA[i] = 0x60
  426. i++
  427. i = encodeVarintCoupon(dAtA, i, uint64(m.MTime))
  428. }
  429. if len(m.BatchToken) > 0 {
  430. dAtA[i] = 0x6a
  431. i++
  432. i = encodeVarintCoupon(dAtA, i, uint64(len(m.BatchToken)))
  433. i += copy(dAtA[i:], m.BatchToken)
  434. }
  435. if m.Amount != 0 {
  436. dAtA[i] = 0x71
  437. i++
  438. binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Amount))))
  439. i += 8
  440. }
  441. if m.FullAmount != 0 {
  442. dAtA[i] = 0x79
  443. i++
  444. binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FullAmount))))
  445. i += 8
  446. }
  447. if m.AppID != 0 {
  448. dAtA[i] = 0x80
  449. i++
  450. dAtA[i] = 0x1
  451. i++
  452. i = encodeVarintCoupon(dAtA, i, uint64(m.AppID))
  453. }
  454. return i, nil
  455. }
  456. func (m *CouponAllowanceList) Marshal() (dAtA []byte, err error) {
  457. size := m.Size()
  458. dAtA = make([]byte, size)
  459. n, err := m.MarshalTo(dAtA)
  460. if err != nil {
  461. return nil, err
  462. }
  463. return dAtA[:n], nil
  464. }
  465. func (m *CouponAllowanceList) MarshalTo(dAtA []byte) (int, error) {
  466. var i int
  467. _ = i
  468. var l int
  469. _ = l
  470. if len(m.CouponAllowanceList) > 0 {
  471. for _, msg := range m.CouponAllowanceList {
  472. dAtA[i] = 0xa
  473. i++
  474. i = encodeVarintCoupon(dAtA, i, uint64(msg.Size()))
  475. n, err := msg.MarshalTo(dAtA[i:])
  476. if err != nil {
  477. return 0, err
  478. }
  479. i += n
  480. }
  481. }
  482. return i, nil
  483. }
  484. func encodeVarintCoupon(dAtA []byte, offset int, v uint64) int {
  485. for v >= 1<<7 {
  486. dAtA[offset] = uint8(v&0x7f | 0x80)
  487. v >>= 7
  488. offset++
  489. }
  490. dAtA[offset] = uint8(v)
  491. return offset + 1
  492. }
  493. func (m *CouponInfo) Size() (n int) {
  494. var l int
  495. _ = l
  496. if m.ID != 0 {
  497. n += 1 + sovCoupon(uint64(m.ID))
  498. }
  499. l = len(m.CouponToken)
  500. if l > 0 {
  501. n += 1 + l + sovCoupon(uint64(l))
  502. }
  503. if m.Mid != 0 {
  504. n += 1 + sovCoupon(uint64(m.Mid))
  505. }
  506. if m.State != 0 {
  507. n += 1 + sovCoupon(uint64(m.State))
  508. }
  509. if m.StartTime != 0 {
  510. n += 1 + sovCoupon(uint64(m.StartTime))
  511. }
  512. if m.ExpireTime != 0 {
  513. n += 1 + sovCoupon(uint64(m.ExpireTime))
  514. }
  515. if m.Origin != 0 {
  516. n += 1 + sovCoupon(uint64(m.Origin))
  517. }
  518. if m.CouponType != 0 {
  519. n += 1 + sovCoupon(uint64(m.CouponType))
  520. }
  521. l = len(m.OrderNO)
  522. if l > 0 {
  523. n += 1 + l + sovCoupon(uint64(l))
  524. }
  525. if m.Ver != 0 {
  526. n += 1 + sovCoupon(uint64(m.Ver))
  527. }
  528. if m.Oid != 0 {
  529. n += 1 + sovCoupon(uint64(m.Oid))
  530. }
  531. l = len(m.Remark)
  532. if l > 0 {
  533. n += 1 + l + sovCoupon(uint64(l))
  534. }
  535. if m.UseVer != 0 {
  536. n += 1 + sovCoupon(uint64(m.UseVer))
  537. }
  538. if m.CTime != 0 {
  539. n += 1 + sovCoupon(uint64(m.CTime))
  540. }
  541. if m.MTime != 0 {
  542. n += 1 + sovCoupon(uint64(m.MTime))
  543. }
  544. l = len(m.BatchToken)
  545. if l > 0 {
  546. n += 2 + l + sovCoupon(uint64(l))
  547. }
  548. return n
  549. }
  550. func (m *PointInfoList) Size() (n int) {
  551. var l int
  552. _ = l
  553. if len(m.PointInfoList) > 0 {
  554. for _, e := range m.PointInfoList {
  555. l = e.Size()
  556. n += 1 + l + sovCoupon(uint64(l))
  557. }
  558. }
  559. return n
  560. }
  561. func (m *CouponBalanceInfo) Size() (n int) {
  562. var l int
  563. _ = l
  564. if m.ID != 0 {
  565. n += 1 + sovCoupon(uint64(m.ID))
  566. }
  567. l = len(m.BatchToken)
  568. if l > 0 {
  569. n += 1 + l + sovCoupon(uint64(l))
  570. }
  571. if m.Mid != 0 {
  572. n += 1 + sovCoupon(uint64(m.Mid))
  573. }
  574. if m.Balance != 0 {
  575. n += 1 + sovCoupon(uint64(m.Balance))
  576. }
  577. if m.StartTime != 0 {
  578. n += 1 + sovCoupon(uint64(m.StartTime))
  579. }
  580. if m.ExpireTime != 0 {
  581. n += 1 + sovCoupon(uint64(m.ExpireTime))
  582. }
  583. if m.Origin != 0 {
  584. n += 1 + sovCoupon(uint64(m.Origin))
  585. }
  586. if m.CouponType != 0 {
  587. n += 1 + sovCoupon(uint64(m.CouponType))
  588. }
  589. if m.Ver != 0 {
  590. n += 1 + sovCoupon(uint64(m.Ver))
  591. }
  592. if m.CTime != 0 {
  593. n += 1 + sovCoupon(uint64(m.CTime))
  594. }
  595. if m.MTime != 0 {
  596. n += 1 + sovCoupon(uint64(m.MTime))
  597. }
  598. return n
  599. }
  600. func (m *CouponBalanceList) Size() (n int) {
  601. var l int
  602. _ = l
  603. if len(m.CouponBalanceList) > 0 {
  604. for _, e := range m.CouponBalanceList {
  605. l = e.Size()
  606. n += 1 + l + sovCoupon(uint64(l))
  607. }
  608. }
  609. return n
  610. }
  611. func (m *CouponAllowanceInfo) Size() (n int) {
  612. var l int
  613. _ = l
  614. if m.ID != 0 {
  615. n += 1 + sovCoupon(uint64(m.ID))
  616. }
  617. l = len(m.CouponToken)
  618. if l > 0 {
  619. n += 1 + l + sovCoupon(uint64(l))
  620. }
  621. if m.Mid != 0 {
  622. n += 1 + sovCoupon(uint64(m.Mid))
  623. }
  624. if m.State != 0 {
  625. n += 1 + sovCoupon(uint64(m.State))
  626. }
  627. if m.StartTime != 0 {
  628. n += 1 + sovCoupon(uint64(m.StartTime))
  629. }
  630. if m.ExpireTime != 0 {
  631. n += 1 + sovCoupon(uint64(m.ExpireTime))
  632. }
  633. if m.Origin != 0 {
  634. n += 1 + sovCoupon(uint64(m.Origin))
  635. }
  636. l = len(m.OrderNO)
  637. if l > 0 {
  638. n += 1 + l + sovCoupon(uint64(l))
  639. }
  640. if m.Ver != 0 {
  641. n += 1 + sovCoupon(uint64(m.Ver))
  642. }
  643. l = len(m.Remark)
  644. if l > 0 {
  645. n += 1 + l + sovCoupon(uint64(l))
  646. }
  647. if m.CTime != 0 {
  648. n += 1 + sovCoupon(uint64(m.CTime))
  649. }
  650. if m.MTime != 0 {
  651. n += 1 + sovCoupon(uint64(m.MTime))
  652. }
  653. l = len(m.BatchToken)
  654. if l > 0 {
  655. n += 1 + l + sovCoupon(uint64(l))
  656. }
  657. if m.Amount != 0 {
  658. n += 9
  659. }
  660. if m.FullAmount != 0 {
  661. n += 9
  662. }
  663. if m.AppID != 0 {
  664. n += 2 + sovCoupon(uint64(m.AppID))
  665. }
  666. return n
  667. }
  668. func (m *CouponAllowanceList) Size() (n int) {
  669. var l int
  670. _ = l
  671. if len(m.CouponAllowanceList) > 0 {
  672. for _, e := range m.CouponAllowanceList {
  673. l = e.Size()
  674. n += 1 + l + sovCoupon(uint64(l))
  675. }
  676. }
  677. return n
  678. }
  679. func sovCoupon(x uint64) (n int) {
  680. for {
  681. n++
  682. x >>= 7
  683. if x == 0 {
  684. break
  685. }
  686. }
  687. return n
  688. }
  689. func sozCoupon(x uint64) (n int) {
  690. return sovCoupon(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  691. }
  692. func (m *CouponInfo) Unmarshal(dAtA []byte) error {
  693. l := len(dAtA)
  694. iNdEx := 0
  695. for iNdEx < l {
  696. preIndex := iNdEx
  697. var wire uint64
  698. for shift := uint(0); ; shift += 7 {
  699. if shift >= 64 {
  700. return ErrIntOverflowCoupon
  701. }
  702. if iNdEx >= l {
  703. return io.ErrUnexpectedEOF
  704. }
  705. b := dAtA[iNdEx]
  706. iNdEx++
  707. wire |= (uint64(b) & 0x7F) << shift
  708. if b < 0x80 {
  709. break
  710. }
  711. }
  712. fieldNum := int32(wire >> 3)
  713. wireType := int(wire & 0x7)
  714. if wireType == 4 {
  715. return fmt.Errorf("proto: CouponInfo: wiretype end group for non-group")
  716. }
  717. if fieldNum <= 0 {
  718. return fmt.Errorf("proto: CouponInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  719. }
  720. switch fieldNum {
  721. case 1:
  722. if wireType != 0 {
  723. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  724. }
  725. m.ID = 0
  726. for shift := uint(0); ; shift += 7 {
  727. if shift >= 64 {
  728. return ErrIntOverflowCoupon
  729. }
  730. if iNdEx >= l {
  731. return io.ErrUnexpectedEOF
  732. }
  733. b := dAtA[iNdEx]
  734. iNdEx++
  735. m.ID |= (int64(b) & 0x7F) << shift
  736. if b < 0x80 {
  737. break
  738. }
  739. }
  740. case 2:
  741. if wireType != 2 {
  742. return fmt.Errorf("proto: wrong wireType = %d for field CouponToken", wireType)
  743. }
  744. var stringLen uint64
  745. for shift := uint(0); ; shift += 7 {
  746. if shift >= 64 {
  747. return ErrIntOverflowCoupon
  748. }
  749. if iNdEx >= l {
  750. return io.ErrUnexpectedEOF
  751. }
  752. b := dAtA[iNdEx]
  753. iNdEx++
  754. stringLen |= (uint64(b) & 0x7F) << shift
  755. if b < 0x80 {
  756. break
  757. }
  758. }
  759. intStringLen := int(stringLen)
  760. if intStringLen < 0 {
  761. return ErrInvalidLengthCoupon
  762. }
  763. postIndex := iNdEx + intStringLen
  764. if postIndex > l {
  765. return io.ErrUnexpectedEOF
  766. }
  767. m.CouponToken = string(dAtA[iNdEx:postIndex])
  768. iNdEx = postIndex
  769. case 3:
  770. if wireType != 0 {
  771. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  772. }
  773. m.Mid = 0
  774. for shift := uint(0); ; shift += 7 {
  775. if shift >= 64 {
  776. return ErrIntOverflowCoupon
  777. }
  778. if iNdEx >= l {
  779. return io.ErrUnexpectedEOF
  780. }
  781. b := dAtA[iNdEx]
  782. iNdEx++
  783. m.Mid |= (int64(b) & 0x7F) << shift
  784. if b < 0x80 {
  785. break
  786. }
  787. }
  788. case 4:
  789. if wireType != 0 {
  790. return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
  791. }
  792. m.State = 0
  793. for shift := uint(0); ; shift += 7 {
  794. if shift >= 64 {
  795. return ErrIntOverflowCoupon
  796. }
  797. if iNdEx >= l {
  798. return io.ErrUnexpectedEOF
  799. }
  800. b := dAtA[iNdEx]
  801. iNdEx++
  802. m.State |= (int64(b) & 0x7F) << shift
  803. if b < 0x80 {
  804. break
  805. }
  806. }
  807. case 5:
  808. if wireType != 0 {
  809. return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType)
  810. }
  811. m.StartTime = 0
  812. for shift := uint(0); ; shift += 7 {
  813. if shift >= 64 {
  814. return ErrIntOverflowCoupon
  815. }
  816. if iNdEx >= l {
  817. return io.ErrUnexpectedEOF
  818. }
  819. b := dAtA[iNdEx]
  820. iNdEx++
  821. m.StartTime |= (int64(b) & 0x7F) << shift
  822. if b < 0x80 {
  823. break
  824. }
  825. }
  826. case 6:
  827. if wireType != 0 {
  828. return fmt.Errorf("proto: wrong wireType = %d for field ExpireTime", wireType)
  829. }
  830. m.ExpireTime = 0
  831. for shift := uint(0); ; shift += 7 {
  832. if shift >= 64 {
  833. return ErrIntOverflowCoupon
  834. }
  835. if iNdEx >= l {
  836. return io.ErrUnexpectedEOF
  837. }
  838. b := dAtA[iNdEx]
  839. iNdEx++
  840. m.ExpireTime |= (int64(b) & 0x7F) << shift
  841. if b < 0x80 {
  842. break
  843. }
  844. }
  845. case 7:
  846. if wireType != 0 {
  847. return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
  848. }
  849. m.Origin = 0
  850. for shift := uint(0); ; shift += 7 {
  851. if shift >= 64 {
  852. return ErrIntOverflowCoupon
  853. }
  854. if iNdEx >= l {
  855. return io.ErrUnexpectedEOF
  856. }
  857. b := dAtA[iNdEx]
  858. iNdEx++
  859. m.Origin |= (int64(b) & 0x7F) << shift
  860. if b < 0x80 {
  861. break
  862. }
  863. }
  864. case 8:
  865. if wireType != 0 {
  866. return fmt.Errorf("proto: wrong wireType = %d for field CouponType", wireType)
  867. }
  868. m.CouponType = 0
  869. for shift := uint(0); ; shift += 7 {
  870. if shift >= 64 {
  871. return ErrIntOverflowCoupon
  872. }
  873. if iNdEx >= l {
  874. return io.ErrUnexpectedEOF
  875. }
  876. b := dAtA[iNdEx]
  877. iNdEx++
  878. m.CouponType |= (int64(b) & 0x7F) << shift
  879. if b < 0x80 {
  880. break
  881. }
  882. }
  883. case 9:
  884. if wireType != 2 {
  885. return fmt.Errorf("proto: wrong wireType = %d for field OrderNO", wireType)
  886. }
  887. var stringLen uint64
  888. for shift := uint(0); ; shift += 7 {
  889. if shift >= 64 {
  890. return ErrIntOverflowCoupon
  891. }
  892. if iNdEx >= l {
  893. return io.ErrUnexpectedEOF
  894. }
  895. b := dAtA[iNdEx]
  896. iNdEx++
  897. stringLen |= (uint64(b) & 0x7F) << shift
  898. if b < 0x80 {
  899. break
  900. }
  901. }
  902. intStringLen := int(stringLen)
  903. if intStringLen < 0 {
  904. return ErrInvalidLengthCoupon
  905. }
  906. postIndex := iNdEx + intStringLen
  907. if postIndex > l {
  908. return io.ErrUnexpectedEOF
  909. }
  910. m.OrderNO = string(dAtA[iNdEx:postIndex])
  911. iNdEx = postIndex
  912. case 10:
  913. if wireType != 0 {
  914. return fmt.Errorf("proto: wrong wireType = %d for field Ver", wireType)
  915. }
  916. m.Ver = 0
  917. for shift := uint(0); ; shift += 7 {
  918. if shift >= 64 {
  919. return ErrIntOverflowCoupon
  920. }
  921. if iNdEx >= l {
  922. return io.ErrUnexpectedEOF
  923. }
  924. b := dAtA[iNdEx]
  925. iNdEx++
  926. m.Ver |= (int64(b) & 0x7F) << shift
  927. if b < 0x80 {
  928. break
  929. }
  930. }
  931. case 11:
  932. if wireType != 0 {
  933. return fmt.Errorf("proto: wrong wireType = %d for field Oid", wireType)
  934. }
  935. m.Oid = 0
  936. for shift := uint(0); ; shift += 7 {
  937. if shift >= 64 {
  938. return ErrIntOverflowCoupon
  939. }
  940. if iNdEx >= l {
  941. return io.ErrUnexpectedEOF
  942. }
  943. b := dAtA[iNdEx]
  944. iNdEx++
  945. m.Oid |= (int64(b) & 0x7F) << shift
  946. if b < 0x80 {
  947. break
  948. }
  949. }
  950. case 12:
  951. if wireType != 2 {
  952. return fmt.Errorf("proto: wrong wireType = %d for field Remark", wireType)
  953. }
  954. var stringLen uint64
  955. for shift := uint(0); ; shift += 7 {
  956. if shift >= 64 {
  957. return ErrIntOverflowCoupon
  958. }
  959. if iNdEx >= l {
  960. return io.ErrUnexpectedEOF
  961. }
  962. b := dAtA[iNdEx]
  963. iNdEx++
  964. stringLen |= (uint64(b) & 0x7F) << shift
  965. if b < 0x80 {
  966. break
  967. }
  968. }
  969. intStringLen := int(stringLen)
  970. if intStringLen < 0 {
  971. return ErrInvalidLengthCoupon
  972. }
  973. postIndex := iNdEx + intStringLen
  974. if postIndex > l {
  975. return io.ErrUnexpectedEOF
  976. }
  977. m.Remark = string(dAtA[iNdEx:postIndex])
  978. iNdEx = postIndex
  979. case 13:
  980. if wireType != 0 {
  981. return fmt.Errorf("proto: wrong wireType = %d for field UseVer", wireType)
  982. }
  983. m.UseVer = 0
  984. for shift := uint(0); ; shift += 7 {
  985. if shift >= 64 {
  986. return ErrIntOverflowCoupon
  987. }
  988. if iNdEx >= l {
  989. return io.ErrUnexpectedEOF
  990. }
  991. b := dAtA[iNdEx]
  992. iNdEx++
  993. m.UseVer |= (int64(b) & 0x7F) << shift
  994. if b < 0x80 {
  995. break
  996. }
  997. }
  998. case 14:
  999. if wireType != 0 {
  1000. return fmt.Errorf("proto: wrong wireType = %d for field CTime", wireType)
  1001. }
  1002. m.CTime = 0
  1003. for shift := uint(0); ; shift += 7 {
  1004. if shift >= 64 {
  1005. return ErrIntOverflowCoupon
  1006. }
  1007. if iNdEx >= l {
  1008. return io.ErrUnexpectedEOF
  1009. }
  1010. b := dAtA[iNdEx]
  1011. iNdEx++
  1012. m.CTime |= (go_common_library_time.Time(b) & 0x7F) << shift
  1013. if b < 0x80 {
  1014. break
  1015. }
  1016. }
  1017. case 15:
  1018. if wireType != 0 {
  1019. return fmt.Errorf("proto: wrong wireType = %d for field MTime", wireType)
  1020. }
  1021. m.MTime = 0
  1022. for shift := uint(0); ; shift += 7 {
  1023. if shift >= 64 {
  1024. return ErrIntOverflowCoupon
  1025. }
  1026. if iNdEx >= l {
  1027. return io.ErrUnexpectedEOF
  1028. }
  1029. b := dAtA[iNdEx]
  1030. iNdEx++
  1031. m.MTime |= (go_common_library_time.Time(b) & 0x7F) << shift
  1032. if b < 0x80 {
  1033. break
  1034. }
  1035. }
  1036. case 16:
  1037. if wireType != 2 {
  1038. return fmt.Errorf("proto: wrong wireType = %d for field BatchToken", wireType)
  1039. }
  1040. var stringLen uint64
  1041. for shift := uint(0); ; shift += 7 {
  1042. if shift >= 64 {
  1043. return ErrIntOverflowCoupon
  1044. }
  1045. if iNdEx >= l {
  1046. return io.ErrUnexpectedEOF
  1047. }
  1048. b := dAtA[iNdEx]
  1049. iNdEx++
  1050. stringLen |= (uint64(b) & 0x7F) << shift
  1051. if b < 0x80 {
  1052. break
  1053. }
  1054. }
  1055. intStringLen := int(stringLen)
  1056. if intStringLen < 0 {
  1057. return ErrInvalidLengthCoupon
  1058. }
  1059. postIndex := iNdEx + intStringLen
  1060. if postIndex > l {
  1061. return io.ErrUnexpectedEOF
  1062. }
  1063. m.BatchToken = string(dAtA[iNdEx:postIndex])
  1064. iNdEx = postIndex
  1065. default:
  1066. iNdEx = preIndex
  1067. skippy, err := skipCoupon(dAtA[iNdEx:])
  1068. if err != nil {
  1069. return err
  1070. }
  1071. if skippy < 0 {
  1072. return ErrInvalidLengthCoupon
  1073. }
  1074. if (iNdEx + skippy) > l {
  1075. return io.ErrUnexpectedEOF
  1076. }
  1077. iNdEx += skippy
  1078. }
  1079. }
  1080. if iNdEx > l {
  1081. return io.ErrUnexpectedEOF
  1082. }
  1083. return nil
  1084. }
  1085. func (m *PointInfoList) Unmarshal(dAtA []byte) error {
  1086. l := len(dAtA)
  1087. iNdEx := 0
  1088. for iNdEx < l {
  1089. preIndex := iNdEx
  1090. var wire uint64
  1091. for shift := uint(0); ; shift += 7 {
  1092. if shift >= 64 {
  1093. return ErrIntOverflowCoupon
  1094. }
  1095. if iNdEx >= l {
  1096. return io.ErrUnexpectedEOF
  1097. }
  1098. b := dAtA[iNdEx]
  1099. iNdEx++
  1100. wire |= (uint64(b) & 0x7F) << shift
  1101. if b < 0x80 {
  1102. break
  1103. }
  1104. }
  1105. fieldNum := int32(wire >> 3)
  1106. wireType := int(wire & 0x7)
  1107. if wireType == 4 {
  1108. return fmt.Errorf("proto: PointInfoList: wiretype end group for non-group")
  1109. }
  1110. if fieldNum <= 0 {
  1111. return fmt.Errorf("proto: PointInfoList: illegal tag %d (wire type %d)", fieldNum, wire)
  1112. }
  1113. switch fieldNum {
  1114. case 1:
  1115. if wireType != 2 {
  1116. return fmt.Errorf("proto: wrong wireType = %d for field PointInfoList", wireType)
  1117. }
  1118. var msglen int
  1119. for shift := uint(0); ; shift += 7 {
  1120. if shift >= 64 {
  1121. return ErrIntOverflowCoupon
  1122. }
  1123. if iNdEx >= l {
  1124. return io.ErrUnexpectedEOF
  1125. }
  1126. b := dAtA[iNdEx]
  1127. iNdEx++
  1128. msglen |= (int(b) & 0x7F) << shift
  1129. if b < 0x80 {
  1130. break
  1131. }
  1132. }
  1133. if msglen < 0 {
  1134. return ErrInvalidLengthCoupon
  1135. }
  1136. postIndex := iNdEx + msglen
  1137. if postIndex > l {
  1138. return io.ErrUnexpectedEOF
  1139. }
  1140. m.PointInfoList = append(m.PointInfoList, &CouponInfo{})
  1141. if err := m.PointInfoList[len(m.PointInfoList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1142. return err
  1143. }
  1144. iNdEx = postIndex
  1145. default:
  1146. iNdEx = preIndex
  1147. skippy, err := skipCoupon(dAtA[iNdEx:])
  1148. if err != nil {
  1149. return err
  1150. }
  1151. if skippy < 0 {
  1152. return ErrInvalidLengthCoupon
  1153. }
  1154. if (iNdEx + skippy) > l {
  1155. return io.ErrUnexpectedEOF
  1156. }
  1157. iNdEx += skippy
  1158. }
  1159. }
  1160. if iNdEx > l {
  1161. return io.ErrUnexpectedEOF
  1162. }
  1163. return nil
  1164. }
  1165. func (m *CouponBalanceInfo) Unmarshal(dAtA []byte) error {
  1166. l := len(dAtA)
  1167. iNdEx := 0
  1168. for iNdEx < l {
  1169. preIndex := iNdEx
  1170. var wire uint64
  1171. for shift := uint(0); ; shift += 7 {
  1172. if shift >= 64 {
  1173. return ErrIntOverflowCoupon
  1174. }
  1175. if iNdEx >= l {
  1176. return io.ErrUnexpectedEOF
  1177. }
  1178. b := dAtA[iNdEx]
  1179. iNdEx++
  1180. wire |= (uint64(b) & 0x7F) << shift
  1181. if b < 0x80 {
  1182. break
  1183. }
  1184. }
  1185. fieldNum := int32(wire >> 3)
  1186. wireType := int(wire & 0x7)
  1187. if wireType == 4 {
  1188. return fmt.Errorf("proto: CouponBalanceInfo: wiretype end group for non-group")
  1189. }
  1190. if fieldNum <= 0 {
  1191. return fmt.Errorf("proto: CouponBalanceInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  1192. }
  1193. switch fieldNum {
  1194. case 1:
  1195. if wireType != 0 {
  1196. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1197. }
  1198. m.ID = 0
  1199. for shift := uint(0); ; shift += 7 {
  1200. if shift >= 64 {
  1201. return ErrIntOverflowCoupon
  1202. }
  1203. if iNdEx >= l {
  1204. return io.ErrUnexpectedEOF
  1205. }
  1206. b := dAtA[iNdEx]
  1207. iNdEx++
  1208. m.ID |= (int64(b) & 0x7F) << shift
  1209. if b < 0x80 {
  1210. break
  1211. }
  1212. }
  1213. case 2:
  1214. if wireType != 2 {
  1215. return fmt.Errorf("proto: wrong wireType = %d for field BatchToken", wireType)
  1216. }
  1217. var stringLen uint64
  1218. for shift := uint(0); ; shift += 7 {
  1219. if shift >= 64 {
  1220. return ErrIntOverflowCoupon
  1221. }
  1222. if iNdEx >= l {
  1223. return io.ErrUnexpectedEOF
  1224. }
  1225. b := dAtA[iNdEx]
  1226. iNdEx++
  1227. stringLen |= (uint64(b) & 0x7F) << shift
  1228. if b < 0x80 {
  1229. break
  1230. }
  1231. }
  1232. intStringLen := int(stringLen)
  1233. if intStringLen < 0 {
  1234. return ErrInvalidLengthCoupon
  1235. }
  1236. postIndex := iNdEx + intStringLen
  1237. if postIndex > l {
  1238. return io.ErrUnexpectedEOF
  1239. }
  1240. m.BatchToken = string(dAtA[iNdEx:postIndex])
  1241. iNdEx = postIndex
  1242. case 3:
  1243. if wireType != 0 {
  1244. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  1245. }
  1246. m.Mid = 0
  1247. for shift := uint(0); ; shift += 7 {
  1248. if shift >= 64 {
  1249. return ErrIntOverflowCoupon
  1250. }
  1251. if iNdEx >= l {
  1252. return io.ErrUnexpectedEOF
  1253. }
  1254. b := dAtA[iNdEx]
  1255. iNdEx++
  1256. m.Mid |= (int64(b) & 0x7F) << shift
  1257. if b < 0x80 {
  1258. break
  1259. }
  1260. }
  1261. case 4:
  1262. if wireType != 0 {
  1263. return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType)
  1264. }
  1265. m.Balance = 0
  1266. for shift := uint(0); ; shift += 7 {
  1267. if shift >= 64 {
  1268. return ErrIntOverflowCoupon
  1269. }
  1270. if iNdEx >= l {
  1271. return io.ErrUnexpectedEOF
  1272. }
  1273. b := dAtA[iNdEx]
  1274. iNdEx++
  1275. m.Balance |= (int64(b) & 0x7F) << shift
  1276. if b < 0x80 {
  1277. break
  1278. }
  1279. }
  1280. case 5:
  1281. if wireType != 0 {
  1282. return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType)
  1283. }
  1284. m.StartTime = 0
  1285. for shift := uint(0); ; shift += 7 {
  1286. if shift >= 64 {
  1287. return ErrIntOverflowCoupon
  1288. }
  1289. if iNdEx >= l {
  1290. return io.ErrUnexpectedEOF
  1291. }
  1292. b := dAtA[iNdEx]
  1293. iNdEx++
  1294. m.StartTime |= (int64(b) & 0x7F) << shift
  1295. if b < 0x80 {
  1296. break
  1297. }
  1298. }
  1299. case 6:
  1300. if wireType != 0 {
  1301. return fmt.Errorf("proto: wrong wireType = %d for field ExpireTime", wireType)
  1302. }
  1303. m.ExpireTime = 0
  1304. for shift := uint(0); ; shift += 7 {
  1305. if shift >= 64 {
  1306. return ErrIntOverflowCoupon
  1307. }
  1308. if iNdEx >= l {
  1309. return io.ErrUnexpectedEOF
  1310. }
  1311. b := dAtA[iNdEx]
  1312. iNdEx++
  1313. m.ExpireTime |= (int64(b) & 0x7F) << shift
  1314. if b < 0x80 {
  1315. break
  1316. }
  1317. }
  1318. case 7:
  1319. if wireType != 0 {
  1320. return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
  1321. }
  1322. m.Origin = 0
  1323. for shift := uint(0); ; shift += 7 {
  1324. if shift >= 64 {
  1325. return ErrIntOverflowCoupon
  1326. }
  1327. if iNdEx >= l {
  1328. return io.ErrUnexpectedEOF
  1329. }
  1330. b := dAtA[iNdEx]
  1331. iNdEx++
  1332. m.Origin |= (int64(b) & 0x7F) << shift
  1333. if b < 0x80 {
  1334. break
  1335. }
  1336. }
  1337. case 8:
  1338. if wireType != 0 {
  1339. return fmt.Errorf("proto: wrong wireType = %d for field CouponType", wireType)
  1340. }
  1341. m.CouponType = 0
  1342. for shift := uint(0); ; shift += 7 {
  1343. if shift >= 64 {
  1344. return ErrIntOverflowCoupon
  1345. }
  1346. if iNdEx >= l {
  1347. return io.ErrUnexpectedEOF
  1348. }
  1349. b := dAtA[iNdEx]
  1350. iNdEx++
  1351. m.CouponType |= (int64(b) & 0x7F) << shift
  1352. if b < 0x80 {
  1353. break
  1354. }
  1355. }
  1356. case 9:
  1357. if wireType != 0 {
  1358. return fmt.Errorf("proto: wrong wireType = %d for field Ver", wireType)
  1359. }
  1360. m.Ver = 0
  1361. for shift := uint(0); ; shift += 7 {
  1362. if shift >= 64 {
  1363. return ErrIntOverflowCoupon
  1364. }
  1365. if iNdEx >= l {
  1366. return io.ErrUnexpectedEOF
  1367. }
  1368. b := dAtA[iNdEx]
  1369. iNdEx++
  1370. m.Ver |= (int64(b) & 0x7F) << shift
  1371. if b < 0x80 {
  1372. break
  1373. }
  1374. }
  1375. case 10:
  1376. if wireType != 0 {
  1377. return fmt.Errorf("proto: wrong wireType = %d for field CTime", wireType)
  1378. }
  1379. m.CTime = 0
  1380. for shift := uint(0); ; shift += 7 {
  1381. if shift >= 64 {
  1382. return ErrIntOverflowCoupon
  1383. }
  1384. if iNdEx >= l {
  1385. return io.ErrUnexpectedEOF
  1386. }
  1387. b := dAtA[iNdEx]
  1388. iNdEx++
  1389. m.CTime |= (go_common_library_time.Time(b) & 0x7F) << shift
  1390. if b < 0x80 {
  1391. break
  1392. }
  1393. }
  1394. case 11:
  1395. if wireType != 0 {
  1396. return fmt.Errorf("proto: wrong wireType = %d for field MTime", wireType)
  1397. }
  1398. m.MTime = 0
  1399. for shift := uint(0); ; shift += 7 {
  1400. if shift >= 64 {
  1401. return ErrIntOverflowCoupon
  1402. }
  1403. if iNdEx >= l {
  1404. return io.ErrUnexpectedEOF
  1405. }
  1406. b := dAtA[iNdEx]
  1407. iNdEx++
  1408. m.MTime |= (go_common_library_time.Time(b) & 0x7F) << shift
  1409. if b < 0x80 {
  1410. break
  1411. }
  1412. }
  1413. default:
  1414. iNdEx = preIndex
  1415. skippy, err := skipCoupon(dAtA[iNdEx:])
  1416. if err != nil {
  1417. return err
  1418. }
  1419. if skippy < 0 {
  1420. return ErrInvalidLengthCoupon
  1421. }
  1422. if (iNdEx + skippy) > l {
  1423. return io.ErrUnexpectedEOF
  1424. }
  1425. iNdEx += skippy
  1426. }
  1427. }
  1428. if iNdEx > l {
  1429. return io.ErrUnexpectedEOF
  1430. }
  1431. return nil
  1432. }
  1433. func (m *CouponBalanceList) Unmarshal(dAtA []byte) error {
  1434. l := len(dAtA)
  1435. iNdEx := 0
  1436. for iNdEx < l {
  1437. preIndex := iNdEx
  1438. var wire uint64
  1439. for shift := uint(0); ; shift += 7 {
  1440. if shift >= 64 {
  1441. return ErrIntOverflowCoupon
  1442. }
  1443. if iNdEx >= l {
  1444. return io.ErrUnexpectedEOF
  1445. }
  1446. b := dAtA[iNdEx]
  1447. iNdEx++
  1448. wire |= (uint64(b) & 0x7F) << shift
  1449. if b < 0x80 {
  1450. break
  1451. }
  1452. }
  1453. fieldNum := int32(wire >> 3)
  1454. wireType := int(wire & 0x7)
  1455. if wireType == 4 {
  1456. return fmt.Errorf("proto: CouponBalanceList: wiretype end group for non-group")
  1457. }
  1458. if fieldNum <= 0 {
  1459. return fmt.Errorf("proto: CouponBalanceList: illegal tag %d (wire type %d)", fieldNum, wire)
  1460. }
  1461. switch fieldNum {
  1462. case 1:
  1463. if wireType != 2 {
  1464. return fmt.Errorf("proto: wrong wireType = %d for field CouponBalanceList", wireType)
  1465. }
  1466. var msglen int
  1467. for shift := uint(0); ; shift += 7 {
  1468. if shift >= 64 {
  1469. return ErrIntOverflowCoupon
  1470. }
  1471. if iNdEx >= l {
  1472. return io.ErrUnexpectedEOF
  1473. }
  1474. b := dAtA[iNdEx]
  1475. iNdEx++
  1476. msglen |= (int(b) & 0x7F) << shift
  1477. if b < 0x80 {
  1478. break
  1479. }
  1480. }
  1481. if msglen < 0 {
  1482. return ErrInvalidLengthCoupon
  1483. }
  1484. postIndex := iNdEx + msglen
  1485. if postIndex > l {
  1486. return io.ErrUnexpectedEOF
  1487. }
  1488. m.CouponBalanceList = append(m.CouponBalanceList, &CouponBalanceInfo{})
  1489. if err := m.CouponBalanceList[len(m.CouponBalanceList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1490. return err
  1491. }
  1492. iNdEx = postIndex
  1493. default:
  1494. iNdEx = preIndex
  1495. skippy, err := skipCoupon(dAtA[iNdEx:])
  1496. if err != nil {
  1497. return err
  1498. }
  1499. if skippy < 0 {
  1500. return ErrInvalidLengthCoupon
  1501. }
  1502. if (iNdEx + skippy) > l {
  1503. return io.ErrUnexpectedEOF
  1504. }
  1505. iNdEx += skippy
  1506. }
  1507. }
  1508. if iNdEx > l {
  1509. return io.ErrUnexpectedEOF
  1510. }
  1511. return nil
  1512. }
  1513. func (m *CouponAllowanceInfo) Unmarshal(dAtA []byte) error {
  1514. l := len(dAtA)
  1515. iNdEx := 0
  1516. for iNdEx < l {
  1517. preIndex := iNdEx
  1518. var wire uint64
  1519. for shift := uint(0); ; shift += 7 {
  1520. if shift >= 64 {
  1521. return ErrIntOverflowCoupon
  1522. }
  1523. if iNdEx >= l {
  1524. return io.ErrUnexpectedEOF
  1525. }
  1526. b := dAtA[iNdEx]
  1527. iNdEx++
  1528. wire |= (uint64(b) & 0x7F) << shift
  1529. if b < 0x80 {
  1530. break
  1531. }
  1532. }
  1533. fieldNum := int32(wire >> 3)
  1534. wireType := int(wire & 0x7)
  1535. if wireType == 4 {
  1536. return fmt.Errorf("proto: CouponAllowanceInfo: wiretype end group for non-group")
  1537. }
  1538. if fieldNum <= 0 {
  1539. return fmt.Errorf("proto: CouponAllowanceInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  1540. }
  1541. switch fieldNum {
  1542. case 1:
  1543. if wireType != 0 {
  1544. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1545. }
  1546. m.ID = 0
  1547. for shift := uint(0); ; shift += 7 {
  1548. if shift >= 64 {
  1549. return ErrIntOverflowCoupon
  1550. }
  1551. if iNdEx >= l {
  1552. return io.ErrUnexpectedEOF
  1553. }
  1554. b := dAtA[iNdEx]
  1555. iNdEx++
  1556. m.ID |= (int64(b) & 0x7F) << shift
  1557. if b < 0x80 {
  1558. break
  1559. }
  1560. }
  1561. case 2:
  1562. if wireType != 2 {
  1563. return fmt.Errorf("proto: wrong wireType = %d for field CouponToken", wireType)
  1564. }
  1565. var stringLen uint64
  1566. for shift := uint(0); ; shift += 7 {
  1567. if shift >= 64 {
  1568. return ErrIntOverflowCoupon
  1569. }
  1570. if iNdEx >= l {
  1571. return io.ErrUnexpectedEOF
  1572. }
  1573. b := dAtA[iNdEx]
  1574. iNdEx++
  1575. stringLen |= (uint64(b) & 0x7F) << shift
  1576. if b < 0x80 {
  1577. break
  1578. }
  1579. }
  1580. intStringLen := int(stringLen)
  1581. if intStringLen < 0 {
  1582. return ErrInvalidLengthCoupon
  1583. }
  1584. postIndex := iNdEx + intStringLen
  1585. if postIndex > l {
  1586. return io.ErrUnexpectedEOF
  1587. }
  1588. m.CouponToken = string(dAtA[iNdEx:postIndex])
  1589. iNdEx = postIndex
  1590. case 3:
  1591. if wireType != 0 {
  1592. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  1593. }
  1594. m.Mid = 0
  1595. for shift := uint(0); ; shift += 7 {
  1596. if shift >= 64 {
  1597. return ErrIntOverflowCoupon
  1598. }
  1599. if iNdEx >= l {
  1600. return io.ErrUnexpectedEOF
  1601. }
  1602. b := dAtA[iNdEx]
  1603. iNdEx++
  1604. m.Mid |= (int64(b) & 0x7F) << shift
  1605. if b < 0x80 {
  1606. break
  1607. }
  1608. }
  1609. case 4:
  1610. if wireType != 0 {
  1611. return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
  1612. }
  1613. m.State = 0
  1614. for shift := uint(0); ; shift += 7 {
  1615. if shift >= 64 {
  1616. return ErrIntOverflowCoupon
  1617. }
  1618. if iNdEx >= l {
  1619. return io.ErrUnexpectedEOF
  1620. }
  1621. b := dAtA[iNdEx]
  1622. iNdEx++
  1623. m.State |= (int32(b) & 0x7F) << shift
  1624. if b < 0x80 {
  1625. break
  1626. }
  1627. }
  1628. case 5:
  1629. if wireType != 0 {
  1630. return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType)
  1631. }
  1632. m.StartTime = 0
  1633. for shift := uint(0); ; shift += 7 {
  1634. if shift >= 64 {
  1635. return ErrIntOverflowCoupon
  1636. }
  1637. if iNdEx >= l {
  1638. return io.ErrUnexpectedEOF
  1639. }
  1640. b := dAtA[iNdEx]
  1641. iNdEx++
  1642. m.StartTime |= (int64(b) & 0x7F) << shift
  1643. if b < 0x80 {
  1644. break
  1645. }
  1646. }
  1647. case 6:
  1648. if wireType != 0 {
  1649. return fmt.Errorf("proto: wrong wireType = %d for field ExpireTime", wireType)
  1650. }
  1651. m.ExpireTime = 0
  1652. for shift := uint(0); ; shift += 7 {
  1653. if shift >= 64 {
  1654. return ErrIntOverflowCoupon
  1655. }
  1656. if iNdEx >= l {
  1657. return io.ErrUnexpectedEOF
  1658. }
  1659. b := dAtA[iNdEx]
  1660. iNdEx++
  1661. m.ExpireTime |= (int64(b) & 0x7F) << shift
  1662. if b < 0x80 {
  1663. break
  1664. }
  1665. }
  1666. case 7:
  1667. if wireType != 0 {
  1668. return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
  1669. }
  1670. m.Origin = 0
  1671. for shift := uint(0); ; shift += 7 {
  1672. if shift >= 64 {
  1673. return ErrIntOverflowCoupon
  1674. }
  1675. if iNdEx >= l {
  1676. return io.ErrUnexpectedEOF
  1677. }
  1678. b := dAtA[iNdEx]
  1679. iNdEx++
  1680. m.Origin |= (int64(b) & 0x7F) << shift
  1681. if b < 0x80 {
  1682. break
  1683. }
  1684. }
  1685. case 8:
  1686. if wireType != 2 {
  1687. return fmt.Errorf("proto: wrong wireType = %d for field OrderNO", wireType)
  1688. }
  1689. var stringLen uint64
  1690. for shift := uint(0); ; shift += 7 {
  1691. if shift >= 64 {
  1692. return ErrIntOverflowCoupon
  1693. }
  1694. if iNdEx >= l {
  1695. return io.ErrUnexpectedEOF
  1696. }
  1697. b := dAtA[iNdEx]
  1698. iNdEx++
  1699. stringLen |= (uint64(b) & 0x7F) << shift
  1700. if b < 0x80 {
  1701. break
  1702. }
  1703. }
  1704. intStringLen := int(stringLen)
  1705. if intStringLen < 0 {
  1706. return ErrInvalidLengthCoupon
  1707. }
  1708. postIndex := iNdEx + intStringLen
  1709. if postIndex > l {
  1710. return io.ErrUnexpectedEOF
  1711. }
  1712. m.OrderNO = string(dAtA[iNdEx:postIndex])
  1713. iNdEx = postIndex
  1714. case 9:
  1715. if wireType != 0 {
  1716. return fmt.Errorf("proto: wrong wireType = %d for field Ver", wireType)
  1717. }
  1718. m.Ver = 0
  1719. for shift := uint(0); ; shift += 7 {
  1720. if shift >= 64 {
  1721. return ErrIntOverflowCoupon
  1722. }
  1723. if iNdEx >= l {
  1724. return io.ErrUnexpectedEOF
  1725. }
  1726. b := dAtA[iNdEx]
  1727. iNdEx++
  1728. m.Ver |= (int64(b) & 0x7F) << shift
  1729. if b < 0x80 {
  1730. break
  1731. }
  1732. }
  1733. case 10:
  1734. if wireType != 2 {
  1735. return fmt.Errorf("proto: wrong wireType = %d for field Remark", wireType)
  1736. }
  1737. var stringLen uint64
  1738. for shift := uint(0); ; shift += 7 {
  1739. if shift >= 64 {
  1740. return ErrIntOverflowCoupon
  1741. }
  1742. if iNdEx >= l {
  1743. return io.ErrUnexpectedEOF
  1744. }
  1745. b := dAtA[iNdEx]
  1746. iNdEx++
  1747. stringLen |= (uint64(b) & 0x7F) << shift
  1748. if b < 0x80 {
  1749. break
  1750. }
  1751. }
  1752. intStringLen := int(stringLen)
  1753. if intStringLen < 0 {
  1754. return ErrInvalidLengthCoupon
  1755. }
  1756. postIndex := iNdEx + intStringLen
  1757. if postIndex > l {
  1758. return io.ErrUnexpectedEOF
  1759. }
  1760. m.Remark = string(dAtA[iNdEx:postIndex])
  1761. iNdEx = postIndex
  1762. case 11:
  1763. if wireType != 0 {
  1764. return fmt.Errorf("proto: wrong wireType = %d for field CTime", wireType)
  1765. }
  1766. m.CTime = 0
  1767. for shift := uint(0); ; shift += 7 {
  1768. if shift >= 64 {
  1769. return ErrIntOverflowCoupon
  1770. }
  1771. if iNdEx >= l {
  1772. return io.ErrUnexpectedEOF
  1773. }
  1774. b := dAtA[iNdEx]
  1775. iNdEx++
  1776. m.CTime |= (go_common_library_time.Time(b) & 0x7F) << shift
  1777. if b < 0x80 {
  1778. break
  1779. }
  1780. }
  1781. case 12:
  1782. if wireType != 0 {
  1783. return fmt.Errorf("proto: wrong wireType = %d for field MTime", wireType)
  1784. }
  1785. m.MTime = 0
  1786. for shift := uint(0); ; shift += 7 {
  1787. if shift >= 64 {
  1788. return ErrIntOverflowCoupon
  1789. }
  1790. if iNdEx >= l {
  1791. return io.ErrUnexpectedEOF
  1792. }
  1793. b := dAtA[iNdEx]
  1794. iNdEx++
  1795. m.MTime |= (go_common_library_time.Time(b) & 0x7F) << shift
  1796. if b < 0x80 {
  1797. break
  1798. }
  1799. }
  1800. case 13:
  1801. if wireType != 2 {
  1802. return fmt.Errorf("proto: wrong wireType = %d for field BatchToken", wireType)
  1803. }
  1804. var stringLen uint64
  1805. for shift := uint(0); ; shift += 7 {
  1806. if shift >= 64 {
  1807. return ErrIntOverflowCoupon
  1808. }
  1809. if iNdEx >= l {
  1810. return io.ErrUnexpectedEOF
  1811. }
  1812. b := dAtA[iNdEx]
  1813. iNdEx++
  1814. stringLen |= (uint64(b) & 0x7F) << shift
  1815. if b < 0x80 {
  1816. break
  1817. }
  1818. }
  1819. intStringLen := int(stringLen)
  1820. if intStringLen < 0 {
  1821. return ErrInvalidLengthCoupon
  1822. }
  1823. postIndex := iNdEx + intStringLen
  1824. if postIndex > l {
  1825. return io.ErrUnexpectedEOF
  1826. }
  1827. m.BatchToken = string(dAtA[iNdEx:postIndex])
  1828. iNdEx = postIndex
  1829. case 14:
  1830. if wireType != 1 {
  1831. return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
  1832. }
  1833. var v uint64
  1834. if (iNdEx + 8) > l {
  1835. return io.ErrUnexpectedEOF
  1836. }
  1837. v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1838. iNdEx += 8
  1839. m.Amount = float64(math.Float64frombits(v))
  1840. case 15:
  1841. if wireType != 1 {
  1842. return fmt.Errorf("proto: wrong wireType = %d for field FullAmount", wireType)
  1843. }
  1844. var v uint64
  1845. if (iNdEx + 8) > l {
  1846. return io.ErrUnexpectedEOF
  1847. }
  1848. v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1849. iNdEx += 8
  1850. m.FullAmount = float64(math.Float64frombits(v))
  1851. case 16:
  1852. if wireType != 0 {
  1853. return fmt.Errorf("proto: wrong wireType = %d for field AppID", wireType)
  1854. }
  1855. m.AppID = 0
  1856. for shift := uint(0); ; shift += 7 {
  1857. if shift >= 64 {
  1858. return ErrIntOverflowCoupon
  1859. }
  1860. if iNdEx >= l {
  1861. return io.ErrUnexpectedEOF
  1862. }
  1863. b := dAtA[iNdEx]
  1864. iNdEx++
  1865. m.AppID |= (int64(b) & 0x7F) << shift
  1866. if b < 0x80 {
  1867. break
  1868. }
  1869. }
  1870. default:
  1871. iNdEx = preIndex
  1872. skippy, err := skipCoupon(dAtA[iNdEx:])
  1873. if err != nil {
  1874. return err
  1875. }
  1876. if skippy < 0 {
  1877. return ErrInvalidLengthCoupon
  1878. }
  1879. if (iNdEx + skippy) > l {
  1880. return io.ErrUnexpectedEOF
  1881. }
  1882. iNdEx += skippy
  1883. }
  1884. }
  1885. if iNdEx > l {
  1886. return io.ErrUnexpectedEOF
  1887. }
  1888. return nil
  1889. }
  1890. func (m *CouponAllowanceList) Unmarshal(dAtA []byte) error {
  1891. l := len(dAtA)
  1892. iNdEx := 0
  1893. for iNdEx < l {
  1894. preIndex := iNdEx
  1895. var wire uint64
  1896. for shift := uint(0); ; shift += 7 {
  1897. if shift >= 64 {
  1898. return ErrIntOverflowCoupon
  1899. }
  1900. if iNdEx >= l {
  1901. return io.ErrUnexpectedEOF
  1902. }
  1903. b := dAtA[iNdEx]
  1904. iNdEx++
  1905. wire |= (uint64(b) & 0x7F) << shift
  1906. if b < 0x80 {
  1907. break
  1908. }
  1909. }
  1910. fieldNum := int32(wire >> 3)
  1911. wireType := int(wire & 0x7)
  1912. if wireType == 4 {
  1913. return fmt.Errorf("proto: CouponAllowanceList: wiretype end group for non-group")
  1914. }
  1915. if fieldNum <= 0 {
  1916. return fmt.Errorf("proto: CouponAllowanceList: illegal tag %d (wire type %d)", fieldNum, wire)
  1917. }
  1918. switch fieldNum {
  1919. case 1:
  1920. if wireType != 2 {
  1921. return fmt.Errorf("proto: wrong wireType = %d for field CouponAllowanceList", wireType)
  1922. }
  1923. var msglen int
  1924. for shift := uint(0); ; shift += 7 {
  1925. if shift >= 64 {
  1926. return ErrIntOverflowCoupon
  1927. }
  1928. if iNdEx >= l {
  1929. return io.ErrUnexpectedEOF
  1930. }
  1931. b := dAtA[iNdEx]
  1932. iNdEx++
  1933. msglen |= (int(b) & 0x7F) << shift
  1934. if b < 0x80 {
  1935. break
  1936. }
  1937. }
  1938. if msglen < 0 {
  1939. return ErrInvalidLengthCoupon
  1940. }
  1941. postIndex := iNdEx + msglen
  1942. if postIndex > l {
  1943. return io.ErrUnexpectedEOF
  1944. }
  1945. m.CouponAllowanceList = append(m.CouponAllowanceList, &CouponAllowanceInfo{})
  1946. if err := m.CouponAllowanceList[len(m.CouponAllowanceList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1947. return err
  1948. }
  1949. iNdEx = postIndex
  1950. default:
  1951. iNdEx = preIndex
  1952. skippy, err := skipCoupon(dAtA[iNdEx:])
  1953. if err != nil {
  1954. return err
  1955. }
  1956. if skippy < 0 {
  1957. return ErrInvalidLengthCoupon
  1958. }
  1959. if (iNdEx + skippy) > l {
  1960. return io.ErrUnexpectedEOF
  1961. }
  1962. iNdEx += skippy
  1963. }
  1964. }
  1965. if iNdEx > l {
  1966. return io.ErrUnexpectedEOF
  1967. }
  1968. return nil
  1969. }
  1970. func skipCoupon(dAtA []byte) (n int, err error) {
  1971. l := len(dAtA)
  1972. iNdEx := 0
  1973. for iNdEx < l {
  1974. var wire uint64
  1975. for shift := uint(0); ; shift += 7 {
  1976. if shift >= 64 {
  1977. return 0, ErrIntOverflowCoupon
  1978. }
  1979. if iNdEx >= l {
  1980. return 0, io.ErrUnexpectedEOF
  1981. }
  1982. b := dAtA[iNdEx]
  1983. iNdEx++
  1984. wire |= (uint64(b) & 0x7F) << shift
  1985. if b < 0x80 {
  1986. break
  1987. }
  1988. }
  1989. wireType := int(wire & 0x7)
  1990. switch wireType {
  1991. case 0:
  1992. for shift := uint(0); ; shift += 7 {
  1993. if shift >= 64 {
  1994. return 0, ErrIntOverflowCoupon
  1995. }
  1996. if iNdEx >= l {
  1997. return 0, io.ErrUnexpectedEOF
  1998. }
  1999. iNdEx++
  2000. if dAtA[iNdEx-1] < 0x80 {
  2001. break
  2002. }
  2003. }
  2004. return iNdEx, nil
  2005. case 1:
  2006. iNdEx += 8
  2007. return iNdEx, nil
  2008. case 2:
  2009. var length int
  2010. for shift := uint(0); ; shift += 7 {
  2011. if shift >= 64 {
  2012. return 0, ErrIntOverflowCoupon
  2013. }
  2014. if iNdEx >= l {
  2015. return 0, io.ErrUnexpectedEOF
  2016. }
  2017. b := dAtA[iNdEx]
  2018. iNdEx++
  2019. length |= (int(b) & 0x7F) << shift
  2020. if b < 0x80 {
  2021. break
  2022. }
  2023. }
  2024. iNdEx += length
  2025. if length < 0 {
  2026. return 0, ErrInvalidLengthCoupon
  2027. }
  2028. return iNdEx, nil
  2029. case 3:
  2030. for {
  2031. var innerWire uint64
  2032. var start int = iNdEx
  2033. for shift := uint(0); ; shift += 7 {
  2034. if shift >= 64 {
  2035. return 0, ErrIntOverflowCoupon
  2036. }
  2037. if iNdEx >= l {
  2038. return 0, io.ErrUnexpectedEOF
  2039. }
  2040. b := dAtA[iNdEx]
  2041. iNdEx++
  2042. innerWire |= (uint64(b) & 0x7F) << shift
  2043. if b < 0x80 {
  2044. break
  2045. }
  2046. }
  2047. innerWireType := int(innerWire & 0x7)
  2048. if innerWireType == 4 {
  2049. break
  2050. }
  2051. next, err := skipCoupon(dAtA[start:])
  2052. if err != nil {
  2053. return 0, err
  2054. }
  2055. iNdEx = start + next
  2056. }
  2057. return iNdEx, nil
  2058. case 4:
  2059. return iNdEx, nil
  2060. case 5:
  2061. iNdEx += 4
  2062. return iNdEx, nil
  2063. default:
  2064. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2065. }
  2066. }
  2067. panic("unreachable")
  2068. }
  2069. var (
  2070. ErrInvalidLengthCoupon = fmt.Errorf("proto: negative length found during unmarshaling")
  2071. ErrIntOverflowCoupon = fmt.Errorf("proto: integer overflow")
  2072. )
  2073. func init() { proto.RegisterFile("coupon.proto", fileDescriptorCoupon) }
  2074. var fileDescriptorCoupon = []byte{
  2075. // 726 bytes of a gzipped FileDescriptorProto
  2076. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x96, 0xcd, 0x4e, 0xdb, 0x4e,
  2077. 0x14, 0xc5, 0x71, 0xf2, 0x77, 0x42, 0x6e, 0x12, 0x3e, 0x8c, 0xfe, 0xd2, 0x94, 0x4a, 0x71, 0xe4,
  2078. 0x7e, 0x88, 0x45, 0x49, 0x24, 0xba, 0xa8, 0xd4, 0x1d, 0x81, 0xa2, 0x46, 0x82, 0xa6, 0x1a, 0x68,
  2079. 0x37, 0x5d, 0x44, 0x8e, 0x33, 0x84, 0x11, 0xb6, 0xc7, 0x72, 0x9c, 0xb6, 0x3c, 0x49, 0xfb, 0x04,
  2080. 0x7d, 0x16, 0x96, 0x3c, 0x81, 0x55, 0x68, 0x57, 0x7e, 0x84, 0xae, 0xaa, 0xb9, 0x9e, 0x10, 0x07,
  2081. 0x28, 0x14, 0xa1, 0x4a, 0xed, 0x2e, 0x3e, 0xe7, 0xcc, 0xf5, 0xcc, 0x9d, 0x9f, 0xaf, 0x02, 0x15,
  2082. 0x47, 0x8c, 0x02, 0xe1, 0x37, 0x82, 0x50, 0x44, 0xc2, 0xd0, 0x3d, 0xd1, 0x67, 0xee, 0xf2, 0xea,
  2083. 0x80, 0x47, 0x07, 0xa3, 0x5e, 0xc3, 0x11, 0x5e, 0x73, 0x20, 0x06, 0xa2, 0x89, 0x6e, 0x6f, 0xb4,
  2084. 0x8f, 0x4f, 0xf8, 0x80, 0xbf, 0xd2, 0x55, 0xd6, 0x27, 0x1d, 0x60, 0x03, 0xcb, 0xb4, 0xfd, 0x7d,
  2085. 0x61, 0xfc, 0x0f, 0xb9, 0xf6, 0x26, 0xd1, 0xea, 0xda, 0x4a, 0xbe, 0xa5, 0x27, 0xb1, 0xa9, 0x75,
  2086. 0x69, 0xae, 0xbd, 0x69, 0xac, 0x41, 0x39, 0x0d, 0xed, 0x89, 0x43, 0xe6, 0x93, 0x5c, 0x5d, 0x5b,
  2087. 0x29, 0xb5, 0x16, 0x92, 0xd8, 0x54, 0x5b, 0xe8, 0x46, 0x52, 0xa7, 0xd9, 0x90, 0x71, 0x0f, 0xf2,
  2088. 0x3b, 0xbc, 0x4f, 0xf2, 0x58, 0xab, 0x98, 0xc4, 0x66, 0xde, 0xe3, 0x7d, 0x2a, 0x35, 0xc3, 0x04,
  2089. 0x7d, 0x37, 0xb2, 0x23, 0x46, 0xfe, 0x43, 0xb3, 0x94, 0xc4, 0xa6, 0x3e, 0x94, 0x02, 0x4d, 0x75,
  2090. 0xe3, 0x09, 0x94, 0x76, 0x23, 0x3b, 0x8c, 0xf6, 0xb8, 0xc7, 0x88, 0x8e, 0xa1, 0xb9, 0x24, 0x36,
  2091. 0x61, 0x28, 0xc5, 0x6e, 0xc4, 0x3d, 0x46, 0x27, 0x01, 0xa3, 0x09, 0xf0, 0xe2, 0x63, 0xc0, 0x43,
  2092. 0x86, 0xf1, 0x02, 0xc6, 0xe7, 0x93, 0xd8, 0x2c, 0x33, 0x54, 0xd3, 0x7c, 0x26, 0x62, 0x58, 0x50,
  2093. 0xe8, 0x84, 0x7c, 0xc0, 0x7d, 0x52, 0xc4, 0x30, 0x24, 0xb1, 0x59, 0x10, 0xa8, 0x50, 0xe5, 0xc8,
  2094. 0xa2, 0xea, 0x34, 0x47, 0x01, 0x23, 0xb3, 0x93, 0xa2, 0xe3, 0x13, 0x1f, 0x05, 0x8c, 0x66, 0x22,
  2095. 0xc6, 0x63, 0x28, 0x76, 0xc2, 0x3e, 0x0b, 0x5f, 0x75, 0x48, 0x09, 0xfb, 0x53, 0x49, 0x62, 0x73,
  2096. 0x56, 0x48, 0xa9, 0xeb, 0x0b, 0x3a, 0x36, 0x65, 0x5f, 0xde, 0xb2, 0x90, 0xc0, 0xa4, 0x2f, 0xef,
  2097. 0x59, 0x48, 0xa5, 0x26, 0xad, 0x0e, 0xef, 0x93, 0xf2, 0xc4, 0x12, 0xb2, 0x65, 0x1d, 0xde, 0x97,
  2098. 0x5b, 0xa6, 0xcc, 0xb3, 0xc3, 0x43, 0x52, 0xc1, 0xe2, 0xb8, 0xe5, 0x10, 0x15, 0xaa, 0x1c, 0xe3,
  2099. 0x01, 0x14, 0xde, 0x0c, 0x99, 0x2c, 0x5e, 0xc5, 0x0a, 0xe5, 0x24, 0x36, 0x8b, 0xa3, 0x21, 0xeb,
  2100. 0xca, 0x17, 0x28, 0xcb, 0x78, 0x0e, 0xfa, 0x06, 0xf6, 0x69, 0x0e, 0x33, 0x0f, 0xe5, 0x25, 0xaf,
  2101. 0xfe, 0x88, 0xcd, 0xfb, 0x03, 0xb1, 0xea, 0x08, 0xcf, 0x13, 0x7e, 0xd3, 0xe5, 0xbd, 0xd0, 0x0e,
  2102. 0x8f, 0x9a, 0xb2, 0x6f, 0x0d, 0x99, 0xa5, 0xe9, 0x12, 0xb9, 0x76, 0x07, 0xd7, 0xce, 0xdf, 0x66,
  2103. 0xed, 0xce, 0xf8, 0x92, 0x5a, 0x76, 0xe4, 0x1c, 0xa4, 0x04, 0x2d, 0xe0, 0x21, 0xb0, 0x9f, 0x3d,
  2104. 0xa9, 0x2a, 0x80, 0x32, 0x11, 0xeb, 0x25, 0x54, 0x5f, 0x0b, 0xee, 0x47, 0x92, 0xcb, 0x6d, 0x3e,
  2105. 0x8c, 0x8c, 0x67, 0x50, 0x0d, 0xb2, 0x02, 0xd1, 0xea, 0xf9, 0x95, 0xf2, 0xda, 0x62, 0x03, 0xc1,
  2106. 0x6f, 0x4c, 0x28, 0xa6, 0xd3, 0x39, 0xeb, 0x7b, 0x1e, 0x16, 0x53, 0xb7, 0x65, 0xbb, 0xb6, 0xef,
  2107. 0xb0, 0xeb, 0x50, 0x9f, 0xde, 0x67, 0xee, 0xc6, 0x7d, 0x5e, 0xc7, 0xf9, 0x23, 0x28, 0xaa, 0x37,
  2108. 0x2a, 0xd2, 0xf1, 0x46, 0x7a, 0xa9, 0x44, 0xc7, 0xde, 0x3f, 0x49, 0xbb, 0xa2, 0xb8, 0x74, 0x05,
  2109. 0xc5, 0xe7, 0x84, 0xc1, 0x1d, 0x08, 0x2b, 0xdf, 0x9a, 0x30, 0xeb, 0xdd, 0x85, 0x5b, 0x46, 0x68,
  2110. 0xb6, 0x60, 0xd1, 0xb9, 0x28, 0x2a, 0x70, 0xc8, 0x14, 0x38, 0x19, 0x34, 0xe8, 0xe5, 0x25, 0xd6,
  2111. 0x17, 0x1d, 0x96, 0xd2, 0xe0, 0xba, 0xeb, 0x8a, 0x0f, 0x37, 0x51, 0xf4, 0x27, 0x07, 0xa6, 0xfe,
  2112. 0x77, 0x0e, 0xcc, 0xcc, 0xfc, 0x9b, 0xfd, 0x8d, 0xf9, 0x77, 0x15, 0x39, 0x93, 0x21, 0x07, 0xbf,
  2113. 0x1c, 0x72, 0xe7, 0x74, 0x95, 0xef, 0x40, 0x57, 0xe5, 0xae, 0xf3, 0xab, 0x7a, 0xf3, 0x5c, 0xb0,
  2114. 0xa0, 0xb0, 0xee, 0x89, 0x91, 0x1f, 0xe1, 0xa4, 0xd5, 0xd2, 0xc3, 0xd8, 0xa8, 0x50, 0xe5, 0xc8,
  2115. 0xa2, 0x5b, 0x23, 0xd7, 0x55, 0xb9, 0x79, 0xcc, 0x61, 0xd1, 0xfd, 0x91, 0xeb, 0x76, 0x55, 0x38,
  2116. 0x13, 0x31, 0xea, 0xa0, 0xaf, 0x07, 0x41, 0x7b, 0x13, 0x07, 0xa8, 0xba, 0x07, 0x3b, 0x08, 0xba,
  2117. 0xbc, 0x4f, 0x53, 0xc3, 0x72, 0x2e, 0x71, 0x8a, 0xdf, 0xc1, 0x36, 0x2c, 0x39, 0x97, 0x65, 0xf5,
  2118. 0x25, 0x2c, 0x4f, 0x7d, 0x09, 0x53, 0x80, 0xd3, 0xab, 0x96, 0xb5, 0xc8, 0xf1, 0x69, 0x6d, 0xe6,
  2119. 0xe4, 0xb4, 0x36, 0x73, 0x7c, 0x56, 0xd3, 0x4e, 0xce, 0x6a, 0xda, 0xd7, 0xb3, 0x9a, 0xf6, 0xf9,
  2120. 0x5b, 0x6d, 0xa6, 0x57, 0xc0, 0xbf, 0x15, 0x4f, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x6f, 0xb8,
  2121. 0xbe, 0xdd, 0x9c, 0x08, 0x00, 0x00,
  2122. }