/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/common/wire_protocol.pb.cc
Line | Count | Source (jump to first uncovered line) |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: yb/common/wire_protocol.proto |
3 | | |
4 | | #include "yb/common/wire_protocol.pb.h" |
5 | | |
6 | | #include <algorithm> |
7 | | |
8 | | #include <google/protobuf/stubs/common.h> |
9 | | #include <google/protobuf/stubs/port.h> |
10 | | #include <google/protobuf/stubs/once.h> |
11 | | #include <google/protobuf/io/coded_stream.h> |
12 | | #include <google/protobuf/wire_format_lite_inl.h> |
13 | | #include <google/protobuf/descriptor.h> |
14 | | #include <google/protobuf/generated_message_reflection.h> |
15 | | #include <google/protobuf/reflection_ops.h> |
16 | | #include <google/protobuf/wire_format.h> |
17 | | // This is a temporary google only hack |
18 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
19 | | #include "third_party/protobuf/version.h" |
20 | | #endif |
21 | | #include "yb/util/protobuf-annotations.h" |
22 | | // @@protoc_insertion_point(includes) |
23 | | namespace yb { |
24 | | class AppStatusPBDefaultTypeInternal { |
25 | | public: |
26 | | ::google::protobuf::internal::ExplicitlyConstructed<AppStatusPB> |
27 | | _instance; |
28 | | ::google::protobuf::int32 posix_code_; |
29 | | ::google::protobuf::int64 ql_error_code_; |
30 | | } _AppStatusPB_default_instance_; |
31 | | class NodeInstancePBDefaultTypeInternal { |
32 | | public: |
33 | | ::google::protobuf::internal::ExplicitlyConstructed<NodeInstancePB> |
34 | | _instance; |
35 | | } _NodeInstancePB_default_instance_; |
36 | | class ServerRegistrationPBDefaultTypeInternal { |
37 | | public: |
38 | | ::google::protobuf::internal::ExplicitlyConstructed<ServerRegistrationPB> |
39 | | _instance; |
40 | | } _ServerRegistrationPB_default_instance_; |
41 | | class ServerEntryPBDefaultTypeInternal { |
42 | | public: |
43 | | ::google::protobuf::internal::ExplicitlyConstructed<ServerEntryPB> |
44 | | _instance; |
45 | | } _ServerEntryPB_default_instance_; |
46 | | } // namespace yb |
47 | | namespace protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto { |
48 | 17.1k | void InitDefaultsAppStatusPBImpl() { |
49 | 17.1k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
50 | | |
51 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
52 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
53 | | #else |
54 | 17.1k | ::google::protobuf::internal::InitProtobufDefaults(); |
55 | 17.1k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
56 | 17.1k | { |
57 | 17.1k | void* ptr = &::yb::_AppStatusPB_default_instance_; |
58 | 17.1k | new (ptr) ::yb::AppStatusPB(); |
59 | 17.1k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
60 | 17.1k | } |
61 | 17.1k | ::yb::AppStatusPB::InitAsDefaultInstance(); |
62 | 17.1k | } |
63 | | |
64 | 2.11M | void InitDefaultsAppStatusPB() { |
65 | 2.11M | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
66 | 2.11M | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsAppStatusPBImpl); |
67 | 2.11M | } |
68 | | |
69 | 17.1k | void InitDefaultsNodeInstancePBImpl() { |
70 | 17.1k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
71 | | |
72 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
73 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
74 | | #else |
75 | 17.1k | ::google::protobuf::internal::InitProtobufDefaults(); |
76 | 17.1k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
77 | 17.1k | { |
78 | 17.1k | void* ptr = &::yb::_NodeInstancePB_default_instance_; |
79 | 17.1k | new (ptr) ::yb::NodeInstancePB(); |
80 | 17.1k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
81 | 17.1k | } |
82 | 17.1k | ::yb::NodeInstancePB::InitAsDefaultInstance(); |
83 | 17.1k | } |
84 | | |
85 | 14.2M | void InitDefaultsNodeInstancePB() { |
86 | 14.2M | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
87 | 14.2M | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsNodeInstancePBImpl); |
88 | 14.2M | } |
89 | | |
90 | 17.1k | void InitDefaultsServerRegistrationPBImpl() { |
91 | 17.1k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
92 | | |
93 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
94 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
95 | | #else |
96 | 17.1k | ::google::protobuf::internal::InitProtobufDefaults(); |
97 | 17.1k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
98 | 17.1k | protobuf_yb_2fcommon_2fcommon_5fnet_2eproto::InitDefaultsHostPortPB(); |
99 | 17.1k | protobuf_yb_2fcommon_2fcommon_5fnet_2eproto::InitDefaultsCloudInfoPB(); |
100 | 17.1k | { |
101 | 17.1k | void* ptr = &::yb::_ServerRegistrationPB_default_instance_; |
102 | 17.1k | new (ptr) ::yb::ServerRegistrationPB(); |
103 | 17.1k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
104 | 17.1k | } |
105 | 17.1k | ::yb::ServerRegistrationPB::InitAsDefaultInstance(); |
106 | 17.1k | } |
107 | | |
108 | 11.8M | void InitDefaultsServerRegistrationPB() { |
109 | 11.8M | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
110 | 11.8M | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsServerRegistrationPBImpl); |
111 | 11.8M | } |
112 | | |
113 | 17.1k | void InitDefaultsServerEntryPBImpl() { |
114 | 17.1k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
115 | | |
116 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
117 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
118 | | #else |
119 | 17.1k | ::google::protobuf::internal::InitProtobufDefaults(); |
120 | 17.1k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
121 | 17.1k | protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsAppStatusPB(); |
122 | 17.1k | protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsNodeInstancePB(); |
123 | 17.1k | protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsServerRegistrationPB(); |
124 | 17.1k | { |
125 | 17.1k | void* ptr = &::yb::_ServerEntryPB_default_instance_; |
126 | 17.1k | new (ptr) ::yb::ServerEntryPB(); |
127 | 17.1k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
128 | 17.1k | } |
129 | 17.1k | ::yb::ServerEntryPB::InitAsDefaultInstance(); |
130 | 17.1k | } |
131 | | |
132 | 1.34M | void InitDefaultsServerEntryPB() { |
133 | 1.34M | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
134 | 1.34M | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsServerEntryPBImpl); |
135 | 1.34M | } |
136 | | |
137 | | ::google::protobuf::Metadata file_level_metadata[4]; |
138 | | const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; |
139 | | |
140 | | const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
141 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::AppStatusPB, _has_bits_), |
142 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::AppStatusPB, _internal_metadata_), |
143 | | ~0u, // no _extensions_ |
144 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::AppStatusPB, _oneof_case_[0]), |
145 | | ~0u, // no _weak_field_map_ |
146 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::AppStatusPB, code_), |
147 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::AppStatusPB, message_), |
148 | | offsetof(::yb::AppStatusPBDefaultTypeInternal, posix_code_), |
149 | | offsetof(::yb::AppStatusPBDefaultTypeInternal, ql_error_code_), |
150 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::AppStatusPB, source_file_), |
151 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::AppStatusPB, source_line_), |
152 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::AppStatusPB, errors_), |
153 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::AppStatusPB, error_codes_), |
154 | | 4, |
155 | | 0, |
156 | | ~0u, |
157 | | ~0u, |
158 | | 1, |
159 | | 3, |
160 | | 2, |
161 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::NodeInstancePB, _has_bits_), |
162 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::NodeInstancePB, _internal_metadata_), |
163 | | ~0u, // no _extensions_ |
164 | | ~0u, // no _oneof_case_ |
165 | | ~0u, // no _weak_field_map_ |
166 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::NodeInstancePB, permanent_uuid_), |
167 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::NodeInstancePB, instance_seqno_), |
168 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::NodeInstancePB, start_time_us_), |
169 | | 0, |
170 | | 1, |
171 | | 2, |
172 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerRegistrationPB, _has_bits_), |
173 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerRegistrationPB, _internal_metadata_), |
174 | | ~0u, // no _extensions_ |
175 | | ~0u, // no _oneof_case_ |
176 | | ~0u, // no _weak_field_map_ |
177 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerRegistrationPB, private_rpc_addresses_), |
178 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerRegistrationPB, broadcast_addresses_), |
179 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerRegistrationPB, http_addresses_), |
180 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerRegistrationPB, pg_port_), |
181 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerRegistrationPB, cloud_info_), |
182 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerRegistrationPB, placement_uuid_), |
183 | | ~0u, |
184 | | ~0u, |
185 | | ~0u, |
186 | | 2, |
187 | | 1, |
188 | | 0, |
189 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerEntryPB, _has_bits_), |
190 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerEntryPB, _internal_metadata_), |
191 | | ~0u, // no _extensions_ |
192 | | ~0u, // no _oneof_case_ |
193 | | ~0u, // no _weak_field_map_ |
194 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerEntryPB, error_), |
195 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerEntryPB, instance_id_), |
196 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerEntryPB, registration_), |
197 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::ServerEntryPB, role_), |
198 | | 0, |
199 | | 1, |
200 | | 2, |
201 | | 3, |
202 | | }; |
203 | | static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
204 | | { 0, 13, sizeof(::yb::AppStatusPB)}, |
205 | | { 20, 28, sizeof(::yb::NodeInstancePB)}, |
206 | | { 31, 42, sizeof(::yb::ServerRegistrationPB)}, |
207 | | { 48, 57, sizeof(::yb::ServerEntryPB)}, |
208 | | }; |
209 | | |
210 | | static ::google::protobuf::Message const * const file_default_instances[] = { |
211 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::_AppStatusPB_default_instance_), |
212 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::_NodeInstancePB_default_instance_), |
213 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::_ServerRegistrationPB_default_instance_), |
214 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::_ServerEntryPB_default_instance_), |
215 | | }; |
216 | | |
217 | 8.99k | void protobuf_AssignDescriptors() { |
218 | 8.99k | AddDescriptors(); |
219 | 8.99k | ::google::protobuf::MessageFactory* factory = NULL; |
220 | 8.99k | AssignDescriptors( |
221 | 8.99k | "yb/common/wire_protocol.proto", schemas, file_default_instances, TableStruct::offsets, factory, |
222 | 8.99k | file_level_metadata, file_level_enum_descriptors, NULL); |
223 | 8.99k | } |
224 | | |
225 | 646k | void protobuf_AssignDescriptorsOnce() { |
226 | 646k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
227 | 646k | ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); |
228 | 646k | } |
229 | | |
230 | | void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; |
231 | 0 | void protobuf_RegisterTypes(const ::std::string&) { |
232 | 0 | protobuf_AssignDescriptorsOnce(); |
233 | 0 | ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4); |
234 | 0 | } |
235 | | |
236 | 17.1k | void AddDescriptorsImpl() { |
237 | 17.1k | InitDefaults(); |
238 | 17.1k | static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
239 | 17.1k | "\n\035yb/common/wire_protocol.proto\022\002yb\032\032yb/" |
240 | 17.1k | "common/common_net.proto\032\034yb/common/commo" |
241 | 17.1k | "n_types.proto\"\252\006\n\013AppStatusPB\022\'\n\004code\030\001 " |
242 | 17.1k | "\002(\0162\031.yb.AppStatusPB.ErrorCode\022\017\n\007messag" |
243 | 17.1k | "e\030\002 \001(\t\022\024\n\nposix_code\030\004 \001(\005H\000\022\027\n\rql_erro" |
244 | 17.1k | "r_code\030\005 \001(\003H\000\022\023\n\013source_file\030\006 \001(\t\022\023\n\013s" |
245 | 17.1k | "ource_line\030\007 \001(\005\022\016\n\006errors\030\t \001(\014\"\350\004\n\tErr" |
246 | 17.1k | "orCode\022\022\n\rUNKNOWN_ERROR\020\347\007\022\006\n\002OK\020\000\022\r\n\tNO" |
247 | 17.1k | "T_FOUND\020\001\022\016\n\nCORRUPTION\020\002\022\021\n\rNOT_SUPPORT" |
248 | 17.1k | "ED\020\003\022\024\n\020INVALID_ARGUMENT\020\004\022\014\n\010IO_ERROR\020\005" |
249 | 17.1k | "\022\023\n\017ALREADY_PRESENT\020\006\022\021\n\rRUNTIME_ERROR\020\007" |
250 | 17.1k | "\022\021\n\rNETWORK_ERROR\020\010\022\021\n\rILLEGAL_STATE\020\t\022\022" |
251 | 17.1k | "\n\016NOT_AUTHORIZED\020\n\022\013\n\007ABORTED\020\013\022\020\n\014REMOT" |
252 | 17.1k | "E_ERROR\020\014\022\027\n\023SERVICE_UNAVAILABLE\020\r\022\r\n\tTI" |
253 | 17.1k | "MED_OUT\020\016\022\021\n\rUNINITIALIZED\020\017\022\027\n\023CONFIGUR" |
254 | 17.1k | "ATION_ERROR\020\020\022\016\n\nINCOMPLETE\020\021\022\017\n\013END_OF_" |
255 | 17.1k | "FILE\020\022\022\023\n\017INVALID_COMMAND\020\023\022\014\n\010QL_ERROR\020" |
256 | 17.1k | "\024\022\022\n\016INTERNAL_ERROR\020\025\022\013\n\007EXPIRED\020\026\022\035\n\031LE" |
257 | 17.1k | "ADER_NOT_READY_TO_SERVE\020\027\022\027\n\023LEADER_HAS_" |
258 | 17.1k | "NO_LEASE\020\030\022\022\n\016TRY_AGAIN_CODE\020\031\022\010\n\004BUSY\020\032" |
259 | 17.1k | "\022\030\n\024SHUTDOWN_IN_PROGRESS\020\033\022\025\n\021MERGE_IN_P" |
260 | 17.1k | "ROGRESS\020\034\022\022\n\016COMBINED_ERROR\020\035\022\024\n\020SNAPSHO" |
261 | 17.1k | "T_TOO_OLD\020\036B\r\n\013error_codes\"W\n\016NodeInstan" |
262 | 17.1k | "cePB\022\026\n\016permanent_uuid\030\001 \002(\014\022\026\n\016instance" |
263 | 17.1k | "_seqno\030\002 \002(\003\022\025\n\rstart_time_us\030\003 \001(\004\"\356\001\n\024" |
264 | 17.1k | "ServerRegistrationPB\022-\n\025private_rpc_addr" |
265 | 17.1k | "esses\030\001 \003(\0132\016.yb.HostPortPB\022+\n\023broadcast" |
266 | 17.1k | "_addresses\030\005 \003(\0132\016.yb.HostPortPB\022&\n\016http" |
267 | 17.1k | "_addresses\030\002 \003(\0132\016.yb.HostPortPB\022\025\n\007pg_p" |
268 | 17.1k | "ort\030\006 \001(\r:\0045433\022#\n\ncloud_info\030\003 \001(\0132\017.yb" |
269 | 17.1k | ".CloudInfoPB\022\026\n\016placement_uuid\030\004 \001(\014\"\244\001\n" |
270 | 17.1k | "\rServerEntryPB\022\036\n\005error\030\001 \001(\0132\017.yb.AppSt" |
271 | 17.1k | "atusPB\022\'\n\013instance_id\030\002 \001(\0132\022.yb.NodeIns" |
272 | 17.1k | "tancePB\022.\n\014registration\030\003 \001(\0132\030.yb.Serve" |
273 | 17.1k | "rRegistrationPB\022\032\n\004role\030\004 \001(\0162\014.yb.PeerR" |
274 | 17.1k | "oleB\010\n\006org.yb" |
275 | 17.1k | }; |
276 | 17.1k | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
277 | 17.1k | descriptor, 1413); |
278 | 17.1k | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
279 | 17.1k | "yb/common/wire_protocol.proto", &protobuf_RegisterTypes); |
280 | 17.1k | ::protobuf_yb_2fcommon_2fcommon_5fnet_2eproto::AddDescriptors(); |
281 | 17.1k | ::protobuf_yb_2fcommon_2fcommon_5ftypes_2eproto::AddDescriptors(); |
282 | 17.1k | } |
283 | | |
284 | 243k | void AddDescriptors() { |
285 | 243k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
286 | 243k | ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); |
287 | 243k | } |
288 | | // Force AddDescriptors() to be called at dynamic initialization time. |
289 | | struct StaticDescriptorInitializer { |
290 | 17.1k | StaticDescriptorInitializer() { |
291 | 17.1k | AddDescriptors(); |
292 | 17.1k | } |
293 | | } static_descriptor_initializer; |
294 | | } // namespace protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto |
295 | | namespace yb { |
296 | 0 | const ::google::protobuf::EnumDescriptor* AppStatusPB_ErrorCode_descriptor() { |
297 | 0 | protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::protobuf_AssignDescriptorsOnce(); |
298 | 0 | return protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::file_level_enum_descriptors[0]; |
299 | 0 | } |
300 | 2.33M | bool AppStatusPB_ErrorCode_IsValid(int value) { |
301 | 2.33M | switch (value) { |
302 | 1 | case 0: |
303 | 20.1k | case 1: |
304 | 20.1k | case 2: |
305 | 20.1k | case 3: |
306 | 22.6k | case 4: |
307 | 57.8k | case 5: |
308 | 74.1k | case 6: |
309 | 74.1k | case 7: |
310 | 74.1k | case 8: |
311 | 663k | case 9: |
312 | 663k | case 10: |
313 | 663k | case 11: |
314 | 663k | case 12: |
315 | 1.88M | case 13: |
316 | 1.88M | case 14: |
317 | 1.88M | case 15: |
318 | 1.88M | case 16: |
319 | 1.88M | case 17: |
320 | 1.88M | case 18: |
321 | 1.88M | case 19: |
322 | 1.89M | case 20: |
323 | 1.89M | case 21: |
324 | 1.96M | case 22: |
325 | 1.97M | case 23: |
326 | 1.98M | case 24: |
327 | 2.33M | case 25: |
328 | 2.33M | case 26: |
329 | 2.33M | case 27: |
330 | 2.33M | case 28: |
331 | 2.33M | case 29: |
332 | 2.33M | case 30: |
333 | 2.33M | case 999: |
334 | 2.33M | return true; |
335 | 0 | default: |
336 | 0 | return false; |
337 | 2.33M | } |
338 | 2.33M | } |
339 | | |
340 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
341 | | const AppStatusPB_ErrorCode AppStatusPB::UNKNOWN_ERROR; |
342 | | const AppStatusPB_ErrorCode AppStatusPB::OK; |
343 | | const AppStatusPB_ErrorCode AppStatusPB::NOT_FOUND; |
344 | | const AppStatusPB_ErrorCode AppStatusPB::CORRUPTION; |
345 | | const AppStatusPB_ErrorCode AppStatusPB::NOT_SUPPORTED; |
346 | | const AppStatusPB_ErrorCode AppStatusPB::INVALID_ARGUMENT; |
347 | | const AppStatusPB_ErrorCode AppStatusPB::IO_ERROR; |
348 | | const AppStatusPB_ErrorCode AppStatusPB::ALREADY_PRESENT; |
349 | | const AppStatusPB_ErrorCode AppStatusPB::RUNTIME_ERROR; |
350 | | const AppStatusPB_ErrorCode AppStatusPB::NETWORK_ERROR; |
351 | | const AppStatusPB_ErrorCode AppStatusPB::ILLEGAL_STATE; |
352 | | const AppStatusPB_ErrorCode AppStatusPB::NOT_AUTHORIZED; |
353 | | const AppStatusPB_ErrorCode AppStatusPB::ABORTED; |
354 | | const AppStatusPB_ErrorCode AppStatusPB::REMOTE_ERROR; |
355 | | const AppStatusPB_ErrorCode AppStatusPB::SERVICE_UNAVAILABLE; |
356 | | const AppStatusPB_ErrorCode AppStatusPB::TIMED_OUT; |
357 | | const AppStatusPB_ErrorCode AppStatusPB::UNINITIALIZED; |
358 | | const AppStatusPB_ErrorCode AppStatusPB::CONFIGURATION_ERROR; |
359 | | const AppStatusPB_ErrorCode AppStatusPB::INCOMPLETE; |
360 | | const AppStatusPB_ErrorCode AppStatusPB::END_OF_FILE; |
361 | | const AppStatusPB_ErrorCode AppStatusPB::INVALID_COMMAND; |
362 | | const AppStatusPB_ErrorCode AppStatusPB::QL_ERROR; |
363 | | const AppStatusPB_ErrorCode AppStatusPB::INTERNAL_ERROR; |
364 | | const AppStatusPB_ErrorCode AppStatusPB::EXPIRED; |
365 | | const AppStatusPB_ErrorCode AppStatusPB::LEADER_NOT_READY_TO_SERVE; |
366 | | const AppStatusPB_ErrorCode AppStatusPB::LEADER_HAS_NO_LEASE; |
367 | | const AppStatusPB_ErrorCode AppStatusPB::TRY_AGAIN_CODE; |
368 | | const AppStatusPB_ErrorCode AppStatusPB::BUSY; |
369 | | const AppStatusPB_ErrorCode AppStatusPB::SHUTDOWN_IN_PROGRESS; |
370 | | const AppStatusPB_ErrorCode AppStatusPB::MERGE_IN_PROGRESS; |
371 | | const AppStatusPB_ErrorCode AppStatusPB::COMBINED_ERROR; |
372 | | const AppStatusPB_ErrorCode AppStatusPB::SNAPSHOT_TOO_OLD; |
373 | | const AppStatusPB_ErrorCode AppStatusPB::ErrorCode_MIN; |
374 | | const AppStatusPB_ErrorCode AppStatusPB::ErrorCode_MAX; |
375 | | const int AppStatusPB::ErrorCode_ARRAYSIZE; |
376 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
377 | | |
378 | | // =================================================================== |
379 | | |
380 | 17.1k | void AppStatusPB::InitAsDefaultInstance() { |
381 | 17.1k | ::yb::_AppStatusPB_default_instance_.posix_code_ = 0; |
382 | 17.1k | ::yb::_AppStatusPB_default_instance_.ql_error_code_ = GOOGLE_LONGLONG(0); |
383 | 17.1k | } |
384 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
385 | | const int AppStatusPB::kCodeFieldNumber; |
386 | | const int AppStatusPB::kMessageFieldNumber; |
387 | | const int AppStatusPB::kPosixCodeFieldNumber; |
388 | | const int AppStatusPB::kQlErrorCodeFieldNumber; |
389 | | const int AppStatusPB::kSourceFileFieldNumber; |
390 | | const int AppStatusPB::kSourceLineFieldNumber; |
391 | | const int AppStatusPB::kErrorsFieldNumber; |
392 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
393 | | |
394 | | AppStatusPB::AppStatusPB() |
395 | 1.52M | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
396 | 1.50M | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
397 | 1.50M | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsAppStatusPB(); |
398 | 1.50M | } |
399 | 1.52M | SharedCtor(); |
400 | | // @@protoc_insertion_point(constructor:yb.AppStatusPB) |
401 | 1.52M | } |
402 | | AppStatusPB::AppStatusPB(const AppStatusPB& from) |
403 | | : ::google::protobuf::Message(), |
404 | | _internal_metadata_(NULL), |
405 | | _has_bits_(from._has_bits_), |
406 | 0 | _cached_size_(0) { |
407 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
408 | 0 | message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
409 | 0 | if (from.has_message()) { |
410 | 0 | message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); |
411 | 0 | } |
412 | 0 | source_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
413 | 0 | if (from.has_source_file()) { |
414 | 0 | source_file_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_file_); |
415 | 0 | } |
416 | 0 | errors_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
417 | 0 | if (from.has_errors()) { |
418 | 0 | errors_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.errors_); |
419 | 0 | } |
420 | 0 | ::memcpy(&source_line_, &from.source_line_, |
421 | 0 | static_cast<size_t>(reinterpret_cast<char*>(&code_) - |
422 | 0 | reinterpret_cast<char*>(&source_line_)) + sizeof(code_)); |
423 | 0 | clear_has_error_codes(); |
424 | 0 | switch (from.error_codes_case()) { |
425 | 0 | case kPosixCode: { |
426 | 0 | set_posix_code(from.posix_code()); |
427 | 0 | break; |
428 | 0 | } |
429 | 0 | case kQlErrorCode: { |
430 | 0 | set_ql_error_code(from.ql_error_code()); |
431 | 0 | break; |
432 | 0 | } |
433 | 0 | case ERROR_CODES_NOT_SET: { |
434 | 0 | break; |
435 | 0 | } |
436 | 0 | } |
437 | | // @@protoc_insertion_point(copy_constructor:yb.AppStatusPB) |
438 | 0 | } |
439 | | |
440 | 1.52M | void AppStatusPB::SharedCtor() { |
441 | 1.52M | _cached_size_ = 0; |
442 | 1.52M | message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
443 | 1.52M | source_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
444 | 1.52M | errors_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
445 | 1.52M | source_line_ = 0; |
446 | 1.52M | code_ = 999; |
447 | 1.52M | clear_has_error_codes(); |
448 | 1.52M | } |
449 | | |
450 | 1.47M | AppStatusPB::~AppStatusPB() { |
451 | | // @@protoc_insertion_point(destructor:yb.AppStatusPB) |
452 | 1.47M | SharedDtor(); |
453 | 1.47M | } |
454 | | |
455 | 1.47M | void AppStatusPB::SharedDtor() { |
456 | 1.47M | message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
457 | 1.47M | source_file_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
458 | 1.47M | errors_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
459 | 1.47M | if (has_error_codes()) { |
460 | 8 | clear_error_codes(); |
461 | 8 | } |
462 | 1.47M | } |
463 | | |
464 | 0 | void AppStatusPB::SetCachedSize(int size) const { |
465 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
466 | 0 | _cached_size_ = size; |
467 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
468 | 0 | } |
469 | 0 | const ::google::protobuf::Descriptor* AppStatusPB::descriptor() { |
470 | 0 | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::protobuf_AssignDescriptorsOnce(); |
471 | 0 | return ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
472 | 0 | } |
473 | | |
474 | 0 | const AppStatusPB& AppStatusPB::default_instance() { |
475 | 0 | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsAppStatusPB(); |
476 | 0 | return *internal_default_instance(); |
477 | 0 | } |
478 | | |
479 | 0 | AppStatusPB* AppStatusPB::New(::google::protobuf::Arena* arena) const { |
480 | 0 | AppStatusPB* n = new AppStatusPB; |
481 | 0 | if (arena != NULL) { |
482 | 0 | arena->Own(n); |
483 | 0 | } |
484 | 0 | return n; |
485 | 0 | } |
486 | | |
487 | 1.05M | void AppStatusPB::clear_error_codes() { |
488 | | // @@protoc_insertion_point(one_of_clear_start:yb.AppStatusPB) |
489 | 1.05M | switch (error_codes_case()) { |
490 | 9 | case kPosixCode: { |
491 | | // No need to clear |
492 | 9 | break; |
493 | 0 | } |
494 | 0 | case kQlErrorCode: { |
495 | | // No need to clear |
496 | 0 | break; |
497 | 0 | } |
498 | 1.04M | case ERROR_CODES_NOT_SET: { |
499 | 1.04M | break; |
500 | 1.04M | } |
501 | 1.04M | } |
502 | 1.04M | _oneof_case_[0] = ERROR_CODES_NOT_SET; |
503 | 1.04M | } |
504 | | |
505 | | |
506 | 1.05M | void AppStatusPB::Clear() { |
507 | | // @@protoc_insertion_point(message_clear_start:yb.AppStatusPB) |
508 | 1.05M | ::google::protobuf::uint32 cached_has_bits = 0; |
509 | | // Prevent compiler warnings about cached_has_bits being unused |
510 | 1.05M | (void) cached_has_bits; |
511 | | |
512 | 1.05M | cached_has_bits = _has_bits_[0]; |
513 | 1.05M | if (cached_has_bits & 7u) { |
514 | 187k | if (cached_has_bits & 0x00000001u) { |
515 | 187k | GOOGLE_DCHECK(!message_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); |
516 | 187k | (*message_.UnsafeRawStringPointer())->clear(); |
517 | 187k | } |
518 | 187k | if (cached_has_bits & 0x00000002u) { |
519 | 187k | GOOGLE_DCHECK(!source_file_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); |
520 | 187k | (*source_file_.UnsafeRawStringPointer())->clear(); |
521 | 187k | } |
522 | 187k | if (cached_has_bits & 0x00000004u) { |
523 | 187k | GOOGLE_DCHECK(!errors_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); |
524 | 187k | (*errors_.UnsafeRawStringPointer())->clear(); |
525 | 187k | } |
526 | 187k | } |
527 | 1.05M | if (cached_has_bits & 24u) { |
528 | 187k | source_line_ = 0; |
529 | 187k | code_ = 999; |
530 | 187k | } |
531 | 1.05M | clear_error_codes(); |
532 | 1.05M | _has_bits_.Clear(); |
533 | 1.05M | _internal_metadata_.Clear(); |
534 | 1.05M | } |
535 | | |
536 | | bool AppStatusPB::MergePartialFromCodedStream( |
537 | 738k | ::google::protobuf::io::CodedInputStream* input) { |
538 | 3.68M | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
539 | 738k | ::google::protobuf::uint32 tag; |
540 | | // @@protoc_insertion_point(parse_start:yb.AppStatusPB) |
541 | 4.41M | for (;;) { |
542 | 4.41M | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
543 | 4.41M | tag = p.first; |
544 | 4.41M | if (!p.second) goto handle_unusual; |
545 | 3.68M | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
546 | | // required .yb.AppStatusPB.ErrorCode code = 1; |
547 | 736k | case 1: { |
548 | 736k | if (static_cast< ::google::protobuf::uint8>(tag) == |
549 | 737k | static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { |
550 | 737k | int value; |
551 | 737k | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
552 | 737k | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
553 | 737k | input, &value))); |
554 | 737k | if (::yb::AppStatusPB_ErrorCode_IsValid(value)) { |
555 | 735k | set_code(static_cast< ::yb::AppStatusPB_ErrorCode >(value)); |
556 | 1.68k | } else { |
557 | 1.68k | mutable_unknown_fields()->AddVarint( |
558 | 1.68k | 1, static_cast< ::google::protobuf::uint64>(value)); |
559 | 1.68k | } |
560 | 18.4E | } else { |
561 | 18.4E | goto handle_unusual; |
562 | 18.4E | } |
563 | 737k | break; |
564 | 737k | } |
565 | | |
566 | | // optional string message = 2; |
567 | 734k | case 2: { |
568 | 734k | if (static_cast< ::google::protobuf::uint8>(tag) == |
569 | 735k | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
570 | 735k | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
571 | 735k | input, this->mutable_message())); |
572 | 735k | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
573 | 735k | this->message().data(), static_cast<int>(this->message().length()), |
574 | 735k | ::google::protobuf::internal::WireFormat::PARSE, |
575 | 735k | "yb.AppStatusPB.message"); |
576 | 18.4E | } else { |
577 | 18.4E | goto handle_unusual; |
578 | 18.4E | } |
579 | 735k | break; |
580 | 735k | } |
581 | | |
582 | | // optional int32 posix_code = 4; |
583 | 2 | case 4: { |
584 | 2 | if (static_cast< ::google::protobuf::uint8>(tag) == |
585 | 2 | static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { |
586 | 2 | clear_error_codes(); |
587 | 2 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
588 | 2 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
589 | 2 | input, &error_codes_.posix_code_))); |
590 | 2 | set_has_posix_code(); |
591 | 0 | } else { |
592 | 0 | goto handle_unusual; |
593 | 0 | } |
594 | 2 | break; |
595 | 2 | } |
596 | | |
597 | | // optional int64 ql_error_code = 5; |
598 | 0 | case 5: { |
599 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
600 | 0 | static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { |
601 | 0 | clear_error_codes(); |
602 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
603 | 0 | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
604 | 0 | input, &error_codes_.ql_error_code_))); |
605 | 0 | set_has_ql_error_code(); |
606 | 0 | } else { |
607 | 0 | goto handle_unusual; |
608 | 0 | } |
609 | 0 | break; |
610 | 0 | } |
611 | | |
612 | | // optional string source_file = 6; |
613 | 737k | case 6: { |
614 | 737k | if (static_cast< ::google::protobuf::uint8>(tag) == |
615 | 737k | static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { |
616 | 737k | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
617 | 737k | input, this->mutable_source_file())); |
618 | 737k | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
619 | 737k | this->source_file().data(), static_cast<int>(this->source_file().length()), |
620 | 737k | ::google::protobuf::internal::WireFormat::PARSE, |
621 | 737k | "yb.AppStatusPB.source_file"); |
622 | 18.4E | } else { |
623 | 18.4E | goto handle_unusual; |
624 | 18.4E | } |
625 | 737k | break; |
626 | 737k | } |
627 | | |
628 | | // optional int32 source_line = 7; |
629 | 737k | case 7: { |
630 | 737k | if (static_cast< ::google::protobuf::uint8>(tag) == |
631 | 737k | static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) { |
632 | 737k | set_has_source_line(); |
633 | 737k | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
634 | 737k | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
635 | 737k | input, &source_line_))); |
636 | 18.4E | } else { |
637 | 18.4E | goto handle_unusual; |
638 | 18.4E | } |
639 | 737k | break; |
640 | 737k | } |
641 | | |
642 | | // optional bytes errors = 9; |
643 | 737k | case 9: { |
644 | 737k | if (static_cast< ::google::protobuf::uint8>(tag) == |
645 | 737k | static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { |
646 | 737k | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
647 | 737k | input, this->mutable_errors())); |
648 | 18.4E | } else { |
649 | 18.4E | goto handle_unusual; |
650 | 18.4E | } |
651 | 737k | break; |
652 | 737k | } |
653 | | |
654 | 0 | default: { |
655 | 737k | handle_unusual: |
656 | 737k | if (tag == 0) { |
657 | 737k | goto success; |
658 | 737k | } |
659 | 18.4E | DO_(::google::protobuf::internal::WireFormat::SkipField( |
660 | 18.4E | input, tag, _internal_metadata_.mutable_unknown_fields())); |
661 | 18.4E | break; |
662 | 18.4E | } |
663 | 3.68M | } |
664 | 3.68M | } |
665 | 737k | success: |
666 | | // @@protoc_insertion_point(parse_success:yb.AppStatusPB) |
667 | 737k | return true; |
668 | 0 | failure: |
669 | | // @@protoc_insertion_point(parse_failure:yb.AppStatusPB) |
670 | 0 | return false; |
671 | 738k | #undef DO_ |
672 | 738k | } |
673 | | |
674 | | void AppStatusPB::SerializeWithCachedSizes( |
675 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
676 | | // @@protoc_insertion_point(serialize_start:yb.AppStatusPB) |
677 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
678 | 0 | (void) cached_has_bits; |
679 | |
|
680 | 0 | cached_has_bits = _has_bits_[0]; |
681 | | // required .yb.AppStatusPB.ErrorCode code = 1; |
682 | 0 | if (cached_has_bits & 0x00000010u) { |
683 | 0 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
684 | 0 | 1, this->code(), output); |
685 | 0 | } |
686 | | |
687 | | // optional string message = 2; |
688 | 0 | if (cached_has_bits & 0x00000001u) { |
689 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
690 | 0 | this->message().data(), static_cast<int>(this->message().length()), |
691 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
692 | 0 | "yb.AppStatusPB.message"); |
693 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
694 | 0 | 2, this->message(), output); |
695 | 0 | } |
696 | |
|
697 | 0 | switch (error_codes_case()) { |
698 | 0 | case kPosixCode: |
699 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->posix_code(), output); |
700 | 0 | break; |
701 | 0 | case kQlErrorCode: |
702 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->ql_error_code(), output); |
703 | 0 | break; |
704 | 0 | default: ; |
705 | 0 | } |
706 | | // optional string source_file = 6; |
707 | 0 | if (cached_has_bits & 0x00000002u) { |
708 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
709 | 0 | this->source_file().data(), static_cast<int>(this->source_file().length()), |
710 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
711 | 0 | "yb.AppStatusPB.source_file"); |
712 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
713 | 0 | 6, this->source_file(), output); |
714 | 0 | } |
715 | | |
716 | | // optional int32 source_line = 7; |
717 | 0 | if (cached_has_bits & 0x00000008u) { |
718 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->source_line(), output); |
719 | 0 | } |
720 | | |
721 | | // optional bytes errors = 9; |
722 | 0 | if (cached_has_bits & 0x00000004u) { |
723 | 0 | ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( |
724 | 0 | 9, this->errors(), output); |
725 | 0 | } |
726 | |
|
727 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
728 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
729 | 0 | _internal_metadata_.unknown_fields(), output); |
730 | 0 | } |
731 | | // @@protoc_insertion_point(serialize_end:yb.AppStatusPB) |
732 | 0 | } |
733 | | |
734 | | ::google::protobuf::uint8* AppStatusPB::InternalSerializeWithCachedSizesToArray( |
735 | 739k | bool deterministic, ::google::protobuf::uint8* target) const { |
736 | 739k | (void)deterministic; // Unused |
737 | | // @@protoc_insertion_point(serialize_to_array_start:yb.AppStatusPB) |
738 | 739k | ::google::protobuf::uint32 cached_has_bits = 0; |
739 | 739k | (void) cached_has_bits; |
740 | | |
741 | 739k | cached_has_bits = _has_bits_[0]; |
742 | | // required .yb.AppStatusPB.ErrorCode code = 1; |
743 | 739k | if (cached_has_bits & 0x00000010u) { |
744 | 738k | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
745 | 738k | 1, this->code(), target); |
746 | 738k | } |
747 | | |
748 | | // optional string message = 2; |
749 | 739k | if (cached_has_bits & 0x00000001u) { |
750 | 735k | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
751 | 735k | this->message().data(), static_cast<int>(this->message().length()), |
752 | 735k | ::google::protobuf::internal::WireFormat::SERIALIZE, |
753 | 735k | "yb.AppStatusPB.message"); |
754 | 735k | target = |
755 | 735k | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
756 | 735k | 2, this->message(), target); |
757 | 735k | } |
758 | | |
759 | 739k | switch (error_codes_case()) { |
760 | 7 | case kPosixCode: |
761 | 7 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->posix_code(), target); |
762 | 7 | break; |
763 | 0 | case kQlErrorCode: |
764 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->ql_error_code(), target); |
765 | 0 | break; |
766 | 735k | default: ; |
767 | 739k | } |
768 | | // optional string source_file = 6; |
769 | 736k | if (cached_has_bits & 0x00000002u) { |
770 | 736k | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
771 | 736k | this->source_file().data(), static_cast<int>(this->source_file().length()), |
772 | 736k | ::google::protobuf::internal::WireFormat::SERIALIZE, |
773 | 736k | "yb.AppStatusPB.source_file"); |
774 | 736k | target = |
775 | 736k | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
776 | 736k | 6, this->source_file(), target); |
777 | 736k | } |
778 | | |
779 | | // optional int32 source_line = 7; |
780 | 737k | if (cached_has_bits & 0x00000008u) { |
781 | 737k | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->source_line(), target); |
782 | 737k | } |
783 | | |
784 | | // optional bytes errors = 9; |
785 | 736k | if (cached_has_bits & 0x00000004u) { |
786 | 736k | target = |
787 | 736k | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
788 | 736k | 9, this->errors(), target); |
789 | 736k | } |
790 | | |
791 | 735k | if (_internal_metadata_.have_unknown_fields()) { |
792 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
793 | 0 | _internal_metadata_.unknown_fields(), target); |
794 | 0 | } |
795 | | // @@protoc_insertion_point(serialize_to_array_end:yb.AppStatusPB) |
796 | 735k | return target; |
797 | 739k | } |
798 | | |
799 | 1.47M | size_t AppStatusPB::ByteSizeLong() const { |
800 | | // @@protoc_insertion_point(message_byte_size_start:yb.AppStatusPB) |
801 | 1.47M | size_t total_size = 0; |
802 | | |
803 | 1.47M | if (_internal_metadata_.have_unknown_fields()) { |
804 | 0 | total_size += |
805 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
806 | 0 | _internal_metadata_.unknown_fields()); |
807 | 0 | } |
808 | | // required .yb.AppStatusPB.ErrorCode code = 1; |
809 | 1.47M | if (has_code()) { |
810 | 1.47M | total_size += 1 + |
811 | 1.47M | ::google::protobuf::internal::WireFormatLite::EnumSize(this->code()); |
812 | 1.47M | } |
813 | 1.47M | if (_has_bits_[0 / 32] & 15u) { |
814 | | // optional string message = 2; |
815 | 1.47M | if (has_message()) { |
816 | 1.47M | total_size += 1 + |
817 | 1.47M | ::google::protobuf::internal::WireFormatLite::StringSize( |
818 | 1.47M | this->message()); |
819 | 1.47M | } |
820 | | |
821 | | // optional string source_file = 6; |
822 | 1.47M | if (has_source_file()) { |
823 | 1.47M | total_size += 1 + |
824 | 1.47M | ::google::protobuf::internal::WireFormatLite::StringSize( |
825 | 1.47M | this->source_file()); |
826 | 1.47M | } |
827 | | |
828 | | // optional bytes errors = 9; |
829 | 1.47M | if (has_errors()) { |
830 | 1.47M | total_size += 1 + |
831 | 1.47M | ::google::protobuf::internal::WireFormatLite::BytesSize( |
832 | 1.47M | this->errors()); |
833 | 1.47M | } |
834 | | |
835 | | // optional int32 source_line = 7; |
836 | 1.47M | if (has_source_line()) { |
837 | 1.47M | total_size += 1 + |
838 | 1.47M | ::google::protobuf::internal::WireFormatLite::Int32Size( |
839 | 1.47M | this->source_line()); |
840 | 1.47M | } |
841 | | |
842 | 1.47M | } |
843 | 1.47M | switch (error_codes_case()) { |
844 | | // optional int32 posix_code = 4; |
845 | 14 | case kPosixCode: { |
846 | 14 | total_size += 1 + |
847 | 14 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
848 | 14 | this->posix_code()); |
849 | 14 | break; |
850 | 0 | } |
851 | | // optional int64 ql_error_code = 5; |
852 | 0 | case kQlErrorCode: { |
853 | 0 | total_size += 1 + |
854 | 0 | ::google::protobuf::internal::WireFormatLite::Int64Size( |
855 | 0 | this->ql_error_code()); |
856 | 0 | break; |
857 | 0 | } |
858 | 1.47M | case ERROR_CODES_NOT_SET: { |
859 | 1.47M | break; |
860 | 1.47M | } |
861 | 1.47M | } |
862 | 1.47M | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
863 | 1.47M | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
864 | 1.47M | _cached_size_ = cached_size; |
865 | 1.47M | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
866 | 1.47M | return total_size; |
867 | 1.47M | } |
868 | | |
869 | 0 | void AppStatusPB::MergeFrom(const ::google::protobuf::Message& from) { |
870 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.AppStatusPB) |
871 | 0 | GOOGLE_DCHECK_NE(&from, this); |
872 | 0 | const AppStatusPB* source = |
873 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const AppStatusPB>( |
874 | 0 | &from); |
875 | 0 | if (source == NULL) { |
876 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.AppStatusPB) |
877 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
878 | 0 | } else { |
879 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.AppStatusPB) |
880 | 0 | MergeFrom(*source); |
881 | 0 | } |
882 | 0 | } |
883 | | |
884 | 1.28k | void AppStatusPB::MergeFrom(const AppStatusPB& from) { |
885 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.AppStatusPB) |
886 | 1.28k | GOOGLE_DCHECK_NE(&from, this); |
887 | 1.28k | _internal_metadata_.MergeFrom(from._internal_metadata_); |
888 | 1.28k | ::google::protobuf::uint32 cached_has_bits = 0; |
889 | 1.28k | (void) cached_has_bits; |
890 | | |
891 | 1.28k | cached_has_bits = from._has_bits_[0]; |
892 | 1.28k | if (cached_has_bits & 31u) { |
893 | 1.28k | if (cached_has_bits & 0x00000001u) { |
894 | 1.28k | set_has_message(); |
895 | 1.28k | message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); |
896 | 1.28k | } |
897 | 1.28k | if (cached_has_bits & 0x00000002u) { |
898 | 1.28k | set_has_source_file(); |
899 | 1.28k | source_file_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_file_); |
900 | 1.28k | } |
901 | 1.28k | if (cached_has_bits & 0x00000004u) { |
902 | 1.28k | set_has_errors(); |
903 | 1.28k | errors_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.errors_); |
904 | 1.28k | } |
905 | 1.28k | if (cached_has_bits & 0x00000008u) { |
906 | 1.28k | source_line_ = from.source_line_; |
907 | 1.28k | } |
908 | 1.28k | if (cached_has_bits & 0x00000010u) { |
909 | 1.28k | code_ = from.code_; |
910 | 1.28k | } |
911 | 1.28k | _has_bits_[0] |= cached_has_bits; |
912 | 1.28k | } |
913 | 1.28k | switch (from.error_codes_case()) { |
914 | 0 | case kPosixCode: { |
915 | 0 | set_posix_code(from.posix_code()); |
916 | 0 | break; |
917 | 0 | } |
918 | 0 | case kQlErrorCode: { |
919 | 0 | set_ql_error_code(from.ql_error_code()); |
920 | 0 | break; |
921 | 0 | } |
922 | 1.28k | case ERROR_CODES_NOT_SET: { |
923 | 1.28k | break; |
924 | 0 | } |
925 | 1.28k | } |
926 | 1.28k | } |
927 | | |
928 | 0 | void AppStatusPB::CopyFrom(const ::google::protobuf::Message& from) { |
929 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.AppStatusPB) |
930 | 0 | if (&from == this) return; |
931 | 0 | Clear(); |
932 | 0 | MergeFrom(from); |
933 | 0 | } |
934 | | |
935 | 0 | void AppStatusPB::CopyFrom(const AppStatusPB& from) { |
936 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.AppStatusPB) |
937 | 0 | if (&from == this) return; |
938 | 0 | Clear(); |
939 | 0 | MergeFrom(from); |
940 | 0 | } |
941 | | |
942 | 1.61M | bool AppStatusPB::IsInitialized() const { |
943 | 1.61M | if ((_has_bits_[0] & 0x00000010) != 0x00000010) return false; |
944 | 1.61M | return true; |
945 | 1.61M | } |
946 | | |
947 | 0 | void AppStatusPB::Swap(AppStatusPB* other) { |
948 | 0 | if (other == this) return; |
949 | 0 | InternalSwap(other); |
950 | 0 | } |
951 | 0 | void AppStatusPB::InternalSwap(AppStatusPB* other) { |
952 | 0 | using std::swap; |
953 | 0 | message_.Swap(&other->message_); |
954 | 0 | source_file_.Swap(&other->source_file_); |
955 | 0 | errors_.Swap(&other->errors_); |
956 | 0 | swap(source_line_, other->source_line_); |
957 | 0 | swap(code_, other->code_); |
958 | 0 | swap(error_codes_, other->error_codes_); |
959 | 0 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
960 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
961 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
962 | 0 | swap(_cached_size_, other->_cached_size_); |
963 | 0 | } |
964 | | |
965 | 142k | ::google::protobuf::Metadata AppStatusPB::GetMetadata() const { |
966 | 142k | protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::protobuf_AssignDescriptorsOnce(); |
967 | 142k | return ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages]; |
968 | 142k | } |
969 | | |
970 | | |
971 | | // =================================================================== |
972 | | |
973 | 17.1k | void NodeInstancePB::InitAsDefaultInstance() { |
974 | 17.1k | } |
975 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
976 | | const int NodeInstancePB::kPermanentUuidFieldNumber; |
977 | | const int NodeInstancePB::kInstanceSeqnoFieldNumber; |
978 | | const int NodeInstancePB::kStartTimeUsFieldNumber; |
979 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
980 | | |
981 | | NodeInstancePB::NodeInstancePB() |
982 | 14.1M | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
983 | 14.0M | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
984 | 14.0M | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsNodeInstancePB(); |
985 | 14.0M | } |
986 | 14.1M | SharedCtor(); |
987 | | // @@protoc_insertion_point(constructor:yb.NodeInstancePB) |
988 | 14.1M | } |
989 | | NodeInstancePB::NodeInstancePB(const NodeInstancePB& from) |
990 | | : ::google::protobuf::Message(), |
991 | | _internal_metadata_(NULL), |
992 | | _has_bits_(from._has_bits_), |
993 | 444k | _cached_size_(0) { |
994 | 444k | _internal_metadata_.MergeFrom(from._internal_metadata_); |
995 | 444k | permanent_uuid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
996 | 444k | if (from.has_permanent_uuid()) { |
997 | 443k | permanent_uuid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.permanent_uuid_); |
998 | 443k | } |
999 | 444k | ::memcpy(&instance_seqno_, &from.instance_seqno_, |
1000 | 444k | static_cast<size_t>(reinterpret_cast<char*>(&start_time_us_) - |
1001 | 444k | reinterpret_cast<char*>(&instance_seqno_)) + sizeof(start_time_us_)); |
1002 | | // @@protoc_insertion_point(copy_constructor:yb.NodeInstancePB) |
1003 | 444k | } |
1004 | | |
1005 | 14.1M | void NodeInstancePB::SharedCtor() { |
1006 | 14.1M | _cached_size_ = 0; |
1007 | 14.1M | permanent_uuid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1008 | 14.1M | ::memset(&instance_seqno_, 0, static_cast<size_t>( |
1009 | 14.1M | reinterpret_cast<char*>(&start_time_us_) - |
1010 | 14.1M | reinterpret_cast<char*>(&instance_seqno_)) + sizeof(start_time_us_)); |
1011 | 14.1M | } |
1012 | | |
1013 | 14.5M | NodeInstancePB::~NodeInstancePB() { |
1014 | | // @@protoc_insertion_point(destructor:yb.NodeInstancePB) |
1015 | 14.5M | SharedDtor(); |
1016 | 14.5M | } |
1017 | | |
1018 | 14.5M | void NodeInstancePB::SharedDtor() { |
1019 | 14.5M | permanent_uuid_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1020 | 14.5M | } |
1021 | | |
1022 | 0 | void NodeInstancePB::SetCachedSize(int size) const { |
1023 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1024 | 0 | _cached_size_ = size; |
1025 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1026 | 0 | } |
1027 | 0 | const ::google::protobuf::Descriptor* NodeInstancePB::descriptor() { |
1028 | 0 | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::protobuf_AssignDescriptorsOnce(); |
1029 | 0 | return ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
1030 | 0 | } |
1031 | | |
1032 | 0 | const NodeInstancePB& NodeInstancePB::default_instance() { |
1033 | 0 | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsNodeInstancePB(); |
1034 | 0 | return *internal_default_instance(); |
1035 | 0 | } |
1036 | | |
1037 | 0 | NodeInstancePB* NodeInstancePB::New(::google::protobuf::Arena* arena) const { |
1038 | 0 | NodeInstancePB* n = new NodeInstancePB; |
1039 | 0 | if (arena != NULL) { |
1040 | 0 | arena->Own(n); |
1041 | 0 | } |
1042 | 0 | return n; |
1043 | 0 | } |
1044 | | |
1045 | 10.6M | void NodeInstancePB::Clear() { |
1046 | | // @@protoc_insertion_point(message_clear_start:yb.NodeInstancePB) |
1047 | 10.6M | ::google::protobuf::uint32 cached_has_bits = 0; |
1048 | | // Prevent compiler warnings about cached_has_bits being unused |
1049 | 10.6M | (void) cached_has_bits; |
1050 | | |
1051 | 10.6M | cached_has_bits = _has_bits_[0]; |
1052 | 10.6M | if (cached_has_bits & 0x00000001u) { |
1053 | 4.25M | GOOGLE_DCHECK(!permanent_uuid_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); |
1054 | 4.25M | (*permanent_uuid_.UnsafeRawStringPointer())->clear(); |
1055 | 4.25M | } |
1056 | 10.6M | if (cached_has_bits & 6u) { |
1057 | 4.24M | ::memset(&instance_seqno_, 0, static_cast<size_t>( |
1058 | 4.24M | reinterpret_cast<char*>(&start_time_us_) - |
1059 | 4.24M | reinterpret_cast<char*>(&instance_seqno_)) + sizeof(start_time_us_)); |
1060 | 4.24M | } |
1061 | 10.6M | _has_bits_.Clear(); |
1062 | 10.6M | _internal_metadata_.Clear(); |
1063 | 10.6M | } |
1064 | | |
1065 | | bool NodeInstancePB::MergePartialFromCodedStream( |
1066 | 6.42M | ::google::protobuf::io::CodedInputStream* input) { |
1067 | 17.8M | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
1068 | 6.42M | ::google::protobuf::uint32 tag; |
1069 | | // @@protoc_insertion_point(parse_start:yb.NodeInstancePB) |
1070 | 24.2M | for (;;) { |
1071 | 24.2M | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1072 | 24.2M | tag = p.first; |
1073 | 24.2M | if (!p.second) goto handle_unusual; |
1074 | 17.8M | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1075 | | // required bytes permanent_uuid = 1; |
1076 | 6.40M | case 1: { |
1077 | 6.40M | if (static_cast< ::google::protobuf::uint8>(tag) == |
1078 | 6.40M | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
1079 | 6.40M | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
1080 | 6.40M | input, this->mutable_permanent_uuid())); |
1081 | 18.4E | } else { |
1082 | 18.4E | goto handle_unusual; |
1083 | 18.4E | } |
1084 | 6.40M | break; |
1085 | 6.40M | } |
1086 | | |
1087 | | // required int64 instance_seqno = 2; |
1088 | 6.42M | case 2: { |
1089 | 6.42M | if (static_cast< ::google::protobuf::uint8>(tag) == |
1090 | 6.42M | static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { |
1091 | 6.42M | set_has_instance_seqno(); |
1092 | 6.42M | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1093 | 6.42M | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
1094 | 6.42M | input, &instance_seqno_))); |
1095 | 18.4E | } else { |
1096 | 18.4E | goto handle_unusual; |
1097 | 18.4E | } |
1098 | 6.42M | break; |
1099 | 6.42M | } |
1100 | | |
1101 | | // optional uint64 start_time_us = 3; |
1102 | 5.05M | case 3: { |
1103 | 5.05M | if (static_cast< ::google::protobuf::uint8>(tag) == |
1104 | 5.05M | static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { |
1105 | 5.05M | set_has_start_time_us(); |
1106 | 5.05M | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1107 | 5.05M | ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
1108 | 5.05M | input, &start_time_us_))); |
1109 | 18.4E | } else { |
1110 | 18.4E | goto handle_unusual; |
1111 | 18.4E | } |
1112 | 5.05M | break; |
1113 | 6.40M | } |
1114 | | |
1115 | 0 | default: { |
1116 | 6.40M | handle_unusual: |
1117 | 6.41M | if (tag == 0) { |
1118 | 6.41M | goto success; |
1119 | 6.41M | } |
1120 | 18.4E | DO_(::google::protobuf::internal::WireFormat::SkipField( |
1121 | 18.4E | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1122 | 18.4E | break; |
1123 | 18.4E | } |
1124 | 17.8M | } |
1125 | 17.8M | } |
1126 | 6.41M | success: |
1127 | | // @@protoc_insertion_point(parse_success:yb.NodeInstancePB) |
1128 | 6.41M | return true; |
1129 | 0 | failure: |
1130 | | // @@protoc_insertion_point(parse_failure:yb.NodeInstancePB) |
1131 | 0 | return false; |
1132 | 6.42M | #undef DO_ |
1133 | 6.42M | } |
1134 | | |
1135 | | void NodeInstancePB::SerializeWithCachedSizes( |
1136 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
1137 | | // @@protoc_insertion_point(serialize_start:yb.NodeInstancePB) |
1138 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1139 | 0 | (void) cached_has_bits; |
1140 | |
|
1141 | 0 | cached_has_bits = _has_bits_[0]; |
1142 | | // required bytes permanent_uuid = 1; |
1143 | 0 | if (cached_has_bits & 0x00000001u) { |
1144 | 0 | ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( |
1145 | 0 | 1, this->permanent_uuid(), output); |
1146 | 0 | } |
1147 | | |
1148 | | // required int64 instance_seqno = 2; |
1149 | 0 | if (cached_has_bits & 0x00000002u) { |
1150 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->instance_seqno(), output); |
1151 | 0 | } |
1152 | | |
1153 | | // optional uint64 start_time_us = 3; |
1154 | 0 | if (cached_has_bits & 0x00000004u) { |
1155 | 0 | ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->start_time_us(), output); |
1156 | 0 | } |
1157 | |
|
1158 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1159 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
1160 | 0 | _internal_metadata_.unknown_fields(), output); |
1161 | 0 | } |
1162 | | // @@protoc_insertion_point(serialize_end:yb.NodeInstancePB) |
1163 | 0 | } |
1164 | | |
1165 | | ::google::protobuf::uint8* NodeInstancePB::InternalSerializeWithCachedSizesToArray( |
1166 | 6.37M | bool deterministic, ::google::protobuf::uint8* target) const { |
1167 | 6.37M | (void)deterministic; // Unused |
1168 | | // @@protoc_insertion_point(serialize_to_array_start:yb.NodeInstancePB) |
1169 | 6.37M | ::google::protobuf::uint32 cached_has_bits = 0; |
1170 | 6.37M | (void) cached_has_bits; |
1171 | | |
1172 | 6.37M | cached_has_bits = _has_bits_[0]; |
1173 | | // required bytes permanent_uuid = 1; |
1174 | 6.37M | if (cached_has_bits & 0x00000001u) { |
1175 | 6.37M | target = |
1176 | 6.37M | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
1177 | 6.37M | 1, this->permanent_uuid(), target); |
1178 | 6.37M | } |
1179 | | |
1180 | | // required int64 instance_seqno = 2; |
1181 | 6.37M | if (cached_has_bits & 0x00000002u) { |
1182 | 6.36M | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->instance_seqno(), target); |
1183 | 6.36M | } |
1184 | | |
1185 | | // optional uint64 start_time_us = 3; |
1186 | 6.37M | if (cached_has_bits & 0x00000004u) { |
1187 | 5.08M | target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->start_time_us(), target); |
1188 | 5.08M | } |
1189 | | |
1190 | 6.37M | if (_internal_metadata_.have_unknown_fields()) { |
1191 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
1192 | 0 | _internal_metadata_.unknown_fields(), target); |
1193 | 0 | } |
1194 | | // @@protoc_insertion_point(serialize_to_array_end:yb.NodeInstancePB) |
1195 | 6.37M | return target; |
1196 | 6.37M | } |
1197 | | |
1198 | 0 | size_t NodeInstancePB::RequiredFieldsByteSizeFallback() const { |
1199 | | // @@protoc_insertion_point(required_fields_byte_size_fallback_start:yb.NodeInstancePB) |
1200 | 0 | size_t total_size = 0; |
1201 | |
|
1202 | 0 | if (has_permanent_uuid()) { |
1203 | | // required bytes permanent_uuid = 1; |
1204 | 0 | total_size += 1 + |
1205 | 0 | ::google::protobuf::internal::WireFormatLite::BytesSize( |
1206 | 0 | this->permanent_uuid()); |
1207 | 0 | } |
1208 | |
|
1209 | 0 | if (has_instance_seqno()) { |
1210 | | // required int64 instance_seqno = 2; |
1211 | 0 | total_size += 1 + |
1212 | 0 | ::google::protobuf::internal::WireFormatLite::Int64Size( |
1213 | 0 | this->instance_seqno()); |
1214 | 0 | } |
1215 | |
|
1216 | 0 | return total_size; |
1217 | 0 | } |
1218 | 12.7M | size_t NodeInstancePB::ByteSizeLong() const { |
1219 | | // @@protoc_insertion_point(message_byte_size_start:yb.NodeInstancePB) |
1220 | 12.7M | size_t total_size = 0; |
1221 | | |
1222 | 12.7M | if (_internal_metadata_.have_unknown_fields()) { |
1223 | 0 | total_size += |
1224 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
1225 | 0 | _internal_metadata_.unknown_fields()); |
1226 | 0 | } |
1227 | 12.7M | if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. |
1228 | | // required bytes permanent_uuid = 1; |
1229 | 12.7M | total_size += 1 + |
1230 | 12.7M | ::google::protobuf::internal::WireFormatLite::BytesSize( |
1231 | 12.7M | this->permanent_uuid()); |
1232 | | |
1233 | | // required int64 instance_seqno = 2; |
1234 | 12.7M | total_size += 1 + |
1235 | 12.7M | ::google::protobuf::internal::WireFormatLite::Int64Size( |
1236 | 12.7M | this->instance_seqno()); |
1237 | | |
1238 | 6.64k | } else { |
1239 | 6.64k | total_size += RequiredFieldsByteSizeFallback(); |
1240 | 6.64k | } |
1241 | | // optional uint64 start_time_us = 3; |
1242 | 12.7M | if (has_start_time_us()) { |
1243 | 10.1M | total_size += 1 + |
1244 | 10.1M | ::google::protobuf::internal::WireFormatLite::UInt64Size( |
1245 | 10.1M | this->start_time_us()); |
1246 | 10.1M | } |
1247 | | |
1248 | 12.7M | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
1249 | 12.7M | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1250 | 12.7M | _cached_size_ = cached_size; |
1251 | 12.7M | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1252 | 12.7M | return total_size; |
1253 | 12.7M | } |
1254 | | |
1255 | 0 | void NodeInstancePB::MergeFrom(const ::google::protobuf::Message& from) { |
1256 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.NodeInstancePB) |
1257 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1258 | 0 | const NodeInstancePB* source = |
1259 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const NodeInstancePB>( |
1260 | 0 | &from); |
1261 | 0 | if (source == NULL) { |
1262 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.NodeInstancePB) |
1263 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
1264 | 0 | } else { |
1265 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.NodeInstancePB) |
1266 | 0 | MergeFrom(*source); |
1267 | 0 | } |
1268 | 0 | } |
1269 | | |
1270 | 11.9M | void NodeInstancePB::MergeFrom(const NodeInstancePB& from) { |
1271 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.NodeInstancePB) |
1272 | 11.9M | GOOGLE_DCHECK_NE(&from, this); |
1273 | 11.9M | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1274 | 11.9M | ::google::protobuf::uint32 cached_has_bits = 0; |
1275 | 11.9M | (void) cached_has_bits; |
1276 | | |
1277 | 11.9M | cached_has_bits = from._has_bits_[0]; |
1278 | 11.9M | if (cached_has_bits & 7u) { |
1279 | 11.9M | if (cached_has_bits & 0x00000001u) { |
1280 | 11.9M | set_has_permanent_uuid(); |
1281 | 11.9M | permanent_uuid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.permanent_uuid_); |
1282 | 11.9M | } |
1283 | 11.9M | if (cached_has_bits & 0x00000002u) { |
1284 | 11.9M | instance_seqno_ = from.instance_seqno_; |
1285 | 11.9M | } |
1286 | 11.8M | if (cached_has_bits & 0x00000004u) { |
1287 | 9.34M | start_time_us_ = from.start_time_us_; |
1288 | 9.34M | } |
1289 | 11.8M | _has_bits_[0] |= cached_has_bits; |
1290 | 11.8M | } |
1291 | 11.9M | } |
1292 | | |
1293 | 0 | void NodeInstancePB::CopyFrom(const ::google::protobuf::Message& from) { |
1294 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.NodeInstancePB) |
1295 | 0 | if (&from == this) return; |
1296 | 0 | Clear(); |
1297 | 0 | MergeFrom(from); |
1298 | 0 | } |
1299 | | |
1300 | 9.34M | void NodeInstancePB::CopyFrom(const NodeInstancePB& from) { |
1301 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.NodeInstancePB) |
1302 | 9.34M | if (&from == this) return; |
1303 | 9.34M | Clear(); |
1304 | 9.34M | MergeFrom(from); |
1305 | 9.34M | } |
1306 | | |
1307 | 12.7M | bool NodeInstancePB::IsInitialized() const { |
1308 | 12.7M | if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; |
1309 | 12.7M | return true; |
1310 | 12.7M | } |
1311 | | |
1312 | 0 | void NodeInstancePB::Swap(NodeInstancePB* other) { |
1313 | 0 | if (other == this) return; |
1314 | 0 | InternalSwap(other); |
1315 | 0 | } |
1316 | 20.4k | void NodeInstancePB::InternalSwap(NodeInstancePB* other) { |
1317 | 20.4k | using std::swap; |
1318 | 20.4k | permanent_uuid_.Swap(&other->permanent_uuid_); |
1319 | 20.4k | swap(instance_seqno_, other->instance_seqno_); |
1320 | 20.4k | swap(start_time_us_, other->start_time_us_); |
1321 | 20.4k | swap(_has_bits_[0], other->_has_bits_[0]); |
1322 | 20.4k | _internal_metadata_.Swap(&other->_internal_metadata_); |
1323 | 20.4k | swap(_cached_size_, other->_cached_size_); |
1324 | 20.4k | } |
1325 | | |
1326 | 397k | ::google::protobuf::Metadata NodeInstancePB::GetMetadata() const { |
1327 | 397k | protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::protobuf_AssignDescriptorsOnce(); |
1328 | 397k | return ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages]; |
1329 | 397k | } |
1330 | | |
1331 | | |
1332 | | // =================================================================== |
1333 | | |
1334 | 17.1k | void ServerRegistrationPB::InitAsDefaultInstance() { |
1335 | 17.1k | ::yb::_ServerRegistrationPB_default_instance_._instance.get_mutable()->cloud_info_ = const_cast< ::yb::CloudInfoPB*>( |
1336 | 17.1k | ::yb::CloudInfoPB::internal_default_instance()); |
1337 | 17.1k | } |
1338 | 0 | void ServerRegistrationPB::clear_private_rpc_addresses() { |
1339 | 0 | private_rpc_addresses_.Clear(); |
1340 | 0 | } |
1341 | 0 | void ServerRegistrationPB::clear_broadcast_addresses() { |
1342 | 0 | broadcast_addresses_.Clear(); |
1343 | 0 | } |
1344 | 0 | void ServerRegistrationPB::clear_http_addresses() { |
1345 | 0 | http_addresses_.Clear(); |
1346 | 0 | } |
1347 | 0 | void ServerRegistrationPB::clear_cloud_info() { |
1348 | 0 | if (cloud_info_ != NULL) cloud_info_->Clear(); |
1349 | 0 | clear_has_cloud_info(); |
1350 | 0 | } |
1351 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
1352 | | const int ServerRegistrationPB::kPrivateRpcAddressesFieldNumber; |
1353 | | const int ServerRegistrationPB::kBroadcastAddressesFieldNumber; |
1354 | | const int ServerRegistrationPB::kHttpAddressesFieldNumber; |
1355 | | const int ServerRegistrationPB::kPgPortFieldNumber; |
1356 | | const int ServerRegistrationPB::kCloudInfoFieldNumber; |
1357 | | const int ServerRegistrationPB::kPlacementUuidFieldNumber; |
1358 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
1359 | | |
1360 | | ServerRegistrationPB::ServerRegistrationPB() |
1361 | 11.7M | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
1362 | 11.7M | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
1363 | 11.7M | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsServerRegistrationPB(); |
1364 | 11.7M | } |
1365 | 11.7M | SharedCtor(); |
1366 | | // @@protoc_insertion_point(constructor:yb.ServerRegistrationPB) |
1367 | 11.7M | } |
1368 | | ServerRegistrationPB::ServerRegistrationPB(const ServerRegistrationPB& from) |
1369 | | : ::google::protobuf::Message(), |
1370 | | _internal_metadata_(NULL), |
1371 | | _has_bits_(from._has_bits_), |
1372 | | _cached_size_(0), |
1373 | | private_rpc_addresses_(from.private_rpc_addresses_), |
1374 | | http_addresses_(from.http_addresses_), |
1375 | 1.17M | broadcast_addresses_(from.broadcast_addresses_) { |
1376 | 1.17M | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1377 | 1.17M | placement_uuid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1378 | 1.17M | if (from.has_placement_uuid()) { |
1379 | 1.17M | placement_uuid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.placement_uuid_); |
1380 | 1.17M | } |
1381 | 1.17M | if (from.has_cloud_info()) { |
1382 | 1.17M | cloud_info_ = new ::yb::CloudInfoPB(*from.cloud_info_); |
1383 | 452 | } else { |
1384 | 452 | cloud_info_ = NULL; |
1385 | 452 | } |
1386 | 1.17M | pg_port_ = from.pg_port_; |
1387 | | // @@protoc_insertion_point(copy_constructor:yb.ServerRegistrationPB) |
1388 | 1.17M | } |
1389 | | |
1390 | 11.7M | void ServerRegistrationPB::SharedCtor() { |
1391 | 11.7M | _cached_size_ = 0; |
1392 | 11.7M | placement_uuid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1393 | 11.7M | cloud_info_ = NULL; |
1394 | 11.7M | pg_port_ = 5433u; |
1395 | 11.7M | } |
1396 | | |
1397 | 12.8M | ServerRegistrationPB::~ServerRegistrationPB() { |
1398 | | // @@protoc_insertion_point(destructor:yb.ServerRegistrationPB) |
1399 | 12.8M | SharedDtor(); |
1400 | 12.8M | } |
1401 | | |
1402 | 12.8M | void ServerRegistrationPB::SharedDtor() { |
1403 | 12.8M | placement_uuid_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1404 | 12.8M | if (this != internal_default_instance()) delete cloud_info_; |
1405 | 12.8M | } |
1406 | | |
1407 | 0 | void ServerRegistrationPB::SetCachedSize(int size) const { |
1408 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1409 | 0 | _cached_size_ = size; |
1410 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1411 | 0 | } |
1412 | 0 | const ::google::protobuf::Descriptor* ServerRegistrationPB::descriptor() { |
1413 | 0 | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::protobuf_AssignDescriptorsOnce(); |
1414 | 0 | return ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
1415 | 0 | } |
1416 | | |
1417 | 0 | const ServerRegistrationPB& ServerRegistrationPB::default_instance() { |
1418 | 0 | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsServerRegistrationPB(); |
1419 | 0 | return *internal_default_instance(); |
1420 | 0 | } |
1421 | | |
1422 | 0 | ServerRegistrationPB* ServerRegistrationPB::New(::google::protobuf::Arena* arena) const { |
1423 | 0 | ServerRegistrationPB* n = new ServerRegistrationPB; |
1424 | 0 | if (arena != NULL) { |
1425 | 0 | arena->Own(n); |
1426 | 0 | } |
1427 | 0 | return n; |
1428 | 0 | } |
1429 | | |
1430 | 9.46M | void ServerRegistrationPB::Clear() { |
1431 | | // @@protoc_insertion_point(message_clear_start:yb.ServerRegistrationPB) |
1432 | 9.46M | ::google::protobuf::uint32 cached_has_bits = 0; |
1433 | | // Prevent compiler warnings about cached_has_bits being unused |
1434 | 9.46M | (void) cached_has_bits; |
1435 | | |
1436 | 9.46M | private_rpc_addresses_.Clear(); |
1437 | 9.46M | http_addresses_.Clear(); |
1438 | 9.46M | broadcast_addresses_.Clear(); |
1439 | 9.46M | cached_has_bits = _has_bits_[0]; |
1440 | 9.46M | if (cached_has_bits & 7u) { |
1441 | 3.86M | if (cached_has_bits & 0x00000001u) { |
1442 | 3.86M | GOOGLE_DCHECK(!placement_uuid_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); |
1443 | 3.86M | (*placement_uuid_.UnsafeRawStringPointer())->clear(); |
1444 | 3.86M | } |
1445 | 3.86M | if (cached_has_bits & 0x00000002u) { |
1446 | 3.85M | GOOGLE_DCHECK(cloud_info_ != NULL); |
1447 | 3.85M | cloud_info_->Clear(); |
1448 | 3.85M | } |
1449 | 3.86M | pg_port_ = 5433u; |
1450 | 3.86M | } |
1451 | 9.46M | _has_bits_.Clear(); |
1452 | 9.46M | _internal_metadata_.Clear(); |
1453 | 9.46M | } |
1454 | | |
1455 | | bool ServerRegistrationPB::MergePartialFromCodedStream( |
1456 | 5.24M | ::google::protobuf::io::CodedInputStream* input) { |
1457 | 22.3M | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
1458 | 5.24M | ::google::protobuf::uint32 tag; |
1459 | | // @@protoc_insertion_point(parse_start:yb.ServerRegistrationPB) |
1460 | 27.5M | for (;;) { |
1461 | 27.5M | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1462 | 27.5M | tag = p.first; |
1463 | 27.5M | if (!p.second) goto handle_unusual; |
1464 | 22.3M | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1465 | | // repeated .yb.HostPortPB private_rpc_addresses = 1; |
1466 | 5.24M | case 1: { |
1467 | 5.24M | if (static_cast< ::google::protobuf::uint8>(tag) == |
1468 | 5.24M | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
1469 | 5.24M | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_private_rpc_addresses())); |
1470 | 186 | } else { |
1471 | 186 | goto handle_unusual; |
1472 | 186 | } |
1473 | 5.24M | break; |
1474 | 5.24M | } |
1475 | | |
1476 | | // repeated .yb.HostPortPB http_addresses = 2; |
1477 | 5.22M | case 2: { |
1478 | 5.22M | if (static_cast< ::google::protobuf::uint8>(tag) == |
1479 | 5.21M | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
1480 | 5.21M | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_http_addresses())); |
1481 | 1.58k | } else { |
1482 | 1.58k | goto handle_unusual; |
1483 | 1.58k | } |
1484 | 5.21M | break; |
1485 | 5.21M | } |
1486 | | |
1487 | | // optional .yb.CloudInfoPB cloud_info = 3; |
1488 | 5.24M | case 3: { |
1489 | 5.24M | if (static_cast< ::google::protobuf::uint8>(tag) == |
1490 | 5.24M | static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { |
1491 | 5.24M | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
1492 | 5.24M | input, mutable_cloud_info())); |
1493 | 18.4E | } else { |
1494 | 18.4E | goto handle_unusual; |
1495 | 18.4E | } |
1496 | 5.24M | break; |
1497 | 5.24M | } |
1498 | | |
1499 | | // optional bytes placement_uuid = 4; |
1500 | 5.24M | case 4: { |
1501 | 5.24M | if (static_cast< ::google::protobuf::uint8>(tag) == |
1502 | 5.24M | static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { |
1503 | 5.24M | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
1504 | 5.24M | input, this->mutable_placement_uuid())); |
1505 | 18.4E | } else { |
1506 | 18.4E | goto handle_unusual; |
1507 | 18.4E | } |
1508 | 5.24M | break; |
1509 | 5.24M | } |
1510 | | |
1511 | | // repeated .yb.HostPortPB broadcast_addresses = 5; |
1512 | 46.6k | case 5: { |
1513 | 46.6k | if (static_cast< ::google::protobuf::uint8>(tag) == |
1514 | 46.6k | static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { |
1515 | 46.6k | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_broadcast_addresses())); |
1516 | 18.4E | } else { |
1517 | 18.4E | goto handle_unusual; |
1518 | 18.4E | } |
1519 | 46.6k | break; |
1520 | 46.6k | } |
1521 | | |
1522 | | // optional uint32 pg_port = 6 [default = 5433]; |
1523 | 1.37M | case 6: { |
1524 | 1.37M | if (static_cast< ::google::protobuf::uint8>(tag) == |
1525 | 1.37M | static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { |
1526 | 1.37M | set_has_pg_port(); |
1527 | 1.37M | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1528 | 1.37M | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
1529 | 1.37M | input, &pg_port_))); |
1530 | 0 | } else { |
1531 | 0 | goto handle_unusual; |
1532 | 0 | } |
1533 | 1.37M | break; |
1534 | 5.24M | } |
1535 | | |
1536 | 0 | default: { |
1537 | 5.24M | handle_unusual: |
1538 | 5.24M | if (tag == 0) { |
1539 | 5.24M | goto success; |
1540 | 5.24M | } |
1541 | 18.4E | DO_(::google::protobuf::internal::WireFormat::SkipField( |
1542 | 18.4E | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1543 | 18.4E | break; |
1544 | 18.4E | } |
1545 | 22.3M | } |
1546 | 22.3M | } |
1547 | 5.24M | success: |
1548 | | // @@protoc_insertion_point(parse_success:yb.ServerRegistrationPB) |
1549 | 5.24M | return true; |
1550 | 0 | failure: |
1551 | | // @@protoc_insertion_point(parse_failure:yb.ServerRegistrationPB) |
1552 | 0 | return false; |
1553 | 5.24M | #undef DO_ |
1554 | 5.24M | } |
1555 | | |
1556 | | void ServerRegistrationPB::SerializeWithCachedSizes( |
1557 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
1558 | | // @@protoc_insertion_point(serialize_start:yb.ServerRegistrationPB) |
1559 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1560 | 0 | (void) cached_has_bits; |
1561 | | |
1562 | | // repeated .yb.HostPortPB private_rpc_addresses = 1; |
1563 | 0 | for (unsigned int i = 0, |
1564 | 0 | n = static_cast<unsigned int>(this->private_rpc_addresses_size()); i < n; i++) { |
1565 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
1566 | 0 | 1, this->private_rpc_addresses(static_cast<int>(i)), output); |
1567 | 0 | } |
1568 | | |
1569 | | // repeated .yb.HostPortPB http_addresses = 2; |
1570 | 0 | for (unsigned int i = 0, |
1571 | 0 | n = static_cast<unsigned int>(this->http_addresses_size()); i < n; i++) { |
1572 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
1573 | 0 | 2, this->http_addresses(static_cast<int>(i)), output); |
1574 | 0 | } |
1575 | |
|
1576 | 0 | cached_has_bits = _has_bits_[0]; |
1577 | | // optional .yb.CloudInfoPB cloud_info = 3; |
1578 | 0 | if (cached_has_bits & 0x00000002u) { |
1579 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
1580 | 0 | 3, *this->cloud_info_, output); |
1581 | 0 | } |
1582 | | |
1583 | | // optional bytes placement_uuid = 4; |
1584 | 0 | if (cached_has_bits & 0x00000001u) { |
1585 | 0 | ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( |
1586 | 0 | 4, this->placement_uuid(), output); |
1587 | 0 | } |
1588 | | |
1589 | | // repeated .yb.HostPortPB broadcast_addresses = 5; |
1590 | 0 | for (unsigned int i = 0, |
1591 | 0 | n = static_cast<unsigned int>(this->broadcast_addresses_size()); i < n; i++) { |
1592 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
1593 | 0 | 5, this->broadcast_addresses(static_cast<int>(i)), output); |
1594 | 0 | } |
1595 | | |
1596 | | // optional uint32 pg_port = 6 [default = 5433]; |
1597 | 0 | if (cached_has_bits & 0x00000004u) { |
1598 | 0 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->pg_port(), output); |
1599 | 0 | } |
1600 | |
|
1601 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1602 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
1603 | 0 | _internal_metadata_.unknown_fields(), output); |
1604 | 0 | } |
1605 | | // @@protoc_insertion_point(serialize_end:yb.ServerRegistrationPB) |
1606 | 0 | } |
1607 | | |
1608 | | ::google::protobuf::uint8* ServerRegistrationPB::InternalSerializeWithCachedSizesToArray( |
1609 | 5.18M | bool deterministic, ::google::protobuf::uint8* target) const { |
1610 | 5.18M | (void)deterministic; // Unused |
1611 | | // @@protoc_insertion_point(serialize_to_array_start:yb.ServerRegistrationPB) |
1612 | 5.18M | ::google::protobuf::uint32 cached_has_bits = 0; |
1613 | 5.18M | (void) cached_has_bits; |
1614 | | |
1615 | | // repeated .yb.HostPortPB private_rpc_addresses = 1; |
1616 | 5.18M | for (unsigned int i = 0, |
1617 | 10.3M | n = static_cast<unsigned int>(this->private_rpc_addresses_size()); i < n; i++) { |
1618 | 5.19M | target = ::google::protobuf::internal::WireFormatLite:: |
1619 | 5.19M | InternalWriteMessageToArray( |
1620 | 5.19M | 1, this->private_rpc_addresses(static_cast<int>(i)), deterministic, target); |
1621 | 5.19M | } |
1622 | | |
1623 | | // repeated .yb.HostPortPB http_addresses = 2; |
1624 | 5.18M | for (unsigned int i = 0, |
1625 | 10.3M | n = static_cast<unsigned int>(this->http_addresses_size()); i < n; i++) { |
1626 | 5.17M | target = ::google::protobuf::internal::WireFormatLite:: |
1627 | 5.17M | InternalWriteMessageToArray( |
1628 | 5.17M | 2, this->http_addresses(static_cast<int>(i)), deterministic, target); |
1629 | 5.17M | } |
1630 | | |
1631 | 5.18M | cached_has_bits = _has_bits_[0]; |
1632 | | // optional .yb.CloudInfoPB cloud_info = 3; |
1633 | 5.19M | if (cached_has_bits & 0x00000002u) { |
1634 | 5.19M | target = ::google::protobuf::internal::WireFormatLite:: |
1635 | 5.19M | InternalWriteMessageToArray( |
1636 | 5.19M | 3, *this->cloud_info_, deterministic, target); |
1637 | 5.19M | } |
1638 | | |
1639 | | // optional bytes placement_uuid = 4; |
1640 | 5.19M | if (cached_has_bits & 0x00000001u) { |
1641 | 5.19M | target = |
1642 | 5.19M | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
1643 | 5.19M | 4, this->placement_uuid(), target); |
1644 | 5.19M | } |
1645 | | |
1646 | | // repeated .yb.HostPortPB broadcast_addresses = 5; |
1647 | 5.18M | for (unsigned int i = 0, |
1648 | 5.23M | n = static_cast<unsigned int>(this->broadcast_addresses_size()); i < n; i++) { |
1649 | 46.3k | target = ::google::protobuf::internal::WireFormatLite:: |
1650 | 46.3k | InternalWriteMessageToArray( |
1651 | 46.3k | 5, this->broadcast_addresses(static_cast<int>(i)), deterministic, target); |
1652 | 46.3k | } |
1653 | | |
1654 | | // optional uint32 pg_port = 6 [default = 5433]; |
1655 | 5.18M | if (cached_has_bits & 0x00000004u) { |
1656 | 1.28M | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, this->pg_port(), target); |
1657 | 1.28M | } |
1658 | | |
1659 | 5.18M | if (_internal_metadata_.have_unknown_fields()) { |
1660 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
1661 | 0 | _internal_metadata_.unknown_fields(), target); |
1662 | 0 | } |
1663 | | // @@protoc_insertion_point(serialize_to_array_end:yb.ServerRegistrationPB) |
1664 | 5.18M | return target; |
1665 | 5.18M | } |
1666 | | |
1667 | 10.3M | size_t ServerRegistrationPB::ByteSizeLong() const { |
1668 | | // @@protoc_insertion_point(message_byte_size_start:yb.ServerRegistrationPB) |
1669 | 10.3M | size_t total_size = 0; |
1670 | | |
1671 | 10.3M | if (_internal_metadata_.have_unknown_fields()) { |
1672 | 0 | total_size += |
1673 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
1674 | 0 | _internal_metadata_.unknown_fields()); |
1675 | 0 | } |
1676 | | // repeated .yb.HostPortPB private_rpc_addresses = 1; |
1677 | 10.3M | { |
1678 | 10.3M | unsigned int count = static_cast<unsigned int>(this->private_rpc_addresses_size()); |
1679 | 10.3M | total_size += 1UL * count; |
1680 | 20.7M | for (unsigned int i = 0; i < count; i++) { |
1681 | 10.3M | total_size += |
1682 | 10.3M | ::google::protobuf::internal::WireFormatLite::MessageSize( |
1683 | 10.3M | this->private_rpc_addresses(static_cast<int>(i))); |
1684 | 10.3M | } |
1685 | 10.3M | } |
1686 | | |
1687 | | // repeated .yb.HostPortPB http_addresses = 2; |
1688 | 10.3M | { |
1689 | 10.3M | unsigned int count = static_cast<unsigned int>(this->http_addresses_size()); |
1690 | 10.3M | total_size += 1UL * count; |
1691 | 20.7M | for (unsigned int i = 0; i < count; i++) { |
1692 | 10.3M | total_size += |
1693 | 10.3M | ::google::protobuf::internal::WireFormatLite::MessageSize( |
1694 | 10.3M | this->http_addresses(static_cast<int>(i))); |
1695 | 10.3M | } |
1696 | 10.3M | } |
1697 | | |
1698 | | // repeated .yb.HostPortPB broadcast_addresses = 5; |
1699 | 10.3M | { |
1700 | 10.3M | unsigned int count = static_cast<unsigned int>(this->broadcast_addresses_size()); |
1701 | 10.3M | total_size += 1UL * count; |
1702 | 10.4M | for (unsigned int i = 0; i < count; i++) { |
1703 | 92.7k | total_size += |
1704 | 92.7k | ::google::protobuf::internal::WireFormatLite::MessageSize( |
1705 | 92.7k | this->broadcast_addresses(static_cast<int>(i))); |
1706 | 92.7k | } |
1707 | 10.3M | } |
1708 | | |
1709 | 10.3M | if (_has_bits_[0 / 32] & 7u) { |
1710 | | // optional bytes placement_uuid = 4; |
1711 | 10.3M | if (has_placement_uuid()) { |
1712 | 10.3M | total_size += 1 + |
1713 | 10.3M | ::google::protobuf::internal::WireFormatLite::BytesSize( |
1714 | 10.3M | this->placement_uuid()); |
1715 | 10.3M | } |
1716 | | |
1717 | | // optional .yb.CloudInfoPB cloud_info = 3; |
1718 | 10.3M | if (has_cloud_info()) { |
1719 | 10.3M | total_size += 1 + |
1720 | 10.3M | ::google::protobuf::internal::WireFormatLite::MessageSize( |
1721 | 10.3M | *this->cloud_info_); |
1722 | 10.3M | } |
1723 | | |
1724 | | // optional uint32 pg_port = 6 [default = 5433]; |
1725 | 10.3M | if (has_pg_port()) { |
1726 | 2.55M | total_size += 1 + |
1727 | 2.55M | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
1728 | 2.55M | this->pg_port()); |
1729 | 2.55M | } |
1730 | | |
1731 | 10.3M | } |
1732 | 10.3M | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
1733 | 10.3M | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1734 | 10.3M | _cached_size_ = cached_size; |
1735 | 10.3M | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1736 | 10.3M | return total_size; |
1737 | 10.3M | } |
1738 | | |
1739 | 0 | void ServerRegistrationPB::MergeFrom(const ::google::protobuf::Message& from) { |
1740 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.ServerRegistrationPB) |
1741 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1742 | 0 | const ServerRegistrationPB* source = |
1743 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const ServerRegistrationPB>( |
1744 | 0 | &from); |
1745 | 0 | if (source == NULL) { |
1746 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.ServerRegistrationPB) |
1747 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
1748 | 0 | } else { |
1749 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.ServerRegistrationPB) |
1750 | 0 | MergeFrom(*source); |
1751 | 0 | } |
1752 | 0 | } |
1753 | | |
1754 | 10.7M | void ServerRegistrationPB::MergeFrom(const ServerRegistrationPB& from) { |
1755 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.ServerRegistrationPB) |
1756 | 10.7M | GOOGLE_DCHECK_NE(&from, this); |
1757 | 10.7M | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1758 | 10.7M | ::google::protobuf::uint32 cached_has_bits = 0; |
1759 | 10.7M | (void) cached_has_bits; |
1760 | | |
1761 | 10.7M | private_rpc_addresses_.MergeFrom(from.private_rpc_addresses_); |
1762 | 10.7M | http_addresses_.MergeFrom(from.http_addresses_); |
1763 | 10.7M | broadcast_addresses_.MergeFrom(from.broadcast_addresses_); |
1764 | 10.7M | cached_has_bits = from._has_bits_[0]; |
1765 | 10.7M | if (cached_has_bits & 7u) { |
1766 | 10.3M | if (cached_has_bits & 0x00000001u) { |
1767 | 10.3M | set_has_placement_uuid(); |
1768 | 10.3M | placement_uuid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.placement_uuid_); |
1769 | 10.3M | } |
1770 | 10.3M | if (cached_has_bits & 0x00000002u) { |
1771 | 10.3M | mutable_cloud_info()->::yb::CloudInfoPB::MergeFrom(from.cloud_info()); |
1772 | 10.3M | } |
1773 | 10.3M | if (cached_has_bits & 0x00000004u) { |
1774 | 2.57M | pg_port_ = from.pg_port_; |
1775 | 2.57M | } |
1776 | 10.3M | _has_bits_[0] |= cached_has_bits; |
1777 | 10.3M | } |
1778 | 10.7M | } |
1779 | | |
1780 | 0 | void ServerRegistrationPB::CopyFrom(const ::google::protobuf::Message& from) { |
1781 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.ServerRegistrationPB) |
1782 | 0 | if (&from == this) return; |
1783 | 0 | Clear(); |
1784 | 0 | MergeFrom(from); |
1785 | 0 | } |
1786 | | |
1787 | 8.15M | void ServerRegistrationPB::CopyFrom(const ServerRegistrationPB& from) { |
1788 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.ServerRegistrationPB) |
1789 | 8.15M | if (&from == this) return; |
1790 | 8.15M | Clear(); |
1791 | 8.15M | MergeFrom(from); |
1792 | 8.15M | } |
1793 | | |
1794 | 10.4M | bool ServerRegistrationPB::IsInitialized() const { |
1795 | 10.4M | if (!::google::protobuf::internal::AllAreInitialized(this->private_rpc_addresses())) return false; |
1796 | 10.4M | if (!::google::protobuf::internal::AllAreInitialized(this->http_addresses())) return false; |
1797 | 10.4M | if (!::google::protobuf::internal::AllAreInitialized(this->broadcast_addresses())) return false; |
1798 | 10.4M | return true; |
1799 | 10.4M | } |
1800 | | |
1801 | 0 | void ServerRegistrationPB::Swap(ServerRegistrationPB* other) { |
1802 | 0 | if (other == this) return; |
1803 | 0 | InternalSwap(other); |
1804 | 0 | } |
1805 | 0 | void ServerRegistrationPB::InternalSwap(ServerRegistrationPB* other) { |
1806 | 0 | using std::swap; |
1807 | 0 | private_rpc_addresses_.InternalSwap(&other->private_rpc_addresses_); |
1808 | 0 | http_addresses_.InternalSwap(&other->http_addresses_); |
1809 | 0 | broadcast_addresses_.InternalSwap(&other->broadcast_addresses_); |
1810 | 0 | placement_uuid_.Swap(&other->placement_uuid_); |
1811 | 0 | swap(cloud_info_, other->cloud_info_); |
1812 | 0 | swap(pg_port_, other->pg_port_); |
1813 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
1814 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1815 | 0 | swap(_cached_size_, other->_cached_size_); |
1816 | 0 | } |
1817 | | |
1818 | 106k | ::google::protobuf::Metadata ServerRegistrationPB::GetMetadata() const { |
1819 | 106k | protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::protobuf_AssignDescriptorsOnce(); |
1820 | 106k | return ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages]; |
1821 | 106k | } |
1822 | | |
1823 | | |
1824 | | // =================================================================== |
1825 | | |
1826 | 17.1k | void ServerEntryPB::InitAsDefaultInstance() { |
1827 | 17.1k | ::yb::_ServerEntryPB_default_instance_._instance.get_mutable()->error_ = const_cast< ::yb::AppStatusPB*>( |
1828 | 17.1k | ::yb::AppStatusPB::internal_default_instance()); |
1829 | 17.1k | ::yb::_ServerEntryPB_default_instance_._instance.get_mutable()->instance_id_ = const_cast< ::yb::NodeInstancePB*>( |
1830 | 17.1k | ::yb::NodeInstancePB::internal_default_instance()); |
1831 | 17.1k | ::yb::_ServerEntryPB_default_instance_._instance.get_mutable()->registration_ = const_cast< ::yb::ServerRegistrationPB*>( |
1832 | 17.1k | ::yb::ServerRegistrationPB::internal_default_instance()); |
1833 | 17.1k | } |
1834 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
1835 | | const int ServerEntryPB::kErrorFieldNumber; |
1836 | | const int ServerEntryPB::kInstanceIdFieldNumber; |
1837 | | const int ServerEntryPB::kRegistrationFieldNumber; |
1838 | | const int ServerEntryPB::kRoleFieldNumber; |
1839 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
1840 | | |
1841 | | ServerEntryPB::ServerEntryPB() |
1842 | 1.32M | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
1843 | 1.30M | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
1844 | 1.30M | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsServerEntryPB(); |
1845 | 1.30M | } |
1846 | 1.32M | SharedCtor(); |
1847 | | // @@protoc_insertion_point(constructor:yb.ServerEntryPB) |
1848 | 1.32M | } |
1849 | | ServerEntryPB::ServerEntryPB(const ServerEntryPB& from) |
1850 | | : ::google::protobuf::Message(), |
1851 | | _internal_metadata_(NULL), |
1852 | | _has_bits_(from._has_bits_), |
1853 | 322 | _cached_size_(0) { |
1854 | 322 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1855 | 322 | if (from.has_error()) { |
1856 | 0 | error_ = new ::yb::AppStatusPB(*from.error_); |
1857 | 322 | } else { |
1858 | 322 | error_ = NULL; |
1859 | 322 | } |
1860 | 322 | if (from.has_instance_id()) { |
1861 | 322 | instance_id_ = new ::yb::NodeInstancePB(*from.instance_id_); |
1862 | 0 | } else { |
1863 | 0 | instance_id_ = NULL; |
1864 | 0 | } |
1865 | 322 | if (from.has_registration()) { |
1866 | 322 | registration_ = new ::yb::ServerRegistrationPB(*from.registration_); |
1867 | 0 | } else { |
1868 | 0 | registration_ = NULL; |
1869 | 0 | } |
1870 | 322 | role_ = from.role_; |
1871 | | // @@protoc_insertion_point(copy_constructor:yb.ServerEntryPB) |
1872 | 322 | } |
1873 | | |
1874 | 1.32M | void ServerEntryPB::SharedCtor() { |
1875 | 1.32M | _cached_size_ = 0; |
1876 | 1.32M | ::memset(&error_, 0, static_cast<size_t>( |
1877 | 1.32M | reinterpret_cast<char*>(&role_) - |
1878 | 1.32M | reinterpret_cast<char*>(&error_)) + sizeof(role_)); |
1879 | 1.32M | } |
1880 | | |
1881 | 1.30M | ServerEntryPB::~ServerEntryPB() { |
1882 | | // @@protoc_insertion_point(destructor:yb.ServerEntryPB) |
1883 | 1.30M | SharedDtor(); |
1884 | 1.30M | } |
1885 | | |
1886 | 1.30M | void ServerEntryPB::SharedDtor() { |
1887 | 1.30M | if (this != internal_default_instance()) delete error_; |
1888 | 1.30M | if (this != internal_default_instance()) delete instance_id_; |
1889 | 1.30M | if (this != internal_default_instance()) delete registration_; |
1890 | 1.30M | } |
1891 | | |
1892 | 0 | void ServerEntryPB::SetCachedSize(int size) const { |
1893 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1894 | 0 | _cached_size_ = size; |
1895 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1896 | 0 | } |
1897 | 0 | const ::google::protobuf::Descriptor* ServerEntryPB::descriptor() { |
1898 | 0 | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::protobuf_AssignDescriptorsOnce(); |
1899 | 0 | return ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
1900 | 0 | } |
1901 | | |
1902 | 0 | const ServerEntryPB& ServerEntryPB::default_instance() { |
1903 | 0 | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsServerEntryPB(); |
1904 | 0 | return *internal_default_instance(); |
1905 | 0 | } |
1906 | | |
1907 | 0 | ServerEntryPB* ServerEntryPB::New(::google::protobuf::Arena* arena) const { |
1908 | 0 | ServerEntryPB* n = new ServerEntryPB; |
1909 | 0 | if (arena != NULL) { |
1910 | 0 | arena->Own(n); |
1911 | 0 | } |
1912 | 0 | return n; |
1913 | 0 | } |
1914 | | |
1915 | 169 | void ServerEntryPB::Clear() { |
1916 | | // @@protoc_insertion_point(message_clear_start:yb.ServerEntryPB) |
1917 | 169 | ::google::protobuf::uint32 cached_has_bits = 0; |
1918 | | // Prevent compiler warnings about cached_has_bits being unused |
1919 | 169 | (void) cached_has_bits; |
1920 | | |
1921 | 169 | cached_has_bits = _has_bits_[0]; |
1922 | 169 | if (cached_has_bits & 7u) { |
1923 | 0 | if (cached_has_bits & 0x00000001u) { |
1924 | 0 | GOOGLE_DCHECK(error_ != NULL); |
1925 | 0 | error_->Clear(); |
1926 | 0 | } |
1927 | 0 | if (cached_has_bits & 0x00000002u) { |
1928 | 0 | GOOGLE_DCHECK(instance_id_ != NULL); |
1929 | 0 | instance_id_->Clear(); |
1930 | 0 | } |
1931 | 0 | if (cached_has_bits & 0x00000004u) { |
1932 | 0 | GOOGLE_DCHECK(registration_ != NULL); |
1933 | 0 | registration_->Clear(); |
1934 | 0 | } |
1935 | 0 | } |
1936 | 169 | role_ = 0; |
1937 | 169 | _has_bits_.Clear(); |
1938 | 169 | _internal_metadata_.Clear(); |
1939 | 169 | } |
1940 | | |
1941 | | bool ServerEntryPB::MergePartialFromCodedStream( |
1942 | 82 | ::google::protobuf::io::CodedInputStream* input) { |
1943 | 246 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
1944 | 82 | ::google::protobuf::uint32 tag; |
1945 | | // @@protoc_insertion_point(parse_start:yb.ServerEntryPB) |
1946 | 328 | for (;;) { |
1947 | 328 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1948 | 328 | tag = p.first; |
1949 | 328 | if (!p.second) goto handle_unusual; |
1950 | 246 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1951 | | // optional .yb.AppStatusPB error = 1; |
1952 | 0 | case 1: { |
1953 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1954 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
1955 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
1956 | 0 | input, mutable_error())); |
1957 | 0 | } else { |
1958 | 0 | goto handle_unusual; |
1959 | 0 | } |
1960 | 0 | break; |
1961 | 0 | } |
1962 | | |
1963 | | // optional .yb.NodeInstancePB instance_id = 2; |
1964 | 82 | case 2: { |
1965 | 82 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1966 | 82 | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
1967 | 82 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
1968 | 82 | input, mutable_instance_id())); |
1969 | 0 | } else { |
1970 | 0 | goto handle_unusual; |
1971 | 0 | } |
1972 | 82 | break; |
1973 | 82 | } |
1974 | | |
1975 | | // optional .yb.ServerRegistrationPB registration = 3; |
1976 | 82 | case 3: { |
1977 | 82 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1978 | 82 | static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { |
1979 | 82 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
1980 | 82 | input, mutable_registration())); |
1981 | 0 | } else { |
1982 | 0 | goto handle_unusual; |
1983 | 0 | } |
1984 | 82 | break; |
1985 | 82 | } |
1986 | | |
1987 | | // optional .yb.PeerRole role = 4; |
1988 | 82 | case 4: { |
1989 | 82 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1990 | 82 | static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { |
1991 | 82 | int value; |
1992 | 82 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1993 | 82 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
1994 | 82 | input, &value))); |
1995 | 82 | if (::yb::PeerRole_IsValid(value)) { |
1996 | 82 | set_role(static_cast< ::yb::PeerRole >(value)); |
1997 | 0 | } else { |
1998 | 0 | mutable_unknown_fields()->AddVarint( |
1999 | 0 | 4, static_cast< ::google::protobuf::uint64>(value)); |
2000 | 0 | } |
2001 | 0 | } else { |
2002 | 0 | goto handle_unusual; |
2003 | 0 | } |
2004 | 82 | break; |
2005 | 82 | } |
2006 | | |
2007 | 0 | default: { |
2008 | 82 | handle_unusual: |
2009 | 82 | if (tag == 0) { |
2010 | 82 | goto success; |
2011 | 82 | } |
2012 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
2013 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2014 | 0 | break; |
2015 | 0 | } |
2016 | 246 | } |
2017 | 246 | } |
2018 | 82 | success: |
2019 | | // @@protoc_insertion_point(parse_success:yb.ServerEntryPB) |
2020 | 82 | return true; |
2021 | 0 | failure: |
2022 | | // @@protoc_insertion_point(parse_failure:yb.ServerEntryPB) |
2023 | 0 | return false; |
2024 | 82 | #undef DO_ |
2025 | 82 | } |
2026 | | |
2027 | | void ServerEntryPB::SerializeWithCachedSizes( |
2028 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
2029 | | // @@protoc_insertion_point(serialize_start:yb.ServerEntryPB) |
2030 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2031 | 0 | (void) cached_has_bits; |
2032 | |
|
2033 | 0 | cached_has_bits = _has_bits_[0]; |
2034 | | // optional .yb.AppStatusPB error = 1; |
2035 | 0 | if (cached_has_bits & 0x00000001u) { |
2036 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
2037 | 0 | 1, *this->error_, output); |
2038 | 0 | } |
2039 | | |
2040 | | // optional .yb.NodeInstancePB instance_id = 2; |
2041 | 0 | if (cached_has_bits & 0x00000002u) { |
2042 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
2043 | 0 | 2, *this->instance_id_, output); |
2044 | 0 | } |
2045 | | |
2046 | | // optional .yb.ServerRegistrationPB registration = 3; |
2047 | 0 | if (cached_has_bits & 0x00000004u) { |
2048 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
2049 | 0 | 3, *this->registration_, output); |
2050 | 0 | } |
2051 | | |
2052 | | // optional .yb.PeerRole role = 4; |
2053 | 0 | if (cached_has_bits & 0x00000008u) { |
2054 | 0 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
2055 | 0 | 4, this->role(), output); |
2056 | 0 | } |
2057 | |
|
2058 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2059 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
2060 | 0 | _internal_metadata_.unknown_fields(), output); |
2061 | 0 | } |
2062 | | // @@protoc_insertion_point(serialize_end:yb.ServerEntryPB) |
2063 | 0 | } |
2064 | | |
2065 | | ::google::protobuf::uint8* ServerEntryPB::InternalSerializeWithCachedSizesToArray( |
2066 | 160 | bool deterministic, ::google::protobuf::uint8* target) const { |
2067 | 160 | (void)deterministic; // Unused |
2068 | | // @@protoc_insertion_point(serialize_to_array_start:yb.ServerEntryPB) |
2069 | 160 | ::google::protobuf::uint32 cached_has_bits = 0; |
2070 | 160 | (void) cached_has_bits; |
2071 | | |
2072 | 160 | cached_has_bits = _has_bits_[0]; |
2073 | | // optional .yb.AppStatusPB error = 1; |
2074 | 160 | if (cached_has_bits & 0x00000001u) { |
2075 | 0 | target = ::google::protobuf::internal::WireFormatLite:: |
2076 | 0 | InternalWriteMessageToArray( |
2077 | 0 | 1, *this->error_, deterministic, target); |
2078 | 0 | } |
2079 | | |
2080 | | // optional .yb.NodeInstancePB instance_id = 2; |
2081 | 160 | if (cached_has_bits & 0x00000002u) { |
2082 | 160 | target = ::google::protobuf::internal::WireFormatLite:: |
2083 | 160 | InternalWriteMessageToArray( |
2084 | 160 | 2, *this->instance_id_, deterministic, target); |
2085 | 160 | } |
2086 | | |
2087 | | // optional .yb.ServerRegistrationPB registration = 3; |
2088 | 160 | if (cached_has_bits & 0x00000004u) { |
2089 | 160 | target = ::google::protobuf::internal::WireFormatLite:: |
2090 | 160 | InternalWriteMessageToArray( |
2091 | 160 | 3, *this->registration_, deterministic, target); |
2092 | 160 | } |
2093 | | |
2094 | | // optional .yb.PeerRole role = 4; |
2095 | 160 | if (cached_has_bits & 0x00000008u) { |
2096 | 160 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
2097 | 160 | 4, this->role(), target); |
2098 | 160 | } |
2099 | | |
2100 | 160 | if (_internal_metadata_.have_unknown_fields()) { |
2101 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
2102 | 0 | _internal_metadata_.unknown_fields(), target); |
2103 | 0 | } |
2104 | | // @@protoc_insertion_point(serialize_to_array_end:yb.ServerEntryPB) |
2105 | 160 | return target; |
2106 | 160 | } |
2107 | | |
2108 | 320 | size_t ServerEntryPB::ByteSizeLong() const { |
2109 | | // @@protoc_insertion_point(message_byte_size_start:yb.ServerEntryPB) |
2110 | 320 | size_t total_size = 0; |
2111 | | |
2112 | 320 | if (_internal_metadata_.have_unknown_fields()) { |
2113 | 0 | total_size += |
2114 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
2115 | 0 | _internal_metadata_.unknown_fields()); |
2116 | 0 | } |
2117 | 320 | if (_has_bits_[0 / 32] & 15u) { |
2118 | | // optional .yb.AppStatusPB error = 1; |
2119 | 320 | if (has_error()) { |
2120 | 0 | total_size += 1 + |
2121 | 0 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
2122 | 0 | *this->error_); |
2123 | 0 | } |
2124 | | |
2125 | | // optional .yb.NodeInstancePB instance_id = 2; |
2126 | 320 | if (has_instance_id()) { |
2127 | 320 | total_size += 1 + |
2128 | 320 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
2129 | 320 | *this->instance_id_); |
2130 | 320 | } |
2131 | | |
2132 | | // optional .yb.ServerRegistrationPB registration = 3; |
2133 | 320 | if (has_registration()) { |
2134 | 320 | total_size += 1 + |
2135 | 320 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
2136 | 320 | *this->registration_); |
2137 | 320 | } |
2138 | | |
2139 | | // optional .yb.PeerRole role = 4; |
2140 | 320 | if (has_role()) { |
2141 | 320 | total_size += 1 + |
2142 | 320 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->role()); |
2143 | 320 | } |
2144 | | |
2145 | 320 | } |
2146 | 320 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
2147 | 320 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
2148 | 320 | _cached_size_ = cached_size; |
2149 | 320 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
2150 | 320 | return total_size; |
2151 | 320 | } |
2152 | | |
2153 | 0 | void ServerEntryPB::MergeFrom(const ::google::protobuf::Message& from) { |
2154 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.ServerEntryPB) |
2155 | 0 | GOOGLE_DCHECK_NE(&from, this); |
2156 | 0 | const ServerEntryPB* source = |
2157 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const ServerEntryPB>( |
2158 | 0 | &from); |
2159 | 0 | if (source == NULL) { |
2160 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.ServerEntryPB) |
2161 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
2162 | 0 | } else { |
2163 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.ServerEntryPB) |
2164 | 0 | MergeFrom(*source); |
2165 | 0 | } |
2166 | 0 | } |
2167 | | |
2168 | 169 | void ServerEntryPB::MergeFrom(const ServerEntryPB& from) { |
2169 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.ServerEntryPB) |
2170 | 169 | GOOGLE_DCHECK_NE(&from, this); |
2171 | 169 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2172 | 169 | ::google::protobuf::uint32 cached_has_bits = 0; |
2173 | 169 | (void) cached_has_bits; |
2174 | | |
2175 | 169 | cached_has_bits = from._has_bits_[0]; |
2176 | 169 | if (cached_has_bits & 15u) { |
2177 | 169 | if (cached_has_bits & 0x00000001u) { |
2178 | 0 | mutable_error()->::yb::AppStatusPB::MergeFrom(from.error()); |
2179 | 0 | } |
2180 | 169 | if (cached_has_bits & 0x00000002u) { |
2181 | 169 | mutable_instance_id()->::yb::NodeInstancePB::MergeFrom(from.instance_id()); |
2182 | 169 | } |
2183 | 169 | if (cached_has_bits & 0x00000004u) { |
2184 | 169 | mutable_registration()->::yb::ServerRegistrationPB::MergeFrom(from.registration()); |
2185 | 169 | } |
2186 | 169 | if (cached_has_bits & 0x00000008u) { |
2187 | 169 | role_ = from.role_; |
2188 | 169 | } |
2189 | 169 | _has_bits_[0] |= cached_has_bits; |
2190 | 169 | } |
2191 | 169 | } |
2192 | | |
2193 | 0 | void ServerEntryPB::CopyFrom(const ::google::protobuf::Message& from) { |
2194 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.ServerEntryPB) |
2195 | 0 | if (&from == this) return; |
2196 | 0 | Clear(); |
2197 | 0 | MergeFrom(from); |
2198 | 0 | } |
2199 | | |
2200 | 169 | void ServerEntryPB::CopyFrom(const ServerEntryPB& from) { |
2201 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.ServerEntryPB) |
2202 | 169 | if (&from == this) return; |
2203 | 169 | Clear(); |
2204 | 169 | MergeFrom(from); |
2205 | 169 | } |
2206 | | |
2207 | 242 | bool ServerEntryPB::IsInitialized() const { |
2208 | 242 | if (has_error()) { |
2209 | 0 | if (!this->error_->IsInitialized()) return false; |
2210 | 242 | } |
2211 | 242 | if (has_instance_id()) { |
2212 | 242 | if (!this->instance_id_->IsInitialized()) return false; |
2213 | 242 | } |
2214 | 242 | if (has_registration()) { |
2215 | 242 | if (!this->registration_->IsInitialized()) return false; |
2216 | 242 | } |
2217 | 242 | return true; |
2218 | 242 | } |
2219 | | |
2220 | 0 | void ServerEntryPB::Swap(ServerEntryPB* other) { |
2221 | 0 | if (other == this) return; |
2222 | 0 | InternalSwap(other); |
2223 | 0 | } |
2224 | 235 | void ServerEntryPB::InternalSwap(ServerEntryPB* other) { |
2225 | 235 | using std::swap; |
2226 | 235 | swap(error_, other->error_); |
2227 | 235 | swap(instance_id_, other->instance_id_); |
2228 | 235 | swap(registration_, other->registration_); |
2229 | 235 | swap(role_, other->role_); |
2230 | 235 | swap(_has_bits_[0], other->_has_bits_[0]); |
2231 | 235 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2232 | 235 | swap(_cached_size_, other->_cached_size_); |
2233 | 235 | } |
2234 | | |
2235 | 36 | ::google::protobuf::Metadata ServerEntryPB::GetMetadata() const { |
2236 | 36 | protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::protobuf_AssignDescriptorsOnce(); |
2237 | 36 | return ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::file_level_metadata[kIndexInFileMessages]; |
2238 | 36 | } |
2239 | | |
2240 | | |
2241 | | // @@protoc_insertion_point(namespace_scope) |
2242 | | } // namespace yb |
2243 | | |
2244 | | // @@protoc_insertion_point(global_scope) |