spec/proto/test.pb.rb in protobuf-1.4.2 vs spec/proto/test.pb.rb in protobuf-2.0.0.rc1
- old
+ new
@@ -1,31 +1,54 @@
-### Generated by rprotoc. DO NOT EDIT!
-require 'protobuf/message/message'
-require 'protobuf/message/enum'
-require 'protobuf/message/extend'
+##
+# This file is auto-generated. DO NOT EDIT!
+#
+require 'protobuf/message'
+require 'protobuf/rpc/service'
module Spec
module Proto
- class StatusType < ::Protobuf::Enum
- define :PENDING, 0
- define :ENABLED, 1
- define :DISABLED, 2
- define :DELETED, 3
- end
- class ResourceFindRequest < ::Protobuf::Message
- required :string, :name, 1
- optional :bool, :active, 2
- end
- class Resource < ::Protobuf::Message
- required :string, :name, 1
- optional :int64, :date_created, 2
- optional :StatusType, :status, 3
- repeated :StatusType, :repeated_enum, 4
- end
- class Nested < ::Protobuf::Message
- optional :string, :name, 1
- optional :Resource, :resource, 2
- repeated :Resource, :multiple_resources, 3
- optional :StatusType, :status, 4
+ ##
+ # Enum Classes
+ #
+ class StatusType < ::Protobuf::Enum; end
+
+ ##
+ # Message Classes
+ #
+ class ResourceFindRequest < ::Protobuf::Message; end
+ class Resource < ::Protobuf::Message; end
+ class Nested < ::Protobuf::Message; end
+
+ ##
+ # Enum Values
+ #
+ ::Spec::Proto::StatusType.define :PENDING, 0
+ ::Spec::Proto::StatusType.define :ENABLED, 1
+ ::Spec::Proto::StatusType.define :DISABLED, 2
+ ::Spec::Proto::StatusType.define :DELETED, 3
+
+
+ ##
+ # Message Fields
+ #
+ ::Spec::Proto::ResourceFindRequest.required(::Protobuf::Field::StringField, :name, 1)
+ ::Spec::Proto::ResourceFindRequest.optional(::Protobuf::Field::BoolField, :active, 2)
+
+ ::Spec::Proto::Resource.required(::Protobuf::Field::StringField, :name, 1)
+ ::Spec::Proto::Resource.optional(::Protobuf::Field::Int64Field, :date_created, 2)
+ ::Spec::Proto::Resource.optional(::Spec::Proto::StatusType, :status, 3)
+ ::Spec::Proto::Resource.repeated(::Spec::Proto::StatusType, :repeated_enum, 4)
+
+ ::Spec::Proto::Nested.optional(::Protobuf::Field::StringField, :name, 1)
+ ::Spec::Proto::Nested.optional(::Spec::Proto::Resource, :resource, 2)
+ ::Spec::Proto::Nested.repeated(::Spec::Proto::Resource, :multiple_resources, 3)
+ ::Spec::Proto::Nested.optional(::Spec::Proto::StatusType, :status, 4)
+
+
+ ##
+ # Services
+ #
+ class TestService < ::Protobuf::Rpc::Service
+ rpc :find, ::Spec::Proto::ResourceFindRequest, ::Spec::Proto::Resource
end
end
end