Advertisement
Guest User

Untitled

a guest
Sep 11th, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. ### Generated by rprotoc. DO NOT EDIT!
  2. ### <proto file: person.proto>
  3. # message Person {
  4. # required int32 id = 1;
  5. # required string name = 2;
  6. # optional string email = 3;
  7. #
  8. # extensions 10 to max;
  9. # }
  10. #
  11. # message Phone {
  12. # extend Person {
  13. # repeated Phone phones = 10;
  14. # }
  15. # enum PHONE_TYPE {
  16. # MOBILE = 1;
  17. # HOME = 2;
  18. # }
  19. # optional string num = 1;
  20. # optional PHONE_TYPE type = 2;
  21. # }
  22. require 'protobuf/message/message'
  23. require 'protobuf/message/enum'
  24. require 'protobuf/message/service'
  25. require 'protobuf/message/extend'
  26.  
  27. class Person < ::Protobuf::Message
  28. defined_in __FILE__
  29. required :int32, :id, 1
  30. required :string, :name, 2
  31. optional :string, :email, 3
  32. extensions 10..::Protobuf::Extend::MAX
  33. end
  34. class Phone < ::Protobuf::Message
  35. defined_in __FILE__
  36. class Person < ::Protobuf::Message
  37. defined_in __FILE__
  38. repeated :Phone, :phones, 10
  39. end
  40. class PHONE_TYPE < ::Protobuf::Enum
  41. defined_in __FILE__
  42. MOBILE = value(:MOBILE, 1)
  43. HOME = value(:HOME, 2)
  44. end
  45. optional :string, :num, 1
  46. optional :PHONE_TYPE, :type, 2
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement