requiredexample.pb.go 54 KB

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