test.pb.go 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395
  1. // Code generated by protoc-gen-go.
  2. // source: test.proto
  3. // DO NOT EDIT!
  4. package testdata
  5. import proto "code.google.com/p/goprotobuf/proto"
  6. import json "encoding/json"
  7. import math "math"
  8. // Reference proto, json, and math imports to suppress error if they are not otherwise used.
  9. var _ = proto.Marshal
  10. var _ = &json.SyntaxError{}
  11. var _ = math.Inf
  12. type FOO int32
  13. const (
  14. FOO_FOO1 FOO = 1
  15. )
  16. var FOO_name = map[int32]string{
  17. 1: "FOO1",
  18. }
  19. var FOO_value = map[string]int32{
  20. "FOO1": 1,
  21. }
  22. func (x FOO) Enum() *FOO {
  23. p := new(FOO)
  24. *p = x
  25. return p
  26. }
  27. func (x FOO) String() string {
  28. return proto.EnumName(FOO_name, int32(x))
  29. }
  30. func (x FOO) MarshalJSON() ([]byte, error) {
  31. return json.Marshal(x.String())
  32. }
  33. func (x *FOO) UnmarshalJSON(data []byte) error {
  34. value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO")
  35. if err != nil {
  36. return err
  37. }
  38. *x = FOO(value)
  39. return nil
  40. }
  41. type GoTest_KIND int32
  42. const (
  43. GoTest_VOID GoTest_KIND = 0
  44. GoTest_BOOL GoTest_KIND = 1
  45. GoTest_BYTES GoTest_KIND = 2
  46. GoTest_FINGERPRINT GoTest_KIND = 3
  47. GoTest_FLOAT GoTest_KIND = 4
  48. GoTest_INT GoTest_KIND = 5
  49. GoTest_STRING GoTest_KIND = 6
  50. GoTest_TIME GoTest_KIND = 7
  51. GoTest_TUPLE GoTest_KIND = 8
  52. GoTest_ARRAY GoTest_KIND = 9
  53. GoTest_MAP GoTest_KIND = 10
  54. GoTest_TABLE GoTest_KIND = 11
  55. GoTest_FUNCTION GoTest_KIND = 12
  56. )
  57. var GoTest_KIND_name = map[int32]string{
  58. 0: "VOID",
  59. 1: "BOOL",
  60. 2: "BYTES",
  61. 3: "FINGERPRINT",
  62. 4: "FLOAT",
  63. 5: "INT",
  64. 6: "STRING",
  65. 7: "TIME",
  66. 8: "TUPLE",
  67. 9: "ARRAY",
  68. 10: "MAP",
  69. 11: "TABLE",
  70. 12: "FUNCTION",
  71. }
  72. var GoTest_KIND_value = map[string]int32{
  73. "VOID": 0,
  74. "BOOL": 1,
  75. "BYTES": 2,
  76. "FINGERPRINT": 3,
  77. "FLOAT": 4,
  78. "INT": 5,
  79. "STRING": 6,
  80. "TIME": 7,
  81. "TUPLE": 8,
  82. "ARRAY": 9,
  83. "MAP": 10,
  84. "TABLE": 11,
  85. "FUNCTION": 12,
  86. }
  87. func (x GoTest_KIND) Enum() *GoTest_KIND {
  88. p := new(GoTest_KIND)
  89. *p = x
  90. return p
  91. }
  92. func (x GoTest_KIND) String() string {
  93. return proto.EnumName(GoTest_KIND_name, int32(x))
  94. }
  95. func (x GoTest_KIND) MarshalJSON() ([]byte, error) {
  96. return json.Marshal(x.String())
  97. }
  98. func (x *GoTest_KIND) UnmarshalJSON(data []byte) error {
  99. value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND")
  100. if err != nil {
  101. return err
  102. }
  103. *x = GoTest_KIND(value)
  104. return nil
  105. }
  106. type MyMessage_Color int32
  107. const (
  108. MyMessage_RED MyMessage_Color = 0
  109. MyMessage_GREEN MyMessage_Color = 1
  110. MyMessage_BLUE MyMessage_Color = 2
  111. )
  112. var MyMessage_Color_name = map[int32]string{
  113. 0: "RED",
  114. 1: "GREEN",
  115. 2: "BLUE",
  116. }
  117. var MyMessage_Color_value = map[string]int32{
  118. "RED": 0,
  119. "GREEN": 1,
  120. "BLUE": 2,
  121. }
  122. func (x MyMessage_Color) Enum() *MyMessage_Color {
  123. p := new(MyMessage_Color)
  124. *p = x
  125. return p
  126. }
  127. func (x MyMessage_Color) String() string {
  128. return proto.EnumName(MyMessage_Color_name, int32(x))
  129. }
  130. func (x MyMessage_Color) MarshalJSON() ([]byte, error) {
  131. return json.Marshal(x.String())
  132. }
  133. func (x *MyMessage_Color) UnmarshalJSON(data []byte) error {
  134. value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color")
  135. if err != nil {
  136. return err
  137. }
  138. *x = MyMessage_Color(value)
  139. return nil
  140. }
  141. type Defaults_Color int32
  142. const (
  143. Defaults_RED Defaults_Color = 0
  144. Defaults_GREEN Defaults_Color = 1
  145. Defaults_BLUE Defaults_Color = 2
  146. )
  147. var Defaults_Color_name = map[int32]string{
  148. 0: "RED",
  149. 1: "GREEN",
  150. 2: "BLUE",
  151. }
  152. var Defaults_Color_value = map[string]int32{
  153. "RED": 0,
  154. "GREEN": 1,
  155. "BLUE": 2,
  156. }
  157. func (x Defaults_Color) Enum() *Defaults_Color {
  158. p := new(Defaults_Color)
  159. *p = x
  160. return p
  161. }
  162. func (x Defaults_Color) String() string {
  163. return proto.EnumName(Defaults_Color_name, int32(x))
  164. }
  165. func (x Defaults_Color) MarshalJSON() ([]byte, error) {
  166. return json.Marshal(x.String())
  167. }
  168. func (x *Defaults_Color) UnmarshalJSON(data []byte) error {
  169. value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color")
  170. if err != nil {
  171. return err
  172. }
  173. *x = Defaults_Color(value)
  174. return nil
  175. }
  176. type RepeatedEnum_Color int32
  177. const (
  178. RepeatedEnum_RED RepeatedEnum_Color = 1
  179. )
  180. var RepeatedEnum_Color_name = map[int32]string{
  181. 1: "RED",
  182. }
  183. var RepeatedEnum_Color_value = map[string]int32{
  184. "RED": 1,
  185. }
  186. func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color {
  187. p := new(RepeatedEnum_Color)
  188. *p = x
  189. return p
  190. }
  191. func (x RepeatedEnum_Color) String() string {
  192. return proto.EnumName(RepeatedEnum_Color_name, int32(x))
  193. }
  194. func (x RepeatedEnum_Color) MarshalJSON() ([]byte, error) {
  195. return json.Marshal(x.String())
  196. }
  197. func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error {
  198. value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color")
  199. if err != nil {
  200. return err
  201. }
  202. *x = RepeatedEnum_Color(value)
  203. return nil
  204. }
  205. type GoEnum struct {
  206. Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"`
  207. XXX_unrecognized []byte `json:"-"`
  208. }
  209. func (this *GoEnum) Reset() { *this = GoEnum{} }
  210. func (this *GoEnum) String() string { return proto.CompactTextString(this) }
  211. func (*GoEnum) ProtoMessage() {}
  212. func (this *GoEnum) GetFoo() FOO {
  213. if this != nil && this.Foo != nil {
  214. return *this.Foo
  215. }
  216. return 0
  217. }
  218. type GoTestField struct {
  219. Label *string `protobuf:"bytes,1,req" json:"Label,omitempty"`
  220. Type *string `protobuf:"bytes,2,req" json:"Type,omitempty"`
  221. XXX_unrecognized []byte `json:"-"`
  222. }
  223. func (this *GoTestField) Reset() { *this = GoTestField{} }
  224. func (this *GoTestField) String() string { return proto.CompactTextString(this) }
  225. func (*GoTestField) ProtoMessage() {}
  226. func (this *GoTestField) GetLabel() string {
  227. if this != nil && this.Label != nil {
  228. return *this.Label
  229. }
  230. return ""
  231. }
  232. func (this *GoTestField) GetType() string {
  233. if this != nil && this.Type != nil {
  234. return *this.Type
  235. }
  236. return ""
  237. }
  238. type GoTest struct {
  239. Kind *GoTest_KIND `protobuf:"varint,1,req,enum=testdata.GoTest_KIND" json:"Kind,omitempty"`
  240. Table *string `protobuf:"bytes,2,opt" json:"Table,omitempty"`
  241. Param *int32 `protobuf:"varint,3,opt" json:"Param,omitempty"`
  242. RequiredField *GoTestField `protobuf:"bytes,4,req" json:"RequiredField,omitempty"`
  243. RepeatedField []*GoTestField `protobuf:"bytes,5,rep" json:"RepeatedField,omitempty"`
  244. OptionalField *GoTestField `protobuf:"bytes,6,opt" json:"OptionalField,omitempty"`
  245. F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required" json:"F_Bool_required,omitempty"`
  246. F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required" json:"F_Int32_required,omitempty"`
  247. F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required" json:"F_Int64_required,omitempty"`
  248. F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required" json:"F_Fixed32_required,omitempty"`
  249. F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required" json:"F_Fixed64_required,omitempty"`
  250. F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required" json:"F_Uint32_required,omitempty"`
  251. F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required" json:"F_Uint64_required,omitempty"`
  252. F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required" json:"F_Float_required,omitempty"`
  253. F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required" json:"F_Double_required,omitempty"`
  254. F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required" json:"F_String_required,omitempty"`
  255. F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required" json:"F_Bytes_required,omitempty"`
  256. F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required" json:"F_Sint32_required,omitempty"`
  257. F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required" json:"F_Sint64_required,omitempty"`
  258. F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated" json:"F_Bool_repeated,omitempty"`
  259. F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated" json:"F_Int32_repeated,omitempty"`
  260. F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated" json:"F_Int64_repeated,omitempty"`
  261. F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated" json:"F_Fixed32_repeated,omitempty"`
  262. F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated" json:"F_Fixed64_repeated,omitempty"`
  263. F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated" json:"F_Uint32_repeated,omitempty"`
  264. F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated" json:"F_Uint64_repeated,omitempty"`
  265. F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated" json:"F_Float_repeated,omitempty"`
  266. F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated" json:"F_Double_repeated,omitempty"`
  267. F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated" json:"F_String_repeated,omitempty"`
  268. F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated" json:"F_Bytes_repeated,omitempty"`
  269. F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated" json:"F_Sint32_repeated,omitempty"`
  270. F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated" json:"F_Sint64_repeated,omitempty"`
  271. F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional" json:"F_Bool_optional,omitempty"`
  272. F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional" json:"F_Int32_optional,omitempty"`
  273. F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional" json:"F_Int64_optional,omitempty"`
  274. F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional" json:"F_Fixed32_optional,omitempty"`
  275. F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional" json:"F_Fixed64_optional,omitempty"`
  276. F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional" json:"F_Uint32_optional,omitempty"`
  277. F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional" json:"F_Uint64_optional,omitempty"`
  278. F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional" json:"F_Float_optional,omitempty"`
  279. F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional" json:"F_Double_optional,omitempty"`
  280. F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional" json:"F_String_optional,omitempty"`
  281. F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional" json:"F_Bytes_optional,omitempty"`
  282. F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional" json:"F_Sint32_optional,omitempty"`
  283. F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional" json:"F_Sint64_optional,omitempty"`
  284. F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1" json:"F_Bool_defaulted,omitempty"`
  285. F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32" json:"F_Int32_defaulted,omitempty"`
  286. F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64" json:"F_Int64_defaulted,omitempty"`
  287. F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"`
  288. F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"`
  289. F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"`
  290. F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"`
  291. F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159" json:"F_Float_defaulted,omitempty"`
  292. F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828" json:"F_Double_defaulted,omitempty"`
  293. F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"`
  294. F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"`
  295. F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"`
  296. F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"`
  297. F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed" json:"F_Bool_repeated_packed,omitempty"`
  298. F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed" json:"F_Int32_repeated_packed,omitempty"`
  299. F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed" json:"F_Int64_repeated_packed,omitempty"`
  300. F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed" json:"F_Fixed32_repeated_packed,omitempty"`
  301. F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed" json:"F_Fixed64_repeated_packed,omitempty"`
  302. F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed" json:"F_Uint32_repeated_packed,omitempty"`
  303. F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed" json:"F_Uint64_repeated_packed,omitempty"`
  304. F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed" json:"F_Float_repeated_packed,omitempty"`
  305. F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed" json:"F_Double_repeated_packed,omitempty"`
  306. F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed" json:"F_Sint32_repeated_packed,omitempty"`
  307. F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed" json:"F_Sint64_repeated_packed,omitempty"`
  308. Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup" json:"requiredgroup,omitempty"`
  309. Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup" json:"repeatedgroup,omitempty"`
  310. Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup" json:"optionalgroup,omitempty"`
  311. XXX_unrecognized []byte `json:"-"`
  312. }
  313. func (this *GoTest) Reset() { *this = GoTest{} }
  314. func (this *GoTest) String() string { return proto.CompactTextString(this) }
  315. func (*GoTest) ProtoMessage() {}
  316. const Default_GoTest_F_BoolDefaulted bool = true
  317. const Default_GoTest_F_Int32Defaulted int32 = 32
  318. const Default_GoTest_F_Int64Defaulted int64 = 64
  319. const Default_GoTest_F_Fixed32Defaulted uint32 = 320
  320. const Default_GoTest_F_Fixed64Defaulted uint64 = 640
  321. const Default_GoTest_F_Uint32Defaulted uint32 = 3200
  322. const Default_GoTest_F_Uint64Defaulted uint64 = 6400
  323. const Default_GoTest_F_FloatDefaulted float32 = 314159
  324. const Default_GoTest_F_DoubleDefaulted float64 = 271828
  325. const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n"
  326. var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose")
  327. const Default_GoTest_F_Sint32Defaulted int32 = -32
  328. const Default_GoTest_F_Sint64Defaulted int64 = -64
  329. func (this *GoTest) GetKind() GoTest_KIND {
  330. if this != nil && this.Kind != nil {
  331. return *this.Kind
  332. }
  333. return 0
  334. }
  335. func (this *GoTest) GetTable() string {
  336. if this != nil && this.Table != nil {
  337. return *this.Table
  338. }
  339. return ""
  340. }
  341. func (this *GoTest) GetParam() int32 {
  342. if this != nil && this.Param != nil {
  343. return *this.Param
  344. }
  345. return 0
  346. }
  347. func (this *GoTest) GetRequiredField() *GoTestField {
  348. if this != nil {
  349. return this.RequiredField
  350. }
  351. return nil
  352. }
  353. func (this *GoTest) GetOptionalField() *GoTestField {
  354. if this != nil {
  355. return this.OptionalField
  356. }
  357. return nil
  358. }
  359. func (this *GoTest) GetF_BoolRequired() bool {
  360. if this != nil && this.F_BoolRequired != nil {
  361. return *this.F_BoolRequired
  362. }
  363. return false
  364. }
  365. func (this *GoTest) GetF_Int32Required() int32 {
  366. if this != nil && this.F_Int32Required != nil {
  367. return *this.F_Int32Required
  368. }
  369. return 0
  370. }
  371. func (this *GoTest) GetF_Int64Required() int64 {
  372. if this != nil && this.F_Int64Required != nil {
  373. return *this.F_Int64Required
  374. }
  375. return 0
  376. }
  377. func (this *GoTest) GetF_Fixed32Required() uint32 {
  378. if this != nil && this.F_Fixed32Required != nil {
  379. return *this.F_Fixed32Required
  380. }
  381. return 0
  382. }
  383. func (this *GoTest) GetF_Fixed64Required() uint64 {
  384. if this != nil && this.F_Fixed64Required != nil {
  385. return *this.F_Fixed64Required
  386. }
  387. return 0
  388. }
  389. func (this *GoTest) GetF_Uint32Required() uint32 {
  390. if this != nil && this.F_Uint32Required != nil {
  391. return *this.F_Uint32Required
  392. }
  393. return 0
  394. }
  395. func (this *GoTest) GetF_Uint64Required() uint64 {
  396. if this != nil && this.F_Uint64Required != nil {
  397. return *this.F_Uint64Required
  398. }
  399. return 0
  400. }
  401. func (this *GoTest) GetF_FloatRequired() float32 {
  402. if this != nil && this.F_FloatRequired != nil {
  403. return *this.F_FloatRequired
  404. }
  405. return 0
  406. }
  407. func (this *GoTest) GetF_DoubleRequired() float64 {
  408. if this != nil && this.F_DoubleRequired != nil {
  409. return *this.F_DoubleRequired
  410. }
  411. return 0
  412. }
  413. func (this *GoTest) GetF_StringRequired() string {
  414. if this != nil && this.F_StringRequired != nil {
  415. return *this.F_StringRequired
  416. }
  417. return ""
  418. }
  419. func (this *GoTest) GetF_BytesRequired() []byte {
  420. if this != nil {
  421. return this.F_BytesRequired
  422. }
  423. return nil
  424. }
  425. func (this *GoTest) GetF_Sint32Required() int32 {
  426. if this != nil && this.F_Sint32Required != nil {
  427. return *this.F_Sint32Required
  428. }
  429. return 0
  430. }
  431. func (this *GoTest) GetF_Sint64Required() int64 {
  432. if this != nil && this.F_Sint64Required != nil {
  433. return *this.F_Sint64Required
  434. }
  435. return 0
  436. }
  437. func (this *GoTest) GetF_BoolOptional() bool {
  438. if this != nil && this.F_BoolOptional != nil {
  439. return *this.F_BoolOptional
  440. }
  441. return false
  442. }
  443. func (this *GoTest) GetF_Int32Optional() int32 {
  444. if this != nil && this.F_Int32Optional != nil {
  445. return *this.F_Int32Optional
  446. }
  447. return 0
  448. }
  449. func (this *GoTest) GetF_Int64Optional() int64 {
  450. if this != nil && this.F_Int64Optional != nil {
  451. return *this.F_Int64Optional
  452. }
  453. return 0
  454. }
  455. func (this *GoTest) GetF_Fixed32Optional() uint32 {
  456. if this != nil && this.F_Fixed32Optional != nil {
  457. return *this.F_Fixed32Optional
  458. }
  459. return 0
  460. }
  461. func (this *GoTest) GetF_Fixed64Optional() uint64 {
  462. if this != nil && this.F_Fixed64Optional != nil {
  463. return *this.F_Fixed64Optional
  464. }
  465. return 0
  466. }
  467. func (this *GoTest) GetF_Uint32Optional() uint32 {
  468. if this != nil && this.F_Uint32Optional != nil {
  469. return *this.F_Uint32Optional
  470. }
  471. return 0
  472. }
  473. func (this *GoTest) GetF_Uint64Optional() uint64 {
  474. if this != nil && this.F_Uint64Optional != nil {
  475. return *this.F_Uint64Optional
  476. }
  477. return 0
  478. }
  479. func (this *GoTest) GetF_FloatOptional() float32 {
  480. if this != nil && this.F_FloatOptional != nil {
  481. return *this.F_FloatOptional
  482. }
  483. return 0
  484. }
  485. func (this *GoTest) GetF_DoubleOptional() float64 {
  486. if this != nil && this.F_DoubleOptional != nil {
  487. return *this.F_DoubleOptional
  488. }
  489. return 0
  490. }
  491. func (this *GoTest) GetF_StringOptional() string {
  492. if this != nil && this.F_StringOptional != nil {
  493. return *this.F_StringOptional
  494. }
  495. return ""
  496. }
  497. func (this *GoTest) GetF_BytesOptional() []byte {
  498. if this != nil {
  499. return this.F_BytesOptional
  500. }
  501. return nil
  502. }
  503. func (this *GoTest) GetF_Sint32Optional() int32 {
  504. if this != nil && this.F_Sint32Optional != nil {
  505. return *this.F_Sint32Optional
  506. }
  507. return 0
  508. }
  509. func (this *GoTest) GetF_Sint64Optional() int64 {
  510. if this != nil && this.F_Sint64Optional != nil {
  511. return *this.F_Sint64Optional
  512. }
  513. return 0
  514. }
  515. func (this *GoTest) GetF_BoolDefaulted() bool {
  516. if this != nil && this.F_BoolDefaulted != nil {
  517. return *this.F_BoolDefaulted
  518. }
  519. return Default_GoTest_F_BoolDefaulted
  520. }
  521. func (this *GoTest) GetF_Int32Defaulted() int32 {
  522. if this != nil && this.F_Int32Defaulted != nil {
  523. return *this.F_Int32Defaulted
  524. }
  525. return Default_GoTest_F_Int32Defaulted
  526. }
  527. func (this *GoTest) GetF_Int64Defaulted() int64 {
  528. if this != nil && this.F_Int64Defaulted != nil {
  529. return *this.F_Int64Defaulted
  530. }
  531. return Default_GoTest_F_Int64Defaulted
  532. }
  533. func (this *GoTest) GetF_Fixed32Defaulted() uint32 {
  534. if this != nil && this.F_Fixed32Defaulted != nil {
  535. return *this.F_Fixed32Defaulted
  536. }
  537. return Default_GoTest_F_Fixed32Defaulted
  538. }
  539. func (this *GoTest) GetF_Fixed64Defaulted() uint64 {
  540. if this != nil && this.F_Fixed64Defaulted != nil {
  541. return *this.F_Fixed64Defaulted
  542. }
  543. return Default_GoTest_F_Fixed64Defaulted
  544. }
  545. func (this *GoTest) GetF_Uint32Defaulted() uint32 {
  546. if this != nil && this.F_Uint32Defaulted != nil {
  547. return *this.F_Uint32Defaulted
  548. }
  549. return Default_GoTest_F_Uint32Defaulted
  550. }
  551. func (this *GoTest) GetF_Uint64Defaulted() uint64 {
  552. if this != nil && this.F_Uint64Defaulted != nil {
  553. return *this.F_Uint64Defaulted
  554. }
  555. return Default_GoTest_F_Uint64Defaulted
  556. }
  557. func (this *GoTest) GetF_FloatDefaulted() float32 {
  558. if this != nil && this.F_FloatDefaulted != nil {
  559. return *this.F_FloatDefaulted
  560. }
  561. return Default_GoTest_F_FloatDefaulted
  562. }
  563. func (this *GoTest) GetF_DoubleDefaulted() float64 {
  564. if this != nil && this.F_DoubleDefaulted != nil {
  565. return *this.F_DoubleDefaulted
  566. }
  567. return Default_GoTest_F_DoubleDefaulted
  568. }
  569. func (this *GoTest) GetF_StringDefaulted() string {
  570. if this != nil && this.F_StringDefaulted != nil {
  571. return *this.F_StringDefaulted
  572. }
  573. return Default_GoTest_F_StringDefaulted
  574. }
  575. func (this *GoTest) GetF_BytesDefaulted() []byte {
  576. if this != nil && this.F_BytesDefaulted != nil {
  577. return this.F_BytesDefaulted
  578. }
  579. return append([]byte(nil), Default_GoTest_F_BytesDefaulted...)
  580. }
  581. func (this *GoTest) GetF_Sint32Defaulted() int32 {
  582. if this != nil && this.F_Sint32Defaulted != nil {
  583. return *this.F_Sint32Defaulted
  584. }
  585. return Default_GoTest_F_Sint32Defaulted
  586. }
  587. func (this *GoTest) GetF_Sint64Defaulted() int64 {
  588. if this != nil && this.F_Sint64Defaulted != nil {
  589. return *this.F_Sint64Defaulted
  590. }
  591. return Default_GoTest_F_Sint64Defaulted
  592. }
  593. func (this *GoTest) GetRequiredgroup() *GoTest_RequiredGroup {
  594. if this != nil {
  595. return this.Requiredgroup
  596. }
  597. return nil
  598. }
  599. func (this *GoTest) GetOptionalgroup() *GoTest_OptionalGroup {
  600. if this != nil {
  601. return this.Optionalgroup
  602. }
  603. return nil
  604. }
  605. type GoTest_RequiredGroup struct {
  606. RequiredField *string `protobuf:"bytes,71,req" json:"RequiredField,omitempty"`
  607. }
  608. func (this *GoTest_RequiredGroup) Reset() { *this = GoTest_RequiredGroup{} }
  609. func (this *GoTest_RequiredGroup) GetRequiredField() string {
  610. if this != nil && this.RequiredField != nil {
  611. return *this.RequiredField
  612. }
  613. return ""
  614. }
  615. type GoTest_RepeatedGroup struct {
  616. RequiredField *string `protobuf:"bytes,81,req" json:"RequiredField,omitempty"`
  617. }
  618. func (this *GoTest_RepeatedGroup) Reset() { *this = GoTest_RepeatedGroup{} }
  619. func (this *GoTest_RepeatedGroup) GetRequiredField() string {
  620. if this != nil && this.RequiredField != nil {
  621. return *this.RequiredField
  622. }
  623. return ""
  624. }
  625. type GoTest_OptionalGroup struct {
  626. RequiredField *string `protobuf:"bytes,91,req" json:"RequiredField,omitempty"`
  627. }
  628. func (this *GoTest_OptionalGroup) Reset() { *this = GoTest_OptionalGroup{} }
  629. func (this *GoTest_OptionalGroup) GetRequiredField() string {
  630. if this != nil && this.RequiredField != nil {
  631. return *this.RequiredField
  632. }
  633. return ""
  634. }
  635. type GoSkipTest struct {
  636. SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32" json:"skip_int32,omitempty"`
  637. SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32" json:"skip_fixed32,omitempty"`
  638. SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64" json:"skip_fixed64,omitempty"`
  639. SkipString *string `protobuf:"bytes,14,req,name=skip_string" json:"skip_string,omitempty"`
  640. Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup" json:"skipgroup,omitempty"`
  641. XXX_unrecognized []byte `json:"-"`
  642. }
  643. func (this *GoSkipTest) Reset() { *this = GoSkipTest{} }
  644. func (this *GoSkipTest) String() string { return proto.CompactTextString(this) }
  645. func (*GoSkipTest) ProtoMessage() {}
  646. func (this *GoSkipTest) GetSkipInt32() int32 {
  647. if this != nil && this.SkipInt32 != nil {
  648. return *this.SkipInt32
  649. }
  650. return 0
  651. }
  652. func (this *GoSkipTest) GetSkipFixed32() uint32 {
  653. if this != nil && this.SkipFixed32 != nil {
  654. return *this.SkipFixed32
  655. }
  656. return 0
  657. }
  658. func (this *GoSkipTest) GetSkipFixed64() uint64 {
  659. if this != nil && this.SkipFixed64 != nil {
  660. return *this.SkipFixed64
  661. }
  662. return 0
  663. }
  664. func (this *GoSkipTest) GetSkipString() string {
  665. if this != nil && this.SkipString != nil {
  666. return *this.SkipString
  667. }
  668. return ""
  669. }
  670. func (this *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup {
  671. if this != nil {
  672. return this.Skipgroup
  673. }
  674. return nil
  675. }
  676. type GoSkipTest_SkipGroup struct {
  677. GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32" json:"group_int32,omitempty"`
  678. GroupString *string `protobuf:"bytes,17,req,name=group_string" json:"group_string,omitempty"`
  679. }
  680. func (this *GoSkipTest_SkipGroup) Reset() { *this = GoSkipTest_SkipGroup{} }
  681. func (this *GoSkipTest_SkipGroup) GetGroupInt32() int32 {
  682. if this != nil && this.GroupInt32 != nil {
  683. return *this.GroupInt32
  684. }
  685. return 0
  686. }
  687. func (this *GoSkipTest_SkipGroup) GetGroupString() string {
  688. if this != nil && this.GroupString != nil {
  689. return *this.GroupString
  690. }
  691. return ""
  692. }
  693. type NonPackedTest struct {
  694. A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"`
  695. XXX_unrecognized []byte `json:"-"`
  696. }
  697. func (this *NonPackedTest) Reset() { *this = NonPackedTest{} }
  698. func (this *NonPackedTest) String() string { return proto.CompactTextString(this) }
  699. func (*NonPackedTest) ProtoMessage() {}
  700. type PackedTest struct {
  701. B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"`
  702. XXX_unrecognized []byte `json:"-"`
  703. }
  704. func (this *PackedTest) Reset() { *this = PackedTest{} }
  705. func (this *PackedTest) String() string { return proto.CompactTextString(this) }
  706. func (*PackedTest) ProtoMessage() {}
  707. type MaxTag struct {
  708. LastField *string `protobuf:"bytes,536870911,opt,name=last_field" json:"last_field,omitempty"`
  709. XXX_unrecognized []byte `json:"-"`
  710. }
  711. func (this *MaxTag) Reset() { *this = MaxTag{} }
  712. func (this *MaxTag) String() string { return proto.CompactTextString(this) }
  713. func (*MaxTag) ProtoMessage() {}
  714. func (this *MaxTag) GetLastField() string {
  715. if this != nil && this.LastField != nil {
  716. return *this.LastField
  717. }
  718. return ""
  719. }
  720. type OldMessage struct {
  721. Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"`
  722. XXX_unrecognized []byte `json:"-"`
  723. }
  724. func (this *OldMessage) Reset() { *this = OldMessage{} }
  725. func (this *OldMessage) String() string { return proto.CompactTextString(this) }
  726. func (*OldMessage) ProtoMessage() {}
  727. func (this *OldMessage) GetNested() *OldMessage_Nested {
  728. if this != nil {
  729. return this.Nested
  730. }
  731. return nil
  732. }
  733. type OldMessage_Nested struct {
  734. Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  735. XXX_unrecognized []byte `json:"-"`
  736. }
  737. func (this *OldMessage_Nested) Reset() { *this = OldMessage_Nested{} }
  738. func (this *OldMessage_Nested) String() string { return proto.CompactTextString(this) }
  739. func (*OldMessage_Nested) ProtoMessage() {}
  740. func (this *OldMessage_Nested) GetName() string {
  741. if this != nil && this.Name != nil {
  742. return *this.Name
  743. }
  744. return ""
  745. }
  746. type NewMessage struct {
  747. Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"`
  748. XXX_unrecognized []byte `json:"-"`
  749. }
  750. func (this *NewMessage) Reset() { *this = NewMessage{} }
  751. func (this *NewMessage) String() string { return proto.CompactTextString(this) }
  752. func (*NewMessage) ProtoMessage() {}
  753. func (this *NewMessage) GetNested() *NewMessage_Nested {
  754. if this != nil {
  755. return this.Nested
  756. }
  757. return nil
  758. }
  759. type NewMessage_Nested struct {
  760. Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  761. FoodGroup *string `protobuf:"bytes,2,opt,name=food_group" json:"food_group,omitempty"`
  762. XXX_unrecognized []byte `json:"-"`
  763. }
  764. func (this *NewMessage_Nested) Reset() { *this = NewMessage_Nested{} }
  765. func (this *NewMessage_Nested) String() string { return proto.CompactTextString(this) }
  766. func (*NewMessage_Nested) ProtoMessage() {}
  767. func (this *NewMessage_Nested) GetName() string {
  768. if this != nil && this.Name != nil {
  769. return *this.Name
  770. }
  771. return ""
  772. }
  773. func (this *NewMessage_Nested) GetFoodGroup() string {
  774. if this != nil && this.FoodGroup != nil {
  775. return *this.FoodGroup
  776. }
  777. return ""
  778. }
  779. type InnerMessage struct {
  780. Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"`
  781. Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"`
  782. Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"`
  783. XXX_unrecognized []byte `json:"-"`
  784. }
  785. func (this *InnerMessage) Reset() { *this = InnerMessage{} }
  786. func (this *InnerMessage) String() string { return proto.CompactTextString(this) }
  787. func (*InnerMessage) ProtoMessage() {}
  788. const Default_InnerMessage_Port int32 = 4000
  789. func (this *InnerMessage) GetHost() string {
  790. if this != nil && this.Host != nil {
  791. return *this.Host
  792. }
  793. return ""
  794. }
  795. func (this *InnerMessage) GetPort() int32 {
  796. if this != nil && this.Port != nil {
  797. return *this.Port
  798. }
  799. return Default_InnerMessage_Port
  800. }
  801. func (this *InnerMessage) GetConnected() bool {
  802. if this != nil && this.Connected != nil {
  803. return *this.Connected
  804. }
  805. return false
  806. }
  807. type OtherMessage struct {
  808. Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"`
  809. Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
  810. Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"`
  811. Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"`
  812. XXX_unrecognized []byte `json:"-"`
  813. }
  814. func (this *OtherMessage) Reset() { *this = OtherMessage{} }
  815. func (this *OtherMessage) String() string { return proto.CompactTextString(this) }
  816. func (*OtherMessage) ProtoMessage() {}
  817. func (this *OtherMessage) GetKey() int64 {
  818. if this != nil && this.Key != nil {
  819. return *this.Key
  820. }
  821. return 0
  822. }
  823. func (this *OtherMessage) GetValue() []byte {
  824. if this != nil {
  825. return this.Value
  826. }
  827. return nil
  828. }
  829. func (this *OtherMessage) GetWeight() float32 {
  830. if this != nil && this.Weight != nil {
  831. return *this.Weight
  832. }
  833. return 0
  834. }
  835. func (this *OtherMessage) GetInner() *InnerMessage {
  836. if this != nil {
  837. return this.Inner
  838. }
  839. return nil
  840. }
  841. type MyMessage struct {
  842. Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"`
  843. Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
  844. Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"`
  845. Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"`
  846. Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"`
  847. Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"`
  848. Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"`
  849. Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup" json:"somegroup,omitempty"`
  850. RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes" json:"rep_bytes,omitempty"`
  851. Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"`
  852. XXX_extensions map[int32]proto.Extension `json:"-"`
  853. XXX_unrecognized []byte `json:"-"`
  854. }
  855. func (this *MyMessage) Reset() { *this = MyMessage{} }
  856. func (this *MyMessage) String() string { return proto.CompactTextString(this) }
  857. func (*MyMessage) ProtoMessage() {}
  858. var extRange_MyMessage = []proto.ExtensionRange{
  859. {100, 536870911},
  860. }
  861. func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange {
  862. return extRange_MyMessage
  863. }
  864. func (this *MyMessage) ExtensionMap() map[int32]proto.Extension {
  865. if this.XXX_extensions == nil {
  866. this.XXX_extensions = make(map[int32]proto.Extension)
  867. }
  868. return this.XXX_extensions
  869. }
  870. func (this *MyMessage) GetCount() int32 {
  871. if this != nil && this.Count != nil {
  872. return *this.Count
  873. }
  874. return 0
  875. }
  876. func (this *MyMessage) GetName() string {
  877. if this != nil && this.Name != nil {
  878. return *this.Name
  879. }
  880. return ""
  881. }
  882. func (this *MyMessage) GetQuote() string {
  883. if this != nil && this.Quote != nil {
  884. return *this.Quote
  885. }
  886. return ""
  887. }
  888. func (this *MyMessage) GetInner() *InnerMessage {
  889. if this != nil {
  890. return this.Inner
  891. }
  892. return nil
  893. }
  894. func (this *MyMessage) GetBikeshed() MyMessage_Color {
  895. if this != nil && this.Bikeshed != nil {
  896. return *this.Bikeshed
  897. }
  898. return 0
  899. }
  900. func (this *MyMessage) GetSomegroup() *MyMessage_SomeGroup {
  901. if this != nil {
  902. return this.Somegroup
  903. }
  904. return nil
  905. }
  906. func (this *MyMessage) GetBigfloat() float64 {
  907. if this != nil && this.Bigfloat != nil {
  908. return *this.Bigfloat
  909. }
  910. return 0
  911. }
  912. type MyMessage_SomeGroup struct {
  913. GroupField *int32 `protobuf:"varint,9,opt,name=group_field" json:"group_field,omitempty"`
  914. }
  915. func (this *MyMessage_SomeGroup) Reset() { *this = MyMessage_SomeGroup{} }
  916. func (this *MyMessage_SomeGroup) GetGroupField() int32 {
  917. if this != nil && this.GroupField != nil {
  918. return *this.GroupField
  919. }
  920. return 0
  921. }
  922. type Ext struct {
  923. Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
  924. XXX_unrecognized []byte `json:"-"`
  925. }
  926. func (this *Ext) Reset() { *this = Ext{} }
  927. func (this *Ext) String() string { return proto.CompactTextString(this) }
  928. func (*Ext) ProtoMessage() {}
  929. func (this *Ext) GetData() string {
  930. if this != nil && this.Data != nil {
  931. return *this.Data
  932. }
  933. return ""
  934. }
  935. var E_Ext_More = &proto.ExtensionDesc{
  936. ExtendedType: (*MyMessage)(nil),
  937. ExtensionType: (*Ext)(nil),
  938. Field: 103,
  939. Name: "testdata.Ext.more",
  940. Tag: "bytes,103,opt,name=more",
  941. }
  942. var E_Ext_Text = &proto.ExtensionDesc{
  943. ExtendedType: (*MyMessage)(nil),
  944. ExtensionType: (*string)(nil),
  945. Field: 104,
  946. Name: "testdata.Ext.text",
  947. Tag: "bytes,104,opt,name=text",
  948. }
  949. var E_Ext_Number = &proto.ExtensionDesc{
  950. ExtendedType: (*MyMessage)(nil),
  951. ExtensionType: (*int32)(nil),
  952. Field: 105,
  953. Name: "testdata.Ext.number",
  954. Tag: "varint,105,opt,name=number",
  955. }
  956. type MessageList struct {
  957. Message []*MessageList_Message `protobuf:"group,1,rep" json:"message,omitempty"`
  958. XXX_unrecognized []byte `json:"-"`
  959. }
  960. func (this *MessageList) Reset() { *this = MessageList{} }
  961. func (this *MessageList) String() string { return proto.CompactTextString(this) }
  962. func (*MessageList) ProtoMessage() {}
  963. type MessageList_Message struct {
  964. Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
  965. Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"`
  966. }
  967. func (this *MessageList_Message) Reset() { *this = MessageList_Message{} }
  968. func (this *MessageList_Message) GetName() string {
  969. if this != nil && this.Name != nil {
  970. return *this.Name
  971. }
  972. return ""
  973. }
  974. func (this *MessageList_Message) GetCount() int32 {
  975. if this != nil && this.Count != nil {
  976. return *this.Count
  977. }
  978. return 0
  979. }
  980. type Strings struct {
  981. StringField *string `protobuf:"bytes,1,opt,name=string_field" json:"string_field,omitempty"`
  982. BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field" json:"bytes_field,omitempty"`
  983. XXX_unrecognized []byte `json:"-"`
  984. }
  985. func (this *Strings) Reset() { *this = Strings{} }
  986. func (this *Strings) String() string { return proto.CompactTextString(this) }
  987. func (*Strings) ProtoMessage() {}
  988. func (this *Strings) GetStringField() string {
  989. if this != nil && this.StringField != nil {
  990. return *this.StringField
  991. }
  992. return ""
  993. }
  994. func (this *Strings) GetBytesField() []byte {
  995. if this != nil {
  996. return this.BytesField
  997. }
  998. return nil
  999. }
  1000. type Defaults struct {
  1001. F_Bool *bool `protobuf:"varint,1,opt,def=1" json:"F_Bool,omitempty"`
  1002. F_Int32 *int32 `protobuf:"varint,2,opt,def=32" json:"F_Int32,omitempty"`
  1003. F_Int64 *int64 `protobuf:"varint,3,opt,def=64" json:"F_Int64,omitempty"`
  1004. F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,def=320" json:"F_Fixed32,omitempty"`
  1005. F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,def=640" json:"F_Fixed64,omitempty"`
  1006. F_Uint32 *uint32 `protobuf:"varint,6,opt,def=3200" json:"F_Uint32,omitempty"`
  1007. F_Uint64 *uint64 `protobuf:"varint,7,opt,def=6400" json:"F_Uint64,omitempty"`
  1008. F_Float *float32 `protobuf:"fixed32,8,opt,def=314159" json:"F_Float,omitempty"`
  1009. F_Double *float64 `protobuf:"fixed64,9,opt,def=271828" json:"F_Double,omitempty"`
  1010. F_String *string `protobuf:"bytes,10,opt,def=hello, \"world!\"\n" json:"F_String,omitempty"`
  1011. F_Bytes []byte `protobuf:"bytes,11,opt,def=Bignose" json:"F_Bytes,omitempty"`
  1012. F_Sint32 *int32 `protobuf:"zigzag32,12,opt,def=-32" json:"F_Sint32,omitempty"`
  1013. F_Sint64 *int64 `protobuf:"zigzag64,13,opt,def=-64" json:"F_Sint64,omitempty"`
  1014. F_Enum *Defaults_Color `protobuf:"varint,14,opt,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"`
  1015. F_Pinf *float32 `protobuf:"fixed32,15,opt,def=inf" json:"F_Pinf,omitempty"`
  1016. F_Ninf *float32 `protobuf:"fixed32,16,opt,def=-inf" json:"F_Ninf,omitempty"`
  1017. F_Nan *float32 `protobuf:"fixed32,17,opt,def=nan" json:"F_Nan,omitempty"`
  1018. Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"`
  1019. XXX_unrecognized []byte `json:"-"`
  1020. }
  1021. func (this *Defaults) Reset() { *this = Defaults{} }
  1022. func (this *Defaults) String() string { return proto.CompactTextString(this) }
  1023. func (*Defaults) ProtoMessage() {}
  1024. const Default_Defaults_F_Bool bool = true
  1025. const Default_Defaults_F_Int32 int32 = 32
  1026. const Default_Defaults_F_Int64 int64 = 64
  1027. const Default_Defaults_F_Fixed32 uint32 = 320
  1028. const Default_Defaults_F_Fixed64 uint64 = 640
  1029. const Default_Defaults_F_Uint32 uint32 = 3200
  1030. const Default_Defaults_F_Uint64 uint64 = 6400
  1031. const Default_Defaults_F_Float float32 = 314159
  1032. const Default_Defaults_F_Double float64 = 271828
  1033. const Default_Defaults_F_String string = "hello, \"world!\"\n"
  1034. var Default_Defaults_F_Bytes []byte = []byte("Bignose")
  1035. const Default_Defaults_F_Sint32 int32 = -32
  1036. const Default_Defaults_F_Sint64 int64 = -64
  1037. const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN
  1038. var Default_Defaults_F_Pinf float32 = float32(math.Inf(1))
  1039. var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1))
  1040. var Default_Defaults_F_Nan float32 = float32(math.NaN())
  1041. func (this *Defaults) GetF_Bool() bool {
  1042. if this != nil && this.F_Bool != nil {
  1043. return *this.F_Bool
  1044. }
  1045. return Default_Defaults_F_Bool
  1046. }
  1047. func (this *Defaults) GetF_Int32() int32 {
  1048. if this != nil && this.F_Int32 != nil {
  1049. return *this.F_Int32
  1050. }
  1051. return Default_Defaults_F_Int32
  1052. }
  1053. func (this *Defaults) GetF_Int64() int64 {
  1054. if this != nil && this.F_Int64 != nil {
  1055. return *this.F_Int64
  1056. }
  1057. return Default_Defaults_F_Int64
  1058. }
  1059. func (this *Defaults) GetF_Fixed32() uint32 {
  1060. if this != nil && this.F_Fixed32 != nil {
  1061. return *this.F_Fixed32
  1062. }
  1063. return Default_Defaults_F_Fixed32
  1064. }
  1065. func (this *Defaults) GetF_Fixed64() uint64 {
  1066. if this != nil && this.F_Fixed64 != nil {
  1067. return *this.F_Fixed64
  1068. }
  1069. return Default_Defaults_F_Fixed64
  1070. }
  1071. func (this *Defaults) GetF_Uint32() uint32 {
  1072. if this != nil && this.F_Uint32 != nil {
  1073. return *this.F_Uint32
  1074. }
  1075. return Default_Defaults_F_Uint32
  1076. }
  1077. func (this *Defaults) GetF_Uint64() uint64 {
  1078. if this != nil && this.F_Uint64 != nil {
  1079. return *this.F_Uint64
  1080. }
  1081. return Default_Defaults_F_Uint64
  1082. }
  1083. func (this *Defaults) GetF_Float() float32 {
  1084. if this != nil && this.F_Float != nil {
  1085. return *this.F_Float
  1086. }
  1087. return Default_Defaults_F_Float
  1088. }
  1089. func (this *Defaults) GetF_Double() float64 {
  1090. if this != nil && this.F_Double != nil {
  1091. return *this.F_Double
  1092. }
  1093. return Default_Defaults_F_Double
  1094. }
  1095. func (this *Defaults) GetF_String() string {
  1096. if this != nil && this.F_String != nil {
  1097. return *this.F_String
  1098. }
  1099. return Default_Defaults_F_String
  1100. }
  1101. func (this *Defaults) GetF_Bytes() []byte {
  1102. if this != nil && this.F_Bytes != nil {
  1103. return this.F_Bytes
  1104. }
  1105. return append([]byte(nil), Default_Defaults_F_Bytes...)
  1106. }
  1107. func (this *Defaults) GetF_Sint32() int32 {
  1108. if this != nil && this.F_Sint32 != nil {
  1109. return *this.F_Sint32
  1110. }
  1111. return Default_Defaults_F_Sint32
  1112. }
  1113. func (this *Defaults) GetF_Sint64() int64 {
  1114. if this != nil && this.F_Sint64 != nil {
  1115. return *this.F_Sint64
  1116. }
  1117. return Default_Defaults_F_Sint64
  1118. }
  1119. func (this *Defaults) GetF_Enum() Defaults_Color {
  1120. if this != nil && this.F_Enum != nil {
  1121. return *this.F_Enum
  1122. }
  1123. return Default_Defaults_F_Enum
  1124. }
  1125. func (this *Defaults) GetF_Pinf() float32 {
  1126. if this != nil && this.F_Pinf != nil {
  1127. return *this.F_Pinf
  1128. }
  1129. return Default_Defaults_F_Pinf
  1130. }
  1131. func (this *Defaults) GetF_Ninf() float32 {
  1132. if this != nil && this.F_Ninf != nil {
  1133. return *this.F_Ninf
  1134. }
  1135. return Default_Defaults_F_Ninf
  1136. }
  1137. func (this *Defaults) GetF_Nan() float32 {
  1138. if this != nil && this.F_Nan != nil {
  1139. return *this.F_Nan
  1140. }
  1141. return Default_Defaults_F_Nan
  1142. }
  1143. func (this *Defaults) GetSub() *SubDefaults {
  1144. if this != nil {
  1145. return this.Sub
  1146. }
  1147. return nil
  1148. }
  1149. type SubDefaults struct {
  1150. N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"`
  1151. XXX_unrecognized []byte `json:"-"`
  1152. }
  1153. func (this *SubDefaults) Reset() { *this = SubDefaults{} }
  1154. func (this *SubDefaults) String() string { return proto.CompactTextString(this) }
  1155. func (*SubDefaults) ProtoMessage() {}
  1156. const Default_SubDefaults_N int64 = 7
  1157. func (this *SubDefaults) GetN() int64 {
  1158. if this != nil && this.N != nil {
  1159. return *this.N
  1160. }
  1161. return Default_SubDefaults_N
  1162. }
  1163. type RepeatedEnum struct {
  1164. Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"`
  1165. XXX_unrecognized []byte `json:"-"`
  1166. }
  1167. func (this *RepeatedEnum) Reset() { *this = RepeatedEnum{} }
  1168. func (this *RepeatedEnum) String() string { return proto.CompactTextString(this) }
  1169. func (*RepeatedEnum) ProtoMessage() {}
  1170. type MoreRepeated struct {
  1171. Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"`
  1172. BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed" json:"bools_packed,omitempty"`
  1173. Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"`
  1174. IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed" json:"ints_packed,omitempty"`
  1175. Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"`
  1176. XXX_unrecognized []byte `json:"-"`
  1177. }
  1178. func (this *MoreRepeated) Reset() { *this = MoreRepeated{} }
  1179. func (this *MoreRepeated) String() string { return proto.CompactTextString(this) }
  1180. func (*MoreRepeated) ProtoMessage() {}
  1181. var E_Greeting = &proto.ExtensionDesc{
  1182. ExtendedType: (*MyMessage)(nil),
  1183. ExtensionType: ([]string)(nil),
  1184. Field: 106,
  1185. Name: "testdata.greeting",
  1186. Tag: "bytes,106,rep,name=greeting",
  1187. }
  1188. func init() {
  1189. proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value)
  1190. proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
  1191. proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
  1192. proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
  1193. proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
  1194. proto.RegisterExtension(E_Ext_More)
  1195. proto.RegisterExtension(E_Ext_Text)
  1196. proto.RegisterExtension(E_Ext_Number)
  1197. proto.RegisterExtension(E_Greeting)
  1198. }