PageRenderTime 54ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

/proto/testdata/test.pb.go

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