blob: 389e53df65f5844588a8e8779eb2d14cb704d8fe [file] [log] [blame]
Shivanagouda Malaginahalli335fe4d2021-03-31 16:52:28 +05301// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: dmi/hw_metrics_mgmt_service.proto
3
4#include "dmi/hw_metrics_mgmt_service.pb.h"
5
6#include <algorithm>
7
8#include <google/protobuf/stubs/common.h>
9#include <google/protobuf/io/coded_stream.h>
10#include <google/protobuf/extension_set.h>
11#include <google/protobuf/wire_format_lite_inl.h>
12#include <google/protobuf/descriptor.h>
13#include <google/protobuf/generated_message_reflection.h>
14#include <google/protobuf/reflection_ops.h>
15#include <google/protobuf/wire_format.h>
16// @@protoc_insertion_point(includes)
17#include <google/protobuf/port_def.inc>
18
19extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Uuid_dmi_2fhw_2eproto;
20extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ComponentSensorData_dmi_2fhw_2eproto;
21extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MetricConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto;
22extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MetricMetaData_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto;
23extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MetricsConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto;
24extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_Metric_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto;
25namespace dmi {
26class MetricConfigDefaultTypeInternal {
27 public:
28 ::google::protobuf::internal::ExplicitlyConstructed<MetricConfig> _instance;
29} _MetricConfig_default_instance_;
30class MetricsConfigDefaultTypeInternal {
31 public:
32 ::google::protobuf::internal::ExplicitlyConstructed<MetricsConfig> _instance;
33} _MetricsConfig_default_instance_;
34class ListMetricsResponseDefaultTypeInternal {
35 public:
36 ::google::protobuf::internal::ExplicitlyConstructed<ListMetricsResponse> _instance;
37} _ListMetricsResponse_default_instance_;
38class MetricsConfigurationRequestDefaultTypeInternal {
39 public:
40 ::google::protobuf::internal::ExplicitlyConstructed<MetricsConfigurationRequest> _instance;
41 const ::dmi::MetricsConfig* changes_;
42 bool reset_to_default_;
43} _MetricsConfigurationRequest_default_instance_;
44class MetricsConfigurationResponseDefaultTypeInternal {
45 public:
46 ::google::protobuf::internal::ExplicitlyConstructed<MetricsConfigurationResponse> _instance;
47} _MetricsConfigurationResponse_default_instance_;
48class MetricMetaDataDefaultTypeInternal {
49 public:
50 ::google::protobuf::internal::ExplicitlyConstructed<MetricMetaData> _instance;
51} _MetricMetaData_default_instance_;
52class MetricDefaultTypeInternal {
53 public:
54 ::google::protobuf::internal::ExplicitlyConstructed<Metric> _instance;
55} _Metric_default_instance_;
56class GetMetricRequestDefaultTypeInternal {
57 public:
58 ::google::protobuf::internal::ExplicitlyConstructed<GetMetricRequest> _instance;
59} _GetMetricRequest_default_instance_;
60class GetMetricResponseDefaultTypeInternal {
61 public:
62 ::google::protobuf::internal::ExplicitlyConstructed<GetMetricResponse> _instance;
63} _GetMetricResponse_default_instance_;
64} // namespace dmi
65static void InitDefaultsMetricConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto() {
66 GOOGLE_PROTOBUF_VERIFY_VERSION;
67
68 {
69 void* ptr = &::dmi::_MetricConfig_default_instance_;
70 new (ptr) ::dmi::MetricConfig();
71 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
72 }
73 ::dmi::MetricConfig::InitAsDefaultInstance();
74}
75
76::google::protobuf::internal::SCCInfo<0> scc_info_MetricConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto =
77 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMetricConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto}, {}};
78
79static void InitDefaultsMetricsConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto() {
80 GOOGLE_PROTOBUF_VERIFY_VERSION;
81
82 {
83 void* ptr = &::dmi::_MetricsConfig_default_instance_;
84 new (ptr) ::dmi::MetricsConfig();
85 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
86 }
87 ::dmi::MetricsConfig::InitAsDefaultInstance();
88}
89
90::google::protobuf::internal::SCCInfo<1> scc_info_MetricsConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto =
91 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMetricsConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto}, {
92 &scc_info_MetricConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base,}};
93
94static void InitDefaultsListMetricsResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto() {
95 GOOGLE_PROTOBUF_VERIFY_VERSION;
96
97 {
98 void* ptr = &::dmi::_ListMetricsResponse_default_instance_;
99 new (ptr) ::dmi::ListMetricsResponse();
100 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
101 }
102 ::dmi::ListMetricsResponse::InitAsDefaultInstance();
103}
104
105::google::protobuf::internal::SCCInfo<1> scc_info_ListMetricsResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto =
106 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsListMetricsResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto}, {
107 &scc_info_MetricsConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base,}};
108
109static void InitDefaultsMetricsConfigurationRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto() {
110 GOOGLE_PROTOBUF_VERIFY_VERSION;
111
112 {
113 void* ptr = &::dmi::_MetricsConfigurationRequest_default_instance_;
114 new (ptr) ::dmi::MetricsConfigurationRequest();
115 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
116 }
117 ::dmi::MetricsConfigurationRequest::InitAsDefaultInstance();
118}
119
120::google::protobuf::internal::SCCInfo<2> scc_info_MetricsConfigurationRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto =
121 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsMetricsConfigurationRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto}, {
122 &scc_info_Uuid_dmi_2fhw_2eproto.base,
123 &scc_info_MetricsConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base,}};
124
125static void InitDefaultsMetricsConfigurationResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto() {
126 GOOGLE_PROTOBUF_VERIFY_VERSION;
127
128 {
129 void* ptr = &::dmi::_MetricsConfigurationResponse_default_instance_;
130 new (ptr) ::dmi::MetricsConfigurationResponse();
131 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
132 }
133 ::dmi::MetricsConfigurationResponse::InitAsDefaultInstance();
134}
135
136::google::protobuf::internal::SCCInfo<0> scc_info_MetricsConfigurationResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto =
137 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMetricsConfigurationResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto}, {}};
138
139static void InitDefaultsMetricMetaData_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto() {
140 GOOGLE_PROTOBUF_VERIFY_VERSION;
141
142 {
143 void* ptr = &::dmi::_MetricMetaData_default_instance_;
144 new (ptr) ::dmi::MetricMetaData();
145 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
146 }
147 ::dmi::MetricMetaData::InitAsDefaultInstance();
148}
149
150::google::protobuf::internal::SCCInfo<1> scc_info_MetricMetaData_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto =
151 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMetricMetaData_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto}, {
152 &scc_info_Uuid_dmi_2fhw_2eproto.base,}};
153
154static void InitDefaultsMetric_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto() {
155 GOOGLE_PROTOBUF_VERIFY_VERSION;
156
157 {
158 void* ptr = &::dmi::_Metric_default_instance_;
159 new (ptr) ::dmi::Metric();
160 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
161 }
162 ::dmi::Metric::InitAsDefaultInstance();
163}
164
165::google::protobuf::internal::SCCInfo<2> scc_info_Metric_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto =
166 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsMetric_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto}, {
167 &scc_info_MetricMetaData_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base,
168 &scc_info_ComponentSensorData_dmi_2fhw_2eproto.base,}};
169
170static void InitDefaultsGetMetricRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto() {
171 GOOGLE_PROTOBUF_VERIFY_VERSION;
172
173 {
174 void* ptr = &::dmi::_GetMetricRequest_default_instance_;
175 new (ptr) ::dmi::GetMetricRequest();
176 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
177 }
178 ::dmi::GetMetricRequest::InitAsDefaultInstance();
179}
180
181::google::protobuf::internal::SCCInfo<1> scc_info_GetMetricRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto =
182 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsGetMetricRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto}, {
183 &scc_info_MetricMetaData_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base,}};
184
185static void InitDefaultsGetMetricResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto() {
186 GOOGLE_PROTOBUF_VERIFY_VERSION;
187
188 {
189 void* ptr = &::dmi::_GetMetricResponse_default_instance_;
190 new (ptr) ::dmi::GetMetricResponse();
191 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
192 }
193 ::dmi::GetMetricResponse::InitAsDefaultInstance();
194}
195
196::google::protobuf::internal::SCCInfo<1> scc_info_GetMetricResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto =
197 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsGetMetricResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto}, {
198 &scc_info_Metric_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base,}};
199
200void InitDefaults_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto() {
201 ::google::protobuf::internal::InitSCC(&scc_info_MetricConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
202 ::google::protobuf::internal::InitSCC(&scc_info_MetricsConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
203 ::google::protobuf::internal::InitSCC(&scc_info_ListMetricsResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
204 ::google::protobuf::internal::InitSCC(&scc_info_MetricsConfigurationRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
205 ::google::protobuf::internal::InitSCC(&scc_info_MetricsConfigurationResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
206 ::google::protobuf::internal::InitSCC(&scc_info_MetricMetaData_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
207 ::google::protobuf::internal::InitSCC(&scc_info_Metric_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
208 ::google::protobuf::internal::InitSCC(&scc_info_GetMetricRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
209 ::google::protobuf::internal::InitSCC(&scc_info_GetMetricResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
210}
211
212::google::protobuf::Metadata file_level_metadata_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[9];
213const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[4];
214constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto = nullptr;
215
216const ::google::protobuf::uint32 TableStruct_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
217 ~0u, // no _has_bits_
218 PROTOBUF_FIELD_OFFSET(::dmi::MetricConfig, _internal_metadata_),
219 ~0u, // no _extensions_
220 ~0u, // no _oneof_case_
221 ~0u, // no _weak_field_map_
222 PROTOBUF_FIELD_OFFSET(::dmi::MetricConfig, metric_id_),
223 PROTOBUF_FIELD_OFFSET(::dmi::MetricConfig, is_configured_),
224 PROTOBUF_FIELD_OFFSET(::dmi::MetricConfig, poll_interval_),
225 ~0u, // no _has_bits_
226 PROTOBUF_FIELD_OFFSET(::dmi::MetricsConfig, _internal_metadata_),
227 ~0u, // no _extensions_
228 ~0u, // no _oneof_case_
229 ~0u, // no _weak_field_map_
230 PROTOBUF_FIELD_OFFSET(::dmi::MetricsConfig, metrics_),
231 ~0u, // no _has_bits_
232 PROTOBUF_FIELD_OFFSET(::dmi::ListMetricsResponse, _internal_metadata_),
233 ~0u, // no _extensions_
234 ~0u, // no _oneof_case_
235 ~0u, // no _weak_field_map_
236 PROTOBUF_FIELD_OFFSET(::dmi::ListMetricsResponse, status_),
237 PROTOBUF_FIELD_OFFSET(::dmi::ListMetricsResponse, reason_),
238 PROTOBUF_FIELD_OFFSET(::dmi::ListMetricsResponse, metrics_),
239 PROTOBUF_FIELD_OFFSET(::dmi::ListMetricsResponse, reason_detail_),
240 ~0u, // no _has_bits_
241 PROTOBUF_FIELD_OFFSET(::dmi::MetricsConfigurationRequest, _internal_metadata_),
242 ~0u, // no _extensions_
243 PROTOBUF_FIELD_OFFSET(::dmi::MetricsConfigurationRequest, _oneof_case_[0]),
244 ~0u, // no _weak_field_map_
245 PROTOBUF_FIELD_OFFSET(::dmi::MetricsConfigurationRequest, device_uuid_),
246 offsetof(::dmi::MetricsConfigurationRequestDefaultTypeInternal, changes_),
247 offsetof(::dmi::MetricsConfigurationRequestDefaultTypeInternal, reset_to_default_),
248 PROTOBUF_FIELD_OFFSET(::dmi::MetricsConfigurationRequest, operation_),
249 ~0u, // no _has_bits_
250 PROTOBUF_FIELD_OFFSET(::dmi::MetricsConfigurationResponse, _internal_metadata_),
251 ~0u, // no _extensions_
252 ~0u, // no _oneof_case_
253 ~0u, // no _weak_field_map_
254 PROTOBUF_FIELD_OFFSET(::dmi::MetricsConfigurationResponse, status_),
255 PROTOBUF_FIELD_OFFSET(::dmi::MetricsConfigurationResponse, reason_),
256 PROTOBUF_FIELD_OFFSET(::dmi::MetricsConfigurationResponse, reason_detail_),
257 ~0u, // no _has_bits_
258 PROTOBUF_FIELD_OFFSET(::dmi::MetricMetaData, _internal_metadata_),
259 ~0u, // no _extensions_
260 ~0u, // no _oneof_case_
261 ~0u, // no _weak_field_map_
262 PROTOBUF_FIELD_OFFSET(::dmi::MetricMetaData, device_uuid_),
263 PROTOBUF_FIELD_OFFSET(::dmi::MetricMetaData, component_uuid_),
264 PROTOBUF_FIELD_OFFSET(::dmi::MetricMetaData, component_name_),
265 ~0u, // no _has_bits_
266 PROTOBUF_FIELD_OFFSET(::dmi::Metric, _internal_metadata_),
267 ~0u, // no _extensions_
268 ~0u, // no _oneof_case_
269 ~0u, // no _weak_field_map_
270 PROTOBUF_FIELD_OFFSET(::dmi::Metric, metric_id_),
271 PROTOBUF_FIELD_OFFSET(::dmi::Metric, metric_metadata_),
272 PROTOBUF_FIELD_OFFSET(::dmi::Metric, value_),
273 ~0u, // no _has_bits_
274 PROTOBUF_FIELD_OFFSET(::dmi::GetMetricRequest, _internal_metadata_),
275 ~0u, // no _extensions_
276 ~0u, // no _oneof_case_
277 ~0u, // no _weak_field_map_
278 PROTOBUF_FIELD_OFFSET(::dmi::GetMetricRequest, meta_data_),
279 PROTOBUF_FIELD_OFFSET(::dmi::GetMetricRequest, metric_id_),
280 ~0u, // no _has_bits_
281 PROTOBUF_FIELD_OFFSET(::dmi::GetMetricResponse, _internal_metadata_),
282 ~0u, // no _extensions_
283 ~0u, // no _oneof_case_
284 ~0u, // no _weak_field_map_
285 PROTOBUF_FIELD_OFFSET(::dmi::GetMetricResponse, status_),
286 PROTOBUF_FIELD_OFFSET(::dmi::GetMetricResponse, reason_),
287 PROTOBUF_FIELD_OFFSET(::dmi::GetMetricResponse, metric_),
288 PROTOBUF_FIELD_OFFSET(::dmi::GetMetricResponse, reason_detail_),
289};
290static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
291 { 0, -1, sizeof(::dmi::MetricConfig)},
292 { 8, -1, sizeof(::dmi::MetricsConfig)},
293 { 14, -1, sizeof(::dmi::ListMetricsResponse)},
294 { 23, -1, sizeof(::dmi::MetricsConfigurationRequest)},
295 { 32, -1, sizeof(::dmi::MetricsConfigurationResponse)},
296 { 40, -1, sizeof(::dmi::MetricMetaData)},
297 { 48, -1, sizeof(::dmi::Metric)},
298 { 56, -1, sizeof(::dmi::GetMetricRequest)},
299 { 63, -1, sizeof(::dmi::GetMetricResponse)},
300};
301
302static ::google::protobuf::Message const * const file_default_instances[] = {
303 reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_MetricConfig_default_instance_),
304 reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_MetricsConfig_default_instance_),
305 reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_ListMetricsResponse_default_instance_),
306 reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_MetricsConfigurationRequest_default_instance_),
307 reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_MetricsConfigurationResponse_default_instance_),
308 reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_MetricMetaData_default_instance_),
309 reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_Metric_default_instance_),
310 reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_GetMetricRequest_default_instance_),
311 reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_GetMetricResponse_default_instance_),
312};
313
314::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto = {
315 {}, AddDescriptors_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto, "dmi/hw_metrics_mgmt_service.proto", schemas,
316 file_default_instances, TableStruct_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto::offsets,
317 file_level_metadata_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto, 9, file_level_enum_descriptors_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto, file_level_service_descriptors_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto,
318};
319
320const char descriptor_table_protodef_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[] =
321 "\n!dmi/hw_metrics_mgmt_service.proto\022\003dmi"
322 "\032\021dmi/commons.proto\032\014dmi/hw.proto\"a\n\014Met"
323 "ricConfig\022#\n\tmetric_id\030\001 \001(\0162\020.dmi.Metri"
324 "cNames\022\025\n\ris_configured\030\002 \001(\010\022\025\n\rpoll_in"
325 "terval\030\003 \001(\r\"3\n\rMetricsConfig\022\"\n\007metrics"
326 "\030\001 \003(\0132\021.dmi.MetricConfig\"\377\001\n\023ListMetric"
327 "sResponse\022\033\n\006status\030\001 \001(\0162\013.dmi.Status\022/"
328 "\n\006reason\030\002 \001(\0162\037.dmi.ListMetricsResponse"
329 ".Reason\022#\n\007metrics\030\003 \001(\0132\022.dmi.MetricsCo"
330 "nfig\022\025\n\rreason_detail\030\004 \001(\t\"^\n\006Reason\022\024\n"
331 "\020UNDEFINED_REASON\020\000\022\022\n\016UNKNOWN_DEVICE\020\001\022"
332 "\022\n\016INTERNAL_ERROR\020\002\022\026\n\022DEVICE_UNREACHABL"
333 "E\020\003\"\215\001\n\033MetricsConfigurationRequest\022\036\n\013d"
334 "evice_uuid\030\001 \001(\0132\t.dmi.Uuid\022%\n\007changes\030\002"
335 " \001(\0132\022.dmi.MetricsConfigH\000\022\032\n\020reset_to_d"
336 "efault\030\003 \001(\010H\000B\013\n\toperation\"\240\002\n\034MetricsC"
337 "onfigurationResponse\022\033\n\006status\030\001 \001(\0162\013.d"
338 "mi.Status\0228\n\006reason\030\002 \001(\0162(.dmi.MetricsC"
339 "onfigurationResponse.Reason\022\025\n\rreason_de"
340 "tail\030\003 \001(\t\"\221\001\n\006Reason\022\024\n\020UNDEFINED_REASO"
341 "N\020\000\022\022\n\016UNKNOWN_DEVICE\020\001\022\022\n\016INTERNAL_ERRO"
342 "R\020\002\022\035\n\031POLL_INTERVAL_UNSUPPORTED\020\003\022\022\n\016IN"
343 "VALID_METRIC\020\004\022\026\n\022DEVICE_UNREACHABLE\020\005\"k"
344 "\n\016MetricMetaData\022\036\n\013device_uuid\030\001 \001(\0132\t."
345 "dmi.Uuid\022!\n\016component_uuid\030\002 \001(\0132\t.dmi.U"
346 "uid\022\026\n\016component_name\030\003 \001(\t\"\204\001\n\006Metric\022#"
347 "\n\tmetric_id\030\001 \001(\0162\020.dmi.MetricNames\022,\n\017m"
348 "etric_metadata\030\002 \001(\0132\023.dmi.MetricMetaDat"
349 "a\022\'\n\005value\030\003 \001(\0132\030.dmi.ComponentSensorDa"
350 "ta\"_\n\020GetMetricRequest\022&\n\tmeta_data\030\001 \001("
351 "\0132\023.dmi.MetricMetaData\022#\n\tmetric_id\030\002 \001("
352 "\0162\020.dmi.MetricNames\"\237\002\n\021GetMetricRespons"
353 "e\022\033\n\006status\030\001 \001(\0162\013.dmi.Status\022-\n\006reason"
354 "\030\002 \001(\0162\035.dmi.GetMetricResponse.Reason\022\033\n"
355 "\006metric\030\003 \001(\0132\013.dmi.Metric\022\025\n\rreason_det"
356 "ail\030\004 \001(\t\"\211\001\n\006Reason\022\024\n\020UNDEFINED_REASON"
357 "\020\000\022\022\n\016UNKNOWN_DEVICE\020\001\022\025\n\021UNKNOWN_COMPON"
358 "ENT\020\002\022\022\n\016INTERNAL_ERROR\020\003\022\022\n\016INVALID_MET"
359 "RIC\020\004\022\026\n\022DEVICE_UNREACHABLE\020\005*\331\005\n\013Metric"
360 "Names\022\031\n\025METRIC_NAME_UNDEFINED\020\000\022\024\n\020METR"
361 "IC_FAN_SPEED\020\001\022\023\n\017METRIC_CPU_TEMP\020d\022\037\n\033M"
362 "ETRIC_CPU_USAGE_PERCENTAGE\020e\022\034\n\027METRIC_T"
363 "RANSCEIVER_TEMP\020\310\001\022\037\n\032METRIC_TRANSCEIVER"
364 "_VOLTAGE\020\311\001\022\034\n\027METRIC_TRANSCEIVER_BIAS\020\312"
365 "\001\022 \n\033METRIC_TRANSCEIVER_RX_POWER\020\313\001\022 \n\033M"
366 "ETRIC_TRANSCEIVER_TX_POWER\020\314\001\022\"\n\035METRIC_"
367 "TRANSCEIVER_WAVELENGTH\020\315\001\022\025\n\020METRIC_DISK"
368 "_TEMP\020\254\002\022\031\n\024METRIC_DISK_CAPACITY\020\255\002\022\026\n\021M"
369 "ETRIC_DISK_USAGE\020\256\002\022!\n\034METRIC_DISK_USAGE"
370 "_PERCENTAGE\020\257\002\022&\n!METRIC_DISK_READ_WRITE"
371 "_PERCENTAGE\020\260\002\022(\n#METRIC_DISK_FAULTY_CEL"
372 "LS_PERCENTAGE\020\261\002\022\024\n\017METRIC_RAM_TEMP\020\220\003\022\030"
373 "\n\023METRIC_RAM_CAPACITY\020\221\003\022\025\n\020METRIC_RAM_U"
374 "SAGE\020\222\003\022 \n\033METRIC_RAM_USAGE_PERCENTAGE\020\223"
375 "\003\022\025\n\020METRIC_POWER_MAX\020\364\003\022\027\n\022METRIC_POWER"
376 "_USAGE\020\365\003\022\"\n\035METRIC_POWER_USAGE_PERCENTA"
377 "GE\020\366\003\022\"\n\035METRIC_INNER_SURROUNDING_TEMP\020\330"
378 "\0042\371\001\n\036NativeMetricsManagementService\0228\n\013"
379 "ListMetrics\022\017.dmi.HardwareID\032\030.dmi.ListM"
380 "etricsResponse\022a\n\032UpdateMetricsConfigura"
381 "tion\022 .dmi.MetricsConfigurationRequest\032!"
382 ".dmi.MetricsConfigurationResponse\022:\n\tGet"
383 "Metric\022\025.dmi.GetMetricRequest\032\026.dmi.GetM"
384 "etricResponseB;Z9github.com/opencord/dev"
385 "ice-management-interface/v3/go/dmib\006prot"
386 "o3"
387 ;
388::google::protobuf::internal::DescriptorTable descriptor_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto = {
389 false, InitDefaults_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto,
390 descriptor_table_protodef_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto,
391 "dmi/hw_metrics_mgmt_service.proto", &assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto, 2602,
392};
393
394void AddDescriptors_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto() {
395 static constexpr ::google::protobuf::internal::InitFunc deps[2] =
396 {
397 ::AddDescriptors_dmi_2fcommons_2eproto,
398 ::AddDescriptors_dmi_2fhw_2eproto,
399 };
400 ::google::protobuf::internal::AddDescriptors(&descriptor_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto, deps, 2);
401}
402
403// Force running AddDescriptors() at dynamic initialization time.
404static bool dynamic_init_dummy_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto = []() { AddDescriptors_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto(); return true; }();
405namespace dmi {
406const ::google::protobuf::EnumDescriptor* ListMetricsResponse_Reason_descriptor() {
407 ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
408 return file_level_enum_descriptors_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[0];
409}
410bool ListMetricsResponse_Reason_IsValid(int value) {
411 switch (value) {
412 case 0:
413 case 1:
414 case 2:
415 case 3:
416 return true;
417 default:
418 return false;
419 }
420}
421
422#if !defined(_MSC_VER) || _MSC_VER >= 1900
423const ListMetricsResponse_Reason ListMetricsResponse::UNDEFINED_REASON;
424const ListMetricsResponse_Reason ListMetricsResponse::UNKNOWN_DEVICE;
425const ListMetricsResponse_Reason ListMetricsResponse::INTERNAL_ERROR;
426const ListMetricsResponse_Reason ListMetricsResponse::DEVICE_UNREACHABLE;
427const ListMetricsResponse_Reason ListMetricsResponse::Reason_MIN;
428const ListMetricsResponse_Reason ListMetricsResponse::Reason_MAX;
429const int ListMetricsResponse::Reason_ARRAYSIZE;
430#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
431const ::google::protobuf::EnumDescriptor* MetricsConfigurationResponse_Reason_descriptor() {
432 ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
433 return file_level_enum_descriptors_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[1];
434}
435bool MetricsConfigurationResponse_Reason_IsValid(int value) {
436 switch (value) {
437 case 0:
438 case 1:
439 case 2:
440 case 3:
441 case 4:
442 case 5:
443 return true;
444 default:
445 return false;
446 }
447}
448
449#if !defined(_MSC_VER) || _MSC_VER >= 1900
450const MetricsConfigurationResponse_Reason MetricsConfigurationResponse::UNDEFINED_REASON;
451const MetricsConfigurationResponse_Reason MetricsConfigurationResponse::UNKNOWN_DEVICE;
452const MetricsConfigurationResponse_Reason MetricsConfigurationResponse::INTERNAL_ERROR;
453const MetricsConfigurationResponse_Reason MetricsConfigurationResponse::POLL_INTERVAL_UNSUPPORTED;
454const MetricsConfigurationResponse_Reason MetricsConfigurationResponse::INVALID_METRIC;
455const MetricsConfigurationResponse_Reason MetricsConfigurationResponse::DEVICE_UNREACHABLE;
456const MetricsConfigurationResponse_Reason MetricsConfigurationResponse::Reason_MIN;
457const MetricsConfigurationResponse_Reason MetricsConfigurationResponse::Reason_MAX;
458const int MetricsConfigurationResponse::Reason_ARRAYSIZE;
459#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
460const ::google::protobuf::EnumDescriptor* GetMetricResponse_Reason_descriptor() {
461 ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
462 return file_level_enum_descriptors_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[2];
463}
464bool GetMetricResponse_Reason_IsValid(int value) {
465 switch (value) {
466 case 0:
467 case 1:
468 case 2:
469 case 3:
470 case 4:
471 case 5:
472 return true;
473 default:
474 return false;
475 }
476}
477
478#if !defined(_MSC_VER) || _MSC_VER >= 1900
479const GetMetricResponse_Reason GetMetricResponse::UNDEFINED_REASON;
480const GetMetricResponse_Reason GetMetricResponse::UNKNOWN_DEVICE;
481const GetMetricResponse_Reason GetMetricResponse::UNKNOWN_COMPONENT;
482const GetMetricResponse_Reason GetMetricResponse::INTERNAL_ERROR;
483const GetMetricResponse_Reason GetMetricResponse::INVALID_METRIC;
484const GetMetricResponse_Reason GetMetricResponse::DEVICE_UNREACHABLE;
485const GetMetricResponse_Reason GetMetricResponse::Reason_MIN;
486const GetMetricResponse_Reason GetMetricResponse::Reason_MAX;
487const int GetMetricResponse::Reason_ARRAYSIZE;
488#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
489const ::google::protobuf::EnumDescriptor* MetricNames_descriptor() {
490 ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
491 return file_level_enum_descriptors_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[3];
492}
493bool MetricNames_IsValid(int value) {
494 switch (value) {
495 case 0:
496 case 1:
497 case 100:
498 case 101:
499 case 200:
500 case 201:
501 case 202:
502 case 203:
503 case 204:
504 case 205:
505 case 300:
506 case 301:
507 case 302:
508 case 303:
509 case 304:
510 case 305:
511 case 400:
512 case 401:
513 case 402:
514 case 403:
515 case 500:
516 case 501:
517 case 502:
518 case 600:
519 return true;
520 default:
521 return false;
522 }
523}
524
525
526// ===================================================================
527
528void MetricConfig::InitAsDefaultInstance() {
529}
530class MetricConfig::HasBitSetters {
531 public:
532};
533
534#if !defined(_MSC_VER) || _MSC_VER >= 1900
535const int MetricConfig::kMetricIdFieldNumber;
536const int MetricConfig::kIsConfiguredFieldNumber;
537const int MetricConfig::kPollIntervalFieldNumber;
538#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
539
540MetricConfig::MetricConfig()
541 : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
542 SharedCtor();
543 // @@protoc_insertion_point(constructor:dmi.MetricConfig)
544}
545MetricConfig::MetricConfig(const MetricConfig& from)
546 : ::google::protobuf::Message(),
547 _internal_metadata_(nullptr) {
548 _internal_metadata_.MergeFrom(from._internal_metadata_);
549 ::memcpy(&metric_id_, &from.metric_id_,
550 static_cast<size_t>(reinterpret_cast<char*>(&poll_interval_) -
551 reinterpret_cast<char*>(&metric_id_)) + sizeof(poll_interval_));
552 // @@protoc_insertion_point(copy_constructor:dmi.MetricConfig)
553}
554
555void MetricConfig::SharedCtor() {
556 ::memset(&metric_id_, 0, static_cast<size_t>(
557 reinterpret_cast<char*>(&poll_interval_) -
558 reinterpret_cast<char*>(&metric_id_)) + sizeof(poll_interval_));
559}
560
561MetricConfig::~MetricConfig() {
562 // @@protoc_insertion_point(destructor:dmi.MetricConfig)
563 SharedDtor();
564}
565
566void MetricConfig::SharedDtor() {
567}
568
569void MetricConfig::SetCachedSize(int size) const {
570 _cached_size_.Set(size);
571}
572const MetricConfig& MetricConfig::default_instance() {
573 ::google::protobuf::internal::InitSCC(&::scc_info_MetricConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
574 return *internal_default_instance();
575}
576
577
578void MetricConfig::Clear() {
579// @@protoc_insertion_point(message_clear_start:dmi.MetricConfig)
580 ::google::protobuf::uint32 cached_has_bits = 0;
581 // Prevent compiler warnings about cached_has_bits being unused
582 (void) cached_has_bits;
583
584 ::memset(&metric_id_, 0, static_cast<size_t>(
585 reinterpret_cast<char*>(&poll_interval_) -
586 reinterpret_cast<char*>(&metric_id_)) + sizeof(poll_interval_));
587 _internal_metadata_.Clear();
588}
589
590#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
591const char* MetricConfig::_InternalParse(const char* begin, const char* end, void* object,
592 ::google::protobuf::internal::ParseContext* ctx) {
593 auto msg = static_cast<MetricConfig*>(object);
594 ::google::protobuf::int32 size; (void)size;
595 int depth; (void)depth;
596 ::google::protobuf::uint32 tag;
597 ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
598 auto ptr = begin;
599 while (ptr < end) {
600 ptr = ::google::protobuf::io::Parse32(ptr, &tag);
601 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
602 switch (tag >> 3) {
603 // .dmi.MetricNames metric_id = 1;
604 case 1: {
605 if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
606 ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
607 msg->set_metric_id(static_cast<::dmi::MetricNames>(val));
608 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
609 break;
610 }
611 // bool is_configured = 2;
612 case 2: {
613 if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
614 msg->set_is_configured(::google::protobuf::internal::ReadVarint(&ptr));
615 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
616 break;
617 }
618 // uint32 poll_interval = 3;
619 case 3: {
620 if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual;
621 msg->set_poll_interval(::google::protobuf::internal::ReadVarint(&ptr));
622 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
623 break;
624 }
625 default: {
626 handle_unusual:
627 if ((tag & 7) == 4 || tag == 0) {
628 ctx->EndGroup(tag);
629 return ptr;
630 }
631 auto res = UnknownFieldParse(tag, {_InternalParse, msg},
632 ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
633 ptr = res.first;
634 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
635 if (res.second) return ptr;
636 }
637 } // switch
638 } // while
639 return ptr;
640}
641#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
642bool MetricConfig::MergePartialFromCodedStream(
643 ::google::protobuf::io::CodedInputStream* input) {
644#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
645 ::google::protobuf::uint32 tag;
646 // @@protoc_insertion_point(parse_start:dmi.MetricConfig)
647 for (;;) {
648 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
649 tag = p.first;
650 if (!p.second) goto handle_unusual;
651 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
652 // .dmi.MetricNames metric_id = 1;
653 case 1: {
654 if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
655 int value = 0;
656 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
657 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
658 input, &value)));
659 set_metric_id(static_cast< ::dmi::MetricNames >(value));
660 } else {
661 goto handle_unusual;
662 }
663 break;
664 }
665
666 // bool is_configured = 2;
667 case 2: {
668 if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {
669
670 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
671 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
672 input, &is_configured_)));
673 } else {
674 goto handle_unusual;
675 }
676 break;
677 }
678
679 // uint32 poll_interval = 3;
680 case 3: {
681 if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) {
682
683 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
684 ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
685 input, &poll_interval_)));
686 } else {
687 goto handle_unusual;
688 }
689 break;
690 }
691
692 default: {
693 handle_unusual:
694 if (tag == 0) {
695 goto success;
696 }
697 DO_(::google::protobuf::internal::WireFormat::SkipField(
698 input, tag, _internal_metadata_.mutable_unknown_fields()));
699 break;
700 }
701 }
702 }
703success:
704 // @@protoc_insertion_point(parse_success:dmi.MetricConfig)
705 return true;
706failure:
707 // @@protoc_insertion_point(parse_failure:dmi.MetricConfig)
708 return false;
709#undef DO_
710}
711#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
712
713void MetricConfig::SerializeWithCachedSizes(
714 ::google::protobuf::io::CodedOutputStream* output) const {
715 // @@protoc_insertion_point(serialize_start:dmi.MetricConfig)
716 ::google::protobuf::uint32 cached_has_bits = 0;
717 (void) cached_has_bits;
718
719 // .dmi.MetricNames metric_id = 1;
720 if (this->metric_id() != 0) {
721 ::google::protobuf::internal::WireFormatLite::WriteEnum(
722 1, this->metric_id(), output);
723 }
724
725 // bool is_configured = 2;
726 if (this->is_configured() != 0) {
727 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->is_configured(), output);
728 }
729
730 // uint32 poll_interval = 3;
731 if (this->poll_interval() != 0) {
732 ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->poll_interval(), output);
733 }
734
735 if (_internal_metadata_.have_unknown_fields()) {
736 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
737 _internal_metadata_.unknown_fields(), output);
738 }
739 // @@protoc_insertion_point(serialize_end:dmi.MetricConfig)
740}
741
742::google::protobuf::uint8* MetricConfig::InternalSerializeWithCachedSizesToArray(
743 ::google::protobuf::uint8* target) const {
744 // @@protoc_insertion_point(serialize_to_array_start:dmi.MetricConfig)
745 ::google::protobuf::uint32 cached_has_bits = 0;
746 (void) cached_has_bits;
747
748 // .dmi.MetricNames metric_id = 1;
749 if (this->metric_id() != 0) {
750 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
751 1, this->metric_id(), target);
752 }
753
754 // bool is_configured = 2;
755 if (this->is_configured() != 0) {
756 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->is_configured(), target);
757 }
758
759 // uint32 poll_interval = 3;
760 if (this->poll_interval() != 0) {
761 target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->poll_interval(), target);
762 }
763
764 if (_internal_metadata_.have_unknown_fields()) {
765 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
766 _internal_metadata_.unknown_fields(), target);
767 }
768 // @@protoc_insertion_point(serialize_to_array_end:dmi.MetricConfig)
769 return target;
770}
771
772size_t MetricConfig::ByteSizeLong() const {
773// @@protoc_insertion_point(message_byte_size_start:dmi.MetricConfig)
774 size_t total_size = 0;
775
776 if (_internal_metadata_.have_unknown_fields()) {
777 total_size +=
778 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
779 _internal_metadata_.unknown_fields());
780 }
781 ::google::protobuf::uint32 cached_has_bits = 0;
782 // Prevent compiler warnings about cached_has_bits being unused
783 (void) cached_has_bits;
784
785 // .dmi.MetricNames metric_id = 1;
786 if (this->metric_id() != 0) {
787 total_size += 1 +
788 ::google::protobuf::internal::WireFormatLite::EnumSize(this->metric_id());
789 }
790
791 // bool is_configured = 2;
792 if (this->is_configured() != 0) {
793 total_size += 1 + 1;
794 }
795
796 // uint32 poll_interval = 3;
797 if (this->poll_interval() != 0) {
798 total_size += 1 +
799 ::google::protobuf::internal::WireFormatLite::UInt32Size(
800 this->poll_interval());
801 }
802
803 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
804 SetCachedSize(cached_size);
805 return total_size;
806}
807
808void MetricConfig::MergeFrom(const ::google::protobuf::Message& from) {
809// @@protoc_insertion_point(generalized_merge_from_start:dmi.MetricConfig)
810 GOOGLE_DCHECK_NE(&from, this);
811 const MetricConfig* source =
812 ::google::protobuf::DynamicCastToGenerated<MetricConfig>(
813 &from);
814 if (source == nullptr) {
815 // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.MetricConfig)
816 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
817 } else {
818 // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.MetricConfig)
819 MergeFrom(*source);
820 }
821}
822
823void MetricConfig::MergeFrom(const MetricConfig& from) {
824// @@protoc_insertion_point(class_specific_merge_from_start:dmi.MetricConfig)
825 GOOGLE_DCHECK_NE(&from, this);
826 _internal_metadata_.MergeFrom(from._internal_metadata_);
827 ::google::protobuf::uint32 cached_has_bits = 0;
828 (void) cached_has_bits;
829
830 if (from.metric_id() != 0) {
831 set_metric_id(from.metric_id());
832 }
833 if (from.is_configured() != 0) {
834 set_is_configured(from.is_configured());
835 }
836 if (from.poll_interval() != 0) {
837 set_poll_interval(from.poll_interval());
838 }
839}
840
841void MetricConfig::CopyFrom(const ::google::protobuf::Message& from) {
842// @@protoc_insertion_point(generalized_copy_from_start:dmi.MetricConfig)
843 if (&from == this) return;
844 Clear();
845 MergeFrom(from);
846}
847
848void MetricConfig::CopyFrom(const MetricConfig& from) {
849// @@protoc_insertion_point(class_specific_copy_from_start:dmi.MetricConfig)
850 if (&from == this) return;
851 Clear();
852 MergeFrom(from);
853}
854
855bool MetricConfig::IsInitialized() const {
856 return true;
857}
858
859void MetricConfig::Swap(MetricConfig* other) {
860 if (other == this) return;
861 InternalSwap(other);
862}
863void MetricConfig::InternalSwap(MetricConfig* other) {
864 using std::swap;
865 _internal_metadata_.Swap(&other->_internal_metadata_);
866 swap(metric_id_, other->metric_id_);
867 swap(is_configured_, other->is_configured_);
868 swap(poll_interval_, other->poll_interval_);
869}
870
871::google::protobuf::Metadata MetricConfig::GetMetadata() const {
872 ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
873 return ::file_level_metadata_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[kIndexInFileMessages];
874}
875
876
877// ===================================================================
878
879void MetricsConfig::InitAsDefaultInstance() {
880}
881class MetricsConfig::HasBitSetters {
882 public:
883};
884
885#if !defined(_MSC_VER) || _MSC_VER >= 1900
886const int MetricsConfig::kMetricsFieldNumber;
887#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
888
889MetricsConfig::MetricsConfig()
890 : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
891 SharedCtor();
892 // @@protoc_insertion_point(constructor:dmi.MetricsConfig)
893}
894MetricsConfig::MetricsConfig(const MetricsConfig& from)
895 : ::google::protobuf::Message(),
896 _internal_metadata_(nullptr),
897 metrics_(from.metrics_) {
898 _internal_metadata_.MergeFrom(from._internal_metadata_);
899 // @@protoc_insertion_point(copy_constructor:dmi.MetricsConfig)
900}
901
902void MetricsConfig::SharedCtor() {
903 ::google::protobuf::internal::InitSCC(
904 &scc_info_MetricsConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
905}
906
907MetricsConfig::~MetricsConfig() {
908 // @@protoc_insertion_point(destructor:dmi.MetricsConfig)
909 SharedDtor();
910}
911
912void MetricsConfig::SharedDtor() {
913}
914
915void MetricsConfig::SetCachedSize(int size) const {
916 _cached_size_.Set(size);
917}
918const MetricsConfig& MetricsConfig::default_instance() {
919 ::google::protobuf::internal::InitSCC(&::scc_info_MetricsConfig_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
920 return *internal_default_instance();
921}
922
923
924void MetricsConfig::Clear() {
925// @@protoc_insertion_point(message_clear_start:dmi.MetricsConfig)
926 ::google::protobuf::uint32 cached_has_bits = 0;
927 // Prevent compiler warnings about cached_has_bits being unused
928 (void) cached_has_bits;
929
930 metrics_.Clear();
931 _internal_metadata_.Clear();
932}
933
934#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
935const char* MetricsConfig::_InternalParse(const char* begin, const char* end, void* object,
936 ::google::protobuf::internal::ParseContext* ctx) {
937 auto msg = static_cast<MetricsConfig*>(object);
938 ::google::protobuf::int32 size; (void)size;
939 int depth; (void)depth;
940 ::google::protobuf::uint32 tag;
941 ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
942 auto ptr = begin;
943 while (ptr < end) {
944 ptr = ::google::protobuf::io::Parse32(ptr, &tag);
945 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
946 switch (tag >> 3) {
947 // repeated .dmi.MetricConfig metrics = 1;
948 case 1: {
949 if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
950 do {
951 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
952 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
953 parser_till_end = ::dmi::MetricConfig::_InternalParse;
954 object = msg->add_metrics();
955 if (size > end - ptr) goto len_delim_till_end;
956 ptr += size;
957 GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
958 {parser_till_end, object}, ptr - size, ptr));
959 if (ptr >= end) break;
960 } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1));
961 break;
962 }
963 default: {
964 handle_unusual:
965 if ((tag & 7) == 4 || tag == 0) {
966 ctx->EndGroup(tag);
967 return ptr;
968 }
969 auto res = UnknownFieldParse(tag, {_InternalParse, msg},
970 ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
971 ptr = res.first;
972 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
973 if (res.second) return ptr;
974 }
975 } // switch
976 } // while
977 return ptr;
978len_delim_till_end:
979 return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
980 {parser_till_end, object}, size);
981}
982#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
983bool MetricsConfig::MergePartialFromCodedStream(
984 ::google::protobuf::io::CodedInputStream* input) {
985#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
986 ::google::protobuf::uint32 tag;
987 // @@protoc_insertion_point(parse_start:dmi.MetricsConfig)
988 for (;;) {
989 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
990 tag = p.first;
991 if (!p.second) goto handle_unusual;
992 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
993 // repeated .dmi.MetricConfig metrics = 1;
994 case 1: {
995 if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
996 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
997 input, add_metrics()));
998 } else {
999 goto handle_unusual;
1000 }
1001 break;
1002 }
1003
1004 default: {
1005 handle_unusual:
1006 if (tag == 0) {
1007 goto success;
1008 }
1009 DO_(::google::protobuf::internal::WireFormat::SkipField(
1010 input, tag, _internal_metadata_.mutable_unknown_fields()));
1011 break;
1012 }
1013 }
1014 }
1015success:
1016 // @@protoc_insertion_point(parse_success:dmi.MetricsConfig)
1017 return true;
1018failure:
1019 // @@protoc_insertion_point(parse_failure:dmi.MetricsConfig)
1020 return false;
1021#undef DO_
1022}
1023#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1024
1025void MetricsConfig::SerializeWithCachedSizes(
1026 ::google::protobuf::io::CodedOutputStream* output) const {
1027 // @@protoc_insertion_point(serialize_start:dmi.MetricsConfig)
1028 ::google::protobuf::uint32 cached_has_bits = 0;
1029 (void) cached_has_bits;
1030
1031 // repeated .dmi.MetricConfig metrics = 1;
1032 for (unsigned int i = 0,
1033 n = static_cast<unsigned int>(this->metrics_size()); i < n; i++) {
1034 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1035 1,
1036 this->metrics(static_cast<int>(i)),
1037 output);
1038 }
1039
1040 if (_internal_metadata_.have_unknown_fields()) {
1041 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1042 _internal_metadata_.unknown_fields(), output);
1043 }
1044 // @@protoc_insertion_point(serialize_end:dmi.MetricsConfig)
1045}
1046
1047::google::protobuf::uint8* MetricsConfig::InternalSerializeWithCachedSizesToArray(
1048 ::google::protobuf::uint8* target) const {
1049 // @@protoc_insertion_point(serialize_to_array_start:dmi.MetricsConfig)
1050 ::google::protobuf::uint32 cached_has_bits = 0;
1051 (void) cached_has_bits;
1052
1053 // repeated .dmi.MetricConfig metrics = 1;
1054 for (unsigned int i = 0,
1055 n = static_cast<unsigned int>(this->metrics_size()); i < n; i++) {
1056 target = ::google::protobuf::internal::WireFormatLite::
1057 InternalWriteMessageToArray(
1058 1, this->metrics(static_cast<int>(i)), target);
1059 }
1060
1061 if (_internal_metadata_.have_unknown_fields()) {
1062 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1063 _internal_metadata_.unknown_fields(), target);
1064 }
1065 // @@protoc_insertion_point(serialize_to_array_end:dmi.MetricsConfig)
1066 return target;
1067}
1068
1069size_t MetricsConfig::ByteSizeLong() const {
1070// @@protoc_insertion_point(message_byte_size_start:dmi.MetricsConfig)
1071 size_t total_size = 0;
1072
1073 if (_internal_metadata_.have_unknown_fields()) {
1074 total_size +=
1075 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1076 _internal_metadata_.unknown_fields());
1077 }
1078 ::google::protobuf::uint32 cached_has_bits = 0;
1079 // Prevent compiler warnings about cached_has_bits being unused
1080 (void) cached_has_bits;
1081
1082 // repeated .dmi.MetricConfig metrics = 1;
1083 {
1084 unsigned int count = static_cast<unsigned int>(this->metrics_size());
1085 total_size += 1UL * count;
1086 for (unsigned int i = 0; i < count; i++) {
1087 total_size +=
1088 ::google::protobuf::internal::WireFormatLite::MessageSize(
1089 this->metrics(static_cast<int>(i)));
1090 }
1091 }
1092
1093 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1094 SetCachedSize(cached_size);
1095 return total_size;
1096}
1097
1098void MetricsConfig::MergeFrom(const ::google::protobuf::Message& from) {
1099// @@protoc_insertion_point(generalized_merge_from_start:dmi.MetricsConfig)
1100 GOOGLE_DCHECK_NE(&from, this);
1101 const MetricsConfig* source =
1102 ::google::protobuf::DynamicCastToGenerated<MetricsConfig>(
1103 &from);
1104 if (source == nullptr) {
1105 // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.MetricsConfig)
1106 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1107 } else {
1108 // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.MetricsConfig)
1109 MergeFrom(*source);
1110 }
1111}
1112
1113void MetricsConfig::MergeFrom(const MetricsConfig& from) {
1114// @@protoc_insertion_point(class_specific_merge_from_start:dmi.MetricsConfig)
1115 GOOGLE_DCHECK_NE(&from, this);
1116 _internal_metadata_.MergeFrom(from._internal_metadata_);
1117 ::google::protobuf::uint32 cached_has_bits = 0;
1118 (void) cached_has_bits;
1119
1120 metrics_.MergeFrom(from.metrics_);
1121}
1122
1123void MetricsConfig::CopyFrom(const ::google::protobuf::Message& from) {
1124// @@protoc_insertion_point(generalized_copy_from_start:dmi.MetricsConfig)
1125 if (&from == this) return;
1126 Clear();
1127 MergeFrom(from);
1128}
1129
1130void MetricsConfig::CopyFrom(const MetricsConfig& from) {
1131// @@protoc_insertion_point(class_specific_copy_from_start:dmi.MetricsConfig)
1132 if (&from == this) return;
1133 Clear();
1134 MergeFrom(from);
1135}
1136
1137bool MetricsConfig::IsInitialized() const {
1138 return true;
1139}
1140
1141void MetricsConfig::Swap(MetricsConfig* other) {
1142 if (other == this) return;
1143 InternalSwap(other);
1144}
1145void MetricsConfig::InternalSwap(MetricsConfig* other) {
1146 using std::swap;
1147 _internal_metadata_.Swap(&other->_internal_metadata_);
1148 CastToBase(&metrics_)->InternalSwap(CastToBase(&other->metrics_));
1149}
1150
1151::google::protobuf::Metadata MetricsConfig::GetMetadata() const {
1152 ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
1153 return ::file_level_metadata_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[kIndexInFileMessages];
1154}
1155
1156
1157// ===================================================================
1158
1159void ListMetricsResponse::InitAsDefaultInstance() {
1160 ::dmi::_ListMetricsResponse_default_instance_._instance.get_mutable()->metrics_ = const_cast< ::dmi::MetricsConfig*>(
1161 ::dmi::MetricsConfig::internal_default_instance());
1162}
1163class ListMetricsResponse::HasBitSetters {
1164 public:
1165 static const ::dmi::MetricsConfig& metrics(const ListMetricsResponse* msg);
1166};
1167
1168const ::dmi::MetricsConfig&
1169ListMetricsResponse::HasBitSetters::metrics(const ListMetricsResponse* msg) {
1170 return *msg->metrics_;
1171}
1172#if !defined(_MSC_VER) || _MSC_VER >= 1900
1173const int ListMetricsResponse::kStatusFieldNumber;
1174const int ListMetricsResponse::kReasonFieldNumber;
1175const int ListMetricsResponse::kMetricsFieldNumber;
1176const int ListMetricsResponse::kReasonDetailFieldNumber;
1177#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
1178
1179ListMetricsResponse::ListMetricsResponse()
1180 : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
1181 SharedCtor();
1182 // @@protoc_insertion_point(constructor:dmi.ListMetricsResponse)
1183}
1184ListMetricsResponse::ListMetricsResponse(const ListMetricsResponse& from)
1185 : ::google::protobuf::Message(),
1186 _internal_metadata_(nullptr) {
1187 _internal_metadata_.MergeFrom(from._internal_metadata_);
1188 reason_detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1189 if (from.reason_detail().size() > 0) {
1190 reason_detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_detail_);
1191 }
1192 if (from.has_metrics()) {
1193 metrics_ = new ::dmi::MetricsConfig(*from.metrics_);
1194 } else {
1195 metrics_ = nullptr;
1196 }
1197 ::memcpy(&status_, &from.status_,
1198 static_cast<size_t>(reinterpret_cast<char*>(&reason_) -
1199 reinterpret_cast<char*>(&status_)) + sizeof(reason_));
1200 // @@protoc_insertion_point(copy_constructor:dmi.ListMetricsResponse)
1201}
1202
1203void ListMetricsResponse::SharedCtor() {
1204 ::google::protobuf::internal::InitSCC(
1205 &scc_info_ListMetricsResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
1206 reason_detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1207 ::memset(&metrics_, 0, static_cast<size_t>(
1208 reinterpret_cast<char*>(&reason_) -
1209 reinterpret_cast<char*>(&metrics_)) + sizeof(reason_));
1210}
1211
1212ListMetricsResponse::~ListMetricsResponse() {
1213 // @@protoc_insertion_point(destructor:dmi.ListMetricsResponse)
1214 SharedDtor();
1215}
1216
1217void ListMetricsResponse::SharedDtor() {
1218 reason_detail_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1219 if (this != internal_default_instance()) delete metrics_;
1220}
1221
1222void ListMetricsResponse::SetCachedSize(int size) const {
1223 _cached_size_.Set(size);
1224}
1225const ListMetricsResponse& ListMetricsResponse::default_instance() {
1226 ::google::protobuf::internal::InitSCC(&::scc_info_ListMetricsResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
1227 return *internal_default_instance();
1228}
1229
1230
1231void ListMetricsResponse::Clear() {
1232// @@protoc_insertion_point(message_clear_start:dmi.ListMetricsResponse)
1233 ::google::protobuf::uint32 cached_has_bits = 0;
1234 // Prevent compiler warnings about cached_has_bits being unused
1235 (void) cached_has_bits;
1236
1237 reason_detail_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1238 if (GetArenaNoVirtual() == nullptr && metrics_ != nullptr) {
1239 delete metrics_;
1240 }
1241 metrics_ = nullptr;
1242 ::memset(&status_, 0, static_cast<size_t>(
1243 reinterpret_cast<char*>(&reason_) -
1244 reinterpret_cast<char*>(&status_)) + sizeof(reason_));
1245 _internal_metadata_.Clear();
1246}
1247
1248#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1249const char* ListMetricsResponse::_InternalParse(const char* begin, const char* end, void* object,
1250 ::google::protobuf::internal::ParseContext* ctx) {
1251 auto msg = static_cast<ListMetricsResponse*>(object);
1252 ::google::protobuf::int32 size; (void)size;
1253 int depth; (void)depth;
1254 ::google::protobuf::uint32 tag;
1255 ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
1256 auto ptr = begin;
1257 while (ptr < end) {
1258 ptr = ::google::protobuf::io::Parse32(ptr, &tag);
1259 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
1260 switch (tag >> 3) {
1261 // .dmi.Status status = 1;
1262 case 1: {
1263 if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
1264 ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
1265 msg->set_status(static_cast<::dmi::Status>(val));
1266 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
1267 break;
1268 }
1269 // .dmi.ListMetricsResponse.Reason reason = 2;
1270 case 2: {
1271 if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
1272 ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
1273 msg->set_reason(static_cast<::dmi::ListMetricsResponse_Reason>(val));
1274 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
1275 break;
1276 }
1277 // .dmi.MetricsConfig metrics = 3;
1278 case 3: {
1279 if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
1280 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
1281 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
1282 parser_till_end = ::dmi::MetricsConfig::_InternalParse;
1283 object = msg->mutable_metrics();
1284 if (size > end - ptr) goto len_delim_till_end;
1285 ptr += size;
1286 GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
1287 {parser_till_end, object}, ptr - size, ptr));
1288 break;
1289 }
1290 // string reason_detail = 4;
1291 case 4: {
1292 if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual;
1293 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
1294 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
1295 ctx->extra_parse_data().SetFieldName("dmi.ListMetricsResponse.reason_detail");
1296 object = msg->mutable_reason_detail();
1297 if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
1298 parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
1299 goto string_till_end;
1300 }
1301 GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
1302 ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
1303 ptr += size;
1304 break;
1305 }
1306 default: {
1307 handle_unusual:
1308 if ((tag & 7) == 4 || tag == 0) {
1309 ctx->EndGroup(tag);
1310 return ptr;
1311 }
1312 auto res = UnknownFieldParse(tag, {_InternalParse, msg},
1313 ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
1314 ptr = res.first;
1315 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
1316 if (res.second) return ptr;
1317 }
1318 } // switch
1319 } // while
1320 return ptr;
1321string_till_end:
1322 static_cast<::std::string*>(object)->clear();
1323 static_cast<::std::string*>(object)->reserve(size);
1324 goto len_delim_till_end;
1325len_delim_till_end:
1326 return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
1327 {parser_till_end, object}, size);
1328}
1329#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1330bool ListMetricsResponse::MergePartialFromCodedStream(
1331 ::google::protobuf::io::CodedInputStream* input) {
1332#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1333 ::google::protobuf::uint32 tag;
1334 // @@protoc_insertion_point(parse_start:dmi.ListMetricsResponse)
1335 for (;;) {
1336 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1337 tag = p.first;
1338 if (!p.second) goto handle_unusual;
1339 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1340 // .dmi.Status status = 1;
1341 case 1: {
1342 if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
1343 int value = 0;
1344 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1345 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
1346 input, &value)));
1347 set_status(static_cast< ::dmi::Status >(value));
1348 } else {
1349 goto handle_unusual;
1350 }
1351 break;
1352 }
1353
1354 // .dmi.ListMetricsResponse.Reason reason = 2;
1355 case 2: {
1356 if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {
1357 int value = 0;
1358 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1359 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
1360 input, &value)));
1361 set_reason(static_cast< ::dmi::ListMetricsResponse_Reason >(value));
1362 } else {
1363 goto handle_unusual;
1364 }
1365 break;
1366 }
1367
1368 // .dmi.MetricsConfig metrics = 3;
1369 case 3: {
1370 if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
1371 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
1372 input, mutable_metrics()));
1373 } else {
1374 goto handle_unusual;
1375 }
1376 break;
1377 }
1378
1379 // string reason_detail = 4;
1380 case 4: {
1381 if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) {
1382 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1383 input, this->mutable_reason_detail()));
1384 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1385 this->reason_detail().data(), static_cast<int>(this->reason_detail().length()),
1386 ::google::protobuf::internal::WireFormatLite::PARSE,
1387 "dmi.ListMetricsResponse.reason_detail"));
1388 } else {
1389 goto handle_unusual;
1390 }
1391 break;
1392 }
1393
1394 default: {
1395 handle_unusual:
1396 if (tag == 0) {
1397 goto success;
1398 }
1399 DO_(::google::protobuf::internal::WireFormat::SkipField(
1400 input, tag, _internal_metadata_.mutable_unknown_fields()));
1401 break;
1402 }
1403 }
1404 }
1405success:
1406 // @@protoc_insertion_point(parse_success:dmi.ListMetricsResponse)
1407 return true;
1408failure:
1409 // @@protoc_insertion_point(parse_failure:dmi.ListMetricsResponse)
1410 return false;
1411#undef DO_
1412}
1413#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1414
1415void ListMetricsResponse::SerializeWithCachedSizes(
1416 ::google::protobuf::io::CodedOutputStream* output) const {
1417 // @@protoc_insertion_point(serialize_start:dmi.ListMetricsResponse)
1418 ::google::protobuf::uint32 cached_has_bits = 0;
1419 (void) cached_has_bits;
1420
1421 // .dmi.Status status = 1;
1422 if (this->status() != 0) {
1423 ::google::protobuf::internal::WireFormatLite::WriteEnum(
1424 1, this->status(), output);
1425 }
1426
1427 // .dmi.ListMetricsResponse.Reason reason = 2;
1428 if (this->reason() != 0) {
1429 ::google::protobuf::internal::WireFormatLite::WriteEnum(
1430 2, this->reason(), output);
1431 }
1432
1433 // .dmi.MetricsConfig metrics = 3;
1434 if (this->has_metrics()) {
1435 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1436 3, HasBitSetters::metrics(this), output);
1437 }
1438
1439 // string reason_detail = 4;
1440 if (this->reason_detail().size() > 0) {
1441 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1442 this->reason_detail().data(), static_cast<int>(this->reason_detail().length()),
1443 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1444 "dmi.ListMetricsResponse.reason_detail");
1445 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1446 4, this->reason_detail(), output);
1447 }
1448
1449 if (_internal_metadata_.have_unknown_fields()) {
1450 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1451 _internal_metadata_.unknown_fields(), output);
1452 }
1453 // @@protoc_insertion_point(serialize_end:dmi.ListMetricsResponse)
1454}
1455
1456::google::protobuf::uint8* ListMetricsResponse::InternalSerializeWithCachedSizesToArray(
1457 ::google::protobuf::uint8* target) const {
1458 // @@protoc_insertion_point(serialize_to_array_start:dmi.ListMetricsResponse)
1459 ::google::protobuf::uint32 cached_has_bits = 0;
1460 (void) cached_has_bits;
1461
1462 // .dmi.Status status = 1;
1463 if (this->status() != 0) {
1464 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1465 1, this->status(), target);
1466 }
1467
1468 // .dmi.ListMetricsResponse.Reason reason = 2;
1469 if (this->reason() != 0) {
1470 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1471 2, this->reason(), target);
1472 }
1473
1474 // .dmi.MetricsConfig metrics = 3;
1475 if (this->has_metrics()) {
1476 target = ::google::protobuf::internal::WireFormatLite::
1477 InternalWriteMessageToArray(
1478 3, HasBitSetters::metrics(this), target);
1479 }
1480
1481 // string reason_detail = 4;
1482 if (this->reason_detail().size() > 0) {
1483 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1484 this->reason_detail().data(), static_cast<int>(this->reason_detail().length()),
1485 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1486 "dmi.ListMetricsResponse.reason_detail");
1487 target =
1488 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1489 4, this->reason_detail(), target);
1490 }
1491
1492 if (_internal_metadata_.have_unknown_fields()) {
1493 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1494 _internal_metadata_.unknown_fields(), target);
1495 }
1496 // @@protoc_insertion_point(serialize_to_array_end:dmi.ListMetricsResponse)
1497 return target;
1498}
1499
1500size_t ListMetricsResponse::ByteSizeLong() const {
1501// @@protoc_insertion_point(message_byte_size_start:dmi.ListMetricsResponse)
1502 size_t total_size = 0;
1503
1504 if (_internal_metadata_.have_unknown_fields()) {
1505 total_size +=
1506 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1507 _internal_metadata_.unknown_fields());
1508 }
1509 ::google::protobuf::uint32 cached_has_bits = 0;
1510 // Prevent compiler warnings about cached_has_bits being unused
1511 (void) cached_has_bits;
1512
1513 // string reason_detail = 4;
1514 if (this->reason_detail().size() > 0) {
1515 total_size += 1 +
1516 ::google::protobuf::internal::WireFormatLite::StringSize(
1517 this->reason_detail());
1518 }
1519
1520 // .dmi.MetricsConfig metrics = 3;
1521 if (this->has_metrics()) {
1522 total_size += 1 +
1523 ::google::protobuf::internal::WireFormatLite::MessageSize(
1524 *metrics_);
1525 }
1526
1527 // .dmi.Status status = 1;
1528 if (this->status() != 0) {
1529 total_size += 1 +
1530 ::google::protobuf::internal::WireFormatLite::EnumSize(this->status());
1531 }
1532
1533 // .dmi.ListMetricsResponse.Reason reason = 2;
1534 if (this->reason() != 0) {
1535 total_size += 1 +
1536 ::google::protobuf::internal::WireFormatLite::EnumSize(this->reason());
1537 }
1538
1539 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1540 SetCachedSize(cached_size);
1541 return total_size;
1542}
1543
1544void ListMetricsResponse::MergeFrom(const ::google::protobuf::Message& from) {
1545// @@protoc_insertion_point(generalized_merge_from_start:dmi.ListMetricsResponse)
1546 GOOGLE_DCHECK_NE(&from, this);
1547 const ListMetricsResponse* source =
1548 ::google::protobuf::DynamicCastToGenerated<ListMetricsResponse>(
1549 &from);
1550 if (source == nullptr) {
1551 // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.ListMetricsResponse)
1552 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1553 } else {
1554 // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.ListMetricsResponse)
1555 MergeFrom(*source);
1556 }
1557}
1558
1559void ListMetricsResponse::MergeFrom(const ListMetricsResponse& from) {
1560// @@protoc_insertion_point(class_specific_merge_from_start:dmi.ListMetricsResponse)
1561 GOOGLE_DCHECK_NE(&from, this);
1562 _internal_metadata_.MergeFrom(from._internal_metadata_);
1563 ::google::protobuf::uint32 cached_has_bits = 0;
1564 (void) cached_has_bits;
1565
1566 if (from.reason_detail().size() > 0) {
1567
1568 reason_detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_detail_);
1569 }
1570 if (from.has_metrics()) {
1571 mutable_metrics()->::dmi::MetricsConfig::MergeFrom(from.metrics());
1572 }
1573 if (from.status() != 0) {
1574 set_status(from.status());
1575 }
1576 if (from.reason() != 0) {
1577 set_reason(from.reason());
1578 }
1579}
1580
1581void ListMetricsResponse::CopyFrom(const ::google::protobuf::Message& from) {
1582// @@protoc_insertion_point(generalized_copy_from_start:dmi.ListMetricsResponse)
1583 if (&from == this) return;
1584 Clear();
1585 MergeFrom(from);
1586}
1587
1588void ListMetricsResponse::CopyFrom(const ListMetricsResponse& from) {
1589// @@protoc_insertion_point(class_specific_copy_from_start:dmi.ListMetricsResponse)
1590 if (&from == this) return;
1591 Clear();
1592 MergeFrom(from);
1593}
1594
1595bool ListMetricsResponse::IsInitialized() const {
1596 return true;
1597}
1598
1599void ListMetricsResponse::Swap(ListMetricsResponse* other) {
1600 if (other == this) return;
1601 InternalSwap(other);
1602}
1603void ListMetricsResponse::InternalSwap(ListMetricsResponse* other) {
1604 using std::swap;
1605 _internal_metadata_.Swap(&other->_internal_metadata_);
1606 reason_detail_.Swap(&other->reason_detail_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1607 GetArenaNoVirtual());
1608 swap(metrics_, other->metrics_);
1609 swap(status_, other->status_);
1610 swap(reason_, other->reason_);
1611}
1612
1613::google::protobuf::Metadata ListMetricsResponse::GetMetadata() const {
1614 ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
1615 return ::file_level_metadata_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[kIndexInFileMessages];
1616}
1617
1618
1619// ===================================================================
1620
1621void MetricsConfigurationRequest::InitAsDefaultInstance() {
1622 ::dmi::_MetricsConfigurationRequest_default_instance_._instance.get_mutable()->device_uuid_ = const_cast< ::dmi::Uuid*>(
1623 ::dmi::Uuid::internal_default_instance());
1624 ::dmi::_MetricsConfigurationRequest_default_instance_.changes_ = const_cast< ::dmi::MetricsConfig*>(
1625 ::dmi::MetricsConfig::internal_default_instance());
1626 ::dmi::_MetricsConfigurationRequest_default_instance_.reset_to_default_ = false;
1627}
1628class MetricsConfigurationRequest::HasBitSetters {
1629 public:
1630 static const ::dmi::Uuid& device_uuid(const MetricsConfigurationRequest* msg);
1631 static const ::dmi::MetricsConfig& changes(const MetricsConfigurationRequest* msg);
1632};
1633
1634const ::dmi::Uuid&
1635MetricsConfigurationRequest::HasBitSetters::device_uuid(const MetricsConfigurationRequest* msg) {
1636 return *msg->device_uuid_;
1637}
1638const ::dmi::MetricsConfig&
1639MetricsConfigurationRequest::HasBitSetters::changes(const MetricsConfigurationRequest* msg) {
1640 return *msg->operation_.changes_;
1641}
1642void MetricsConfigurationRequest::clear_device_uuid() {
1643 if (GetArenaNoVirtual() == nullptr && device_uuid_ != nullptr) {
1644 delete device_uuid_;
1645 }
1646 device_uuid_ = nullptr;
1647}
1648void MetricsConfigurationRequest::set_allocated_changes(::dmi::MetricsConfig* changes) {
1649 ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
1650 clear_operation();
1651 if (changes) {
1652 ::google::protobuf::Arena* submessage_arena = nullptr;
1653 if (message_arena != submessage_arena) {
1654 changes = ::google::protobuf::internal::GetOwnedMessage(
1655 message_arena, changes, submessage_arena);
1656 }
1657 set_has_changes();
1658 operation_.changes_ = changes;
1659 }
1660 // @@protoc_insertion_point(field_set_allocated:dmi.MetricsConfigurationRequest.changes)
1661}
1662#if !defined(_MSC_VER) || _MSC_VER >= 1900
1663const int MetricsConfigurationRequest::kDeviceUuidFieldNumber;
1664const int MetricsConfigurationRequest::kChangesFieldNumber;
1665const int MetricsConfigurationRequest::kResetToDefaultFieldNumber;
1666#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
1667
1668MetricsConfigurationRequest::MetricsConfigurationRequest()
1669 : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
1670 SharedCtor();
1671 // @@protoc_insertion_point(constructor:dmi.MetricsConfigurationRequest)
1672}
1673MetricsConfigurationRequest::MetricsConfigurationRequest(const MetricsConfigurationRequest& from)
1674 : ::google::protobuf::Message(),
1675 _internal_metadata_(nullptr) {
1676 _internal_metadata_.MergeFrom(from._internal_metadata_);
1677 if (from.has_device_uuid()) {
1678 device_uuid_ = new ::dmi::Uuid(*from.device_uuid_);
1679 } else {
1680 device_uuid_ = nullptr;
1681 }
1682 clear_has_operation();
1683 switch (from.operation_case()) {
1684 case kChanges: {
1685 mutable_changes()->::dmi::MetricsConfig::MergeFrom(from.changes());
1686 break;
1687 }
1688 case kResetToDefault: {
1689 set_reset_to_default(from.reset_to_default());
1690 break;
1691 }
1692 case OPERATION_NOT_SET: {
1693 break;
1694 }
1695 }
1696 // @@protoc_insertion_point(copy_constructor:dmi.MetricsConfigurationRequest)
1697}
1698
1699void MetricsConfigurationRequest::SharedCtor() {
1700 ::google::protobuf::internal::InitSCC(
1701 &scc_info_MetricsConfigurationRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
1702 device_uuid_ = nullptr;
1703 clear_has_operation();
1704}
1705
1706MetricsConfigurationRequest::~MetricsConfigurationRequest() {
1707 // @@protoc_insertion_point(destructor:dmi.MetricsConfigurationRequest)
1708 SharedDtor();
1709}
1710
1711void MetricsConfigurationRequest::SharedDtor() {
1712 if (this != internal_default_instance()) delete device_uuid_;
1713 if (has_operation()) {
1714 clear_operation();
1715 }
1716}
1717
1718void MetricsConfigurationRequest::SetCachedSize(int size) const {
1719 _cached_size_.Set(size);
1720}
1721const MetricsConfigurationRequest& MetricsConfigurationRequest::default_instance() {
1722 ::google::protobuf::internal::InitSCC(&::scc_info_MetricsConfigurationRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
1723 return *internal_default_instance();
1724}
1725
1726
1727void MetricsConfigurationRequest::clear_operation() {
1728// @@protoc_insertion_point(one_of_clear_start:dmi.MetricsConfigurationRequest)
1729 switch (operation_case()) {
1730 case kChanges: {
1731 delete operation_.changes_;
1732 break;
1733 }
1734 case kResetToDefault: {
1735 // No need to clear
1736 break;
1737 }
1738 case OPERATION_NOT_SET: {
1739 break;
1740 }
1741 }
1742 _oneof_case_[0] = OPERATION_NOT_SET;
1743}
1744
1745
1746void MetricsConfigurationRequest::Clear() {
1747// @@protoc_insertion_point(message_clear_start:dmi.MetricsConfigurationRequest)
1748 ::google::protobuf::uint32 cached_has_bits = 0;
1749 // Prevent compiler warnings about cached_has_bits being unused
1750 (void) cached_has_bits;
1751
1752 if (GetArenaNoVirtual() == nullptr && device_uuid_ != nullptr) {
1753 delete device_uuid_;
1754 }
1755 device_uuid_ = nullptr;
1756 clear_operation();
1757 _internal_metadata_.Clear();
1758}
1759
1760#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1761const char* MetricsConfigurationRequest::_InternalParse(const char* begin, const char* end, void* object,
1762 ::google::protobuf::internal::ParseContext* ctx) {
1763 auto msg = static_cast<MetricsConfigurationRequest*>(object);
1764 ::google::protobuf::int32 size; (void)size;
1765 int depth; (void)depth;
1766 ::google::protobuf::uint32 tag;
1767 ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
1768 auto ptr = begin;
1769 while (ptr < end) {
1770 ptr = ::google::protobuf::io::Parse32(ptr, &tag);
1771 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
1772 switch (tag >> 3) {
1773 // .dmi.Uuid device_uuid = 1;
1774 case 1: {
1775 if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
1776 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
1777 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
1778 parser_till_end = ::dmi::Uuid::_InternalParse;
1779 object = msg->mutable_device_uuid();
1780 if (size > end - ptr) goto len_delim_till_end;
1781 ptr += size;
1782 GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
1783 {parser_till_end, object}, ptr - size, ptr));
1784 break;
1785 }
1786 // .dmi.MetricsConfig changes = 2;
1787 case 2: {
1788 if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
1789 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
1790 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
1791 parser_till_end = ::dmi::MetricsConfig::_InternalParse;
1792 object = msg->mutable_changes();
1793 if (size > end - ptr) goto len_delim_till_end;
1794 ptr += size;
1795 GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
1796 {parser_till_end, object}, ptr - size, ptr));
1797 break;
1798 }
1799 // bool reset_to_default = 3;
1800 case 3: {
1801 if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual;
1802 msg->set_reset_to_default(::google::protobuf::internal::ReadVarint(&ptr));
1803 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
1804 break;
1805 }
1806 default: {
1807 handle_unusual:
1808 if ((tag & 7) == 4 || tag == 0) {
1809 ctx->EndGroup(tag);
1810 return ptr;
1811 }
1812 auto res = UnknownFieldParse(tag, {_InternalParse, msg},
1813 ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
1814 ptr = res.first;
1815 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
1816 if (res.second) return ptr;
1817 }
1818 } // switch
1819 } // while
1820 return ptr;
1821len_delim_till_end:
1822 return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
1823 {parser_till_end, object}, size);
1824}
1825#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1826bool MetricsConfigurationRequest::MergePartialFromCodedStream(
1827 ::google::protobuf::io::CodedInputStream* input) {
1828#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1829 ::google::protobuf::uint32 tag;
1830 // @@protoc_insertion_point(parse_start:dmi.MetricsConfigurationRequest)
1831 for (;;) {
1832 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1833 tag = p.first;
1834 if (!p.second) goto handle_unusual;
1835 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1836 // .dmi.Uuid device_uuid = 1;
1837 case 1: {
1838 if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
1839 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
1840 input, mutable_device_uuid()));
1841 } else {
1842 goto handle_unusual;
1843 }
1844 break;
1845 }
1846
1847 // .dmi.MetricsConfig changes = 2;
1848 case 2: {
1849 if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
1850 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
1851 input, mutable_changes()));
1852 } else {
1853 goto handle_unusual;
1854 }
1855 break;
1856 }
1857
1858 // bool reset_to_default = 3;
1859 case 3: {
1860 if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) {
1861 clear_operation();
1862 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1863 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
1864 input, &operation_.reset_to_default_)));
1865 set_has_reset_to_default();
1866 } else {
1867 goto handle_unusual;
1868 }
1869 break;
1870 }
1871
1872 default: {
1873 handle_unusual:
1874 if (tag == 0) {
1875 goto success;
1876 }
1877 DO_(::google::protobuf::internal::WireFormat::SkipField(
1878 input, tag, _internal_metadata_.mutable_unknown_fields()));
1879 break;
1880 }
1881 }
1882 }
1883success:
1884 // @@protoc_insertion_point(parse_success:dmi.MetricsConfigurationRequest)
1885 return true;
1886failure:
1887 // @@protoc_insertion_point(parse_failure:dmi.MetricsConfigurationRequest)
1888 return false;
1889#undef DO_
1890}
1891#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1892
1893void MetricsConfigurationRequest::SerializeWithCachedSizes(
1894 ::google::protobuf::io::CodedOutputStream* output) const {
1895 // @@protoc_insertion_point(serialize_start:dmi.MetricsConfigurationRequest)
1896 ::google::protobuf::uint32 cached_has_bits = 0;
1897 (void) cached_has_bits;
1898
1899 // .dmi.Uuid device_uuid = 1;
1900 if (this->has_device_uuid()) {
1901 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1902 1, HasBitSetters::device_uuid(this), output);
1903 }
1904
1905 // .dmi.MetricsConfig changes = 2;
1906 if (has_changes()) {
1907 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1908 2, HasBitSetters::changes(this), output);
1909 }
1910
1911 // bool reset_to_default = 3;
1912 if (has_reset_to_default()) {
1913 ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->reset_to_default(), output);
1914 }
1915
1916 if (_internal_metadata_.have_unknown_fields()) {
1917 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1918 _internal_metadata_.unknown_fields(), output);
1919 }
1920 // @@protoc_insertion_point(serialize_end:dmi.MetricsConfigurationRequest)
1921}
1922
1923::google::protobuf::uint8* MetricsConfigurationRequest::InternalSerializeWithCachedSizesToArray(
1924 ::google::protobuf::uint8* target) const {
1925 // @@protoc_insertion_point(serialize_to_array_start:dmi.MetricsConfigurationRequest)
1926 ::google::protobuf::uint32 cached_has_bits = 0;
1927 (void) cached_has_bits;
1928
1929 // .dmi.Uuid device_uuid = 1;
1930 if (this->has_device_uuid()) {
1931 target = ::google::protobuf::internal::WireFormatLite::
1932 InternalWriteMessageToArray(
1933 1, HasBitSetters::device_uuid(this), target);
1934 }
1935
1936 // .dmi.MetricsConfig changes = 2;
1937 if (has_changes()) {
1938 target = ::google::protobuf::internal::WireFormatLite::
1939 InternalWriteMessageToArray(
1940 2, HasBitSetters::changes(this), target);
1941 }
1942
1943 // bool reset_to_default = 3;
1944 if (has_reset_to_default()) {
1945 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->reset_to_default(), target);
1946 }
1947
1948 if (_internal_metadata_.have_unknown_fields()) {
1949 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1950 _internal_metadata_.unknown_fields(), target);
1951 }
1952 // @@protoc_insertion_point(serialize_to_array_end:dmi.MetricsConfigurationRequest)
1953 return target;
1954}
1955
1956size_t MetricsConfigurationRequest::ByteSizeLong() const {
1957// @@protoc_insertion_point(message_byte_size_start:dmi.MetricsConfigurationRequest)
1958 size_t total_size = 0;
1959
1960 if (_internal_metadata_.have_unknown_fields()) {
1961 total_size +=
1962 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1963 _internal_metadata_.unknown_fields());
1964 }
1965 ::google::protobuf::uint32 cached_has_bits = 0;
1966 // Prevent compiler warnings about cached_has_bits being unused
1967 (void) cached_has_bits;
1968
1969 // .dmi.Uuid device_uuid = 1;
1970 if (this->has_device_uuid()) {
1971 total_size += 1 +
1972 ::google::protobuf::internal::WireFormatLite::MessageSize(
1973 *device_uuid_);
1974 }
1975
1976 switch (operation_case()) {
1977 // .dmi.MetricsConfig changes = 2;
1978 case kChanges: {
1979 total_size += 1 +
1980 ::google::protobuf::internal::WireFormatLite::MessageSize(
1981 *operation_.changes_);
1982 break;
1983 }
1984 // bool reset_to_default = 3;
1985 case kResetToDefault: {
1986 total_size += 1 + 1;
1987 break;
1988 }
1989 case OPERATION_NOT_SET: {
1990 break;
1991 }
1992 }
1993 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1994 SetCachedSize(cached_size);
1995 return total_size;
1996}
1997
1998void MetricsConfigurationRequest::MergeFrom(const ::google::protobuf::Message& from) {
1999// @@protoc_insertion_point(generalized_merge_from_start:dmi.MetricsConfigurationRequest)
2000 GOOGLE_DCHECK_NE(&from, this);
2001 const MetricsConfigurationRequest* source =
2002 ::google::protobuf::DynamicCastToGenerated<MetricsConfigurationRequest>(
2003 &from);
2004 if (source == nullptr) {
2005 // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.MetricsConfigurationRequest)
2006 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2007 } else {
2008 // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.MetricsConfigurationRequest)
2009 MergeFrom(*source);
2010 }
2011}
2012
2013void MetricsConfigurationRequest::MergeFrom(const MetricsConfigurationRequest& from) {
2014// @@protoc_insertion_point(class_specific_merge_from_start:dmi.MetricsConfigurationRequest)
2015 GOOGLE_DCHECK_NE(&from, this);
2016 _internal_metadata_.MergeFrom(from._internal_metadata_);
2017 ::google::protobuf::uint32 cached_has_bits = 0;
2018 (void) cached_has_bits;
2019
2020 if (from.has_device_uuid()) {
2021 mutable_device_uuid()->::dmi::Uuid::MergeFrom(from.device_uuid());
2022 }
2023 switch (from.operation_case()) {
2024 case kChanges: {
2025 mutable_changes()->::dmi::MetricsConfig::MergeFrom(from.changes());
2026 break;
2027 }
2028 case kResetToDefault: {
2029 set_reset_to_default(from.reset_to_default());
2030 break;
2031 }
2032 case OPERATION_NOT_SET: {
2033 break;
2034 }
2035 }
2036}
2037
2038void MetricsConfigurationRequest::CopyFrom(const ::google::protobuf::Message& from) {
2039// @@protoc_insertion_point(generalized_copy_from_start:dmi.MetricsConfigurationRequest)
2040 if (&from == this) return;
2041 Clear();
2042 MergeFrom(from);
2043}
2044
2045void MetricsConfigurationRequest::CopyFrom(const MetricsConfigurationRequest& from) {
2046// @@protoc_insertion_point(class_specific_copy_from_start:dmi.MetricsConfigurationRequest)
2047 if (&from == this) return;
2048 Clear();
2049 MergeFrom(from);
2050}
2051
2052bool MetricsConfigurationRequest::IsInitialized() const {
2053 return true;
2054}
2055
2056void MetricsConfigurationRequest::Swap(MetricsConfigurationRequest* other) {
2057 if (other == this) return;
2058 InternalSwap(other);
2059}
2060void MetricsConfigurationRequest::InternalSwap(MetricsConfigurationRequest* other) {
2061 using std::swap;
2062 _internal_metadata_.Swap(&other->_internal_metadata_);
2063 swap(device_uuid_, other->device_uuid_);
2064 swap(operation_, other->operation_);
2065 swap(_oneof_case_[0], other->_oneof_case_[0]);
2066}
2067
2068::google::protobuf::Metadata MetricsConfigurationRequest::GetMetadata() const {
2069 ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
2070 return ::file_level_metadata_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[kIndexInFileMessages];
2071}
2072
2073
2074// ===================================================================
2075
2076void MetricsConfigurationResponse::InitAsDefaultInstance() {
2077}
2078class MetricsConfigurationResponse::HasBitSetters {
2079 public:
2080};
2081
2082#if !defined(_MSC_VER) || _MSC_VER >= 1900
2083const int MetricsConfigurationResponse::kStatusFieldNumber;
2084const int MetricsConfigurationResponse::kReasonFieldNumber;
2085const int MetricsConfigurationResponse::kReasonDetailFieldNumber;
2086#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
2087
2088MetricsConfigurationResponse::MetricsConfigurationResponse()
2089 : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
2090 SharedCtor();
2091 // @@protoc_insertion_point(constructor:dmi.MetricsConfigurationResponse)
2092}
2093MetricsConfigurationResponse::MetricsConfigurationResponse(const MetricsConfigurationResponse& from)
2094 : ::google::protobuf::Message(),
2095 _internal_metadata_(nullptr) {
2096 _internal_metadata_.MergeFrom(from._internal_metadata_);
2097 reason_detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2098 if (from.reason_detail().size() > 0) {
2099 reason_detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_detail_);
2100 }
2101 ::memcpy(&status_, &from.status_,
2102 static_cast<size_t>(reinterpret_cast<char*>(&reason_) -
2103 reinterpret_cast<char*>(&status_)) + sizeof(reason_));
2104 // @@protoc_insertion_point(copy_constructor:dmi.MetricsConfigurationResponse)
2105}
2106
2107void MetricsConfigurationResponse::SharedCtor() {
2108 ::google::protobuf::internal::InitSCC(
2109 &scc_info_MetricsConfigurationResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
2110 reason_detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2111 ::memset(&status_, 0, static_cast<size_t>(
2112 reinterpret_cast<char*>(&reason_) -
2113 reinterpret_cast<char*>(&status_)) + sizeof(reason_));
2114}
2115
2116MetricsConfigurationResponse::~MetricsConfigurationResponse() {
2117 // @@protoc_insertion_point(destructor:dmi.MetricsConfigurationResponse)
2118 SharedDtor();
2119}
2120
2121void MetricsConfigurationResponse::SharedDtor() {
2122 reason_detail_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2123}
2124
2125void MetricsConfigurationResponse::SetCachedSize(int size) const {
2126 _cached_size_.Set(size);
2127}
2128const MetricsConfigurationResponse& MetricsConfigurationResponse::default_instance() {
2129 ::google::protobuf::internal::InitSCC(&::scc_info_MetricsConfigurationResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
2130 return *internal_default_instance();
2131}
2132
2133
2134void MetricsConfigurationResponse::Clear() {
2135// @@protoc_insertion_point(message_clear_start:dmi.MetricsConfigurationResponse)
2136 ::google::protobuf::uint32 cached_has_bits = 0;
2137 // Prevent compiler warnings about cached_has_bits being unused
2138 (void) cached_has_bits;
2139
2140 reason_detail_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2141 ::memset(&status_, 0, static_cast<size_t>(
2142 reinterpret_cast<char*>(&reason_) -
2143 reinterpret_cast<char*>(&status_)) + sizeof(reason_));
2144 _internal_metadata_.Clear();
2145}
2146
2147#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2148const char* MetricsConfigurationResponse::_InternalParse(const char* begin, const char* end, void* object,
2149 ::google::protobuf::internal::ParseContext* ctx) {
2150 auto msg = static_cast<MetricsConfigurationResponse*>(object);
2151 ::google::protobuf::int32 size; (void)size;
2152 int depth; (void)depth;
2153 ::google::protobuf::uint32 tag;
2154 ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
2155 auto ptr = begin;
2156 while (ptr < end) {
2157 ptr = ::google::protobuf::io::Parse32(ptr, &tag);
2158 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
2159 switch (tag >> 3) {
2160 // .dmi.Status status = 1;
2161 case 1: {
2162 if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
2163 ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
2164 msg->set_status(static_cast<::dmi::Status>(val));
2165 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
2166 break;
2167 }
2168 // .dmi.MetricsConfigurationResponse.Reason reason = 2;
2169 case 2: {
2170 if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
2171 ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
2172 msg->set_reason(static_cast<::dmi::MetricsConfigurationResponse_Reason>(val));
2173 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
2174 break;
2175 }
2176 // string reason_detail = 3;
2177 case 3: {
2178 if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
2179 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
2180 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
2181 ctx->extra_parse_data().SetFieldName("dmi.MetricsConfigurationResponse.reason_detail");
2182 object = msg->mutable_reason_detail();
2183 if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
2184 parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
2185 goto string_till_end;
2186 }
2187 GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
2188 ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
2189 ptr += size;
2190 break;
2191 }
2192 default: {
2193 handle_unusual:
2194 if ((tag & 7) == 4 || tag == 0) {
2195 ctx->EndGroup(tag);
2196 return ptr;
2197 }
2198 auto res = UnknownFieldParse(tag, {_InternalParse, msg},
2199 ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
2200 ptr = res.first;
2201 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
2202 if (res.second) return ptr;
2203 }
2204 } // switch
2205 } // while
2206 return ptr;
2207string_till_end:
2208 static_cast<::std::string*>(object)->clear();
2209 static_cast<::std::string*>(object)->reserve(size);
2210 goto len_delim_till_end;
2211len_delim_till_end:
2212 return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
2213 {parser_till_end, object}, size);
2214}
2215#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2216bool MetricsConfigurationResponse::MergePartialFromCodedStream(
2217 ::google::protobuf::io::CodedInputStream* input) {
2218#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
2219 ::google::protobuf::uint32 tag;
2220 // @@protoc_insertion_point(parse_start:dmi.MetricsConfigurationResponse)
2221 for (;;) {
2222 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
2223 tag = p.first;
2224 if (!p.second) goto handle_unusual;
2225 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2226 // .dmi.Status status = 1;
2227 case 1: {
2228 if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
2229 int value = 0;
2230 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2231 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
2232 input, &value)));
2233 set_status(static_cast< ::dmi::Status >(value));
2234 } else {
2235 goto handle_unusual;
2236 }
2237 break;
2238 }
2239
2240 // .dmi.MetricsConfigurationResponse.Reason reason = 2;
2241 case 2: {
2242 if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {
2243 int value = 0;
2244 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2245 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
2246 input, &value)));
2247 set_reason(static_cast< ::dmi::MetricsConfigurationResponse_Reason >(value));
2248 } else {
2249 goto handle_unusual;
2250 }
2251 break;
2252 }
2253
2254 // string reason_detail = 3;
2255 case 3: {
2256 if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
2257 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2258 input, this->mutable_reason_detail()));
2259 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2260 this->reason_detail().data(), static_cast<int>(this->reason_detail().length()),
2261 ::google::protobuf::internal::WireFormatLite::PARSE,
2262 "dmi.MetricsConfigurationResponse.reason_detail"));
2263 } else {
2264 goto handle_unusual;
2265 }
2266 break;
2267 }
2268
2269 default: {
2270 handle_unusual:
2271 if (tag == 0) {
2272 goto success;
2273 }
2274 DO_(::google::protobuf::internal::WireFormat::SkipField(
2275 input, tag, _internal_metadata_.mutable_unknown_fields()));
2276 break;
2277 }
2278 }
2279 }
2280success:
2281 // @@protoc_insertion_point(parse_success:dmi.MetricsConfigurationResponse)
2282 return true;
2283failure:
2284 // @@protoc_insertion_point(parse_failure:dmi.MetricsConfigurationResponse)
2285 return false;
2286#undef DO_
2287}
2288#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2289
2290void MetricsConfigurationResponse::SerializeWithCachedSizes(
2291 ::google::protobuf::io::CodedOutputStream* output) const {
2292 // @@protoc_insertion_point(serialize_start:dmi.MetricsConfigurationResponse)
2293 ::google::protobuf::uint32 cached_has_bits = 0;
2294 (void) cached_has_bits;
2295
2296 // .dmi.Status status = 1;
2297 if (this->status() != 0) {
2298 ::google::protobuf::internal::WireFormatLite::WriteEnum(
2299 1, this->status(), output);
2300 }
2301
2302 // .dmi.MetricsConfigurationResponse.Reason reason = 2;
2303 if (this->reason() != 0) {
2304 ::google::protobuf::internal::WireFormatLite::WriteEnum(
2305 2, this->reason(), output);
2306 }
2307
2308 // string reason_detail = 3;
2309 if (this->reason_detail().size() > 0) {
2310 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2311 this->reason_detail().data(), static_cast<int>(this->reason_detail().length()),
2312 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
2313 "dmi.MetricsConfigurationResponse.reason_detail");
2314 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2315 3, this->reason_detail(), output);
2316 }
2317
2318 if (_internal_metadata_.have_unknown_fields()) {
2319 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2320 _internal_metadata_.unknown_fields(), output);
2321 }
2322 // @@protoc_insertion_point(serialize_end:dmi.MetricsConfigurationResponse)
2323}
2324
2325::google::protobuf::uint8* MetricsConfigurationResponse::InternalSerializeWithCachedSizesToArray(
2326 ::google::protobuf::uint8* target) const {
2327 // @@protoc_insertion_point(serialize_to_array_start:dmi.MetricsConfigurationResponse)
2328 ::google::protobuf::uint32 cached_has_bits = 0;
2329 (void) cached_has_bits;
2330
2331 // .dmi.Status status = 1;
2332 if (this->status() != 0) {
2333 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2334 1, this->status(), target);
2335 }
2336
2337 // .dmi.MetricsConfigurationResponse.Reason reason = 2;
2338 if (this->reason() != 0) {
2339 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2340 2, this->reason(), target);
2341 }
2342
2343 // string reason_detail = 3;
2344 if (this->reason_detail().size() > 0) {
2345 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2346 this->reason_detail().data(), static_cast<int>(this->reason_detail().length()),
2347 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
2348 "dmi.MetricsConfigurationResponse.reason_detail");
2349 target =
2350 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2351 3, this->reason_detail(), target);
2352 }
2353
2354 if (_internal_metadata_.have_unknown_fields()) {
2355 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2356 _internal_metadata_.unknown_fields(), target);
2357 }
2358 // @@protoc_insertion_point(serialize_to_array_end:dmi.MetricsConfigurationResponse)
2359 return target;
2360}
2361
2362size_t MetricsConfigurationResponse::ByteSizeLong() const {
2363// @@protoc_insertion_point(message_byte_size_start:dmi.MetricsConfigurationResponse)
2364 size_t total_size = 0;
2365
2366 if (_internal_metadata_.have_unknown_fields()) {
2367 total_size +=
2368 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2369 _internal_metadata_.unknown_fields());
2370 }
2371 ::google::protobuf::uint32 cached_has_bits = 0;
2372 // Prevent compiler warnings about cached_has_bits being unused
2373 (void) cached_has_bits;
2374
2375 // string reason_detail = 3;
2376 if (this->reason_detail().size() > 0) {
2377 total_size += 1 +
2378 ::google::protobuf::internal::WireFormatLite::StringSize(
2379 this->reason_detail());
2380 }
2381
2382 // .dmi.Status status = 1;
2383 if (this->status() != 0) {
2384 total_size += 1 +
2385 ::google::protobuf::internal::WireFormatLite::EnumSize(this->status());
2386 }
2387
2388 // .dmi.MetricsConfigurationResponse.Reason reason = 2;
2389 if (this->reason() != 0) {
2390 total_size += 1 +
2391 ::google::protobuf::internal::WireFormatLite::EnumSize(this->reason());
2392 }
2393
2394 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
2395 SetCachedSize(cached_size);
2396 return total_size;
2397}
2398
2399void MetricsConfigurationResponse::MergeFrom(const ::google::protobuf::Message& from) {
2400// @@protoc_insertion_point(generalized_merge_from_start:dmi.MetricsConfigurationResponse)
2401 GOOGLE_DCHECK_NE(&from, this);
2402 const MetricsConfigurationResponse* source =
2403 ::google::protobuf::DynamicCastToGenerated<MetricsConfigurationResponse>(
2404 &from);
2405 if (source == nullptr) {
2406 // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.MetricsConfigurationResponse)
2407 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2408 } else {
2409 // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.MetricsConfigurationResponse)
2410 MergeFrom(*source);
2411 }
2412}
2413
2414void MetricsConfigurationResponse::MergeFrom(const MetricsConfigurationResponse& from) {
2415// @@protoc_insertion_point(class_specific_merge_from_start:dmi.MetricsConfigurationResponse)
2416 GOOGLE_DCHECK_NE(&from, this);
2417 _internal_metadata_.MergeFrom(from._internal_metadata_);
2418 ::google::protobuf::uint32 cached_has_bits = 0;
2419 (void) cached_has_bits;
2420
2421 if (from.reason_detail().size() > 0) {
2422
2423 reason_detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_detail_);
2424 }
2425 if (from.status() != 0) {
2426 set_status(from.status());
2427 }
2428 if (from.reason() != 0) {
2429 set_reason(from.reason());
2430 }
2431}
2432
2433void MetricsConfigurationResponse::CopyFrom(const ::google::protobuf::Message& from) {
2434// @@protoc_insertion_point(generalized_copy_from_start:dmi.MetricsConfigurationResponse)
2435 if (&from == this) return;
2436 Clear();
2437 MergeFrom(from);
2438}
2439
2440void MetricsConfigurationResponse::CopyFrom(const MetricsConfigurationResponse& from) {
2441// @@protoc_insertion_point(class_specific_copy_from_start:dmi.MetricsConfigurationResponse)
2442 if (&from == this) return;
2443 Clear();
2444 MergeFrom(from);
2445}
2446
2447bool MetricsConfigurationResponse::IsInitialized() const {
2448 return true;
2449}
2450
2451void MetricsConfigurationResponse::Swap(MetricsConfigurationResponse* other) {
2452 if (other == this) return;
2453 InternalSwap(other);
2454}
2455void MetricsConfigurationResponse::InternalSwap(MetricsConfigurationResponse* other) {
2456 using std::swap;
2457 _internal_metadata_.Swap(&other->_internal_metadata_);
2458 reason_detail_.Swap(&other->reason_detail_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
2459 GetArenaNoVirtual());
2460 swap(status_, other->status_);
2461 swap(reason_, other->reason_);
2462}
2463
2464::google::protobuf::Metadata MetricsConfigurationResponse::GetMetadata() const {
2465 ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
2466 return ::file_level_metadata_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[kIndexInFileMessages];
2467}
2468
2469
2470// ===================================================================
2471
2472void MetricMetaData::InitAsDefaultInstance() {
2473 ::dmi::_MetricMetaData_default_instance_._instance.get_mutable()->device_uuid_ = const_cast< ::dmi::Uuid*>(
2474 ::dmi::Uuid::internal_default_instance());
2475 ::dmi::_MetricMetaData_default_instance_._instance.get_mutable()->component_uuid_ = const_cast< ::dmi::Uuid*>(
2476 ::dmi::Uuid::internal_default_instance());
2477}
2478class MetricMetaData::HasBitSetters {
2479 public:
2480 static const ::dmi::Uuid& device_uuid(const MetricMetaData* msg);
2481 static const ::dmi::Uuid& component_uuid(const MetricMetaData* msg);
2482};
2483
2484const ::dmi::Uuid&
2485MetricMetaData::HasBitSetters::device_uuid(const MetricMetaData* msg) {
2486 return *msg->device_uuid_;
2487}
2488const ::dmi::Uuid&
2489MetricMetaData::HasBitSetters::component_uuid(const MetricMetaData* msg) {
2490 return *msg->component_uuid_;
2491}
2492void MetricMetaData::clear_device_uuid() {
2493 if (GetArenaNoVirtual() == nullptr && device_uuid_ != nullptr) {
2494 delete device_uuid_;
2495 }
2496 device_uuid_ = nullptr;
2497}
2498void MetricMetaData::clear_component_uuid() {
2499 if (GetArenaNoVirtual() == nullptr && component_uuid_ != nullptr) {
2500 delete component_uuid_;
2501 }
2502 component_uuid_ = nullptr;
2503}
2504#if !defined(_MSC_VER) || _MSC_VER >= 1900
2505const int MetricMetaData::kDeviceUuidFieldNumber;
2506const int MetricMetaData::kComponentUuidFieldNumber;
2507const int MetricMetaData::kComponentNameFieldNumber;
2508#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
2509
2510MetricMetaData::MetricMetaData()
2511 : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
2512 SharedCtor();
2513 // @@protoc_insertion_point(constructor:dmi.MetricMetaData)
2514}
2515MetricMetaData::MetricMetaData(const MetricMetaData& from)
2516 : ::google::protobuf::Message(),
2517 _internal_metadata_(nullptr) {
2518 _internal_metadata_.MergeFrom(from._internal_metadata_);
2519 component_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2520 if (from.component_name().size() > 0) {
2521 component_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.component_name_);
2522 }
2523 if (from.has_device_uuid()) {
2524 device_uuid_ = new ::dmi::Uuid(*from.device_uuid_);
2525 } else {
2526 device_uuid_ = nullptr;
2527 }
2528 if (from.has_component_uuid()) {
2529 component_uuid_ = new ::dmi::Uuid(*from.component_uuid_);
2530 } else {
2531 component_uuid_ = nullptr;
2532 }
2533 // @@protoc_insertion_point(copy_constructor:dmi.MetricMetaData)
2534}
2535
2536void MetricMetaData::SharedCtor() {
2537 ::google::protobuf::internal::InitSCC(
2538 &scc_info_MetricMetaData_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
2539 component_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2540 ::memset(&device_uuid_, 0, static_cast<size_t>(
2541 reinterpret_cast<char*>(&component_uuid_) -
2542 reinterpret_cast<char*>(&device_uuid_)) + sizeof(component_uuid_));
2543}
2544
2545MetricMetaData::~MetricMetaData() {
2546 // @@protoc_insertion_point(destructor:dmi.MetricMetaData)
2547 SharedDtor();
2548}
2549
2550void MetricMetaData::SharedDtor() {
2551 component_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2552 if (this != internal_default_instance()) delete device_uuid_;
2553 if (this != internal_default_instance()) delete component_uuid_;
2554}
2555
2556void MetricMetaData::SetCachedSize(int size) const {
2557 _cached_size_.Set(size);
2558}
2559const MetricMetaData& MetricMetaData::default_instance() {
2560 ::google::protobuf::internal::InitSCC(&::scc_info_MetricMetaData_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
2561 return *internal_default_instance();
2562}
2563
2564
2565void MetricMetaData::Clear() {
2566// @@protoc_insertion_point(message_clear_start:dmi.MetricMetaData)
2567 ::google::protobuf::uint32 cached_has_bits = 0;
2568 // Prevent compiler warnings about cached_has_bits being unused
2569 (void) cached_has_bits;
2570
2571 component_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2572 if (GetArenaNoVirtual() == nullptr && device_uuid_ != nullptr) {
2573 delete device_uuid_;
2574 }
2575 device_uuid_ = nullptr;
2576 if (GetArenaNoVirtual() == nullptr && component_uuid_ != nullptr) {
2577 delete component_uuid_;
2578 }
2579 component_uuid_ = nullptr;
2580 _internal_metadata_.Clear();
2581}
2582
2583#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2584const char* MetricMetaData::_InternalParse(const char* begin, const char* end, void* object,
2585 ::google::protobuf::internal::ParseContext* ctx) {
2586 auto msg = static_cast<MetricMetaData*>(object);
2587 ::google::protobuf::int32 size; (void)size;
2588 int depth; (void)depth;
2589 ::google::protobuf::uint32 tag;
2590 ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
2591 auto ptr = begin;
2592 while (ptr < end) {
2593 ptr = ::google::protobuf::io::Parse32(ptr, &tag);
2594 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
2595 switch (tag >> 3) {
2596 // .dmi.Uuid device_uuid = 1;
2597 case 1: {
2598 if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
2599 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
2600 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
2601 parser_till_end = ::dmi::Uuid::_InternalParse;
2602 object = msg->mutable_device_uuid();
2603 if (size > end - ptr) goto len_delim_till_end;
2604 ptr += size;
2605 GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
2606 {parser_till_end, object}, ptr - size, ptr));
2607 break;
2608 }
2609 // .dmi.Uuid component_uuid = 2;
2610 case 2: {
2611 if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
2612 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
2613 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
2614 parser_till_end = ::dmi::Uuid::_InternalParse;
2615 object = msg->mutable_component_uuid();
2616 if (size > end - ptr) goto len_delim_till_end;
2617 ptr += size;
2618 GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
2619 {parser_till_end, object}, ptr - size, ptr));
2620 break;
2621 }
2622 // string component_name = 3;
2623 case 3: {
2624 if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
2625 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
2626 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
2627 ctx->extra_parse_data().SetFieldName("dmi.MetricMetaData.component_name");
2628 object = msg->mutable_component_name();
2629 if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
2630 parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
2631 goto string_till_end;
2632 }
2633 GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
2634 ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
2635 ptr += size;
2636 break;
2637 }
2638 default: {
2639 handle_unusual:
2640 if ((tag & 7) == 4 || tag == 0) {
2641 ctx->EndGroup(tag);
2642 return ptr;
2643 }
2644 auto res = UnknownFieldParse(tag, {_InternalParse, msg},
2645 ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
2646 ptr = res.first;
2647 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
2648 if (res.second) return ptr;
2649 }
2650 } // switch
2651 } // while
2652 return ptr;
2653string_till_end:
2654 static_cast<::std::string*>(object)->clear();
2655 static_cast<::std::string*>(object)->reserve(size);
2656 goto len_delim_till_end;
2657len_delim_till_end:
2658 return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
2659 {parser_till_end, object}, size);
2660}
2661#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2662bool MetricMetaData::MergePartialFromCodedStream(
2663 ::google::protobuf::io::CodedInputStream* input) {
2664#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
2665 ::google::protobuf::uint32 tag;
2666 // @@protoc_insertion_point(parse_start:dmi.MetricMetaData)
2667 for (;;) {
2668 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
2669 tag = p.first;
2670 if (!p.second) goto handle_unusual;
2671 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2672 // .dmi.Uuid device_uuid = 1;
2673 case 1: {
2674 if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
2675 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
2676 input, mutable_device_uuid()));
2677 } else {
2678 goto handle_unusual;
2679 }
2680 break;
2681 }
2682
2683 // .dmi.Uuid component_uuid = 2;
2684 case 2: {
2685 if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
2686 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
2687 input, mutable_component_uuid()));
2688 } else {
2689 goto handle_unusual;
2690 }
2691 break;
2692 }
2693
2694 // string component_name = 3;
2695 case 3: {
2696 if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
2697 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2698 input, this->mutable_component_name()));
2699 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2700 this->component_name().data(), static_cast<int>(this->component_name().length()),
2701 ::google::protobuf::internal::WireFormatLite::PARSE,
2702 "dmi.MetricMetaData.component_name"));
2703 } else {
2704 goto handle_unusual;
2705 }
2706 break;
2707 }
2708
2709 default: {
2710 handle_unusual:
2711 if (tag == 0) {
2712 goto success;
2713 }
2714 DO_(::google::protobuf::internal::WireFormat::SkipField(
2715 input, tag, _internal_metadata_.mutable_unknown_fields()));
2716 break;
2717 }
2718 }
2719 }
2720success:
2721 // @@protoc_insertion_point(parse_success:dmi.MetricMetaData)
2722 return true;
2723failure:
2724 // @@protoc_insertion_point(parse_failure:dmi.MetricMetaData)
2725 return false;
2726#undef DO_
2727}
2728#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2729
2730void MetricMetaData::SerializeWithCachedSizes(
2731 ::google::protobuf::io::CodedOutputStream* output) const {
2732 // @@protoc_insertion_point(serialize_start:dmi.MetricMetaData)
2733 ::google::protobuf::uint32 cached_has_bits = 0;
2734 (void) cached_has_bits;
2735
2736 // .dmi.Uuid device_uuid = 1;
2737 if (this->has_device_uuid()) {
2738 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2739 1, HasBitSetters::device_uuid(this), output);
2740 }
2741
2742 // .dmi.Uuid component_uuid = 2;
2743 if (this->has_component_uuid()) {
2744 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2745 2, HasBitSetters::component_uuid(this), output);
2746 }
2747
2748 // string component_name = 3;
2749 if (this->component_name().size() > 0) {
2750 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2751 this->component_name().data(), static_cast<int>(this->component_name().length()),
2752 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
2753 "dmi.MetricMetaData.component_name");
2754 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2755 3, this->component_name(), output);
2756 }
2757
2758 if (_internal_metadata_.have_unknown_fields()) {
2759 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2760 _internal_metadata_.unknown_fields(), output);
2761 }
2762 // @@protoc_insertion_point(serialize_end:dmi.MetricMetaData)
2763}
2764
2765::google::protobuf::uint8* MetricMetaData::InternalSerializeWithCachedSizesToArray(
2766 ::google::protobuf::uint8* target) const {
2767 // @@protoc_insertion_point(serialize_to_array_start:dmi.MetricMetaData)
2768 ::google::protobuf::uint32 cached_has_bits = 0;
2769 (void) cached_has_bits;
2770
2771 // .dmi.Uuid device_uuid = 1;
2772 if (this->has_device_uuid()) {
2773 target = ::google::protobuf::internal::WireFormatLite::
2774 InternalWriteMessageToArray(
2775 1, HasBitSetters::device_uuid(this), target);
2776 }
2777
2778 // .dmi.Uuid component_uuid = 2;
2779 if (this->has_component_uuid()) {
2780 target = ::google::protobuf::internal::WireFormatLite::
2781 InternalWriteMessageToArray(
2782 2, HasBitSetters::component_uuid(this), target);
2783 }
2784
2785 // string component_name = 3;
2786 if (this->component_name().size() > 0) {
2787 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
2788 this->component_name().data(), static_cast<int>(this->component_name().length()),
2789 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
2790 "dmi.MetricMetaData.component_name");
2791 target =
2792 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2793 3, this->component_name(), target);
2794 }
2795
2796 if (_internal_metadata_.have_unknown_fields()) {
2797 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2798 _internal_metadata_.unknown_fields(), target);
2799 }
2800 // @@protoc_insertion_point(serialize_to_array_end:dmi.MetricMetaData)
2801 return target;
2802}
2803
2804size_t MetricMetaData::ByteSizeLong() const {
2805// @@protoc_insertion_point(message_byte_size_start:dmi.MetricMetaData)
2806 size_t total_size = 0;
2807
2808 if (_internal_metadata_.have_unknown_fields()) {
2809 total_size +=
2810 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2811 _internal_metadata_.unknown_fields());
2812 }
2813 ::google::protobuf::uint32 cached_has_bits = 0;
2814 // Prevent compiler warnings about cached_has_bits being unused
2815 (void) cached_has_bits;
2816
2817 // string component_name = 3;
2818 if (this->component_name().size() > 0) {
2819 total_size += 1 +
2820 ::google::protobuf::internal::WireFormatLite::StringSize(
2821 this->component_name());
2822 }
2823
2824 // .dmi.Uuid device_uuid = 1;
2825 if (this->has_device_uuid()) {
2826 total_size += 1 +
2827 ::google::protobuf::internal::WireFormatLite::MessageSize(
2828 *device_uuid_);
2829 }
2830
2831 // .dmi.Uuid component_uuid = 2;
2832 if (this->has_component_uuid()) {
2833 total_size += 1 +
2834 ::google::protobuf::internal::WireFormatLite::MessageSize(
2835 *component_uuid_);
2836 }
2837
2838 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
2839 SetCachedSize(cached_size);
2840 return total_size;
2841}
2842
2843void MetricMetaData::MergeFrom(const ::google::protobuf::Message& from) {
2844// @@protoc_insertion_point(generalized_merge_from_start:dmi.MetricMetaData)
2845 GOOGLE_DCHECK_NE(&from, this);
2846 const MetricMetaData* source =
2847 ::google::protobuf::DynamicCastToGenerated<MetricMetaData>(
2848 &from);
2849 if (source == nullptr) {
2850 // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.MetricMetaData)
2851 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2852 } else {
2853 // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.MetricMetaData)
2854 MergeFrom(*source);
2855 }
2856}
2857
2858void MetricMetaData::MergeFrom(const MetricMetaData& from) {
2859// @@protoc_insertion_point(class_specific_merge_from_start:dmi.MetricMetaData)
2860 GOOGLE_DCHECK_NE(&from, this);
2861 _internal_metadata_.MergeFrom(from._internal_metadata_);
2862 ::google::protobuf::uint32 cached_has_bits = 0;
2863 (void) cached_has_bits;
2864
2865 if (from.component_name().size() > 0) {
2866
2867 component_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.component_name_);
2868 }
2869 if (from.has_device_uuid()) {
2870 mutable_device_uuid()->::dmi::Uuid::MergeFrom(from.device_uuid());
2871 }
2872 if (from.has_component_uuid()) {
2873 mutable_component_uuid()->::dmi::Uuid::MergeFrom(from.component_uuid());
2874 }
2875}
2876
2877void MetricMetaData::CopyFrom(const ::google::protobuf::Message& from) {
2878// @@protoc_insertion_point(generalized_copy_from_start:dmi.MetricMetaData)
2879 if (&from == this) return;
2880 Clear();
2881 MergeFrom(from);
2882}
2883
2884void MetricMetaData::CopyFrom(const MetricMetaData& from) {
2885// @@protoc_insertion_point(class_specific_copy_from_start:dmi.MetricMetaData)
2886 if (&from == this) return;
2887 Clear();
2888 MergeFrom(from);
2889}
2890
2891bool MetricMetaData::IsInitialized() const {
2892 return true;
2893}
2894
2895void MetricMetaData::Swap(MetricMetaData* other) {
2896 if (other == this) return;
2897 InternalSwap(other);
2898}
2899void MetricMetaData::InternalSwap(MetricMetaData* other) {
2900 using std::swap;
2901 _internal_metadata_.Swap(&other->_internal_metadata_);
2902 component_name_.Swap(&other->component_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
2903 GetArenaNoVirtual());
2904 swap(device_uuid_, other->device_uuid_);
2905 swap(component_uuid_, other->component_uuid_);
2906}
2907
2908::google::protobuf::Metadata MetricMetaData::GetMetadata() const {
2909 ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
2910 return ::file_level_metadata_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[kIndexInFileMessages];
2911}
2912
2913
2914// ===================================================================
2915
2916void Metric::InitAsDefaultInstance() {
2917 ::dmi::_Metric_default_instance_._instance.get_mutable()->metric_metadata_ = const_cast< ::dmi::MetricMetaData*>(
2918 ::dmi::MetricMetaData::internal_default_instance());
2919 ::dmi::_Metric_default_instance_._instance.get_mutable()->value_ = const_cast< ::dmi::ComponentSensorData*>(
2920 ::dmi::ComponentSensorData::internal_default_instance());
2921}
2922class Metric::HasBitSetters {
2923 public:
2924 static const ::dmi::MetricMetaData& metric_metadata(const Metric* msg);
2925 static const ::dmi::ComponentSensorData& value(const Metric* msg);
2926};
2927
2928const ::dmi::MetricMetaData&
2929Metric::HasBitSetters::metric_metadata(const Metric* msg) {
2930 return *msg->metric_metadata_;
2931}
2932const ::dmi::ComponentSensorData&
2933Metric::HasBitSetters::value(const Metric* msg) {
2934 return *msg->value_;
2935}
2936void Metric::clear_value() {
2937 if (GetArenaNoVirtual() == nullptr && value_ != nullptr) {
2938 delete value_;
2939 }
2940 value_ = nullptr;
2941}
2942#if !defined(_MSC_VER) || _MSC_VER >= 1900
2943const int Metric::kMetricIdFieldNumber;
2944const int Metric::kMetricMetadataFieldNumber;
2945const int Metric::kValueFieldNumber;
2946#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
2947
2948Metric::Metric()
2949 : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
2950 SharedCtor();
2951 // @@protoc_insertion_point(constructor:dmi.Metric)
2952}
2953Metric::Metric(const Metric& from)
2954 : ::google::protobuf::Message(),
2955 _internal_metadata_(nullptr) {
2956 _internal_metadata_.MergeFrom(from._internal_metadata_);
2957 if (from.has_metric_metadata()) {
2958 metric_metadata_ = new ::dmi::MetricMetaData(*from.metric_metadata_);
2959 } else {
2960 metric_metadata_ = nullptr;
2961 }
2962 if (from.has_value()) {
2963 value_ = new ::dmi::ComponentSensorData(*from.value_);
2964 } else {
2965 value_ = nullptr;
2966 }
2967 metric_id_ = from.metric_id_;
2968 // @@protoc_insertion_point(copy_constructor:dmi.Metric)
2969}
2970
2971void Metric::SharedCtor() {
2972 ::google::protobuf::internal::InitSCC(
2973 &scc_info_Metric_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
2974 ::memset(&metric_metadata_, 0, static_cast<size_t>(
2975 reinterpret_cast<char*>(&metric_id_) -
2976 reinterpret_cast<char*>(&metric_metadata_)) + sizeof(metric_id_));
2977}
2978
2979Metric::~Metric() {
2980 // @@protoc_insertion_point(destructor:dmi.Metric)
2981 SharedDtor();
2982}
2983
2984void Metric::SharedDtor() {
2985 if (this != internal_default_instance()) delete metric_metadata_;
2986 if (this != internal_default_instance()) delete value_;
2987}
2988
2989void Metric::SetCachedSize(int size) const {
2990 _cached_size_.Set(size);
2991}
2992const Metric& Metric::default_instance() {
2993 ::google::protobuf::internal::InitSCC(&::scc_info_Metric_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
2994 return *internal_default_instance();
2995}
2996
2997
2998void Metric::Clear() {
2999// @@protoc_insertion_point(message_clear_start:dmi.Metric)
3000 ::google::protobuf::uint32 cached_has_bits = 0;
3001 // Prevent compiler warnings about cached_has_bits being unused
3002 (void) cached_has_bits;
3003
3004 if (GetArenaNoVirtual() == nullptr && metric_metadata_ != nullptr) {
3005 delete metric_metadata_;
3006 }
3007 metric_metadata_ = nullptr;
3008 if (GetArenaNoVirtual() == nullptr && value_ != nullptr) {
3009 delete value_;
3010 }
3011 value_ = nullptr;
3012 metric_id_ = 0;
3013 _internal_metadata_.Clear();
3014}
3015
3016#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
3017const char* Metric::_InternalParse(const char* begin, const char* end, void* object,
3018 ::google::protobuf::internal::ParseContext* ctx) {
3019 auto msg = static_cast<Metric*>(object);
3020 ::google::protobuf::int32 size; (void)size;
3021 int depth; (void)depth;
3022 ::google::protobuf::uint32 tag;
3023 ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
3024 auto ptr = begin;
3025 while (ptr < end) {
3026 ptr = ::google::protobuf::io::Parse32(ptr, &tag);
3027 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3028 switch (tag >> 3) {
3029 // .dmi.MetricNames metric_id = 1;
3030 case 1: {
3031 if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
3032 ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
3033 msg->set_metric_id(static_cast<::dmi::MetricNames>(val));
3034 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3035 break;
3036 }
3037 // .dmi.MetricMetaData metric_metadata = 2;
3038 case 2: {
3039 if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual;
3040 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
3041 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3042 parser_till_end = ::dmi::MetricMetaData::_InternalParse;
3043 object = msg->mutable_metric_metadata();
3044 if (size > end - ptr) goto len_delim_till_end;
3045 ptr += size;
3046 GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
3047 {parser_till_end, object}, ptr - size, ptr));
3048 break;
3049 }
3050 // .dmi.ComponentSensorData value = 3;
3051 case 3: {
3052 if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
3053 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
3054 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3055 parser_till_end = ::dmi::ComponentSensorData::_InternalParse;
3056 object = msg->mutable_value();
3057 if (size > end - ptr) goto len_delim_till_end;
3058 ptr += size;
3059 GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
3060 {parser_till_end, object}, ptr - size, ptr));
3061 break;
3062 }
3063 default: {
3064 handle_unusual:
3065 if ((tag & 7) == 4 || tag == 0) {
3066 ctx->EndGroup(tag);
3067 return ptr;
3068 }
3069 auto res = UnknownFieldParse(tag, {_InternalParse, msg},
3070 ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
3071 ptr = res.first;
3072 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
3073 if (res.second) return ptr;
3074 }
3075 } // switch
3076 } // while
3077 return ptr;
3078len_delim_till_end:
3079 return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
3080 {parser_till_end, object}, size);
3081}
3082#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
3083bool Metric::MergePartialFromCodedStream(
3084 ::google::protobuf::io::CodedInputStream* input) {
3085#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
3086 ::google::protobuf::uint32 tag;
3087 // @@protoc_insertion_point(parse_start:dmi.Metric)
3088 for (;;) {
3089 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
3090 tag = p.first;
3091 if (!p.second) goto handle_unusual;
3092 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
3093 // .dmi.MetricNames metric_id = 1;
3094 case 1: {
3095 if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
3096 int value = 0;
3097 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
3098 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
3099 input, &value)));
3100 set_metric_id(static_cast< ::dmi::MetricNames >(value));
3101 } else {
3102 goto handle_unusual;
3103 }
3104 break;
3105 }
3106
3107 // .dmi.MetricMetaData metric_metadata = 2;
3108 case 2: {
3109 if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) {
3110 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
3111 input, mutable_metric_metadata()));
3112 } else {
3113 goto handle_unusual;
3114 }
3115 break;
3116 }
3117
3118 // .dmi.ComponentSensorData value = 3;
3119 case 3: {
3120 if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
3121 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
3122 input, mutable_value()));
3123 } else {
3124 goto handle_unusual;
3125 }
3126 break;
3127 }
3128
3129 default: {
3130 handle_unusual:
3131 if (tag == 0) {
3132 goto success;
3133 }
3134 DO_(::google::protobuf::internal::WireFormat::SkipField(
3135 input, tag, _internal_metadata_.mutable_unknown_fields()));
3136 break;
3137 }
3138 }
3139 }
3140success:
3141 // @@protoc_insertion_point(parse_success:dmi.Metric)
3142 return true;
3143failure:
3144 // @@protoc_insertion_point(parse_failure:dmi.Metric)
3145 return false;
3146#undef DO_
3147}
3148#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
3149
3150void Metric::SerializeWithCachedSizes(
3151 ::google::protobuf::io::CodedOutputStream* output) const {
3152 // @@protoc_insertion_point(serialize_start:dmi.Metric)
3153 ::google::protobuf::uint32 cached_has_bits = 0;
3154 (void) cached_has_bits;
3155
3156 // .dmi.MetricNames metric_id = 1;
3157 if (this->metric_id() != 0) {
3158 ::google::protobuf::internal::WireFormatLite::WriteEnum(
3159 1, this->metric_id(), output);
3160 }
3161
3162 // .dmi.MetricMetaData metric_metadata = 2;
3163 if (this->has_metric_metadata()) {
3164 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3165 2, HasBitSetters::metric_metadata(this), output);
3166 }
3167
3168 // .dmi.ComponentSensorData value = 3;
3169 if (this->has_value()) {
3170 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3171 3, HasBitSetters::value(this), output);
3172 }
3173
3174 if (_internal_metadata_.have_unknown_fields()) {
3175 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3176 _internal_metadata_.unknown_fields(), output);
3177 }
3178 // @@protoc_insertion_point(serialize_end:dmi.Metric)
3179}
3180
3181::google::protobuf::uint8* Metric::InternalSerializeWithCachedSizesToArray(
3182 ::google::protobuf::uint8* target) const {
3183 // @@protoc_insertion_point(serialize_to_array_start:dmi.Metric)
3184 ::google::protobuf::uint32 cached_has_bits = 0;
3185 (void) cached_has_bits;
3186
3187 // .dmi.MetricNames metric_id = 1;
3188 if (this->metric_id() != 0) {
3189 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
3190 1, this->metric_id(), target);
3191 }
3192
3193 // .dmi.MetricMetaData metric_metadata = 2;
3194 if (this->has_metric_metadata()) {
3195 target = ::google::protobuf::internal::WireFormatLite::
3196 InternalWriteMessageToArray(
3197 2, HasBitSetters::metric_metadata(this), target);
3198 }
3199
3200 // .dmi.ComponentSensorData value = 3;
3201 if (this->has_value()) {
3202 target = ::google::protobuf::internal::WireFormatLite::
3203 InternalWriteMessageToArray(
3204 3, HasBitSetters::value(this), target);
3205 }
3206
3207 if (_internal_metadata_.have_unknown_fields()) {
3208 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3209 _internal_metadata_.unknown_fields(), target);
3210 }
3211 // @@protoc_insertion_point(serialize_to_array_end:dmi.Metric)
3212 return target;
3213}
3214
3215size_t Metric::ByteSizeLong() const {
3216// @@protoc_insertion_point(message_byte_size_start:dmi.Metric)
3217 size_t total_size = 0;
3218
3219 if (_internal_metadata_.have_unknown_fields()) {
3220 total_size +=
3221 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3222 _internal_metadata_.unknown_fields());
3223 }
3224 ::google::protobuf::uint32 cached_has_bits = 0;
3225 // Prevent compiler warnings about cached_has_bits being unused
3226 (void) cached_has_bits;
3227
3228 // .dmi.MetricMetaData metric_metadata = 2;
3229 if (this->has_metric_metadata()) {
3230 total_size += 1 +
3231 ::google::protobuf::internal::WireFormatLite::MessageSize(
3232 *metric_metadata_);
3233 }
3234
3235 // .dmi.ComponentSensorData value = 3;
3236 if (this->has_value()) {
3237 total_size += 1 +
3238 ::google::protobuf::internal::WireFormatLite::MessageSize(
3239 *value_);
3240 }
3241
3242 // .dmi.MetricNames metric_id = 1;
3243 if (this->metric_id() != 0) {
3244 total_size += 1 +
3245 ::google::protobuf::internal::WireFormatLite::EnumSize(this->metric_id());
3246 }
3247
3248 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
3249 SetCachedSize(cached_size);
3250 return total_size;
3251}
3252
3253void Metric::MergeFrom(const ::google::protobuf::Message& from) {
3254// @@protoc_insertion_point(generalized_merge_from_start:dmi.Metric)
3255 GOOGLE_DCHECK_NE(&from, this);
3256 const Metric* source =
3257 ::google::protobuf::DynamicCastToGenerated<Metric>(
3258 &from);
3259 if (source == nullptr) {
3260 // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.Metric)
3261 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
3262 } else {
3263 // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.Metric)
3264 MergeFrom(*source);
3265 }
3266}
3267
3268void Metric::MergeFrom(const Metric& from) {
3269// @@protoc_insertion_point(class_specific_merge_from_start:dmi.Metric)
3270 GOOGLE_DCHECK_NE(&from, this);
3271 _internal_metadata_.MergeFrom(from._internal_metadata_);
3272 ::google::protobuf::uint32 cached_has_bits = 0;
3273 (void) cached_has_bits;
3274
3275 if (from.has_metric_metadata()) {
3276 mutable_metric_metadata()->::dmi::MetricMetaData::MergeFrom(from.metric_metadata());
3277 }
3278 if (from.has_value()) {
3279 mutable_value()->::dmi::ComponentSensorData::MergeFrom(from.value());
3280 }
3281 if (from.metric_id() != 0) {
3282 set_metric_id(from.metric_id());
3283 }
3284}
3285
3286void Metric::CopyFrom(const ::google::protobuf::Message& from) {
3287// @@protoc_insertion_point(generalized_copy_from_start:dmi.Metric)
3288 if (&from == this) return;
3289 Clear();
3290 MergeFrom(from);
3291}
3292
3293void Metric::CopyFrom(const Metric& from) {
3294// @@protoc_insertion_point(class_specific_copy_from_start:dmi.Metric)
3295 if (&from == this) return;
3296 Clear();
3297 MergeFrom(from);
3298}
3299
3300bool Metric::IsInitialized() const {
3301 return true;
3302}
3303
3304void Metric::Swap(Metric* other) {
3305 if (other == this) return;
3306 InternalSwap(other);
3307}
3308void Metric::InternalSwap(Metric* other) {
3309 using std::swap;
3310 _internal_metadata_.Swap(&other->_internal_metadata_);
3311 swap(metric_metadata_, other->metric_metadata_);
3312 swap(value_, other->value_);
3313 swap(metric_id_, other->metric_id_);
3314}
3315
3316::google::protobuf::Metadata Metric::GetMetadata() const {
3317 ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
3318 return ::file_level_metadata_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[kIndexInFileMessages];
3319}
3320
3321
3322// ===================================================================
3323
3324void GetMetricRequest::InitAsDefaultInstance() {
3325 ::dmi::_GetMetricRequest_default_instance_._instance.get_mutable()->meta_data_ = const_cast< ::dmi::MetricMetaData*>(
3326 ::dmi::MetricMetaData::internal_default_instance());
3327}
3328class GetMetricRequest::HasBitSetters {
3329 public:
3330 static const ::dmi::MetricMetaData& meta_data(const GetMetricRequest* msg);
3331};
3332
3333const ::dmi::MetricMetaData&
3334GetMetricRequest::HasBitSetters::meta_data(const GetMetricRequest* msg) {
3335 return *msg->meta_data_;
3336}
3337#if !defined(_MSC_VER) || _MSC_VER >= 1900
3338const int GetMetricRequest::kMetaDataFieldNumber;
3339const int GetMetricRequest::kMetricIdFieldNumber;
3340#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
3341
3342GetMetricRequest::GetMetricRequest()
3343 : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
3344 SharedCtor();
3345 // @@protoc_insertion_point(constructor:dmi.GetMetricRequest)
3346}
3347GetMetricRequest::GetMetricRequest(const GetMetricRequest& from)
3348 : ::google::protobuf::Message(),
3349 _internal_metadata_(nullptr) {
3350 _internal_metadata_.MergeFrom(from._internal_metadata_);
3351 if (from.has_meta_data()) {
3352 meta_data_ = new ::dmi::MetricMetaData(*from.meta_data_);
3353 } else {
3354 meta_data_ = nullptr;
3355 }
3356 metric_id_ = from.metric_id_;
3357 // @@protoc_insertion_point(copy_constructor:dmi.GetMetricRequest)
3358}
3359
3360void GetMetricRequest::SharedCtor() {
3361 ::google::protobuf::internal::InitSCC(
3362 &scc_info_GetMetricRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
3363 ::memset(&meta_data_, 0, static_cast<size_t>(
3364 reinterpret_cast<char*>(&metric_id_) -
3365 reinterpret_cast<char*>(&meta_data_)) + sizeof(metric_id_));
3366}
3367
3368GetMetricRequest::~GetMetricRequest() {
3369 // @@protoc_insertion_point(destructor:dmi.GetMetricRequest)
3370 SharedDtor();
3371}
3372
3373void GetMetricRequest::SharedDtor() {
3374 if (this != internal_default_instance()) delete meta_data_;
3375}
3376
3377void GetMetricRequest::SetCachedSize(int size) const {
3378 _cached_size_.Set(size);
3379}
3380const GetMetricRequest& GetMetricRequest::default_instance() {
3381 ::google::protobuf::internal::InitSCC(&::scc_info_GetMetricRequest_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
3382 return *internal_default_instance();
3383}
3384
3385
3386void GetMetricRequest::Clear() {
3387// @@protoc_insertion_point(message_clear_start:dmi.GetMetricRequest)
3388 ::google::protobuf::uint32 cached_has_bits = 0;
3389 // Prevent compiler warnings about cached_has_bits being unused
3390 (void) cached_has_bits;
3391
3392 if (GetArenaNoVirtual() == nullptr && meta_data_ != nullptr) {
3393 delete meta_data_;
3394 }
3395 meta_data_ = nullptr;
3396 metric_id_ = 0;
3397 _internal_metadata_.Clear();
3398}
3399
3400#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
3401const char* GetMetricRequest::_InternalParse(const char* begin, const char* end, void* object,
3402 ::google::protobuf::internal::ParseContext* ctx) {
3403 auto msg = static_cast<GetMetricRequest*>(object);
3404 ::google::protobuf::int32 size; (void)size;
3405 int depth; (void)depth;
3406 ::google::protobuf::uint32 tag;
3407 ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
3408 auto ptr = begin;
3409 while (ptr < end) {
3410 ptr = ::google::protobuf::io::Parse32(ptr, &tag);
3411 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3412 switch (tag >> 3) {
3413 // .dmi.MetricMetaData meta_data = 1;
3414 case 1: {
3415 if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual;
3416 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
3417 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3418 parser_till_end = ::dmi::MetricMetaData::_InternalParse;
3419 object = msg->mutable_meta_data();
3420 if (size > end - ptr) goto len_delim_till_end;
3421 ptr += size;
3422 GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
3423 {parser_till_end, object}, ptr - size, ptr));
3424 break;
3425 }
3426 // .dmi.MetricNames metric_id = 2;
3427 case 2: {
3428 if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
3429 ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
3430 msg->set_metric_id(static_cast<::dmi::MetricNames>(val));
3431 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3432 break;
3433 }
3434 default: {
3435 handle_unusual:
3436 if ((tag & 7) == 4 || tag == 0) {
3437 ctx->EndGroup(tag);
3438 return ptr;
3439 }
3440 auto res = UnknownFieldParse(tag, {_InternalParse, msg},
3441 ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
3442 ptr = res.first;
3443 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
3444 if (res.second) return ptr;
3445 }
3446 } // switch
3447 } // while
3448 return ptr;
3449len_delim_till_end:
3450 return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
3451 {parser_till_end, object}, size);
3452}
3453#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
3454bool GetMetricRequest::MergePartialFromCodedStream(
3455 ::google::protobuf::io::CodedInputStream* input) {
3456#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
3457 ::google::protobuf::uint32 tag;
3458 // @@protoc_insertion_point(parse_start:dmi.GetMetricRequest)
3459 for (;;) {
3460 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
3461 tag = p.first;
3462 if (!p.second) goto handle_unusual;
3463 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
3464 // .dmi.MetricMetaData meta_data = 1;
3465 case 1: {
3466 if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) {
3467 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
3468 input, mutable_meta_data()));
3469 } else {
3470 goto handle_unusual;
3471 }
3472 break;
3473 }
3474
3475 // .dmi.MetricNames metric_id = 2;
3476 case 2: {
3477 if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {
3478 int value = 0;
3479 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
3480 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
3481 input, &value)));
3482 set_metric_id(static_cast< ::dmi::MetricNames >(value));
3483 } else {
3484 goto handle_unusual;
3485 }
3486 break;
3487 }
3488
3489 default: {
3490 handle_unusual:
3491 if (tag == 0) {
3492 goto success;
3493 }
3494 DO_(::google::protobuf::internal::WireFormat::SkipField(
3495 input, tag, _internal_metadata_.mutable_unknown_fields()));
3496 break;
3497 }
3498 }
3499 }
3500success:
3501 // @@protoc_insertion_point(parse_success:dmi.GetMetricRequest)
3502 return true;
3503failure:
3504 // @@protoc_insertion_point(parse_failure:dmi.GetMetricRequest)
3505 return false;
3506#undef DO_
3507}
3508#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
3509
3510void GetMetricRequest::SerializeWithCachedSizes(
3511 ::google::protobuf::io::CodedOutputStream* output) const {
3512 // @@protoc_insertion_point(serialize_start:dmi.GetMetricRequest)
3513 ::google::protobuf::uint32 cached_has_bits = 0;
3514 (void) cached_has_bits;
3515
3516 // .dmi.MetricMetaData meta_data = 1;
3517 if (this->has_meta_data()) {
3518 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3519 1, HasBitSetters::meta_data(this), output);
3520 }
3521
3522 // .dmi.MetricNames metric_id = 2;
3523 if (this->metric_id() != 0) {
3524 ::google::protobuf::internal::WireFormatLite::WriteEnum(
3525 2, this->metric_id(), output);
3526 }
3527
3528 if (_internal_metadata_.have_unknown_fields()) {
3529 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3530 _internal_metadata_.unknown_fields(), output);
3531 }
3532 // @@protoc_insertion_point(serialize_end:dmi.GetMetricRequest)
3533}
3534
3535::google::protobuf::uint8* GetMetricRequest::InternalSerializeWithCachedSizesToArray(
3536 ::google::protobuf::uint8* target) const {
3537 // @@protoc_insertion_point(serialize_to_array_start:dmi.GetMetricRequest)
3538 ::google::protobuf::uint32 cached_has_bits = 0;
3539 (void) cached_has_bits;
3540
3541 // .dmi.MetricMetaData meta_data = 1;
3542 if (this->has_meta_data()) {
3543 target = ::google::protobuf::internal::WireFormatLite::
3544 InternalWriteMessageToArray(
3545 1, HasBitSetters::meta_data(this), target);
3546 }
3547
3548 // .dmi.MetricNames metric_id = 2;
3549 if (this->metric_id() != 0) {
3550 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
3551 2, this->metric_id(), target);
3552 }
3553
3554 if (_internal_metadata_.have_unknown_fields()) {
3555 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3556 _internal_metadata_.unknown_fields(), target);
3557 }
3558 // @@protoc_insertion_point(serialize_to_array_end:dmi.GetMetricRequest)
3559 return target;
3560}
3561
3562size_t GetMetricRequest::ByteSizeLong() const {
3563// @@protoc_insertion_point(message_byte_size_start:dmi.GetMetricRequest)
3564 size_t total_size = 0;
3565
3566 if (_internal_metadata_.have_unknown_fields()) {
3567 total_size +=
3568 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3569 _internal_metadata_.unknown_fields());
3570 }
3571 ::google::protobuf::uint32 cached_has_bits = 0;
3572 // Prevent compiler warnings about cached_has_bits being unused
3573 (void) cached_has_bits;
3574
3575 // .dmi.MetricMetaData meta_data = 1;
3576 if (this->has_meta_data()) {
3577 total_size += 1 +
3578 ::google::protobuf::internal::WireFormatLite::MessageSize(
3579 *meta_data_);
3580 }
3581
3582 // .dmi.MetricNames metric_id = 2;
3583 if (this->metric_id() != 0) {
3584 total_size += 1 +
3585 ::google::protobuf::internal::WireFormatLite::EnumSize(this->metric_id());
3586 }
3587
3588 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
3589 SetCachedSize(cached_size);
3590 return total_size;
3591}
3592
3593void GetMetricRequest::MergeFrom(const ::google::protobuf::Message& from) {
3594// @@protoc_insertion_point(generalized_merge_from_start:dmi.GetMetricRequest)
3595 GOOGLE_DCHECK_NE(&from, this);
3596 const GetMetricRequest* source =
3597 ::google::protobuf::DynamicCastToGenerated<GetMetricRequest>(
3598 &from);
3599 if (source == nullptr) {
3600 // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.GetMetricRequest)
3601 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
3602 } else {
3603 // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.GetMetricRequest)
3604 MergeFrom(*source);
3605 }
3606}
3607
3608void GetMetricRequest::MergeFrom(const GetMetricRequest& from) {
3609// @@protoc_insertion_point(class_specific_merge_from_start:dmi.GetMetricRequest)
3610 GOOGLE_DCHECK_NE(&from, this);
3611 _internal_metadata_.MergeFrom(from._internal_metadata_);
3612 ::google::protobuf::uint32 cached_has_bits = 0;
3613 (void) cached_has_bits;
3614
3615 if (from.has_meta_data()) {
3616 mutable_meta_data()->::dmi::MetricMetaData::MergeFrom(from.meta_data());
3617 }
3618 if (from.metric_id() != 0) {
3619 set_metric_id(from.metric_id());
3620 }
3621}
3622
3623void GetMetricRequest::CopyFrom(const ::google::protobuf::Message& from) {
3624// @@protoc_insertion_point(generalized_copy_from_start:dmi.GetMetricRequest)
3625 if (&from == this) return;
3626 Clear();
3627 MergeFrom(from);
3628}
3629
3630void GetMetricRequest::CopyFrom(const GetMetricRequest& from) {
3631// @@protoc_insertion_point(class_specific_copy_from_start:dmi.GetMetricRequest)
3632 if (&from == this) return;
3633 Clear();
3634 MergeFrom(from);
3635}
3636
3637bool GetMetricRequest::IsInitialized() const {
3638 return true;
3639}
3640
3641void GetMetricRequest::Swap(GetMetricRequest* other) {
3642 if (other == this) return;
3643 InternalSwap(other);
3644}
3645void GetMetricRequest::InternalSwap(GetMetricRequest* other) {
3646 using std::swap;
3647 _internal_metadata_.Swap(&other->_internal_metadata_);
3648 swap(meta_data_, other->meta_data_);
3649 swap(metric_id_, other->metric_id_);
3650}
3651
3652::google::protobuf::Metadata GetMetricRequest::GetMetadata() const {
3653 ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
3654 return ::file_level_metadata_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[kIndexInFileMessages];
3655}
3656
3657
3658// ===================================================================
3659
3660void GetMetricResponse::InitAsDefaultInstance() {
3661 ::dmi::_GetMetricResponse_default_instance_._instance.get_mutable()->metric_ = const_cast< ::dmi::Metric*>(
3662 ::dmi::Metric::internal_default_instance());
3663}
3664class GetMetricResponse::HasBitSetters {
3665 public:
3666 static const ::dmi::Metric& metric(const GetMetricResponse* msg);
3667};
3668
3669const ::dmi::Metric&
3670GetMetricResponse::HasBitSetters::metric(const GetMetricResponse* msg) {
3671 return *msg->metric_;
3672}
3673#if !defined(_MSC_VER) || _MSC_VER >= 1900
3674const int GetMetricResponse::kStatusFieldNumber;
3675const int GetMetricResponse::kReasonFieldNumber;
3676const int GetMetricResponse::kMetricFieldNumber;
3677const int GetMetricResponse::kReasonDetailFieldNumber;
3678#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
3679
3680GetMetricResponse::GetMetricResponse()
3681 : ::google::protobuf::Message(), _internal_metadata_(nullptr) {
3682 SharedCtor();
3683 // @@protoc_insertion_point(constructor:dmi.GetMetricResponse)
3684}
3685GetMetricResponse::GetMetricResponse(const GetMetricResponse& from)
3686 : ::google::protobuf::Message(),
3687 _internal_metadata_(nullptr) {
3688 _internal_metadata_.MergeFrom(from._internal_metadata_);
3689 reason_detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3690 if (from.reason_detail().size() > 0) {
3691 reason_detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_detail_);
3692 }
3693 if (from.has_metric()) {
3694 metric_ = new ::dmi::Metric(*from.metric_);
3695 } else {
3696 metric_ = nullptr;
3697 }
3698 ::memcpy(&status_, &from.status_,
3699 static_cast<size_t>(reinterpret_cast<char*>(&reason_) -
3700 reinterpret_cast<char*>(&status_)) + sizeof(reason_));
3701 // @@protoc_insertion_point(copy_constructor:dmi.GetMetricResponse)
3702}
3703
3704void GetMetricResponse::SharedCtor() {
3705 ::google::protobuf::internal::InitSCC(
3706 &scc_info_GetMetricResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
3707 reason_detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3708 ::memset(&metric_, 0, static_cast<size_t>(
3709 reinterpret_cast<char*>(&reason_) -
3710 reinterpret_cast<char*>(&metric_)) + sizeof(reason_));
3711}
3712
3713GetMetricResponse::~GetMetricResponse() {
3714 // @@protoc_insertion_point(destructor:dmi.GetMetricResponse)
3715 SharedDtor();
3716}
3717
3718void GetMetricResponse::SharedDtor() {
3719 reason_detail_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3720 if (this != internal_default_instance()) delete metric_;
3721}
3722
3723void GetMetricResponse::SetCachedSize(int size) const {
3724 _cached_size_.Set(size);
3725}
3726const GetMetricResponse& GetMetricResponse::default_instance() {
3727 ::google::protobuf::internal::InitSCC(&::scc_info_GetMetricResponse_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto.base);
3728 return *internal_default_instance();
3729}
3730
3731
3732void GetMetricResponse::Clear() {
3733// @@protoc_insertion_point(message_clear_start:dmi.GetMetricResponse)
3734 ::google::protobuf::uint32 cached_has_bits = 0;
3735 // Prevent compiler warnings about cached_has_bits being unused
3736 (void) cached_has_bits;
3737
3738 reason_detail_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3739 if (GetArenaNoVirtual() == nullptr && metric_ != nullptr) {
3740 delete metric_;
3741 }
3742 metric_ = nullptr;
3743 ::memset(&status_, 0, static_cast<size_t>(
3744 reinterpret_cast<char*>(&reason_) -
3745 reinterpret_cast<char*>(&status_)) + sizeof(reason_));
3746 _internal_metadata_.Clear();
3747}
3748
3749#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
3750const char* GetMetricResponse::_InternalParse(const char* begin, const char* end, void* object,
3751 ::google::protobuf::internal::ParseContext* ctx) {
3752 auto msg = static_cast<GetMetricResponse*>(object);
3753 ::google::protobuf::int32 size; (void)size;
3754 int depth; (void)depth;
3755 ::google::protobuf::uint32 tag;
3756 ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end;
3757 auto ptr = begin;
3758 while (ptr < end) {
3759 ptr = ::google::protobuf::io::Parse32(ptr, &tag);
3760 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3761 switch (tag >> 3) {
3762 // .dmi.Status status = 1;
3763 case 1: {
3764 if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual;
3765 ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
3766 msg->set_status(static_cast<::dmi::Status>(val));
3767 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3768 break;
3769 }
3770 // .dmi.GetMetricResponse.Reason reason = 2;
3771 case 2: {
3772 if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual;
3773 ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr);
3774 msg->set_reason(static_cast<::dmi::GetMetricResponse_Reason>(val));
3775 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3776 break;
3777 }
3778 // .dmi.Metric metric = 3;
3779 case 3: {
3780 if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual;
3781 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
3782 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3783 parser_till_end = ::dmi::Metric::_InternalParse;
3784 object = msg->mutable_metric();
3785 if (size > end - ptr) goto len_delim_till_end;
3786 ptr += size;
3787 GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange(
3788 {parser_till_end, object}, ptr - size, ptr));
3789 break;
3790 }
3791 // string reason_detail = 4;
3792 case 4: {
3793 if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual;
3794 ptr = ::google::protobuf::io::ReadSize(ptr, &size);
3795 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
3796 ctx->extra_parse_data().SetFieldName("dmi.GetMetricResponse.reason_detail");
3797 object = msg->mutable_reason_detail();
3798 if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) {
3799 parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8;
3800 goto string_till_end;
3801 }
3802 GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx));
3803 ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx);
3804 ptr += size;
3805 break;
3806 }
3807 default: {
3808 handle_unusual:
3809 if ((tag & 7) == 4 || tag == 0) {
3810 ctx->EndGroup(tag);
3811 return ptr;
3812 }
3813 auto res = UnknownFieldParse(tag, {_InternalParse, msg},
3814 ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx);
3815 ptr = res.first;
3816 GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr);
3817 if (res.second) return ptr;
3818 }
3819 } // switch
3820 } // while
3821 return ptr;
3822string_till_end:
3823 static_cast<::std::string*>(object)->clear();
3824 static_cast<::std::string*>(object)->reserve(size);
3825 goto len_delim_till_end;
3826len_delim_till_end:
3827 return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg},
3828 {parser_till_end, object}, size);
3829}
3830#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
3831bool GetMetricResponse::MergePartialFromCodedStream(
3832 ::google::protobuf::io::CodedInputStream* input) {
3833#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
3834 ::google::protobuf::uint32 tag;
3835 // @@protoc_insertion_point(parse_start:dmi.GetMetricResponse)
3836 for (;;) {
3837 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
3838 tag = p.first;
3839 if (!p.second) goto handle_unusual;
3840 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
3841 // .dmi.Status status = 1;
3842 case 1: {
3843 if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) {
3844 int value = 0;
3845 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
3846 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
3847 input, &value)));
3848 set_status(static_cast< ::dmi::Status >(value));
3849 } else {
3850 goto handle_unusual;
3851 }
3852 break;
3853 }
3854
3855 // .dmi.GetMetricResponse.Reason reason = 2;
3856 case 2: {
3857 if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) {
3858 int value = 0;
3859 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
3860 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
3861 input, &value)));
3862 set_reason(static_cast< ::dmi::GetMetricResponse_Reason >(value));
3863 } else {
3864 goto handle_unusual;
3865 }
3866 break;
3867 }
3868
3869 // .dmi.Metric metric = 3;
3870 case 3: {
3871 if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) {
3872 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
3873 input, mutable_metric()));
3874 } else {
3875 goto handle_unusual;
3876 }
3877 break;
3878 }
3879
3880 // string reason_detail = 4;
3881 case 4: {
3882 if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) {
3883 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3884 input, this->mutable_reason_detail()));
3885 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
3886 this->reason_detail().data(), static_cast<int>(this->reason_detail().length()),
3887 ::google::protobuf::internal::WireFormatLite::PARSE,
3888 "dmi.GetMetricResponse.reason_detail"));
3889 } else {
3890 goto handle_unusual;
3891 }
3892 break;
3893 }
3894
3895 default: {
3896 handle_unusual:
3897 if (tag == 0) {
3898 goto success;
3899 }
3900 DO_(::google::protobuf::internal::WireFormat::SkipField(
3901 input, tag, _internal_metadata_.mutable_unknown_fields()));
3902 break;
3903 }
3904 }
3905 }
3906success:
3907 // @@protoc_insertion_point(parse_success:dmi.GetMetricResponse)
3908 return true;
3909failure:
3910 // @@protoc_insertion_point(parse_failure:dmi.GetMetricResponse)
3911 return false;
3912#undef DO_
3913}
3914#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
3915
3916void GetMetricResponse::SerializeWithCachedSizes(
3917 ::google::protobuf::io::CodedOutputStream* output) const {
3918 // @@protoc_insertion_point(serialize_start:dmi.GetMetricResponse)
3919 ::google::protobuf::uint32 cached_has_bits = 0;
3920 (void) cached_has_bits;
3921
3922 // .dmi.Status status = 1;
3923 if (this->status() != 0) {
3924 ::google::protobuf::internal::WireFormatLite::WriteEnum(
3925 1, this->status(), output);
3926 }
3927
3928 // .dmi.GetMetricResponse.Reason reason = 2;
3929 if (this->reason() != 0) {
3930 ::google::protobuf::internal::WireFormatLite::WriteEnum(
3931 2, this->reason(), output);
3932 }
3933
3934 // .dmi.Metric metric = 3;
3935 if (this->has_metric()) {
3936 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3937 3, HasBitSetters::metric(this), output);
3938 }
3939
3940 // string reason_detail = 4;
3941 if (this->reason_detail().size() > 0) {
3942 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
3943 this->reason_detail().data(), static_cast<int>(this->reason_detail().length()),
3944 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
3945 "dmi.GetMetricResponse.reason_detail");
3946 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3947 4, this->reason_detail(), output);
3948 }
3949
3950 if (_internal_metadata_.have_unknown_fields()) {
3951 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3952 _internal_metadata_.unknown_fields(), output);
3953 }
3954 // @@protoc_insertion_point(serialize_end:dmi.GetMetricResponse)
3955}
3956
3957::google::protobuf::uint8* GetMetricResponse::InternalSerializeWithCachedSizesToArray(
3958 ::google::protobuf::uint8* target) const {
3959 // @@protoc_insertion_point(serialize_to_array_start:dmi.GetMetricResponse)
3960 ::google::protobuf::uint32 cached_has_bits = 0;
3961 (void) cached_has_bits;
3962
3963 // .dmi.Status status = 1;
3964 if (this->status() != 0) {
3965 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
3966 1, this->status(), target);
3967 }
3968
3969 // .dmi.GetMetricResponse.Reason reason = 2;
3970 if (this->reason() != 0) {
3971 target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
3972 2, this->reason(), target);
3973 }
3974
3975 // .dmi.Metric metric = 3;
3976 if (this->has_metric()) {
3977 target = ::google::protobuf::internal::WireFormatLite::
3978 InternalWriteMessageToArray(
3979 3, HasBitSetters::metric(this), target);
3980 }
3981
3982 // string reason_detail = 4;
3983 if (this->reason_detail().size() > 0) {
3984 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
3985 this->reason_detail().data(), static_cast<int>(this->reason_detail().length()),
3986 ::google::protobuf::internal::WireFormatLite::SERIALIZE,
3987 "dmi.GetMetricResponse.reason_detail");
3988 target =
3989 ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3990 4, this->reason_detail(), target);
3991 }
3992
3993 if (_internal_metadata_.have_unknown_fields()) {
3994 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3995 _internal_metadata_.unknown_fields(), target);
3996 }
3997 // @@protoc_insertion_point(serialize_to_array_end:dmi.GetMetricResponse)
3998 return target;
3999}
4000
4001size_t GetMetricResponse::ByteSizeLong() const {
4002// @@protoc_insertion_point(message_byte_size_start:dmi.GetMetricResponse)
4003 size_t total_size = 0;
4004
4005 if (_internal_metadata_.have_unknown_fields()) {
4006 total_size +=
4007 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4008 _internal_metadata_.unknown_fields());
4009 }
4010 ::google::protobuf::uint32 cached_has_bits = 0;
4011 // Prevent compiler warnings about cached_has_bits being unused
4012 (void) cached_has_bits;
4013
4014 // string reason_detail = 4;
4015 if (this->reason_detail().size() > 0) {
4016 total_size += 1 +
4017 ::google::protobuf::internal::WireFormatLite::StringSize(
4018 this->reason_detail());
4019 }
4020
4021 // .dmi.Metric metric = 3;
4022 if (this->has_metric()) {
4023 total_size += 1 +
4024 ::google::protobuf::internal::WireFormatLite::MessageSize(
4025 *metric_);
4026 }
4027
4028 // .dmi.Status status = 1;
4029 if (this->status() != 0) {
4030 total_size += 1 +
4031 ::google::protobuf::internal::WireFormatLite::EnumSize(this->status());
4032 }
4033
4034 // .dmi.GetMetricResponse.Reason reason = 2;
4035 if (this->reason() != 0) {
4036 total_size += 1 +
4037 ::google::protobuf::internal::WireFormatLite::EnumSize(this->reason());
4038 }
4039
4040 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
4041 SetCachedSize(cached_size);
4042 return total_size;
4043}
4044
4045void GetMetricResponse::MergeFrom(const ::google::protobuf::Message& from) {
4046// @@protoc_insertion_point(generalized_merge_from_start:dmi.GetMetricResponse)
4047 GOOGLE_DCHECK_NE(&from, this);
4048 const GetMetricResponse* source =
4049 ::google::protobuf::DynamicCastToGenerated<GetMetricResponse>(
4050 &from);
4051 if (source == nullptr) {
4052 // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.GetMetricResponse)
4053 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
4054 } else {
4055 // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.GetMetricResponse)
4056 MergeFrom(*source);
4057 }
4058}
4059
4060void GetMetricResponse::MergeFrom(const GetMetricResponse& from) {
4061// @@protoc_insertion_point(class_specific_merge_from_start:dmi.GetMetricResponse)
4062 GOOGLE_DCHECK_NE(&from, this);
4063 _internal_metadata_.MergeFrom(from._internal_metadata_);
4064 ::google::protobuf::uint32 cached_has_bits = 0;
4065 (void) cached_has_bits;
4066
4067 if (from.reason_detail().size() > 0) {
4068
4069 reason_detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_detail_);
4070 }
4071 if (from.has_metric()) {
4072 mutable_metric()->::dmi::Metric::MergeFrom(from.metric());
4073 }
4074 if (from.status() != 0) {
4075 set_status(from.status());
4076 }
4077 if (from.reason() != 0) {
4078 set_reason(from.reason());
4079 }
4080}
4081
4082void GetMetricResponse::CopyFrom(const ::google::protobuf::Message& from) {
4083// @@protoc_insertion_point(generalized_copy_from_start:dmi.GetMetricResponse)
4084 if (&from == this) return;
4085 Clear();
4086 MergeFrom(from);
4087}
4088
4089void GetMetricResponse::CopyFrom(const GetMetricResponse& from) {
4090// @@protoc_insertion_point(class_specific_copy_from_start:dmi.GetMetricResponse)
4091 if (&from == this) return;
4092 Clear();
4093 MergeFrom(from);
4094}
4095
4096bool GetMetricResponse::IsInitialized() const {
4097 return true;
4098}
4099
4100void GetMetricResponse::Swap(GetMetricResponse* other) {
4101 if (other == this) return;
4102 InternalSwap(other);
4103}
4104void GetMetricResponse::InternalSwap(GetMetricResponse* other) {
4105 using std::swap;
4106 _internal_metadata_.Swap(&other->_internal_metadata_);
4107 reason_detail_.Swap(&other->reason_detail_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
4108 GetArenaNoVirtual());
4109 swap(metric_, other->metric_);
4110 swap(status_, other->status_);
4111 swap(reason_, other->reason_);
4112}
4113
4114::google::protobuf::Metadata GetMetricResponse::GetMetadata() const {
4115 ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto);
4116 return ::file_level_metadata_dmi_2fhw_5fmetrics_5fmgmt_5fservice_2eproto[kIndexInFileMessages];
4117}
4118
4119
4120// @@protoc_insertion_point(namespace_scope)
4121} // namespace dmi
4122namespace google {
4123namespace protobuf {
4124template<> PROTOBUF_NOINLINE ::dmi::MetricConfig* Arena::CreateMaybeMessage< ::dmi::MetricConfig >(Arena* arena) {
4125 return Arena::CreateInternal< ::dmi::MetricConfig >(arena);
4126}
4127template<> PROTOBUF_NOINLINE ::dmi::MetricsConfig* Arena::CreateMaybeMessage< ::dmi::MetricsConfig >(Arena* arena) {
4128 return Arena::CreateInternal< ::dmi::MetricsConfig >(arena);
4129}
4130template<> PROTOBUF_NOINLINE ::dmi::ListMetricsResponse* Arena::CreateMaybeMessage< ::dmi::ListMetricsResponse >(Arena* arena) {
4131 return Arena::CreateInternal< ::dmi::ListMetricsResponse >(arena);
4132}
4133template<> PROTOBUF_NOINLINE ::dmi::MetricsConfigurationRequest* Arena::CreateMaybeMessage< ::dmi::MetricsConfigurationRequest >(Arena* arena) {
4134 return Arena::CreateInternal< ::dmi::MetricsConfigurationRequest >(arena);
4135}
4136template<> PROTOBUF_NOINLINE ::dmi::MetricsConfigurationResponse* Arena::CreateMaybeMessage< ::dmi::MetricsConfigurationResponse >(Arena* arena) {
4137 return Arena::CreateInternal< ::dmi::MetricsConfigurationResponse >(arena);
4138}
4139template<> PROTOBUF_NOINLINE ::dmi::MetricMetaData* Arena::CreateMaybeMessage< ::dmi::MetricMetaData >(Arena* arena) {
4140 return Arena::CreateInternal< ::dmi::MetricMetaData >(arena);
4141}
4142template<> PROTOBUF_NOINLINE ::dmi::Metric* Arena::CreateMaybeMessage< ::dmi::Metric >(Arena* arena) {
4143 return Arena::CreateInternal< ::dmi::Metric >(arena);
4144}
4145template<> PROTOBUF_NOINLINE ::dmi::GetMetricRequest* Arena::CreateMaybeMessage< ::dmi::GetMetricRequest >(Arena* arena) {
4146 return Arena::CreateInternal< ::dmi::GetMetricRequest >(arena);
4147}
4148template<> PROTOBUF_NOINLINE ::dmi::GetMetricResponse* Arena::CreateMaybeMessage< ::dmi::GetMetricResponse >(Arena* arena) {
4149 return Arena::CreateInternal< ::dmi::GetMetricResponse >(arena);
4150}
4151} // namespace protobuf
4152} // namespace google
4153
4154// @@protoc_insertion_point(global_scope)
4155#include <google/protobuf/port_undef.inc>