github.com/matm/etcd@v0.3.1-0.20140328024009-5b4a473f1453/third_party/code.google.com/p/gogoprotobuf/proto/testdata/test.pb.go.golden (about) 1 // Code generated by protoc-gen-gogo. 2 // source: test.proto 3 // DO NOT EDIT! 4 5 package testdata 6 7 import proto "github.com/coreos/etcd/third_party/code.google.com/p/gogoprotobuf/proto" 8 import json "encoding/json" 9 import math "math" 10 11 import () 12 13 // Reference proto, json, and math imports to suppress error if they are not otherwise used. 14 var _ = proto.Marshal 15 var _ = &json.SyntaxError{} 16 var _ = math.Inf 17 18 type FOO int32 19 20 const ( 21 FOO_FOO1 FOO = 1 22 ) 23 24 var FOO_name = map[int32]string{ 25 1: "FOO1", 26 } 27 var FOO_value = map[string]int32{ 28 "FOO1": 1, 29 } 30 31 func (x FOO) Enum() *FOO { 32 p := new(FOO) 33 *p = x 34 return p 35 } 36 func (x FOO) String() string { 37 return proto.EnumName(FOO_name, int32(x)) 38 } 39 func (x FOO) MarshalJSON() ([]byte, error) { 40 return json.Marshal(x.String()) 41 } 42 func (x *FOO) UnmarshalJSON(data []byte) error { 43 value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") 44 if err != nil { 45 return err 46 } 47 *x = FOO(value) 48 return nil 49 } 50 51 type GoTest_KIND int32 52 53 const ( 54 GoTest_VOID GoTest_KIND = 0 55 GoTest_BOOL GoTest_KIND = 1 56 GoTest_BYTES GoTest_KIND = 2 57 GoTest_FINGERPRINT GoTest_KIND = 3 58 GoTest_FLOAT GoTest_KIND = 4 59 GoTest_INT GoTest_KIND = 5 60 GoTest_STRING GoTest_KIND = 6 61 GoTest_TIME GoTest_KIND = 7 62 GoTest_TUPLE GoTest_KIND = 8 63 GoTest_ARRAY GoTest_KIND = 9 64 GoTest_MAP GoTest_KIND = 10 65 GoTest_TABLE GoTest_KIND = 11 66 GoTest_FUNCTION GoTest_KIND = 12 67 ) 68 69 var GoTest_KIND_name = map[int32]string{ 70 0: "VOID", 71 1: "BOOL", 72 2: "BYTES", 73 3: "FINGERPRINT", 74 4: "FLOAT", 75 5: "INT", 76 6: "STRING", 77 7: "TIME", 78 8: "TUPLE", 79 9: "ARRAY", 80 10: "MAP", 81 11: "TABLE", 82 12: "FUNCTION", 83 } 84 var GoTest_KIND_value = map[string]int32{ 85 "VOID": 0, 86 "BOOL": 1, 87 "BYTES": 2, 88 "FINGERPRINT": 3, 89 "FLOAT": 4, 90 "INT": 5, 91 "STRING": 6, 92 "TIME": 7, 93 "TUPLE": 8, 94 "ARRAY": 9, 95 "MAP": 10, 96 "TABLE": 11, 97 "FUNCTION": 12, 98 } 99 100 func (x GoTest_KIND) Enum() *GoTest_KIND { 101 p := new(GoTest_KIND) 102 *p = x 103 return p 104 } 105 func (x GoTest_KIND) String() string { 106 return proto.EnumName(GoTest_KIND_name, int32(x)) 107 } 108 func (x GoTest_KIND) MarshalJSON() ([]byte, error) { 109 return json.Marshal(x.String()) 110 } 111 func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { 112 value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") 113 if err != nil { 114 return err 115 } 116 *x = GoTest_KIND(value) 117 return nil 118 } 119 120 type MyMessage_Color int32 121 122 const ( 123 MyMessage_RED MyMessage_Color = 0 124 MyMessage_GREEN MyMessage_Color = 1 125 MyMessage_BLUE MyMessage_Color = 2 126 ) 127 128 var MyMessage_Color_name = map[int32]string{ 129 0: "RED", 130 1: "GREEN", 131 2: "BLUE", 132 } 133 var MyMessage_Color_value = map[string]int32{ 134 "RED": 0, 135 "GREEN": 1, 136 "BLUE": 2, 137 } 138 139 func (x MyMessage_Color) Enum() *MyMessage_Color { 140 p := new(MyMessage_Color) 141 *p = x 142 return p 143 } 144 func (x MyMessage_Color) String() string { 145 return proto.EnumName(MyMessage_Color_name, int32(x)) 146 } 147 func (x MyMessage_Color) MarshalJSON() ([]byte, error) { 148 return json.Marshal(x.String()) 149 } 150 func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { 151 value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") 152 if err != nil { 153 return err 154 } 155 *x = MyMessage_Color(value) 156 return nil 157 } 158 159 type Defaults_Color int32 160 161 const ( 162 Defaults_RED Defaults_Color = 0 163 Defaults_GREEN Defaults_Color = 1 164 Defaults_BLUE Defaults_Color = 2 165 ) 166 167 var Defaults_Color_name = map[int32]string{ 168 0: "RED", 169 1: "GREEN", 170 2: "BLUE", 171 } 172 var Defaults_Color_value = map[string]int32{ 173 "RED": 0, 174 "GREEN": 1, 175 "BLUE": 2, 176 } 177 178 func (x Defaults_Color) Enum() *Defaults_Color { 179 p := new(Defaults_Color) 180 *p = x 181 return p 182 } 183 func (x Defaults_Color) String() string { 184 return proto.EnumName(Defaults_Color_name, int32(x)) 185 } 186 func (x Defaults_Color) MarshalJSON() ([]byte, error) { 187 return json.Marshal(x.String()) 188 } 189 func (x *Defaults_Color) UnmarshalJSON(data []byte) error { 190 value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") 191 if err != nil { 192 return err 193 } 194 *x = Defaults_Color(value) 195 return nil 196 } 197 198 type RepeatedEnum_Color int32 199 200 const ( 201 RepeatedEnum_RED RepeatedEnum_Color = 1 202 ) 203 204 var RepeatedEnum_Color_name = map[int32]string{ 205 1: "RED", 206 } 207 var RepeatedEnum_Color_value = map[string]int32{ 208 "RED": 1, 209 } 210 211 func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { 212 p := new(RepeatedEnum_Color) 213 *p = x 214 return p 215 } 216 func (x RepeatedEnum_Color) String() string { 217 return proto.EnumName(RepeatedEnum_Color_name, int32(x)) 218 } 219 func (x RepeatedEnum_Color) MarshalJSON() ([]byte, error) { 220 return json.Marshal(x.String()) 221 } 222 func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { 223 value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") 224 if err != nil { 225 return err 226 } 227 *x = RepeatedEnum_Color(value) 228 return nil 229 } 230 231 type GoEnum struct { 232 Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"` 233 XXX_unrecognized []byte `json:"-"` 234 } 235 236 func (m *GoEnum) Reset() { *m = GoEnum{} } 237 func (m *GoEnum) String() string { return proto.CompactTextString(m) } 238 func (*GoEnum) ProtoMessage() {} 239 240 func (m *GoEnum) GetFoo() FOO { 241 if m != nil && m.Foo != nil { 242 return *m.Foo 243 } 244 return 0 245 } 246 247 type GoTestField struct { 248 Label *string `protobuf:"bytes,1,req" json:"Label,omitempty"` 249 Type *string `protobuf:"bytes,2,req" json:"Type,omitempty"` 250 XXX_unrecognized []byte `json:"-"` 251 } 252 253 func (m *GoTestField) Reset() { *m = GoTestField{} } 254 func (m *GoTestField) String() string { return proto.CompactTextString(m) } 255 func (*GoTestField) ProtoMessage() {} 256 257 func (m *GoTestField) GetLabel() string { 258 if m != nil && m.Label != nil { 259 return *m.Label 260 } 261 return "" 262 } 263 264 func (m *GoTestField) GetType() string { 265 if m != nil && m.Type != nil { 266 return *m.Type 267 } 268 return "" 269 } 270 271 type GoTest struct { 272 Kind *GoTest_KIND `protobuf:"varint,1,req,enum=testdata.GoTest_KIND" json:"Kind,omitempty"` 273 Table *string `protobuf:"bytes,2,opt" json:"Table,omitempty"` 274 Param *int32 `protobuf:"varint,3,opt" json:"Param,omitempty"` 275 RequiredField *GoTestField `protobuf:"bytes,4,req" json:"RequiredField,omitempty"` 276 RepeatedField []*GoTestField `protobuf:"bytes,5,rep" json:"RepeatedField,omitempty"` 277 OptionalField *GoTestField `protobuf:"bytes,6,opt" json:"OptionalField,omitempty"` 278 F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required" json:"F_Bool_required,omitempty"` 279 F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required" json:"F_Int32_required,omitempty"` 280 F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required" json:"F_Int64_required,omitempty"` 281 F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required" json:"F_Fixed32_required,omitempty"` 282 F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required" json:"F_Fixed64_required,omitempty"` 283 F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required" json:"F_Uint32_required,omitempty"` 284 F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required" json:"F_Uint64_required,omitempty"` 285 F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required" json:"F_Float_required,omitempty"` 286 F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required" json:"F_Double_required,omitempty"` 287 F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required" json:"F_String_required,omitempty"` 288 F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required" json:"F_Bytes_required,omitempty"` 289 F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required" json:"F_Sint32_required,omitempty"` 290 F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required" json:"F_Sint64_required,omitempty"` 291 F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated" json:"F_Bool_repeated,omitempty"` 292 F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated" json:"F_Int32_repeated,omitempty"` 293 F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated" json:"F_Int64_repeated,omitempty"` 294 F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated" json:"F_Fixed32_repeated,omitempty"` 295 F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated" json:"F_Fixed64_repeated,omitempty"` 296 F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated" json:"F_Uint32_repeated,omitempty"` 297 F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated" json:"F_Uint64_repeated,omitempty"` 298 F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated" json:"F_Float_repeated,omitempty"` 299 F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated" json:"F_Double_repeated,omitempty"` 300 F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated" json:"F_String_repeated,omitempty"` 301 F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated" json:"F_Bytes_repeated,omitempty"` 302 F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated" json:"F_Sint32_repeated,omitempty"` 303 F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated" json:"F_Sint64_repeated,omitempty"` 304 F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional" json:"F_Bool_optional,omitempty"` 305 F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional" json:"F_Int32_optional,omitempty"` 306 F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional" json:"F_Int64_optional,omitempty"` 307 F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional" json:"F_Fixed32_optional,omitempty"` 308 F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional" json:"F_Fixed64_optional,omitempty"` 309 F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional" json:"F_Uint32_optional,omitempty"` 310 F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional" json:"F_Uint64_optional,omitempty"` 311 F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional" json:"F_Float_optional,omitempty"` 312 F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional" json:"F_Double_optional,omitempty"` 313 F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional" json:"F_String_optional,omitempty"` 314 F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional" json:"F_Bytes_optional,omitempty"` 315 F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional" json:"F_Sint32_optional,omitempty"` 316 F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional" json:"F_Sint64_optional,omitempty"` 317 F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,def=1" json:"F_Bool_defaulted,omitempty"` 318 F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,def=32" json:"F_Int32_defaulted,omitempty"` 319 F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,def=64" json:"F_Int64_defaulted,omitempty"` 320 F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` 321 F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` 322 F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` 323 F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` 324 F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,def=314159" json:"F_Float_defaulted,omitempty"` 325 F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,def=271828" json:"F_Double_defaulted,omitempty"` 326 F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` 327 F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` 328 F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` 329 F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` 330 F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed" json:"F_Bool_repeated_packed,omitempty"` 331 F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed" json:"F_Int32_repeated_packed,omitempty"` 332 F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed" json:"F_Int64_repeated_packed,omitempty"` 333 F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed" json:"F_Fixed32_repeated_packed,omitempty"` 334 F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed" json:"F_Fixed64_repeated_packed,omitempty"` 335 F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed" json:"F_Uint32_repeated_packed,omitempty"` 336 F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed" json:"F_Uint64_repeated_packed,omitempty"` 337 F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed" json:"F_Float_repeated_packed,omitempty"` 338 F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed" json:"F_Double_repeated_packed,omitempty"` 339 F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed" json:"F_Sint32_repeated_packed,omitempty"` 340 F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed" json:"F_Sint64_repeated_packed,omitempty"` 341 Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup" json:"requiredgroup,omitempty"` 342 Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup" json:"repeatedgroup,omitempty"` 343 Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` 344 XXX_unrecognized []byte `json:"-"` 345 } 346 347 func (m *GoTest) Reset() { *m = GoTest{} } 348 func (m *GoTest) String() string { return proto.CompactTextString(m) } 349 func (*GoTest) ProtoMessage() {} 350 351 const Default_GoTest_F_BoolDefaulted bool = true 352 const Default_GoTest_F_Int32Defaulted int32 = 32 353 const Default_GoTest_F_Int64Defaulted int64 = 64 354 const Default_GoTest_F_Fixed32Defaulted uint32 = 320 355 const Default_GoTest_F_Fixed64Defaulted uint64 = 640 356 const Default_GoTest_F_Uint32Defaulted uint32 = 3200 357 const Default_GoTest_F_Uint64Defaulted uint64 = 6400 358 const Default_GoTest_F_FloatDefaulted float32 = 314159 359 const Default_GoTest_F_DoubleDefaulted float64 = 271828 360 const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" 361 362 var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") 363 364 const Default_GoTest_F_Sint32Defaulted int32 = -32 365 const Default_GoTest_F_Sint64Defaulted int64 = -64 366 367 func (m *GoTest) GetKind() GoTest_KIND { 368 if m != nil && m.Kind != nil { 369 return *m.Kind 370 } 371 return 0 372 } 373 374 func (m *GoTest) GetTable() string { 375 if m != nil && m.Table != nil { 376 return *m.Table 377 } 378 return "" 379 } 380 381 func (m *GoTest) GetParam() int32 { 382 if m != nil && m.Param != nil { 383 return *m.Param 384 } 385 return 0 386 } 387 388 func (m *GoTest) GetRequiredField() *GoTestField { 389 if m != nil { 390 return m.RequiredField 391 } 392 return nil 393 } 394 395 func (m *GoTest) GetRepeatedField() []*GoTestField { 396 if m != nil { 397 return m.RepeatedField 398 } 399 return nil 400 } 401 402 func (m *GoTest) GetOptionalField() *GoTestField { 403 if m != nil { 404 return m.OptionalField 405 } 406 return nil 407 } 408 409 func (m *GoTest) GetF_BoolRequired() bool { 410 if m != nil && m.F_BoolRequired != nil { 411 return *m.F_BoolRequired 412 } 413 return false 414 } 415 416 func (m *GoTest) GetF_Int32Required() int32 { 417 if m != nil && m.F_Int32Required != nil { 418 return *m.F_Int32Required 419 } 420 return 0 421 } 422 423 func (m *GoTest) GetF_Int64Required() int64 { 424 if m != nil && m.F_Int64Required != nil { 425 return *m.F_Int64Required 426 } 427 return 0 428 } 429 430 func (m *GoTest) GetF_Fixed32Required() uint32 { 431 if m != nil && m.F_Fixed32Required != nil { 432 return *m.F_Fixed32Required 433 } 434 return 0 435 } 436 437 func (m *GoTest) GetF_Fixed64Required() uint64 { 438 if m != nil && m.F_Fixed64Required != nil { 439 return *m.F_Fixed64Required 440 } 441 return 0 442 } 443 444 func (m *GoTest) GetF_Uint32Required() uint32 { 445 if m != nil && m.F_Uint32Required != nil { 446 return *m.F_Uint32Required 447 } 448 return 0 449 } 450 451 func (m *GoTest) GetF_Uint64Required() uint64 { 452 if m != nil && m.F_Uint64Required != nil { 453 return *m.F_Uint64Required 454 } 455 return 0 456 } 457 458 func (m *GoTest) GetF_FloatRequired() float32 { 459 if m != nil && m.F_FloatRequired != nil { 460 return *m.F_FloatRequired 461 } 462 return 0 463 } 464 465 func (m *GoTest) GetF_DoubleRequired() float64 { 466 if m != nil && m.F_DoubleRequired != nil { 467 return *m.F_DoubleRequired 468 } 469 return 0 470 } 471 472 func (m *GoTest) GetF_StringRequired() string { 473 if m != nil && m.F_StringRequired != nil { 474 return *m.F_StringRequired 475 } 476 return "" 477 } 478 479 func (m *GoTest) GetF_BytesRequired() []byte { 480 if m != nil { 481 return m.F_BytesRequired 482 } 483 return nil 484 } 485 486 func (m *GoTest) GetF_Sint32Required() int32 { 487 if m != nil && m.F_Sint32Required != nil { 488 return *m.F_Sint32Required 489 } 490 return 0 491 } 492 493 func (m *GoTest) GetF_Sint64Required() int64 { 494 if m != nil && m.F_Sint64Required != nil { 495 return *m.F_Sint64Required 496 } 497 return 0 498 } 499 500 func (m *GoTest) GetF_BoolRepeated() []bool { 501 if m != nil { 502 return m.F_BoolRepeated 503 } 504 return nil 505 } 506 507 func (m *GoTest) GetF_Int32Repeated() []int32 { 508 if m != nil { 509 return m.F_Int32Repeated 510 } 511 return nil 512 } 513 514 func (m *GoTest) GetF_Int64Repeated() []int64 { 515 if m != nil { 516 return m.F_Int64Repeated 517 } 518 return nil 519 } 520 521 func (m *GoTest) GetF_Fixed32Repeated() []uint32 { 522 if m != nil { 523 return m.F_Fixed32Repeated 524 } 525 return nil 526 } 527 528 func (m *GoTest) GetF_Fixed64Repeated() []uint64 { 529 if m != nil { 530 return m.F_Fixed64Repeated 531 } 532 return nil 533 } 534 535 func (m *GoTest) GetF_Uint32Repeated() []uint32 { 536 if m != nil { 537 return m.F_Uint32Repeated 538 } 539 return nil 540 } 541 542 func (m *GoTest) GetF_Uint64Repeated() []uint64 { 543 if m != nil { 544 return m.F_Uint64Repeated 545 } 546 return nil 547 } 548 549 func (m *GoTest) GetF_FloatRepeated() []float32 { 550 if m != nil { 551 return m.F_FloatRepeated 552 } 553 return nil 554 } 555 556 func (m *GoTest) GetF_DoubleRepeated() []float64 { 557 if m != nil { 558 return m.F_DoubleRepeated 559 } 560 return nil 561 } 562 563 func (m *GoTest) GetF_StringRepeated() []string { 564 if m != nil { 565 return m.F_StringRepeated 566 } 567 return nil 568 } 569 570 func (m *GoTest) GetF_BytesRepeated() [][]byte { 571 if m != nil { 572 return m.F_BytesRepeated 573 } 574 return nil 575 } 576 577 func (m *GoTest) GetF_Sint32Repeated() []int32 { 578 if m != nil { 579 return m.F_Sint32Repeated 580 } 581 return nil 582 } 583 584 func (m *GoTest) GetF_Sint64Repeated() []int64 { 585 if m != nil { 586 return m.F_Sint64Repeated 587 } 588 return nil 589 } 590 591 func (m *GoTest) GetF_BoolOptional() bool { 592 if m != nil && m.F_BoolOptional != nil { 593 return *m.F_BoolOptional 594 } 595 return false 596 } 597 598 func (m *GoTest) GetF_Int32Optional() int32 { 599 if m != nil && m.F_Int32Optional != nil { 600 return *m.F_Int32Optional 601 } 602 return 0 603 } 604 605 func (m *GoTest) GetF_Int64Optional() int64 { 606 if m != nil && m.F_Int64Optional != nil { 607 return *m.F_Int64Optional 608 } 609 return 0 610 } 611 612 func (m *GoTest) GetF_Fixed32Optional() uint32 { 613 if m != nil && m.F_Fixed32Optional != nil { 614 return *m.F_Fixed32Optional 615 } 616 return 0 617 } 618 619 func (m *GoTest) GetF_Fixed64Optional() uint64 { 620 if m != nil && m.F_Fixed64Optional != nil { 621 return *m.F_Fixed64Optional 622 } 623 return 0 624 } 625 626 func (m *GoTest) GetF_Uint32Optional() uint32 { 627 if m != nil && m.F_Uint32Optional != nil { 628 return *m.F_Uint32Optional 629 } 630 return 0 631 } 632 633 func (m *GoTest) GetF_Uint64Optional() uint64 { 634 if m != nil && m.F_Uint64Optional != nil { 635 return *m.F_Uint64Optional 636 } 637 return 0 638 } 639 640 func (m *GoTest) GetF_FloatOptional() float32 { 641 if m != nil && m.F_FloatOptional != nil { 642 return *m.F_FloatOptional 643 } 644 return 0 645 } 646 647 func (m *GoTest) GetF_DoubleOptional() float64 { 648 if m != nil && m.F_DoubleOptional != nil { 649 return *m.F_DoubleOptional 650 } 651 return 0 652 } 653 654 func (m *GoTest) GetF_StringOptional() string { 655 if m != nil && m.F_StringOptional != nil { 656 return *m.F_StringOptional 657 } 658 return "" 659 } 660 661 func (m *GoTest) GetF_BytesOptional() []byte { 662 if m != nil { 663 return m.F_BytesOptional 664 } 665 return nil 666 } 667 668 func (m *GoTest) GetF_Sint32Optional() int32 { 669 if m != nil && m.F_Sint32Optional != nil { 670 return *m.F_Sint32Optional 671 } 672 return 0 673 } 674 675 func (m *GoTest) GetF_Sint64Optional() int64 { 676 if m != nil && m.F_Sint64Optional != nil { 677 return *m.F_Sint64Optional 678 } 679 return 0 680 } 681 682 func (m *GoTest) GetF_BoolDefaulted() bool { 683 if m != nil && m.F_BoolDefaulted != nil { 684 return *m.F_BoolDefaulted 685 } 686 return Default_GoTest_F_BoolDefaulted 687 } 688 689 func (m *GoTest) GetF_Int32Defaulted() int32 { 690 if m != nil && m.F_Int32Defaulted != nil { 691 return *m.F_Int32Defaulted 692 } 693 return Default_GoTest_F_Int32Defaulted 694 } 695 696 func (m *GoTest) GetF_Int64Defaulted() int64 { 697 if m != nil && m.F_Int64Defaulted != nil { 698 return *m.F_Int64Defaulted 699 } 700 return Default_GoTest_F_Int64Defaulted 701 } 702 703 func (m *GoTest) GetF_Fixed32Defaulted() uint32 { 704 if m != nil && m.F_Fixed32Defaulted != nil { 705 return *m.F_Fixed32Defaulted 706 } 707 return Default_GoTest_F_Fixed32Defaulted 708 } 709 710 func (m *GoTest) GetF_Fixed64Defaulted() uint64 { 711 if m != nil && m.F_Fixed64Defaulted != nil { 712 return *m.F_Fixed64Defaulted 713 } 714 return Default_GoTest_F_Fixed64Defaulted 715 } 716 717 func (m *GoTest) GetF_Uint32Defaulted() uint32 { 718 if m != nil && m.F_Uint32Defaulted != nil { 719 return *m.F_Uint32Defaulted 720 } 721 return Default_GoTest_F_Uint32Defaulted 722 } 723 724 func (m *GoTest) GetF_Uint64Defaulted() uint64 { 725 if m != nil && m.F_Uint64Defaulted != nil { 726 return *m.F_Uint64Defaulted 727 } 728 return Default_GoTest_F_Uint64Defaulted 729 } 730 731 func (m *GoTest) GetF_FloatDefaulted() float32 { 732 if m != nil && m.F_FloatDefaulted != nil { 733 return *m.F_FloatDefaulted 734 } 735 return Default_GoTest_F_FloatDefaulted 736 } 737 738 func (m *GoTest) GetF_DoubleDefaulted() float64 { 739 if m != nil && m.F_DoubleDefaulted != nil { 740 return *m.F_DoubleDefaulted 741 } 742 return Default_GoTest_F_DoubleDefaulted 743 } 744 745 func (m *GoTest) GetF_StringDefaulted() string { 746 if m != nil && m.F_StringDefaulted != nil { 747 return *m.F_StringDefaulted 748 } 749 return Default_GoTest_F_StringDefaulted 750 } 751 752 func (m *GoTest) GetF_BytesDefaulted() []byte { 753 if m != nil && m.F_BytesDefaulted != nil { 754 return m.F_BytesDefaulted 755 } 756 return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) 757 } 758 759 func (m *GoTest) GetF_Sint32Defaulted() int32 { 760 if m != nil && m.F_Sint32Defaulted != nil { 761 return *m.F_Sint32Defaulted 762 } 763 return Default_GoTest_F_Sint32Defaulted 764 } 765 766 func (m *GoTest) GetF_Sint64Defaulted() int64 { 767 if m != nil && m.F_Sint64Defaulted != nil { 768 return *m.F_Sint64Defaulted 769 } 770 return Default_GoTest_F_Sint64Defaulted 771 } 772 773 func (m *GoTest) GetF_BoolRepeatedPacked() []bool { 774 if m != nil { 775 return m.F_BoolRepeatedPacked 776 } 777 return nil 778 } 779 780 func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { 781 if m != nil { 782 return m.F_Int32RepeatedPacked 783 } 784 return nil 785 } 786 787 func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { 788 if m != nil { 789 return m.F_Int64RepeatedPacked 790 } 791 return nil 792 } 793 794 func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { 795 if m != nil { 796 return m.F_Fixed32RepeatedPacked 797 } 798 return nil 799 } 800 801 func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { 802 if m != nil { 803 return m.F_Fixed64RepeatedPacked 804 } 805 return nil 806 } 807 808 func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { 809 if m != nil { 810 return m.F_Uint32RepeatedPacked 811 } 812 return nil 813 } 814 815 func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { 816 if m != nil { 817 return m.F_Uint64RepeatedPacked 818 } 819 return nil 820 } 821 822 func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { 823 if m != nil { 824 return m.F_FloatRepeatedPacked 825 } 826 return nil 827 } 828 829 func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { 830 if m != nil { 831 return m.F_DoubleRepeatedPacked 832 } 833 return nil 834 } 835 836 func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { 837 if m != nil { 838 return m.F_Sint32RepeatedPacked 839 } 840 return nil 841 } 842 843 func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { 844 if m != nil { 845 return m.F_Sint64RepeatedPacked 846 } 847 return nil 848 } 849 850 func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { 851 if m != nil { 852 return m.Requiredgroup 853 } 854 return nil 855 } 856 857 func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { 858 if m != nil { 859 return m.Repeatedgroup 860 } 861 return nil 862 } 863 864 func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { 865 if m != nil { 866 return m.Optionalgroup 867 } 868 return nil 869 } 870 871 type GoTest_RequiredGroup struct { 872 RequiredField *string `protobuf:"bytes,71,req" json:"RequiredField,omitempty"` 873 XXX_unrecognized []byte `json:"-"` 874 } 875 876 func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } 877 878 func (m *GoTest_RequiredGroup) GetRequiredField() string { 879 if m != nil && m.RequiredField != nil { 880 return *m.RequiredField 881 } 882 return "" 883 } 884 885 type GoTest_RepeatedGroup struct { 886 RequiredField *string `protobuf:"bytes,81,req" json:"RequiredField,omitempty"` 887 XXX_unrecognized []byte `json:"-"` 888 } 889 890 func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } 891 892 func (m *GoTest_RepeatedGroup) GetRequiredField() string { 893 if m != nil && m.RequiredField != nil { 894 return *m.RequiredField 895 } 896 return "" 897 } 898 899 type GoTest_OptionalGroup struct { 900 RequiredField *string `protobuf:"bytes,91,req" json:"RequiredField,omitempty"` 901 XXX_unrecognized []byte `json:"-"` 902 } 903 904 func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } 905 906 func (m *GoTest_OptionalGroup) GetRequiredField() string { 907 if m != nil && m.RequiredField != nil { 908 return *m.RequiredField 909 } 910 return "" 911 } 912 913 type GoSkipTest struct { 914 SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32" json:"skip_int32,omitempty"` 915 SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32" json:"skip_fixed32,omitempty"` 916 SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64" json:"skip_fixed64,omitempty"` 917 SkipString *string `protobuf:"bytes,14,req,name=skip_string" json:"skip_string,omitempty"` 918 Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup" json:"skipgroup,omitempty"` 919 XXX_unrecognized []byte `json:"-"` 920 } 921 922 func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } 923 func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } 924 func (*GoSkipTest) ProtoMessage() {} 925 926 func (m *GoSkipTest) GetSkipInt32() int32 { 927 if m != nil && m.SkipInt32 != nil { 928 return *m.SkipInt32 929 } 930 return 0 931 } 932 933 func (m *GoSkipTest) GetSkipFixed32() uint32 { 934 if m != nil && m.SkipFixed32 != nil { 935 return *m.SkipFixed32 936 } 937 return 0 938 } 939 940 func (m *GoSkipTest) GetSkipFixed64() uint64 { 941 if m != nil && m.SkipFixed64 != nil { 942 return *m.SkipFixed64 943 } 944 return 0 945 } 946 947 func (m *GoSkipTest) GetSkipString() string { 948 if m != nil && m.SkipString != nil { 949 return *m.SkipString 950 } 951 return "" 952 } 953 954 func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { 955 if m != nil { 956 return m.Skipgroup 957 } 958 return nil 959 } 960 961 type GoSkipTest_SkipGroup struct { 962 GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32" json:"group_int32,omitempty"` 963 GroupString *string `protobuf:"bytes,17,req,name=group_string" json:"group_string,omitempty"` 964 XXX_unrecognized []byte `json:"-"` 965 } 966 967 func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } 968 969 func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { 970 if m != nil && m.GroupInt32 != nil { 971 return *m.GroupInt32 972 } 973 return 0 974 } 975 976 func (m *GoSkipTest_SkipGroup) GetGroupString() string { 977 if m != nil && m.GroupString != nil { 978 return *m.GroupString 979 } 980 return "" 981 } 982 983 type NonPackedTest struct { 984 A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` 985 XXX_unrecognized []byte `json:"-"` 986 } 987 988 func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } 989 func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } 990 func (*NonPackedTest) ProtoMessage() {} 991 992 func (m *NonPackedTest) GetA() []int32 { 993 if m != nil { 994 return m.A 995 } 996 return nil 997 } 998 999 type PackedTest struct { 1000 B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` 1001 XXX_unrecognized []byte `json:"-"` 1002 } 1003 1004 func (m *PackedTest) Reset() { *m = PackedTest{} } 1005 func (m *PackedTest) String() string { return proto.CompactTextString(m) } 1006 func (*PackedTest) ProtoMessage() {} 1007 1008 func (m *PackedTest) GetB() []int32 { 1009 if m != nil { 1010 return m.B 1011 } 1012 return nil 1013 } 1014 1015 type MaxTag struct { 1016 LastField *string `protobuf:"bytes,536870911,opt,name=last_field" json:"last_field,omitempty"` 1017 XXX_unrecognized []byte `json:"-"` 1018 } 1019 1020 func (m *MaxTag) Reset() { *m = MaxTag{} } 1021 func (m *MaxTag) String() string { return proto.CompactTextString(m) } 1022 func (*MaxTag) ProtoMessage() {} 1023 1024 func (m *MaxTag) GetLastField() string { 1025 if m != nil && m.LastField != nil { 1026 return *m.LastField 1027 } 1028 return "" 1029 } 1030 1031 type OldMessage struct { 1032 Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` 1033 XXX_unrecognized []byte `json:"-"` 1034 } 1035 1036 func (m *OldMessage) Reset() { *m = OldMessage{} } 1037 func (m *OldMessage) String() string { return proto.CompactTextString(m) } 1038 func (*OldMessage) ProtoMessage() {} 1039 1040 func (m *OldMessage) GetNested() *OldMessage_Nested { 1041 if m != nil { 1042 return m.Nested 1043 } 1044 return nil 1045 } 1046 1047 type OldMessage_Nested struct { 1048 Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 1049 XXX_unrecognized []byte `json:"-"` 1050 } 1051 1052 func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } 1053 func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } 1054 func (*OldMessage_Nested) ProtoMessage() {} 1055 1056 func (m *OldMessage_Nested) GetName() string { 1057 if m != nil && m.Name != nil { 1058 return *m.Name 1059 } 1060 return "" 1061 } 1062 1063 type NewMessage struct { 1064 Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` 1065 XXX_unrecognized []byte `json:"-"` 1066 } 1067 1068 func (m *NewMessage) Reset() { *m = NewMessage{} } 1069 func (m *NewMessage) String() string { return proto.CompactTextString(m) } 1070 func (*NewMessage) ProtoMessage() {} 1071 1072 func (m *NewMessage) GetNested() *NewMessage_Nested { 1073 if m != nil { 1074 return m.Nested 1075 } 1076 return nil 1077 } 1078 1079 type NewMessage_Nested struct { 1080 Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 1081 FoodGroup *string `protobuf:"bytes,2,opt,name=food_group" json:"food_group,omitempty"` 1082 XXX_unrecognized []byte `json:"-"` 1083 } 1084 1085 func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } 1086 func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } 1087 func (*NewMessage_Nested) ProtoMessage() {} 1088 1089 func (m *NewMessage_Nested) GetName() string { 1090 if m != nil && m.Name != nil { 1091 return *m.Name 1092 } 1093 return "" 1094 } 1095 1096 func (m *NewMessage_Nested) GetFoodGroup() string { 1097 if m != nil && m.FoodGroup != nil { 1098 return *m.FoodGroup 1099 } 1100 return "" 1101 } 1102 1103 type InnerMessage struct { 1104 Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` 1105 Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` 1106 Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` 1107 XXX_unrecognized []byte `json:"-"` 1108 } 1109 1110 func (m *InnerMessage) Reset() { *m = InnerMessage{} } 1111 func (m *InnerMessage) String() string { return proto.CompactTextString(m) } 1112 func (*InnerMessage) ProtoMessage() {} 1113 1114 const Default_InnerMessage_Port int32 = 4000 1115 1116 func (m *InnerMessage) GetHost() string { 1117 if m != nil && m.Host != nil { 1118 return *m.Host 1119 } 1120 return "" 1121 } 1122 1123 func (m *InnerMessage) GetPort() int32 { 1124 if m != nil && m.Port != nil { 1125 return *m.Port 1126 } 1127 return Default_InnerMessage_Port 1128 } 1129 1130 func (m *InnerMessage) GetConnected() bool { 1131 if m != nil && m.Connected != nil { 1132 return *m.Connected 1133 } 1134 return false 1135 } 1136 1137 type OtherMessage struct { 1138 Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` 1139 Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` 1140 Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` 1141 Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` 1142 XXX_unrecognized []byte `json:"-"` 1143 } 1144 1145 func (m *OtherMessage) Reset() { *m = OtherMessage{} } 1146 func (m *OtherMessage) String() string { return proto.CompactTextString(m) } 1147 func (*OtherMessage) ProtoMessage() {} 1148 1149 func (m *OtherMessage) GetKey() int64 { 1150 if m != nil && m.Key != nil { 1151 return *m.Key 1152 } 1153 return 0 1154 } 1155 1156 func (m *OtherMessage) GetValue() []byte { 1157 if m != nil { 1158 return m.Value 1159 } 1160 return nil 1161 } 1162 1163 func (m *OtherMessage) GetWeight() float32 { 1164 if m != nil && m.Weight != nil { 1165 return *m.Weight 1166 } 1167 return 0 1168 } 1169 1170 func (m *OtherMessage) GetInner() *InnerMessage { 1171 if m != nil { 1172 return m.Inner 1173 } 1174 return nil 1175 } 1176 1177 type MyMessage struct { 1178 Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` 1179 Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` 1180 Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` 1181 Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` 1182 Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` 1183 Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` 1184 Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"` 1185 Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup" json:"somegroup,omitempty"` 1186 RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes" json:"rep_bytes,omitempty"` 1187 Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` 1188 XXX_extensions map[int32]proto.Extension `json:"-"` 1189 XXX_unrecognized []byte `json:"-"` 1190 } 1191 1192 func (m *MyMessage) Reset() { *m = MyMessage{} } 1193 func (m *MyMessage) String() string { return proto.CompactTextString(m) } 1194 func (*MyMessage) ProtoMessage() {} 1195 1196 var extRange_MyMessage = []proto.ExtensionRange{ 1197 {100, 536870911}, 1198 } 1199 1200 func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { 1201 return extRange_MyMessage 1202 } 1203 func (m *MyMessage) ExtensionMap() map[int32]proto.Extension { 1204 if m.XXX_extensions == nil { 1205 m.XXX_extensions = make(map[int32]proto.Extension) 1206 } 1207 return m.XXX_extensions 1208 } 1209 1210 func (m *MyMessage) GetCount() int32 { 1211 if m != nil && m.Count != nil { 1212 return *m.Count 1213 } 1214 return 0 1215 } 1216 1217 func (m *MyMessage) GetName() string { 1218 if m != nil && m.Name != nil { 1219 return *m.Name 1220 } 1221 return "" 1222 } 1223 1224 func (m *MyMessage) GetQuote() string { 1225 if m != nil && m.Quote != nil { 1226 return *m.Quote 1227 } 1228 return "" 1229 } 1230 1231 func (m *MyMessage) GetPet() []string { 1232 if m != nil { 1233 return m.Pet 1234 } 1235 return nil 1236 } 1237 1238 func (m *MyMessage) GetInner() *InnerMessage { 1239 if m != nil { 1240 return m.Inner 1241 } 1242 return nil 1243 } 1244 1245 func (m *MyMessage) GetOthers() []*OtherMessage { 1246 if m != nil { 1247 return m.Others 1248 } 1249 return nil 1250 } 1251 1252 func (m *MyMessage) GetBikeshed() MyMessage_Color { 1253 if m != nil && m.Bikeshed != nil { 1254 return *m.Bikeshed 1255 } 1256 return 0 1257 } 1258 1259 func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { 1260 if m != nil { 1261 return m.Somegroup 1262 } 1263 return nil 1264 } 1265 1266 func (m *MyMessage) GetRepBytes() [][]byte { 1267 if m != nil { 1268 return m.RepBytes 1269 } 1270 return nil 1271 } 1272 1273 func (m *MyMessage) GetBigfloat() float64 { 1274 if m != nil && m.Bigfloat != nil { 1275 return *m.Bigfloat 1276 } 1277 return 0 1278 } 1279 1280 type MyMessage_SomeGroup struct { 1281 GroupField *int32 `protobuf:"varint,9,opt,name=group_field" json:"group_field,omitempty"` 1282 XXX_unrecognized []byte `json:"-"` 1283 } 1284 1285 func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } 1286 1287 func (m *MyMessage_SomeGroup) GetGroupField() int32 { 1288 if m != nil && m.GroupField != nil { 1289 return *m.GroupField 1290 } 1291 return 0 1292 } 1293 1294 type Ext struct { 1295 Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` 1296 XXX_unrecognized []byte `json:"-"` 1297 } 1298 1299 func (m *Ext) Reset() { *m = Ext{} } 1300 func (m *Ext) String() string { return proto.CompactTextString(m) } 1301 func (*Ext) ProtoMessage() {} 1302 1303 func (m *Ext) GetData() string { 1304 if m != nil && m.Data != nil { 1305 return *m.Data 1306 } 1307 return "" 1308 } 1309 1310 var E_Ext_More = &proto.ExtensionDesc{ 1311 ExtendedType: (*MyMessage)(nil), 1312 ExtensionType: (*Ext)(nil), 1313 Field: 103, 1314 Name: "testdata.Ext.more", 1315 Tag: "bytes,103,opt,name=more", 1316 } 1317 1318 var E_Ext_Text = &proto.ExtensionDesc{ 1319 ExtendedType: (*MyMessage)(nil), 1320 ExtensionType: (*string)(nil), 1321 Field: 104, 1322 Name: "testdata.Ext.text", 1323 Tag: "bytes,104,opt,name=text", 1324 } 1325 1326 var E_Ext_Number = &proto.ExtensionDesc{ 1327 ExtendedType: (*MyMessage)(nil), 1328 ExtensionType: (*int32)(nil), 1329 Field: 105, 1330 Name: "testdata.Ext.number", 1331 Tag: "varint,105,opt,name=number", 1332 } 1333 1334 type MessageList struct { 1335 Message []*MessageList_Message `protobuf:"group,1,rep" json:"message,omitempty"` 1336 XXX_unrecognized []byte `json:"-"` 1337 } 1338 1339 func (m *MessageList) Reset() { *m = MessageList{} } 1340 func (m *MessageList) String() string { return proto.CompactTextString(m) } 1341 func (*MessageList) ProtoMessage() {} 1342 1343 func (m *MessageList) GetMessage() []*MessageList_Message { 1344 if m != nil { 1345 return m.Message 1346 } 1347 return nil 1348 } 1349 1350 type MessageList_Message struct { 1351 Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` 1352 Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` 1353 XXX_unrecognized []byte `json:"-"` 1354 } 1355 1356 func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } 1357 1358 func (m *MessageList_Message) GetName() string { 1359 if m != nil && m.Name != nil { 1360 return *m.Name 1361 } 1362 return "" 1363 } 1364 1365 func (m *MessageList_Message) GetCount() int32 { 1366 if m != nil && m.Count != nil { 1367 return *m.Count 1368 } 1369 return 0 1370 } 1371 1372 type Strings struct { 1373 StringField *string `protobuf:"bytes,1,opt,name=string_field" json:"string_field,omitempty"` 1374 BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field" json:"bytes_field,omitempty"` 1375 XXX_unrecognized []byte `json:"-"` 1376 } 1377 1378 func (m *Strings) Reset() { *m = Strings{} } 1379 func (m *Strings) String() string { return proto.CompactTextString(m) } 1380 func (*Strings) ProtoMessage() {} 1381 1382 func (m *Strings) GetStringField() string { 1383 if m != nil && m.StringField != nil { 1384 return *m.StringField 1385 } 1386 return "" 1387 } 1388 1389 func (m *Strings) GetBytesField() []byte { 1390 if m != nil { 1391 return m.BytesField 1392 } 1393 return nil 1394 } 1395 1396 type Defaults struct { 1397 F_Bool *bool `protobuf:"varint,1,opt,def=1" json:"F_Bool,omitempty"` 1398 F_Int32 *int32 `protobuf:"varint,2,opt,def=32" json:"F_Int32,omitempty"` 1399 F_Int64 *int64 `protobuf:"varint,3,opt,def=64" json:"F_Int64,omitempty"` 1400 F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,def=320" json:"F_Fixed32,omitempty"` 1401 F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,def=640" json:"F_Fixed64,omitempty"` 1402 F_Uint32 *uint32 `protobuf:"varint,6,opt,def=3200" json:"F_Uint32,omitempty"` 1403 F_Uint64 *uint64 `protobuf:"varint,7,opt,def=6400" json:"F_Uint64,omitempty"` 1404 F_Float *float32 `protobuf:"fixed32,8,opt,def=314159" json:"F_Float,omitempty"` 1405 F_Double *float64 `protobuf:"fixed64,9,opt,def=271828" json:"F_Double,omitempty"` 1406 F_String *string `protobuf:"bytes,10,opt,def=hello, \"world!\"\n" json:"F_String,omitempty"` 1407 F_Bytes []byte `protobuf:"bytes,11,opt,def=Bignose" json:"F_Bytes,omitempty"` 1408 F_Sint32 *int32 `protobuf:"zigzag32,12,opt,def=-32" json:"F_Sint32,omitempty"` 1409 F_Sint64 *int64 `protobuf:"zigzag64,13,opt,def=-64" json:"F_Sint64,omitempty"` 1410 F_Enum *Defaults_Color `protobuf:"varint,14,opt,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"` 1411 F_Pinf *float32 `protobuf:"fixed32,15,opt,def=inf" json:"F_Pinf,omitempty"` 1412 F_Ninf *float32 `protobuf:"fixed32,16,opt,def=-inf" json:"F_Ninf,omitempty"` 1413 F_Nan *float32 `protobuf:"fixed32,17,opt,def=nan" json:"F_Nan,omitempty"` 1414 Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` 1415 XXX_unrecognized []byte `json:"-"` 1416 } 1417 1418 func (m *Defaults) Reset() { *m = Defaults{} } 1419 func (m *Defaults) String() string { return proto.CompactTextString(m) } 1420 func (*Defaults) ProtoMessage() {} 1421 1422 const Default_Defaults_F_Bool bool = true 1423 const Default_Defaults_F_Int32 int32 = 32 1424 const Default_Defaults_F_Int64 int64 = 64 1425 const Default_Defaults_F_Fixed32 uint32 = 320 1426 const Default_Defaults_F_Fixed64 uint64 = 640 1427 const Default_Defaults_F_Uint32 uint32 = 3200 1428 const Default_Defaults_F_Uint64 uint64 = 6400 1429 const Default_Defaults_F_Float float32 = 314159 1430 const Default_Defaults_F_Double float64 = 271828 1431 const Default_Defaults_F_String string = "hello, \"world!\"\n" 1432 1433 var Default_Defaults_F_Bytes []byte = []byte("Bignose") 1434 1435 const Default_Defaults_F_Sint32 int32 = -32 1436 const Default_Defaults_F_Sint64 int64 = -64 1437 const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN 1438 1439 var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) 1440 var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) 1441 var Default_Defaults_F_Nan float32 = float32(math.NaN()) 1442 1443 func (m *Defaults) GetF_Bool() bool { 1444 if m != nil && m.F_Bool != nil { 1445 return *m.F_Bool 1446 } 1447 return Default_Defaults_F_Bool 1448 } 1449 1450 func (m *Defaults) GetF_Int32() int32 { 1451 if m != nil && m.F_Int32 != nil { 1452 return *m.F_Int32 1453 } 1454 return Default_Defaults_F_Int32 1455 } 1456 1457 func (m *Defaults) GetF_Int64() int64 { 1458 if m != nil && m.F_Int64 != nil { 1459 return *m.F_Int64 1460 } 1461 return Default_Defaults_F_Int64 1462 } 1463 1464 func (m *Defaults) GetF_Fixed32() uint32 { 1465 if m != nil && m.F_Fixed32 != nil { 1466 return *m.F_Fixed32 1467 } 1468 return Default_Defaults_F_Fixed32 1469 } 1470 1471 func (m *Defaults) GetF_Fixed64() uint64 { 1472 if m != nil && m.F_Fixed64 != nil { 1473 return *m.F_Fixed64 1474 } 1475 return Default_Defaults_F_Fixed64 1476 } 1477 1478 func (m *Defaults) GetF_Uint32() uint32 { 1479 if m != nil && m.F_Uint32 != nil { 1480 return *m.F_Uint32 1481 } 1482 return Default_Defaults_F_Uint32 1483 } 1484 1485 func (m *Defaults) GetF_Uint64() uint64 { 1486 if m != nil && m.F_Uint64 != nil { 1487 return *m.F_Uint64 1488 } 1489 return Default_Defaults_F_Uint64 1490 } 1491 1492 func (m *Defaults) GetF_Float() float32 { 1493 if m != nil && m.F_Float != nil { 1494 return *m.F_Float 1495 } 1496 return Default_Defaults_F_Float 1497 } 1498 1499 func (m *Defaults) GetF_Double() float64 { 1500 if m != nil && m.F_Double != nil { 1501 return *m.F_Double 1502 } 1503 return Default_Defaults_F_Double 1504 } 1505 1506 func (m *Defaults) GetF_String() string { 1507 if m != nil && m.F_String != nil { 1508 return *m.F_String 1509 } 1510 return Default_Defaults_F_String 1511 } 1512 1513 func (m *Defaults) GetF_Bytes() []byte { 1514 if m != nil && m.F_Bytes != nil { 1515 return m.F_Bytes 1516 } 1517 return append([]byte(nil), Default_Defaults_F_Bytes...) 1518 } 1519 1520 func (m *Defaults) GetF_Sint32() int32 { 1521 if m != nil && m.F_Sint32 != nil { 1522 return *m.F_Sint32 1523 } 1524 return Default_Defaults_F_Sint32 1525 } 1526 1527 func (m *Defaults) GetF_Sint64() int64 { 1528 if m != nil && m.F_Sint64 != nil { 1529 return *m.F_Sint64 1530 } 1531 return Default_Defaults_F_Sint64 1532 } 1533 1534 func (m *Defaults) GetF_Enum() Defaults_Color { 1535 if m != nil && m.F_Enum != nil { 1536 return *m.F_Enum 1537 } 1538 return Default_Defaults_F_Enum 1539 } 1540 1541 func (m *Defaults) GetF_Pinf() float32 { 1542 if m != nil && m.F_Pinf != nil { 1543 return *m.F_Pinf 1544 } 1545 return Default_Defaults_F_Pinf 1546 } 1547 1548 func (m *Defaults) GetF_Ninf() float32 { 1549 if m != nil && m.F_Ninf != nil { 1550 return *m.F_Ninf 1551 } 1552 return Default_Defaults_F_Ninf 1553 } 1554 1555 func (m *Defaults) GetF_Nan() float32 { 1556 if m != nil && m.F_Nan != nil { 1557 return *m.F_Nan 1558 } 1559 return Default_Defaults_F_Nan 1560 } 1561 1562 func (m *Defaults) GetSub() *SubDefaults { 1563 if m != nil { 1564 return m.Sub 1565 } 1566 return nil 1567 } 1568 1569 type SubDefaults struct { 1570 N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` 1571 XXX_unrecognized []byte `json:"-"` 1572 } 1573 1574 func (m *SubDefaults) Reset() { *m = SubDefaults{} } 1575 func (m *SubDefaults) String() string { return proto.CompactTextString(m) } 1576 func (*SubDefaults) ProtoMessage() {} 1577 1578 const Default_SubDefaults_N int64 = 7 1579 1580 func (m *SubDefaults) GetN() int64 { 1581 if m != nil && m.N != nil { 1582 return *m.N 1583 } 1584 return Default_SubDefaults_N 1585 } 1586 1587 type RepeatedEnum struct { 1588 Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"` 1589 XXX_unrecognized []byte `json:"-"` 1590 } 1591 1592 func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } 1593 func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } 1594 func (*RepeatedEnum) ProtoMessage() {} 1595 1596 func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { 1597 if m != nil { 1598 return m.Color 1599 } 1600 return nil 1601 } 1602 1603 type MoreRepeated struct { 1604 Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` 1605 BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed" json:"bools_packed,omitempty"` 1606 Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` 1607 IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed" json:"ints_packed,omitempty"` 1608 Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` 1609 XXX_unrecognized []byte `json:"-"` 1610 } 1611 1612 func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } 1613 func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } 1614 func (*MoreRepeated) ProtoMessage() {} 1615 1616 func (m *MoreRepeated) GetBools() []bool { 1617 if m != nil { 1618 return m.Bools 1619 } 1620 return nil 1621 } 1622 1623 func (m *MoreRepeated) GetBoolsPacked() []bool { 1624 if m != nil { 1625 return m.BoolsPacked 1626 } 1627 return nil 1628 } 1629 1630 func (m *MoreRepeated) GetInts() []int32 { 1631 if m != nil { 1632 return m.Ints 1633 } 1634 return nil 1635 } 1636 1637 func (m *MoreRepeated) GetIntsPacked() []int32 { 1638 if m != nil { 1639 return m.IntsPacked 1640 } 1641 return nil 1642 } 1643 1644 func (m *MoreRepeated) GetStrings() []string { 1645 if m != nil { 1646 return m.Strings 1647 } 1648 return nil 1649 } 1650 1651 type GroupOld struct { 1652 G *GroupOld_G `protobuf:"group,1,opt" json:"g,omitempty"` 1653 XXX_unrecognized []byte `json:"-"` 1654 } 1655 1656 func (m *GroupOld) Reset() { *m = GroupOld{} } 1657 func (m *GroupOld) String() string { return proto.CompactTextString(m) } 1658 func (*GroupOld) ProtoMessage() {} 1659 1660 func (m *GroupOld) GetG() *GroupOld_G { 1661 if m != nil { 1662 return m.G 1663 } 1664 return nil 1665 } 1666 1667 type GroupOld_G struct { 1668 X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` 1669 XXX_unrecognized []byte `json:"-"` 1670 } 1671 1672 func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } 1673 1674 func (m *GroupOld_G) GetX() int32 { 1675 if m != nil && m.X != nil { 1676 return *m.X 1677 } 1678 return 0 1679 } 1680 1681 type GroupNew struct { 1682 G *GroupNew_G `protobuf:"group,1,opt" json:"g,omitempty"` 1683 XXX_unrecognized []byte `json:"-"` 1684 } 1685 1686 func (m *GroupNew) Reset() { *m = GroupNew{} } 1687 func (m *GroupNew) String() string { return proto.CompactTextString(m) } 1688 func (*GroupNew) ProtoMessage() {} 1689 1690 func (m *GroupNew) GetG() *GroupNew_G { 1691 if m != nil { 1692 return m.G 1693 } 1694 return nil 1695 } 1696 1697 type GroupNew_G struct { 1698 X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` 1699 Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` 1700 XXX_unrecognized []byte `json:"-"` 1701 } 1702 1703 func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } 1704 1705 func (m *GroupNew_G) GetX() int32 { 1706 if m != nil && m.X != nil { 1707 return *m.X 1708 } 1709 return 0 1710 } 1711 1712 func (m *GroupNew_G) GetY() int32 { 1713 if m != nil && m.Y != nil { 1714 return *m.Y 1715 } 1716 return 0 1717 } 1718 1719 var E_Greeting = &proto.ExtensionDesc{ 1720 ExtendedType: (*MyMessage)(nil), 1721 ExtensionType: ([]string)(nil), 1722 Field: 106, 1723 Name: "testdata.greeting", 1724 Tag: "bytes,106,rep,name=greeting", 1725 } 1726 1727 func init() { 1728 proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value) 1729 proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) 1730 proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) 1731 proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value) 1732 proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) 1733 proto.RegisterExtension(E_Ext_More) 1734 proto.RegisterExtension(E_Ext_Text) 1735 proto.RegisterExtension(E_Ext_Number) 1736 proto.RegisterExtension(E_Greeting) 1737 }