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