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