test_objects.pb.go 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: test_objects.proto
  3. package jsonpb
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import google_protobuf "github.com/golang/protobuf/ptypes/any"
  8. import google_protobuf1 "github.com/golang/protobuf/ptypes/duration"
  9. import google_protobuf2 "github.com/golang/protobuf/ptypes/struct"
  10. import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp"
  11. import google_protobuf4 "github.com/golang/protobuf/ptypes/wrappers"
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. type Widget_Color int32
  17. const (
  18. Widget_RED Widget_Color = 0
  19. Widget_GREEN Widget_Color = 1
  20. Widget_BLUE Widget_Color = 2
  21. )
  22. var Widget_Color_name = map[int32]string{
  23. 0: "RED",
  24. 1: "GREEN",
  25. 2: "BLUE",
  26. }
  27. var Widget_Color_value = map[string]int32{
  28. "RED": 0,
  29. "GREEN": 1,
  30. "BLUE": 2,
  31. }
  32. func (x Widget_Color) Enum() *Widget_Color {
  33. p := new(Widget_Color)
  34. *p = x
  35. return p
  36. }
  37. func (x Widget_Color) String() string {
  38. return proto.EnumName(Widget_Color_name, int32(x))
  39. }
  40. func (x *Widget_Color) UnmarshalJSON(data []byte) error {
  41. value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color")
  42. if err != nil {
  43. return err
  44. }
  45. *x = Widget_Color(value)
  46. return nil
  47. }
  48. func (Widget_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{3, 0} }
  49. // Test message for holding primitive types.
  50. type Simple struct {
  51. OBool *bool `protobuf:"varint,1,opt,name=o_bool,json=oBool" json:"o_bool,omitempty"`
  52. OInt32 *int32 `protobuf:"varint,2,opt,name=o_int32,json=oInt32" json:"o_int32,omitempty"`
  53. OInt64 *int64 `protobuf:"varint,3,opt,name=o_int64,json=oInt64" json:"o_int64,omitempty"`
  54. OUint32 *uint32 `protobuf:"varint,4,opt,name=o_uint32,json=oUint32" json:"o_uint32,omitempty"`
  55. OUint64 *uint64 `protobuf:"varint,5,opt,name=o_uint64,json=oUint64" json:"o_uint64,omitempty"`
  56. OSint32 *int32 `protobuf:"zigzag32,6,opt,name=o_sint32,json=oSint32" json:"o_sint32,omitempty"`
  57. OSint64 *int64 `protobuf:"zigzag64,7,opt,name=o_sint64,json=oSint64" json:"o_sint64,omitempty"`
  58. OFloat *float32 `protobuf:"fixed32,8,opt,name=o_float,json=oFloat" json:"o_float,omitempty"`
  59. ODouble *float64 `protobuf:"fixed64,9,opt,name=o_double,json=oDouble" json:"o_double,omitempty"`
  60. OString *string `protobuf:"bytes,10,opt,name=o_string,json=oString" json:"o_string,omitempty"`
  61. OBytes []byte `protobuf:"bytes,11,opt,name=o_bytes,json=oBytes" json:"o_bytes,omitempty"`
  62. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  63. XXX_unrecognized []byte `json:"-"`
  64. XXX_sizecache int32 `json:"-"`
  65. }
  66. func (m *Simple) Reset() { *m = Simple{} }
  67. func (m *Simple) String() string { return proto.CompactTextString(m) }
  68. func (*Simple) ProtoMessage() {}
  69. func (*Simple) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
  70. func (m *Simple) Unmarshal(b []byte) error {
  71. return xxx_messageInfo_Simple.Unmarshal(m, b)
  72. }
  73. func (m *Simple) Marshal(b []byte, deterministic bool) ([]byte, error) {
  74. return xxx_messageInfo_Simple.Marshal(b, m, deterministic)
  75. }
  76. func (dst *Simple) XXX_Merge(src proto.Message) {
  77. xxx_messageInfo_Simple.Merge(dst, src)
  78. }
  79. func (m *Simple) XXX_Size() int {
  80. return xxx_messageInfo_Simple.Size(m)
  81. }
  82. func (m *Simple) XXX_DiscardUnknown() {
  83. xxx_messageInfo_Simple.DiscardUnknown(m)
  84. }
  85. var xxx_messageInfo_Simple proto.InternalMessageInfo
  86. func (m *Simple) GetOBool() bool {
  87. if m != nil && m.OBool != nil {
  88. return *m.OBool
  89. }
  90. return false
  91. }
  92. func (m *Simple) GetOInt32() int32 {
  93. if m != nil && m.OInt32 != nil {
  94. return *m.OInt32
  95. }
  96. return 0
  97. }
  98. func (m *Simple) GetOInt64() int64 {
  99. if m != nil && m.OInt64 != nil {
  100. return *m.OInt64
  101. }
  102. return 0
  103. }
  104. func (m *Simple) GetOUint32() uint32 {
  105. if m != nil && m.OUint32 != nil {
  106. return *m.OUint32
  107. }
  108. return 0
  109. }
  110. func (m *Simple) GetOUint64() uint64 {
  111. if m != nil && m.OUint64 != nil {
  112. return *m.OUint64
  113. }
  114. return 0
  115. }
  116. func (m *Simple) GetOSint32() int32 {
  117. if m != nil && m.OSint32 != nil {
  118. return *m.OSint32
  119. }
  120. return 0
  121. }
  122. func (m *Simple) GetOSint64() int64 {
  123. if m != nil && m.OSint64 != nil {
  124. return *m.OSint64
  125. }
  126. return 0
  127. }
  128. func (m *Simple) GetOFloat() float32 {
  129. if m != nil && m.OFloat != nil {
  130. return *m.OFloat
  131. }
  132. return 0
  133. }
  134. func (m *Simple) GetODouble() float64 {
  135. if m != nil && m.ODouble != nil {
  136. return *m.ODouble
  137. }
  138. return 0
  139. }
  140. func (m *Simple) GetOString() string {
  141. if m != nil && m.OString != nil {
  142. return *m.OString
  143. }
  144. return ""
  145. }
  146. func (m *Simple) GetOBytes() []byte {
  147. if m != nil {
  148. return m.OBytes
  149. }
  150. return nil
  151. }
  152. // Test message for holding special non-finites primitives.
  153. type NonFinites struct {
  154. FNan *float32 `protobuf:"fixed32,1,opt,name=f_nan,json=fNan" json:"f_nan,omitempty"`
  155. FPinf *float32 `protobuf:"fixed32,2,opt,name=f_pinf,json=fPinf" json:"f_pinf,omitempty"`
  156. FNinf *float32 `protobuf:"fixed32,3,opt,name=f_ninf,json=fNinf" json:"f_ninf,omitempty"`
  157. DNan *float64 `protobuf:"fixed64,4,opt,name=d_nan,json=dNan" json:"d_nan,omitempty"`
  158. DPinf *float64 `protobuf:"fixed64,5,opt,name=d_pinf,json=dPinf" json:"d_pinf,omitempty"`
  159. DNinf *float64 `protobuf:"fixed64,6,opt,name=d_ninf,json=dNinf" json:"d_ninf,omitempty"`
  160. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  161. XXX_unrecognized []byte `json:"-"`
  162. XXX_sizecache int32 `json:"-"`
  163. }
  164. func (m *NonFinites) Reset() { *m = NonFinites{} }
  165. func (m *NonFinites) String() string { return proto.CompactTextString(m) }
  166. func (*NonFinites) ProtoMessage() {}
  167. func (*NonFinites) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
  168. func (m *NonFinites) Unmarshal(b []byte) error {
  169. return xxx_messageInfo_NonFinites.Unmarshal(m, b)
  170. }
  171. func (m *NonFinites) Marshal(b []byte, deterministic bool) ([]byte, error) {
  172. return xxx_messageInfo_NonFinites.Marshal(b, m, deterministic)
  173. }
  174. func (dst *NonFinites) XXX_Merge(src proto.Message) {
  175. xxx_messageInfo_NonFinites.Merge(dst, src)
  176. }
  177. func (m *NonFinites) XXX_Size() int {
  178. return xxx_messageInfo_NonFinites.Size(m)
  179. }
  180. func (m *NonFinites) XXX_DiscardUnknown() {
  181. xxx_messageInfo_NonFinites.DiscardUnknown(m)
  182. }
  183. var xxx_messageInfo_NonFinites proto.InternalMessageInfo
  184. func (m *NonFinites) GetFNan() float32 {
  185. if m != nil && m.FNan != nil {
  186. return *m.FNan
  187. }
  188. return 0
  189. }
  190. func (m *NonFinites) GetFPinf() float32 {
  191. if m != nil && m.FPinf != nil {
  192. return *m.FPinf
  193. }
  194. return 0
  195. }
  196. func (m *NonFinites) GetFNinf() float32 {
  197. if m != nil && m.FNinf != nil {
  198. return *m.FNinf
  199. }
  200. return 0
  201. }
  202. func (m *NonFinites) GetDNan() float64 {
  203. if m != nil && m.DNan != nil {
  204. return *m.DNan
  205. }
  206. return 0
  207. }
  208. func (m *NonFinites) GetDPinf() float64 {
  209. if m != nil && m.DPinf != nil {
  210. return *m.DPinf
  211. }
  212. return 0
  213. }
  214. func (m *NonFinites) GetDNinf() float64 {
  215. if m != nil && m.DNinf != nil {
  216. return *m.DNinf
  217. }
  218. return 0
  219. }
  220. // Test message for holding repeated primitives.
  221. type Repeats struct {
  222. RBool []bool `protobuf:"varint,1,rep,name=r_bool,json=rBool" json:"r_bool,omitempty"`
  223. RInt32 []int32 `protobuf:"varint,2,rep,name=r_int32,json=rInt32" json:"r_int32,omitempty"`
  224. RInt64 []int64 `protobuf:"varint,3,rep,name=r_int64,json=rInt64" json:"r_int64,omitempty"`
  225. RUint32 []uint32 `protobuf:"varint,4,rep,name=r_uint32,json=rUint32" json:"r_uint32,omitempty"`
  226. RUint64 []uint64 `protobuf:"varint,5,rep,name=r_uint64,json=rUint64" json:"r_uint64,omitempty"`
  227. RSint32 []int32 `protobuf:"zigzag32,6,rep,name=r_sint32,json=rSint32" json:"r_sint32,omitempty"`
  228. RSint64 []int64 `protobuf:"zigzag64,7,rep,name=r_sint64,json=rSint64" json:"r_sint64,omitempty"`
  229. RFloat []float32 `protobuf:"fixed32,8,rep,name=r_float,json=rFloat" json:"r_float,omitempty"`
  230. RDouble []float64 `protobuf:"fixed64,9,rep,name=r_double,json=rDouble" json:"r_double,omitempty"`
  231. RString []string `protobuf:"bytes,10,rep,name=r_string,json=rString" json:"r_string,omitempty"`
  232. RBytes [][]byte `protobuf:"bytes,11,rep,name=r_bytes,json=rBytes" json:"r_bytes,omitempty"`
  233. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  234. XXX_unrecognized []byte `json:"-"`
  235. XXX_sizecache int32 `json:"-"`
  236. }
  237. func (m *Repeats) Reset() { *m = Repeats{} }
  238. func (m *Repeats) String() string { return proto.CompactTextString(m) }
  239. func (*Repeats) ProtoMessage() {}
  240. func (*Repeats) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
  241. func (m *Repeats) Unmarshal(b []byte) error {
  242. return xxx_messageInfo_Repeats.Unmarshal(m, b)
  243. }
  244. func (m *Repeats) Marshal(b []byte, deterministic bool) ([]byte, error) {
  245. return xxx_messageInfo_Repeats.Marshal(b, m, deterministic)
  246. }
  247. func (dst *Repeats) XXX_Merge(src proto.Message) {
  248. xxx_messageInfo_Repeats.Merge(dst, src)
  249. }
  250. func (m *Repeats) XXX_Size() int {
  251. return xxx_messageInfo_Repeats.Size(m)
  252. }
  253. func (m *Repeats) XXX_DiscardUnknown() {
  254. xxx_messageInfo_Repeats.DiscardUnknown(m)
  255. }
  256. var xxx_messageInfo_Repeats proto.InternalMessageInfo
  257. func (m *Repeats) GetRBool() []bool {
  258. if m != nil {
  259. return m.RBool
  260. }
  261. return nil
  262. }
  263. func (m *Repeats) GetRInt32() []int32 {
  264. if m != nil {
  265. return m.RInt32
  266. }
  267. return nil
  268. }
  269. func (m *Repeats) GetRInt64() []int64 {
  270. if m != nil {
  271. return m.RInt64
  272. }
  273. return nil
  274. }
  275. func (m *Repeats) GetRUint32() []uint32 {
  276. if m != nil {
  277. return m.RUint32
  278. }
  279. return nil
  280. }
  281. func (m *Repeats) GetRUint64() []uint64 {
  282. if m != nil {
  283. return m.RUint64
  284. }
  285. return nil
  286. }
  287. func (m *Repeats) GetRSint32() []int32 {
  288. if m != nil {
  289. return m.RSint32
  290. }
  291. return nil
  292. }
  293. func (m *Repeats) GetRSint64() []int64 {
  294. if m != nil {
  295. return m.RSint64
  296. }
  297. return nil
  298. }
  299. func (m *Repeats) GetRFloat() []float32 {
  300. if m != nil {
  301. return m.RFloat
  302. }
  303. return nil
  304. }
  305. func (m *Repeats) GetRDouble() []float64 {
  306. if m != nil {
  307. return m.RDouble
  308. }
  309. return nil
  310. }
  311. func (m *Repeats) GetRString() []string {
  312. if m != nil {
  313. return m.RString
  314. }
  315. return nil
  316. }
  317. func (m *Repeats) GetRBytes() [][]byte {
  318. if m != nil {
  319. return m.RBytes
  320. }
  321. return nil
  322. }
  323. // Test message for holding enums and nested messages.
  324. type Widget struct {
  325. Color *Widget_Color `protobuf:"varint,1,opt,name=color,enum=jsonpb.Widget_Color" json:"color,omitempty"`
  326. RColor []Widget_Color `protobuf:"varint,2,rep,name=r_color,json=rColor,enum=jsonpb.Widget_Color" json:"r_color,omitempty"`
  327. Simple *Simple `protobuf:"bytes,10,opt,name=simple" json:"simple,omitempty"`
  328. RSimple []*Simple `protobuf:"bytes,11,rep,name=r_simple,json=rSimple" json:"r_simple,omitempty"`
  329. Repeats *Repeats `protobuf:"bytes,20,opt,name=repeats" json:"repeats,omitempty"`
  330. RRepeats []*Repeats `protobuf:"bytes,21,rep,name=r_repeats,json=rRepeats" json:"r_repeats,omitempty"`
  331. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  332. XXX_unrecognized []byte `json:"-"`
  333. XXX_sizecache int32 `json:"-"`
  334. }
  335. func (m *Widget) Reset() { *m = Widget{} }
  336. func (m *Widget) String() string { return proto.CompactTextString(m) }
  337. func (*Widget) ProtoMessage() {}
  338. func (*Widget) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
  339. func (m *Widget) Unmarshal(b []byte) error {
  340. return xxx_messageInfo_Widget.Unmarshal(m, b)
  341. }
  342. func (m *Widget) Marshal(b []byte, deterministic bool) ([]byte, error) {
  343. return xxx_messageInfo_Widget.Marshal(b, m, deterministic)
  344. }
  345. func (dst *Widget) XXX_Merge(src proto.Message) {
  346. xxx_messageInfo_Widget.Merge(dst, src)
  347. }
  348. func (m *Widget) XXX_Size() int {
  349. return xxx_messageInfo_Widget.Size(m)
  350. }
  351. func (m *Widget) XXX_DiscardUnknown() {
  352. xxx_messageInfo_Widget.DiscardUnknown(m)
  353. }
  354. var xxx_messageInfo_Widget proto.InternalMessageInfo
  355. func (m *Widget) GetColor() Widget_Color {
  356. if m != nil && m.Color != nil {
  357. return *m.Color
  358. }
  359. return Widget_RED
  360. }
  361. func (m *Widget) GetRColor() []Widget_Color {
  362. if m != nil {
  363. return m.RColor
  364. }
  365. return nil
  366. }
  367. func (m *Widget) GetSimple() *Simple {
  368. if m != nil {
  369. return m.Simple
  370. }
  371. return nil
  372. }
  373. func (m *Widget) GetRSimple() []*Simple {
  374. if m != nil {
  375. return m.RSimple
  376. }
  377. return nil
  378. }
  379. func (m *Widget) GetRepeats() *Repeats {
  380. if m != nil {
  381. return m.Repeats
  382. }
  383. return nil
  384. }
  385. func (m *Widget) GetRRepeats() []*Repeats {
  386. if m != nil {
  387. return m.RRepeats
  388. }
  389. return nil
  390. }
  391. type Maps struct {
  392. MInt64Str map[int64]string `protobuf:"bytes,1,rep,name=m_int64_str,json=mInt64Str" json:"m_int64_str,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  393. MBoolSimple map[bool]*Simple `protobuf:"bytes,2,rep,name=m_bool_simple,json=mBoolSimple" json:"m_bool_simple,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  394. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  395. XXX_unrecognized []byte `json:"-"`
  396. XXX_sizecache int32 `json:"-"`
  397. }
  398. func (m *Maps) Reset() { *m = Maps{} }
  399. func (m *Maps) String() string { return proto.CompactTextString(m) }
  400. func (*Maps) ProtoMessage() {}
  401. func (*Maps) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
  402. func (m *Maps) Unmarshal(b []byte) error {
  403. return xxx_messageInfo_Maps.Unmarshal(m, b)
  404. }
  405. func (m *Maps) Marshal(b []byte, deterministic bool) ([]byte, error) {
  406. return xxx_messageInfo_Maps.Marshal(b, m, deterministic)
  407. }
  408. func (dst *Maps) XXX_Merge(src proto.Message) {
  409. xxx_messageInfo_Maps.Merge(dst, src)
  410. }
  411. func (m *Maps) XXX_Size() int {
  412. return xxx_messageInfo_Maps.Size(m)
  413. }
  414. func (m *Maps) XXX_DiscardUnknown() {
  415. xxx_messageInfo_Maps.DiscardUnknown(m)
  416. }
  417. var xxx_messageInfo_Maps proto.InternalMessageInfo
  418. func (m *Maps) GetMInt64Str() map[int64]string {
  419. if m != nil {
  420. return m.MInt64Str
  421. }
  422. return nil
  423. }
  424. func (m *Maps) GetMBoolSimple() map[bool]*Simple {
  425. if m != nil {
  426. return m.MBoolSimple
  427. }
  428. return nil
  429. }
  430. type MsgWithOneof struct {
  431. // Types that are valid to be assigned to Union:
  432. // *MsgWithOneof_Title
  433. // *MsgWithOneof_Salary
  434. // *MsgWithOneof_Country
  435. // *MsgWithOneof_HomeAddress
  436. // *MsgWithOneof_MsgWithRequired
  437. Union isMsgWithOneof_Union `protobuf_oneof:"union"`
  438. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  439. XXX_unrecognized []byte `json:"-"`
  440. XXX_sizecache int32 `json:"-"`
  441. }
  442. func (m *MsgWithOneof) Reset() { *m = MsgWithOneof{} }
  443. func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) }
  444. func (*MsgWithOneof) ProtoMessage() {}
  445. func (*MsgWithOneof) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} }
  446. func (m *MsgWithOneof) Unmarshal(b []byte) error {
  447. return xxx_messageInfo_MsgWithOneof.Unmarshal(m, b)
  448. }
  449. func (m *MsgWithOneof) Marshal(b []byte, deterministic bool) ([]byte, error) {
  450. return xxx_messageInfo_MsgWithOneof.Marshal(b, m, deterministic)
  451. }
  452. func (dst *MsgWithOneof) XXX_Merge(src proto.Message) {
  453. xxx_messageInfo_MsgWithOneof.Merge(dst, src)
  454. }
  455. func (m *MsgWithOneof) XXX_Size() int {
  456. return xxx_messageInfo_MsgWithOneof.Size(m)
  457. }
  458. func (m *MsgWithOneof) XXX_DiscardUnknown() {
  459. xxx_messageInfo_MsgWithOneof.DiscardUnknown(m)
  460. }
  461. var xxx_messageInfo_MsgWithOneof proto.InternalMessageInfo
  462. type isMsgWithOneof_Union interface {
  463. isMsgWithOneof_Union()
  464. }
  465. type MsgWithOneof_Title struct {
  466. Title string `protobuf:"bytes,1,opt,name=title,oneof"`
  467. }
  468. type MsgWithOneof_Salary struct {
  469. Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"`
  470. }
  471. type MsgWithOneof_Country struct {
  472. Country string `protobuf:"bytes,3,opt,name=Country,oneof"`
  473. }
  474. type MsgWithOneof_HomeAddress struct {
  475. HomeAddress string `protobuf:"bytes,4,opt,name=home_address,json=homeAddress,oneof"`
  476. }
  477. type MsgWithOneof_MsgWithRequired struct {
  478. MsgWithRequired *MsgWithRequired `protobuf:"bytes,5,opt,name=msg_with_required,json=msgWithRequired,oneof"`
  479. }
  480. func (*MsgWithOneof_Title) isMsgWithOneof_Union() {}
  481. func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {}
  482. func (*MsgWithOneof_Country) isMsgWithOneof_Union() {}
  483. func (*MsgWithOneof_HomeAddress) isMsgWithOneof_Union() {}
  484. func (*MsgWithOneof_MsgWithRequired) isMsgWithOneof_Union() {}
  485. func (m *MsgWithOneof) GetUnion() isMsgWithOneof_Union {
  486. if m != nil {
  487. return m.Union
  488. }
  489. return nil
  490. }
  491. func (m *MsgWithOneof) GetTitle() string {
  492. if x, ok := m.GetUnion().(*MsgWithOneof_Title); ok {
  493. return x.Title
  494. }
  495. return ""
  496. }
  497. func (m *MsgWithOneof) GetSalary() int64 {
  498. if x, ok := m.GetUnion().(*MsgWithOneof_Salary); ok {
  499. return x.Salary
  500. }
  501. return 0
  502. }
  503. func (m *MsgWithOneof) GetCountry() string {
  504. if x, ok := m.GetUnion().(*MsgWithOneof_Country); ok {
  505. return x.Country
  506. }
  507. return ""
  508. }
  509. func (m *MsgWithOneof) GetHomeAddress() string {
  510. if x, ok := m.GetUnion().(*MsgWithOneof_HomeAddress); ok {
  511. return x.HomeAddress
  512. }
  513. return ""
  514. }
  515. func (m *MsgWithOneof) GetMsgWithRequired() *MsgWithRequired {
  516. if x, ok := m.GetUnion().(*MsgWithOneof_MsgWithRequired); ok {
  517. return x.MsgWithRequired
  518. }
  519. return nil
  520. }
  521. // XXX_OneofFuncs is for the internal use of the proto package.
  522. func (*MsgWithOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  523. return _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, _MsgWithOneof_OneofSizer, []interface{}{
  524. (*MsgWithOneof_Title)(nil),
  525. (*MsgWithOneof_Salary)(nil),
  526. (*MsgWithOneof_Country)(nil),
  527. (*MsgWithOneof_HomeAddress)(nil),
  528. (*MsgWithOneof_MsgWithRequired)(nil),
  529. }
  530. }
  531. func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  532. m := msg.(*MsgWithOneof)
  533. // union
  534. switch x := m.Union.(type) {
  535. case *MsgWithOneof_Title:
  536. b.EncodeVarint(1<<3 | proto.WireBytes)
  537. b.EncodeStringBytes(x.Title)
  538. case *MsgWithOneof_Salary:
  539. b.EncodeVarint(2<<3 | proto.WireVarint)
  540. b.EncodeVarint(uint64(x.Salary))
  541. case *MsgWithOneof_Country:
  542. b.EncodeVarint(3<<3 | proto.WireBytes)
  543. b.EncodeStringBytes(x.Country)
  544. case *MsgWithOneof_HomeAddress:
  545. b.EncodeVarint(4<<3 | proto.WireBytes)
  546. b.EncodeStringBytes(x.HomeAddress)
  547. case *MsgWithOneof_MsgWithRequired:
  548. b.EncodeVarint(5<<3 | proto.WireBytes)
  549. if err := b.EncodeMessage(x.MsgWithRequired); err != nil {
  550. return err
  551. }
  552. case nil:
  553. default:
  554. return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x)
  555. }
  556. return nil
  557. }
  558. func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  559. m := msg.(*MsgWithOneof)
  560. switch tag {
  561. case 1: // union.title
  562. if wire != proto.WireBytes {
  563. return true, proto.ErrInternalBadWireType
  564. }
  565. x, err := b.DecodeStringBytes()
  566. m.Union = &MsgWithOneof_Title{x}
  567. return true, err
  568. case 2: // union.salary
  569. if wire != proto.WireVarint {
  570. return true, proto.ErrInternalBadWireType
  571. }
  572. x, err := b.DecodeVarint()
  573. m.Union = &MsgWithOneof_Salary{int64(x)}
  574. return true, err
  575. case 3: // union.Country
  576. if wire != proto.WireBytes {
  577. return true, proto.ErrInternalBadWireType
  578. }
  579. x, err := b.DecodeStringBytes()
  580. m.Union = &MsgWithOneof_Country{x}
  581. return true, err
  582. case 4: // union.home_address
  583. if wire != proto.WireBytes {
  584. return true, proto.ErrInternalBadWireType
  585. }
  586. x, err := b.DecodeStringBytes()
  587. m.Union = &MsgWithOneof_HomeAddress{x}
  588. return true, err
  589. case 5: // union.msg_with_required
  590. if wire != proto.WireBytes {
  591. return true, proto.ErrInternalBadWireType
  592. }
  593. msg := new(MsgWithRequired)
  594. err := b.DecodeMessage(msg)
  595. m.Union = &MsgWithOneof_MsgWithRequired{msg}
  596. return true, err
  597. default:
  598. return false, nil
  599. }
  600. }
  601. func _MsgWithOneof_OneofSizer(msg proto.Message) (n int) {
  602. m := msg.(*MsgWithOneof)
  603. // union
  604. switch x := m.Union.(type) {
  605. case *MsgWithOneof_Title:
  606. n += proto.SizeVarint(1<<3 | proto.WireBytes)
  607. n += proto.SizeVarint(uint64(len(x.Title)))
  608. n += len(x.Title)
  609. case *MsgWithOneof_Salary:
  610. n += proto.SizeVarint(2<<3 | proto.WireVarint)
  611. n += proto.SizeVarint(uint64(x.Salary))
  612. case *MsgWithOneof_Country:
  613. n += proto.SizeVarint(3<<3 | proto.WireBytes)
  614. n += proto.SizeVarint(uint64(len(x.Country)))
  615. n += len(x.Country)
  616. case *MsgWithOneof_HomeAddress:
  617. n += proto.SizeVarint(4<<3 | proto.WireBytes)
  618. n += proto.SizeVarint(uint64(len(x.HomeAddress)))
  619. n += len(x.HomeAddress)
  620. case *MsgWithOneof_MsgWithRequired:
  621. s := proto.Size(x.MsgWithRequired)
  622. n += proto.SizeVarint(5<<3 | proto.WireBytes)
  623. n += proto.SizeVarint(uint64(s))
  624. n += s
  625. case nil:
  626. default:
  627. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  628. }
  629. return n
  630. }
  631. type Real struct {
  632. Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
  633. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  634. proto.XXX_InternalExtensions `json:"-"`
  635. XXX_unrecognized []byte `json:"-"`
  636. XXX_sizecache int32 `json:"-"`
  637. }
  638. func (m *Real) Reset() { *m = Real{} }
  639. func (m *Real) String() string { return proto.CompactTextString(m) }
  640. func (*Real) ProtoMessage() {}
  641. func (*Real) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} }
  642. var extRange_Real = []proto.ExtensionRange{
  643. {100, 536870911},
  644. }
  645. func (*Real) ExtensionRangeArray() []proto.ExtensionRange {
  646. return extRange_Real
  647. }
  648. func (m *Real) Unmarshal(b []byte) error {
  649. return xxx_messageInfo_Real.Unmarshal(m, b)
  650. }
  651. func (m *Real) Marshal(b []byte, deterministic bool) ([]byte, error) {
  652. return xxx_messageInfo_Real.Marshal(b, m, deterministic)
  653. }
  654. func (dst *Real) XXX_Merge(src proto.Message) {
  655. xxx_messageInfo_Real.Merge(dst, src)
  656. }
  657. func (m *Real) XXX_Size() int {
  658. return xxx_messageInfo_Real.Size(m)
  659. }
  660. func (m *Real) XXX_DiscardUnknown() {
  661. xxx_messageInfo_Real.DiscardUnknown(m)
  662. }
  663. var xxx_messageInfo_Real proto.InternalMessageInfo
  664. func (m *Real) GetValue() float64 {
  665. if m != nil && m.Value != nil {
  666. return *m.Value
  667. }
  668. return 0
  669. }
  670. type Complex struct {
  671. Imaginary *float64 `protobuf:"fixed64,1,opt,name=imaginary" json:"imaginary,omitempty"`
  672. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  673. proto.XXX_InternalExtensions `json:"-"`
  674. XXX_unrecognized []byte `json:"-"`
  675. XXX_sizecache int32 `json:"-"`
  676. }
  677. func (m *Complex) Reset() { *m = Complex{} }
  678. func (m *Complex) String() string { return proto.CompactTextString(m) }
  679. func (*Complex) ProtoMessage() {}
  680. func (*Complex) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} }
  681. var extRange_Complex = []proto.ExtensionRange{
  682. {100, 536870911},
  683. }
  684. func (*Complex) ExtensionRangeArray() []proto.ExtensionRange {
  685. return extRange_Complex
  686. }
  687. func (m *Complex) Unmarshal(b []byte) error {
  688. return xxx_messageInfo_Complex.Unmarshal(m, b)
  689. }
  690. func (m *Complex) Marshal(b []byte, deterministic bool) ([]byte, error) {
  691. return xxx_messageInfo_Complex.Marshal(b, m, deterministic)
  692. }
  693. func (dst *Complex) XXX_Merge(src proto.Message) {
  694. xxx_messageInfo_Complex.Merge(dst, src)
  695. }
  696. func (m *Complex) XXX_Size() int {
  697. return xxx_messageInfo_Complex.Size(m)
  698. }
  699. func (m *Complex) XXX_DiscardUnknown() {
  700. xxx_messageInfo_Complex.DiscardUnknown(m)
  701. }
  702. var xxx_messageInfo_Complex proto.InternalMessageInfo
  703. func (m *Complex) GetImaginary() float64 {
  704. if m != nil && m.Imaginary != nil {
  705. return *m.Imaginary
  706. }
  707. return 0
  708. }
  709. var E_Complex_RealExtension = &proto.ExtensionDesc{
  710. ExtendedType: (*Real)(nil),
  711. ExtensionType: (*Complex)(nil),
  712. Field: 123,
  713. Name: "jsonpb.Complex.real_extension",
  714. Tag: "bytes,123,opt,name=real_extension,json=realExtension",
  715. Filename: "test_objects.proto",
  716. }
  717. type KnownTypes struct {
  718. An *google_protobuf.Any `protobuf:"bytes,14,opt,name=an" json:"an,omitempty"`
  719. Dur *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"`
  720. St *google_protobuf2.Struct `protobuf:"bytes,12,opt,name=st" json:"st,omitempty"`
  721. Ts *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"`
  722. Lv *google_protobuf2.ListValue `protobuf:"bytes,15,opt,name=lv" json:"lv,omitempty"`
  723. Val *google_protobuf2.Value `protobuf:"bytes,16,opt,name=val" json:"val,omitempty"`
  724. Dbl *google_protobuf4.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"`
  725. Flt *google_protobuf4.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"`
  726. I64 *google_protobuf4.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"`
  727. U64 *google_protobuf4.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"`
  728. I32 *google_protobuf4.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"`
  729. U32 *google_protobuf4.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"`
  730. Bool *google_protobuf4.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"`
  731. Str *google_protobuf4.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"`
  732. Bytes *google_protobuf4.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"`
  733. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  734. XXX_unrecognized []byte `json:"-"`
  735. XXX_sizecache int32 `json:"-"`
  736. }
  737. func (m *KnownTypes) Reset() { *m = KnownTypes{} }
  738. func (m *KnownTypes) String() string { return proto.CompactTextString(m) }
  739. func (*KnownTypes) ProtoMessage() {}
  740. func (*KnownTypes) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} }
  741. func (m *KnownTypes) Unmarshal(b []byte) error {
  742. return xxx_messageInfo_KnownTypes.Unmarshal(m, b)
  743. }
  744. func (m *KnownTypes) Marshal(b []byte, deterministic bool) ([]byte, error) {
  745. return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic)
  746. }
  747. func (dst *KnownTypes) XXX_Merge(src proto.Message) {
  748. xxx_messageInfo_KnownTypes.Merge(dst, src)
  749. }
  750. func (m *KnownTypes) XXX_Size() int {
  751. return xxx_messageInfo_KnownTypes.Size(m)
  752. }
  753. func (m *KnownTypes) XXX_DiscardUnknown() {
  754. xxx_messageInfo_KnownTypes.DiscardUnknown(m)
  755. }
  756. var xxx_messageInfo_KnownTypes proto.InternalMessageInfo
  757. func (m *KnownTypes) GetAn() *google_protobuf.Any {
  758. if m != nil {
  759. return m.An
  760. }
  761. return nil
  762. }
  763. func (m *KnownTypes) GetDur() *google_protobuf1.Duration {
  764. if m != nil {
  765. return m.Dur
  766. }
  767. return nil
  768. }
  769. func (m *KnownTypes) GetSt() *google_protobuf2.Struct {
  770. if m != nil {
  771. return m.St
  772. }
  773. return nil
  774. }
  775. func (m *KnownTypes) GetTs() *google_protobuf3.Timestamp {
  776. if m != nil {
  777. return m.Ts
  778. }
  779. return nil
  780. }
  781. func (m *KnownTypes) GetLv() *google_protobuf2.ListValue {
  782. if m != nil {
  783. return m.Lv
  784. }
  785. return nil
  786. }
  787. func (m *KnownTypes) GetVal() *google_protobuf2.Value {
  788. if m != nil {
  789. return m.Val
  790. }
  791. return nil
  792. }
  793. func (m *KnownTypes) GetDbl() *google_protobuf4.DoubleValue {
  794. if m != nil {
  795. return m.Dbl
  796. }
  797. return nil
  798. }
  799. func (m *KnownTypes) GetFlt() *google_protobuf4.FloatValue {
  800. if m != nil {
  801. return m.Flt
  802. }
  803. return nil
  804. }
  805. func (m *KnownTypes) GetI64() *google_protobuf4.Int64Value {
  806. if m != nil {
  807. return m.I64
  808. }
  809. return nil
  810. }
  811. func (m *KnownTypes) GetU64() *google_protobuf4.UInt64Value {
  812. if m != nil {
  813. return m.U64
  814. }
  815. return nil
  816. }
  817. func (m *KnownTypes) GetI32() *google_protobuf4.Int32Value {
  818. if m != nil {
  819. return m.I32
  820. }
  821. return nil
  822. }
  823. func (m *KnownTypes) GetU32() *google_protobuf4.UInt32Value {
  824. if m != nil {
  825. return m.U32
  826. }
  827. return nil
  828. }
  829. func (m *KnownTypes) GetBool() *google_protobuf4.BoolValue {
  830. if m != nil {
  831. return m.Bool
  832. }
  833. return nil
  834. }
  835. func (m *KnownTypes) GetStr() *google_protobuf4.StringValue {
  836. if m != nil {
  837. return m.Str
  838. }
  839. return nil
  840. }
  841. func (m *KnownTypes) GetBytes() *google_protobuf4.BytesValue {
  842. if m != nil {
  843. return m.Bytes
  844. }
  845. return nil
  846. }
  847. // Test messages for marshaling/unmarshaling required fields.
  848. type MsgWithRequired struct {
  849. Str *string `protobuf:"bytes,1,req,name=str" json:"str,omitempty"`
  850. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  851. XXX_unrecognized []byte `json:"-"`
  852. XXX_sizecache int32 `json:"-"`
  853. }
  854. func (m *MsgWithRequired) Reset() { *m = MsgWithRequired{} }
  855. func (m *MsgWithRequired) String() string { return proto.CompactTextString(m) }
  856. func (*MsgWithRequired) ProtoMessage() {}
  857. func (*MsgWithRequired) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} }
  858. func (m *MsgWithRequired) Unmarshal(b []byte) error {
  859. return xxx_messageInfo_MsgWithRequired.Unmarshal(m, b)
  860. }
  861. func (m *MsgWithRequired) Marshal(b []byte, deterministic bool) ([]byte, error) {
  862. return xxx_messageInfo_MsgWithRequired.Marshal(b, m, deterministic)
  863. }
  864. func (dst *MsgWithRequired) XXX_Merge(src proto.Message) {
  865. xxx_messageInfo_MsgWithRequired.Merge(dst, src)
  866. }
  867. func (m *MsgWithRequired) XXX_Size() int {
  868. return xxx_messageInfo_MsgWithRequired.Size(m)
  869. }
  870. func (m *MsgWithRequired) XXX_DiscardUnknown() {
  871. xxx_messageInfo_MsgWithRequired.DiscardUnknown(m)
  872. }
  873. var xxx_messageInfo_MsgWithRequired proto.InternalMessageInfo
  874. func (m *MsgWithRequired) GetStr() string {
  875. if m != nil && m.Str != nil {
  876. return *m.Str
  877. }
  878. return ""
  879. }
  880. type MsgWithIndirectRequired struct {
  881. Subm *MsgWithRequired `protobuf:"bytes,1,opt,name=subm" json:"subm,omitempty"`
  882. MapField map[string]*MsgWithRequired `protobuf:"bytes,2,rep,name=map_field,json=mapField" json:"map_field,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  883. SliceField []*MsgWithRequired `protobuf:"bytes,3,rep,name=slice_field,json=sliceField" json:"slice_field,omitempty"`
  884. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  885. XXX_unrecognized []byte `json:"-"`
  886. XXX_sizecache int32 `json:"-"`
  887. }
  888. func (m *MsgWithIndirectRequired) Reset() { *m = MsgWithIndirectRequired{} }
  889. func (m *MsgWithIndirectRequired) String() string { return proto.CompactTextString(m) }
  890. func (*MsgWithIndirectRequired) ProtoMessage() {}
  891. func (*MsgWithIndirectRequired) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{10} }
  892. func (m *MsgWithIndirectRequired) Unmarshal(b []byte) error {
  893. return xxx_messageInfo_MsgWithIndirectRequired.Unmarshal(m, b)
  894. }
  895. func (m *MsgWithIndirectRequired) Marshal(b []byte, deterministic bool) ([]byte, error) {
  896. return xxx_messageInfo_MsgWithIndirectRequired.Marshal(b, m, deterministic)
  897. }
  898. func (dst *MsgWithIndirectRequired) XXX_Merge(src proto.Message) {
  899. xxx_messageInfo_MsgWithIndirectRequired.Merge(dst, src)
  900. }
  901. func (m *MsgWithIndirectRequired) XXX_Size() int {
  902. return xxx_messageInfo_MsgWithIndirectRequired.Size(m)
  903. }
  904. func (m *MsgWithIndirectRequired) XXX_DiscardUnknown() {
  905. xxx_messageInfo_MsgWithIndirectRequired.DiscardUnknown(m)
  906. }
  907. var xxx_messageInfo_MsgWithIndirectRequired proto.InternalMessageInfo
  908. func (m *MsgWithIndirectRequired) GetSubm() *MsgWithRequired {
  909. if m != nil {
  910. return m.Subm
  911. }
  912. return nil
  913. }
  914. func (m *MsgWithIndirectRequired) GetMapField() map[string]*MsgWithRequired {
  915. if m != nil {
  916. return m.MapField
  917. }
  918. return nil
  919. }
  920. func (m *MsgWithIndirectRequired) GetSliceField() []*MsgWithRequired {
  921. if m != nil {
  922. return m.SliceField
  923. }
  924. return nil
  925. }
  926. type MsgWithRequiredBytes struct {
  927. Byts []byte `protobuf:"bytes,1,req,name=byts" json:"byts,omitempty"`
  928. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  929. XXX_unrecognized []byte `json:"-"`
  930. XXX_sizecache int32 `json:"-"`
  931. }
  932. func (m *MsgWithRequiredBytes) Reset() { *m = MsgWithRequiredBytes{} }
  933. func (m *MsgWithRequiredBytes) String() string { return proto.CompactTextString(m) }
  934. func (*MsgWithRequiredBytes) ProtoMessage() {}
  935. func (*MsgWithRequiredBytes) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{11} }
  936. func (m *MsgWithRequiredBytes) Unmarshal(b []byte) error {
  937. return xxx_messageInfo_MsgWithRequiredBytes.Unmarshal(m, b)
  938. }
  939. func (m *MsgWithRequiredBytes) Marshal(b []byte, deterministic bool) ([]byte, error) {
  940. return xxx_messageInfo_MsgWithRequiredBytes.Marshal(b, m, deterministic)
  941. }
  942. func (dst *MsgWithRequiredBytes) XXX_Merge(src proto.Message) {
  943. xxx_messageInfo_MsgWithRequiredBytes.Merge(dst, src)
  944. }
  945. func (m *MsgWithRequiredBytes) XXX_Size() int {
  946. return xxx_messageInfo_MsgWithRequiredBytes.Size(m)
  947. }
  948. func (m *MsgWithRequiredBytes) XXX_DiscardUnknown() {
  949. xxx_messageInfo_MsgWithRequiredBytes.DiscardUnknown(m)
  950. }
  951. var xxx_messageInfo_MsgWithRequiredBytes proto.InternalMessageInfo
  952. func (m *MsgWithRequiredBytes) GetByts() []byte {
  953. if m != nil {
  954. return m.Byts
  955. }
  956. return nil
  957. }
  958. type MsgWithRequiredWKT struct {
  959. Str *google_protobuf4.StringValue `protobuf:"bytes,1,req,name=str" json:"str,omitempty"`
  960. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  961. XXX_unrecognized []byte `json:"-"`
  962. XXX_sizecache int32 `json:"-"`
  963. }
  964. func (m *MsgWithRequiredWKT) Reset() { *m = MsgWithRequiredWKT{} }
  965. func (m *MsgWithRequiredWKT) String() string { return proto.CompactTextString(m) }
  966. func (*MsgWithRequiredWKT) ProtoMessage() {}
  967. func (*MsgWithRequiredWKT) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{12} }
  968. func (m *MsgWithRequiredWKT) Unmarshal(b []byte) error {
  969. return xxx_messageInfo_MsgWithRequiredWKT.Unmarshal(m, b)
  970. }
  971. func (m *MsgWithRequiredWKT) Marshal(b []byte, deterministic bool) ([]byte, error) {
  972. return xxx_messageInfo_MsgWithRequiredWKT.Marshal(b, m, deterministic)
  973. }
  974. func (dst *MsgWithRequiredWKT) XXX_Merge(src proto.Message) {
  975. xxx_messageInfo_MsgWithRequiredWKT.Merge(dst, src)
  976. }
  977. func (m *MsgWithRequiredWKT) XXX_Size() int {
  978. return xxx_messageInfo_MsgWithRequiredWKT.Size(m)
  979. }
  980. func (m *MsgWithRequiredWKT) XXX_DiscardUnknown() {
  981. xxx_messageInfo_MsgWithRequiredWKT.DiscardUnknown(m)
  982. }
  983. var xxx_messageInfo_MsgWithRequiredWKT proto.InternalMessageInfo
  984. func (m *MsgWithRequiredWKT) GetStr() *google_protobuf4.StringValue {
  985. if m != nil {
  986. return m.Str
  987. }
  988. return nil
  989. }
  990. var E_Name = &proto.ExtensionDesc{
  991. ExtendedType: (*Real)(nil),
  992. ExtensionType: (*string)(nil),
  993. Field: 124,
  994. Name: "jsonpb.name",
  995. Tag: "bytes,124,opt,name=name",
  996. Filename: "test_objects.proto",
  997. }
  998. var E_Extm = &proto.ExtensionDesc{
  999. ExtendedType: (*Real)(nil),
  1000. ExtensionType: (*MsgWithRequired)(nil),
  1001. Field: 125,
  1002. Name: "jsonpb.extm",
  1003. Tag: "bytes,125,opt,name=extm",
  1004. Filename: "test_objects.proto",
  1005. }
  1006. func init() {
  1007. proto.RegisterType((*Simple)(nil), "jsonpb.Simple")
  1008. proto.RegisterType((*NonFinites)(nil), "jsonpb.NonFinites")
  1009. proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats")
  1010. proto.RegisterType((*Widget)(nil), "jsonpb.Widget")
  1011. proto.RegisterType((*Maps)(nil), "jsonpb.Maps")
  1012. proto.RegisterMapType((map[bool]*Simple)(nil), "jsonpb.Maps.MBoolSimpleEntry")
  1013. proto.RegisterMapType((map[int64]string)(nil), "jsonpb.Maps.MInt64StrEntry")
  1014. proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof")
  1015. proto.RegisterType((*Real)(nil), "jsonpb.Real")
  1016. proto.RegisterType((*Complex)(nil), "jsonpb.Complex")
  1017. proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes")
  1018. proto.RegisterType((*MsgWithRequired)(nil), "jsonpb.MsgWithRequired")
  1019. proto.RegisterType((*MsgWithIndirectRequired)(nil), "jsonpb.MsgWithIndirectRequired")
  1020. proto.RegisterMapType((map[string]*MsgWithRequired)(nil), "jsonpb.MsgWithIndirectRequired.MapFieldEntry")
  1021. proto.RegisterType((*MsgWithRequiredBytes)(nil), "jsonpb.MsgWithRequiredBytes")
  1022. proto.RegisterType((*MsgWithRequiredWKT)(nil), "jsonpb.MsgWithRequiredWKT")
  1023. proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value)
  1024. proto.RegisterExtension(E_Complex_RealExtension)
  1025. proto.RegisterExtension(E_Name)
  1026. proto.RegisterExtension(E_Extm)
  1027. }
  1028. func init() { proto.RegisterFile("test_objects.proto", fileDescriptor1) }
  1029. var fileDescriptor1 = []byte{
  1030. // 1357 bytes of a gzipped FileDescriptorProto
  1031. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xdd, 0x72, 0x13, 0xc7,
  1032. 0x12, 0xf6, 0xee, 0x6a, 0xf5, 0xd3, 0xf2, 0x1f, 0x83, 0x81, 0xc5, 0x87, 0x73, 0x8e, 0x4a, 0x70,
  1033. 0x38, 0x0a, 0xc4, 0xa2, 0x22, 0xbb, 0x5c, 0x84, 0xe4, 0x06, 0x63, 0x13, 0x08, 0xe0, 0xa4, 0xc6,
  1034. 0x26, 0x5c, 0xaa, 0x56, 0xde, 0x91, 0x59, 0xb2, 0xbb, 0xa3, 0xcc, 0xcc, 0xda, 0xa8, 0x92, 0x54,
  1035. 0xf9, 0x19, 0x52, 0x79, 0x82, 0x54, 0x25, 0x8f, 0x90, 0x8b, 0xbc, 0x45, 0xde, 0x28, 0x35, 0x3d,
  1036. 0xb3, 0x5a, 0x59, 0x42, 0x95, 0x5c, 0x79, 0xbb, 0xfb, 0xeb, 0x4f, 0x33, 0xfd, 0xf5, 0x74, 0x1b,
  1037. 0x88, 0x62, 0x52, 0xf5, 0xf9, 0xe0, 0x1d, 0x3b, 0x51, 0xb2, 0x3b, 0x12, 0x5c, 0x71, 0x52, 0x7d,
  1038. 0x27, 0x79, 0x36, 0x1a, 0x6c, 0xde, 0x3c, 0xe5, 0xfc, 0x34, 0x61, 0x0f, 0xd0, 0x3b, 0xc8, 0x87,
  1039. 0x0f, 0xc2, 0x6c, 0x6c, 0x20, 0x9b, 0xff, 0x99, 0x0d, 0x45, 0xb9, 0x08, 0x55, 0xcc, 0x33, 0x1b,
  1040. 0xbf, 0x35, 0x1b, 0x97, 0x4a, 0xe4, 0x27, 0xca, 0x46, 0xff, 0x3b, 0x1b, 0x55, 0x71, 0xca, 0xa4,
  1041. 0x0a, 0xd3, 0xd1, 0x22, 0xfa, 0x73, 0x11, 0x8e, 0x46, 0x4c, 0xd8, 0x13, 0xb6, 0x7f, 0x75, 0xa1,
  1042. 0x7a, 0x14, 0xa7, 0xa3, 0x84, 0x91, 0x6b, 0x50, 0xe5, 0xfd, 0x01, 0xe7, 0x49, 0xe0, 0xb4, 0x9c,
  1043. 0x4e, 0x9d, 0xfa, 0x7c, 0x8f, 0xf3, 0x84, 0xdc, 0x80, 0x1a, 0xef, 0xc7, 0x99, 0xda, 0xee, 0x05,
  1044. 0x6e, 0xcb, 0xe9, 0xf8, 0xb4, 0xca, 0x9f, 0x6b, 0x6b, 0x12, 0xd8, 0xdd, 0x09, 0xbc, 0x96, 0xd3,
  1045. 0xf1, 0x4c, 0x60, 0x77, 0x87, 0xdc, 0x84, 0x3a, 0xef, 0xe7, 0x26, 0xa5, 0xd2, 0x72, 0x3a, 0x2b,
  1046. 0xb4, 0xc6, 0x5f, 0xa3, 0x59, 0x86, 0x76, 0x77, 0x02, 0xbf, 0xe5, 0x74, 0x2a, 0x36, 0x54, 0x64,
  1047. 0x49, 0x93, 0x55, 0x6d, 0x39, 0x9d, 0x2b, 0xb4, 0xc6, 0x8f, 0xa6, 0xb2, 0xa4, 0xc9, 0xaa, 0xb5,
  1048. 0x9c, 0x0e, 0xb1, 0xa1, 0xdd, 0x1d, 0x73, 0x88, 0x61, 0xc2, 0x43, 0x15, 0xd4, 0x5b, 0x4e, 0xc7,
  1049. 0xa5, 0x55, 0xfe, 0x54, 0x5b, 0x26, 0x27, 0xe2, 0xf9, 0x20, 0x61, 0x41, 0xa3, 0xe5, 0x74, 0x1c,
  1050. 0x5a, 0xe3, 0xfb, 0x68, 0x5a, 0x3a, 0x25, 0xe2, 0xec, 0x34, 0x80, 0x96, 0xd3, 0x69, 0x68, 0x3a,
  1051. 0x34, 0x0d, 0xdd, 0x60, 0xac, 0x98, 0x0c, 0x9a, 0x2d, 0xa7, 0xb3, 0x4c, 0xab, 0x7c, 0x4f, 0x5b,
  1052. 0xed, 0x9f, 0x1c, 0x80, 0x43, 0x9e, 0x3d, 0x8d, 0xb3, 0x58, 0x31, 0x49, 0xae, 0x82, 0x3f, 0xec,
  1053. 0x67, 0x61, 0x86, 0xa5, 0x72, 0x69, 0x65, 0x78, 0x18, 0x66, 0xba, 0x80, 0xc3, 0xfe, 0x28, 0xce,
  1054. 0x86, 0x58, 0x28, 0x97, 0xfa, 0xc3, 0xaf, 0xe3, 0x6c, 0x68, 0xdc, 0x99, 0x76, 0x7b, 0xd6, 0x7d,
  1055. 0xa8, 0xdd, 0x57, 0xc1, 0x8f, 0x90, 0xa2, 0x82, 0xa7, 0xab, 0x44, 0x96, 0x22, 0x32, 0x14, 0x3e,
  1056. 0x7a, 0xfd, 0xa8, 0xa0, 0x88, 0x0c, 0x45, 0xd5, 0xba, 0x35, 0x45, 0xfb, 0x37, 0x17, 0x6a, 0x94,
  1057. 0x8d, 0x58, 0xa8, 0xa4, 0x86, 0x88, 0x42, 0x3d, 0x4f, 0xab, 0x27, 0x0a, 0xf5, 0xc4, 0x44, 0x3d,
  1058. 0x4f, 0xab, 0x27, 0x26, 0xea, 0x89, 0x89, 0x7a, 0x9e, 0x56, 0x4f, 0x4c, 0xd4, 0x13, 0xa5, 0x7a,
  1059. 0x9e, 0x56, 0x4f, 0x94, 0xea, 0x89, 0x52, 0x3d, 0x4f, 0xab, 0x27, 0x4a, 0xf5, 0x44, 0xa9, 0x9e,
  1060. 0xa7, 0xd5, 0x13, 0x47, 0x53, 0x59, 0x13, 0xf5, 0x3c, 0xad, 0x9e, 0x28, 0xd5, 0x13, 0x13, 0xf5,
  1061. 0x3c, 0xad, 0x9e, 0x98, 0xa8, 0x27, 0x4a, 0xf5, 0x3c, 0xad, 0x9e, 0x28, 0xd5, 0x13, 0xa5, 0x7a,
  1062. 0x9e, 0x56, 0x4f, 0x94, 0xea, 0x89, 0x89, 0x7a, 0x9e, 0x56, 0x4f, 0x18, 0xf5, 0x7e, 0x77, 0xa1,
  1063. 0xfa, 0x26, 0x8e, 0x4e, 0x99, 0x22, 0xf7, 0xc0, 0x3f, 0xe1, 0x09, 0x17, 0xa8, 0xdc, 0x6a, 0x6f,
  1064. 0xa3, 0x6b, 0x9e, 0x68, 0xd7, 0x84, 0xbb, 0x4f, 0x74, 0x8c, 0x1a, 0x08, 0xd9, 0xd2, 0x7c, 0x06,
  1065. 0xad, 0x8b, 0xb7, 0x08, 0x5d, 0x15, 0xf8, 0x97, 0xdc, 0x85, 0xaa, 0xc4, 0xa7, 0x84, 0x5d, 0xd5,
  1066. 0xec, 0xad, 0x16, 0x68, 0xf3, 0xc0, 0xa8, 0x8d, 0x92, 0x8f, 0x4c, 0x41, 0x10, 0xa9, 0xcf, 0x39,
  1067. 0x8f, 0xd4, 0x05, 0xb2, 0xd0, 0x9a, 0x30, 0x02, 0x07, 0x1b, 0xc8, 0xb9, 0x56, 0x20, 0xad, 0xee,
  1068. 0xb4, 0x88, 0x93, 0x8f, 0xa1, 0x21, 0xfa, 0x05, 0xf8, 0x1a, 0xd2, 0xce, 0x81, 0xeb, 0xc2, 0x7e,
  1069. 0xb5, 0xff, 0x07, 0xbe, 0x39, 0x74, 0x0d, 0x3c, 0x7a, 0xb0, 0xbf, 0xbe, 0x44, 0x1a, 0xe0, 0x7f,
  1070. 0x41, 0x0f, 0x0e, 0x0e, 0xd7, 0x1d, 0x52, 0x87, 0xca, 0xde, 0xcb, 0xd7, 0x07, 0xeb, 0x6e, 0xfb,
  1071. 0x67, 0x17, 0x2a, 0xaf, 0xc2, 0x91, 0x24, 0x9f, 0x41, 0x33, 0x35, 0xed, 0xa2, 0x6b, 0x8f, 0x3d,
  1072. 0xd6, 0xec, 0xfd, 0xab, 0xe0, 0xd7, 0x90, 0xee, 0x2b, 0xec, 0x9f, 0x23, 0x25, 0x0e, 0x32, 0x25,
  1073. 0xc6, 0xb4, 0x91, 0x16, 0x36, 0x79, 0x0c, 0x2b, 0x29, 0xf6, 0x66, 0x71, 0x6b, 0x17, 0xd3, 0xff,
  1074. 0x7d, 0x39, 0x5d, 0xf7, 0xab, 0xb9, 0xb6, 0x21, 0x68, 0xa6, 0xa5, 0x67, 0xf3, 0x73, 0x58, 0xbd,
  1075. 0xcc, 0x4f, 0xd6, 0xc1, 0xfb, 0x96, 0x8d, 0x51, 0x46, 0x8f, 0xea, 0x4f, 0xb2, 0x01, 0xfe, 0x59,
  1076. 0x98, 0xe4, 0x0c, 0x9f, 0x5f, 0x83, 0x1a, 0xe3, 0x91, 0xfb, 0xd0, 0xd9, 0x3c, 0x84, 0xf5, 0x59,
  1077. 0xfa, 0xe9, 0xfc, 0xba, 0xc9, 0xbf, 0x33, 0x9d, 0x3f, 0x2f, 0x4a, 0xc9, 0xd7, 0xfe, 0xd3, 0x81,
  1078. 0xe5, 0x57, 0xf2, 0xf4, 0x4d, 0xac, 0xde, 0x7e, 0x95, 0x31, 0x3e, 0x24, 0xd7, 0xc1, 0x57, 0xb1,
  1079. 0x4a, 0x18, 0xd2, 0x35, 0x9e, 0x2d, 0x51, 0x63, 0x92, 0x00, 0xaa, 0x32, 0x4c, 0x42, 0x31, 0x46,
  1080. 0x4e, 0xef, 0xd9, 0x12, 0xb5, 0x36, 0xd9, 0x84, 0xda, 0x13, 0x9e, 0xeb, 0x93, 0xe0, 0x58, 0xd0,
  1081. 0x39, 0x85, 0x83, 0xdc, 0x86, 0xe5, 0xb7, 0x3c, 0x65, 0xfd, 0x30, 0x8a, 0x04, 0x93, 0x12, 0x27,
  1082. 0x84, 0x06, 0x34, 0xb5, 0xf7, 0xb1, 0x71, 0x92, 0x03, 0xb8, 0x92, 0xca, 0xd3, 0xfe, 0x79, 0xac,
  1083. 0xde, 0xf6, 0x05, 0xfb, 0x2e, 0x8f, 0x05, 0x8b, 0x70, 0x6a, 0x34, 0x7b, 0x37, 0x26, 0x85, 0x35,
  1084. 0x67, 0xa4, 0x36, 0xfc, 0x6c, 0x89, 0xae, 0xa5, 0x97, 0x5d, 0x7b, 0x35, 0xf0, 0xf3, 0x2c, 0xe6,
  1085. 0x59, 0xfb, 0x2e, 0x54, 0x28, 0x0b, 0x93, 0xb2, 0x8a, 0x8e, 0x19, 0x35, 0x68, 0xdc, 0xab, 0xd7,
  1086. 0xa3, 0xf5, 0x8b, 0x8b, 0x8b, 0x0b, 0xb7, 0x7d, 0xae, 0x0f, 0xae, 0x0b, 0xf2, 0x9e, 0xdc, 0x82,
  1087. 0x46, 0x9c, 0x86, 0xa7, 0x71, 0xa6, 0x2f, 0x68, 0xe0, 0xa5, 0xa3, 0x4c, 0xe9, 0xed, 0xc3, 0xaa,
  1088. 0x60, 0x61, 0xd2, 0x67, 0xef, 0x15, 0xcb, 0x64, 0xcc, 0x33, 0xb2, 0x5c, 0x76, 0x66, 0x98, 0x04,
  1089. 0xdf, 0x5f, 0x6e, 0x6d, 0x4b, 0x4f, 0x57, 0x74, 0xd2, 0x41, 0x91, 0xd3, 0xfe, 0xc3, 0x07, 0x78,
  1090. 0x91, 0xf1, 0xf3, 0xec, 0x78, 0x3c, 0x62, 0x92, 0xdc, 0x01, 0x37, 0xcc, 0x82, 0x55, 0x4c, 0xdd,
  1091. 0xe8, 0x9a, 0x35, 0xd7, 0x2d, 0xd6, 0x5c, 0xf7, 0x71, 0x36, 0xa6, 0x6e, 0x98, 0x91, 0xfb, 0xe0,
  1092. 0x45, 0xb9, 0x79, 0xec, 0xcd, 0xde, 0xcd, 0x39, 0xd8, 0xbe, 0x5d, 0xb6, 0x54, 0xa3, 0xc8, 0xff,
  1093. 0xc1, 0x95, 0x2a, 0x58, 0xb6, 0x35, 0x9c, 0xc5, 0x1e, 0xe1, 0xe2, 0xa5, 0xae, 0xd4, 0x43, 0xc4,
  1094. 0x55, 0xd2, 0xb6, 0xc9, 0xe6, 0x1c, 0xf0, 0xb8, 0xd8, 0xc1, 0xd4, 0x55, 0x52, 0x63, 0x93, 0xb3,
  1095. 0x60, 0x6d, 0x01, 0xf6, 0x65, 0x2c, 0xd5, 0x37, 0xba, 0xc2, 0xd4, 0x4d, 0xce, 0x48, 0x07, 0xbc,
  1096. 0xb3, 0x30, 0x09, 0xd6, 0x11, 0x7c, 0x7d, 0x0e, 0x6c, 0x80, 0x1a, 0x42, 0xba, 0xe0, 0x45, 0x83,
  1097. 0x04, 0x5b, 0xa7, 0xd9, 0xbb, 0x35, 0x7f, 0x2f, 0x9c, 0x95, 0x16, 0x1f, 0x0d, 0x12, 0xb2, 0x05,
  1098. 0xde, 0x30, 0x51, 0xd8, 0x49, 0xfa, 0xdd, 0xce, 0xe2, 0x71, 0xea, 0x5a, 0xf8, 0x30, 0x51, 0x1a,
  1099. 0x1e, 0xdb, 0x15, 0xfd, 0x21, 0x38, 0xbe, 0x44, 0x0b, 0x8f, 0x77, 0x77, 0xf4, 0x69, 0xf2, 0xdd,
  1100. 0x1d, 0x5c, 0x4e, 0x1f, 0x3a, 0xcd, 0xeb, 0x69, 0x7c, 0xbe, 0xbb, 0x83, 0xf4, 0xdb, 0x3d, 0xdc,
  1101. 0xe5, 0x0b, 0xe8, 0xb7, 0x7b, 0x05, 0xfd, 0x76, 0x0f, 0xe9, 0xb7, 0x7b, 0xb8, 0xe0, 0x17, 0xd1,
  1102. 0x4f, 0xf0, 0x39, 0xe2, 0x2b, 0xb8, 0x09, 0x1b, 0x0b, 0x8a, 0xae, 0x47, 0x81, 0x81, 0x23, 0x4e,
  1103. 0xf3, 0xeb, 0xa1, 0x06, 0x0b, 0xf8, 0xcd, 0x76, 0xb1, 0xfc, 0x52, 0x09, 0xf2, 0x09, 0xf8, 0xe5,
  1104. 0xff, 0x08, 0x1f, 0xba, 0x00, 0x6e, 0x1d, 0x93, 0x60, 0x90, 0xed, 0xdb, 0xb0, 0x36, 0xf3, 0x18,
  1105. 0xf5, 0x00, 0x32, 0xa3, 0xd4, 0xed, 0x34, 0x90, 0xb7, 0xfd, 0x8b, 0x0b, 0x37, 0x2c, 0xea, 0x79,
  1106. 0x16, 0xc5, 0x82, 0x9d, 0xa8, 0x09, 0xfa, 0x3e, 0x54, 0x64, 0x3e, 0x48, 0x6d, 0x27, 0x2f, 0x7a,
  1107. 0xe1, 0x14, 0x41, 0xe4, 0x4b, 0x68, 0xa4, 0xe1, 0xa8, 0x3f, 0x8c, 0x59, 0x12, 0xd9, 0x61, 0xbb,
  1108. 0x35, 0x93, 0x31, 0xfb, 0x03, 0x7a, 0x08, 0x3f, 0xd5, 0x78, 0x33, 0x7c, 0xeb, 0xa9, 0x35, 0xc9,
  1109. 0x43, 0x68, 0xca, 0x24, 0x3e, 0x61, 0x96, 0xcd, 0x43, 0xb6, 0x85, 0xbf, 0x0f, 0x88, 0xc5, 0xcc,
  1110. 0xcd, 0x63, 0x58, 0xb9, 0x44, 0x3a, 0x3d, 0x72, 0x1b, 0x66, 0xe4, 0x6e, 0x5d, 0x1e, 0xb9, 0x0b,
  1111. 0x69, 0xa7, 0x66, 0xef, 0x3d, 0xd8, 0x98, 0x89, 0x62, 0xb5, 0x09, 0x81, 0xca, 0x60, 0xac, 0x24,
  1112. 0xd6, 0x73, 0x99, 0xe2, 0x77, 0x7b, 0x1f, 0xc8, 0x0c, 0xf6, 0xcd, 0x8b, 0xe3, 0x42, 0x6e, 0x0d,
  1113. 0xfc, 0x27, 0x72, 0x3f, 0x6a, 0x41, 0x25, 0x0b, 0x53, 0x36, 0x33, 0xb4, 0x7e, 0xc0, 0x5b, 0x60,
  1114. 0xe4, 0xd1, 0xa7, 0x50, 0x61, 0xef, 0x55, 0x3a, 0x83, 0xf8, 0xf1, 0x6f, 0xa4, 0xd2, 0x29, 0x7f,
  1115. 0x05, 0x00, 0x00, 0xff, 0xff, 0xea, 0x06, 0x1a, 0xa9, 0x37, 0x0c, 0x00, 0x00,
  1116. }