Sha256: 17ac59cbf3fc1ba251e61e0095c7c5b446dd14b9fce41ca1e34e87151b25e830
Contents?: true
Size: 1.2 KB
Versions: 116
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/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
116 entries across 116 versions & 1 rubygems