| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 1 | // Code generated by protoc-gen-go from "test.proto" |
| 2 | // DO NOT EDIT! |
| 3 | |
| 4 | package test_proto |
| 5 | |
| Rob Pike | ab5b802 | 2010-06-21 17:47:58 -0700 | [diff] [blame] | 6 | import proto "goprotobuf.googlecode.com/hg/proto" |
| David Symonds | 2a0a764 | 2011-01-16 23:22:50 +1100 | [diff] [blame] | 7 | import "math" |
| David Symonds | 4fee3b1 | 2010-11-11 10:00:13 +1100 | [diff] [blame] | 8 | import "os" |
| Rob Pike | ab5b802 | 2010-06-21 17:47:58 -0700 | [diff] [blame] | 9 | |
| David Symonds | 2a0a764 | 2011-01-16 23:22:50 +1100 | [diff] [blame] | 10 | // Reference proto, math & os imports to suppress error if they are not otherwise used. |
| Rob Pike | ab5b802 | 2010-06-21 17:47:58 -0700 | [diff] [blame] | 11 | var _ = proto.GetString |
| David Symonds | 2a0a764 | 2011-01-16 23:22:50 +1100 | [diff] [blame] | 12 | var _ = math.Inf |
| David Symonds | 4fee3b1 | 2010-11-11 10:00:13 +1100 | [diff] [blame] | 13 | var _ os.Error |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 14 | |
| 15 | type FOO int32 |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 16 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 17 | const ( |
| 18 | FOO_FOO1 = 1 |
| 19 | ) |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 20 | |
| David Symonds | 940b961 | 2011-04-01 10:45:23 +1100 | [diff] [blame] | 21 | var FOO_name = map[int32]string{ |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 22 | 1: "FOO1", |
| 23 | } |
| David Symonds | 940b961 | 2011-04-01 10:45:23 +1100 | [diff] [blame] | 24 | var FOO_value = map[string]int32{ |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 25 | "FOO1": 1, |
| 26 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 27 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 28 | func NewFOO(x int32) *FOO { |
| 29 | e := FOO(x) |
| 30 | return &e |
| 31 | } |
| David Symonds | 940b961 | 2011-04-01 10:45:23 +1100 | [diff] [blame] | 32 | func (x FOO) String() string { |
| 33 | return proto.EnumName(FOO_name, int32(x)) |
| 34 | } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 35 | |
| 36 | type GoTest_KIND int32 |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 37 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 38 | const ( |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 39 | GoTest_VOID = 0 |
| 40 | GoTest_BOOL = 1 |
| 41 | GoTest_BYTES = 2 |
| 42 | GoTest_FINGERPRINT = 3 |
| 43 | GoTest_FLOAT = 4 |
| 44 | GoTest_INT = 5 |
| 45 | GoTest_STRING = 6 |
| 46 | GoTest_TIME = 7 |
| 47 | GoTest_TUPLE = 8 |
| 48 | GoTest_ARRAY = 9 |
| 49 | GoTest_MAP = 10 |
| 50 | GoTest_TABLE = 11 |
| 51 | GoTest_FUNCTION = 12 |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 52 | ) |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 53 | |
| David Symonds | 940b961 | 2011-04-01 10:45:23 +1100 | [diff] [blame] | 54 | var GoTest_KIND_name = map[int32]string{ |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 55 | 0: "VOID", |
| 56 | 1: "BOOL", |
| 57 | 2: "BYTES", |
| 58 | 3: "FINGERPRINT", |
| 59 | 4: "FLOAT", |
| 60 | 5: "INT", |
| 61 | 6: "STRING", |
| 62 | 7: "TIME", |
| 63 | 8: "TUPLE", |
| 64 | 9: "ARRAY", |
| 65 | 10: "MAP", |
| 66 | 11: "TABLE", |
| 67 | 12: "FUNCTION", |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 68 | } |
| David Symonds | 940b961 | 2011-04-01 10:45:23 +1100 | [diff] [blame] | 69 | var GoTest_KIND_value = map[string]int32{ |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 70 | "VOID": 0, |
| 71 | "BOOL": 1, |
| 72 | "BYTES": 2, |
| 73 | "FINGERPRINT": 3, |
| 74 | "FLOAT": 4, |
| 75 | "INT": 5, |
| 76 | "STRING": 6, |
| 77 | "TIME": 7, |
| 78 | "TUPLE": 8, |
| 79 | "ARRAY": 9, |
| 80 | "MAP": 10, |
| 81 | "TABLE": 11, |
| 82 | "FUNCTION": 12, |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 83 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 84 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 85 | func NewGoTest_KIND(x int32) *GoTest_KIND { |
| 86 | e := GoTest_KIND(x) |
| 87 | return &e |
| 88 | } |
| David Symonds | 940b961 | 2011-04-01 10:45:23 +1100 | [diff] [blame] | 89 | func (x GoTest_KIND) String() string { |
| 90 | return proto.EnumName(GoTest_KIND_name, int32(x)) |
| 91 | } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 92 | |
| 93 | type MyMessage_Color int32 |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 94 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 95 | const ( |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 96 | MyMessage_RED = 0 |
| 97 | MyMessage_GREEN = 1 |
| 98 | MyMessage_BLUE = 2 |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 99 | ) |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 100 | |
| David Symonds | 940b961 | 2011-04-01 10:45:23 +1100 | [diff] [blame] | 101 | var MyMessage_Color_name = map[int32]string{ |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 102 | 0: "RED", |
| 103 | 1: "GREEN", |
| 104 | 2: "BLUE", |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 105 | } |
| David Symonds | 940b961 | 2011-04-01 10:45:23 +1100 | [diff] [blame] | 106 | var MyMessage_Color_value = map[string]int32{ |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 107 | "RED": 0, |
| 108 | "GREEN": 1, |
| 109 | "BLUE": 2, |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 110 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 111 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 112 | func NewMyMessage_Color(x int32) *MyMessage_Color { |
| 113 | e := MyMessage_Color(x) |
| 114 | return &e |
| 115 | } |
| David Symonds | 940b961 | 2011-04-01 10:45:23 +1100 | [diff] [blame] | 116 | func (x MyMessage_Color) String() string { |
| 117 | return proto.EnumName(MyMessage_Color_name, int32(x)) |
| 118 | } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 119 | |
| 120 | type GoEnum struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 121 | Foo *FOO `protobuf:"varint,1,req,name=foo,enum=test_proto.FOO"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 122 | XXX_unrecognized []byte |
| 123 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 124 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 125 | func (this *GoEnum) Reset() { *this = GoEnum{} } |
| 126 | func (this *GoEnum) String() string { return proto.CompactTextString(this) } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 127 | |
| 128 | type GoTestField struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 129 | Label *string `protobuf:"bytes,1,req"` |
| 130 | Type *string `protobuf:"bytes,2,req"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 131 | XXX_unrecognized []byte |
| 132 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 133 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 134 | func (this *GoTestField) Reset() { *this = GoTestField{} } |
| 135 | func (this *GoTestField) String() string { return proto.CompactTextString(this) } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 136 | |
| 137 | type GoTest struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 138 | Kind *int32 `protobuf:"varint,1,req"` |
| 139 | Table *string `protobuf:"bytes,2,opt"` |
| 140 | Param *int32 `protobuf:"varint,3,opt"` |
| 141 | RequiredField *GoTestField `protobuf:"bytes,4,req"` |
| 142 | RepeatedField []*GoTestField `protobuf:"bytes,5,rep"` |
| 143 | OptionalField *GoTestField `protobuf:"bytes,6,opt"` |
| 144 | F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required"` |
| 145 | F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required"` |
| 146 | F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required"` |
| 147 | F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required"` |
| 148 | F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required"` |
| 149 | F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required"` |
| 150 | F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required"` |
| 151 | F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required"` |
| 152 | F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required"` |
| 153 | F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required"` |
| 154 | F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required"` |
| 155 | F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required"` |
| 156 | F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required"` |
| 157 | F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated"` |
| 158 | F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated"` |
| 159 | F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated"` |
| 160 | F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated"` |
| 161 | F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated"` |
| 162 | F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated"` |
| 163 | F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated"` |
| 164 | F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated"` |
| 165 | F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated"` |
| 166 | F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated"` |
| 167 | F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated"` |
| 168 | F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated"` |
| 169 | F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated"` |
| 170 | F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional"` |
| 171 | F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional"` |
| 172 | F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional"` |
| 173 | F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional"` |
| 174 | F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional"` |
| 175 | F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional"` |
| 176 | F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional"` |
| 177 | F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional"` |
| 178 | F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional"` |
| 179 | F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional"` |
| 180 | F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional"` |
| 181 | F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional"` |
| 182 | F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional"` |
| 183 | F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1"` |
| 184 | F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32"` |
| 185 | F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64"` |
| 186 | F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320"` |
| 187 | F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640"` |
| 188 | F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200"` |
| 189 | F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400"` |
| 190 | F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159"` |
| 191 | F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828"` |
| 192 | F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \\\"world!\\\"\\n"` |
| 193 | F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose"` |
| 194 | F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32"` |
| 195 | F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64"` |
| 196 | F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed"` |
| 197 | F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed"` |
| 198 | F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed"` |
| 199 | F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed"` |
| 200 | F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed"` |
| 201 | F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed"` |
| 202 | F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed"` |
| 203 | F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed"` |
| 204 | F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed"` |
| 205 | F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed"` |
| 206 | F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed"` |
| 207 | Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup"` |
| 208 | Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup"` |
| 209 | Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 210 | XXX_unrecognized []byte |
| 211 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 212 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 213 | func (this *GoTest) Reset() { *this = GoTest{} } |
| 214 | func (this *GoTest) String() string { return proto.CompactTextString(this) } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 215 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 216 | const Default_GoTest_F_BoolDefaulted bool = true |
| 217 | const Default_GoTest_F_Int32Defaulted int32 = 32 |
| 218 | const Default_GoTest_F_Int64Defaulted int64 = 64 |
| 219 | const Default_GoTest_F_Fixed32Defaulted uint32 = 320 |
| 220 | const Default_GoTest_F_Fixed64Defaulted uint64 = 640 |
| 221 | const Default_GoTest_F_Uint32Defaulted uint32 = 3200 |
| 222 | const Default_GoTest_F_Uint64Defaulted uint64 = 6400 |
| 223 | const Default_GoTest_F_FloatDefaulted float32 = 314159 |
| 224 | const Default_GoTest_F_DoubleDefaulted float64 = 271828 |
| 225 | const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 226 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 227 | var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 228 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 229 | const Default_GoTest_F_Sint32Defaulted int32 = -32 |
| 230 | const Default_GoTest_F_Sint64Defaulted int64 = -64 |
| 231 | |
| 232 | type GoTest_RequiredGroup struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 233 | RequiredField *string `protobuf:"bytes,71,req"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 234 | XXX_unrecognized []byte |
| 235 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 236 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 237 | func (this *GoTest_RequiredGroup) Reset() { *this = GoTest_RequiredGroup{} } |
| 238 | func (this *GoTest_RequiredGroup) String() string { return proto.CompactTextString(this) } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 239 | |
| 240 | type GoTest_RepeatedGroup struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 241 | RequiredField *string `protobuf:"bytes,81,req"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 242 | XXX_unrecognized []byte |
| 243 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 244 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 245 | func (this *GoTest_RepeatedGroup) Reset() { *this = GoTest_RepeatedGroup{} } |
| 246 | func (this *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(this) } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 247 | |
| 248 | type GoTest_OptionalGroup struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 249 | RequiredField *string `protobuf:"bytes,91,req"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 250 | XXX_unrecognized []byte |
| 251 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 252 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 253 | func (this *GoTest_OptionalGroup) Reset() { *this = GoTest_OptionalGroup{} } |
| 254 | func (this *GoTest_OptionalGroup) String() string { return proto.CompactTextString(this) } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 255 | |
| 256 | type GoSkipTest struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 257 | SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32"` |
| 258 | SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32"` |
| 259 | SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64"` |
| 260 | SkipString *string `protobuf:"bytes,14,req,name=skip_string"` |
| 261 | Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 262 | XXX_unrecognized []byte |
| 263 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 264 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 265 | func (this *GoSkipTest) Reset() { *this = GoSkipTest{} } |
| 266 | func (this *GoSkipTest) String() string { return proto.CompactTextString(this) } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 267 | |
| 268 | type GoSkipTest_SkipGroup struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 269 | GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32"` |
| 270 | GroupString *string `protobuf:"bytes,17,req,name=group_string"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 271 | XXX_unrecognized []byte |
| 272 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 273 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 274 | func (this *GoSkipTest_SkipGroup) Reset() { *this = GoSkipTest_SkipGroup{} } |
| 275 | func (this *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(this) } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 276 | |
| David Symonds | 5b7775e | 2010-12-01 10:09:04 +1100 | [diff] [blame] | 277 | type NonPackedTest struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 278 | A []int32 `protobuf:"varint,1,rep,name=a"` |
| David Symonds | 5b7775e | 2010-12-01 10:09:04 +1100 | [diff] [blame] | 279 | XXX_unrecognized []byte |
| 280 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 281 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 282 | func (this *NonPackedTest) Reset() { *this = NonPackedTest{} } |
| 283 | func (this *NonPackedTest) String() string { return proto.CompactTextString(this) } |
| David Symonds | 5b7775e | 2010-12-01 10:09:04 +1100 | [diff] [blame] | 284 | |
| 285 | type PackedTest struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 286 | B []int32 `protobuf:"varint,1,rep,packed,name=b"` |
| David Symonds | 5b7775e | 2010-12-01 10:09:04 +1100 | [diff] [blame] | 287 | XXX_unrecognized []byte |
| 288 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 289 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 290 | func (this *PackedTest) Reset() { *this = PackedTest{} } |
| 291 | func (this *PackedTest) String() string { return proto.CompactTextString(this) } |
| David Symonds | 5b7775e | 2010-12-01 10:09:04 +1100 | [diff] [blame] | 292 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 293 | type InnerMessage struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 294 | Host *string `protobuf:"bytes,1,req,name=host"` |
| 295 | Port *int32 `protobuf:"varint,2,opt,name=port,def=4000"` |
| 296 | Connected *bool `protobuf:"varint,3,opt,name=connected"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 297 | XXX_unrecognized []byte |
| 298 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 299 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 300 | func (this *InnerMessage) Reset() { *this = InnerMessage{} } |
| 301 | func (this *InnerMessage) String() string { return proto.CompactTextString(this) } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 302 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 303 | const Default_InnerMessage_Port int32 = 4000 |
| 304 | |
| 305 | type OtherMessage struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 306 | Key *int64 `protobuf:"varint,1,opt,name=key"` |
| 307 | Value []byte `protobuf:"bytes,2,opt,name=value"` |
| 308 | Weight *float32 `protobuf:"fixed32,3,opt,name=weight"` |
| 309 | Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 310 | XXX_unrecognized []byte |
| 311 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 312 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 313 | func (this *OtherMessage) Reset() { *this = OtherMessage{} } |
| 314 | func (this *OtherMessage) String() string { return proto.CompactTextString(this) } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 315 | |
| 316 | type MyMessage struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 317 | Count *int32 `protobuf:"varint,1,req,name=count"` |
| 318 | Name *string `protobuf:"bytes,2,opt,name=name"` |
| 319 | Quote *string `protobuf:"bytes,3,opt,name=quote"` |
| 320 | Pet []string `protobuf:"bytes,4,rep,name=pet"` |
| 321 | Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner"` |
| 322 | Others []*OtherMessage `protobuf:"bytes,6,rep,name=others"` |
| 323 | Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=test_proto.MyMessage_Color"` |
| 324 | Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup"` |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 325 | XXX_extensions map[int32][]byte |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 326 | XXX_unrecognized []byte |
| 327 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 328 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 329 | func (this *MyMessage) Reset() { *this = MyMessage{} } |
| 330 | func (this *MyMessage) String() string { return proto.CompactTextString(this) } |
| 331 | |
| 332 | var extRange_MyMessage = []proto.ExtensionRange{ |
| 333 | proto.ExtensionRange{100, 536870911}, |
| 334 | } |
| 335 | |
| 336 | func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { |
| 337 | return extRange_MyMessage |
| 338 | } |
| 339 | func (this *MyMessage) ExtensionMap() map[int32][]byte { |
| 340 | if this.XXX_extensions == nil { |
| 341 | this.XXX_extensions = make(map[int32][]byte) |
| 342 | } |
| 343 | return this.XXX_extensions |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 344 | } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 345 | |
| David Symonds | 9f40281 | 2011-04-28 18:08:44 +1000 | [diff] [blame] | 346 | type MyMessage_SomeGroup struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 347 | GroupField *int32 `protobuf:"varint,9,opt,name=group_field"` |
| David Symonds | 9f40281 | 2011-04-28 18:08:44 +1000 | [diff] [blame] | 348 | XXX_unrecognized []byte |
| 349 | } |
| 350 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 351 | func (this *MyMessage_SomeGroup) Reset() { *this = MyMessage_SomeGroup{} } |
| 352 | func (this *MyMessage_SomeGroup) String() string { return proto.CompactTextString(this) } |
| David Symonds | 9f40281 | 2011-04-28 18:08:44 +1000 | [diff] [blame] | 353 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 354 | type Ext struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 355 | Data *string `protobuf:"bytes,1,opt,name=data"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 356 | XXX_unrecognized []byte |
| 357 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 358 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 359 | func (this *Ext) Reset() { *this = Ext{} } |
| 360 | func (this *Ext) String() string { return proto.CompactTextString(this) } |
| 361 | |
| 362 | var E_Ext_More = &proto.ExtensionDesc{ |
| 363 | ExtendedType: (*MyMessage)(nil), |
| 364 | ExtensionType: (*Ext)(nil), |
| 365 | Field: 103, |
| 366 | Name: "test_proto.more", |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 367 | Tag: "bytes,103,opt,name=more", |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 368 | } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 369 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 370 | type MessageList struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 371 | Message []*MessageList_Message `protobuf:"group,1,rep"` |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 372 | XXX_unrecognized []byte |
| 373 | } |
| 374 | |
| 375 | func (this *MessageList) Reset() { *this = MessageList{} } |
| 376 | func (this *MessageList) String() string { return proto.CompactTextString(this) } |
| 377 | |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 378 | type MessageList_Message struct { |
| David Symonds | 8935abf | 2011-07-04 15:53:16 +1000 | [diff] [blame] | 379 | Name *string `protobuf:"bytes,2,req,name=name"` |
| 380 | Count *int32 `protobuf:"varint,3,req,name=count"` |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 381 | XXX_unrecognized []byte |
| 382 | } |
| Rob Pike | 97e934d | 2011-04-11 12:52:49 -0700 | [diff] [blame] | 383 | |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 384 | func (this *MessageList_Message) Reset() { *this = MessageList_Message{} } |
| 385 | func (this *MessageList_Message) String() string { return proto.CompactTextString(this) } |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 386 | |
| 387 | func init() { |
| 388 | proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value) |
| 389 | proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) |
| 390 | proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) |
| David Symonds | e37856c | 2011-06-22 12:52:53 +1000 | [diff] [blame] | 391 | proto.RegisterExtension(E_Ext_More) |
| Rob Pike | aaa3a62 | 2010-03-20 22:32:34 -0700 | [diff] [blame] | 392 | } |