-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathresource.pb.rb
More file actions
172 lines (136 loc) · 4.6 KB
/
resource.pb.rb
File metadata and controls
172 lines (136 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# encoding: utf-8
##
# This file is auto-generated. DO NOT EDIT!
#
require 'protobuf'
require 'protobuf/rpc/service'
##
# Imports
#
require 'google/protobuf/descriptor.pb'
module Test
::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions }
##
# Enum Classes
#
class StatusType < ::Protobuf::Enum
set_option :allow_alias, true
set_option :".test.enum_option", -789
define :PENDING, 0
define :ENABLED, 1
define :DISABLED, 2
define :DELETED, 3
define :ALIASED, 3
end
##
# Message Classes
#
class ResourceFindRequest < ::Protobuf::Message; end
class ResourceSleepRequest < ::Protobuf::Message; end
class Resource < ::Protobuf::Message; end
class ResourceWithRequiredField < ::Protobuf::Message; end
class Searchable < ::Protobuf::Message
class SearchType < ::Protobuf::Enum
define :FLAT, 1
define :NESTED, 2
end
end
class MessageParent < ::Protobuf::Message
class MessageChild < ::Protobuf::Message; end
end
class Nested < ::Protobuf::Message
class NestedLevelOne < ::Protobuf::Message; end
end
##
# File Options
#
set_option :cc_generic_services, true
set_option :".test.file_option", 9876543210
##
# Message Fields
#
class ResourceFindRequest
required :string, :name, 1
optional :bool, :active, 2
repeated :string, :widgets, 3
repeated :bytes, :widget_bytes, 4
optional :bytes, :single_bytes, 5
end
class ResourceSleepRequest
optional :int32, :sleep, 1
end
class Resource
# Message Options
set_option :map_entry, false
set_option :".test.message_option", -56
required :string, :name, 1, :ctype => ::Google::Protobuf::FieldOptions::CType::CORD, :".test.field_option" => 8765432109
optional :int64, :date_created, 2
optional ::Test::StatusType, :status, 3
repeated ::Test::StatusType, :repeated_enum, 4
# Extension Fields
extensions 100...536870912
optional :bool, :".test.Searchable.ext_is_searchable", 100, :extension => true
optional :bool, :".test.Searchable.ext_is_hidden", 101, :extension => true
optional ::Test::Searchable::SearchType, :".test.Searchable.ext_search_type", 102, :default => ::Test::Searchable::SearchType::FLAT, :extension => true
optional :bool, :".test.Nested.NestedLevelOne.ext_nested_in_level_one", 105, :extension => true
optional :bool, :".test.Nested.NestedLevelOne.ext_dup_field", 106, :extension => true
end
class ResourceWithRequiredField
required :string, :foo_is_required, 1
end
class MessageParent
class MessageChild
optional :string, :child1, 1
end
end
class Nested
class NestedLevelOne
optional :bool, :level_one, 1, :default => true
# Extension Fields
extensions 100...102
optional :bool, :".test.ext_nested_level_one_outer", 101, :extension => true
optional :bool, :".test.Nested.ext_nested_level_one", 100, :extension => true
end
optional :string, :name, 1
optional ::Test::Resource, :resource, 2
repeated ::Test::Resource, :multiple_resources, 3
optional ::Test::StatusType, :status, 4
# Extension Fields
extensions 100...111
optional :string, :".test.foo", 100, :extension => true
optional :int64, :".test.bar", 101, :extension => true
end
##
# Extended Message Fields
#
class ::Google::Protobuf::FileOptions < ::Protobuf::Message
optional :uint64, :".test.file_option", 9585869, :extension => true
end
class ::Google::Protobuf::FieldOptions < ::Protobuf::Message
optional :uint64, :".test.field_option", 858769, :extension => true
end
class ::Google::Protobuf::EnumOptions < ::Protobuf::Message
optional :int64, :".test.enum_option", 590284, :extension => true
end
class ::Google::Protobuf::MessageOptions < ::Protobuf::Message
optional :int64, :".test.message_option", 485969, :extension => true
end
class ::Google::Protobuf::ServiceOptions < ::Protobuf::Message
optional :int64, :".test.service_option", 5869607, :extension => true
end
class ::Google::Protobuf::MethodOptions < ::Protobuf::Message
optional :int64, :".test.method_option", 7893233, :extension => true
end
##
# Service Classes
#
class ResourceService < ::Protobuf::Rpc::Service
set_option :".test.service_option", -9876543210
rpc :find, ::Test::ResourceFindRequest, ::Test::Resource do
set_option :".test.method_option", 2
end
rpc :find_with_rpc_failed, ::Test::ResourceFindRequest, ::Test::Resource
rpc :find_with_sleep, ::Test::ResourceSleepRequest, ::Test::Resource
rpc :find_not_implemented, ::Test::ResourceFindRequest, ::Test::Resource
end
end