Sha256: 57391967893ec019ad1af1a3981636705ce5dbb3659a750d5165000337b8f920
Contents?: true
Size: 1.2 KB
Versions: 12
Compression:
Stored size: 1.2 KB
Contents
### Generated by rprotoc. DO NOT EDIT! ### <proto file: examples/addressbook.proto> # package tutorial; # # message Person { # required string name = 1; # required int32 id = 2; # optional string email = 3; # # enum PhoneType { # MOBILE = 0; # HOME = 1; # WORK = 2; # } # # message PhoneNumber { # required string number = 1; # optional PhoneType type = 2 [default = HOME]; # } # # repeated PhoneNumber phone = 4; # } # # message AddressBook { # repeated Person person = 1; # } require 'protobuf/message/message' require 'protobuf/message/enum' require 'protobuf/message/extend' module Tutorial class Person < ::Protobuf::Message defined_in __FILE__ required :string, :name, 1 required :int32, :id, 2 optional :string, :email, 3 class PhoneType < ::Protobuf::Enum defined_in __FILE__ MOBILE = 0 HOME = 1 WORK = 2 end class PhoneNumber < ::Protobuf::Message defined_in __FILE__ required :string, :number, 1 optional :PhoneType, :type, 2, :default => :HOME end repeated :PhoneNumber, :phone, 4 end class AddressBook < ::Protobuf::Message defined_in __FILE__ repeated :Person, :person, 1 end end
Version data entries
12 entries across 12 versions & 1 rubygems