test.pb.go 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. // Code generated by protoc-gen-go from "test.proto"
  2. // DO NOT EDIT!
  3. package testdata
  4. import proto "code.google.com/p/goprotobuf/proto"
  5. import "math"
  6. // Reference proto and math imports to suppress error if they are not otherwise used.
  7. var _ = proto.GetString
  8. var _ = math.Inf
  9. type FOO int32
  10. const (
  11. FOO_FOO1 FOO = 1
  12. )
  13. var FOO_name = map[int32]string{
  14. 1: "FOO1",
  15. }
  16. var FOO_value = map[string]int32{
  17. "FOO1": 1,
  18. }
  19. // NewFOO is deprecated. Use x.Enum() instead.
  20. func NewFOO(x FOO) *FOO {
  21. e := FOO(x)
  22. return &e
  23. }
  24. func (x FOO) Enum() *FOO {
  25. p := new(FOO)
  26. *p = x
  27. return p
  28. }
  29. func (x FOO) String() string {
  30. return proto.EnumName(FOO_name, int32(x))
  31. }
  32. type GoTest_KIND int32
  33. const (
  34. GoTest_VOID GoTest_KIND = 0
  35. GoTest_BOOL GoTest_KIND = 1
  36. GoTest_BYTES GoTest_KIND = 2
  37. GoTest_FINGERPRINT GoTest_KIND = 3
  38. GoTest_FLOAT GoTest_KIND = 4
  39. GoTest_INT GoTest_KIND = 5
  40. GoTest_STRING GoTest_KIND = 6
  41. GoTest_TIME GoTest_KIND = 7
  42. GoTest_TUPLE GoTest_KIND = 8
  43. GoTest_ARRAY GoTest_KIND = 9
  44. GoTest_MAP GoTest_KIND = 10
  45. GoTest_TABLE GoTest_KIND = 11
  46. GoTest_FUNCTION GoTest_KIND = 12
  47. )
  48. var GoTest_KIND_name = map[int32]string{
  49. 0: "VOID",
  50. 1: "BOOL",
  51. 2: "BYTES",
  52. 3: "FINGERPRINT",
  53. 4: "FLOAT",
  54. 5: "INT",
  55. 6: "STRING",
  56. 7: "TIME",
  57. 8: "TUPLE",
  58. 9: "ARRAY",
  59. 10: "MAP",
  60. 11: "TABLE",
  61. 12: "FUNCTION",
  62. }
  63. var GoTest_KIND_value = map[string]int32{
  64. "VOID": 0,
  65. "BOOL": 1,
  66. "BYTES": 2,
  67. "FINGERPRINT": 3,
  68. "FLOAT": 4,
  69. "INT": 5,
  70. "STRING": 6,
  71. "TIME": 7,
  72. "TUPLE": 8,
  73. "ARRAY": 9,
  74. "MAP": 10,
  75. "TABLE": 11,
  76. "FUNCTION": 12,
  77. }
  78. // NewGoTest_KIND is deprecated. Use x.Enum() instead.
  79. func NewGoTest_KIND(x GoTest_KIND) *GoTest_KIND {
  80. e := GoTest_KIND(x)
  81. return &e
  82. }
  83. func (x GoTest_KIND) Enum() *GoTest_KIND {
  84. p := new(GoTest_KIND)
  85. *p = x
  86. return p
  87. }
  88. func (x GoTest_KIND) String() string {
  89. return proto.EnumName(GoTest_KIND_name, int32(x))
  90. }
  91. type MyMessage_Color int32
  92. const (
  93. MyMessage_RED MyMessage_Color = 0
  94. MyMessage_GREEN MyMessage_Color = 1
  95. MyMessage_BLUE MyMessage_Color = 2
  96. )
  97. var MyMessage_Color_name = map[int32]string{
  98. 0: "RED",
  99. 1: "GREEN",
  100. 2: "BLUE",
  101. }
  102. var MyMessage_Color_value = map[string]int32{
  103. "RED": 0,
  104. "GREEN": 1,
  105. "BLUE": 2,
  106. }
  107. // NewMyMessage_Color is deprecated. Use x.Enum() instead.
  108. func NewMyMessage_Color(x MyMessage_Color) *MyMessage_Color {
  109. e := MyMessage_Color(x)
  110. return &e
  111. }
  112. func (x MyMessage_Color) Enum() *MyMessage_Color {
  113. p := new(MyMessage_Color)
  114. *p = x
  115. return p
  116. }
  117. func (x MyMessage_Color) String() string {
  118. return proto.EnumName(MyMessage_Color_name, int32(x))
  119. }
  120. type Defaults_Color int32
  121. const (
  122. Defaults_RED Defaults_Color = 0
  123. Defaults_GREEN Defaults_Color = 1
  124. Defaults_BLUE Defaults_Color = 2
  125. )
  126. var Defaults_Color_name = map[int32]string{
  127. 0: "RED",
  128. 1: "GREEN",
  129. 2: "BLUE",
  130. }
  131. var Defaults_Color_value = map[string]int32{
  132. "RED": 0,
  133. "GREEN": 1,
  134. "BLUE": 2,
  135. }
  136. // NewDefaults_Color is deprecated. Use x.Enum() instead.
  137. func NewDefaults_Color(x Defaults_Color) *Defaults_Color {
  138. e := Defaults_Color(x)
  139. return &e
  140. }
  141. func (x Defaults_Color) Enum() *Defaults_Color {
  142. p := new(Defaults_Color)
  143. *p = x
  144. return p
  145. }
  146. func (x Defaults_Color) String() string {
  147. return proto.EnumName(Defaults_Color_name, int32(x))
  148. }
  149. type RepeatedEnum_Color int32
  150. const (
  151. RepeatedEnum_RED RepeatedEnum_Color = 1
  152. )
  153. var RepeatedEnum_Color_name = map[int32]string{
  154. 1: "RED",
  155. }
  156. var RepeatedEnum_Color_value = map[string]int32{
  157. "RED": 1,
  158. }
  159. // NewRepeatedEnum_Color is deprecated. Use x.Enum() instead.
  160. func NewRepeatedEnum_Color(x RepeatedEnum_Color) *RepeatedEnum_Color {
  161. e := RepeatedEnum_Color(x)
  162. return &e
  163. }
  164. func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color {
  165. p := new(RepeatedEnum_Color)
  166. *p = x
  167. return p
  168. }
  169. func (x RepeatedEnum_Color) String() string {
  170. return proto.EnumName(RepeatedEnum_Color_name, int32(x))
  171. }
  172. type GoEnum struct {
  173. Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"`
  174. XXX_unrecognized []byte `json:"-"`
  175. }
  176. func (this *GoEnum) Reset() { *this = GoEnum{} }
  177. func (this *GoEnum) String() string { return proto.CompactTextString(this) }
  178. type GoTestField struct {
  179. Label *string `protobuf:"bytes,1,req" json:"Label,omitempty"`
  180. Type *string `protobuf:"bytes,2,req" json:"Type,omitempty"`
  181. XXX_unrecognized []byte `json:"-"`
  182. }
  183. func (this *GoTestField) Reset() { *this = GoTestField{} }
  184. func (this *GoTestField) String() string { return proto.CompactTextString(this) }
  185. type GoTest struct {
  186. Kind *GoTest_KIND `protobuf:"varint,1,req,enum=testdata.GoTest_KIND" json:"Kind,omitempty"`
  187. Table *string `protobuf:"bytes,2,opt" json:"Table,omitempty"`
  188. Param *int32 `protobuf:"varint,3,opt" json:"Param,omitempty"`
  189. RequiredField *GoTestField `protobuf:"bytes,4,req" json:"RequiredField,omitempty"`
  190. RepeatedField []*GoTestField `protobuf:"bytes,5,rep" json:"RepeatedField,omitempty"`
  191. OptionalField *GoTestField `protobuf:"bytes,6,opt" json:"OptionalField,omitempty"`
  192. F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required" json:"F_Bool_required,omitempty"`
  193. F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required" json:"F_Int32_required,omitempty"`
  194. F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required" json:"F_Int64_required,omitempty"`
  195. F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required" json:"F_Fixed32_required,omitempty"`
  196. F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required" json:"F_Fixed64_required,omitempty"`
  197. F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required" json:"F_Uint32_required,omitempty"`
  198. F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required" json:"F_Uint64_required,omitempty"`
  199. F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required" json:"F_Float_required,omitempty"`
  200. F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required" json:"F_Double_required,omitempty"`
  201. F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required" json:"F_String_required,omitempty"`
  202. F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required" json:"F_Bytes_required,omitempty"`
  203. F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required" json:"F_Sint32_required,omitempty"`
  204. F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required" json:"F_Sint64_required,omitempty"`
  205. F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated" json:"F_Bool_repeated,omitempty"`
  206. F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated" json:"F_Int32_repeated,omitempty"`
  207. F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated" json:"F_Int64_repeated,omitempty"`
  208. F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated" json:"F_Fixed32_repeated,omitempty"`
  209. F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated" json:"F_Fixed64_repeated,omitempty"`
  210. F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated" json:"F_Uint32_repeated,omitempty"`
  211. F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated" json:"F_Uint64_repeated,omitempty"`
  212. F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated" json:"F_Float_repeated,omitempty"`
  213. F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated" json:"F_Double_repeated,omitempty"`
  214. F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated" json:"F_String_repeated,omitempty"`
  215. F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated" json:"F_Bytes_repeated,omitempty"`
  216. F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated" json:"F_Sint32_repeated,omitempty"`
  217. F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated" json:"F_Sint64_repeated,omitempty"`
  218. F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional" json:"F_Bool_optional,omitempty"`
  219. F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional" json:"F_Int32_optional,omitempty"`
  220. F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional" json:"F_Int64_optional,omitempty"`
  221. F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional" json:"F_Fixed32_optional,omitempty"`
  222. F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional" json:"F_Fixed64_optional,omitempty"`
  223. F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional" json:"F_Uint32_optional,omitempty"`
  224. F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional" json:"F_Uint64_optional,omitempty"`
  225. F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional" json:"F_Float_optional,omitempty"`
  226. F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional" json:"F_Double_optional,omitempty"`
  227. F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional" json:"F_String_optional,omitempty"`
  228. F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional" json:"F_Bytes_optional,omitempty"`
  229. F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional" json:"F_Sint32_optional,omitempty"`
  230. F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional" json:"F_Sint64_optional,omitempty"`
  231. F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1" json:"F_Bool_defaulted,omitempty"`
  232. F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32" json:"F_Int32_defaulted,omitempty"`
  233. F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64" json:"F_Int64_defaulted,omitempty"`
  234. F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"`
  235. F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"`
  236. F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"`
  237. F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"`
  238. F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159" json:"F_Float_defaulted,omitempty"`
  239. F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828" json:"F_Double_defaulted,omitempty"`
  240. F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"`
  241. F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"`
  242. F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"`
  243. F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"`
  244. F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed" json:"F_Bool_repeated_packed,omitempty"`
  245. F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed" json:"F_Int32_repeated_packed,omitempty"`
  246. F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed" json:"F_Int64_repeated_packed,omitempty"`
  247. F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed" json:"F_Fixed32_repeated_packed,omitempty"`
  248. F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed" json:"F_Fixed64_repeated_packed,omitempty"`
  249. F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed" json:"F_Uint32_repeated_packed,omitempty"`
  250. F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed" json:"F_Uint64_repeated_packed,omitempty"`
  251. F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed" json:"F_Float_repeated_packed,omitempty"`
  252. F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed" json:"F_Double_repeated_packed,omitempty"`
  253. F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed" json:"F_Sint32_repeated_packed,omitempty"`
  254. F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed" json:"F_Sint64_repeated_packed,omitempty"`
  255. Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup" json:"requiredgroup,omitempty"`
  256. Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup" json:"repeatedgroup,omitempty"`
  257. Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup" json:"optionalgroup,omitempty"`
  258. XXX_unrecognized []byte `json:"-"`
  259. }
  260. func (this *GoTest) Reset() { *this = GoTest{} }
  261. func (this *GoTest) String() string { return proto.CompactTextString(this) }
  262. const Default_GoTest_F_BoolDefaulted bool = true
  263. const Default_GoTest_F_Int32Defaulted int32 = 32
  264. const Default_GoTest_F_Int64Defaulted int64 = 64
  265. const Default_GoTest_F_Fixed32Defaulted uint32 = 320
  266. const Default_GoTest_F_Fixed64Defaulted uint64 = 640
  267. const Default_GoTest_F_Uint32Defaulted uint32 = 3200
  268. const Default_GoTest_F_Uint64Defaulted uint64 = 6400
  269. const Default_GoTest_F_FloatDefaulted float32 = 314159
  270. const Default_GoTest_F_DoubleDefaulted float64 = 271828
  271. const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n"
  272. var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose")
  273. const Default_GoTest_F_Sint32Defaulted int32 = -32
  274. const Default_GoTest_F_Sint64Defaulted int64 = -64
  275. type GoTest_RequiredGroup struct {
  276. RequiredField *string `protobuf:"bytes,71,req" json:"RequiredField,omitempty"`
  277. XXX_unrecognized []byte `json:"-"`
  278. }
  279. func (this *GoTest_RequiredGroup) Reset() { *this = GoTest_RequiredGroup{} }
  280. func (this *GoTest_RequiredGroup) String() string { return proto.CompactTextString(this) }
  281. type GoTest_RepeatedGroup struct {
  282. RequiredField *string `protobuf:"bytes,81,req" json:"RequiredField,omitempty"`
  283. XXX_unrecognized []byte `json:"-"`
  284. }
  285. func (this *GoTest_RepeatedGroup) Reset() { *this = GoTest_RepeatedGroup{} }
  286. func (this *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(this) }
  287. type GoTest_OptionalGroup struct {
  288. RequiredField *string `protobuf:"bytes,91,req" json:"RequiredField,omitempty"`
  289. XXX_unrecognized []byte `json:"-"`
  290. }
  291. func (this *GoTest_OptionalGroup) Reset() { *this = GoTest_OptionalGroup{} }
  292. func (this *GoTest_OptionalGroup) String() string { return proto.CompactTextString(this) }
  293. type GoSkipTest struct {
  294. SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32" json:"skip_int32,omitempty"`
  295. SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32" json:"skip_fixed32,omitempty"`
  296. SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64" json:"skip_fixed64,omitempty"`
  297. SkipString *string `protobuf:"bytes,14,req,name=skip_string" json:"skip_string,omitempty"`
  298. Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup" json:"skipgroup,omitempty"`
  299. XXX_unrecognized []byte `json:"-"`
  300. }
  301. func (this *GoSkipTest) Reset() { *this = GoSkipTest{} }
  302. func (this *GoSkipTest) String() string { return proto.CompactTextString(this) }
  303. type GoSkipTest_SkipGroup struct {
  304. GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32" json:"group_int32,omitempty"`
  305. GroupString *string `protobuf:"bytes,17,req,name=group_string" json:"group_string,omitempty"`
  306. XXX_unrecognized []byte `json:"-"`
  307. }
  308. func (this *GoSkipTest_SkipGroup) Reset() { *this = GoSkipTest_SkipGroup{} }
  309. func (this *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(this) }
  310. type NonPackedTest struct {
  311. A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"`
  312. XXX_unrecognized []byte `json:"-"`
  313. }
  314. func (this *NonPackedTest) Reset() { *this = NonPackedTest{} }
  315. func (this *NonPackedTest) String() string { return proto.CompactTextString(this) }
  316. type PackedTest struct {
  317. B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"`
  318. XXX_unrecognized []byte `json:"-"`
  319. }
  320. func (this *PackedTest) Reset() { *this = PackedTest{} }
  321. func (this *PackedTest) String() string { return proto.CompactTextString(this) }
  322. type MaxTag struct {
  323. LastField *string `protobuf:"bytes,536870911,opt,name=last_field" json:"last_field,omitempty"`
  324. XXX_unrecognized []byte `json:"-"`
  325. }
  326. func (this *MaxTag) Reset() { *this = MaxTag{} }
  327. func (this *MaxTag) String() string { return proto.CompactTextString(this) }
  328. type InnerMessage struct {
  329. Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"`
  330. Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"`
  331. Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"`
  332. XXX_unrecognized []byte `json:"-"`
  333. }
  334. func (this *InnerMessage) Reset() { *this = InnerMessage{} }
  335. func (this *InnerMessage) String() string { return proto.CompactTextString(this) }
  336. const Default_InnerMessage_Port int32 = 4000
  337. type OtherMessage struct {
  338. Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"`
  339. Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
  340. Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"`
  341. Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"`
  342. XXX_unrecognized []byte `json:"-"`
  343. }
  344. func (this *OtherMessage) Reset() { *this = OtherMessage{} }
  345. func (this *OtherMessage) String() string { return proto.CompactTextString(this) }
  346. type MyMessage struct {
  347. Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"`
  348. Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
  349. Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"`
  350. Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"`
  351. Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"`
  352. Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"`
  353. Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"`
  354. Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup" json:"somegroup,omitempty"`
  355. RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes" json:"rep_bytes,omitempty"`
  356. XXX_extensions map[int32]proto.Extension `json:"-"`
  357. XXX_unrecognized []byte `json:"-"`
  358. }
  359. func (this *MyMessage) Reset() { *this = MyMessage{} }
  360. func (this *MyMessage) String() string { return proto.CompactTextString(this) }
  361. var extRange_MyMessage = []proto.ExtensionRange{
  362. {100, 536870911},
  363. }
  364. func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange {
  365. return extRange_MyMessage
  366. }
  367. func (this *MyMessage) ExtensionMap() map[int32]proto.Extension {
  368. if this.XXX_extensions == nil {
  369. this.XXX_extensions = make(map[int32]proto.Extension)
  370. }
  371. return this.XXX_extensions
  372. }
  373. type MyMessage_SomeGroup struct {
  374. GroupField *int32 `protobuf:"varint,9,opt,name=group_field" json:"group_field,omitempty"`
  375. XXX_unrecognized []byte `json:"-"`
  376. }
  377. func (this *MyMessage_SomeGroup) Reset() { *this = MyMessage_SomeGroup{} }
  378. func (this *MyMessage_SomeGroup) String() string { return proto.CompactTextString(this) }
  379. type Ext struct {
  380. Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
  381. XXX_unrecognized []byte `json:"-"`
  382. }
  383. func (this *Ext) Reset() { *this = Ext{} }
  384. func (this *Ext) String() string { return proto.CompactTextString(this) }
  385. var E_Ext_More = &proto.ExtensionDesc{
  386. ExtendedType: (*MyMessage)(nil),
  387. ExtensionType: (*Ext)(nil),
  388. Field: 103,
  389. Name: "testdata.Ext.more",
  390. Tag: "bytes,103,opt,name=more",
  391. }
  392. var E_Ext_Text = &proto.ExtensionDesc{
  393. ExtendedType: (*MyMessage)(nil),
  394. ExtensionType: (*string)(nil),
  395. Field: 104,
  396. Name: "testdata.Ext.text",
  397. Tag: "bytes,104,opt,name=text",
  398. }
  399. var E_Ext_Number = &proto.ExtensionDesc{
  400. ExtendedType: (*MyMessage)(nil),
  401. ExtensionType: (*int32)(nil),
  402. Field: 105,
  403. Name: "testdata.Ext.number",
  404. Tag: "varint,105,opt,name=number",
  405. }
  406. type MessageList struct {
  407. Message []*MessageList_Message `protobuf:"group,1,rep" json:"message,omitempty"`
  408. XXX_unrecognized []byte `json:"-"`
  409. }
  410. func (this *MessageList) Reset() { *this = MessageList{} }
  411. func (this *MessageList) String() string { return proto.CompactTextString(this) }
  412. type MessageList_Message struct {
  413. Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
  414. Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"`
  415. XXX_unrecognized []byte `json:"-"`
  416. }
  417. func (this *MessageList_Message) Reset() { *this = MessageList_Message{} }
  418. func (this *MessageList_Message) String() string { return proto.CompactTextString(this) }
  419. type Strings struct {
  420. StringField *string `protobuf:"bytes,1,opt,name=string_field" json:"string_field,omitempty"`
  421. BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field" json:"bytes_field,omitempty"`
  422. XXX_unrecognized []byte `json:"-"`
  423. }
  424. func (this *Strings) Reset() { *this = Strings{} }
  425. func (this *Strings) String() string { return proto.CompactTextString(this) }
  426. type Defaults struct {
  427. F_Bool *bool `protobuf:"varint,1,opt,def=1" json:"F_Bool,omitempty"`
  428. F_Int32 *int32 `protobuf:"varint,2,opt,def=32" json:"F_Int32,omitempty"`
  429. F_Int64 *int64 `protobuf:"varint,3,opt,def=64" json:"F_Int64,omitempty"`
  430. F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,def=320" json:"F_Fixed32,omitempty"`
  431. F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,def=640" json:"F_Fixed64,omitempty"`
  432. F_Uint32 *uint32 `protobuf:"varint,6,opt,def=3200" json:"F_Uint32,omitempty"`
  433. F_Uint64 *uint64 `protobuf:"varint,7,opt,def=6400" json:"F_Uint64,omitempty"`
  434. F_Float *float32 `protobuf:"fixed32,8,opt,def=314159" json:"F_Float,omitempty"`
  435. F_Double *float64 `protobuf:"fixed64,9,opt,def=271828" json:"F_Double,omitempty"`
  436. F_String *string `protobuf:"bytes,10,opt,def=hello, \"world!\"\n" json:"F_String,omitempty"`
  437. F_Bytes []byte `protobuf:"bytes,11,opt,def=Bignose" json:"F_Bytes,omitempty"`
  438. F_Sint32 *int32 `protobuf:"zigzag32,12,opt,def=-32" json:"F_Sint32,omitempty"`
  439. F_Sint64 *int64 `protobuf:"zigzag64,13,opt,def=-64" json:"F_Sint64,omitempty"`
  440. F_Enum *Defaults_Color `protobuf:"varint,14,opt,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"`
  441. F_Pinf *float32 `protobuf:"fixed32,15,opt,def=inf" json:"F_Pinf,omitempty"`
  442. F_Ninf *float32 `protobuf:"fixed32,16,opt,def=-inf" json:"F_Ninf,omitempty"`
  443. F_Nan *float32 `protobuf:"fixed32,17,opt,def=nan" json:"F_Nan,omitempty"`
  444. Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"`
  445. XXX_unrecognized []byte `json:"-"`
  446. }
  447. func (this *Defaults) Reset() { *this = Defaults{} }
  448. func (this *Defaults) String() string { return proto.CompactTextString(this) }
  449. const Default_Defaults_F_Bool bool = true
  450. const Default_Defaults_F_Int32 int32 = 32
  451. const Default_Defaults_F_Int64 int64 = 64
  452. const Default_Defaults_F_Fixed32 uint32 = 320
  453. const Default_Defaults_F_Fixed64 uint64 = 640
  454. const Default_Defaults_F_Uint32 uint32 = 3200
  455. const Default_Defaults_F_Uint64 uint64 = 6400
  456. const Default_Defaults_F_Float float32 = 314159
  457. const Default_Defaults_F_Double float64 = 271828
  458. const Default_Defaults_F_String string = "hello, \"world!\"\n"
  459. var Default_Defaults_F_Bytes []byte = []byte("Bignose")
  460. const Default_Defaults_F_Sint32 int32 = -32
  461. const Default_Defaults_F_Sint64 int64 = -64
  462. const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN
  463. var Default_Defaults_F_Pinf float32 = float32(math.Inf(1))
  464. var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1))
  465. var Default_Defaults_F_Nan float32 = float32(math.NaN())
  466. type SubDefaults struct {
  467. N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"`
  468. XXX_unrecognized []byte `json:"-"`
  469. }
  470. func (this *SubDefaults) Reset() { *this = SubDefaults{} }
  471. func (this *SubDefaults) String() string { return proto.CompactTextString(this) }
  472. const Default_SubDefaults_N int64 = 7
  473. type RepeatedEnum struct {
  474. Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"`
  475. XXX_unrecognized []byte `json:"-"`
  476. }
  477. func (this *RepeatedEnum) Reset() { *this = RepeatedEnum{} }
  478. func (this *RepeatedEnum) String() string { return proto.CompactTextString(this) }
  479. var E_Greeting = &proto.ExtensionDesc{
  480. ExtendedType: (*MyMessage)(nil),
  481. ExtensionType: ([]string)(nil),
  482. Field: 106,
  483. Name: "testdata.greeting",
  484. Tag: "bytes,106,rep,name=greeting",
  485. }
  486. func init() {
  487. proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value)
  488. proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
  489. proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
  490. proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
  491. proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
  492. proto.RegisterExtension(E_Ext_More)
  493. proto.RegisterExtension(E_Ext_Text)
  494. proto.RegisterExtension(E_Ext_Number)
  495. proto.RegisterExtension(E_Greeting)
  496. }