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