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.proto |
| 3 | |
| 4 | #include "dmi/hw.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_ContainerComponentAttributes_dmi_2fhw_2eproto; |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 20 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PonDistance_dmi_2fhw_2eproto; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 21 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PonIdConfig_dmi_2fhw_2eproto; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 22 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PsuComponentAttributes_dmi_2fhw_2eproto; |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 23 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TransceiverComponentChangeAttributes_dmi_2fhw_2eproto; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 24 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TransceiverComponentsAttributes_dmi_2fhw_2eproto; |
| 25 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Uri_dmi_2fhw_2eproto; |
| 26 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Uuid_dmi_2fhw_2eproto; |
| 27 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ComponentSensorData_dmi_2fhw_2eproto; |
| 28 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ComponentState_dmi_2fhw_2eproto; |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 29 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_PortComponentAttributes_dmi_2fhw_2eproto; |
| 30 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 31 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<9> scc_info_Component_dmi_2fhw_2eproto; |
| 32 | extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto; |
| 33 | namespace dmi { |
| 34 | class UuidDefaultTypeInternal { |
| 35 | public: |
| 36 | ::google::protobuf::internal::ExplicitlyConstructed<Uuid> _instance; |
| 37 | } _Uuid_default_instance_; |
| 38 | class HardwareIDDefaultTypeInternal { |
| 39 | public: |
| 40 | ::google::protobuf::internal::ExplicitlyConstructed<HardwareID> _instance; |
| 41 | } _HardwareID_default_instance_; |
| 42 | class UriDefaultTypeInternal { |
| 43 | public: |
| 44 | ::google::protobuf::internal::ExplicitlyConstructed<Uri> _instance; |
| 45 | } _Uri_default_instance_; |
| 46 | class ComponentStateDefaultTypeInternal { |
| 47 | public: |
| 48 | ::google::protobuf::internal::ExplicitlyConstructed<ComponentState> _instance; |
| 49 | } _ComponentState_default_instance_; |
| 50 | class ComponentSensorDataDefaultTypeInternal { |
| 51 | public: |
| 52 | ::google::protobuf::internal::ExplicitlyConstructed<ComponentSensorData> _instance; |
| 53 | } _ComponentSensorData_default_instance_; |
| 54 | class PortComponentAttributesDefaultTypeInternal { |
| 55 | public: |
| 56 | ::google::protobuf::internal::ExplicitlyConstructed<PortComponentAttributes> _instance; |
| 57 | } _PortComponentAttributes_default_instance_; |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 58 | class PonDistanceDefaultTypeInternal { |
| 59 | public: |
| 60 | ::google::protobuf::internal::ExplicitlyConstructed<PonDistance> _instance; |
| 61 | } _PonDistance_default_instance_; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 62 | class PortComponentChangeAttributesDefaultTypeInternal { |
| 63 | public: |
| 64 | ::google::protobuf::internal::ExplicitlyConstructed<PortComponentChangeAttributes> _instance; |
| 65 | } _PortComponentChangeAttributes_default_instance_; |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 66 | class TransceiverComponentChangeAttributesDefaultTypeInternal { |
| 67 | public: |
| 68 | ::google::protobuf::internal::ExplicitlyConstructed<TransceiverComponentChangeAttributes> _instance; |
| 69 | } _TransceiverComponentChangeAttributes_default_instance_; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 70 | class PonIdConfigDefaultTypeInternal { |
| 71 | public: |
| 72 | ::google::protobuf::internal::ExplicitlyConstructed<PonIdConfig> _instance; |
| 73 | } _PonIdConfig_default_instance_; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 74 | class ContainerComponentAttributesDefaultTypeInternal { |
| 75 | public: |
| 76 | ::google::protobuf::internal::ExplicitlyConstructed<ContainerComponentAttributes> _instance; |
| 77 | } _ContainerComponentAttributes_default_instance_; |
| 78 | class PsuComponentAttributesDefaultTypeInternal { |
| 79 | public: |
| 80 | ::google::protobuf::internal::ExplicitlyConstructed<PsuComponentAttributes> _instance; |
| 81 | } _PsuComponentAttributes_default_instance_; |
| 82 | class TransceiverComponentsAttributesDefaultTypeInternal { |
| 83 | public: |
| 84 | ::google::protobuf::internal::ExplicitlyConstructed<TransceiverComponentsAttributes> _instance; |
| 85 | } _TransceiverComponentsAttributes_default_instance_; |
| 86 | class ComponentDefaultTypeInternal { |
| 87 | public: |
| 88 | ::google::protobuf::internal::ExplicitlyConstructed<Component> _instance; |
| 89 | const ::dmi::PortComponentAttributes* port_attr_; |
| 90 | const ::dmi::ContainerComponentAttributes* container_attr_; |
| 91 | const ::dmi::PsuComponentAttributes* psu_attr_; |
| 92 | const ::dmi::TransceiverComponentsAttributes* transceiver_attr_; |
| 93 | } _Component_default_instance_; |
| 94 | class HardwareDefaultTypeInternal { |
| 95 | public: |
| 96 | ::google::protobuf::internal::ExplicitlyConstructed<Hardware> _instance; |
| 97 | } _Hardware_default_instance_; |
| 98 | class ModifiableComponentDefaultTypeInternal { |
| 99 | public: |
| 100 | ::google::protobuf::internal::ExplicitlyConstructed<ModifiableComponent> _instance; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 101 | const ::dmi::PortComponentChangeAttributes* port_attr_; |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 102 | const ::dmi::TransceiverComponentChangeAttributes* trx_attr_; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 103 | } _ModifiableComponent_default_instance_; |
| 104 | } // namespace dmi |
| 105 | static void InitDefaultsUuid_dmi_2fhw_2eproto() { |
| 106 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 107 | |
| 108 | { |
| 109 | void* ptr = &::dmi::_Uuid_default_instance_; |
| 110 | new (ptr) ::dmi::Uuid(); |
| 111 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 112 | } |
| 113 | ::dmi::Uuid::InitAsDefaultInstance(); |
| 114 | } |
| 115 | |
| 116 | ::google::protobuf::internal::SCCInfo<0> scc_info_Uuid_dmi_2fhw_2eproto = |
| 117 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsUuid_dmi_2fhw_2eproto}, {}}; |
| 118 | |
| 119 | static void InitDefaultsHardwareID_dmi_2fhw_2eproto() { |
| 120 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 121 | |
| 122 | { |
| 123 | void* ptr = &::dmi::_HardwareID_default_instance_; |
| 124 | new (ptr) ::dmi::HardwareID(); |
| 125 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 126 | } |
| 127 | ::dmi::HardwareID::InitAsDefaultInstance(); |
| 128 | } |
| 129 | |
| 130 | ::google::protobuf::internal::SCCInfo<1> scc_info_HardwareID_dmi_2fhw_2eproto = |
| 131 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsHardwareID_dmi_2fhw_2eproto}, { |
| 132 | &scc_info_Uuid_dmi_2fhw_2eproto.base,}}; |
| 133 | |
| 134 | static void InitDefaultsUri_dmi_2fhw_2eproto() { |
| 135 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 136 | |
| 137 | { |
| 138 | void* ptr = &::dmi::_Uri_default_instance_; |
| 139 | new (ptr) ::dmi::Uri(); |
| 140 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 141 | } |
| 142 | ::dmi::Uri::InitAsDefaultInstance(); |
| 143 | } |
| 144 | |
| 145 | ::google::protobuf::internal::SCCInfo<0> scc_info_Uri_dmi_2fhw_2eproto = |
| 146 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsUri_dmi_2fhw_2eproto}, {}}; |
| 147 | |
| 148 | static void InitDefaultsComponentState_dmi_2fhw_2eproto() { |
| 149 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 150 | |
| 151 | { |
| 152 | void* ptr = &::dmi::_ComponentState_default_instance_; |
| 153 | new (ptr) ::dmi::ComponentState(); |
| 154 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 155 | } |
| 156 | ::dmi::ComponentState::InitAsDefaultInstance(); |
| 157 | } |
| 158 | |
| 159 | ::google::protobuf::internal::SCCInfo<1> scc_info_ComponentState_dmi_2fhw_2eproto = |
| 160 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsComponentState_dmi_2fhw_2eproto}, { |
| 161 | &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}}; |
| 162 | |
| 163 | static void InitDefaultsComponentSensorData_dmi_2fhw_2eproto() { |
| 164 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 165 | |
| 166 | { |
| 167 | void* ptr = &::dmi::_ComponentSensorData_default_instance_; |
| 168 | new (ptr) ::dmi::ComponentSensorData(); |
| 169 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 170 | } |
| 171 | ::dmi::ComponentSensorData::InitAsDefaultInstance(); |
| 172 | } |
| 173 | |
| 174 | ::google::protobuf::internal::SCCInfo<1> scc_info_ComponentSensorData_dmi_2fhw_2eproto = |
| 175 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsComponentSensorData_dmi_2fhw_2eproto}, { |
| 176 | &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}}; |
| 177 | |
| 178 | static void InitDefaultsPortComponentAttributes_dmi_2fhw_2eproto() { |
| 179 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 180 | |
| 181 | { |
| 182 | void* ptr = &::dmi::_PortComponentAttributes_default_instance_; |
| 183 | new (ptr) ::dmi::PortComponentAttributes(); |
| 184 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 185 | } |
| 186 | ::dmi::PortComponentAttributes::InitAsDefaultInstance(); |
| 187 | } |
| 188 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 189 | ::google::protobuf::internal::SCCInfo<2> scc_info_PortComponentAttributes_dmi_2fhw_2eproto = |
| 190 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsPortComponentAttributes_dmi_2fhw_2eproto}, { |
| 191 | &scc_info_PonIdConfig_dmi_2fhw_2eproto.base, |
| 192 | &scc_info_PonDistance_dmi_2fhw_2eproto.base,}}; |
| 193 | |
| 194 | static void InitDefaultsPonDistance_dmi_2fhw_2eproto() { |
| 195 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 196 | |
| 197 | { |
| 198 | void* ptr = &::dmi::_PonDistance_default_instance_; |
| 199 | new (ptr) ::dmi::PonDistance(); |
| 200 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 201 | } |
| 202 | ::dmi::PonDistance::InitAsDefaultInstance(); |
| 203 | } |
| 204 | |
| 205 | ::google::protobuf::internal::SCCInfo<0> scc_info_PonDistance_dmi_2fhw_2eproto = |
| 206 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPonDistance_dmi_2fhw_2eproto}, {}}; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 207 | |
| 208 | static void InitDefaultsPortComponentChangeAttributes_dmi_2fhw_2eproto() { |
| 209 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 210 | |
| 211 | { |
| 212 | void* ptr = &::dmi::_PortComponentChangeAttributes_default_instance_; |
| 213 | new (ptr) ::dmi::PortComponentChangeAttributes(); |
| 214 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 215 | } |
| 216 | ::dmi::PortComponentChangeAttributes::InitAsDefaultInstance(); |
| 217 | } |
| 218 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 219 | ::google::protobuf::internal::SCCInfo<2> scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto = |
| 220 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsPortComponentChangeAttributes_dmi_2fhw_2eproto}, { |
| 221 | &scc_info_PonIdConfig_dmi_2fhw_2eproto.base, |
| 222 | &scc_info_PonDistance_dmi_2fhw_2eproto.base,}}; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 223 | |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 224 | static void InitDefaultsTransceiverComponentChangeAttributes_dmi_2fhw_2eproto() { |
| 225 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 226 | |
| 227 | { |
| 228 | void* ptr = &::dmi::_TransceiverComponentChangeAttributes_default_instance_; |
| 229 | new (ptr) ::dmi::TransceiverComponentChangeAttributes(); |
| 230 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 231 | } |
| 232 | ::dmi::TransceiverComponentChangeAttributes::InitAsDefaultInstance(); |
| 233 | } |
| 234 | |
| 235 | ::google::protobuf::internal::SCCInfo<0> scc_info_TransceiverComponentChangeAttributes_dmi_2fhw_2eproto = |
| 236 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTransceiverComponentChangeAttributes_dmi_2fhw_2eproto}, {}}; |
| 237 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 238 | static void InitDefaultsPonIdConfig_dmi_2fhw_2eproto() { |
| 239 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 240 | |
| 241 | { |
| 242 | void* ptr = &::dmi::_PonIdConfig_default_instance_; |
| 243 | new (ptr) ::dmi::PonIdConfig(); |
| 244 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 245 | } |
| 246 | ::dmi::PonIdConfig::InitAsDefaultInstance(); |
| 247 | } |
| 248 | |
| 249 | ::google::protobuf::internal::SCCInfo<0> scc_info_PonIdConfig_dmi_2fhw_2eproto = |
| 250 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPonIdConfig_dmi_2fhw_2eproto}, {}}; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 251 | |
| 252 | static void InitDefaultsContainerComponentAttributes_dmi_2fhw_2eproto() { |
| 253 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 254 | |
| 255 | { |
| 256 | void* ptr = &::dmi::_ContainerComponentAttributes_default_instance_; |
| 257 | new (ptr) ::dmi::ContainerComponentAttributes(); |
| 258 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 259 | } |
| 260 | ::dmi::ContainerComponentAttributes::InitAsDefaultInstance(); |
| 261 | } |
| 262 | |
| 263 | ::google::protobuf::internal::SCCInfo<0> scc_info_ContainerComponentAttributes_dmi_2fhw_2eproto = |
| 264 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsContainerComponentAttributes_dmi_2fhw_2eproto}, {}}; |
| 265 | |
| 266 | static void InitDefaultsPsuComponentAttributes_dmi_2fhw_2eproto() { |
| 267 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 268 | |
| 269 | { |
| 270 | void* ptr = &::dmi::_PsuComponentAttributes_default_instance_; |
| 271 | new (ptr) ::dmi::PsuComponentAttributes(); |
| 272 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 273 | } |
| 274 | ::dmi::PsuComponentAttributes::InitAsDefaultInstance(); |
| 275 | } |
| 276 | |
| 277 | ::google::protobuf::internal::SCCInfo<0> scc_info_PsuComponentAttributes_dmi_2fhw_2eproto = |
| 278 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPsuComponentAttributes_dmi_2fhw_2eproto}, {}}; |
| 279 | |
| 280 | static void InitDefaultsTransceiverComponentsAttributes_dmi_2fhw_2eproto() { |
| 281 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 282 | |
| 283 | { |
| 284 | void* ptr = &::dmi::_TransceiverComponentsAttributes_default_instance_; |
| 285 | new (ptr) ::dmi::TransceiverComponentsAttributes(); |
| 286 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 287 | } |
| 288 | ::dmi::TransceiverComponentsAttributes::InitAsDefaultInstance(); |
| 289 | } |
| 290 | |
| 291 | ::google::protobuf::internal::SCCInfo<0> scc_info_TransceiverComponentsAttributes_dmi_2fhw_2eproto = |
| 292 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTransceiverComponentsAttributes_dmi_2fhw_2eproto}, {}}; |
| 293 | |
| 294 | static void InitDefaultsComponent_dmi_2fhw_2eproto() { |
| 295 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 296 | |
| 297 | { |
| 298 | void* ptr = &::dmi::_Component_default_instance_; |
| 299 | new (ptr) ::dmi::Component(); |
| 300 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 301 | } |
| 302 | ::dmi::Component::InitAsDefaultInstance(); |
| 303 | } |
| 304 | |
| 305 | ::google::protobuf::internal::SCCInfo<9> scc_info_Component_dmi_2fhw_2eproto = |
| 306 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 9, InitDefaultsComponent_dmi_2fhw_2eproto}, { |
| 307 | &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base, |
| 308 | &scc_info_Uri_dmi_2fhw_2eproto.base, |
| 309 | &scc_info_Uuid_dmi_2fhw_2eproto.base, |
| 310 | &scc_info_ComponentState_dmi_2fhw_2eproto.base, |
| 311 | &scc_info_ComponentSensorData_dmi_2fhw_2eproto.base, |
| 312 | &scc_info_PortComponentAttributes_dmi_2fhw_2eproto.base, |
| 313 | &scc_info_ContainerComponentAttributes_dmi_2fhw_2eproto.base, |
| 314 | &scc_info_PsuComponentAttributes_dmi_2fhw_2eproto.base, |
| 315 | &scc_info_TransceiverComponentsAttributes_dmi_2fhw_2eproto.base,}}; |
| 316 | |
| 317 | static void InitDefaultsHardware_dmi_2fhw_2eproto() { |
| 318 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 319 | |
| 320 | { |
| 321 | void* ptr = &::dmi::_Hardware_default_instance_; |
| 322 | new (ptr) ::dmi::Hardware(); |
| 323 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 324 | } |
| 325 | ::dmi::Hardware::InitAsDefaultInstance(); |
| 326 | } |
| 327 | |
| 328 | ::google::protobuf::internal::SCCInfo<2> scc_info_Hardware_dmi_2fhw_2eproto = |
| 329 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsHardware_dmi_2fhw_2eproto}, { |
| 330 | &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base, |
| 331 | &scc_info_Component_dmi_2fhw_2eproto.base,}}; |
| 332 | |
| 333 | static void InitDefaultsModifiableComponent_dmi_2fhw_2eproto() { |
| 334 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 335 | |
| 336 | { |
| 337 | void* ptr = &::dmi::_ModifiableComponent_default_instance_; |
| 338 | new (ptr) ::dmi::ModifiableComponent(); |
| 339 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 340 | } |
| 341 | ::dmi::ModifiableComponent::InitAsDefaultInstance(); |
| 342 | } |
| 343 | |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 344 | ::google::protobuf::internal::SCCInfo<4> scc_info_ModifiableComponent_dmi_2fhw_2eproto = |
| 345 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsModifiableComponent_dmi_2fhw_2eproto}, { |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 346 | &scc_info_Component_dmi_2fhw_2eproto.base, |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 347 | &scc_info_Uri_dmi_2fhw_2eproto.base, |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 348 | &scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto.base, |
| 349 | &scc_info_TransceiverComponentChangeAttributes_dmi_2fhw_2eproto.base,}}; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 350 | |
| 351 | void InitDefaults_dmi_2fhw_2eproto() { |
| 352 | ::google::protobuf::internal::InitSCC(&scc_info_Uuid_dmi_2fhw_2eproto.base); |
| 353 | ::google::protobuf::internal::InitSCC(&scc_info_HardwareID_dmi_2fhw_2eproto.base); |
| 354 | ::google::protobuf::internal::InitSCC(&scc_info_Uri_dmi_2fhw_2eproto.base); |
| 355 | ::google::protobuf::internal::InitSCC(&scc_info_ComponentState_dmi_2fhw_2eproto.base); |
| 356 | ::google::protobuf::internal::InitSCC(&scc_info_ComponentSensorData_dmi_2fhw_2eproto.base); |
| 357 | ::google::protobuf::internal::InitSCC(&scc_info_PortComponentAttributes_dmi_2fhw_2eproto.base); |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 358 | ::google::protobuf::internal::InitSCC(&scc_info_PonDistance_dmi_2fhw_2eproto.base); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 359 | ::google::protobuf::internal::InitSCC(&scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto.base); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 360 | ::google::protobuf::internal::InitSCC(&scc_info_TransceiverComponentChangeAttributes_dmi_2fhw_2eproto.base); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 361 | ::google::protobuf::internal::InitSCC(&scc_info_PonIdConfig_dmi_2fhw_2eproto.base); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 362 | ::google::protobuf::internal::InitSCC(&scc_info_ContainerComponentAttributes_dmi_2fhw_2eproto.base); |
| 363 | ::google::protobuf::internal::InitSCC(&scc_info_PsuComponentAttributes_dmi_2fhw_2eproto.base); |
| 364 | ::google::protobuf::internal::InitSCC(&scc_info_TransceiverComponentsAttributes_dmi_2fhw_2eproto.base); |
| 365 | ::google::protobuf::internal::InitSCC(&scc_info_Component_dmi_2fhw_2eproto.base); |
| 366 | ::google::protobuf::internal::InitSCC(&scc_info_Hardware_dmi_2fhw_2eproto.base); |
| 367 | ::google::protobuf::internal::InitSCC(&scc_info_ModifiableComponent_dmi_2fhw_2eproto.base); |
| 368 | } |
| 369 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 370 | ::google::protobuf::Metadata file_level_metadata_dmi_2fhw_2eproto[16]; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 371 | const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_dmi_2fhw_2eproto[15]; |
| 372 | constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_dmi_2fhw_2eproto = nullptr; |
| 373 | |
| 374 | const ::google::protobuf::uint32 TableStruct_dmi_2fhw_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
| 375 | ~0u, // no _has_bits_ |
| 376 | PROTOBUF_FIELD_OFFSET(::dmi::Uuid, _internal_metadata_), |
| 377 | ~0u, // no _extensions_ |
| 378 | ~0u, // no _oneof_case_ |
| 379 | ~0u, // no _weak_field_map_ |
| 380 | PROTOBUF_FIELD_OFFSET(::dmi::Uuid, uuid_), |
| 381 | ~0u, // no _has_bits_ |
| 382 | PROTOBUF_FIELD_OFFSET(::dmi::HardwareID, _internal_metadata_), |
| 383 | ~0u, // no _extensions_ |
| 384 | ~0u, // no _oneof_case_ |
| 385 | ~0u, // no _weak_field_map_ |
| 386 | PROTOBUF_FIELD_OFFSET(::dmi::HardwareID, uuid_), |
| 387 | ~0u, // no _has_bits_ |
| 388 | PROTOBUF_FIELD_OFFSET(::dmi::Uri, _internal_metadata_), |
| 389 | ~0u, // no _extensions_ |
| 390 | ~0u, // no _oneof_case_ |
| 391 | ~0u, // no _weak_field_map_ |
| 392 | PROTOBUF_FIELD_OFFSET(::dmi::Uri, uri_), |
| 393 | ~0u, // no _has_bits_ |
| 394 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, _internal_metadata_), |
| 395 | ~0u, // no _extensions_ |
| 396 | ~0u, // no _oneof_case_ |
| 397 | ~0u, // no _weak_field_map_ |
| 398 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, state_last_changed_), |
| 399 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, admin_state_), |
| 400 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, oper_state_), |
| 401 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, usage_state_), |
| 402 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, alarm_state_), |
| 403 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, standby_state_), |
| 404 | ~0u, // no _has_bits_ |
| 405 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, _internal_metadata_), |
| 406 | ~0u, // no _extensions_ |
| 407 | ~0u, // no _oneof_case_ |
| 408 | ~0u, // no _weak_field_map_ |
| 409 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, value_), |
| 410 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, type_), |
| 411 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, scale_), |
| 412 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, precision_), |
| 413 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, status_), |
| 414 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, units_display_), |
| 415 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, timestamp_), |
| 416 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, value_update_rate_), |
| 417 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, data_type_), |
| 418 | ~0u, // no _has_bits_ |
| 419 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, _internal_metadata_), |
| 420 | ~0u, // no _extensions_ |
| 421 | ~0u, // no _oneof_case_ |
| 422 | ~0u, // no _weak_field_map_ |
| 423 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, connector_type_), |
| 424 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, speed_), |
| 425 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, protocol_), |
| 426 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, physical_label_), |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 427 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, mapping_label_), |
| 428 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, pon_id_config_), |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 429 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, speed_autonegotiation_), |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 430 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, distance_), |
| 431 | ~0u, // no _has_bits_ |
| 432 | PROTOBUF_FIELD_OFFSET(::dmi::PonDistance, _internal_metadata_), |
| 433 | ~0u, // no _extensions_ |
| 434 | ~0u, // no _oneof_case_ |
| 435 | ~0u, // no _weak_field_map_ |
| 436 | PROTOBUF_FIELD_OFFSET(::dmi::PonDistance, max_distance_), |
| 437 | PROTOBUF_FIELD_OFFSET(::dmi::PonDistance, max_differential_distance_), |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 438 | ~0u, // no _has_bits_ |
| 439 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentChangeAttributes, _internal_metadata_), |
| 440 | ~0u, // no _extensions_ |
| 441 | ~0u, // no _oneof_case_ |
| 442 | ~0u, // no _weak_field_map_ |
| 443 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentChangeAttributes, pon_id_config_), |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 444 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentChangeAttributes, distance_), |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 445 | ~0u, // no _has_bits_ |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 446 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentChangeAttributes, _internal_metadata_), |
| 447 | ~0u, // no _extensions_ |
| 448 | ~0u, // no _oneof_case_ |
| 449 | ~0u, // no _weak_field_map_ |
| 450 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentChangeAttributes, trans_type_), |
| 451 | ~0u, // no _has_bits_ |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 452 | PROTOBUF_FIELD_OFFSET(::dmi::PonIdConfig, _internal_metadata_), |
| 453 | ~0u, // no _extensions_ |
| 454 | ~0u, // no _oneof_case_ |
| 455 | ~0u, // no _weak_field_map_ |
| 456 | PROTOBUF_FIELD_OFFSET(::dmi::PonIdConfig, pon_id_), |
| 457 | PROTOBUF_FIELD_OFFSET(::dmi::PonIdConfig, pon_id_transmit_periodicity_), |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 458 | ~0u, // no _has_bits_ |
| 459 | PROTOBUF_FIELD_OFFSET(::dmi::ContainerComponentAttributes, _internal_metadata_), |
| 460 | ~0u, // no _extensions_ |
| 461 | ~0u, // no _oneof_case_ |
| 462 | ~0u, // no _weak_field_map_ |
| 463 | PROTOBUF_FIELD_OFFSET(::dmi::ContainerComponentAttributes, physical_label_), |
| 464 | ~0u, // no _has_bits_ |
| 465 | PROTOBUF_FIELD_OFFSET(::dmi::PsuComponentAttributes, _internal_metadata_), |
| 466 | ~0u, // no _extensions_ |
| 467 | ~0u, // no _oneof_case_ |
| 468 | ~0u, // no _weak_field_map_ |
| 469 | PROTOBUF_FIELD_OFFSET(::dmi::PsuComponentAttributes, supported_voltage_), |
| 470 | ~0u, // no _has_bits_ |
| 471 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, _internal_metadata_), |
| 472 | ~0u, // no _extensions_ |
| 473 | ~0u, // no _oneof_case_ |
| 474 | ~0u, // no _weak_field_map_ |
| 475 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, form_factor_), |
| 476 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, trans_type_), |
| 477 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, max_distance_), |
| 478 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, max_distance_scale_), |
| 479 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, rx_wavelength_), |
| 480 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, tx_wavelength_), |
| 481 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, wavelength_scale_), |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 482 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, tx_power_), |
| 483 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, tx_power_scale_), |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 484 | ~0u, // no _has_bits_ |
| 485 | PROTOBUF_FIELD_OFFSET(::dmi::Component, _internal_metadata_), |
| 486 | ~0u, // no _extensions_ |
| 487 | PROTOBUF_FIELD_OFFSET(::dmi::Component, _oneof_case_[0]), |
| 488 | ~0u, // no _weak_field_map_ |
| 489 | PROTOBUF_FIELD_OFFSET(::dmi::Component, name_), |
| 490 | PROTOBUF_FIELD_OFFSET(::dmi::Component, class__), |
| 491 | PROTOBUF_FIELD_OFFSET(::dmi::Component, description_), |
| 492 | PROTOBUF_FIELD_OFFSET(::dmi::Component, parent_), |
| 493 | PROTOBUF_FIELD_OFFSET(::dmi::Component, parent_rel_pos_), |
| 494 | PROTOBUF_FIELD_OFFSET(::dmi::Component, children_), |
| 495 | PROTOBUF_FIELD_OFFSET(::dmi::Component, hardware_rev_), |
| 496 | PROTOBUF_FIELD_OFFSET(::dmi::Component, firmware_rev_), |
| 497 | PROTOBUF_FIELD_OFFSET(::dmi::Component, software_rev_), |
| 498 | PROTOBUF_FIELD_OFFSET(::dmi::Component, serial_num_), |
| 499 | PROTOBUF_FIELD_OFFSET(::dmi::Component, mfg_name_), |
| 500 | PROTOBUF_FIELD_OFFSET(::dmi::Component, model_name_), |
| 501 | PROTOBUF_FIELD_OFFSET(::dmi::Component, alias_), |
| 502 | PROTOBUF_FIELD_OFFSET(::dmi::Component, asset_id_), |
| 503 | PROTOBUF_FIELD_OFFSET(::dmi::Component, is_fru_), |
| 504 | PROTOBUF_FIELD_OFFSET(::dmi::Component, mfg_date_), |
| 505 | PROTOBUF_FIELD_OFFSET(::dmi::Component, uri_), |
| 506 | PROTOBUF_FIELD_OFFSET(::dmi::Component, uuid_), |
| 507 | PROTOBUF_FIELD_OFFSET(::dmi::Component, state_), |
| 508 | PROTOBUF_FIELD_OFFSET(::dmi::Component, sensor_data_), |
| 509 | offsetof(::dmi::ComponentDefaultTypeInternal, port_attr_), |
| 510 | offsetof(::dmi::ComponentDefaultTypeInternal, container_attr_), |
| 511 | offsetof(::dmi::ComponentDefaultTypeInternal, psu_attr_), |
| 512 | offsetof(::dmi::ComponentDefaultTypeInternal, transceiver_attr_), |
| 513 | PROTOBUF_FIELD_OFFSET(::dmi::Component, specific_), |
| 514 | ~0u, // no _has_bits_ |
| 515 | PROTOBUF_FIELD_OFFSET(::dmi::Hardware, _internal_metadata_), |
| 516 | ~0u, // no _extensions_ |
| 517 | ~0u, // no _oneof_case_ |
| 518 | ~0u, // no _weak_field_map_ |
| 519 | PROTOBUF_FIELD_OFFSET(::dmi::Hardware, last_change_), |
| 520 | PROTOBUF_FIELD_OFFSET(::dmi::Hardware, root_), |
| 521 | PROTOBUF_FIELD_OFFSET(::dmi::Hardware, last_booted_), |
| 522 | ~0u, // no _has_bits_ |
| 523 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, _internal_metadata_), |
| 524 | ~0u, // no _extensions_ |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 525 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, _oneof_case_[0]), |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 526 | ~0u, // no _weak_field_map_ |
| 527 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, name_), |
| 528 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, class__), |
| 529 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, parent_), |
| 530 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, parent_rel_pos_), |
| 531 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, alias_), |
| 532 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, asset_id_), |
| 533 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, uri_), |
| 534 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, admin_state_), |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 535 | offsetof(::dmi::ModifiableComponentDefaultTypeInternal, port_attr_), |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 536 | offsetof(::dmi::ModifiableComponentDefaultTypeInternal, trx_attr_), |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 537 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, specific_), |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 538 | }; |
| 539 | static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
| 540 | { 0, -1, sizeof(::dmi::Uuid)}, |
| 541 | { 6, -1, sizeof(::dmi::HardwareID)}, |
| 542 | { 12, -1, sizeof(::dmi::Uri)}, |
| 543 | { 18, -1, sizeof(::dmi::ComponentState)}, |
| 544 | { 29, -1, sizeof(::dmi::ComponentSensorData)}, |
| 545 | { 43, -1, sizeof(::dmi::PortComponentAttributes)}, |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 546 | { 56, -1, sizeof(::dmi::PonDistance)}, |
| 547 | { 63, -1, sizeof(::dmi::PortComponentChangeAttributes)}, |
| 548 | { 70, -1, sizeof(::dmi::TransceiverComponentChangeAttributes)}, |
| 549 | { 76, -1, sizeof(::dmi::PonIdConfig)}, |
| 550 | { 83, -1, sizeof(::dmi::ContainerComponentAttributes)}, |
| 551 | { 89, -1, sizeof(::dmi::PsuComponentAttributes)}, |
| 552 | { 95, -1, sizeof(::dmi::TransceiverComponentsAttributes)}, |
| 553 | { 109, -1, sizeof(::dmi::Component)}, |
| 554 | { 139, -1, sizeof(::dmi::Hardware)}, |
| 555 | { 147, -1, sizeof(::dmi::ModifiableComponent)}, |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 556 | }; |
| 557 | |
| 558 | static ::google::protobuf::Message const * const file_default_instances[] = { |
| 559 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_Uuid_default_instance_), |
| 560 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_HardwareID_default_instance_), |
| 561 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_Uri_default_instance_), |
| 562 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_ComponentState_default_instance_), |
| 563 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_ComponentSensorData_default_instance_), |
| 564 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_PortComponentAttributes_default_instance_), |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 565 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_PonDistance_default_instance_), |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 566 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_PortComponentChangeAttributes_default_instance_), |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 567 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_TransceiverComponentChangeAttributes_default_instance_), |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 568 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_PonIdConfig_default_instance_), |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 569 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_ContainerComponentAttributes_default_instance_), |
| 570 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_PsuComponentAttributes_default_instance_), |
| 571 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_TransceiverComponentsAttributes_default_instance_), |
| 572 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_Component_default_instance_), |
| 573 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_Hardware_default_instance_), |
| 574 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_ModifiableComponent_default_instance_), |
| 575 | }; |
| 576 | |
| 577 | ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_dmi_2fhw_2eproto = { |
| 578 | {}, AddDescriptors_dmi_2fhw_2eproto, "dmi/hw.proto", schemas, |
| 579 | file_default_instances, TableStruct_dmi_2fhw_2eproto::offsets, |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 580 | file_level_metadata_dmi_2fhw_2eproto, 16, file_level_enum_descriptors_dmi_2fhw_2eproto, file_level_service_descriptors_dmi_2fhw_2eproto, |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 581 | }; |
| 582 | |
| 583 | const char descriptor_table_protodef_dmi_2fhw_2eproto[] = |
| 584 | "\n\014dmi/hw.proto\022\003dmi\032\037google/protobuf/tim" |
| 585 | "estamp.proto\"\024\n\004Uuid\022\014\n\004uuid\030\001 \001(\t\"%\n\nHa" |
| 586 | "rdwareID\022\027\n\004uuid\030\001 \001(\0132\t.dmi.Uuid\"\022\n\003Uri" |
| 587 | "\022\013\n\003uri\030\001 \001(\t\"\265\002\n\016ComponentState\0226\n\022stat" |
| 588 | "e_last_changed\030\001 \001(\0132\032.google.protobuf.T" |
| 589 | "imestamp\022-\n\013admin_state\030\002 \001(\0162\030.dmi.Comp" |
| 590 | "onentAdminState\022+\n\noper_state\030\003 \001(\0162\027.dm" |
| 591 | "i.ComponentOperState\022-\n\013usage_state\030\004 \001(" |
| 592 | "\0162\030.dmi.ComponentUsageState\022-\n\013alarm_sta" |
| 593 | "te\030\005 \001(\0162\030.dmi.ComponentAlarmState\0221\n\rst" |
| 594 | "andby_state\030\006 \001(\0162\032.dmi.ComponentStandby" |
| 595 | "State\"\220\002\n\023ComponentSensorData\022\r\n\005value\030\001" |
| 596 | " \001(\005\022 \n\004type\030\002 \001(\0162\022.dmi.DataValueType\022\036" |
| 597 | "\n\005scale\030\003 \001(\0162\017.dmi.ValueScale\022\021\n\tprecis" |
| 598 | "ion\030\004 \001(\005\022!\n\006status\030\005 \001(\0162\021.dmi.SensorSt" |
| 599 | "atus\022\025\n\runits_display\030\006 \001(\t\022-\n\ttimestamp" |
| 600 | "\030\007 \001(\0132\032.google.protobuf.Timestamp\022\031\n\021va" |
| 601 | "lue_update_rate\030\010 \001(\r\022\021\n\tdata_type\030\t \001(\t" |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 602 | "\"\205\006\n\027PortComponentAttributes\022B\n\016connecto" |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 603 | "r_type\030\001 \001(\0162*.dmi.PortComponentAttribut" |
| 604 | "es.ConnectorType\0221\n\005speed\030\002 \001(\0162\".dmi.Po" |
| 605 | "rtComponentAttributes.Speed\0227\n\010protocol\030" |
| 606 | "\003 \001(\0162%.dmi.PortComponentAttributes.Prot" |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 607 | "ocol\022\026\n\016physical_label\030\004 \001(\t\022\025\n\rmapping_" |
| 608 | "label\030\005 \001(\t\022\'\n\rpon_id_config\030\006 \001(\0132\020.dmi" |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 609 | ".PonIdConfig\022\035\n\025speed_autonegotiation\030\007 " |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 610 | "\001(\010\022\"\n\010distance\030\010 \001(\0132\020.dmi.PonDistance\"" |
| 611 | "p\n\rConnectorType\022\034\n\030CONNECTOR_TYPE_UNDEF" |
| 612 | "INED\020\000\022\010\n\004RJ45\020\001\022\014\n\010FIBER_LC\020\002\022\017\n\013FIBER_" |
| 613 | "SC_PC\020\003\022\r\n\tFIBER_MPO\020\004\022\t\n\005RS232\020\005\"\256\001\n\005Sp" |
| 614 | "eed\022\023\n\017SPEED_UNDEFINED\020\000\022\013\n\007DYNAMIC\020\001\022\r\n" |
| 615 | "\tGIGABIT_1\020\002\022\016\n\nGIGABIT_10\020\003\022\016\n\nGIGABIT_" |
| 616 | "25\020\004\022\016\n\nGIGABIT_40\020\005\022\017\n\013GIGABIT_100\020\006\022\017\n" |
| 617 | "\013GIGABIT_400\020\007\022\020\n\014MEGABIT_2500\020\010\022\020\n\014MEGA" |
| 618 | "BIT_1250\020\t\"|\n\010Protocol\022\026\n\022PROTOCOL_UNDEF" |
| 619 | "INED\020\000\022\014\n\010ETHERNET\020\001\022\010\n\004GPON\020\002\022\t\n\005XGPON\020" |
| 620 | "\003\022\n\n\006XGSPON\020\004\022\t\n\005GFAST\020\005\022\n\n\006SERIAL\020\006\022\010\n\004" |
| 621 | "EPON\020\007\022\010\n\004BITS\020\010\"F\n\013PonDistance\022\024\n\014max_d" |
| 622 | "istance\030\001 \001(\r\022!\n\031max_differential_distan" |
| 623 | "ce\030\002 \001(\r\"l\n\035PortComponentChangeAttribute" |
| 624 | "s\022\'\n\rpon_id_config\030\001 \001(\0132\020.dmi.PonIdConf" |
| 625 | "ig\022\"\n\010distance\030\002 \001(\0132\020.dmi.PonDistance\"P" |
| 626 | "\n$TransceiverComponentChangeAttributes\022(" |
| 627 | "\n\ntrans_type\030\001 \001(\0162\024.dmi.TransceiverType" |
| 628 | "\"B\n\013PonIdConfig\022\016\n\006pon_id\030\001 \001(\014\022#\n\033pon_i" |
| 629 | "d_transmit_periodicity\030\002 \001(\r\"6\n\034Containe" |
| 630 | "rComponentAttributes\022\026\n\016physical_label\030\001" |
| 631 | " \001(\t\"\263\001\n\026PsuComponentAttributes\022G\n\021suppo" |
| 632 | "rted_voltage\030\001 \001(\0162,.dmi.PsuComponentAtt" |
| 633 | "ributes.SupportedVoltage\"P\n\020SupportedVol" |
| 634 | "tage\022\037\n\033SUPPORTED_VOLTAGE_UNDEFINED\020\000\022\007\n" |
| 635 | "\003V48\020\001\022\010\n\004V230\020\002\022\010\n\004V115\020\003\"\253\004\n\037Transceiv" |
| 636 | "erComponentsAttributes\022D\n\013form_factor\030\001 " |
| 637 | "\001(\0162/.dmi.TransceiverComponentsAttribute" |
| 638 | "s.FormFactor\022(\n\ntrans_type\030\002 \001(\0162\024.dmi.T" |
| 639 | "ransceiverType\022\024\n\014max_distance\030\003 \001(\r\022+\n\022" |
| 640 | "max_distance_scale\030\004 \001(\0162\017.dmi.ValueScal" |
| 641 | "e\022\025\n\rrx_wavelength\030\005 \003(\r\022\025\n\rtx_wavelengt" |
| 642 | "h\030\006 \003(\r\022)\n\020wavelength_scale\030\007 \001(\0162\017.dmi." |
| 643 | "ValueScale\022\020\n\010tx_power\030\010 \003(\005\022\'\n\016tx_power" |
| 644 | "_scale\030\t \001(\0162\017.dmi.ValueScale\"\300\001\n\nFormFa" |
| 645 | "ctor\022\027\n\023FORM_FACTOR_UNKNOWN\020\000\022\010\n\004QSFP\020\001\022" |
| 646 | "\r\n\tQSFP_PLUS\020\002\022\n\n\006QSFP28\020\003\022\007\n\003SFP\020\004\022\014\n\010S" |
| 647 | "FP_PLUS\020\005\022\007\n\003XFP\020\006\022\010\n\004CFP4\020\007\022\010\n\004CFP2\020\010\022\010" |
| 648 | "\n\004CPAK\020\t\022\006\n\002X2\020\n\022\t\n\005OTHER\020\013\022\007\n\003CFP\020\014\022\014\n\010" |
| 649 | "CFP2_ACO\020\r\022\014\n\010CFP2_DCO\020\016\"\350\005\n\tComponent\022\014" |
| 650 | "\n\004name\030\001 \001(\t\022!\n\005class\030\002 \001(\0162\022.dmi.Compon" |
| 651 | "entType\022\023\n\013description\030\003 \001(\t\022\016\n\006parent\030\004" |
| 652 | " \001(\t\022\026\n\016parent_rel_pos\030\005 \001(\005\022 \n\010children" |
| 653 | "\030\006 \003(\0132\016.dmi.Component\022\024\n\014hardware_rev\030\007" |
| 654 | " \001(\t\022\024\n\014firmware_rev\030\010 \001(\t\022\024\n\014software_r" |
| 655 | "ev\030\t \001(\t\022\022\n\nserial_num\030\n \001(\t\022\020\n\010mfg_name" |
| 656 | "\030\013 \001(\t\022\022\n\nmodel_name\030\014 \001(\t\022\r\n\005alias\030\r \001(" |
| 657 | "\t\022\020\n\010asset_id\030\016 \001(\t\022\016\n\006is_fru\030\017 \001(\010\022,\n\010m" |
| 658 | "fg_date\030\020 \001(\0132\032.google.protobuf.Timestam" |
| 659 | "p\022\025\n\003uri\030\021 \001(\0132\010.dmi.Uri\022\027\n\004uuid\030\022 \001(\0132\t" |
| 660 | ".dmi.Uuid\022\"\n\005state\030\023 \001(\0132\023.dmi.Component" |
| 661 | "State\022-\n\013sensor_data\030\024 \003(\0132\030.dmi.Compone" |
| 662 | "ntSensorData\0221\n\tport_attr\0302 \001(\0132\034.dmi.Po" |
| 663 | "rtComponentAttributesH\000\022;\n\016container_att" |
| 664 | "r\0303 \001(\0132!.dmi.ContainerComponentAttribut" |
| 665 | "esH\000\022/\n\010psu_attr\0304 \001(\0132\033.dmi.PsuComponen" |
| 666 | "tAttributesH\000\022@\n\020transceiver_attr\0305 \001(\0132" |
| 667 | "$.dmi.TransceiverComponentsAttributesH\000B" |
| 668 | "\n\n\010specific\"\212\001\n\010Hardware\022/\n\013last_change\030" |
| 669 | "\001 \001(\0132\032.google.protobuf.Timestamp\022\034\n\004roo" |
| 670 | "t\030\002 \001(\0132\016.dmi.Component\022/\n\013last_booted\030\003" |
| 671 | " \001(\0132\032.google.protobuf.Timestamp\"\351\002\n\023Mod" |
| 672 | "ifiableComponent\022\014\n\004name\030\001 \001(\t\022!\n\005class\030" |
| 673 | "\002 \001(\0162\022.dmi.ComponentType\022\036\n\006parent\030\003 \001(" |
| 674 | "\0132\016.dmi.Component\022\026\n\016parent_rel_pos\030\004 \001(" |
| 675 | "\005\022\r\n\005alias\030\005 \001(\t\022\020\n\010asset_id\030\006 \001(\t\022\025\n\003ur" |
| 676 | "i\030\007 \001(\0132\010.dmi.Uri\022-\n\013admin_state\030\010 \001(\0162\030" |
| 677 | ".dmi.ComponentAdminState\0227\n\tport_attr\0302 " |
| 678 | "\001(\0132\".dmi.PortComponentChangeAttributesH" |
| 679 | "\000\022=\n\010trx_attr\0303 \001(\0132).dmi.TransceiverCom" |
| 680 | "ponentChangeAttributesH\000B\n\n\010specific*\264\003\n" |
| 681 | "\rComponentType\022\034\n\030COMPONENT_TYPE_UNDEFIN" |
| 682 | "ED\020\000\022\032\n\026COMPONENT_TYPE_UNKNOWN\020\001\022\032\n\026COMP" |
| 683 | "ONENT_TYPE_CHASSIS\020\002\022\034\n\030COMPONENT_TYPE_B" |
| 684 | "ACKPLANE\020\003\022\034\n\030COMPONENT_TYPE_CONTAINER\020\004" |
| 685 | "\022\037\n\033COMPONENT_TYPE_POWER_SUPPLY\020\005\022\026\n\022COM" |
| 686 | "PONENT_TYPE_FAN\020\006\022\031\n\025COMPONENT_TYPE_SENS" |
| 687 | "OR\020\007\022\031\n\025COMPONENT_TYPE_MODULE\020\010\022\027\n\023COMPO" |
| 688 | "NENT_TYPE_PORT\020\t\022\026\n\022COMPONENT_TYPE_CPU\020\n" |
| 689 | "\022\032\n\026COMPONENT_TYPE_BATTERY\020\013\022\032\n\026COMPONEN" |
| 690 | "T_TYPE_STORAGE\020\014\022\031\n\025COMPONENT_TYPE_MEMOR" |
| 691 | "Y\020\r\022\036\n\032COMPONENT_TYPE_TRANSCEIVER\020\016*\263\001\n\023" |
| 692 | "ComponentAdminState\022\036\n\032COMP_ADMIN_STATE_" |
| 693 | "UNDEFINED\020\000\022\034\n\030COMP_ADMIN_STATE_UNKNOWN\020" |
| 694 | "\001\022\033\n\027COMP_ADMIN_STATE_LOCKED\020\002\022\"\n\036COMP_A" |
| 695 | "DMIN_STATE_SHUTTING_DOWN\020\003\022\035\n\031COMP_ADMIN" |
| 696 | "_STATE_UNLOCKED\020\004*\250\001\n\022ComponentOperState" |
| 697 | "\022\035\n\031COMP_OPER_STATE_UNDEFINED\020\000\022\033\n\027COMP_" |
| 698 | "OPER_STATE_UNKNOWN\020\001\022\034\n\030COMP_OPER_STATE_" |
| 699 | "DISABLED\020\002\022\033\n\027COMP_OPER_STATE_ENABLED\020\003\022" |
| 700 | "\033\n\027COMP_OPER_STATE_TESTING\020\004*\246\001\n\023Compone" |
| 701 | "ntUsageState\022\036\n\032COMP_USAGE_STATE_UNDEFIN" |
| 702 | "ED\020\000\022\034\n\030COMP_USAGE_STATE_UNKNOWN\020\001\022\031\n\025CO" |
| 703 | "MP_USAGE_STATE_IDLE\020\002\022\033\n\027COMP_USAGE_STAT" |
| 704 | "E_ACTIVE\020\003\022\031\n\025COMP_USAGE_STATE_BUSY\020\004*\217\002" |
| 705 | "\n\023ComponentAlarmState\022\036\n\032COMP_ALARM_STAT" |
| 706 | "E_UNDEFINED\020\000\022\034\n\030COMP_ALARM_STATE_UNKNOW" |
| 707 | "N\020\001\022!\n\035COMP_ALARM_STATE_UNDER_REPAIR\020\002\022\035" |
| 708 | "\n\031COMP_ALARM_STATE_CRITICAL\020\003\022\032\n\026COMP_AL" |
| 709 | "ARM_STATE_MAJOR\020\004\022\032\n\026COMP_ALARM_STATE_MI" |
| 710 | "NOR\020\005\022\034\n\030COMP_ALARM_STATE_WARNING\020\006\022\"\n\036C" |
| 711 | "OMP_ALARM_STATE_INDETERMINATE\020\007*\274\001\n\025Comp" |
| 712 | "onentStandbyState\022 \n\034COMP_STANDBY_STATE_" |
| 713 | "UNDEFINED\020\000\022\036\n\032COMP_STANDBY_STATE_UNKNOW" |
| 714 | "N\020\001\022\032\n\026COMP_STANDBY_STATE_HOT\020\002\022\033\n\027COMP_" |
| 715 | "STANDBY_STATE_COLD\020\003\022(\n$COMP_STANDBY_STA" |
| 716 | "TE_PROVIDING_SERVICE\020\004*\235\003\n\rDataValueType" |
| 717 | "\022\030\n\024VALUE_TYPE_UNDEFINED\020\000\022\024\n\020VALUE_TYPE" |
| 718 | "_OTHER\020\001\022\026\n\022VALUE_TYPE_UNKNOWN\020\002\022\027\n\023VALU" |
| 719 | "E_TYPE_VOLTS_AC\020\003\022\027\n\023VALUE_TYPE_VOLTS_DC" |
| 720 | "\020\004\022\026\n\022VALUE_TYPE_AMPERES\020\005\022\024\n\020VALUE_TYPE" |
| 721 | "_WATTS\020\006\022\024\n\020VALUE_TYPE_HERTZ\020\007\022\026\n\022VALUE_" |
| 722 | "TYPE_CELSIUS\020\010\022\031\n\025VALUE_TYPE_PERCENT_RH\020" |
| 723 | "\t\022\022\n\016VALUE_TYPE_RPM\020\n\022\022\n\016VALUE_TYPE_CMM\020" |
| 724 | "\013\022\032\n\026VALUE_TYPE_TRUTH_VALUE\020\014\022\026\n\022VALUE_T" |
| 725 | "YPE_PERCENT\020\r\022\025\n\021VALUE_TYPE_METERS\020\016\022\024\n\020" |
| 726 | "VALUE_TYPE_BYTES\020\017\022\022\n\016VALUE_TYPE_DBM\020\020*\244" |
| 727 | "\003\n\nValueScale\022\031\n\025VALUE_SCALE_UNDEFINED\020\000" |
| 728 | "\022\025\n\021VALUE_SCALE_YOCTO\020\001\022\025\n\021VALUE_SCALE_Z" |
| 729 | "EPTO\020\002\022\024\n\020VALUE_SCALE_ATTO\020\003\022\025\n\021VALUE_SC" |
| 730 | "ALE_FEMTO\020\004\022\024\n\020VALUE_SCALE_PICO\020\005\022\024\n\020VAL" |
| 731 | "UE_SCALE_NANO\020\006\022\025\n\021VALUE_SCALE_MICRO\020\007\022\025" |
| 732 | "\n\021VALUE_SCALE_MILLI\020\010\022\025\n\021VALUE_SCALE_UNI" |
| 733 | "TS\020\t\022\024\n\020VALUE_SCALE_KILO\020\n\022\024\n\020VALUE_SCAL" |
| 734 | "E_MEGA\020\013\022\024\n\020VALUE_SCALE_GIGA\020\014\022\024\n\020VALUE_" |
| 735 | "SCALE_TERA\020\r\022\024\n\020VALUE_SCALE_PETA\020\016\022\023\n\017VA" |
| 736 | "LUE_SCALE_EXA\020\017\022\025\n\021VALUE_SCALE_ZETTA\020\020\022\025" |
| 737 | "\n\021VALUE_SCALE_YOTTA\020\021*\202\001\n\014SensorStatus\022\033" |
| 738 | "\n\027SENSOR_STATUS_UNDEFINED\020\000\022\024\n\020SENSOR_ST" |
| 739 | "ATUS_OK\020\001\022\035\n\031SENSOR_STATUS_UNAVAILABLE\020\002" |
| 740 | "\022 \n\034SENSOR_STATUS_NONOPERATIONAL\020\003*\244\001\n\017T" |
| 741 | "ransceiverType\022\022\n\016TYPE_UNDEFINED\020\000\022\014\n\010ET" |
| 742 | "HERNET\020\001\022\010\n\004GPON\020\002\022\t\n\005XGPON\020\003\022\n\n\006XGSPON\020" |
| 743 | "\004\022\010\n\004CPON\020\005\022\013\n\007NG_PON2\020\006\022\010\n\004EPON\020\007\022\025\n\021CO" |
| 744 | "MBO_GPON_XGSPON\020\010\022\026\n\021TYPE_NOT_DETECTED\020\377" |
| 745 | "\001B;Z9github.com/opencord/device-manageme" |
| 746 | "nt-interface/v3/go/dmib\006proto3" |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 747 | ; |
| 748 | ::google::protobuf::internal::DescriptorTable descriptor_table_dmi_2fhw_2eproto = { |
| 749 | false, InitDefaults_dmi_2fhw_2eproto, |
| 750 | descriptor_table_protodef_dmi_2fhw_2eproto, |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 751 | "dmi/hw.proto", &assign_descriptors_table_dmi_2fhw_2eproto, 6510, |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 752 | }; |
| 753 | |
| 754 | void AddDescriptors_dmi_2fhw_2eproto() { |
| 755 | static constexpr ::google::protobuf::internal::InitFunc deps[1] = |
| 756 | { |
| 757 | ::AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto, |
| 758 | }; |
| 759 | ::google::protobuf::internal::AddDescriptors(&descriptor_table_dmi_2fhw_2eproto, deps, 1); |
| 760 | } |
| 761 | |
| 762 | // Force running AddDescriptors() at dynamic initialization time. |
| 763 | static bool dynamic_init_dummy_dmi_2fhw_2eproto = []() { AddDescriptors_dmi_2fhw_2eproto(); return true; }(); |
| 764 | namespace dmi { |
| 765 | const ::google::protobuf::EnumDescriptor* PortComponentAttributes_ConnectorType_descriptor() { |
| 766 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 767 | return file_level_enum_descriptors_dmi_2fhw_2eproto[0]; |
| 768 | } |
| 769 | bool PortComponentAttributes_ConnectorType_IsValid(int value) { |
| 770 | switch (value) { |
| 771 | case 0: |
| 772 | case 1: |
| 773 | case 2: |
| 774 | case 3: |
| 775 | case 4: |
| 776 | case 5: |
| 777 | return true; |
| 778 | default: |
| 779 | return false; |
| 780 | } |
| 781 | } |
| 782 | |
| 783 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 784 | const PortComponentAttributes_ConnectorType PortComponentAttributes::CONNECTOR_TYPE_UNDEFINED; |
| 785 | const PortComponentAttributes_ConnectorType PortComponentAttributes::RJ45; |
| 786 | const PortComponentAttributes_ConnectorType PortComponentAttributes::FIBER_LC; |
| 787 | const PortComponentAttributes_ConnectorType PortComponentAttributes::FIBER_SC_PC; |
| 788 | const PortComponentAttributes_ConnectorType PortComponentAttributes::FIBER_MPO; |
| 789 | const PortComponentAttributes_ConnectorType PortComponentAttributes::RS232; |
| 790 | const PortComponentAttributes_ConnectorType PortComponentAttributes::ConnectorType_MIN; |
| 791 | const PortComponentAttributes_ConnectorType PortComponentAttributes::ConnectorType_MAX; |
| 792 | const int PortComponentAttributes::ConnectorType_ARRAYSIZE; |
| 793 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 794 | const ::google::protobuf::EnumDescriptor* PortComponentAttributes_Speed_descriptor() { |
| 795 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 796 | return file_level_enum_descriptors_dmi_2fhw_2eproto[1]; |
| 797 | } |
| 798 | bool PortComponentAttributes_Speed_IsValid(int value) { |
| 799 | switch (value) { |
| 800 | case 0: |
| 801 | case 1: |
| 802 | case 2: |
| 803 | case 3: |
| 804 | case 4: |
| 805 | case 5: |
| 806 | case 6: |
| 807 | case 7: |
| 808 | case 8: |
| 809 | case 9: |
| 810 | return true; |
| 811 | default: |
| 812 | return false; |
| 813 | } |
| 814 | } |
| 815 | |
| 816 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 817 | const PortComponentAttributes_Speed PortComponentAttributes::SPEED_UNDEFINED; |
| 818 | const PortComponentAttributes_Speed PortComponentAttributes::DYNAMIC; |
| 819 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_1; |
| 820 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_10; |
| 821 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_25; |
| 822 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_40; |
| 823 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_100; |
| 824 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_400; |
| 825 | const PortComponentAttributes_Speed PortComponentAttributes::MEGABIT_2500; |
| 826 | const PortComponentAttributes_Speed PortComponentAttributes::MEGABIT_1250; |
| 827 | const PortComponentAttributes_Speed PortComponentAttributes::Speed_MIN; |
| 828 | const PortComponentAttributes_Speed PortComponentAttributes::Speed_MAX; |
| 829 | const int PortComponentAttributes::Speed_ARRAYSIZE; |
| 830 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 831 | const ::google::protobuf::EnumDescriptor* PortComponentAttributes_Protocol_descriptor() { |
| 832 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 833 | return file_level_enum_descriptors_dmi_2fhw_2eproto[2]; |
| 834 | } |
| 835 | bool PortComponentAttributes_Protocol_IsValid(int value) { |
| 836 | switch (value) { |
| 837 | case 0: |
| 838 | case 1: |
| 839 | case 2: |
| 840 | case 3: |
| 841 | case 4: |
| 842 | case 5: |
| 843 | case 6: |
| 844 | case 7: |
| 845 | case 8: |
| 846 | return true; |
| 847 | default: |
| 848 | return false; |
| 849 | } |
| 850 | } |
| 851 | |
| 852 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 853 | const PortComponentAttributes_Protocol PortComponentAttributes::PROTOCOL_UNDEFINED; |
| 854 | const PortComponentAttributes_Protocol PortComponentAttributes::ETHERNET; |
| 855 | const PortComponentAttributes_Protocol PortComponentAttributes::GPON; |
| 856 | const PortComponentAttributes_Protocol PortComponentAttributes::XGPON; |
| 857 | const PortComponentAttributes_Protocol PortComponentAttributes::XGSPON; |
| 858 | const PortComponentAttributes_Protocol PortComponentAttributes::GFAST; |
| 859 | const PortComponentAttributes_Protocol PortComponentAttributes::SERIAL; |
| 860 | const PortComponentAttributes_Protocol PortComponentAttributes::EPON; |
| 861 | const PortComponentAttributes_Protocol PortComponentAttributes::BITS; |
| 862 | const PortComponentAttributes_Protocol PortComponentAttributes::Protocol_MIN; |
| 863 | const PortComponentAttributes_Protocol PortComponentAttributes::Protocol_MAX; |
| 864 | const int PortComponentAttributes::Protocol_ARRAYSIZE; |
| 865 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 866 | const ::google::protobuf::EnumDescriptor* PsuComponentAttributes_SupportedVoltage_descriptor() { |
| 867 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 868 | return file_level_enum_descriptors_dmi_2fhw_2eproto[3]; |
| 869 | } |
| 870 | bool PsuComponentAttributes_SupportedVoltage_IsValid(int value) { |
| 871 | switch (value) { |
| 872 | case 0: |
| 873 | case 1: |
| 874 | case 2: |
| 875 | case 3: |
| 876 | return true; |
| 877 | default: |
| 878 | return false; |
| 879 | } |
| 880 | } |
| 881 | |
| 882 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 883 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::SUPPORTED_VOLTAGE_UNDEFINED; |
| 884 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::V48; |
| 885 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::V230; |
| 886 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::V115; |
| 887 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::SupportedVoltage_MIN; |
| 888 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::SupportedVoltage_MAX; |
| 889 | const int PsuComponentAttributes::SupportedVoltage_ARRAYSIZE; |
| 890 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 891 | const ::google::protobuf::EnumDescriptor* TransceiverComponentsAttributes_FormFactor_descriptor() { |
| 892 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 893 | return file_level_enum_descriptors_dmi_2fhw_2eproto[4]; |
| 894 | } |
| 895 | bool TransceiverComponentsAttributes_FormFactor_IsValid(int value) { |
| 896 | switch (value) { |
| 897 | case 0: |
| 898 | case 1: |
| 899 | case 2: |
| 900 | case 3: |
| 901 | case 4: |
| 902 | case 5: |
| 903 | case 6: |
| 904 | case 7: |
| 905 | case 8: |
| 906 | case 9: |
| 907 | case 10: |
| 908 | case 11: |
| 909 | case 12: |
| 910 | case 13: |
| 911 | case 14: |
| 912 | return true; |
| 913 | default: |
| 914 | return false; |
| 915 | } |
| 916 | } |
| 917 | |
| 918 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 919 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::FORM_FACTOR_UNKNOWN; |
| 920 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::QSFP; |
| 921 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::QSFP_PLUS; |
| 922 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::QSFP28; |
| 923 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::SFP; |
| 924 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::SFP_PLUS; |
| 925 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::XFP; |
| 926 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CFP4; |
| 927 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CFP2; |
| 928 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CPAK; |
| 929 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::X2; |
| 930 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::OTHER; |
| 931 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CFP; |
| 932 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CFP2_ACO; |
| 933 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CFP2_DCO; |
| 934 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::FormFactor_MIN; |
| 935 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::FormFactor_MAX; |
| 936 | const int TransceiverComponentsAttributes::FormFactor_ARRAYSIZE; |
| 937 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 938 | const ::google::protobuf::EnumDescriptor* ComponentType_descriptor() { |
| 939 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 940 | return file_level_enum_descriptors_dmi_2fhw_2eproto[5]; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 941 | } |
| 942 | bool ComponentType_IsValid(int value) { |
| 943 | switch (value) { |
| 944 | case 0: |
| 945 | case 1: |
| 946 | case 2: |
| 947 | case 3: |
| 948 | case 4: |
| 949 | case 5: |
| 950 | case 6: |
| 951 | case 7: |
| 952 | case 8: |
| 953 | case 9: |
| 954 | case 10: |
| 955 | case 11: |
| 956 | case 12: |
| 957 | case 13: |
| 958 | case 14: |
| 959 | return true; |
| 960 | default: |
| 961 | return false; |
| 962 | } |
| 963 | } |
| 964 | |
| 965 | const ::google::protobuf::EnumDescriptor* ComponentAdminState_descriptor() { |
| 966 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 967 | return file_level_enum_descriptors_dmi_2fhw_2eproto[6]; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 968 | } |
| 969 | bool ComponentAdminState_IsValid(int value) { |
| 970 | switch (value) { |
| 971 | case 0: |
| 972 | case 1: |
| 973 | case 2: |
| 974 | case 3: |
| 975 | case 4: |
| 976 | return true; |
| 977 | default: |
| 978 | return false; |
| 979 | } |
| 980 | } |
| 981 | |
| 982 | const ::google::protobuf::EnumDescriptor* ComponentOperState_descriptor() { |
| 983 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 984 | return file_level_enum_descriptors_dmi_2fhw_2eproto[7]; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 985 | } |
| 986 | bool ComponentOperState_IsValid(int value) { |
| 987 | switch (value) { |
| 988 | case 0: |
| 989 | case 1: |
| 990 | case 2: |
| 991 | case 3: |
| 992 | case 4: |
| 993 | return true; |
| 994 | default: |
| 995 | return false; |
| 996 | } |
| 997 | } |
| 998 | |
| 999 | const ::google::protobuf::EnumDescriptor* ComponentUsageState_descriptor() { |
| 1000 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 1001 | return file_level_enum_descriptors_dmi_2fhw_2eproto[8]; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 1002 | } |
| 1003 | bool ComponentUsageState_IsValid(int value) { |
| 1004 | switch (value) { |
| 1005 | case 0: |
| 1006 | case 1: |
| 1007 | case 2: |
| 1008 | case 3: |
| 1009 | case 4: |
| 1010 | return true; |
| 1011 | default: |
| 1012 | return false; |
| 1013 | } |
| 1014 | } |
| 1015 | |
| 1016 | const ::google::protobuf::EnumDescriptor* ComponentAlarmState_descriptor() { |
| 1017 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 1018 | return file_level_enum_descriptors_dmi_2fhw_2eproto[9]; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 1019 | } |
| 1020 | bool ComponentAlarmState_IsValid(int value) { |
| 1021 | switch (value) { |
| 1022 | case 0: |
| 1023 | case 1: |
| 1024 | case 2: |
| 1025 | case 3: |
| 1026 | case 4: |
| 1027 | case 5: |
| 1028 | case 6: |
| 1029 | case 7: |
| 1030 | return true; |
| 1031 | default: |
| 1032 | return false; |
| 1033 | } |
| 1034 | } |
| 1035 | |
| 1036 | const ::google::protobuf::EnumDescriptor* ComponentStandbyState_descriptor() { |
| 1037 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 1038 | return file_level_enum_descriptors_dmi_2fhw_2eproto[10]; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 1039 | } |
| 1040 | bool ComponentStandbyState_IsValid(int value) { |
| 1041 | switch (value) { |
| 1042 | case 0: |
| 1043 | case 1: |
| 1044 | case 2: |
| 1045 | case 3: |
| 1046 | case 4: |
| 1047 | return true; |
| 1048 | default: |
| 1049 | return false; |
| 1050 | } |
| 1051 | } |
| 1052 | |
| 1053 | const ::google::protobuf::EnumDescriptor* DataValueType_descriptor() { |
| 1054 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 1055 | return file_level_enum_descriptors_dmi_2fhw_2eproto[11]; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 1056 | } |
| 1057 | bool DataValueType_IsValid(int value) { |
| 1058 | switch (value) { |
| 1059 | case 0: |
| 1060 | case 1: |
| 1061 | case 2: |
| 1062 | case 3: |
| 1063 | case 4: |
| 1064 | case 5: |
| 1065 | case 6: |
| 1066 | case 7: |
| 1067 | case 8: |
| 1068 | case 9: |
| 1069 | case 10: |
| 1070 | case 11: |
| 1071 | case 12: |
| 1072 | case 13: |
| 1073 | case 14: |
| 1074 | case 15: |
amit.ghosh | 93921ec | 2022-09-08 17:22:40 +0200 | [diff] [blame] | 1075 | case 16: |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 1076 | return true; |
| 1077 | default: |
| 1078 | return false; |
| 1079 | } |
| 1080 | } |
| 1081 | |
| 1082 | const ::google::protobuf::EnumDescriptor* ValueScale_descriptor() { |
| 1083 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 1084 | return file_level_enum_descriptors_dmi_2fhw_2eproto[12]; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 1085 | } |
| 1086 | bool ValueScale_IsValid(int value) { |
| 1087 | switch (value) { |
| 1088 | case 0: |
| 1089 | case 1: |
| 1090 | case 2: |
| 1091 | case 3: |
| 1092 | case 4: |
| 1093 | case 5: |
| 1094 | case 6: |
| 1095 | case 7: |
| 1096 | case 8: |
| 1097 | case 9: |
| 1098 | case 10: |
| 1099 | case 11: |
| 1100 | case 12: |
| 1101 | case 13: |
| 1102 | case 14: |
| 1103 | case 15: |
| 1104 | case 16: |
| 1105 | case 17: |
| 1106 | return true; |
| 1107 | default: |
| 1108 | return false; |
| 1109 | } |
| 1110 | } |
| 1111 | |
| 1112 | const ::google::protobuf::EnumDescriptor* SensorStatus_descriptor() { |
| 1113 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 1114 | return file_level_enum_descriptors_dmi_2fhw_2eproto[13]; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 1115 | } |
| 1116 | bool SensorStatus_IsValid(int value) { |
| 1117 | switch (value) { |
| 1118 | case 0: |
| 1119 | case 1: |
| 1120 | case 2: |
| 1121 | case 3: |
| 1122 | return true; |
| 1123 | default: |
| 1124 | return false; |
| 1125 | } |
| 1126 | } |
| 1127 | |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 1128 | const ::google::protobuf::EnumDescriptor* TransceiverType_descriptor() { |
| 1129 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 1130 | return file_level_enum_descriptors_dmi_2fhw_2eproto[14]; |
| 1131 | } |
| 1132 | bool TransceiverType_IsValid(int value) { |
| 1133 | switch (value) { |
| 1134 | case 0: |
| 1135 | case 1: |
| 1136 | case 2: |
| 1137 | case 3: |
| 1138 | case 4: |
| 1139 | case 5: |
| 1140 | case 6: |
| 1141 | case 7: |
amit.ghosh | ecfad5d | 2022-03-17 13:37:14 +0100 | [diff] [blame] | 1142 | case 8: |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 1143 | case 255: |
| 1144 | return true; |
| 1145 | default: |
| 1146 | return false; |
| 1147 | } |
| 1148 | } |
| 1149 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 1150 | |
| 1151 | // =================================================================== |
| 1152 | |
| 1153 | void Uuid::InitAsDefaultInstance() { |
| 1154 | } |
| 1155 | class Uuid::HasBitSetters { |
| 1156 | public: |
| 1157 | }; |
| 1158 | |
| 1159 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1160 | const int Uuid::kUuidFieldNumber; |
| 1161 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1162 | |
| 1163 | Uuid::Uuid() |
| 1164 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 1165 | SharedCtor(); |
| 1166 | // @@protoc_insertion_point(constructor:dmi.Uuid) |
| 1167 | } |
| 1168 | Uuid::Uuid(const Uuid& from) |
| 1169 | : ::google::protobuf::Message(), |
| 1170 | _internal_metadata_(nullptr) { |
| 1171 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1172 | uuid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1173 | if (from.uuid().size() > 0) { |
| 1174 | uuid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.uuid_); |
| 1175 | } |
| 1176 | // @@protoc_insertion_point(copy_constructor:dmi.Uuid) |
| 1177 | } |
| 1178 | |
| 1179 | void Uuid::SharedCtor() { |
| 1180 | ::google::protobuf::internal::InitSCC( |
| 1181 | &scc_info_Uuid_dmi_2fhw_2eproto.base); |
| 1182 | uuid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1183 | } |
| 1184 | |
| 1185 | Uuid::~Uuid() { |
| 1186 | // @@protoc_insertion_point(destructor:dmi.Uuid) |
| 1187 | SharedDtor(); |
| 1188 | } |
| 1189 | |
| 1190 | void Uuid::SharedDtor() { |
| 1191 | uuid_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1192 | } |
| 1193 | |
| 1194 | void Uuid::SetCachedSize(int size) const { |
| 1195 | _cached_size_.Set(size); |
| 1196 | } |
| 1197 | const Uuid& Uuid::default_instance() { |
| 1198 | ::google::protobuf::internal::InitSCC(&::scc_info_Uuid_dmi_2fhw_2eproto.base); |
| 1199 | return *internal_default_instance(); |
| 1200 | } |
| 1201 | |
| 1202 | |
| 1203 | void Uuid::Clear() { |
| 1204 | // @@protoc_insertion_point(message_clear_start:dmi.Uuid) |
| 1205 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1206 | // Prevent compiler warnings about cached_has_bits being unused |
| 1207 | (void) cached_has_bits; |
| 1208 | |
| 1209 | uuid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1210 | _internal_metadata_.Clear(); |
| 1211 | } |
| 1212 | |
| 1213 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1214 | const char* Uuid::_InternalParse(const char* begin, const char* end, void* object, |
| 1215 | ::google::protobuf::internal::ParseContext* ctx) { |
| 1216 | auto msg = static_cast<Uuid*>(object); |
| 1217 | ::google::protobuf::int32 size; (void)size; |
| 1218 | int depth; (void)depth; |
| 1219 | ::google::protobuf::uint32 tag; |
| 1220 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 1221 | auto ptr = begin; |
| 1222 | while (ptr < end) { |
| 1223 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 1224 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1225 | switch (tag >> 3) { |
| 1226 | // string uuid = 1; |
| 1227 | case 1: { |
| 1228 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 1229 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 1230 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1231 | ctx->extra_parse_data().SetFieldName("dmi.Uuid.uuid"); |
| 1232 | object = msg->mutable_uuid(); |
| 1233 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 1234 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 1235 | goto string_till_end; |
| 1236 | } |
| 1237 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 1238 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 1239 | ptr += size; |
| 1240 | break; |
| 1241 | } |
| 1242 | default: { |
| 1243 | handle_unusual: |
| 1244 | if ((tag & 7) == 4 || tag == 0) { |
| 1245 | ctx->EndGroup(tag); |
| 1246 | return ptr; |
| 1247 | } |
| 1248 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 1249 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 1250 | ptr = res.first; |
| 1251 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 1252 | if (res.second) return ptr; |
| 1253 | } |
| 1254 | } // switch |
| 1255 | } // while |
| 1256 | return ptr; |
| 1257 | string_till_end: |
| 1258 | static_cast<::std::string*>(object)->clear(); |
| 1259 | static_cast<::std::string*>(object)->reserve(size); |
| 1260 | goto len_delim_till_end; |
| 1261 | len_delim_till_end: |
| 1262 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 1263 | {parser_till_end, object}, size); |
| 1264 | } |
| 1265 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1266 | bool Uuid::MergePartialFromCodedStream( |
| 1267 | ::google::protobuf::io::CodedInputStream* input) { |
| 1268 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 1269 | ::google::protobuf::uint32 tag; |
| 1270 | // @@protoc_insertion_point(parse_start:dmi.Uuid) |
| 1271 | for (;;) { |
| 1272 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 1273 | tag = p.first; |
| 1274 | if (!p.second) goto handle_unusual; |
| 1275 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 1276 | // string uuid = 1; |
| 1277 | case 1: { |
| 1278 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 1279 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1280 | input, this->mutable_uuid())); |
| 1281 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1282 | this->uuid().data(), static_cast<int>(this->uuid().length()), |
| 1283 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 1284 | "dmi.Uuid.uuid")); |
| 1285 | } else { |
| 1286 | goto handle_unusual; |
| 1287 | } |
| 1288 | break; |
| 1289 | } |
| 1290 | |
| 1291 | default: { |
| 1292 | handle_unusual: |
| 1293 | if (tag == 0) { |
| 1294 | goto success; |
| 1295 | } |
| 1296 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 1297 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 1298 | break; |
| 1299 | } |
| 1300 | } |
| 1301 | } |
| 1302 | success: |
| 1303 | // @@protoc_insertion_point(parse_success:dmi.Uuid) |
| 1304 | return true; |
| 1305 | failure: |
| 1306 | // @@protoc_insertion_point(parse_failure:dmi.Uuid) |
| 1307 | return false; |
| 1308 | #undef DO_ |
| 1309 | } |
| 1310 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1311 | |
| 1312 | void Uuid::SerializeWithCachedSizes( |
| 1313 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 1314 | // @@protoc_insertion_point(serialize_start:dmi.Uuid) |
| 1315 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1316 | (void) cached_has_bits; |
| 1317 | |
| 1318 | // string uuid = 1; |
| 1319 | if (this->uuid().size() > 0) { |
| 1320 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1321 | this->uuid().data(), static_cast<int>(this->uuid().length()), |
| 1322 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1323 | "dmi.Uuid.uuid"); |
| 1324 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1325 | 1, this->uuid(), output); |
| 1326 | } |
| 1327 | |
| 1328 | if (_internal_metadata_.have_unknown_fields()) { |
| 1329 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 1330 | _internal_metadata_.unknown_fields(), output); |
| 1331 | } |
| 1332 | // @@protoc_insertion_point(serialize_end:dmi.Uuid) |
| 1333 | } |
| 1334 | |
| 1335 | ::google::protobuf::uint8* Uuid::InternalSerializeWithCachedSizesToArray( |
| 1336 | ::google::protobuf::uint8* target) const { |
| 1337 | // @@protoc_insertion_point(serialize_to_array_start:dmi.Uuid) |
| 1338 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1339 | (void) cached_has_bits; |
| 1340 | |
| 1341 | // string uuid = 1; |
| 1342 | if (this->uuid().size() > 0) { |
| 1343 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1344 | this->uuid().data(), static_cast<int>(this->uuid().length()), |
| 1345 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1346 | "dmi.Uuid.uuid"); |
| 1347 | target = |
| 1348 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1349 | 1, this->uuid(), target); |
| 1350 | } |
| 1351 | |
| 1352 | if (_internal_metadata_.have_unknown_fields()) { |
| 1353 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 1354 | _internal_metadata_.unknown_fields(), target); |
| 1355 | } |
| 1356 | // @@protoc_insertion_point(serialize_to_array_end:dmi.Uuid) |
| 1357 | return target; |
| 1358 | } |
| 1359 | |
| 1360 | size_t Uuid::ByteSizeLong() const { |
| 1361 | // @@protoc_insertion_point(message_byte_size_start:dmi.Uuid) |
| 1362 | size_t total_size = 0; |
| 1363 | |
| 1364 | if (_internal_metadata_.have_unknown_fields()) { |
| 1365 | total_size += |
| 1366 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 1367 | _internal_metadata_.unknown_fields()); |
| 1368 | } |
| 1369 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1370 | // Prevent compiler warnings about cached_has_bits being unused |
| 1371 | (void) cached_has_bits; |
| 1372 | |
| 1373 | // string uuid = 1; |
| 1374 | if (this->uuid().size() > 0) { |
| 1375 | total_size += 1 + |
| 1376 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1377 | this->uuid()); |
| 1378 | } |
| 1379 | |
| 1380 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 1381 | SetCachedSize(cached_size); |
| 1382 | return total_size; |
| 1383 | } |
| 1384 | |
| 1385 | void Uuid::MergeFrom(const ::google::protobuf::Message& from) { |
| 1386 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.Uuid) |
| 1387 | GOOGLE_DCHECK_NE(&from, this); |
| 1388 | const Uuid* source = |
| 1389 | ::google::protobuf::DynamicCastToGenerated<Uuid>( |
| 1390 | &from); |
| 1391 | if (source == nullptr) { |
| 1392 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.Uuid) |
| 1393 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 1394 | } else { |
| 1395 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.Uuid) |
| 1396 | MergeFrom(*source); |
| 1397 | } |
| 1398 | } |
| 1399 | |
| 1400 | void Uuid::MergeFrom(const Uuid& from) { |
| 1401 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.Uuid) |
| 1402 | GOOGLE_DCHECK_NE(&from, this); |
| 1403 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1404 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1405 | (void) cached_has_bits; |
| 1406 | |
| 1407 | if (from.uuid().size() > 0) { |
| 1408 | |
| 1409 | uuid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.uuid_); |
| 1410 | } |
| 1411 | } |
| 1412 | |
| 1413 | void Uuid::CopyFrom(const ::google::protobuf::Message& from) { |
| 1414 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.Uuid) |
| 1415 | if (&from == this) return; |
| 1416 | Clear(); |
| 1417 | MergeFrom(from); |
| 1418 | } |
| 1419 | |
| 1420 | void Uuid::CopyFrom(const Uuid& from) { |
| 1421 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.Uuid) |
| 1422 | if (&from == this) return; |
| 1423 | Clear(); |
| 1424 | MergeFrom(from); |
| 1425 | } |
| 1426 | |
| 1427 | bool Uuid::IsInitialized() const { |
| 1428 | return true; |
| 1429 | } |
| 1430 | |
| 1431 | void Uuid::Swap(Uuid* other) { |
| 1432 | if (other == this) return; |
| 1433 | InternalSwap(other); |
| 1434 | } |
| 1435 | void Uuid::InternalSwap(Uuid* other) { |
| 1436 | using std::swap; |
| 1437 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 1438 | uuid_.Swap(&other->uuid_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 1439 | GetArenaNoVirtual()); |
| 1440 | } |
| 1441 | |
| 1442 | ::google::protobuf::Metadata Uuid::GetMetadata() const { |
| 1443 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 1444 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 1445 | } |
| 1446 | |
| 1447 | |
| 1448 | // =================================================================== |
| 1449 | |
| 1450 | void HardwareID::InitAsDefaultInstance() { |
| 1451 | ::dmi::_HardwareID_default_instance_._instance.get_mutable()->uuid_ = const_cast< ::dmi::Uuid*>( |
| 1452 | ::dmi::Uuid::internal_default_instance()); |
| 1453 | } |
| 1454 | class HardwareID::HasBitSetters { |
| 1455 | public: |
| 1456 | static const ::dmi::Uuid& uuid(const HardwareID* msg); |
| 1457 | }; |
| 1458 | |
| 1459 | const ::dmi::Uuid& |
| 1460 | HardwareID::HasBitSetters::uuid(const HardwareID* msg) { |
| 1461 | return *msg->uuid_; |
| 1462 | } |
| 1463 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1464 | const int HardwareID::kUuidFieldNumber; |
| 1465 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1466 | |
| 1467 | HardwareID::HardwareID() |
| 1468 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 1469 | SharedCtor(); |
| 1470 | // @@protoc_insertion_point(constructor:dmi.HardwareID) |
| 1471 | } |
| 1472 | HardwareID::HardwareID(const HardwareID& from) |
| 1473 | : ::google::protobuf::Message(), |
| 1474 | _internal_metadata_(nullptr) { |
| 1475 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1476 | if (from.has_uuid()) { |
| 1477 | uuid_ = new ::dmi::Uuid(*from.uuid_); |
| 1478 | } else { |
| 1479 | uuid_ = nullptr; |
| 1480 | } |
| 1481 | // @@protoc_insertion_point(copy_constructor:dmi.HardwareID) |
| 1482 | } |
| 1483 | |
| 1484 | void HardwareID::SharedCtor() { |
| 1485 | ::google::protobuf::internal::InitSCC( |
| 1486 | &scc_info_HardwareID_dmi_2fhw_2eproto.base); |
| 1487 | uuid_ = nullptr; |
| 1488 | } |
| 1489 | |
| 1490 | HardwareID::~HardwareID() { |
| 1491 | // @@protoc_insertion_point(destructor:dmi.HardwareID) |
| 1492 | SharedDtor(); |
| 1493 | } |
| 1494 | |
| 1495 | void HardwareID::SharedDtor() { |
| 1496 | if (this != internal_default_instance()) delete uuid_; |
| 1497 | } |
| 1498 | |
| 1499 | void HardwareID::SetCachedSize(int size) const { |
| 1500 | _cached_size_.Set(size); |
| 1501 | } |
| 1502 | const HardwareID& HardwareID::default_instance() { |
| 1503 | ::google::protobuf::internal::InitSCC(&::scc_info_HardwareID_dmi_2fhw_2eproto.base); |
| 1504 | return *internal_default_instance(); |
| 1505 | } |
| 1506 | |
| 1507 | |
| 1508 | void HardwareID::Clear() { |
| 1509 | // @@protoc_insertion_point(message_clear_start:dmi.HardwareID) |
| 1510 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1511 | // Prevent compiler warnings about cached_has_bits being unused |
| 1512 | (void) cached_has_bits; |
| 1513 | |
| 1514 | if (GetArenaNoVirtual() == nullptr && uuid_ != nullptr) { |
| 1515 | delete uuid_; |
| 1516 | } |
| 1517 | uuid_ = nullptr; |
| 1518 | _internal_metadata_.Clear(); |
| 1519 | } |
| 1520 | |
| 1521 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1522 | const char* HardwareID::_InternalParse(const char* begin, const char* end, void* object, |
| 1523 | ::google::protobuf::internal::ParseContext* ctx) { |
| 1524 | auto msg = static_cast<HardwareID*>(object); |
| 1525 | ::google::protobuf::int32 size; (void)size; |
| 1526 | int depth; (void)depth; |
| 1527 | ::google::protobuf::uint32 tag; |
| 1528 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 1529 | auto ptr = begin; |
| 1530 | while (ptr < end) { |
| 1531 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 1532 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1533 | switch (tag >> 3) { |
| 1534 | // .dmi.Uuid uuid = 1; |
| 1535 | case 1: { |
| 1536 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 1537 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 1538 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1539 | parser_till_end = ::dmi::Uuid::_InternalParse; |
| 1540 | object = msg->mutable_uuid(); |
| 1541 | if (size > end - ptr) goto len_delim_till_end; |
| 1542 | ptr += size; |
| 1543 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 1544 | {parser_till_end, object}, ptr - size, ptr)); |
| 1545 | break; |
| 1546 | } |
| 1547 | default: { |
| 1548 | handle_unusual: |
| 1549 | if ((tag & 7) == 4 || tag == 0) { |
| 1550 | ctx->EndGroup(tag); |
| 1551 | return ptr; |
| 1552 | } |
| 1553 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 1554 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 1555 | ptr = res.first; |
| 1556 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 1557 | if (res.second) return ptr; |
| 1558 | } |
| 1559 | } // switch |
| 1560 | } // while |
| 1561 | return ptr; |
| 1562 | len_delim_till_end: |
| 1563 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 1564 | {parser_till_end, object}, size); |
| 1565 | } |
| 1566 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1567 | bool HardwareID::MergePartialFromCodedStream( |
| 1568 | ::google::protobuf::io::CodedInputStream* input) { |
| 1569 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 1570 | ::google::protobuf::uint32 tag; |
| 1571 | // @@protoc_insertion_point(parse_start:dmi.HardwareID) |
| 1572 | for (;;) { |
| 1573 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 1574 | tag = p.first; |
| 1575 | if (!p.second) goto handle_unusual; |
| 1576 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 1577 | // .dmi.Uuid uuid = 1; |
| 1578 | case 1: { |
| 1579 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 1580 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 1581 | input, mutable_uuid())); |
| 1582 | } else { |
| 1583 | goto handle_unusual; |
| 1584 | } |
| 1585 | break; |
| 1586 | } |
| 1587 | |
| 1588 | default: { |
| 1589 | handle_unusual: |
| 1590 | if (tag == 0) { |
| 1591 | goto success; |
| 1592 | } |
| 1593 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 1594 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 1595 | break; |
| 1596 | } |
| 1597 | } |
| 1598 | } |
| 1599 | success: |
| 1600 | // @@protoc_insertion_point(parse_success:dmi.HardwareID) |
| 1601 | return true; |
| 1602 | failure: |
| 1603 | // @@protoc_insertion_point(parse_failure:dmi.HardwareID) |
| 1604 | return false; |
| 1605 | #undef DO_ |
| 1606 | } |
| 1607 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1608 | |
| 1609 | void HardwareID::SerializeWithCachedSizes( |
| 1610 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 1611 | // @@protoc_insertion_point(serialize_start:dmi.HardwareID) |
| 1612 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1613 | (void) cached_has_bits; |
| 1614 | |
| 1615 | // .dmi.Uuid uuid = 1; |
| 1616 | if (this->has_uuid()) { |
| 1617 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 1618 | 1, HasBitSetters::uuid(this), output); |
| 1619 | } |
| 1620 | |
| 1621 | if (_internal_metadata_.have_unknown_fields()) { |
| 1622 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 1623 | _internal_metadata_.unknown_fields(), output); |
| 1624 | } |
| 1625 | // @@protoc_insertion_point(serialize_end:dmi.HardwareID) |
| 1626 | } |
| 1627 | |
| 1628 | ::google::protobuf::uint8* HardwareID::InternalSerializeWithCachedSizesToArray( |
| 1629 | ::google::protobuf::uint8* target) const { |
| 1630 | // @@protoc_insertion_point(serialize_to_array_start:dmi.HardwareID) |
| 1631 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1632 | (void) cached_has_bits; |
| 1633 | |
| 1634 | // .dmi.Uuid uuid = 1; |
| 1635 | if (this->has_uuid()) { |
| 1636 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1637 | InternalWriteMessageToArray( |
| 1638 | 1, HasBitSetters::uuid(this), target); |
| 1639 | } |
| 1640 | |
| 1641 | if (_internal_metadata_.have_unknown_fields()) { |
| 1642 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 1643 | _internal_metadata_.unknown_fields(), target); |
| 1644 | } |
| 1645 | // @@protoc_insertion_point(serialize_to_array_end:dmi.HardwareID) |
| 1646 | return target; |
| 1647 | } |
| 1648 | |
| 1649 | size_t HardwareID::ByteSizeLong() const { |
| 1650 | // @@protoc_insertion_point(message_byte_size_start:dmi.HardwareID) |
| 1651 | size_t total_size = 0; |
| 1652 | |
| 1653 | if (_internal_metadata_.have_unknown_fields()) { |
| 1654 | total_size += |
| 1655 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 1656 | _internal_metadata_.unknown_fields()); |
| 1657 | } |
| 1658 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1659 | // Prevent compiler warnings about cached_has_bits being unused |
| 1660 | (void) cached_has_bits; |
| 1661 | |
| 1662 | // .dmi.Uuid uuid = 1; |
| 1663 | if (this->has_uuid()) { |
| 1664 | total_size += 1 + |
| 1665 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 1666 | *uuid_); |
| 1667 | } |
| 1668 | |
| 1669 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 1670 | SetCachedSize(cached_size); |
| 1671 | return total_size; |
| 1672 | } |
| 1673 | |
| 1674 | void HardwareID::MergeFrom(const ::google::protobuf::Message& from) { |
| 1675 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.HardwareID) |
| 1676 | GOOGLE_DCHECK_NE(&from, this); |
| 1677 | const HardwareID* source = |
| 1678 | ::google::protobuf::DynamicCastToGenerated<HardwareID>( |
| 1679 | &from); |
| 1680 | if (source == nullptr) { |
| 1681 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.HardwareID) |
| 1682 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 1683 | } else { |
| 1684 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.HardwareID) |
| 1685 | MergeFrom(*source); |
| 1686 | } |
| 1687 | } |
| 1688 | |
| 1689 | void HardwareID::MergeFrom(const HardwareID& from) { |
| 1690 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.HardwareID) |
| 1691 | GOOGLE_DCHECK_NE(&from, this); |
| 1692 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1693 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1694 | (void) cached_has_bits; |
| 1695 | |
| 1696 | if (from.has_uuid()) { |
| 1697 | mutable_uuid()->::dmi::Uuid::MergeFrom(from.uuid()); |
| 1698 | } |
| 1699 | } |
| 1700 | |
| 1701 | void HardwareID::CopyFrom(const ::google::protobuf::Message& from) { |
| 1702 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.HardwareID) |
| 1703 | if (&from == this) return; |
| 1704 | Clear(); |
| 1705 | MergeFrom(from); |
| 1706 | } |
| 1707 | |
| 1708 | void HardwareID::CopyFrom(const HardwareID& from) { |
| 1709 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.HardwareID) |
| 1710 | if (&from == this) return; |
| 1711 | Clear(); |
| 1712 | MergeFrom(from); |
| 1713 | } |
| 1714 | |
| 1715 | bool HardwareID::IsInitialized() const { |
| 1716 | return true; |
| 1717 | } |
| 1718 | |
| 1719 | void HardwareID::Swap(HardwareID* other) { |
| 1720 | if (other == this) return; |
| 1721 | InternalSwap(other); |
| 1722 | } |
| 1723 | void HardwareID::InternalSwap(HardwareID* other) { |
| 1724 | using std::swap; |
| 1725 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 1726 | swap(uuid_, other->uuid_); |
| 1727 | } |
| 1728 | |
| 1729 | ::google::protobuf::Metadata HardwareID::GetMetadata() const { |
| 1730 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 1731 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 1732 | } |
| 1733 | |
| 1734 | |
| 1735 | // =================================================================== |
| 1736 | |
| 1737 | void Uri::InitAsDefaultInstance() { |
| 1738 | } |
| 1739 | class Uri::HasBitSetters { |
| 1740 | public: |
| 1741 | }; |
| 1742 | |
| 1743 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1744 | const int Uri::kUriFieldNumber; |
| 1745 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1746 | |
| 1747 | Uri::Uri() |
| 1748 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 1749 | SharedCtor(); |
| 1750 | // @@protoc_insertion_point(constructor:dmi.Uri) |
| 1751 | } |
| 1752 | Uri::Uri(const Uri& from) |
| 1753 | : ::google::protobuf::Message(), |
| 1754 | _internal_metadata_(nullptr) { |
| 1755 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1756 | uri_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1757 | if (from.uri().size() > 0) { |
| 1758 | uri_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.uri_); |
| 1759 | } |
| 1760 | // @@protoc_insertion_point(copy_constructor:dmi.Uri) |
| 1761 | } |
| 1762 | |
| 1763 | void Uri::SharedCtor() { |
| 1764 | ::google::protobuf::internal::InitSCC( |
| 1765 | &scc_info_Uri_dmi_2fhw_2eproto.base); |
| 1766 | uri_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1767 | } |
| 1768 | |
| 1769 | Uri::~Uri() { |
| 1770 | // @@protoc_insertion_point(destructor:dmi.Uri) |
| 1771 | SharedDtor(); |
| 1772 | } |
| 1773 | |
| 1774 | void Uri::SharedDtor() { |
| 1775 | uri_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1776 | } |
| 1777 | |
| 1778 | void Uri::SetCachedSize(int size) const { |
| 1779 | _cached_size_.Set(size); |
| 1780 | } |
| 1781 | const Uri& Uri::default_instance() { |
| 1782 | ::google::protobuf::internal::InitSCC(&::scc_info_Uri_dmi_2fhw_2eproto.base); |
| 1783 | return *internal_default_instance(); |
| 1784 | } |
| 1785 | |
| 1786 | |
| 1787 | void Uri::Clear() { |
| 1788 | // @@protoc_insertion_point(message_clear_start:dmi.Uri) |
| 1789 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1790 | // Prevent compiler warnings about cached_has_bits being unused |
| 1791 | (void) cached_has_bits; |
| 1792 | |
| 1793 | uri_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1794 | _internal_metadata_.Clear(); |
| 1795 | } |
| 1796 | |
| 1797 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1798 | const char* Uri::_InternalParse(const char* begin, const char* end, void* object, |
| 1799 | ::google::protobuf::internal::ParseContext* ctx) { |
| 1800 | auto msg = static_cast<Uri*>(object); |
| 1801 | ::google::protobuf::int32 size; (void)size; |
| 1802 | int depth; (void)depth; |
| 1803 | ::google::protobuf::uint32 tag; |
| 1804 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 1805 | auto ptr = begin; |
| 1806 | while (ptr < end) { |
| 1807 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 1808 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1809 | switch (tag >> 3) { |
| 1810 | // string uri = 1; |
| 1811 | case 1: { |
| 1812 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 1813 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 1814 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1815 | ctx->extra_parse_data().SetFieldName("dmi.Uri.uri"); |
| 1816 | object = msg->mutable_uri(); |
| 1817 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 1818 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 1819 | goto string_till_end; |
| 1820 | } |
| 1821 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 1822 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 1823 | ptr += size; |
| 1824 | break; |
| 1825 | } |
| 1826 | default: { |
| 1827 | handle_unusual: |
| 1828 | if ((tag & 7) == 4 || tag == 0) { |
| 1829 | ctx->EndGroup(tag); |
| 1830 | return ptr; |
| 1831 | } |
| 1832 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 1833 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 1834 | ptr = res.first; |
| 1835 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 1836 | if (res.second) return ptr; |
| 1837 | } |
| 1838 | } // switch |
| 1839 | } // while |
| 1840 | return ptr; |
| 1841 | string_till_end: |
| 1842 | static_cast<::std::string*>(object)->clear(); |
| 1843 | static_cast<::std::string*>(object)->reserve(size); |
| 1844 | goto len_delim_till_end; |
| 1845 | len_delim_till_end: |
| 1846 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 1847 | {parser_till_end, object}, size); |
| 1848 | } |
| 1849 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1850 | bool Uri::MergePartialFromCodedStream( |
| 1851 | ::google::protobuf::io::CodedInputStream* input) { |
| 1852 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 1853 | ::google::protobuf::uint32 tag; |
| 1854 | // @@protoc_insertion_point(parse_start:dmi.Uri) |
| 1855 | for (;;) { |
| 1856 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 1857 | tag = p.first; |
| 1858 | if (!p.second) goto handle_unusual; |
| 1859 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 1860 | // string uri = 1; |
| 1861 | case 1: { |
| 1862 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 1863 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1864 | input, this->mutable_uri())); |
| 1865 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1866 | this->uri().data(), static_cast<int>(this->uri().length()), |
| 1867 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 1868 | "dmi.Uri.uri")); |
| 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.Uri) |
| 1888 | return true; |
| 1889 | failure: |
| 1890 | // @@protoc_insertion_point(parse_failure:dmi.Uri) |
| 1891 | return false; |
| 1892 | #undef DO_ |
| 1893 | } |
| 1894 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1895 | |
| 1896 | void Uri::SerializeWithCachedSizes( |
| 1897 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 1898 | // @@protoc_insertion_point(serialize_start:dmi.Uri) |
| 1899 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1900 | (void) cached_has_bits; |
| 1901 | |
| 1902 | // string uri = 1; |
| 1903 | if (this->uri().size() > 0) { |
| 1904 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1905 | this->uri().data(), static_cast<int>(this->uri().length()), |
| 1906 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1907 | "dmi.Uri.uri"); |
| 1908 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1909 | 1, this->uri(), output); |
| 1910 | } |
| 1911 | |
| 1912 | if (_internal_metadata_.have_unknown_fields()) { |
| 1913 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 1914 | _internal_metadata_.unknown_fields(), output); |
| 1915 | } |
| 1916 | // @@protoc_insertion_point(serialize_end:dmi.Uri) |
| 1917 | } |
| 1918 | |
| 1919 | ::google::protobuf::uint8* Uri::InternalSerializeWithCachedSizesToArray( |
| 1920 | ::google::protobuf::uint8* target) const { |
| 1921 | // @@protoc_insertion_point(serialize_to_array_start:dmi.Uri) |
| 1922 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1923 | (void) cached_has_bits; |
| 1924 | |
| 1925 | // string uri = 1; |
| 1926 | if (this->uri().size() > 0) { |
| 1927 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1928 | this->uri().data(), static_cast<int>(this->uri().length()), |
| 1929 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1930 | "dmi.Uri.uri"); |
| 1931 | target = |
| 1932 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1933 | 1, this->uri(), target); |
| 1934 | } |
| 1935 | |
| 1936 | if (_internal_metadata_.have_unknown_fields()) { |
| 1937 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 1938 | _internal_metadata_.unknown_fields(), target); |
| 1939 | } |
| 1940 | // @@protoc_insertion_point(serialize_to_array_end:dmi.Uri) |
| 1941 | return target; |
| 1942 | } |
| 1943 | |
| 1944 | size_t Uri::ByteSizeLong() const { |
| 1945 | // @@protoc_insertion_point(message_byte_size_start:dmi.Uri) |
| 1946 | size_t total_size = 0; |
| 1947 | |
| 1948 | if (_internal_metadata_.have_unknown_fields()) { |
| 1949 | total_size += |
| 1950 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 1951 | _internal_metadata_.unknown_fields()); |
| 1952 | } |
| 1953 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1954 | // Prevent compiler warnings about cached_has_bits being unused |
| 1955 | (void) cached_has_bits; |
| 1956 | |
| 1957 | // string uri = 1; |
| 1958 | if (this->uri().size() > 0) { |
| 1959 | total_size += 1 + |
| 1960 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1961 | this->uri()); |
| 1962 | } |
| 1963 | |
| 1964 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 1965 | SetCachedSize(cached_size); |
| 1966 | return total_size; |
| 1967 | } |
| 1968 | |
| 1969 | void Uri::MergeFrom(const ::google::protobuf::Message& from) { |
| 1970 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.Uri) |
| 1971 | GOOGLE_DCHECK_NE(&from, this); |
| 1972 | const Uri* source = |
| 1973 | ::google::protobuf::DynamicCastToGenerated<Uri>( |
| 1974 | &from); |
| 1975 | if (source == nullptr) { |
| 1976 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.Uri) |
| 1977 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 1978 | } else { |
| 1979 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.Uri) |
| 1980 | MergeFrom(*source); |
| 1981 | } |
| 1982 | } |
| 1983 | |
| 1984 | void Uri::MergeFrom(const Uri& from) { |
| 1985 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.Uri) |
| 1986 | GOOGLE_DCHECK_NE(&from, this); |
| 1987 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1988 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1989 | (void) cached_has_bits; |
| 1990 | |
| 1991 | if (from.uri().size() > 0) { |
| 1992 | |
| 1993 | uri_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.uri_); |
| 1994 | } |
| 1995 | } |
| 1996 | |
| 1997 | void Uri::CopyFrom(const ::google::protobuf::Message& from) { |
| 1998 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.Uri) |
| 1999 | if (&from == this) return; |
| 2000 | Clear(); |
| 2001 | MergeFrom(from); |
| 2002 | } |
| 2003 | |
| 2004 | void Uri::CopyFrom(const Uri& from) { |
| 2005 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.Uri) |
| 2006 | if (&from == this) return; |
| 2007 | Clear(); |
| 2008 | MergeFrom(from); |
| 2009 | } |
| 2010 | |
| 2011 | bool Uri::IsInitialized() const { |
| 2012 | return true; |
| 2013 | } |
| 2014 | |
| 2015 | void Uri::Swap(Uri* other) { |
| 2016 | if (other == this) return; |
| 2017 | InternalSwap(other); |
| 2018 | } |
| 2019 | void Uri::InternalSwap(Uri* other) { |
| 2020 | using std::swap; |
| 2021 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 2022 | uri_.Swap(&other->uri_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 2023 | GetArenaNoVirtual()); |
| 2024 | } |
| 2025 | |
| 2026 | ::google::protobuf::Metadata Uri::GetMetadata() const { |
| 2027 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 2028 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 2029 | } |
| 2030 | |
| 2031 | |
| 2032 | // =================================================================== |
| 2033 | |
| 2034 | void ComponentState::InitAsDefaultInstance() { |
| 2035 | ::dmi::_ComponentState_default_instance_._instance.get_mutable()->state_last_changed_ = const_cast< ::google::protobuf::Timestamp*>( |
| 2036 | ::google::protobuf::Timestamp::internal_default_instance()); |
| 2037 | } |
| 2038 | class ComponentState::HasBitSetters { |
| 2039 | public: |
| 2040 | static const ::google::protobuf::Timestamp& state_last_changed(const ComponentState* msg); |
| 2041 | }; |
| 2042 | |
| 2043 | const ::google::protobuf::Timestamp& |
| 2044 | ComponentState::HasBitSetters::state_last_changed(const ComponentState* msg) { |
| 2045 | return *msg->state_last_changed_; |
| 2046 | } |
| 2047 | void ComponentState::clear_state_last_changed() { |
| 2048 | if (GetArenaNoVirtual() == nullptr && state_last_changed_ != nullptr) { |
| 2049 | delete state_last_changed_; |
| 2050 | } |
| 2051 | state_last_changed_ = nullptr; |
| 2052 | } |
| 2053 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 2054 | const int ComponentState::kStateLastChangedFieldNumber; |
| 2055 | const int ComponentState::kAdminStateFieldNumber; |
| 2056 | const int ComponentState::kOperStateFieldNumber; |
| 2057 | const int ComponentState::kUsageStateFieldNumber; |
| 2058 | const int ComponentState::kAlarmStateFieldNumber; |
| 2059 | const int ComponentState::kStandbyStateFieldNumber; |
| 2060 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 2061 | |
| 2062 | ComponentState::ComponentState() |
| 2063 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 2064 | SharedCtor(); |
| 2065 | // @@protoc_insertion_point(constructor:dmi.ComponentState) |
| 2066 | } |
| 2067 | ComponentState::ComponentState(const ComponentState& from) |
| 2068 | : ::google::protobuf::Message(), |
| 2069 | _internal_metadata_(nullptr) { |
| 2070 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 2071 | if (from.has_state_last_changed()) { |
| 2072 | state_last_changed_ = new ::google::protobuf::Timestamp(*from.state_last_changed_); |
| 2073 | } else { |
| 2074 | state_last_changed_ = nullptr; |
| 2075 | } |
| 2076 | ::memcpy(&admin_state_, &from.admin_state_, |
| 2077 | static_cast<size_t>(reinterpret_cast<char*>(&standby_state_) - |
| 2078 | reinterpret_cast<char*>(&admin_state_)) + sizeof(standby_state_)); |
| 2079 | // @@protoc_insertion_point(copy_constructor:dmi.ComponentState) |
| 2080 | } |
| 2081 | |
| 2082 | void ComponentState::SharedCtor() { |
| 2083 | ::google::protobuf::internal::InitSCC( |
| 2084 | &scc_info_ComponentState_dmi_2fhw_2eproto.base); |
| 2085 | ::memset(&state_last_changed_, 0, static_cast<size_t>( |
| 2086 | reinterpret_cast<char*>(&standby_state_) - |
| 2087 | reinterpret_cast<char*>(&state_last_changed_)) + sizeof(standby_state_)); |
| 2088 | } |
| 2089 | |
| 2090 | ComponentState::~ComponentState() { |
| 2091 | // @@protoc_insertion_point(destructor:dmi.ComponentState) |
| 2092 | SharedDtor(); |
| 2093 | } |
| 2094 | |
| 2095 | void ComponentState::SharedDtor() { |
| 2096 | if (this != internal_default_instance()) delete state_last_changed_; |
| 2097 | } |
| 2098 | |
| 2099 | void ComponentState::SetCachedSize(int size) const { |
| 2100 | _cached_size_.Set(size); |
| 2101 | } |
| 2102 | const ComponentState& ComponentState::default_instance() { |
| 2103 | ::google::protobuf::internal::InitSCC(&::scc_info_ComponentState_dmi_2fhw_2eproto.base); |
| 2104 | return *internal_default_instance(); |
| 2105 | } |
| 2106 | |
| 2107 | |
| 2108 | void ComponentState::Clear() { |
| 2109 | // @@protoc_insertion_point(message_clear_start:dmi.ComponentState) |
| 2110 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2111 | // Prevent compiler warnings about cached_has_bits being unused |
| 2112 | (void) cached_has_bits; |
| 2113 | |
| 2114 | if (GetArenaNoVirtual() == nullptr && state_last_changed_ != nullptr) { |
| 2115 | delete state_last_changed_; |
| 2116 | } |
| 2117 | state_last_changed_ = nullptr; |
| 2118 | ::memset(&admin_state_, 0, static_cast<size_t>( |
| 2119 | reinterpret_cast<char*>(&standby_state_) - |
| 2120 | reinterpret_cast<char*>(&admin_state_)) + sizeof(standby_state_)); |
| 2121 | _internal_metadata_.Clear(); |
| 2122 | } |
| 2123 | |
| 2124 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2125 | const char* ComponentState::_InternalParse(const char* begin, const char* end, void* object, |
| 2126 | ::google::protobuf::internal::ParseContext* ctx) { |
| 2127 | auto msg = static_cast<ComponentState*>(object); |
| 2128 | ::google::protobuf::int32 size; (void)size; |
| 2129 | int depth; (void)depth; |
| 2130 | ::google::protobuf::uint32 tag; |
| 2131 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 2132 | auto ptr = begin; |
| 2133 | while (ptr < end) { |
| 2134 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 2135 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2136 | switch (tag >> 3) { |
| 2137 | // .google.protobuf.Timestamp state_last_changed = 1; |
| 2138 | case 1: { |
| 2139 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 2140 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 2141 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2142 | parser_till_end = ::google::protobuf::Timestamp::_InternalParse; |
| 2143 | object = msg->mutable_state_last_changed(); |
| 2144 | if (size > end - ptr) goto len_delim_till_end; |
| 2145 | ptr += size; |
| 2146 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 2147 | {parser_till_end, object}, ptr - size, ptr)); |
| 2148 | break; |
| 2149 | } |
| 2150 | // .dmi.ComponentAdminState admin_state = 2; |
| 2151 | case 2: { |
| 2152 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 2153 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2154 | msg->set_admin_state(static_cast<::dmi::ComponentAdminState>(val)); |
| 2155 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2156 | break; |
| 2157 | } |
| 2158 | // .dmi.ComponentOperState oper_state = 3; |
| 2159 | case 3: { |
| 2160 | if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; |
| 2161 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2162 | msg->set_oper_state(static_cast<::dmi::ComponentOperState>(val)); |
| 2163 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2164 | break; |
| 2165 | } |
| 2166 | // .dmi.ComponentUsageState usage_state = 4; |
| 2167 | case 4: { |
| 2168 | if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; |
| 2169 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2170 | msg->set_usage_state(static_cast<::dmi::ComponentUsageState>(val)); |
| 2171 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2172 | break; |
| 2173 | } |
| 2174 | // .dmi.ComponentAlarmState alarm_state = 5; |
| 2175 | case 5: { |
| 2176 | if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; |
| 2177 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2178 | msg->set_alarm_state(static_cast<::dmi::ComponentAlarmState>(val)); |
| 2179 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2180 | break; |
| 2181 | } |
| 2182 | // .dmi.ComponentStandbyState standby_state = 6; |
| 2183 | case 6: { |
| 2184 | if (static_cast<::google::protobuf::uint8>(tag) != 48) goto handle_unusual; |
| 2185 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2186 | msg->set_standby_state(static_cast<::dmi::ComponentStandbyState>(val)); |
| 2187 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2188 | break; |
| 2189 | } |
| 2190 | default: { |
| 2191 | handle_unusual: |
| 2192 | if ((tag & 7) == 4 || tag == 0) { |
| 2193 | ctx->EndGroup(tag); |
| 2194 | return ptr; |
| 2195 | } |
| 2196 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 2197 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 2198 | ptr = res.first; |
| 2199 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 2200 | if (res.second) return ptr; |
| 2201 | } |
| 2202 | } // switch |
| 2203 | } // while |
| 2204 | return ptr; |
| 2205 | len_delim_till_end: |
| 2206 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 2207 | {parser_till_end, object}, size); |
| 2208 | } |
| 2209 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2210 | bool ComponentState::MergePartialFromCodedStream( |
| 2211 | ::google::protobuf::io::CodedInputStream* input) { |
| 2212 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 2213 | ::google::protobuf::uint32 tag; |
| 2214 | // @@protoc_insertion_point(parse_start:dmi.ComponentState) |
| 2215 | for (;;) { |
| 2216 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 2217 | tag = p.first; |
| 2218 | if (!p.second) goto handle_unusual; |
| 2219 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 2220 | // .google.protobuf.Timestamp state_last_changed = 1; |
| 2221 | case 1: { |
| 2222 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 2223 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 2224 | input, mutable_state_last_changed())); |
| 2225 | } else { |
| 2226 | goto handle_unusual; |
| 2227 | } |
| 2228 | break; |
| 2229 | } |
| 2230 | |
| 2231 | // .dmi.ComponentAdminState admin_state = 2; |
| 2232 | case 2: { |
| 2233 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 2234 | int value = 0; |
| 2235 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2236 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2237 | input, &value))); |
| 2238 | set_admin_state(static_cast< ::dmi::ComponentAdminState >(value)); |
| 2239 | } else { |
| 2240 | goto handle_unusual; |
| 2241 | } |
| 2242 | break; |
| 2243 | } |
| 2244 | |
| 2245 | // .dmi.ComponentOperState oper_state = 3; |
| 2246 | case 3: { |
| 2247 | if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { |
| 2248 | int value = 0; |
| 2249 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2250 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2251 | input, &value))); |
| 2252 | set_oper_state(static_cast< ::dmi::ComponentOperState >(value)); |
| 2253 | } else { |
| 2254 | goto handle_unusual; |
| 2255 | } |
| 2256 | break; |
| 2257 | } |
| 2258 | |
| 2259 | // .dmi.ComponentUsageState usage_state = 4; |
| 2260 | case 4: { |
| 2261 | if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { |
| 2262 | int value = 0; |
| 2263 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2264 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2265 | input, &value))); |
| 2266 | set_usage_state(static_cast< ::dmi::ComponentUsageState >(value)); |
| 2267 | } else { |
| 2268 | goto handle_unusual; |
| 2269 | } |
| 2270 | break; |
| 2271 | } |
| 2272 | |
| 2273 | // .dmi.ComponentAlarmState alarm_state = 5; |
| 2274 | case 5: { |
| 2275 | if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { |
| 2276 | int value = 0; |
| 2277 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2278 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2279 | input, &value))); |
| 2280 | set_alarm_state(static_cast< ::dmi::ComponentAlarmState >(value)); |
| 2281 | } else { |
| 2282 | goto handle_unusual; |
| 2283 | } |
| 2284 | break; |
| 2285 | } |
| 2286 | |
| 2287 | // .dmi.ComponentStandbyState standby_state = 6; |
| 2288 | case 6: { |
| 2289 | if (static_cast< ::google::protobuf::uint8>(tag) == (48 & 0xFF)) { |
| 2290 | int value = 0; |
| 2291 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2292 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2293 | input, &value))); |
| 2294 | set_standby_state(static_cast< ::dmi::ComponentStandbyState >(value)); |
| 2295 | } else { |
| 2296 | goto handle_unusual; |
| 2297 | } |
| 2298 | break; |
| 2299 | } |
| 2300 | |
| 2301 | default: { |
| 2302 | handle_unusual: |
| 2303 | if (tag == 0) { |
| 2304 | goto success; |
| 2305 | } |
| 2306 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 2307 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 2308 | break; |
| 2309 | } |
| 2310 | } |
| 2311 | } |
| 2312 | success: |
| 2313 | // @@protoc_insertion_point(parse_success:dmi.ComponentState) |
| 2314 | return true; |
| 2315 | failure: |
| 2316 | // @@protoc_insertion_point(parse_failure:dmi.ComponentState) |
| 2317 | return false; |
| 2318 | #undef DO_ |
| 2319 | } |
| 2320 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2321 | |
| 2322 | void ComponentState::SerializeWithCachedSizes( |
| 2323 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 2324 | // @@protoc_insertion_point(serialize_start:dmi.ComponentState) |
| 2325 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2326 | (void) cached_has_bits; |
| 2327 | |
| 2328 | // .google.protobuf.Timestamp state_last_changed = 1; |
| 2329 | if (this->has_state_last_changed()) { |
| 2330 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 2331 | 1, HasBitSetters::state_last_changed(this), output); |
| 2332 | } |
| 2333 | |
| 2334 | // .dmi.ComponentAdminState admin_state = 2; |
| 2335 | if (this->admin_state() != 0) { |
| 2336 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2337 | 2, this->admin_state(), output); |
| 2338 | } |
| 2339 | |
| 2340 | // .dmi.ComponentOperState oper_state = 3; |
| 2341 | if (this->oper_state() != 0) { |
| 2342 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2343 | 3, this->oper_state(), output); |
| 2344 | } |
| 2345 | |
| 2346 | // .dmi.ComponentUsageState usage_state = 4; |
| 2347 | if (this->usage_state() != 0) { |
| 2348 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2349 | 4, this->usage_state(), output); |
| 2350 | } |
| 2351 | |
| 2352 | // .dmi.ComponentAlarmState alarm_state = 5; |
| 2353 | if (this->alarm_state() != 0) { |
| 2354 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2355 | 5, this->alarm_state(), output); |
| 2356 | } |
| 2357 | |
| 2358 | // .dmi.ComponentStandbyState standby_state = 6; |
| 2359 | if (this->standby_state() != 0) { |
| 2360 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2361 | 6, this->standby_state(), output); |
| 2362 | } |
| 2363 | |
| 2364 | if (_internal_metadata_.have_unknown_fields()) { |
| 2365 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 2366 | _internal_metadata_.unknown_fields(), output); |
| 2367 | } |
| 2368 | // @@protoc_insertion_point(serialize_end:dmi.ComponentState) |
| 2369 | } |
| 2370 | |
| 2371 | ::google::protobuf::uint8* ComponentState::InternalSerializeWithCachedSizesToArray( |
| 2372 | ::google::protobuf::uint8* target) const { |
| 2373 | // @@protoc_insertion_point(serialize_to_array_start:dmi.ComponentState) |
| 2374 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2375 | (void) cached_has_bits; |
| 2376 | |
| 2377 | // .google.protobuf.Timestamp state_last_changed = 1; |
| 2378 | if (this->has_state_last_changed()) { |
| 2379 | target = ::google::protobuf::internal::WireFormatLite:: |
| 2380 | InternalWriteMessageToArray( |
| 2381 | 1, HasBitSetters::state_last_changed(this), target); |
| 2382 | } |
| 2383 | |
| 2384 | // .dmi.ComponentAdminState admin_state = 2; |
| 2385 | if (this->admin_state() != 0) { |
| 2386 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2387 | 2, this->admin_state(), target); |
| 2388 | } |
| 2389 | |
| 2390 | // .dmi.ComponentOperState oper_state = 3; |
| 2391 | if (this->oper_state() != 0) { |
| 2392 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2393 | 3, this->oper_state(), target); |
| 2394 | } |
| 2395 | |
| 2396 | // .dmi.ComponentUsageState usage_state = 4; |
| 2397 | if (this->usage_state() != 0) { |
| 2398 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2399 | 4, this->usage_state(), target); |
| 2400 | } |
| 2401 | |
| 2402 | // .dmi.ComponentAlarmState alarm_state = 5; |
| 2403 | if (this->alarm_state() != 0) { |
| 2404 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2405 | 5, this->alarm_state(), target); |
| 2406 | } |
| 2407 | |
| 2408 | // .dmi.ComponentStandbyState standby_state = 6; |
| 2409 | if (this->standby_state() != 0) { |
| 2410 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2411 | 6, this->standby_state(), target); |
| 2412 | } |
| 2413 | |
| 2414 | if (_internal_metadata_.have_unknown_fields()) { |
| 2415 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 2416 | _internal_metadata_.unknown_fields(), target); |
| 2417 | } |
| 2418 | // @@protoc_insertion_point(serialize_to_array_end:dmi.ComponentState) |
| 2419 | return target; |
| 2420 | } |
| 2421 | |
| 2422 | size_t ComponentState::ByteSizeLong() const { |
| 2423 | // @@protoc_insertion_point(message_byte_size_start:dmi.ComponentState) |
| 2424 | size_t total_size = 0; |
| 2425 | |
| 2426 | if (_internal_metadata_.have_unknown_fields()) { |
| 2427 | total_size += |
| 2428 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 2429 | _internal_metadata_.unknown_fields()); |
| 2430 | } |
| 2431 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2432 | // Prevent compiler warnings about cached_has_bits being unused |
| 2433 | (void) cached_has_bits; |
| 2434 | |
| 2435 | // .google.protobuf.Timestamp state_last_changed = 1; |
| 2436 | if (this->has_state_last_changed()) { |
| 2437 | total_size += 1 + |
| 2438 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 2439 | *state_last_changed_); |
| 2440 | } |
| 2441 | |
| 2442 | // .dmi.ComponentAdminState admin_state = 2; |
| 2443 | if (this->admin_state() != 0) { |
| 2444 | total_size += 1 + |
| 2445 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->admin_state()); |
| 2446 | } |
| 2447 | |
| 2448 | // .dmi.ComponentOperState oper_state = 3; |
| 2449 | if (this->oper_state() != 0) { |
| 2450 | total_size += 1 + |
| 2451 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->oper_state()); |
| 2452 | } |
| 2453 | |
| 2454 | // .dmi.ComponentUsageState usage_state = 4; |
| 2455 | if (this->usage_state() != 0) { |
| 2456 | total_size += 1 + |
| 2457 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->usage_state()); |
| 2458 | } |
| 2459 | |
| 2460 | // .dmi.ComponentAlarmState alarm_state = 5; |
| 2461 | if (this->alarm_state() != 0) { |
| 2462 | total_size += 1 + |
| 2463 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->alarm_state()); |
| 2464 | } |
| 2465 | |
| 2466 | // .dmi.ComponentStandbyState standby_state = 6; |
| 2467 | if (this->standby_state() != 0) { |
| 2468 | total_size += 1 + |
| 2469 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->standby_state()); |
| 2470 | } |
| 2471 | |
| 2472 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 2473 | SetCachedSize(cached_size); |
| 2474 | return total_size; |
| 2475 | } |
| 2476 | |
| 2477 | void ComponentState::MergeFrom(const ::google::protobuf::Message& from) { |
| 2478 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.ComponentState) |
| 2479 | GOOGLE_DCHECK_NE(&from, this); |
| 2480 | const ComponentState* source = |
| 2481 | ::google::protobuf::DynamicCastToGenerated<ComponentState>( |
| 2482 | &from); |
| 2483 | if (source == nullptr) { |
| 2484 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.ComponentState) |
| 2485 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 2486 | } else { |
| 2487 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.ComponentState) |
| 2488 | MergeFrom(*source); |
| 2489 | } |
| 2490 | } |
| 2491 | |
| 2492 | void ComponentState::MergeFrom(const ComponentState& from) { |
| 2493 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.ComponentState) |
| 2494 | GOOGLE_DCHECK_NE(&from, this); |
| 2495 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 2496 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2497 | (void) cached_has_bits; |
| 2498 | |
| 2499 | if (from.has_state_last_changed()) { |
| 2500 | mutable_state_last_changed()->::google::protobuf::Timestamp::MergeFrom(from.state_last_changed()); |
| 2501 | } |
| 2502 | if (from.admin_state() != 0) { |
| 2503 | set_admin_state(from.admin_state()); |
| 2504 | } |
| 2505 | if (from.oper_state() != 0) { |
| 2506 | set_oper_state(from.oper_state()); |
| 2507 | } |
| 2508 | if (from.usage_state() != 0) { |
| 2509 | set_usage_state(from.usage_state()); |
| 2510 | } |
| 2511 | if (from.alarm_state() != 0) { |
| 2512 | set_alarm_state(from.alarm_state()); |
| 2513 | } |
| 2514 | if (from.standby_state() != 0) { |
| 2515 | set_standby_state(from.standby_state()); |
| 2516 | } |
| 2517 | } |
| 2518 | |
| 2519 | void ComponentState::CopyFrom(const ::google::protobuf::Message& from) { |
| 2520 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.ComponentState) |
| 2521 | if (&from == this) return; |
| 2522 | Clear(); |
| 2523 | MergeFrom(from); |
| 2524 | } |
| 2525 | |
| 2526 | void ComponentState::CopyFrom(const ComponentState& from) { |
| 2527 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.ComponentState) |
| 2528 | if (&from == this) return; |
| 2529 | Clear(); |
| 2530 | MergeFrom(from); |
| 2531 | } |
| 2532 | |
| 2533 | bool ComponentState::IsInitialized() const { |
| 2534 | return true; |
| 2535 | } |
| 2536 | |
| 2537 | void ComponentState::Swap(ComponentState* other) { |
| 2538 | if (other == this) return; |
| 2539 | InternalSwap(other); |
| 2540 | } |
| 2541 | void ComponentState::InternalSwap(ComponentState* other) { |
| 2542 | using std::swap; |
| 2543 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 2544 | swap(state_last_changed_, other->state_last_changed_); |
| 2545 | swap(admin_state_, other->admin_state_); |
| 2546 | swap(oper_state_, other->oper_state_); |
| 2547 | swap(usage_state_, other->usage_state_); |
| 2548 | swap(alarm_state_, other->alarm_state_); |
| 2549 | swap(standby_state_, other->standby_state_); |
| 2550 | } |
| 2551 | |
| 2552 | ::google::protobuf::Metadata ComponentState::GetMetadata() const { |
| 2553 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 2554 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 2555 | } |
| 2556 | |
| 2557 | |
| 2558 | // =================================================================== |
| 2559 | |
| 2560 | void ComponentSensorData::InitAsDefaultInstance() { |
| 2561 | ::dmi::_ComponentSensorData_default_instance_._instance.get_mutable()->timestamp_ = const_cast< ::google::protobuf::Timestamp*>( |
| 2562 | ::google::protobuf::Timestamp::internal_default_instance()); |
| 2563 | } |
| 2564 | class ComponentSensorData::HasBitSetters { |
| 2565 | public: |
| 2566 | static const ::google::protobuf::Timestamp& timestamp(const ComponentSensorData* msg); |
| 2567 | }; |
| 2568 | |
| 2569 | const ::google::protobuf::Timestamp& |
| 2570 | ComponentSensorData::HasBitSetters::timestamp(const ComponentSensorData* msg) { |
| 2571 | return *msg->timestamp_; |
| 2572 | } |
| 2573 | void ComponentSensorData::clear_timestamp() { |
| 2574 | if (GetArenaNoVirtual() == nullptr && timestamp_ != nullptr) { |
| 2575 | delete timestamp_; |
| 2576 | } |
| 2577 | timestamp_ = nullptr; |
| 2578 | } |
| 2579 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 2580 | const int ComponentSensorData::kValueFieldNumber; |
| 2581 | const int ComponentSensorData::kTypeFieldNumber; |
| 2582 | const int ComponentSensorData::kScaleFieldNumber; |
| 2583 | const int ComponentSensorData::kPrecisionFieldNumber; |
| 2584 | const int ComponentSensorData::kStatusFieldNumber; |
| 2585 | const int ComponentSensorData::kUnitsDisplayFieldNumber; |
| 2586 | const int ComponentSensorData::kTimestampFieldNumber; |
| 2587 | const int ComponentSensorData::kValueUpdateRateFieldNumber; |
| 2588 | const int ComponentSensorData::kDataTypeFieldNumber; |
| 2589 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 2590 | |
| 2591 | ComponentSensorData::ComponentSensorData() |
| 2592 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 2593 | SharedCtor(); |
| 2594 | // @@protoc_insertion_point(constructor:dmi.ComponentSensorData) |
| 2595 | } |
| 2596 | ComponentSensorData::ComponentSensorData(const ComponentSensorData& from) |
| 2597 | : ::google::protobuf::Message(), |
| 2598 | _internal_metadata_(nullptr) { |
| 2599 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 2600 | units_display_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2601 | if (from.units_display().size() > 0) { |
| 2602 | units_display_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.units_display_); |
| 2603 | } |
| 2604 | data_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2605 | if (from.data_type().size() > 0) { |
| 2606 | data_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_type_); |
| 2607 | } |
| 2608 | if (from.has_timestamp()) { |
| 2609 | timestamp_ = new ::google::protobuf::Timestamp(*from.timestamp_); |
| 2610 | } else { |
| 2611 | timestamp_ = nullptr; |
| 2612 | } |
| 2613 | ::memcpy(&value_, &from.value_, |
| 2614 | static_cast<size_t>(reinterpret_cast<char*>(&value_update_rate_) - |
| 2615 | reinterpret_cast<char*>(&value_)) + sizeof(value_update_rate_)); |
| 2616 | // @@protoc_insertion_point(copy_constructor:dmi.ComponentSensorData) |
| 2617 | } |
| 2618 | |
| 2619 | void ComponentSensorData::SharedCtor() { |
| 2620 | ::google::protobuf::internal::InitSCC( |
| 2621 | &scc_info_ComponentSensorData_dmi_2fhw_2eproto.base); |
| 2622 | units_display_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2623 | data_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2624 | ::memset(×tamp_, 0, static_cast<size_t>( |
| 2625 | reinterpret_cast<char*>(&value_update_rate_) - |
| 2626 | reinterpret_cast<char*>(×tamp_)) + sizeof(value_update_rate_)); |
| 2627 | } |
| 2628 | |
| 2629 | ComponentSensorData::~ComponentSensorData() { |
| 2630 | // @@protoc_insertion_point(destructor:dmi.ComponentSensorData) |
| 2631 | SharedDtor(); |
| 2632 | } |
| 2633 | |
| 2634 | void ComponentSensorData::SharedDtor() { |
| 2635 | units_display_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2636 | data_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2637 | if (this != internal_default_instance()) delete timestamp_; |
| 2638 | } |
| 2639 | |
| 2640 | void ComponentSensorData::SetCachedSize(int size) const { |
| 2641 | _cached_size_.Set(size); |
| 2642 | } |
| 2643 | const ComponentSensorData& ComponentSensorData::default_instance() { |
| 2644 | ::google::protobuf::internal::InitSCC(&::scc_info_ComponentSensorData_dmi_2fhw_2eproto.base); |
| 2645 | return *internal_default_instance(); |
| 2646 | } |
| 2647 | |
| 2648 | |
| 2649 | void ComponentSensorData::Clear() { |
| 2650 | // @@protoc_insertion_point(message_clear_start:dmi.ComponentSensorData) |
| 2651 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2652 | // Prevent compiler warnings about cached_has_bits being unused |
| 2653 | (void) cached_has_bits; |
| 2654 | |
| 2655 | units_display_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2656 | data_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2657 | if (GetArenaNoVirtual() == nullptr && timestamp_ != nullptr) { |
| 2658 | delete timestamp_; |
| 2659 | } |
| 2660 | timestamp_ = nullptr; |
| 2661 | ::memset(&value_, 0, static_cast<size_t>( |
| 2662 | reinterpret_cast<char*>(&value_update_rate_) - |
| 2663 | reinterpret_cast<char*>(&value_)) + sizeof(value_update_rate_)); |
| 2664 | _internal_metadata_.Clear(); |
| 2665 | } |
| 2666 | |
| 2667 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2668 | const char* ComponentSensorData::_InternalParse(const char* begin, const char* end, void* object, |
| 2669 | ::google::protobuf::internal::ParseContext* ctx) { |
| 2670 | auto msg = static_cast<ComponentSensorData*>(object); |
| 2671 | ::google::protobuf::int32 size; (void)size; |
| 2672 | int depth; (void)depth; |
| 2673 | ::google::protobuf::uint32 tag; |
| 2674 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 2675 | auto ptr = begin; |
| 2676 | while (ptr < end) { |
| 2677 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 2678 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2679 | switch (tag >> 3) { |
| 2680 | // int32 value = 1; |
| 2681 | case 1: { |
| 2682 | if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; |
| 2683 | msg->set_value(::google::protobuf::internal::ReadVarint(&ptr)); |
| 2684 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2685 | break; |
| 2686 | } |
| 2687 | // .dmi.DataValueType type = 2; |
| 2688 | case 2: { |
| 2689 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 2690 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2691 | msg->set_type(static_cast<::dmi::DataValueType>(val)); |
| 2692 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2693 | break; |
| 2694 | } |
| 2695 | // .dmi.ValueScale scale = 3; |
| 2696 | case 3: { |
| 2697 | if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; |
| 2698 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2699 | msg->set_scale(static_cast<::dmi::ValueScale>(val)); |
| 2700 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2701 | break; |
| 2702 | } |
| 2703 | // int32 precision = 4; |
| 2704 | case 4: { |
| 2705 | if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; |
| 2706 | msg->set_precision(::google::protobuf::internal::ReadVarint(&ptr)); |
| 2707 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2708 | break; |
| 2709 | } |
| 2710 | // .dmi.SensorStatus status = 5; |
| 2711 | case 5: { |
| 2712 | if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; |
| 2713 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2714 | msg->set_status(static_cast<::dmi::SensorStatus>(val)); |
| 2715 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2716 | break; |
| 2717 | } |
| 2718 | // string units_display = 6; |
| 2719 | case 6: { |
| 2720 | if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; |
| 2721 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 2722 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2723 | ctx->extra_parse_data().SetFieldName("dmi.ComponentSensorData.units_display"); |
| 2724 | object = msg->mutable_units_display(); |
| 2725 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 2726 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 2727 | goto string_till_end; |
| 2728 | } |
| 2729 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 2730 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 2731 | ptr += size; |
| 2732 | break; |
| 2733 | } |
| 2734 | // .google.protobuf.Timestamp timestamp = 7; |
| 2735 | case 7: { |
| 2736 | if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; |
| 2737 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 2738 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2739 | parser_till_end = ::google::protobuf::Timestamp::_InternalParse; |
| 2740 | object = msg->mutable_timestamp(); |
| 2741 | if (size > end - ptr) goto len_delim_till_end; |
| 2742 | ptr += size; |
| 2743 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 2744 | {parser_till_end, object}, ptr - size, ptr)); |
| 2745 | break; |
| 2746 | } |
| 2747 | // uint32 value_update_rate = 8; |
| 2748 | case 8: { |
| 2749 | if (static_cast<::google::protobuf::uint8>(tag) != 64) goto handle_unusual; |
| 2750 | msg->set_value_update_rate(::google::protobuf::internal::ReadVarint(&ptr)); |
| 2751 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2752 | break; |
| 2753 | } |
| 2754 | // string data_type = 9; |
| 2755 | case 9: { |
| 2756 | if (static_cast<::google::protobuf::uint8>(tag) != 74) goto handle_unusual; |
| 2757 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 2758 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2759 | ctx->extra_parse_data().SetFieldName("dmi.ComponentSensorData.data_type"); |
| 2760 | object = msg->mutable_data_type(); |
| 2761 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 2762 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 2763 | goto string_till_end; |
| 2764 | } |
| 2765 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 2766 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 2767 | ptr += size; |
| 2768 | break; |
| 2769 | } |
| 2770 | default: { |
| 2771 | handle_unusual: |
| 2772 | if ((tag & 7) == 4 || tag == 0) { |
| 2773 | ctx->EndGroup(tag); |
| 2774 | return ptr; |
| 2775 | } |
| 2776 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 2777 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 2778 | ptr = res.first; |
| 2779 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 2780 | if (res.second) return ptr; |
| 2781 | } |
| 2782 | } // switch |
| 2783 | } // while |
| 2784 | return ptr; |
| 2785 | string_till_end: |
| 2786 | static_cast<::std::string*>(object)->clear(); |
| 2787 | static_cast<::std::string*>(object)->reserve(size); |
| 2788 | goto len_delim_till_end; |
| 2789 | len_delim_till_end: |
| 2790 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 2791 | {parser_till_end, object}, size); |
| 2792 | } |
| 2793 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2794 | bool ComponentSensorData::MergePartialFromCodedStream( |
| 2795 | ::google::protobuf::io::CodedInputStream* input) { |
| 2796 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 2797 | ::google::protobuf::uint32 tag; |
| 2798 | // @@protoc_insertion_point(parse_start:dmi.ComponentSensorData) |
| 2799 | for (;;) { |
| 2800 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 2801 | tag = p.first; |
| 2802 | if (!p.second) goto handle_unusual; |
| 2803 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 2804 | // int32 value = 1; |
| 2805 | case 1: { |
| 2806 | if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { |
| 2807 | |
| 2808 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2809 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2810 | input, &value_))); |
| 2811 | } else { |
| 2812 | goto handle_unusual; |
| 2813 | } |
| 2814 | break; |
| 2815 | } |
| 2816 | |
| 2817 | // .dmi.DataValueType type = 2; |
| 2818 | case 2: { |
| 2819 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 2820 | int value = 0; |
| 2821 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2822 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2823 | input, &value))); |
| 2824 | set_type(static_cast< ::dmi::DataValueType >(value)); |
| 2825 | } else { |
| 2826 | goto handle_unusual; |
| 2827 | } |
| 2828 | break; |
| 2829 | } |
| 2830 | |
| 2831 | // .dmi.ValueScale scale = 3; |
| 2832 | case 3: { |
| 2833 | if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { |
| 2834 | int value = 0; |
| 2835 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2836 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2837 | input, &value))); |
| 2838 | set_scale(static_cast< ::dmi::ValueScale >(value)); |
| 2839 | } else { |
| 2840 | goto handle_unusual; |
| 2841 | } |
| 2842 | break; |
| 2843 | } |
| 2844 | |
| 2845 | // int32 precision = 4; |
| 2846 | case 4: { |
| 2847 | if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { |
| 2848 | |
| 2849 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2850 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2851 | input, &precision_))); |
| 2852 | } else { |
| 2853 | goto handle_unusual; |
| 2854 | } |
| 2855 | break; |
| 2856 | } |
| 2857 | |
| 2858 | // .dmi.SensorStatus status = 5; |
| 2859 | case 5: { |
| 2860 | if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { |
| 2861 | int value = 0; |
| 2862 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2863 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2864 | input, &value))); |
| 2865 | set_status(static_cast< ::dmi::SensorStatus >(value)); |
| 2866 | } else { |
| 2867 | goto handle_unusual; |
| 2868 | } |
| 2869 | break; |
| 2870 | } |
| 2871 | |
| 2872 | // string units_display = 6; |
| 2873 | case 6: { |
| 2874 | if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { |
| 2875 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 2876 | input, this->mutable_units_display())); |
| 2877 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2878 | this->units_display().data(), static_cast<int>(this->units_display().length()), |
| 2879 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 2880 | "dmi.ComponentSensorData.units_display")); |
| 2881 | } else { |
| 2882 | goto handle_unusual; |
| 2883 | } |
| 2884 | break; |
| 2885 | } |
| 2886 | |
| 2887 | // .google.protobuf.Timestamp timestamp = 7; |
| 2888 | case 7: { |
| 2889 | if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) { |
| 2890 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 2891 | input, mutable_timestamp())); |
| 2892 | } else { |
| 2893 | goto handle_unusual; |
| 2894 | } |
| 2895 | break; |
| 2896 | } |
| 2897 | |
| 2898 | // uint32 value_update_rate = 8; |
| 2899 | case 8: { |
| 2900 | if (static_cast< ::google::protobuf::uint8>(tag) == (64 & 0xFF)) { |
| 2901 | |
| 2902 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2903 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 2904 | input, &value_update_rate_))); |
| 2905 | } else { |
| 2906 | goto handle_unusual; |
| 2907 | } |
| 2908 | break; |
| 2909 | } |
| 2910 | |
| 2911 | // string data_type = 9; |
| 2912 | case 9: { |
| 2913 | if (static_cast< ::google::protobuf::uint8>(tag) == (74 & 0xFF)) { |
| 2914 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 2915 | input, this->mutable_data_type())); |
| 2916 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2917 | this->data_type().data(), static_cast<int>(this->data_type().length()), |
| 2918 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 2919 | "dmi.ComponentSensorData.data_type")); |
| 2920 | } else { |
| 2921 | goto handle_unusual; |
| 2922 | } |
| 2923 | break; |
| 2924 | } |
| 2925 | |
| 2926 | default: { |
| 2927 | handle_unusual: |
| 2928 | if (tag == 0) { |
| 2929 | goto success; |
| 2930 | } |
| 2931 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 2932 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 2933 | break; |
| 2934 | } |
| 2935 | } |
| 2936 | } |
| 2937 | success: |
| 2938 | // @@protoc_insertion_point(parse_success:dmi.ComponentSensorData) |
| 2939 | return true; |
| 2940 | failure: |
| 2941 | // @@protoc_insertion_point(parse_failure:dmi.ComponentSensorData) |
| 2942 | return false; |
| 2943 | #undef DO_ |
| 2944 | } |
| 2945 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2946 | |
| 2947 | void ComponentSensorData::SerializeWithCachedSizes( |
| 2948 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 2949 | // @@protoc_insertion_point(serialize_start:dmi.ComponentSensorData) |
| 2950 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2951 | (void) cached_has_bits; |
| 2952 | |
| 2953 | // int32 value = 1; |
| 2954 | if (this->value() != 0) { |
| 2955 | ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->value(), output); |
| 2956 | } |
| 2957 | |
| 2958 | // .dmi.DataValueType type = 2; |
| 2959 | if (this->type() != 0) { |
| 2960 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2961 | 2, this->type(), output); |
| 2962 | } |
| 2963 | |
| 2964 | // .dmi.ValueScale scale = 3; |
| 2965 | if (this->scale() != 0) { |
| 2966 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2967 | 3, this->scale(), output); |
| 2968 | } |
| 2969 | |
| 2970 | // int32 precision = 4; |
| 2971 | if (this->precision() != 0) { |
| 2972 | ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->precision(), output); |
| 2973 | } |
| 2974 | |
| 2975 | // .dmi.SensorStatus status = 5; |
| 2976 | if (this->status() != 0) { |
| 2977 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2978 | 5, this->status(), output); |
| 2979 | } |
| 2980 | |
| 2981 | // string units_display = 6; |
| 2982 | if (this->units_display().size() > 0) { |
| 2983 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2984 | this->units_display().data(), static_cast<int>(this->units_display().length()), |
| 2985 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 2986 | "dmi.ComponentSensorData.units_display"); |
| 2987 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 2988 | 6, this->units_display(), output); |
| 2989 | } |
| 2990 | |
| 2991 | // .google.protobuf.Timestamp timestamp = 7; |
| 2992 | if (this->has_timestamp()) { |
| 2993 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 2994 | 7, HasBitSetters::timestamp(this), output); |
| 2995 | } |
| 2996 | |
| 2997 | // uint32 value_update_rate = 8; |
| 2998 | if (this->value_update_rate() != 0) { |
| 2999 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->value_update_rate(), output); |
| 3000 | } |
| 3001 | |
| 3002 | // string data_type = 9; |
| 3003 | if (this->data_type().size() > 0) { |
| 3004 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3005 | this->data_type().data(), static_cast<int>(this->data_type().length()), |
| 3006 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3007 | "dmi.ComponentSensorData.data_type"); |
| 3008 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 3009 | 9, this->data_type(), output); |
| 3010 | } |
| 3011 | |
| 3012 | if (_internal_metadata_.have_unknown_fields()) { |
| 3013 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 3014 | _internal_metadata_.unknown_fields(), output); |
| 3015 | } |
| 3016 | // @@protoc_insertion_point(serialize_end:dmi.ComponentSensorData) |
| 3017 | } |
| 3018 | |
| 3019 | ::google::protobuf::uint8* ComponentSensorData::InternalSerializeWithCachedSizesToArray( |
| 3020 | ::google::protobuf::uint8* target) const { |
| 3021 | // @@protoc_insertion_point(serialize_to_array_start:dmi.ComponentSensorData) |
| 3022 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3023 | (void) cached_has_bits; |
| 3024 | |
| 3025 | // int32 value = 1; |
| 3026 | if (this->value() != 0) { |
| 3027 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->value(), target); |
| 3028 | } |
| 3029 | |
| 3030 | // .dmi.DataValueType type = 2; |
| 3031 | if (this->type() != 0) { |
| 3032 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 3033 | 2, this->type(), target); |
| 3034 | } |
| 3035 | |
| 3036 | // .dmi.ValueScale scale = 3; |
| 3037 | if (this->scale() != 0) { |
| 3038 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 3039 | 3, this->scale(), target); |
| 3040 | } |
| 3041 | |
| 3042 | // int32 precision = 4; |
| 3043 | if (this->precision() != 0) { |
| 3044 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->precision(), target); |
| 3045 | } |
| 3046 | |
| 3047 | // .dmi.SensorStatus status = 5; |
| 3048 | if (this->status() != 0) { |
| 3049 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 3050 | 5, this->status(), target); |
| 3051 | } |
| 3052 | |
| 3053 | // string units_display = 6; |
| 3054 | if (this->units_display().size() > 0) { |
| 3055 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3056 | this->units_display().data(), static_cast<int>(this->units_display().length()), |
| 3057 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3058 | "dmi.ComponentSensorData.units_display"); |
| 3059 | target = |
| 3060 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 3061 | 6, this->units_display(), target); |
| 3062 | } |
| 3063 | |
| 3064 | // .google.protobuf.Timestamp timestamp = 7; |
| 3065 | if (this->has_timestamp()) { |
| 3066 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3067 | InternalWriteMessageToArray( |
| 3068 | 7, HasBitSetters::timestamp(this), target); |
| 3069 | } |
| 3070 | |
| 3071 | // uint32 value_update_rate = 8; |
| 3072 | if (this->value_update_rate() != 0) { |
| 3073 | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->value_update_rate(), target); |
| 3074 | } |
| 3075 | |
| 3076 | // string data_type = 9; |
| 3077 | if (this->data_type().size() > 0) { |
| 3078 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3079 | this->data_type().data(), static_cast<int>(this->data_type().length()), |
| 3080 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3081 | "dmi.ComponentSensorData.data_type"); |
| 3082 | target = |
| 3083 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 3084 | 9, this->data_type(), target); |
| 3085 | } |
| 3086 | |
| 3087 | if (_internal_metadata_.have_unknown_fields()) { |
| 3088 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 3089 | _internal_metadata_.unknown_fields(), target); |
| 3090 | } |
| 3091 | // @@protoc_insertion_point(serialize_to_array_end:dmi.ComponentSensorData) |
| 3092 | return target; |
| 3093 | } |
| 3094 | |
| 3095 | size_t ComponentSensorData::ByteSizeLong() const { |
| 3096 | // @@protoc_insertion_point(message_byte_size_start:dmi.ComponentSensorData) |
| 3097 | size_t total_size = 0; |
| 3098 | |
| 3099 | if (_internal_metadata_.have_unknown_fields()) { |
| 3100 | total_size += |
| 3101 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 3102 | _internal_metadata_.unknown_fields()); |
| 3103 | } |
| 3104 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3105 | // Prevent compiler warnings about cached_has_bits being unused |
| 3106 | (void) cached_has_bits; |
| 3107 | |
| 3108 | // string units_display = 6; |
| 3109 | if (this->units_display().size() > 0) { |
| 3110 | total_size += 1 + |
| 3111 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3112 | this->units_display()); |
| 3113 | } |
| 3114 | |
| 3115 | // string data_type = 9; |
| 3116 | if (this->data_type().size() > 0) { |
| 3117 | total_size += 1 + |
| 3118 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3119 | this->data_type()); |
| 3120 | } |
| 3121 | |
| 3122 | // .google.protobuf.Timestamp timestamp = 7; |
| 3123 | if (this->has_timestamp()) { |
| 3124 | total_size += 1 + |
| 3125 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 3126 | *timestamp_); |
| 3127 | } |
| 3128 | |
| 3129 | // int32 value = 1; |
| 3130 | if (this->value() != 0) { |
| 3131 | total_size += 1 + |
| 3132 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 3133 | this->value()); |
| 3134 | } |
| 3135 | |
| 3136 | // .dmi.DataValueType type = 2; |
| 3137 | if (this->type() != 0) { |
| 3138 | total_size += 1 + |
| 3139 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); |
| 3140 | } |
| 3141 | |
| 3142 | // .dmi.ValueScale scale = 3; |
| 3143 | if (this->scale() != 0) { |
| 3144 | total_size += 1 + |
| 3145 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->scale()); |
| 3146 | } |
| 3147 | |
| 3148 | // int32 precision = 4; |
| 3149 | if (this->precision() != 0) { |
| 3150 | total_size += 1 + |
| 3151 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 3152 | this->precision()); |
| 3153 | } |
| 3154 | |
| 3155 | // .dmi.SensorStatus status = 5; |
| 3156 | if (this->status() != 0) { |
| 3157 | total_size += 1 + |
| 3158 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); |
| 3159 | } |
| 3160 | |
| 3161 | // uint32 value_update_rate = 8; |
| 3162 | if (this->value_update_rate() != 0) { |
| 3163 | total_size += 1 + |
| 3164 | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
| 3165 | this->value_update_rate()); |
| 3166 | } |
| 3167 | |
| 3168 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 3169 | SetCachedSize(cached_size); |
| 3170 | return total_size; |
| 3171 | } |
| 3172 | |
| 3173 | void ComponentSensorData::MergeFrom(const ::google::protobuf::Message& from) { |
| 3174 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.ComponentSensorData) |
| 3175 | GOOGLE_DCHECK_NE(&from, this); |
| 3176 | const ComponentSensorData* source = |
| 3177 | ::google::protobuf::DynamicCastToGenerated<ComponentSensorData>( |
| 3178 | &from); |
| 3179 | if (source == nullptr) { |
| 3180 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.ComponentSensorData) |
| 3181 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 3182 | } else { |
| 3183 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.ComponentSensorData) |
| 3184 | MergeFrom(*source); |
| 3185 | } |
| 3186 | } |
| 3187 | |
| 3188 | void ComponentSensorData::MergeFrom(const ComponentSensorData& from) { |
| 3189 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.ComponentSensorData) |
| 3190 | GOOGLE_DCHECK_NE(&from, this); |
| 3191 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 3192 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3193 | (void) cached_has_bits; |
| 3194 | |
| 3195 | if (from.units_display().size() > 0) { |
| 3196 | |
| 3197 | units_display_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.units_display_); |
| 3198 | } |
| 3199 | if (from.data_type().size() > 0) { |
| 3200 | |
| 3201 | data_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_type_); |
| 3202 | } |
| 3203 | if (from.has_timestamp()) { |
| 3204 | mutable_timestamp()->::google::protobuf::Timestamp::MergeFrom(from.timestamp()); |
| 3205 | } |
| 3206 | if (from.value() != 0) { |
| 3207 | set_value(from.value()); |
| 3208 | } |
| 3209 | if (from.type() != 0) { |
| 3210 | set_type(from.type()); |
| 3211 | } |
| 3212 | if (from.scale() != 0) { |
| 3213 | set_scale(from.scale()); |
| 3214 | } |
| 3215 | if (from.precision() != 0) { |
| 3216 | set_precision(from.precision()); |
| 3217 | } |
| 3218 | if (from.status() != 0) { |
| 3219 | set_status(from.status()); |
| 3220 | } |
| 3221 | if (from.value_update_rate() != 0) { |
| 3222 | set_value_update_rate(from.value_update_rate()); |
| 3223 | } |
| 3224 | } |
| 3225 | |
| 3226 | void ComponentSensorData::CopyFrom(const ::google::protobuf::Message& from) { |
| 3227 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.ComponentSensorData) |
| 3228 | if (&from == this) return; |
| 3229 | Clear(); |
| 3230 | MergeFrom(from); |
| 3231 | } |
| 3232 | |
| 3233 | void ComponentSensorData::CopyFrom(const ComponentSensorData& from) { |
| 3234 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.ComponentSensorData) |
| 3235 | if (&from == this) return; |
| 3236 | Clear(); |
| 3237 | MergeFrom(from); |
| 3238 | } |
| 3239 | |
| 3240 | bool ComponentSensorData::IsInitialized() const { |
| 3241 | return true; |
| 3242 | } |
| 3243 | |
| 3244 | void ComponentSensorData::Swap(ComponentSensorData* other) { |
| 3245 | if (other == this) return; |
| 3246 | InternalSwap(other); |
| 3247 | } |
| 3248 | void ComponentSensorData::InternalSwap(ComponentSensorData* other) { |
| 3249 | using std::swap; |
| 3250 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 3251 | units_display_.Swap(&other->units_display_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3252 | GetArenaNoVirtual()); |
| 3253 | data_type_.Swap(&other->data_type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3254 | GetArenaNoVirtual()); |
| 3255 | swap(timestamp_, other->timestamp_); |
| 3256 | swap(value_, other->value_); |
| 3257 | swap(type_, other->type_); |
| 3258 | swap(scale_, other->scale_); |
| 3259 | swap(precision_, other->precision_); |
| 3260 | swap(status_, other->status_); |
| 3261 | swap(value_update_rate_, other->value_update_rate_); |
| 3262 | } |
| 3263 | |
| 3264 | ::google::protobuf::Metadata ComponentSensorData::GetMetadata() const { |
| 3265 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 3266 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 3267 | } |
| 3268 | |
| 3269 | |
| 3270 | // =================================================================== |
| 3271 | |
| 3272 | void PortComponentAttributes::InitAsDefaultInstance() { |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3273 | ::dmi::_PortComponentAttributes_default_instance_._instance.get_mutable()->pon_id_config_ = const_cast< ::dmi::PonIdConfig*>( |
| 3274 | ::dmi::PonIdConfig::internal_default_instance()); |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3275 | ::dmi::_PortComponentAttributes_default_instance_._instance.get_mutable()->distance_ = const_cast< ::dmi::PonDistance*>( |
| 3276 | ::dmi::PonDistance::internal_default_instance()); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3277 | } |
| 3278 | class PortComponentAttributes::HasBitSetters { |
| 3279 | public: |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3280 | static const ::dmi::PonIdConfig& pon_id_config(const PortComponentAttributes* msg); |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3281 | static const ::dmi::PonDistance& distance(const PortComponentAttributes* msg); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3282 | }; |
| 3283 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3284 | const ::dmi::PonIdConfig& |
| 3285 | PortComponentAttributes::HasBitSetters::pon_id_config(const PortComponentAttributes* msg) { |
| 3286 | return *msg->pon_id_config_; |
| 3287 | } |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3288 | const ::dmi::PonDistance& |
| 3289 | PortComponentAttributes::HasBitSetters::distance(const PortComponentAttributes* msg) { |
| 3290 | return *msg->distance_; |
| 3291 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3292 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 3293 | const int PortComponentAttributes::kConnectorTypeFieldNumber; |
| 3294 | const int PortComponentAttributes::kSpeedFieldNumber; |
| 3295 | const int PortComponentAttributes::kProtocolFieldNumber; |
| 3296 | const int PortComponentAttributes::kPhysicalLabelFieldNumber; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3297 | const int PortComponentAttributes::kMappingLabelFieldNumber; |
| 3298 | const int PortComponentAttributes::kPonIdConfigFieldNumber; |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3299 | const int PortComponentAttributes::kSpeedAutonegotiationFieldNumber; |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3300 | const int PortComponentAttributes::kDistanceFieldNumber; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3301 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 3302 | |
| 3303 | PortComponentAttributes::PortComponentAttributes() |
| 3304 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 3305 | SharedCtor(); |
| 3306 | // @@protoc_insertion_point(constructor:dmi.PortComponentAttributes) |
| 3307 | } |
| 3308 | PortComponentAttributes::PortComponentAttributes(const PortComponentAttributes& from) |
| 3309 | : ::google::protobuf::Message(), |
| 3310 | _internal_metadata_(nullptr) { |
| 3311 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 3312 | physical_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3313 | if (from.physical_label().size() > 0) { |
| 3314 | physical_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.physical_label_); |
| 3315 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3316 | mapping_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3317 | if (from.mapping_label().size() > 0) { |
| 3318 | mapping_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mapping_label_); |
| 3319 | } |
| 3320 | if (from.has_pon_id_config()) { |
| 3321 | pon_id_config_ = new ::dmi::PonIdConfig(*from.pon_id_config_); |
| 3322 | } else { |
| 3323 | pon_id_config_ = nullptr; |
| 3324 | } |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3325 | if (from.has_distance()) { |
| 3326 | distance_ = new ::dmi::PonDistance(*from.distance_); |
| 3327 | } else { |
| 3328 | distance_ = nullptr; |
| 3329 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3330 | ::memcpy(&connector_type_, &from.connector_type_, |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3331 | static_cast<size_t>(reinterpret_cast<char*>(&speed_autonegotiation_) - |
| 3332 | reinterpret_cast<char*>(&connector_type_)) + sizeof(speed_autonegotiation_)); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3333 | // @@protoc_insertion_point(copy_constructor:dmi.PortComponentAttributes) |
| 3334 | } |
| 3335 | |
| 3336 | void PortComponentAttributes::SharedCtor() { |
| 3337 | ::google::protobuf::internal::InitSCC( |
| 3338 | &scc_info_PortComponentAttributes_dmi_2fhw_2eproto.base); |
| 3339 | physical_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3340 | mapping_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3341 | ::memset(&pon_id_config_, 0, static_cast<size_t>( |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3342 | reinterpret_cast<char*>(&speed_autonegotiation_) - |
| 3343 | reinterpret_cast<char*>(&pon_id_config_)) + sizeof(speed_autonegotiation_)); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3344 | } |
| 3345 | |
| 3346 | PortComponentAttributes::~PortComponentAttributes() { |
| 3347 | // @@protoc_insertion_point(destructor:dmi.PortComponentAttributes) |
| 3348 | SharedDtor(); |
| 3349 | } |
| 3350 | |
| 3351 | void PortComponentAttributes::SharedDtor() { |
| 3352 | physical_label_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3353 | mapping_label_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3354 | if (this != internal_default_instance()) delete pon_id_config_; |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3355 | if (this != internal_default_instance()) delete distance_; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3356 | } |
| 3357 | |
| 3358 | void PortComponentAttributes::SetCachedSize(int size) const { |
| 3359 | _cached_size_.Set(size); |
| 3360 | } |
| 3361 | const PortComponentAttributes& PortComponentAttributes::default_instance() { |
| 3362 | ::google::protobuf::internal::InitSCC(&::scc_info_PortComponentAttributes_dmi_2fhw_2eproto.base); |
| 3363 | return *internal_default_instance(); |
| 3364 | } |
| 3365 | |
| 3366 | |
| 3367 | void PortComponentAttributes::Clear() { |
| 3368 | // @@protoc_insertion_point(message_clear_start:dmi.PortComponentAttributes) |
| 3369 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3370 | // Prevent compiler warnings about cached_has_bits being unused |
| 3371 | (void) cached_has_bits; |
| 3372 | |
| 3373 | physical_label_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3374 | mapping_label_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3375 | if (GetArenaNoVirtual() == nullptr && pon_id_config_ != nullptr) { |
| 3376 | delete pon_id_config_; |
| 3377 | } |
| 3378 | pon_id_config_ = nullptr; |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3379 | if (GetArenaNoVirtual() == nullptr && distance_ != nullptr) { |
| 3380 | delete distance_; |
| 3381 | } |
| 3382 | distance_ = nullptr; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3383 | ::memset(&connector_type_, 0, static_cast<size_t>( |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3384 | reinterpret_cast<char*>(&speed_autonegotiation_) - |
| 3385 | reinterpret_cast<char*>(&connector_type_)) + sizeof(speed_autonegotiation_)); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3386 | _internal_metadata_.Clear(); |
| 3387 | } |
| 3388 | |
| 3389 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 3390 | const char* PortComponentAttributes::_InternalParse(const char* begin, const char* end, void* object, |
| 3391 | ::google::protobuf::internal::ParseContext* ctx) { |
| 3392 | auto msg = static_cast<PortComponentAttributes*>(object); |
| 3393 | ::google::protobuf::int32 size; (void)size; |
| 3394 | int depth; (void)depth; |
| 3395 | ::google::protobuf::uint32 tag; |
| 3396 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 3397 | auto ptr = begin; |
| 3398 | while (ptr < end) { |
| 3399 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 3400 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3401 | switch (tag >> 3) { |
| 3402 | // .dmi.PortComponentAttributes.ConnectorType connector_type = 1; |
| 3403 | case 1: { |
| 3404 | if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; |
| 3405 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 3406 | msg->set_connector_type(static_cast<::dmi::PortComponentAttributes_ConnectorType>(val)); |
| 3407 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3408 | break; |
| 3409 | } |
| 3410 | // .dmi.PortComponentAttributes.Speed speed = 2; |
| 3411 | case 2: { |
| 3412 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 3413 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 3414 | msg->set_speed(static_cast<::dmi::PortComponentAttributes_Speed>(val)); |
| 3415 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3416 | break; |
| 3417 | } |
| 3418 | // .dmi.PortComponentAttributes.Protocol protocol = 3; |
| 3419 | case 3: { |
| 3420 | if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; |
| 3421 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 3422 | msg->set_protocol(static_cast<::dmi::PortComponentAttributes_Protocol>(val)); |
| 3423 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3424 | break; |
| 3425 | } |
| 3426 | // string physical_label = 4; |
| 3427 | case 4: { |
| 3428 | if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; |
| 3429 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 3430 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3431 | ctx->extra_parse_data().SetFieldName("dmi.PortComponentAttributes.physical_label"); |
| 3432 | object = msg->mutable_physical_label(); |
| 3433 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 3434 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 3435 | goto string_till_end; |
| 3436 | } |
| 3437 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 3438 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 3439 | ptr += size; |
| 3440 | break; |
| 3441 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3442 | // string mapping_label = 5; |
| 3443 | case 5: { |
| 3444 | if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; |
| 3445 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 3446 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3447 | ctx->extra_parse_data().SetFieldName("dmi.PortComponentAttributes.mapping_label"); |
| 3448 | object = msg->mutable_mapping_label(); |
| 3449 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 3450 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 3451 | goto string_till_end; |
| 3452 | } |
| 3453 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 3454 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 3455 | ptr += size; |
| 3456 | break; |
| 3457 | } |
| 3458 | // .dmi.PonIdConfig pon_id_config = 6; |
| 3459 | case 6: { |
| 3460 | if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; |
| 3461 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 3462 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3463 | parser_till_end = ::dmi::PonIdConfig::_InternalParse; |
| 3464 | object = msg->mutable_pon_id_config(); |
| 3465 | if (size > end - ptr) goto len_delim_till_end; |
| 3466 | ptr += size; |
| 3467 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 3468 | {parser_till_end, object}, ptr - size, ptr)); |
| 3469 | break; |
| 3470 | } |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3471 | // bool speed_autonegotiation = 7; |
| 3472 | case 7: { |
| 3473 | if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual; |
| 3474 | msg->set_speed_autonegotiation(::google::protobuf::internal::ReadVarint(&ptr)); |
| 3475 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3476 | break; |
| 3477 | } |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3478 | // .dmi.PonDistance distance = 8; |
| 3479 | case 8: { |
| 3480 | if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual; |
| 3481 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 3482 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3483 | parser_till_end = ::dmi::PonDistance::_InternalParse; |
| 3484 | object = msg->mutable_distance(); |
| 3485 | if (size > end - ptr) goto len_delim_till_end; |
| 3486 | ptr += size; |
| 3487 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 3488 | {parser_till_end, object}, ptr - size, ptr)); |
| 3489 | break; |
| 3490 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3491 | default: { |
| 3492 | handle_unusual: |
| 3493 | if ((tag & 7) == 4 || tag == 0) { |
| 3494 | ctx->EndGroup(tag); |
| 3495 | return ptr; |
| 3496 | } |
| 3497 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 3498 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 3499 | ptr = res.first; |
| 3500 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 3501 | if (res.second) return ptr; |
| 3502 | } |
| 3503 | } // switch |
| 3504 | } // while |
| 3505 | return ptr; |
| 3506 | string_till_end: |
| 3507 | static_cast<::std::string*>(object)->clear(); |
| 3508 | static_cast<::std::string*>(object)->reserve(size); |
| 3509 | goto len_delim_till_end; |
| 3510 | len_delim_till_end: |
| 3511 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 3512 | {parser_till_end, object}, size); |
| 3513 | } |
| 3514 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 3515 | bool PortComponentAttributes::MergePartialFromCodedStream( |
| 3516 | ::google::protobuf::io::CodedInputStream* input) { |
| 3517 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 3518 | ::google::protobuf::uint32 tag; |
| 3519 | // @@protoc_insertion_point(parse_start:dmi.PortComponentAttributes) |
| 3520 | for (;;) { |
| 3521 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 3522 | tag = p.first; |
| 3523 | if (!p.second) goto handle_unusual; |
| 3524 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 3525 | // .dmi.PortComponentAttributes.ConnectorType connector_type = 1; |
| 3526 | case 1: { |
| 3527 | if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { |
| 3528 | int value = 0; |
| 3529 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 3530 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 3531 | input, &value))); |
| 3532 | set_connector_type(static_cast< ::dmi::PortComponentAttributes_ConnectorType >(value)); |
| 3533 | } else { |
| 3534 | goto handle_unusual; |
| 3535 | } |
| 3536 | break; |
| 3537 | } |
| 3538 | |
| 3539 | // .dmi.PortComponentAttributes.Speed speed = 2; |
| 3540 | case 2: { |
| 3541 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 3542 | int value = 0; |
| 3543 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 3544 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 3545 | input, &value))); |
| 3546 | set_speed(static_cast< ::dmi::PortComponentAttributes_Speed >(value)); |
| 3547 | } else { |
| 3548 | goto handle_unusual; |
| 3549 | } |
| 3550 | break; |
| 3551 | } |
| 3552 | |
| 3553 | // .dmi.PortComponentAttributes.Protocol protocol = 3; |
| 3554 | case 3: { |
| 3555 | if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { |
| 3556 | int value = 0; |
| 3557 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 3558 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 3559 | input, &value))); |
| 3560 | set_protocol(static_cast< ::dmi::PortComponentAttributes_Protocol >(value)); |
| 3561 | } else { |
| 3562 | goto handle_unusual; |
| 3563 | } |
| 3564 | break; |
| 3565 | } |
| 3566 | |
| 3567 | // string physical_label = 4; |
| 3568 | case 4: { |
| 3569 | if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { |
| 3570 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 3571 | input, this->mutable_physical_label())); |
| 3572 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3573 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 3574 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 3575 | "dmi.PortComponentAttributes.physical_label")); |
| 3576 | } else { |
| 3577 | goto handle_unusual; |
| 3578 | } |
| 3579 | break; |
| 3580 | } |
| 3581 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3582 | // string mapping_label = 5; |
| 3583 | case 5: { |
| 3584 | if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { |
| 3585 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 3586 | input, this->mutable_mapping_label())); |
| 3587 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3588 | this->mapping_label().data(), static_cast<int>(this->mapping_label().length()), |
| 3589 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 3590 | "dmi.PortComponentAttributes.mapping_label")); |
| 3591 | } else { |
| 3592 | goto handle_unusual; |
| 3593 | } |
| 3594 | break; |
| 3595 | } |
| 3596 | |
| 3597 | // .dmi.PonIdConfig pon_id_config = 6; |
| 3598 | case 6: { |
| 3599 | if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { |
| 3600 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 3601 | input, mutable_pon_id_config())); |
| 3602 | } else { |
| 3603 | goto handle_unusual; |
| 3604 | } |
| 3605 | break; |
| 3606 | } |
| 3607 | |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3608 | // bool speed_autonegotiation = 7; |
| 3609 | case 7: { |
| 3610 | if (static_cast< ::google::protobuf::uint8>(tag) == (56 & 0xFF)) { |
| 3611 | |
| 3612 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 3613 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 3614 | input, &speed_autonegotiation_))); |
| 3615 | } else { |
| 3616 | goto handle_unusual; |
| 3617 | } |
| 3618 | break; |
| 3619 | } |
| 3620 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3621 | // .dmi.PonDistance distance = 8; |
| 3622 | case 8: { |
| 3623 | if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) { |
| 3624 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 3625 | input, mutable_distance())); |
| 3626 | } else { |
| 3627 | goto handle_unusual; |
| 3628 | } |
| 3629 | break; |
| 3630 | } |
| 3631 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3632 | default: { |
| 3633 | handle_unusual: |
| 3634 | if (tag == 0) { |
| 3635 | goto success; |
| 3636 | } |
| 3637 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 3638 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 3639 | break; |
| 3640 | } |
| 3641 | } |
| 3642 | } |
| 3643 | success: |
| 3644 | // @@protoc_insertion_point(parse_success:dmi.PortComponentAttributes) |
| 3645 | return true; |
| 3646 | failure: |
| 3647 | // @@protoc_insertion_point(parse_failure:dmi.PortComponentAttributes) |
| 3648 | return false; |
| 3649 | #undef DO_ |
| 3650 | } |
| 3651 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 3652 | |
| 3653 | void PortComponentAttributes::SerializeWithCachedSizes( |
| 3654 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 3655 | // @@protoc_insertion_point(serialize_start:dmi.PortComponentAttributes) |
| 3656 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3657 | (void) cached_has_bits; |
| 3658 | |
| 3659 | // .dmi.PortComponentAttributes.ConnectorType connector_type = 1; |
| 3660 | if (this->connector_type() != 0) { |
| 3661 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 3662 | 1, this->connector_type(), output); |
| 3663 | } |
| 3664 | |
| 3665 | // .dmi.PortComponentAttributes.Speed speed = 2; |
| 3666 | if (this->speed() != 0) { |
| 3667 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 3668 | 2, this->speed(), output); |
| 3669 | } |
| 3670 | |
| 3671 | // .dmi.PortComponentAttributes.Protocol protocol = 3; |
| 3672 | if (this->protocol() != 0) { |
| 3673 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 3674 | 3, this->protocol(), output); |
| 3675 | } |
| 3676 | |
| 3677 | // string physical_label = 4; |
| 3678 | if (this->physical_label().size() > 0) { |
| 3679 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3680 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 3681 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3682 | "dmi.PortComponentAttributes.physical_label"); |
| 3683 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 3684 | 4, this->physical_label(), output); |
| 3685 | } |
| 3686 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3687 | // string mapping_label = 5; |
| 3688 | if (this->mapping_label().size() > 0) { |
| 3689 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3690 | this->mapping_label().data(), static_cast<int>(this->mapping_label().length()), |
| 3691 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3692 | "dmi.PortComponentAttributes.mapping_label"); |
| 3693 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 3694 | 5, this->mapping_label(), output); |
| 3695 | } |
| 3696 | |
| 3697 | // .dmi.PonIdConfig pon_id_config = 6; |
| 3698 | if (this->has_pon_id_config()) { |
| 3699 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3700 | 6, HasBitSetters::pon_id_config(this), output); |
| 3701 | } |
| 3702 | |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3703 | // bool speed_autonegotiation = 7; |
| 3704 | if (this->speed_autonegotiation() != 0) { |
| 3705 | ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->speed_autonegotiation(), output); |
| 3706 | } |
| 3707 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3708 | // .dmi.PonDistance distance = 8; |
| 3709 | if (this->has_distance()) { |
| 3710 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3711 | 8, HasBitSetters::distance(this), output); |
| 3712 | } |
| 3713 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3714 | if (_internal_metadata_.have_unknown_fields()) { |
| 3715 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 3716 | _internal_metadata_.unknown_fields(), output); |
| 3717 | } |
| 3718 | // @@protoc_insertion_point(serialize_end:dmi.PortComponentAttributes) |
| 3719 | } |
| 3720 | |
| 3721 | ::google::protobuf::uint8* PortComponentAttributes::InternalSerializeWithCachedSizesToArray( |
| 3722 | ::google::protobuf::uint8* target) const { |
| 3723 | // @@protoc_insertion_point(serialize_to_array_start:dmi.PortComponentAttributes) |
| 3724 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3725 | (void) cached_has_bits; |
| 3726 | |
| 3727 | // .dmi.PortComponentAttributes.ConnectorType connector_type = 1; |
| 3728 | if (this->connector_type() != 0) { |
| 3729 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 3730 | 1, this->connector_type(), target); |
| 3731 | } |
| 3732 | |
| 3733 | // .dmi.PortComponentAttributes.Speed speed = 2; |
| 3734 | if (this->speed() != 0) { |
| 3735 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 3736 | 2, this->speed(), target); |
| 3737 | } |
| 3738 | |
| 3739 | // .dmi.PortComponentAttributes.Protocol protocol = 3; |
| 3740 | if (this->protocol() != 0) { |
| 3741 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 3742 | 3, this->protocol(), target); |
| 3743 | } |
| 3744 | |
| 3745 | // string physical_label = 4; |
| 3746 | if (this->physical_label().size() > 0) { |
| 3747 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3748 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 3749 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3750 | "dmi.PortComponentAttributes.physical_label"); |
| 3751 | target = |
| 3752 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 3753 | 4, this->physical_label(), target); |
| 3754 | } |
| 3755 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3756 | // string mapping_label = 5; |
| 3757 | if (this->mapping_label().size() > 0) { |
| 3758 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3759 | this->mapping_label().data(), static_cast<int>(this->mapping_label().length()), |
| 3760 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3761 | "dmi.PortComponentAttributes.mapping_label"); |
| 3762 | target = |
| 3763 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 3764 | 5, this->mapping_label(), target); |
| 3765 | } |
| 3766 | |
| 3767 | // .dmi.PonIdConfig pon_id_config = 6; |
| 3768 | if (this->has_pon_id_config()) { |
| 3769 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3770 | InternalWriteMessageToArray( |
| 3771 | 6, HasBitSetters::pon_id_config(this), target); |
| 3772 | } |
| 3773 | |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3774 | // bool speed_autonegotiation = 7; |
| 3775 | if (this->speed_autonegotiation() != 0) { |
| 3776 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->speed_autonegotiation(), target); |
| 3777 | } |
| 3778 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3779 | // .dmi.PonDistance distance = 8; |
| 3780 | if (this->has_distance()) { |
| 3781 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3782 | InternalWriteMessageToArray( |
| 3783 | 8, HasBitSetters::distance(this), target); |
| 3784 | } |
| 3785 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3786 | if (_internal_metadata_.have_unknown_fields()) { |
| 3787 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 3788 | _internal_metadata_.unknown_fields(), target); |
| 3789 | } |
| 3790 | // @@protoc_insertion_point(serialize_to_array_end:dmi.PortComponentAttributes) |
| 3791 | return target; |
| 3792 | } |
| 3793 | |
| 3794 | size_t PortComponentAttributes::ByteSizeLong() const { |
| 3795 | // @@protoc_insertion_point(message_byte_size_start:dmi.PortComponentAttributes) |
| 3796 | size_t total_size = 0; |
| 3797 | |
| 3798 | if (_internal_metadata_.have_unknown_fields()) { |
| 3799 | total_size += |
| 3800 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 3801 | _internal_metadata_.unknown_fields()); |
| 3802 | } |
| 3803 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3804 | // Prevent compiler warnings about cached_has_bits being unused |
| 3805 | (void) cached_has_bits; |
| 3806 | |
| 3807 | // string physical_label = 4; |
| 3808 | if (this->physical_label().size() > 0) { |
| 3809 | total_size += 1 + |
| 3810 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3811 | this->physical_label()); |
| 3812 | } |
| 3813 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3814 | // string mapping_label = 5; |
| 3815 | if (this->mapping_label().size() > 0) { |
| 3816 | total_size += 1 + |
| 3817 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3818 | this->mapping_label()); |
| 3819 | } |
| 3820 | |
| 3821 | // .dmi.PonIdConfig pon_id_config = 6; |
| 3822 | if (this->has_pon_id_config()) { |
| 3823 | total_size += 1 + |
| 3824 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 3825 | *pon_id_config_); |
| 3826 | } |
| 3827 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3828 | // .dmi.PonDistance distance = 8; |
| 3829 | if (this->has_distance()) { |
| 3830 | total_size += 1 + |
| 3831 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 3832 | *distance_); |
| 3833 | } |
| 3834 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3835 | // .dmi.PortComponentAttributes.ConnectorType connector_type = 1; |
| 3836 | if (this->connector_type() != 0) { |
| 3837 | total_size += 1 + |
| 3838 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->connector_type()); |
| 3839 | } |
| 3840 | |
| 3841 | // .dmi.PortComponentAttributes.Speed speed = 2; |
| 3842 | if (this->speed() != 0) { |
| 3843 | total_size += 1 + |
| 3844 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->speed()); |
| 3845 | } |
| 3846 | |
| 3847 | // .dmi.PortComponentAttributes.Protocol protocol = 3; |
| 3848 | if (this->protocol() != 0) { |
| 3849 | total_size += 1 + |
| 3850 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->protocol()); |
| 3851 | } |
| 3852 | |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3853 | // bool speed_autonegotiation = 7; |
| 3854 | if (this->speed_autonegotiation() != 0) { |
| 3855 | total_size += 1 + 1; |
| 3856 | } |
| 3857 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3858 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 3859 | SetCachedSize(cached_size); |
| 3860 | return total_size; |
| 3861 | } |
| 3862 | |
| 3863 | void PortComponentAttributes::MergeFrom(const ::google::protobuf::Message& from) { |
| 3864 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.PortComponentAttributes) |
| 3865 | GOOGLE_DCHECK_NE(&from, this); |
| 3866 | const PortComponentAttributes* source = |
| 3867 | ::google::protobuf::DynamicCastToGenerated<PortComponentAttributes>( |
| 3868 | &from); |
| 3869 | if (source == nullptr) { |
| 3870 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.PortComponentAttributes) |
| 3871 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 3872 | } else { |
| 3873 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.PortComponentAttributes) |
| 3874 | MergeFrom(*source); |
| 3875 | } |
| 3876 | } |
| 3877 | |
| 3878 | void PortComponentAttributes::MergeFrom(const PortComponentAttributes& from) { |
| 3879 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.PortComponentAttributes) |
| 3880 | GOOGLE_DCHECK_NE(&from, this); |
| 3881 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 3882 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3883 | (void) cached_has_bits; |
| 3884 | |
| 3885 | if (from.physical_label().size() > 0) { |
| 3886 | |
| 3887 | physical_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.physical_label_); |
| 3888 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3889 | if (from.mapping_label().size() > 0) { |
| 3890 | |
| 3891 | mapping_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mapping_label_); |
| 3892 | } |
| 3893 | if (from.has_pon_id_config()) { |
| 3894 | mutable_pon_id_config()->::dmi::PonIdConfig::MergeFrom(from.pon_id_config()); |
| 3895 | } |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3896 | if (from.has_distance()) { |
| 3897 | mutable_distance()->::dmi::PonDistance::MergeFrom(from.distance()); |
| 3898 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3899 | if (from.connector_type() != 0) { |
| 3900 | set_connector_type(from.connector_type()); |
| 3901 | } |
| 3902 | if (from.speed() != 0) { |
| 3903 | set_speed(from.speed()); |
| 3904 | } |
| 3905 | if (from.protocol() != 0) { |
| 3906 | set_protocol(from.protocol()); |
| 3907 | } |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3908 | if (from.speed_autonegotiation() != 0) { |
| 3909 | set_speed_autonegotiation(from.speed_autonegotiation()); |
| 3910 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3911 | } |
| 3912 | |
| 3913 | void PortComponentAttributes::CopyFrom(const ::google::protobuf::Message& from) { |
| 3914 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.PortComponentAttributes) |
| 3915 | if (&from == this) return; |
| 3916 | Clear(); |
| 3917 | MergeFrom(from); |
| 3918 | } |
| 3919 | |
| 3920 | void PortComponentAttributes::CopyFrom(const PortComponentAttributes& from) { |
| 3921 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.PortComponentAttributes) |
| 3922 | if (&from == this) return; |
| 3923 | Clear(); |
| 3924 | MergeFrom(from); |
| 3925 | } |
| 3926 | |
| 3927 | bool PortComponentAttributes::IsInitialized() const { |
| 3928 | return true; |
| 3929 | } |
| 3930 | |
| 3931 | void PortComponentAttributes::Swap(PortComponentAttributes* other) { |
| 3932 | if (other == this) return; |
| 3933 | InternalSwap(other); |
| 3934 | } |
| 3935 | void PortComponentAttributes::InternalSwap(PortComponentAttributes* other) { |
| 3936 | using std::swap; |
| 3937 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 3938 | physical_label_.Swap(&other->physical_label_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3939 | GetArenaNoVirtual()); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3940 | mapping_label_.Swap(&other->mapping_label_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3941 | GetArenaNoVirtual()); |
| 3942 | swap(pon_id_config_, other->pon_id_config_); |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3943 | swap(distance_, other->distance_); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3944 | swap(connector_type_, other->connector_type_); |
| 3945 | swap(speed_, other->speed_); |
| 3946 | swap(protocol_, other->protocol_); |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3947 | swap(speed_autonegotiation_, other->speed_autonegotiation_); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3948 | } |
| 3949 | |
| 3950 | ::google::protobuf::Metadata PortComponentAttributes::GetMetadata() const { |
| 3951 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 3952 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 3953 | } |
| 3954 | |
| 3955 | |
| 3956 | // =================================================================== |
| 3957 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 3958 | void PonDistance::InitAsDefaultInstance() { |
| 3959 | } |
| 3960 | class PonDistance::HasBitSetters { |
| 3961 | public: |
| 3962 | }; |
| 3963 | |
| 3964 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 3965 | const int PonDistance::kMaxDistanceFieldNumber; |
| 3966 | const int PonDistance::kMaxDifferentialDistanceFieldNumber; |
| 3967 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 3968 | |
| 3969 | PonDistance::PonDistance() |
| 3970 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 3971 | SharedCtor(); |
| 3972 | // @@protoc_insertion_point(constructor:dmi.PonDistance) |
| 3973 | } |
| 3974 | PonDistance::PonDistance(const PonDistance& from) |
| 3975 | : ::google::protobuf::Message(), |
| 3976 | _internal_metadata_(nullptr) { |
| 3977 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 3978 | ::memcpy(&max_distance_, &from.max_distance_, |
| 3979 | static_cast<size_t>(reinterpret_cast<char*>(&max_differential_distance_) - |
| 3980 | reinterpret_cast<char*>(&max_distance_)) + sizeof(max_differential_distance_)); |
| 3981 | // @@protoc_insertion_point(copy_constructor:dmi.PonDistance) |
| 3982 | } |
| 3983 | |
| 3984 | void PonDistance::SharedCtor() { |
| 3985 | ::memset(&max_distance_, 0, static_cast<size_t>( |
| 3986 | reinterpret_cast<char*>(&max_differential_distance_) - |
| 3987 | reinterpret_cast<char*>(&max_distance_)) + sizeof(max_differential_distance_)); |
| 3988 | } |
| 3989 | |
| 3990 | PonDistance::~PonDistance() { |
| 3991 | // @@protoc_insertion_point(destructor:dmi.PonDistance) |
| 3992 | SharedDtor(); |
| 3993 | } |
| 3994 | |
| 3995 | void PonDistance::SharedDtor() { |
| 3996 | } |
| 3997 | |
| 3998 | void PonDistance::SetCachedSize(int size) const { |
| 3999 | _cached_size_.Set(size); |
| 4000 | } |
| 4001 | const PonDistance& PonDistance::default_instance() { |
| 4002 | ::google::protobuf::internal::InitSCC(&::scc_info_PonDistance_dmi_2fhw_2eproto.base); |
| 4003 | return *internal_default_instance(); |
| 4004 | } |
| 4005 | |
| 4006 | |
| 4007 | void PonDistance::Clear() { |
| 4008 | // @@protoc_insertion_point(message_clear_start:dmi.PonDistance) |
| 4009 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4010 | // Prevent compiler warnings about cached_has_bits being unused |
| 4011 | (void) cached_has_bits; |
| 4012 | |
| 4013 | ::memset(&max_distance_, 0, static_cast<size_t>( |
| 4014 | reinterpret_cast<char*>(&max_differential_distance_) - |
| 4015 | reinterpret_cast<char*>(&max_distance_)) + sizeof(max_differential_distance_)); |
| 4016 | _internal_metadata_.Clear(); |
| 4017 | } |
| 4018 | |
| 4019 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4020 | const char* PonDistance::_InternalParse(const char* begin, const char* end, void* object, |
| 4021 | ::google::protobuf::internal::ParseContext* ctx) { |
| 4022 | auto msg = static_cast<PonDistance*>(object); |
| 4023 | ::google::protobuf::int32 size; (void)size; |
| 4024 | int depth; (void)depth; |
| 4025 | ::google::protobuf::uint32 tag; |
| 4026 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 4027 | auto ptr = begin; |
| 4028 | while (ptr < end) { |
| 4029 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 4030 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4031 | switch (tag >> 3) { |
| 4032 | // uint32 max_distance = 1; |
| 4033 | case 1: { |
| 4034 | if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; |
| 4035 | msg->set_max_distance(::google::protobuf::internal::ReadVarint(&ptr)); |
| 4036 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4037 | break; |
| 4038 | } |
| 4039 | // uint32 max_differential_distance = 2; |
| 4040 | case 2: { |
| 4041 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 4042 | msg->set_max_differential_distance(::google::protobuf::internal::ReadVarint(&ptr)); |
| 4043 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4044 | break; |
| 4045 | } |
| 4046 | default: { |
| 4047 | handle_unusual: |
| 4048 | if ((tag & 7) == 4 || tag == 0) { |
| 4049 | ctx->EndGroup(tag); |
| 4050 | return ptr; |
| 4051 | } |
| 4052 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 4053 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 4054 | ptr = res.first; |
| 4055 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 4056 | if (res.second) return ptr; |
| 4057 | } |
| 4058 | } // switch |
| 4059 | } // while |
| 4060 | return ptr; |
| 4061 | } |
| 4062 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4063 | bool PonDistance::MergePartialFromCodedStream( |
| 4064 | ::google::protobuf::io::CodedInputStream* input) { |
| 4065 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 4066 | ::google::protobuf::uint32 tag; |
| 4067 | // @@protoc_insertion_point(parse_start:dmi.PonDistance) |
| 4068 | for (;;) { |
| 4069 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 4070 | tag = p.first; |
| 4071 | if (!p.second) goto handle_unusual; |
| 4072 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 4073 | // uint32 max_distance = 1; |
| 4074 | case 1: { |
| 4075 | if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { |
| 4076 | |
| 4077 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4078 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 4079 | input, &max_distance_))); |
| 4080 | } else { |
| 4081 | goto handle_unusual; |
| 4082 | } |
| 4083 | break; |
| 4084 | } |
| 4085 | |
| 4086 | // uint32 max_differential_distance = 2; |
| 4087 | case 2: { |
| 4088 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 4089 | |
| 4090 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4091 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 4092 | input, &max_differential_distance_))); |
| 4093 | } else { |
| 4094 | goto handle_unusual; |
| 4095 | } |
| 4096 | break; |
| 4097 | } |
| 4098 | |
| 4099 | default: { |
| 4100 | handle_unusual: |
| 4101 | if (tag == 0) { |
| 4102 | goto success; |
| 4103 | } |
| 4104 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 4105 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 4106 | break; |
| 4107 | } |
| 4108 | } |
| 4109 | } |
| 4110 | success: |
| 4111 | // @@protoc_insertion_point(parse_success:dmi.PonDistance) |
| 4112 | return true; |
| 4113 | failure: |
| 4114 | // @@protoc_insertion_point(parse_failure:dmi.PonDistance) |
| 4115 | return false; |
| 4116 | #undef DO_ |
| 4117 | } |
| 4118 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4119 | |
| 4120 | void PonDistance::SerializeWithCachedSizes( |
| 4121 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 4122 | // @@protoc_insertion_point(serialize_start:dmi.PonDistance) |
| 4123 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4124 | (void) cached_has_bits; |
| 4125 | |
| 4126 | // uint32 max_distance = 1; |
| 4127 | if (this->max_distance() != 0) { |
| 4128 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->max_distance(), output); |
| 4129 | } |
| 4130 | |
| 4131 | // uint32 max_differential_distance = 2; |
| 4132 | if (this->max_differential_distance() != 0) { |
| 4133 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->max_differential_distance(), output); |
| 4134 | } |
| 4135 | |
| 4136 | if (_internal_metadata_.have_unknown_fields()) { |
| 4137 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 4138 | _internal_metadata_.unknown_fields(), output); |
| 4139 | } |
| 4140 | // @@protoc_insertion_point(serialize_end:dmi.PonDistance) |
| 4141 | } |
| 4142 | |
| 4143 | ::google::protobuf::uint8* PonDistance::InternalSerializeWithCachedSizesToArray( |
| 4144 | ::google::protobuf::uint8* target) const { |
| 4145 | // @@protoc_insertion_point(serialize_to_array_start:dmi.PonDistance) |
| 4146 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4147 | (void) cached_has_bits; |
| 4148 | |
| 4149 | // uint32 max_distance = 1; |
| 4150 | if (this->max_distance() != 0) { |
| 4151 | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->max_distance(), target); |
| 4152 | } |
| 4153 | |
| 4154 | // uint32 max_differential_distance = 2; |
| 4155 | if (this->max_differential_distance() != 0) { |
| 4156 | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->max_differential_distance(), target); |
| 4157 | } |
| 4158 | |
| 4159 | if (_internal_metadata_.have_unknown_fields()) { |
| 4160 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 4161 | _internal_metadata_.unknown_fields(), target); |
| 4162 | } |
| 4163 | // @@protoc_insertion_point(serialize_to_array_end:dmi.PonDistance) |
| 4164 | return target; |
| 4165 | } |
| 4166 | |
| 4167 | size_t PonDistance::ByteSizeLong() const { |
| 4168 | // @@protoc_insertion_point(message_byte_size_start:dmi.PonDistance) |
| 4169 | size_t total_size = 0; |
| 4170 | |
| 4171 | if (_internal_metadata_.have_unknown_fields()) { |
| 4172 | total_size += |
| 4173 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 4174 | _internal_metadata_.unknown_fields()); |
| 4175 | } |
| 4176 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4177 | // Prevent compiler warnings about cached_has_bits being unused |
| 4178 | (void) cached_has_bits; |
| 4179 | |
| 4180 | // uint32 max_distance = 1; |
| 4181 | if (this->max_distance() != 0) { |
| 4182 | total_size += 1 + |
| 4183 | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
| 4184 | this->max_distance()); |
| 4185 | } |
| 4186 | |
| 4187 | // uint32 max_differential_distance = 2; |
| 4188 | if (this->max_differential_distance() != 0) { |
| 4189 | total_size += 1 + |
| 4190 | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
| 4191 | this->max_differential_distance()); |
| 4192 | } |
| 4193 | |
| 4194 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 4195 | SetCachedSize(cached_size); |
| 4196 | return total_size; |
| 4197 | } |
| 4198 | |
| 4199 | void PonDistance::MergeFrom(const ::google::protobuf::Message& from) { |
| 4200 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.PonDistance) |
| 4201 | GOOGLE_DCHECK_NE(&from, this); |
| 4202 | const PonDistance* source = |
| 4203 | ::google::protobuf::DynamicCastToGenerated<PonDistance>( |
| 4204 | &from); |
| 4205 | if (source == nullptr) { |
| 4206 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.PonDistance) |
| 4207 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 4208 | } else { |
| 4209 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.PonDistance) |
| 4210 | MergeFrom(*source); |
| 4211 | } |
| 4212 | } |
| 4213 | |
| 4214 | void PonDistance::MergeFrom(const PonDistance& from) { |
| 4215 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.PonDistance) |
| 4216 | GOOGLE_DCHECK_NE(&from, this); |
| 4217 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4218 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4219 | (void) cached_has_bits; |
| 4220 | |
| 4221 | if (from.max_distance() != 0) { |
| 4222 | set_max_distance(from.max_distance()); |
| 4223 | } |
| 4224 | if (from.max_differential_distance() != 0) { |
| 4225 | set_max_differential_distance(from.max_differential_distance()); |
| 4226 | } |
| 4227 | } |
| 4228 | |
| 4229 | void PonDistance::CopyFrom(const ::google::protobuf::Message& from) { |
| 4230 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.PonDistance) |
| 4231 | if (&from == this) return; |
| 4232 | Clear(); |
| 4233 | MergeFrom(from); |
| 4234 | } |
| 4235 | |
| 4236 | void PonDistance::CopyFrom(const PonDistance& from) { |
| 4237 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.PonDistance) |
| 4238 | if (&from == this) return; |
| 4239 | Clear(); |
| 4240 | MergeFrom(from); |
| 4241 | } |
| 4242 | |
| 4243 | bool PonDistance::IsInitialized() const { |
| 4244 | return true; |
| 4245 | } |
| 4246 | |
| 4247 | void PonDistance::Swap(PonDistance* other) { |
| 4248 | if (other == this) return; |
| 4249 | InternalSwap(other); |
| 4250 | } |
| 4251 | void PonDistance::InternalSwap(PonDistance* other) { |
| 4252 | using std::swap; |
| 4253 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 4254 | swap(max_distance_, other->max_distance_); |
| 4255 | swap(max_differential_distance_, other->max_differential_distance_); |
| 4256 | } |
| 4257 | |
| 4258 | ::google::protobuf::Metadata PonDistance::GetMetadata() const { |
| 4259 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 4260 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 4261 | } |
| 4262 | |
| 4263 | |
| 4264 | // =================================================================== |
| 4265 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4266 | void PortComponentChangeAttributes::InitAsDefaultInstance() { |
| 4267 | ::dmi::_PortComponentChangeAttributes_default_instance_._instance.get_mutable()->pon_id_config_ = const_cast< ::dmi::PonIdConfig*>( |
| 4268 | ::dmi::PonIdConfig::internal_default_instance()); |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4269 | ::dmi::_PortComponentChangeAttributes_default_instance_._instance.get_mutable()->distance_ = const_cast< ::dmi::PonDistance*>( |
| 4270 | ::dmi::PonDistance::internal_default_instance()); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4271 | } |
| 4272 | class PortComponentChangeAttributes::HasBitSetters { |
| 4273 | public: |
| 4274 | static const ::dmi::PonIdConfig& pon_id_config(const PortComponentChangeAttributes* msg); |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4275 | static const ::dmi::PonDistance& distance(const PortComponentChangeAttributes* msg); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4276 | }; |
| 4277 | |
| 4278 | const ::dmi::PonIdConfig& |
| 4279 | PortComponentChangeAttributes::HasBitSetters::pon_id_config(const PortComponentChangeAttributes* msg) { |
| 4280 | return *msg->pon_id_config_; |
| 4281 | } |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4282 | const ::dmi::PonDistance& |
| 4283 | PortComponentChangeAttributes::HasBitSetters::distance(const PortComponentChangeAttributes* msg) { |
| 4284 | return *msg->distance_; |
| 4285 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4286 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4287 | const int PortComponentChangeAttributes::kPonIdConfigFieldNumber; |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4288 | const int PortComponentChangeAttributes::kDistanceFieldNumber; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4289 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4290 | |
| 4291 | PortComponentChangeAttributes::PortComponentChangeAttributes() |
| 4292 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 4293 | SharedCtor(); |
| 4294 | // @@protoc_insertion_point(constructor:dmi.PortComponentChangeAttributes) |
| 4295 | } |
| 4296 | PortComponentChangeAttributes::PortComponentChangeAttributes(const PortComponentChangeAttributes& from) |
| 4297 | : ::google::protobuf::Message(), |
| 4298 | _internal_metadata_(nullptr) { |
| 4299 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4300 | if (from.has_pon_id_config()) { |
| 4301 | pon_id_config_ = new ::dmi::PonIdConfig(*from.pon_id_config_); |
| 4302 | } else { |
| 4303 | pon_id_config_ = nullptr; |
| 4304 | } |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4305 | if (from.has_distance()) { |
| 4306 | distance_ = new ::dmi::PonDistance(*from.distance_); |
| 4307 | } else { |
| 4308 | distance_ = nullptr; |
| 4309 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4310 | // @@protoc_insertion_point(copy_constructor:dmi.PortComponentChangeAttributes) |
| 4311 | } |
| 4312 | |
| 4313 | void PortComponentChangeAttributes::SharedCtor() { |
| 4314 | ::google::protobuf::internal::InitSCC( |
| 4315 | &scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto.base); |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4316 | ::memset(&pon_id_config_, 0, static_cast<size_t>( |
| 4317 | reinterpret_cast<char*>(&distance_) - |
| 4318 | reinterpret_cast<char*>(&pon_id_config_)) + sizeof(distance_)); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4319 | } |
| 4320 | |
| 4321 | PortComponentChangeAttributes::~PortComponentChangeAttributes() { |
| 4322 | // @@protoc_insertion_point(destructor:dmi.PortComponentChangeAttributes) |
| 4323 | SharedDtor(); |
| 4324 | } |
| 4325 | |
| 4326 | void PortComponentChangeAttributes::SharedDtor() { |
| 4327 | if (this != internal_default_instance()) delete pon_id_config_; |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4328 | if (this != internal_default_instance()) delete distance_; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4329 | } |
| 4330 | |
| 4331 | void PortComponentChangeAttributes::SetCachedSize(int size) const { |
| 4332 | _cached_size_.Set(size); |
| 4333 | } |
| 4334 | const PortComponentChangeAttributes& PortComponentChangeAttributes::default_instance() { |
| 4335 | ::google::protobuf::internal::InitSCC(&::scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto.base); |
| 4336 | return *internal_default_instance(); |
| 4337 | } |
| 4338 | |
| 4339 | |
| 4340 | void PortComponentChangeAttributes::Clear() { |
| 4341 | // @@protoc_insertion_point(message_clear_start:dmi.PortComponentChangeAttributes) |
| 4342 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4343 | // Prevent compiler warnings about cached_has_bits being unused |
| 4344 | (void) cached_has_bits; |
| 4345 | |
| 4346 | if (GetArenaNoVirtual() == nullptr && pon_id_config_ != nullptr) { |
| 4347 | delete pon_id_config_; |
| 4348 | } |
| 4349 | pon_id_config_ = nullptr; |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4350 | if (GetArenaNoVirtual() == nullptr && distance_ != nullptr) { |
| 4351 | delete distance_; |
| 4352 | } |
| 4353 | distance_ = nullptr; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4354 | _internal_metadata_.Clear(); |
| 4355 | } |
| 4356 | |
| 4357 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4358 | const char* PortComponentChangeAttributes::_InternalParse(const char* begin, const char* end, void* object, |
| 4359 | ::google::protobuf::internal::ParseContext* ctx) { |
| 4360 | auto msg = static_cast<PortComponentChangeAttributes*>(object); |
| 4361 | ::google::protobuf::int32 size; (void)size; |
| 4362 | int depth; (void)depth; |
| 4363 | ::google::protobuf::uint32 tag; |
| 4364 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 4365 | auto ptr = begin; |
| 4366 | while (ptr < end) { |
| 4367 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 4368 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4369 | switch (tag >> 3) { |
| 4370 | // .dmi.PonIdConfig pon_id_config = 1; |
| 4371 | case 1: { |
| 4372 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 4373 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 4374 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4375 | parser_till_end = ::dmi::PonIdConfig::_InternalParse; |
| 4376 | object = msg->mutable_pon_id_config(); |
| 4377 | if (size > end - ptr) goto len_delim_till_end; |
| 4378 | ptr += size; |
| 4379 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 4380 | {parser_till_end, object}, ptr - size, ptr)); |
| 4381 | break; |
| 4382 | } |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4383 | // .dmi.PonDistance distance = 2; |
| 4384 | case 2: { |
| 4385 | if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; |
| 4386 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 4387 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4388 | parser_till_end = ::dmi::PonDistance::_InternalParse; |
| 4389 | object = msg->mutable_distance(); |
| 4390 | if (size > end - ptr) goto len_delim_till_end; |
| 4391 | ptr += size; |
| 4392 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 4393 | {parser_till_end, object}, ptr - size, ptr)); |
| 4394 | break; |
| 4395 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4396 | default: { |
| 4397 | handle_unusual: |
| 4398 | if ((tag & 7) == 4 || tag == 0) { |
| 4399 | ctx->EndGroup(tag); |
| 4400 | return ptr; |
| 4401 | } |
| 4402 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 4403 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 4404 | ptr = res.first; |
| 4405 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 4406 | if (res.second) return ptr; |
| 4407 | } |
| 4408 | } // switch |
| 4409 | } // while |
| 4410 | return ptr; |
| 4411 | len_delim_till_end: |
| 4412 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 4413 | {parser_till_end, object}, size); |
| 4414 | } |
| 4415 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4416 | bool PortComponentChangeAttributes::MergePartialFromCodedStream( |
| 4417 | ::google::protobuf::io::CodedInputStream* input) { |
| 4418 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 4419 | ::google::protobuf::uint32 tag; |
| 4420 | // @@protoc_insertion_point(parse_start:dmi.PortComponentChangeAttributes) |
| 4421 | for (;;) { |
| 4422 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 4423 | tag = p.first; |
| 4424 | if (!p.second) goto handle_unusual; |
| 4425 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 4426 | // .dmi.PonIdConfig pon_id_config = 1; |
| 4427 | case 1: { |
| 4428 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 4429 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 4430 | input, mutable_pon_id_config())); |
| 4431 | } else { |
| 4432 | goto handle_unusual; |
| 4433 | } |
| 4434 | break; |
| 4435 | } |
| 4436 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4437 | // .dmi.PonDistance distance = 2; |
| 4438 | case 2: { |
| 4439 | if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { |
| 4440 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 4441 | input, mutable_distance())); |
| 4442 | } else { |
| 4443 | goto handle_unusual; |
| 4444 | } |
| 4445 | break; |
| 4446 | } |
| 4447 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4448 | default: { |
| 4449 | handle_unusual: |
| 4450 | if (tag == 0) { |
| 4451 | goto success; |
| 4452 | } |
| 4453 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 4454 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 4455 | break; |
| 4456 | } |
| 4457 | } |
| 4458 | } |
| 4459 | success: |
| 4460 | // @@protoc_insertion_point(parse_success:dmi.PortComponentChangeAttributes) |
| 4461 | return true; |
| 4462 | failure: |
| 4463 | // @@protoc_insertion_point(parse_failure:dmi.PortComponentChangeAttributes) |
| 4464 | return false; |
| 4465 | #undef DO_ |
| 4466 | } |
| 4467 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4468 | |
| 4469 | void PortComponentChangeAttributes::SerializeWithCachedSizes( |
| 4470 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 4471 | // @@protoc_insertion_point(serialize_start:dmi.PortComponentChangeAttributes) |
| 4472 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4473 | (void) cached_has_bits; |
| 4474 | |
| 4475 | // .dmi.PonIdConfig pon_id_config = 1; |
| 4476 | if (this->has_pon_id_config()) { |
| 4477 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 4478 | 1, HasBitSetters::pon_id_config(this), output); |
| 4479 | } |
| 4480 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4481 | // .dmi.PonDistance distance = 2; |
| 4482 | if (this->has_distance()) { |
| 4483 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 4484 | 2, HasBitSetters::distance(this), output); |
| 4485 | } |
| 4486 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4487 | if (_internal_metadata_.have_unknown_fields()) { |
| 4488 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 4489 | _internal_metadata_.unknown_fields(), output); |
| 4490 | } |
| 4491 | // @@protoc_insertion_point(serialize_end:dmi.PortComponentChangeAttributes) |
| 4492 | } |
| 4493 | |
| 4494 | ::google::protobuf::uint8* PortComponentChangeAttributes::InternalSerializeWithCachedSizesToArray( |
| 4495 | ::google::protobuf::uint8* target) const { |
| 4496 | // @@protoc_insertion_point(serialize_to_array_start:dmi.PortComponentChangeAttributes) |
| 4497 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4498 | (void) cached_has_bits; |
| 4499 | |
| 4500 | // .dmi.PonIdConfig pon_id_config = 1; |
| 4501 | if (this->has_pon_id_config()) { |
| 4502 | target = ::google::protobuf::internal::WireFormatLite:: |
| 4503 | InternalWriteMessageToArray( |
| 4504 | 1, HasBitSetters::pon_id_config(this), target); |
| 4505 | } |
| 4506 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4507 | // .dmi.PonDistance distance = 2; |
| 4508 | if (this->has_distance()) { |
| 4509 | target = ::google::protobuf::internal::WireFormatLite:: |
| 4510 | InternalWriteMessageToArray( |
| 4511 | 2, HasBitSetters::distance(this), target); |
| 4512 | } |
| 4513 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4514 | if (_internal_metadata_.have_unknown_fields()) { |
| 4515 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 4516 | _internal_metadata_.unknown_fields(), target); |
| 4517 | } |
| 4518 | // @@protoc_insertion_point(serialize_to_array_end:dmi.PortComponentChangeAttributes) |
| 4519 | return target; |
| 4520 | } |
| 4521 | |
| 4522 | size_t PortComponentChangeAttributes::ByteSizeLong() const { |
| 4523 | // @@protoc_insertion_point(message_byte_size_start:dmi.PortComponentChangeAttributes) |
| 4524 | size_t total_size = 0; |
| 4525 | |
| 4526 | if (_internal_metadata_.have_unknown_fields()) { |
| 4527 | total_size += |
| 4528 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 4529 | _internal_metadata_.unknown_fields()); |
| 4530 | } |
| 4531 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4532 | // Prevent compiler warnings about cached_has_bits being unused |
| 4533 | (void) cached_has_bits; |
| 4534 | |
| 4535 | // .dmi.PonIdConfig pon_id_config = 1; |
| 4536 | if (this->has_pon_id_config()) { |
| 4537 | total_size += 1 + |
| 4538 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 4539 | *pon_id_config_); |
| 4540 | } |
| 4541 | |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4542 | // .dmi.PonDistance distance = 2; |
| 4543 | if (this->has_distance()) { |
| 4544 | total_size += 1 + |
| 4545 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 4546 | *distance_); |
| 4547 | } |
| 4548 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4549 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 4550 | SetCachedSize(cached_size); |
| 4551 | return total_size; |
| 4552 | } |
| 4553 | |
| 4554 | void PortComponentChangeAttributes::MergeFrom(const ::google::protobuf::Message& from) { |
| 4555 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.PortComponentChangeAttributes) |
| 4556 | GOOGLE_DCHECK_NE(&from, this); |
| 4557 | const PortComponentChangeAttributes* source = |
| 4558 | ::google::protobuf::DynamicCastToGenerated<PortComponentChangeAttributes>( |
| 4559 | &from); |
| 4560 | if (source == nullptr) { |
| 4561 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.PortComponentChangeAttributes) |
| 4562 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 4563 | } else { |
| 4564 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.PortComponentChangeAttributes) |
| 4565 | MergeFrom(*source); |
| 4566 | } |
| 4567 | } |
| 4568 | |
| 4569 | void PortComponentChangeAttributes::MergeFrom(const PortComponentChangeAttributes& from) { |
| 4570 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.PortComponentChangeAttributes) |
| 4571 | GOOGLE_DCHECK_NE(&from, this); |
| 4572 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4573 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4574 | (void) cached_has_bits; |
| 4575 | |
| 4576 | if (from.has_pon_id_config()) { |
| 4577 | mutable_pon_id_config()->::dmi::PonIdConfig::MergeFrom(from.pon_id_config()); |
| 4578 | } |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4579 | if (from.has_distance()) { |
| 4580 | mutable_distance()->::dmi::PonDistance::MergeFrom(from.distance()); |
| 4581 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4582 | } |
| 4583 | |
| 4584 | void PortComponentChangeAttributes::CopyFrom(const ::google::protobuf::Message& from) { |
| 4585 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.PortComponentChangeAttributes) |
| 4586 | if (&from == this) return; |
| 4587 | Clear(); |
| 4588 | MergeFrom(from); |
| 4589 | } |
| 4590 | |
| 4591 | void PortComponentChangeAttributes::CopyFrom(const PortComponentChangeAttributes& from) { |
| 4592 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.PortComponentChangeAttributes) |
| 4593 | if (&from == this) return; |
| 4594 | Clear(); |
| 4595 | MergeFrom(from); |
| 4596 | } |
| 4597 | |
| 4598 | bool PortComponentChangeAttributes::IsInitialized() const { |
| 4599 | return true; |
| 4600 | } |
| 4601 | |
| 4602 | void PortComponentChangeAttributes::Swap(PortComponentChangeAttributes* other) { |
| 4603 | if (other == this) return; |
| 4604 | InternalSwap(other); |
| 4605 | } |
| 4606 | void PortComponentChangeAttributes::InternalSwap(PortComponentChangeAttributes* other) { |
| 4607 | using std::swap; |
| 4608 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 4609 | swap(pon_id_config_, other->pon_id_config_); |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 4610 | swap(distance_, other->distance_); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4611 | } |
| 4612 | |
| 4613 | ::google::protobuf::Metadata PortComponentChangeAttributes::GetMetadata() const { |
| 4614 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 4615 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 4616 | } |
| 4617 | |
| 4618 | |
| 4619 | // =================================================================== |
| 4620 | |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 4621 | void TransceiverComponentChangeAttributes::InitAsDefaultInstance() { |
| 4622 | } |
| 4623 | class TransceiverComponentChangeAttributes::HasBitSetters { |
| 4624 | public: |
| 4625 | }; |
| 4626 | |
| 4627 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4628 | const int TransceiverComponentChangeAttributes::kTransTypeFieldNumber; |
| 4629 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4630 | |
| 4631 | TransceiverComponentChangeAttributes::TransceiverComponentChangeAttributes() |
| 4632 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 4633 | SharedCtor(); |
| 4634 | // @@protoc_insertion_point(constructor:dmi.TransceiverComponentChangeAttributes) |
| 4635 | } |
| 4636 | TransceiverComponentChangeAttributes::TransceiverComponentChangeAttributes(const TransceiverComponentChangeAttributes& from) |
| 4637 | : ::google::protobuf::Message(), |
| 4638 | _internal_metadata_(nullptr) { |
| 4639 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4640 | trans_type_ = from.trans_type_; |
| 4641 | // @@protoc_insertion_point(copy_constructor:dmi.TransceiverComponentChangeAttributes) |
| 4642 | } |
| 4643 | |
| 4644 | void TransceiverComponentChangeAttributes::SharedCtor() { |
| 4645 | trans_type_ = 0; |
| 4646 | } |
| 4647 | |
| 4648 | TransceiverComponentChangeAttributes::~TransceiverComponentChangeAttributes() { |
| 4649 | // @@protoc_insertion_point(destructor:dmi.TransceiverComponentChangeAttributes) |
| 4650 | SharedDtor(); |
| 4651 | } |
| 4652 | |
| 4653 | void TransceiverComponentChangeAttributes::SharedDtor() { |
| 4654 | } |
| 4655 | |
| 4656 | void TransceiverComponentChangeAttributes::SetCachedSize(int size) const { |
| 4657 | _cached_size_.Set(size); |
| 4658 | } |
| 4659 | const TransceiverComponentChangeAttributes& TransceiverComponentChangeAttributes::default_instance() { |
| 4660 | ::google::protobuf::internal::InitSCC(&::scc_info_TransceiverComponentChangeAttributes_dmi_2fhw_2eproto.base); |
| 4661 | return *internal_default_instance(); |
| 4662 | } |
| 4663 | |
| 4664 | |
| 4665 | void TransceiverComponentChangeAttributes::Clear() { |
| 4666 | // @@protoc_insertion_point(message_clear_start:dmi.TransceiverComponentChangeAttributes) |
| 4667 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4668 | // Prevent compiler warnings about cached_has_bits being unused |
| 4669 | (void) cached_has_bits; |
| 4670 | |
| 4671 | trans_type_ = 0; |
| 4672 | _internal_metadata_.Clear(); |
| 4673 | } |
| 4674 | |
| 4675 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4676 | const char* TransceiverComponentChangeAttributes::_InternalParse(const char* begin, const char* end, void* object, |
| 4677 | ::google::protobuf::internal::ParseContext* ctx) { |
| 4678 | auto msg = static_cast<TransceiverComponentChangeAttributes*>(object); |
| 4679 | ::google::protobuf::int32 size; (void)size; |
| 4680 | int depth; (void)depth; |
| 4681 | ::google::protobuf::uint32 tag; |
| 4682 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 4683 | auto ptr = begin; |
| 4684 | while (ptr < end) { |
| 4685 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 4686 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4687 | switch (tag >> 3) { |
| 4688 | // .dmi.TransceiverType trans_type = 1; |
| 4689 | case 1: { |
| 4690 | if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; |
| 4691 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 4692 | msg->set_trans_type(static_cast<::dmi::TransceiverType>(val)); |
| 4693 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4694 | break; |
| 4695 | } |
| 4696 | default: { |
| 4697 | handle_unusual: |
| 4698 | if ((tag & 7) == 4 || tag == 0) { |
| 4699 | ctx->EndGroup(tag); |
| 4700 | return ptr; |
| 4701 | } |
| 4702 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 4703 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 4704 | ptr = res.first; |
| 4705 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 4706 | if (res.second) return ptr; |
| 4707 | } |
| 4708 | } // switch |
| 4709 | } // while |
| 4710 | return ptr; |
| 4711 | } |
| 4712 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4713 | bool TransceiverComponentChangeAttributes::MergePartialFromCodedStream( |
| 4714 | ::google::protobuf::io::CodedInputStream* input) { |
| 4715 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 4716 | ::google::protobuf::uint32 tag; |
| 4717 | // @@protoc_insertion_point(parse_start:dmi.TransceiverComponentChangeAttributes) |
| 4718 | for (;;) { |
| 4719 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 4720 | tag = p.first; |
| 4721 | if (!p.second) goto handle_unusual; |
| 4722 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 4723 | // .dmi.TransceiverType trans_type = 1; |
| 4724 | case 1: { |
| 4725 | if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { |
| 4726 | int value = 0; |
| 4727 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4728 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 4729 | input, &value))); |
| 4730 | set_trans_type(static_cast< ::dmi::TransceiverType >(value)); |
| 4731 | } else { |
| 4732 | goto handle_unusual; |
| 4733 | } |
| 4734 | break; |
| 4735 | } |
| 4736 | |
| 4737 | default: { |
| 4738 | handle_unusual: |
| 4739 | if (tag == 0) { |
| 4740 | goto success; |
| 4741 | } |
| 4742 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 4743 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 4744 | break; |
| 4745 | } |
| 4746 | } |
| 4747 | } |
| 4748 | success: |
| 4749 | // @@protoc_insertion_point(parse_success:dmi.TransceiverComponentChangeAttributes) |
| 4750 | return true; |
| 4751 | failure: |
| 4752 | // @@protoc_insertion_point(parse_failure:dmi.TransceiverComponentChangeAttributes) |
| 4753 | return false; |
| 4754 | #undef DO_ |
| 4755 | } |
| 4756 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4757 | |
| 4758 | void TransceiverComponentChangeAttributes::SerializeWithCachedSizes( |
| 4759 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 4760 | // @@protoc_insertion_point(serialize_start:dmi.TransceiverComponentChangeAttributes) |
| 4761 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4762 | (void) cached_has_bits; |
| 4763 | |
| 4764 | // .dmi.TransceiverType trans_type = 1; |
| 4765 | if (this->trans_type() != 0) { |
| 4766 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 4767 | 1, this->trans_type(), output); |
| 4768 | } |
| 4769 | |
| 4770 | if (_internal_metadata_.have_unknown_fields()) { |
| 4771 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 4772 | _internal_metadata_.unknown_fields(), output); |
| 4773 | } |
| 4774 | // @@protoc_insertion_point(serialize_end:dmi.TransceiverComponentChangeAttributes) |
| 4775 | } |
| 4776 | |
| 4777 | ::google::protobuf::uint8* TransceiverComponentChangeAttributes::InternalSerializeWithCachedSizesToArray( |
| 4778 | ::google::protobuf::uint8* target) const { |
| 4779 | // @@protoc_insertion_point(serialize_to_array_start:dmi.TransceiverComponentChangeAttributes) |
| 4780 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4781 | (void) cached_has_bits; |
| 4782 | |
| 4783 | // .dmi.TransceiverType trans_type = 1; |
| 4784 | if (this->trans_type() != 0) { |
| 4785 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 4786 | 1, this->trans_type(), target); |
| 4787 | } |
| 4788 | |
| 4789 | if (_internal_metadata_.have_unknown_fields()) { |
| 4790 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 4791 | _internal_metadata_.unknown_fields(), target); |
| 4792 | } |
| 4793 | // @@protoc_insertion_point(serialize_to_array_end:dmi.TransceiverComponentChangeAttributes) |
| 4794 | return target; |
| 4795 | } |
| 4796 | |
| 4797 | size_t TransceiverComponentChangeAttributes::ByteSizeLong() const { |
| 4798 | // @@protoc_insertion_point(message_byte_size_start:dmi.TransceiverComponentChangeAttributes) |
| 4799 | size_t total_size = 0; |
| 4800 | |
| 4801 | if (_internal_metadata_.have_unknown_fields()) { |
| 4802 | total_size += |
| 4803 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 4804 | _internal_metadata_.unknown_fields()); |
| 4805 | } |
| 4806 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4807 | // Prevent compiler warnings about cached_has_bits being unused |
| 4808 | (void) cached_has_bits; |
| 4809 | |
| 4810 | // .dmi.TransceiverType trans_type = 1; |
| 4811 | if (this->trans_type() != 0) { |
| 4812 | total_size += 1 + |
| 4813 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->trans_type()); |
| 4814 | } |
| 4815 | |
| 4816 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 4817 | SetCachedSize(cached_size); |
| 4818 | return total_size; |
| 4819 | } |
| 4820 | |
| 4821 | void TransceiverComponentChangeAttributes::MergeFrom(const ::google::protobuf::Message& from) { |
| 4822 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.TransceiverComponentChangeAttributes) |
| 4823 | GOOGLE_DCHECK_NE(&from, this); |
| 4824 | const TransceiverComponentChangeAttributes* source = |
| 4825 | ::google::protobuf::DynamicCastToGenerated<TransceiverComponentChangeAttributes>( |
| 4826 | &from); |
| 4827 | if (source == nullptr) { |
| 4828 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.TransceiverComponentChangeAttributes) |
| 4829 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 4830 | } else { |
| 4831 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.TransceiverComponentChangeAttributes) |
| 4832 | MergeFrom(*source); |
| 4833 | } |
| 4834 | } |
| 4835 | |
| 4836 | void TransceiverComponentChangeAttributes::MergeFrom(const TransceiverComponentChangeAttributes& from) { |
| 4837 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.TransceiverComponentChangeAttributes) |
| 4838 | GOOGLE_DCHECK_NE(&from, this); |
| 4839 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4840 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4841 | (void) cached_has_bits; |
| 4842 | |
| 4843 | if (from.trans_type() != 0) { |
| 4844 | set_trans_type(from.trans_type()); |
| 4845 | } |
| 4846 | } |
| 4847 | |
| 4848 | void TransceiverComponentChangeAttributes::CopyFrom(const ::google::protobuf::Message& from) { |
| 4849 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.TransceiverComponentChangeAttributes) |
| 4850 | if (&from == this) return; |
| 4851 | Clear(); |
| 4852 | MergeFrom(from); |
| 4853 | } |
| 4854 | |
| 4855 | void TransceiverComponentChangeAttributes::CopyFrom(const TransceiverComponentChangeAttributes& from) { |
| 4856 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.TransceiverComponentChangeAttributes) |
| 4857 | if (&from == this) return; |
| 4858 | Clear(); |
| 4859 | MergeFrom(from); |
| 4860 | } |
| 4861 | |
| 4862 | bool TransceiverComponentChangeAttributes::IsInitialized() const { |
| 4863 | return true; |
| 4864 | } |
| 4865 | |
| 4866 | void TransceiverComponentChangeAttributes::Swap(TransceiverComponentChangeAttributes* other) { |
| 4867 | if (other == this) return; |
| 4868 | InternalSwap(other); |
| 4869 | } |
| 4870 | void TransceiverComponentChangeAttributes::InternalSwap(TransceiverComponentChangeAttributes* other) { |
| 4871 | using std::swap; |
| 4872 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 4873 | swap(trans_type_, other->trans_type_); |
| 4874 | } |
| 4875 | |
| 4876 | ::google::protobuf::Metadata TransceiverComponentChangeAttributes::GetMetadata() const { |
| 4877 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 4878 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 4879 | } |
| 4880 | |
| 4881 | |
| 4882 | // =================================================================== |
| 4883 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 4884 | void PonIdConfig::InitAsDefaultInstance() { |
| 4885 | } |
| 4886 | class PonIdConfig::HasBitSetters { |
| 4887 | public: |
| 4888 | }; |
| 4889 | |
| 4890 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4891 | const int PonIdConfig::kPonIdFieldNumber; |
| 4892 | const int PonIdConfig::kPonIdTransmitPeriodicityFieldNumber; |
| 4893 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4894 | |
| 4895 | PonIdConfig::PonIdConfig() |
| 4896 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 4897 | SharedCtor(); |
| 4898 | // @@protoc_insertion_point(constructor:dmi.PonIdConfig) |
| 4899 | } |
| 4900 | PonIdConfig::PonIdConfig(const PonIdConfig& from) |
| 4901 | : ::google::protobuf::Message(), |
| 4902 | _internal_metadata_(nullptr) { |
| 4903 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4904 | pon_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4905 | if (from.pon_id().size() > 0) { |
| 4906 | pon_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.pon_id_); |
| 4907 | } |
| 4908 | pon_id_transmit_periodicity_ = from.pon_id_transmit_periodicity_; |
| 4909 | // @@protoc_insertion_point(copy_constructor:dmi.PonIdConfig) |
| 4910 | } |
| 4911 | |
| 4912 | void PonIdConfig::SharedCtor() { |
| 4913 | ::google::protobuf::internal::InitSCC( |
| 4914 | &scc_info_PonIdConfig_dmi_2fhw_2eproto.base); |
| 4915 | pon_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4916 | pon_id_transmit_periodicity_ = 0u; |
| 4917 | } |
| 4918 | |
| 4919 | PonIdConfig::~PonIdConfig() { |
| 4920 | // @@protoc_insertion_point(destructor:dmi.PonIdConfig) |
| 4921 | SharedDtor(); |
| 4922 | } |
| 4923 | |
| 4924 | void PonIdConfig::SharedDtor() { |
| 4925 | pon_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4926 | } |
| 4927 | |
| 4928 | void PonIdConfig::SetCachedSize(int size) const { |
| 4929 | _cached_size_.Set(size); |
| 4930 | } |
| 4931 | const PonIdConfig& PonIdConfig::default_instance() { |
| 4932 | ::google::protobuf::internal::InitSCC(&::scc_info_PonIdConfig_dmi_2fhw_2eproto.base); |
| 4933 | return *internal_default_instance(); |
| 4934 | } |
| 4935 | |
| 4936 | |
| 4937 | void PonIdConfig::Clear() { |
| 4938 | // @@protoc_insertion_point(message_clear_start:dmi.PonIdConfig) |
| 4939 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4940 | // Prevent compiler warnings about cached_has_bits being unused |
| 4941 | (void) cached_has_bits; |
| 4942 | |
| 4943 | pon_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4944 | pon_id_transmit_periodicity_ = 0u; |
| 4945 | _internal_metadata_.Clear(); |
| 4946 | } |
| 4947 | |
| 4948 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4949 | const char* PonIdConfig::_InternalParse(const char* begin, const char* end, void* object, |
| 4950 | ::google::protobuf::internal::ParseContext* ctx) { |
| 4951 | auto msg = static_cast<PonIdConfig*>(object); |
| 4952 | ::google::protobuf::int32 size; (void)size; |
| 4953 | int depth; (void)depth; |
| 4954 | ::google::protobuf::uint32 tag; |
| 4955 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 4956 | auto ptr = begin; |
| 4957 | while (ptr < end) { |
| 4958 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 4959 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4960 | switch (tag >> 3) { |
| 4961 | // bytes pon_id = 1; |
| 4962 | case 1: { |
| 4963 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 4964 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 4965 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4966 | object = msg->mutable_pon_id(); |
| 4967 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 4968 | parser_till_end = ::google::protobuf::internal::GreedyStringParser; |
| 4969 | goto string_till_end; |
| 4970 | } |
| 4971 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheck(ptr, size, ctx)); |
| 4972 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 4973 | ptr += size; |
| 4974 | break; |
| 4975 | } |
| 4976 | // uint32 pon_id_transmit_periodicity = 2; |
| 4977 | case 2: { |
| 4978 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 4979 | msg->set_pon_id_transmit_periodicity(::google::protobuf::internal::ReadVarint(&ptr)); |
| 4980 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4981 | break; |
| 4982 | } |
| 4983 | default: { |
| 4984 | handle_unusual: |
| 4985 | if ((tag & 7) == 4 || tag == 0) { |
| 4986 | ctx->EndGroup(tag); |
| 4987 | return ptr; |
| 4988 | } |
| 4989 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 4990 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 4991 | ptr = res.first; |
| 4992 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 4993 | if (res.second) return ptr; |
| 4994 | } |
| 4995 | } // switch |
| 4996 | } // while |
| 4997 | return ptr; |
| 4998 | string_till_end: |
| 4999 | static_cast<::std::string*>(object)->clear(); |
| 5000 | static_cast<::std::string*>(object)->reserve(size); |
| 5001 | goto len_delim_till_end; |
| 5002 | len_delim_till_end: |
| 5003 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 5004 | {parser_till_end, object}, size); |
| 5005 | } |
| 5006 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5007 | bool PonIdConfig::MergePartialFromCodedStream( |
| 5008 | ::google::protobuf::io::CodedInputStream* input) { |
| 5009 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 5010 | ::google::protobuf::uint32 tag; |
| 5011 | // @@protoc_insertion_point(parse_start:dmi.PonIdConfig) |
| 5012 | for (;;) { |
| 5013 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 5014 | tag = p.first; |
| 5015 | if (!p.second) goto handle_unusual; |
| 5016 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 5017 | // bytes pon_id = 1; |
| 5018 | case 1: { |
| 5019 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 5020 | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
| 5021 | input, this->mutable_pon_id())); |
| 5022 | } else { |
| 5023 | goto handle_unusual; |
| 5024 | } |
| 5025 | break; |
| 5026 | } |
| 5027 | |
| 5028 | // uint32 pon_id_transmit_periodicity = 2; |
| 5029 | case 2: { |
| 5030 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 5031 | |
| 5032 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 5033 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 5034 | input, &pon_id_transmit_periodicity_))); |
| 5035 | } else { |
| 5036 | goto handle_unusual; |
| 5037 | } |
| 5038 | break; |
| 5039 | } |
| 5040 | |
| 5041 | default: { |
| 5042 | handle_unusual: |
| 5043 | if (tag == 0) { |
| 5044 | goto success; |
| 5045 | } |
| 5046 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 5047 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 5048 | break; |
| 5049 | } |
| 5050 | } |
| 5051 | } |
| 5052 | success: |
| 5053 | // @@protoc_insertion_point(parse_success:dmi.PonIdConfig) |
| 5054 | return true; |
| 5055 | failure: |
| 5056 | // @@protoc_insertion_point(parse_failure:dmi.PonIdConfig) |
| 5057 | return false; |
| 5058 | #undef DO_ |
| 5059 | } |
| 5060 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5061 | |
| 5062 | void PonIdConfig::SerializeWithCachedSizes( |
| 5063 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 5064 | // @@protoc_insertion_point(serialize_start:dmi.PonIdConfig) |
| 5065 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5066 | (void) cached_has_bits; |
| 5067 | |
| 5068 | // bytes pon_id = 1; |
| 5069 | if (this->pon_id().size() > 0) { |
| 5070 | ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( |
| 5071 | 1, this->pon_id(), output); |
| 5072 | } |
| 5073 | |
| 5074 | // uint32 pon_id_transmit_periodicity = 2; |
| 5075 | if (this->pon_id_transmit_periodicity() != 0) { |
| 5076 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->pon_id_transmit_periodicity(), output); |
| 5077 | } |
| 5078 | |
| 5079 | if (_internal_metadata_.have_unknown_fields()) { |
| 5080 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 5081 | _internal_metadata_.unknown_fields(), output); |
| 5082 | } |
| 5083 | // @@protoc_insertion_point(serialize_end:dmi.PonIdConfig) |
| 5084 | } |
| 5085 | |
| 5086 | ::google::protobuf::uint8* PonIdConfig::InternalSerializeWithCachedSizesToArray( |
| 5087 | ::google::protobuf::uint8* target) const { |
| 5088 | // @@protoc_insertion_point(serialize_to_array_start:dmi.PonIdConfig) |
| 5089 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5090 | (void) cached_has_bits; |
| 5091 | |
| 5092 | // bytes pon_id = 1; |
| 5093 | if (this->pon_id().size() > 0) { |
| 5094 | target = |
| 5095 | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
| 5096 | 1, this->pon_id(), target); |
| 5097 | } |
| 5098 | |
| 5099 | // uint32 pon_id_transmit_periodicity = 2; |
| 5100 | if (this->pon_id_transmit_periodicity() != 0) { |
| 5101 | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->pon_id_transmit_periodicity(), target); |
| 5102 | } |
| 5103 | |
| 5104 | if (_internal_metadata_.have_unknown_fields()) { |
| 5105 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 5106 | _internal_metadata_.unknown_fields(), target); |
| 5107 | } |
| 5108 | // @@protoc_insertion_point(serialize_to_array_end:dmi.PonIdConfig) |
| 5109 | return target; |
| 5110 | } |
| 5111 | |
| 5112 | size_t PonIdConfig::ByteSizeLong() const { |
| 5113 | // @@protoc_insertion_point(message_byte_size_start:dmi.PonIdConfig) |
| 5114 | size_t total_size = 0; |
| 5115 | |
| 5116 | if (_internal_metadata_.have_unknown_fields()) { |
| 5117 | total_size += |
| 5118 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 5119 | _internal_metadata_.unknown_fields()); |
| 5120 | } |
| 5121 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5122 | // Prevent compiler warnings about cached_has_bits being unused |
| 5123 | (void) cached_has_bits; |
| 5124 | |
| 5125 | // bytes pon_id = 1; |
| 5126 | if (this->pon_id().size() > 0) { |
| 5127 | total_size += 1 + |
| 5128 | ::google::protobuf::internal::WireFormatLite::BytesSize( |
| 5129 | this->pon_id()); |
| 5130 | } |
| 5131 | |
| 5132 | // uint32 pon_id_transmit_periodicity = 2; |
| 5133 | if (this->pon_id_transmit_periodicity() != 0) { |
| 5134 | total_size += 1 + |
| 5135 | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
| 5136 | this->pon_id_transmit_periodicity()); |
| 5137 | } |
| 5138 | |
| 5139 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 5140 | SetCachedSize(cached_size); |
| 5141 | return total_size; |
| 5142 | } |
| 5143 | |
| 5144 | void PonIdConfig::MergeFrom(const ::google::protobuf::Message& from) { |
| 5145 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.PonIdConfig) |
| 5146 | GOOGLE_DCHECK_NE(&from, this); |
| 5147 | const PonIdConfig* source = |
| 5148 | ::google::protobuf::DynamicCastToGenerated<PonIdConfig>( |
| 5149 | &from); |
| 5150 | if (source == nullptr) { |
| 5151 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.PonIdConfig) |
| 5152 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 5153 | } else { |
| 5154 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.PonIdConfig) |
| 5155 | MergeFrom(*source); |
| 5156 | } |
| 5157 | } |
| 5158 | |
| 5159 | void PonIdConfig::MergeFrom(const PonIdConfig& from) { |
| 5160 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.PonIdConfig) |
| 5161 | GOOGLE_DCHECK_NE(&from, this); |
| 5162 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 5163 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5164 | (void) cached_has_bits; |
| 5165 | |
| 5166 | if (from.pon_id().size() > 0) { |
| 5167 | |
| 5168 | pon_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.pon_id_); |
| 5169 | } |
| 5170 | if (from.pon_id_transmit_periodicity() != 0) { |
| 5171 | set_pon_id_transmit_periodicity(from.pon_id_transmit_periodicity()); |
| 5172 | } |
| 5173 | } |
| 5174 | |
| 5175 | void PonIdConfig::CopyFrom(const ::google::protobuf::Message& from) { |
| 5176 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.PonIdConfig) |
| 5177 | if (&from == this) return; |
| 5178 | Clear(); |
| 5179 | MergeFrom(from); |
| 5180 | } |
| 5181 | |
| 5182 | void PonIdConfig::CopyFrom(const PonIdConfig& from) { |
| 5183 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.PonIdConfig) |
| 5184 | if (&from == this) return; |
| 5185 | Clear(); |
| 5186 | MergeFrom(from); |
| 5187 | } |
| 5188 | |
| 5189 | bool PonIdConfig::IsInitialized() const { |
| 5190 | return true; |
| 5191 | } |
| 5192 | |
| 5193 | void PonIdConfig::Swap(PonIdConfig* other) { |
| 5194 | if (other == this) return; |
| 5195 | InternalSwap(other); |
| 5196 | } |
| 5197 | void PonIdConfig::InternalSwap(PonIdConfig* other) { |
| 5198 | using std::swap; |
| 5199 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 5200 | pon_id_.Swap(&other->pon_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 5201 | GetArenaNoVirtual()); |
| 5202 | swap(pon_id_transmit_periodicity_, other->pon_id_transmit_periodicity_); |
| 5203 | } |
| 5204 | |
| 5205 | ::google::protobuf::Metadata PonIdConfig::GetMetadata() const { |
| 5206 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 5207 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 5208 | } |
| 5209 | |
| 5210 | |
| 5211 | // =================================================================== |
| 5212 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 5213 | void ContainerComponentAttributes::InitAsDefaultInstance() { |
| 5214 | } |
| 5215 | class ContainerComponentAttributes::HasBitSetters { |
| 5216 | public: |
| 5217 | }; |
| 5218 | |
| 5219 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 5220 | const int ContainerComponentAttributes::kPhysicalLabelFieldNumber; |
| 5221 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 5222 | |
| 5223 | ContainerComponentAttributes::ContainerComponentAttributes() |
| 5224 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 5225 | SharedCtor(); |
| 5226 | // @@protoc_insertion_point(constructor:dmi.ContainerComponentAttributes) |
| 5227 | } |
| 5228 | ContainerComponentAttributes::ContainerComponentAttributes(const ContainerComponentAttributes& from) |
| 5229 | : ::google::protobuf::Message(), |
| 5230 | _internal_metadata_(nullptr) { |
| 5231 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 5232 | physical_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5233 | if (from.physical_label().size() > 0) { |
| 5234 | physical_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.physical_label_); |
| 5235 | } |
| 5236 | // @@protoc_insertion_point(copy_constructor:dmi.ContainerComponentAttributes) |
| 5237 | } |
| 5238 | |
| 5239 | void ContainerComponentAttributes::SharedCtor() { |
| 5240 | ::google::protobuf::internal::InitSCC( |
| 5241 | &scc_info_ContainerComponentAttributes_dmi_2fhw_2eproto.base); |
| 5242 | physical_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5243 | } |
| 5244 | |
| 5245 | ContainerComponentAttributes::~ContainerComponentAttributes() { |
| 5246 | // @@protoc_insertion_point(destructor:dmi.ContainerComponentAttributes) |
| 5247 | SharedDtor(); |
| 5248 | } |
| 5249 | |
| 5250 | void ContainerComponentAttributes::SharedDtor() { |
| 5251 | physical_label_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5252 | } |
| 5253 | |
| 5254 | void ContainerComponentAttributes::SetCachedSize(int size) const { |
| 5255 | _cached_size_.Set(size); |
| 5256 | } |
| 5257 | const ContainerComponentAttributes& ContainerComponentAttributes::default_instance() { |
| 5258 | ::google::protobuf::internal::InitSCC(&::scc_info_ContainerComponentAttributes_dmi_2fhw_2eproto.base); |
| 5259 | return *internal_default_instance(); |
| 5260 | } |
| 5261 | |
| 5262 | |
| 5263 | void ContainerComponentAttributes::Clear() { |
| 5264 | // @@protoc_insertion_point(message_clear_start:dmi.ContainerComponentAttributes) |
| 5265 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5266 | // Prevent compiler warnings about cached_has_bits being unused |
| 5267 | (void) cached_has_bits; |
| 5268 | |
| 5269 | physical_label_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5270 | _internal_metadata_.Clear(); |
| 5271 | } |
| 5272 | |
| 5273 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5274 | const char* ContainerComponentAttributes::_InternalParse(const char* begin, const char* end, void* object, |
| 5275 | ::google::protobuf::internal::ParseContext* ctx) { |
| 5276 | auto msg = static_cast<ContainerComponentAttributes*>(object); |
| 5277 | ::google::protobuf::int32 size; (void)size; |
| 5278 | int depth; (void)depth; |
| 5279 | ::google::protobuf::uint32 tag; |
| 5280 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 5281 | auto ptr = begin; |
| 5282 | while (ptr < end) { |
| 5283 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 5284 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5285 | switch (tag >> 3) { |
| 5286 | // string physical_label = 1; |
| 5287 | case 1: { |
| 5288 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 5289 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 5290 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5291 | ctx->extra_parse_data().SetFieldName("dmi.ContainerComponentAttributes.physical_label"); |
| 5292 | object = msg->mutable_physical_label(); |
| 5293 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 5294 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 5295 | goto string_till_end; |
| 5296 | } |
| 5297 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 5298 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 5299 | ptr += size; |
| 5300 | break; |
| 5301 | } |
| 5302 | default: { |
| 5303 | handle_unusual: |
| 5304 | if ((tag & 7) == 4 || tag == 0) { |
| 5305 | ctx->EndGroup(tag); |
| 5306 | return ptr; |
| 5307 | } |
| 5308 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 5309 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 5310 | ptr = res.first; |
| 5311 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 5312 | if (res.second) return ptr; |
| 5313 | } |
| 5314 | } // switch |
| 5315 | } // while |
| 5316 | return ptr; |
| 5317 | string_till_end: |
| 5318 | static_cast<::std::string*>(object)->clear(); |
| 5319 | static_cast<::std::string*>(object)->reserve(size); |
| 5320 | goto len_delim_till_end; |
| 5321 | len_delim_till_end: |
| 5322 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 5323 | {parser_till_end, object}, size); |
| 5324 | } |
| 5325 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5326 | bool ContainerComponentAttributes::MergePartialFromCodedStream( |
| 5327 | ::google::protobuf::io::CodedInputStream* input) { |
| 5328 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 5329 | ::google::protobuf::uint32 tag; |
| 5330 | // @@protoc_insertion_point(parse_start:dmi.ContainerComponentAttributes) |
| 5331 | for (;;) { |
| 5332 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 5333 | tag = p.first; |
| 5334 | if (!p.second) goto handle_unusual; |
| 5335 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 5336 | // string physical_label = 1; |
| 5337 | case 1: { |
| 5338 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 5339 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 5340 | input, this->mutable_physical_label())); |
| 5341 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 5342 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 5343 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 5344 | "dmi.ContainerComponentAttributes.physical_label")); |
| 5345 | } else { |
| 5346 | goto handle_unusual; |
| 5347 | } |
| 5348 | break; |
| 5349 | } |
| 5350 | |
| 5351 | default: { |
| 5352 | handle_unusual: |
| 5353 | if (tag == 0) { |
| 5354 | goto success; |
| 5355 | } |
| 5356 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 5357 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 5358 | break; |
| 5359 | } |
| 5360 | } |
| 5361 | } |
| 5362 | success: |
| 5363 | // @@protoc_insertion_point(parse_success:dmi.ContainerComponentAttributes) |
| 5364 | return true; |
| 5365 | failure: |
| 5366 | // @@protoc_insertion_point(parse_failure:dmi.ContainerComponentAttributes) |
| 5367 | return false; |
| 5368 | #undef DO_ |
| 5369 | } |
| 5370 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5371 | |
| 5372 | void ContainerComponentAttributes::SerializeWithCachedSizes( |
| 5373 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 5374 | // @@protoc_insertion_point(serialize_start:dmi.ContainerComponentAttributes) |
| 5375 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5376 | (void) cached_has_bits; |
| 5377 | |
| 5378 | // string physical_label = 1; |
| 5379 | if (this->physical_label().size() > 0) { |
| 5380 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 5381 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 5382 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 5383 | "dmi.ContainerComponentAttributes.physical_label"); |
| 5384 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 5385 | 1, this->physical_label(), output); |
| 5386 | } |
| 5387 | |
| 5388 | if (_internal_metadata_.have_unknown_fields()) { |
| 5389 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 5390 | _internal_metadata_.unknown_fields(), output); |
| 5391 | } |
| 5392 | // @@protoc_insertion_point(serialize_end:dmi.ContainerComponentAttributes) |
| 5393 | } |
| 5394 | |
| 5395 | ::google::protobuf::uint8* ContainerComponentAttributes::InternalSerializeWithCachedSizesToArray( |
| 5396 | ::google::protobuf::uint8* target) const { |
| 5397 | // @@protoc_insertion_point(serialize_to_array_start:dmi.ContainerComponentAttributes) |
| 5398 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5399 | (void) cached_has_bits; |
| 5400 | |
| 5401 | // string physical_label = 1; |
| 5402 | if (this->physical_label().size() > 0) { |
| 5403 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 5404 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 5405 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 5406 | "dmi.ContainerComponentAttributes.physical_label"); |
| 5407 | target = |
| 5408 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 5409 | 1, this->physical_label(), target); |
| 5410 | } |
| 5411 | |
| 5412 | if (_internal_metadata_.have_unknown_fields()) { |
| 5413 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 5414 | _internal_metadata_.unknown_fields(), target); |
| 5415 | } |
| 5416 | // @@protoc_insertion_point(serialize_to_array_end:dmi.ContainerComponentAttributes) |
| 5417 | return target; |
| 5418 | } |
| 5419 | |
| 5420 | size_t ContainerComponentAttributes::ByteSizeLong() const { |
| 5421 | // @@protoc_insertion_point(message_byte_size_start:dmi.ContainerComponentAttributes) |
| 5422 | size_t total_size = 0; |
| 5423 | |
| 5424 | if (_internal_metadata_.have_unknown_fields()) { |
| 5425 | total_size += |
| 5426 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 5427 | _internal_metadata_.unknown_fields()); |
| 5428 | } |
| 5429 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5430 | // Prevent compiler warnings about cached_has_bits being unused |
| 5431 | (void) cached_has_bits; |
| 5432 | |
| 5433 | // string physical_label = 1; |
| 5434 | if (this->physical_label().size() > 0) { |
| 5435 | total_size += 1 + |
| 5436 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 5437 | this->physical_label()); |
| 5438 | } |
| 5439 | |
| 5440 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 5441 | SetCachedSize(cached_size); |
| 5442 | return total_size; |
| 5443 | } |
| 5444 | |
| 5445 | void ContainerComponentAttributes::MergeFrom(const ::google::protobuf::Message& from) { |
| 5446 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.ContainerComponentAttributes) |
| 5447 | GOOGLE_DCHECK_NE(&from, this); |
| 5448 | const ContainerComponentAttributes* source = |
| 5449 | ::google::protobuf::DynamicCastToGenerated<ContainerComponentAttributes>( |
| 5450 | &from); |
| 5451 | if (source == nullptr) { |
| 5452 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.ContainerComponentAttributes) |
| 5453 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 5454 | } else { |
| 5455 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.ContainerComponentAttributes) |
| 5456 | MergeFrom(*source); |
| 5457 | } |
| 5458 | } |
| 5459 | |
| 5460 | void ContainerComponentAttributes::MergeFrom(const ContainerComponentAttributes& from) { |
| 5461 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.ContainerComponentAttributes) |
| 5462 | GOOGLE_DCHECK_NE(&from, this); |
| 5463 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 5464 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5465 | (void) cached_has_bits; |
| 5466 | |
| 5467 | if (from.physical_label().size() > 0) { |
| 5468 | |
| 5469 | physical_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.physical_label_); |
| 5470 | } |
| 5471 | } |
| 5472 | |
| 5473 | void ContainerComponentAttributes::CopyFrom(const ::google::protobuf::Message& from) { |
| 5474 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.ContainerComponentAttributes) |
| 5475 | if (&from == this) return; |
| 5476 | Clear(); |
| 5477 | MergeFrom(from); |
| 5478 | } |
| 5479 | |
| 5480 | void ContainerComponentAttributes::CopyFrom(const ContainerComponentAttributes& from) { |
| 5481 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.ContainerComponentAttributes) |
| 5482 | if (&from == this) return; |
| 5483 | Clear(); |
| 5484 | MergeFrom(from); |
| 5485 | } |
| 5486 | |
| 5487 | bool ContainerComponentAttributes::IsInitialized() const { |
| 5488 | return true; |
| 5489 | } |
| 5490 | |
| 5491 | void ContainerComponentAttributes::Swap(ContainerComponentAttributes* other) { |
| 5492 | if (other == this) return; |
| 5493 | InternalSwap(other); |
| 5494 | } |
| 5495 | void ContainerComponentAttributes::InternalSwap(ContainerComponentAttributes* other) { |
| 5496 | using std::swap; |
| 5497 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 5498 | physical_label_.Swap(&other->physical_label_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 5499 | GetArenaNoVirtual()); |
| 5500 | } |
| 5501 | |
| 5502 | ::google::protobuf::Metadata ContainerComponentAttributes::GetMetadata() const { |
| 5503 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 5504 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 5505 | } |
| 5506 | |
| 5507 | |
| 5508 | // =================================================================== |
| 5509 | |
| 5510 | void PsuComponentAttributes::InitAsDefaultInstance() { |
| 5511 | } |
| 5512 | class PsuComponentAttributes::HasBitSetters { |
| 5513 | public: |
| 5514 | }; |
| 5515 | |
| 5516 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 5517 | const int PsuComponentAttributes::kSupportedVoltageFieldNumber; |
| 5518 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 5519 | |
| 5520 | PsuComponentAttributes::PsuComponentAttributes() |
| 5521 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 5522 | SharedCtor(); |
| 5523 | // @@protoc_insertion_point(constructor:dmi.PsuComponentAttributes) |
| 5524 | } |
| 5525 | PsuComponentAttributes::PsuComponentAttributes(const PsuComponentAttributes& from) |
| 5526 | : ::google::protobuf::Message(), |
| 5527 | _internal_metadata_(nullptr) { |
| 5528 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 5529 | supported_voltage_ = from.supported_voltage_; |
| 5530 | // @@protoc_insertion_point(copy_constructor:dmi.PsuComponentAttributes) |
| 5531 | } |
| 5532 | |
| 5533 | void PsuComponentAttributes::SharedCtor() { |
| 5534 | supported_voltage_ = 0; |
| 5535 | } |
| 5536 | |
| 5537 | PsuComponentAttributes::~PsuComponentAttributes() { |
| 5538 | // @@protoc_insertion_point(destructor:dmi.PsuComponentAttributes) |
| 5539 | SharedDtor(); |
| 5540 | } |
| 5541 | |
| 5542 | void PsuComponentAttributes::SharedDtor() { |
| 5543 | } |
| 5544 | |
| 5545 | void PsuComponentAttributes::SetCachedSize(int size) const { |
| 5546 | _cached_size_.Set(size); |
| 5547 | } |
| 5548 | const PsuComponentAttributes& PsuComponentAttributes::default_instance() { |
| 5549 | ::google::protobuf::internal::InitSCC(&::scc_info_PsuComponentAttributes_dmi_2fhw_2eproto.base); |
| 5550 | return *internal_default_instance(); |
| 5551 | } |
| 5552 | |
| 5553 | |
| 5554 | void PsuComponentAttributes::Clear() { |
| 5555 | // @@protoc_insertion_point(message_clear_start:dmi.PsuComponentAttributes) |
| 5556 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5557 | // Prevent compiler warnings about cached_has_bits being unused |
| 5558 | (void) cached_has_bits; |
| 5559 | |
| 5560 | supported_voltage_ = 0; |
| 5561 | _internal_metadata_.Clear(); |
| 5562 | } |
| 5563 | |
| 5564 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5565 | const char* PsuComponentAttributes::_InternalParse(const char* begin, const char* end, void* object, |
| 5566 | ::google::protobuf::internal::ParseContext* ctx) { |
| 5567 | auto msg = static_cast<PsuComponentAttributes*>(object); |
| 5568 | ::google::protobuf::int32 size; (void)size; |
| 5569 | int depth; (void)depth; |
| 5570 | ::google::protobuf::uint32 tag; |
| 5571 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 5572 | auto ptr = begin; |
| 5573 | while (ptr < end) { |
| 5574 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 5575 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5576 | switch (tag >> 3) { |
| 5577 | // .dmi.PsuComponentAttributes.SupportedVoltage supported_voltage = 1; |
| 5578 | case 1: { |
| 5579 | if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; |
| 5580 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 5581 | msg->set_supported_voltage(static_cast<::dmi::PsuComponentAttributes_SupportedVoltage>(val)); |
| 5582 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5583 | break; |
| 5584 | } |
| 5585 | default: { |
| 5586 | handle_unusual: |
| 5587 | if ((tag & 7) == 4 || tag == 0) { |
| 5588 | ctx->EndGroup(tag); |
| 5589 | return ptr; |
| 5590 | } |
| 5591 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 5592 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 5593 | ptr = res.first; |
| 5594 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 5595 | if (res.second) return ptr; |
| 5596 | } |
| 5597 | } // switch |
| 5598 | } // while |
| 5599 | return ptr; |
| 5600 | } |
| 5601 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5602 | bool PsuComponentAttributes::MergePartialFromCodedStream( |
| 5603 | ::google::protobuf::io::CodedInputStream* input) { |
| 5604 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 5605 | ::google::protobuf::uint32 tag; |
| 5606 | // @@protoc_insertion_point(parse_start:dmi.PsuComponentAttributes) |
| 5607 | for (;;) { |
| 5608 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 5609 | tag = p.first; |
| 5610 | if (!p.second) goto handle_unusual; |
| 5611 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 5612 | // .dmi.PsuComponentAttributes.SupportedVoltage supported_voltage = 1; |
| 5613 | case 1: { |
| 5614 | if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { |
| 5615 | int value = 0; |
| 5616 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 5617 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 5618 | input, &value))); |
| 5619 | set_supported_voltage(static_cast< ::dmi::PsuComponentAttributes_SupportedVoltage >(value)); |
| 5620 | } else { |
| 5621 | goto handle_unusual; |
| 5622 | } |
| 5623 | break; |
| 5624 | } |
| 5625 | |
| 5626 | default: { |
| 5627 | handle_unusual: |
| 5628 | if (tag == 0) { |
| 5629 | goto success; |
| 5630 | } |
| 5631 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 5632 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 5633 | break; |
| 5634 | } |
| 5635 | } |
| 5636 | } |
| 5637 | success: |
| 5638 | // @@protoc_insertion_point(parse_success:dmi.PsuComponentAttributes) |
| 5639 | return true; |
| 5640 | failure: |
| 5641 | // @@protoc_insertion_point(parse_failure:dmi.PsuComponentAttributes) |
| 5642 | return false; |
| 5643 | #undef DO_ |
| 5644 | } |
| 5645 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5646 | |
| 5647 | void PsuComponentAttributes::SerializeWithCachedSizes( |
| 5648 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 5649 | // @@protoc_insertion_point(serialize_start:dmi.PsuComponentAttributes) |
| 5650 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5651 | (void) cached_has_bits; |
| 5652 | |
| 5653 | // .dmi.PsuComponentAttributes.SupportedVoltage supported_voltage = 1; |
| 5654 | if (this->supported_voltage() != 0) { |
| 5655 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 5656 | 1, this->supported_voltage(), output); |
| 5657 | } |
| 5658 | |
| 5659 | if (_internal_metadata_.have_unknown_fields()) { |
| 5660 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 5661 | _internal_metadata_.unknown_fields(), output); |
| 5662 | } |
| 5663 | // @@protoc_insertion_point(serialize_end:dmi.PsuComponentAttributes) |
| 5664 | } |
| 5665 | |
| 5666 | ::google::protobuf::uint8* PsuComponentAttributes::InternalSerializeWithCachedSizesToArray( |
| 5667 | ::google::protobuf::uint8* target) const { |
| 5668 | // @@protoc_insertion_point(serialize_to_array_start:dmi.PsuComponentAttributes) |
| 5669 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5670 | (void) cached_has_bits; |
| 5671 | |
| 5672 | // .dmi.PsuComponentAttributes.SupportedVoltage supported_voltage = 1; |
| 5673 | if (this->supported_voltage() != 0) { |
| 5674 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 5675 | 1, this->supported_voltage(), target); |
| 5676 | } |
| 5677 | |
| 5678 | if (_internal_metadata_.have_unknown_fields()) { |
| 5679 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 5680 | _internal_metadata_.unknown_fields(), target); |
| 5681 | } |
| 5682 | // @@protoc_insertion_point(serialize_to_array_end:dmi.PsuComponentAttributes) |
| 5683 | return target; |
| 5684 | } |
| 5685 | |
| 5686 | size_t PsuComponentAttributes::ByteSizeLong() const { |
| 5687 | // @@protoc_insertion_point(message_byte_size_start:dmi.PsuComponentAttributes) |
| 5688 | size_t total_size = 0; |
| 5689 | |
| 5690 | if (_internal_metadata_.have_unknown_fields()) { |
| 5691 | total_size += |
| 5692 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 5693 | _internal_metadata_.unknown_fields()); |
| 5694 | } |
| 5695 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5696 | // Prevent compiler warnings about cached_has_bits being unused |
| 5697 | (void) cached_has_bits; |
| 5698 | |
| 5699 | // .dmi.PsuComponentAttributes.SupportedVoltage supported_voltage = 1; |
| 5700 | if (this->supported_voltage() != 0) { |
| 5701 | total_size += 1 + |
| 5702 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->supported_voltage()); |
| 5703 | } |
| 5704 | |
| 5705 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 5706 | SetCachedSize(cached_size); |
| 5707 | return total_size; |
| 5708 | } |
| 5709 | |
| 5710 | void PsuComponentAttributes::MergeFrom(const ::google::protobuf::Message& from) { |
| 5711 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.PsuComponentAttributes) |
| 5712 | GOOGLE_DCHECK_NE(&from, this); |
| 5713 | const PsuComponentAttributes* source = |
| 5714 | ::google::protobuf::DynamicCastToGenerated<PsuComponentAttributes>( |
| 5715 | &from); |
| 5716 | if (source == nullptr) { |
| 5717 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.PsuComponentAttributes) |
| 5718 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 5719 | } else { |
| 5720 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.PsuComponentAttributes) |
| 5721 | MergeFrom(*source); |
| 5722 | } |
| 5723 | } |
| 5724 | |
| 5725 | void PsuComponentAttributes::MergeFrom(const PsuComponentAttributes& from) { |
| 5726 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.PsuComponentAttributes) |
| 5727 | GOOGLE_DCHECK_NE(&from, this); |
| 5728 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 5729 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5730 | (void) cached_has_bits; |
| 5731 | |
| 5732 | if (from.supported_voltage() != 0) { |
| 5733 | set_supported_voltage(from.supported_voltage()); |
| 5734 | } |
| 5735 | } |
| 5736 | |
| 5737 | void PsuComponentAttributes::CopyFrom(const ::google::protobuf::Message& from) { |
| 5738 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.PsuComponentAttributes) |
| 5739 | if (&from == this) return; |
| 5740 | Clear(); |
| 5741 | MergeFrom(from); |
| 5742 | } |
| 5743 | |
| 5744 | void PsuComponentAttributes::CopyFrom(const PsuComponentAttributes& from) { |
| 5745 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.PsuComponentAttributes) |
| 5746 | if (&from == this) return; |
| 5747 | Clear(); |
| 5748 | MergeFrom(from); |
| 5749 | } |
| 5750 | |
| 5751 | bool PsuComponentAttributes::IsInitialized() const { |
| 5752 | return true; |
| 5753 | } |
| 5754 | |
| 5755 | void PsuComponentAttributes::Swap(PsuComponentAttributes* other) { |
| 5756 | if (other == this) return; |
| 5757 | InternalSwap(other); |
| 5758 | } |
| 5759 | void PsuComponentAttributes::InternalSwap(PsuComponentAttributes* other) { |
| 5760 | using std::swap; |
| 5761 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 5762 | swap(supported_voltage_, other->supported_voltage_); |
| 5763 | } |
| 5764 | |
| 5765 | ::google::protobuf::Metadata PsuComponentAttributes::GetMetadata() const { |
| 5766 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 5767 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 5768 | } |
| 5769 | |
| 5770 | |
| 5771 | // =================================================================== |
| 5772 | |
| 5773 | void TransceiverComponentsAttributes::InitAsDefaultInstance() { |
| 5774 | } |
| 5775 | class TransceiverComponentsAttributes::HasBitSetters { |
| 5776 | public: |
| 5777 | }; |
| 5778 | |
| 5779 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 5780 | const int TransceiverComponentsAttributes::kFormFactorFieldNumber; |
| 5781 | const int TransceiverComponentsAttributes::kTransTypeFieldNumber; |
| 5782 | const int TransceiverComponentsAttributes::kMaxDistanceFieldNumber; |
| 5783 | const int TransceiverComponentsAttributes::kMaxDistanceScaleFieldNumber; |
| 5784 | const int TransceiverComponentsAttributes::kRxWavelengthFieldNumber; |
| 5785 | const int TransceiverComponentsAttributes::kTxWavelengthFieldNumber; |
| 5786 | const int TransceiverComponentsAttributes::kWavelengthScaleFieldNumber; |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 5787 | const int TransceiverComponentsAttributes::kTxPowerFieldNumber; |
| 5788 | const int TransceiverComponentsAttributes::kTxPowerScaleFieldNumber; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 5789 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 5790 | |
| 5791 | TransceiverComponentsAttributes::TransceiverComponentsAttributes() |
| 5792 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 5793 | SharedCtor(); |
| 5794 | // @@protoc_insertion_point(constructor:dmi.TransceiverComponentsAttributes) |
| 5795 | } |
| 5796 | TransceiverComponentsAttributes::TransceiverComponentsAttributes(const TransceiverComponentsAttributes& from) |
| 5797 | : ::google::protobuf::Message(), |
| 5798 | _internal_metadata_(nullptr), |
| 5799 | rx_wavelength_(from.rx_wavelength_), |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 5800 | tx_wavelength_(from.tx_wavelength_), |
| 5801 | tx_power_(from.tx_power_) { |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 5802 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 5803 | ::memcpy(&form_factor_, &from.form_factor_, |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 5804 | static_cast<size_t>(reinterpret_cast<char*>(&tx_power_scale_) - |
| 5805 | reinterpret_cast<char*>(&form_factor_)) + sizeof(tx_power_scale_)); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 5806 | // @@protoc_insertion_point(copy_constructor:dmi.TransceiverComponentsAttributes) |
| 5807 | } |
| 5808 | |
| 5809 | void TransceiverComponentsAttributes::SharedCtor() { |
| 5810 | ::memset(&form_factor_, 0, static_cast<size_t>( |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 5811 | reinterpret_cast<char*>(&tx_power_scale_) - |
| 5812 | reinterpret_cast<char*>(&form_factor_)) + sizeof(tx_power_scale_)); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 5813 | } |
| 5814 | |
| 5815 | TransceiverComponentsAttributes::~TransceiverComponentsAttributes() { |
| 5816 | // @@protoc_insertion_point(destructor:dmi.TransceiverComponentsAttributes) |
| 5817 | SharedDtor(); |
| 5818 | } |
| 5819 | |
| 5820 | void TransceiverComponentsAttributes::SharedDtor() { |
| 5821 | } |
| 5822 | |
| 5823 | void TransceiverComponentsAttributes::SetCachedSize(int size) const { |
| 5824 | _cached_size_.Set(size); |
| 5825 | } |
| 5826 | const TransceiverComponentsAttributes& TransceiverComponentsAttributes::default_instance() { |
| 5827 | ::google::protobuf::internal::InitSCC(&::scc_info_TransceiverComponentsAttributes_dmi_2fhw_2eproto.base); |
| 5828 | return *internal_default_instance(); |
| 5829 | } |
| 5830 | |
| 5831 | |
| 5832 | void TransceiverComponentsAttributes::Clear() { |
| 5833 | // @@protoc_insertion_point(message_clear_start:dmi.TransceiverComponentsAttributes) |
| 5834 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5835 | // Prevent compiler warnings about cached_has_bits being unused |
| 5836 | (void) cached_has_bits; |
| 5837 | |
| 5838 | rx_wavelength_.Clear(); |
| 5839 | tx_wavelength_.Clear(); |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 5840 | tx_power_.Clear(); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 5841 | ::memset(&form_factor_, 0, static_cast<size_t>( |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 5842 | reinterpret_cast<char*>(&tx_power_scale_) - |
| 5843 | reinterpret_cast<char*>(&form_factor_)) + sizeof(tx_power_scale_)); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 5844 | _internal_metadata_.Clear(); |
| 5845 | } |
| 5846 | |
| 5847 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5848 | const char* TransceiverComponentsAttributes::_InternalParse(const char* begin, const char* end, void* object, |
| 5849 | ::google::protobuf::internal::ParseContext* ctx) { |
| 5850 | auto msg = static_cast<TransceiverComponentsAttributes*>(object); |
| 5851 | ::google::protobuf::int32 size; (void)size; |
| 5852 | int depth; (void)depth; |
| 5853 | ::google::protobuf::uint32 tag; |
| 5854 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 5855 | auto ptr = begin; |
| 5856 | while (ptr < end) { |
| 5857 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 5858 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5859 | switch (tag >> 3) { |
| 5860 | // .dmi.TransceiverComponentsAttributes.FormFactor form_factor = 1; |
| 5861 | case 1: { |
| 5862 | if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; |
| 5863 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 5864 | msg->set_form_factor(static_cast<::dmi::TransceiverComponentsAttributes_FormFactor>(val)); |
| 5865 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5866 | break; |
| 5867 | } |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 5868 | // .dmi.TransceiverType trans_type = 2; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 5869 | case 2: { |
| 5870 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 5871 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 5872 | msg->set_trans_type(static_cast<::dmi::TransceiverType>(val)); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 5873 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5874 | break; |
| 5875 | } |
| 5876 | // uint32 max_distance = 3; |
| 5877 | case 3: { |
| 5878 | if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; |
| 5879 | msg->set_max_distance(::google::protobuf::internal::ReadVarint(&ptr)); |
| 5880 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5881 | break; |
| 5882 | } |
| 5883 | // .dmi.ValueScale max_distance_scale = 4; |
| 5884 | case 4: { |
| 5885 | if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; |
| 5886 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 5887 | msg->set_max_distance_scale(static_cast<::dmi::ValueScale>(val)); |
| 5888 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5889 | break; |
| 5890 | } |
| 5891 | // repeated uint32 rx_wavelength = 5; |
| 5892 | case 5: { |
| 5893 | if (static_cast<::google::protobuf::uint8>(tag) == 42) { |
| 5894 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 5895 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5896 | parser_till_end = ::google::protobuf::internal::PackedUInt32Parser; |
| 5897 | object = msg->mutable_rx_wavelength(); |
| 5898 | if (size > end - ptr) goto len_delim_till_end; |
| 5899 | auto newend = ptr + size; |
| 5900 | if (size) ptr = parser_till_end(ptr, newend, object, ctx); |
| 5901 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend); |
| 5902 | break; |
| 5903 | } else if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; |
| 5904 | do { |
| 5905 | msg->add_rx_wavelength(::google::protobuf::internal::ReadVarint(&ptr)); |
| 5906 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5907 | if (ptr >= end) break; |
| 5908 | } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 40 && (ptr += 1)); |
| 5909 | break; |
| 5910 | } |
| 5911 | // repeated uint32 tx_wavelength = 6; |
| 5912 | case 6: { |
| 5913 | if (static_cast<::google::protobuf::uint8>(tag) == 50) { |
| 5914 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 5915 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5916 | parser_till_end = ::google::protobuf::internal::PackedUInt32Parser; |
| 5917 | object = msg->mutable_tx_wavelength(); |
| 5918 | if (size > end - ptr) goto len_delim_till_end; |
| 5919 | auto newend = ptr + size; |
| 5920 | if (size) ptr = parser_till_end(ptr, newend, object, ctx); |
| 5921 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend); |
| 5922 | break; |
| 5923 | } else if (static_cast<::google::protobuf::uint8>(tag) != 48) goto handle_unusual; |
| 5924 | do { |
| 5925 | msg->add_tx_wavelength(::google::protobuf::internal::ReadVarint(&ptr)); |
| 5926 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5927 | if (ptr >= end) break; |
| 5928 | } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 48 && (ptr += 1)); |
| 5929 | break; |
| 5930 | } |
| 5931 | // .dmi.ValueScale wavelength_scale = 7; |
| 5932 | case 7: { |
| 5933 | if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual; |
| 5934 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 5935 | msg->set_wavelength_scale(static_cast<::dmi::ValueScale>(val)); |
| 5936 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5937 | break; |
| 5938 | } |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 5939 | // repeated int32 tx_power = 8; |
| 5940 | case 8: { |
| 5941 | if (static_cast<::google::protobuf::uint8>(tag) == 66) { |
| 5942 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 5943 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5944 | parser_till_end = ::google::protobuf::internal::PackedInt32Parser; |
| 5945 | object = msg->mutable_tx_power(); |
| 5946 | if (size > end - ptr) goto len_delim_till_end; |
| 5947 | auto newend = ptr + size; |
| 5948 | if (size) ptr = parser_till_end(ptr, newend, object, ctx); |
| 5949 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend); |
| 5950 | break; |
| 5951 | } else if (static_cast<::google::protobuf::uint8>(tag) != 64) goto handle_unusual; |
| 5952 | do { |
| 5953 | msg->add_tx_power(::google::protobuf::internal::ReadVarint(&ptr)); |
| 5954 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5955 | if (ptr >= end) break; |
| 5956 | } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 64 && (ptr += 1)); |
| 5957 | break; |
| 5958 | } |
| 5959 | // .dmi.ValueScale tx_power_scale = 9; |
| 5960 | case 9: { |
| 5961 | if (static_cast<::google::protobuf::uint8>(tag) != 72) goto handle_unusual; |
| 5962 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 5963 | msg->set_tx_power_scale(static_cast<::dmi::ValueScale>(val)); |
| 5964 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5965 | break; |
| 5966 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 5967 | default: { |
| 5968 | handle_unusual: |
| 5969 | if ((tag & 7) == 4 || tag == 0) { |
| 5970 | ctx->EndGroup(tag); |
| 5971 | return ptr; |
| 5972 | } |
| 5973 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 5974 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 5975 | ptr = res.first; |
| 5976 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 5977 | if (res.second) return ptr; |
| 5978 | } |
| 5979 | } // switch |
| 5980 | } // while |
| 5981 | return ptr; |
| 5982 | len_delim_till_end: |
| 5983 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 5984 | {parser_till_end, object}, size); |
| 5985 | } |
| 5986 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5987 | bool TransceiverComponentsAttributes::MergePartialFromCodedStream( |
| 5988 | ::google::protobuf::io::CodedInputStream* input) { |
| 5989 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 5990 | ::google::protobuf::uint32 tag; |
| 5991 | // @@protoc_insertion_point(parse_start:dmi.TransceiverComponentsAttributes) |
| 5992 | for (;;) { |
| 5993 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 5994 | tag = p.first; |
| 5995 | if (!p.second) goto handle_unusual; |
| 5996 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 5997 | // .dmi.TransceiverComponentsAttributes.FormFactor form_factor = 1; |
| 5998 | case 1: { |
| 5999 | if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { |
| 6000 | int value = 0; |
| 6001 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 6002 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 6003 | input, &value))); |
| 6004 | set_form_factor(static_cast< ::dmi::TransceiverComponentsAttributes_FormFactor >(value)); |
| 6005 | } else { |
| 6006 | goto handle_unusual; |
| 6007 | } |
| 6008 | break; |
| 6009 | } |
| 6010 | |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 6011 | // .dmi.TransceiverType trans_type = 2; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6012 | case 2: { |
| 6013 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 6014 | int value = 0; |
| 6015 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 6016 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 6017 | input, &value))); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 6018 | set_trans_type(static_cast< ::dmi::TransceiverType >(value)); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6019 | } else { |
| 6020 | goto handle_unusual; |
| 6021 | } |
| 6022 | break; |
| 6023 | } |
| 6024 | |
| 6025 | // uint32 max_distance = 3; |
| 6026 | case 3: { |
| 6027 | if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { |
| 6028 | |
| 6029 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 6030 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 6031 | input, &max_distance_))); |
| 6032 | } else { |
| 6033 | goto handle_unusual; |
| 6034 | } |
| 6035 | break; |
| 6036 | } |
| 6037 | |
| 6038 | // .dmi.ValueScale max_distance_scale = 4; |
| 6039 | case 4: { |
| 6040 | if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { |
| 6041 | int value = 0; |
| 6042 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 6043 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 6044 | input, &value))); |
| 6045 | set_max_distance_scale(static_cast< ::dmi::ValueScale >(value)); |
| 6046 | } else { |
| 6047 | goto handle_unusual; |
| 6048 | } |
| 6049 | break; |
| 6050 | } |
| 6051 | |
| 6052 | // repeated uint32 rx_wavelength = 5; |
| 6053 | case 5: { |
| 6054 | if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { |
| 6055 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< |
| 6056 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 6057 | input, this->mutable_rx_wavelength()))); |
| 6058 | } else if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { |
| 6059 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
| 6060 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 6061 | 1, 42u, input, this->mutable_rx_wavelength()))); |
| 6062 | } else { |
| 6063 | goto handle_unusual; |
| 6064 | } |
| 6065 | break; |
| 6066 | } |
| 6067 | |
| 6068 | // repeated uint32 tx_wavelength = 6; |
| 6069 | case 6: { |
| 6070 | if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { |
| 6071 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< |
| 6072 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 6073 | input, this->mutable_tx_wavelength()))); |
| 6074 | } else if (static_cast< ::google::protobuf::uint8>(tag) == (48 & 0xFF)) { |
| 6075 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
| 6076 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 6077 | 1, 50u, input, this->mutable_tx_wavelength()))); |
| 6078 | } else { |
| 6079 | goto handle_unusual; |
| 6080 | } |
| 6081 | break; |
| 6082 | } |
| 6083 | |
| 6084 | // .dmi.ValueScale wavelength_scale = 7; |
| 6085 | case 7: { |
| 6086 | if (static_cast< ::google::protobuf::uint8>(tag) == (56 & 0xFF)) { |
| 6087 | int value = 0; |
| 6088 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 6089 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 6090 | input, &value))); |
| 6091 | set_wavelength_scale(static_cast< ::dmi::ValueScale >(value)); |
| 6092 | } else { |
| 6093 | goto handle_unusual; |
| 6094 | } |
| 6095 | break; |
| 6096 | } |
| 6097 | |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 6098 | // repeated int32 tx_power = 8; |
| 6099 | case 8: { |
| 6100 | if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) { |
| 6101 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< |
| 6102 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 6103 | input, this->mutable_tx_power()))); |
| 6104 | } else if (static_cast< ::google::protobuf::uint8>(tag) == (64 & 0xFF)) { |
| 6105 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
| 6106 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 6107 | 1, 66u, input, this->mutable_tx_power()))); |
| 6108 | } else { |
| 6109 | goto handle_unusual; |
| 6110 | } |
| 6111 | break; |
| 6112 | } |
| 6113 | |
| 6114 | // .dmi.ValueScale tx_power_scale = 9; |
| 6115 | case 9: { |
| 6116 | if (static_cast< ::google::protobuf::uint8>(tag) == (72 & 0xFF)) { |
| 6117 | int value = 0; |
| 6118 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 6119 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 6120 | input, &value))); |
| 6121 | set_tx_power_scale(static_cast< ::dmi::ValueScale >(value)); |
| 6122 | } else { |
| 6123 | goto handle_unusual; |
| 6124 | } |
| 6125 | break; |
| 6126 | } |
| 6127 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6128 | default: { |
| 6129 | handle_unusual: |
| 6130 | if (tag == 0) { |
| 6131 | goto success; |
| 6132 | } |
| 6133 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 6134 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 6135 | break; |
| 6136 | } |
| 6137 | } |
| 6138 | } |
| 6139 | success: |
| 6140 | // @@protoc_insertion_point(parse_success:dmi.TransceiverComponentsAttributes) |
| 6141 | return true; |
| 6142 | failure: |
| 6143 | // @@protoc_insertion_point(parse_failure:dmi.TransceiverComponentsAttributes) |
| 6144 | return false; |
| 6145 | #undef DO_ |
| 6146 | } |
| 6147 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 6148 | |
| 6149 | void TransceiverComponentsAttributes::SerializeWithCachedSizes( |
| 6150 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 6151 | // @@protoc_insertion_point(serialize_start:dmi.TransceiverComponentsAttributes) |
| 6152 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 6153 | (void) cached_has_bits; |
| 6154 | |
| 6155 | // .dmi.TransceiverComponentsAttributes.FormFactor form_factor = 1; |
| 6156 | if (this->form_factor() != 0) { |
| 6157 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 6158 | 1, this->form_factor(), output); |
| 6159 | } |
| 6160 | |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 6161 | // .dmi.TransceiverType trans_type = 2; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6162 | if (this->trans_type() != 0) { |
| 6163 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 6164 | 2, this->trans_type(), output); |
| 6165 | } |
| 6166 | |
| 6167 | // uint32 max_distance = 3; |
| 6168 | if (this->max_distance() != 0) { |
| 6169 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->max_distance(), output); |
| 6170 | } |
| 6171 | |
| 6172 | // .dmi.ValueScale max_distance_scale = 4; |
| 6173 | if (this->max_distance_scale() != 0) { |
| 6174 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 6175 | 4, this->max_distance_scale(), output); |
| 6176 | } |
| 6177 | |
| 6178 | // repeated uint32 rx_wavelength = 5; |
| 6179 | if (this->rx_wavelength_size() > 0) { |
| 6180 | ::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
| 6181 | output->WriteVarint32(_rx_wavelength_cached_byte_size_.load( |
| 6182 | std::memory_order_relaxed)); |
| 6183 | } |
| 6184 | for (int i = 0, n = this->rx_wavelength_size(); i < n; i++) { |
| 6185 | ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag( |
| 6186 | this->rx_wavelength(i), output); |
| 6187 | } |
| 6188 | |
| 6189 | // repeated uint32 tx_wavelength = 6; |
| 6190 | if (this->tx_wavelength_size() > 0) { |
| 6191 | ::google::protobuf::internal::WireFormatLite::WriteTag(6, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
| 6192 | output->WriteVarint32(_tx_wavelength_cached_byte_size_.load( |
| 6193 | std::memory_order_relaxed)); |
| 6194 | } |
| 6195 | for (int i = 0, n = this->tx_wavelength_size(); i < n; i++) { |
| 6196 | ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag( |
| 6197 | this->tx_wavelength(i), output); |
| 6198 | } |
| 6199 | |
| 6200 | // .dmi.ValueScale wavelength_scale = 7; |
| 6201 | if (this->wavelength_scale() != 0) { |
| 6202 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 6203 | 7, this->wavelength_scale(), output); |
| 6204 | } |
| 6205 | |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 6206 | // repeated int32 tx_power = 8; |
| 6207 | if (this->tx_power_size() > 0) { |
| 6208 | ::google::protobuf::internal::WireFormatLite::WriteTag(8, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
| 6209 | output->WriteVarint32(_tx_power_cached_byte_size_.load( |
| 6210 | std::memory_order_relaxed)); |
| 6211 | } |
| 6212 | for (int i = 0, n = this->tx_power_size(); i < n; i++) { |
| 6213 | ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( |
| 6214 | this->tx_power(i), output); |
| 6215 | } |
| 6216 | |
| 6217 | // .dmi.ValueScale tx_power_scale = 9; |
| 6218 | if (this->tx_power_scale() != 0) { |
| 6219 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 6220 | 9, this->tx_power_scale(), output); |
| 6221 | } |
| 6222 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6223 | if (_internal_metadata_.have_unknown_fields()) { |
| 6224 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 6225 | _internal_metadata_.unknown_fields(), output); |
| 6226 | } |
| 6227 | // @@protoc_insertion_point(serialize_end:dmi.TransceiverComponentsAttributes) |
| 6228 | } |
| 6229 | |
| 6230 | ::google::protobuf::uint8* TransceiverComponentsAttributes::InternalSerializeWithCachedSizesToArray( |
| 6231 | ::google::protobuf::uint8* target) const { |
| 6232 | // @@protoc_insertion_point(serialize_to_array_start:dmi.TransceiverComponentsAttributes) |
| 6233 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 6234 | (void) cached_has_bits; |
| 6235 | |
| 6236 | // .dmi.TransceiverComponentsAttributes.FormFactor form_factor = 1; |
| 6237 | if (this->form_factor() != 0) { |
| 6238 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 6239 | 1, this->form_factor(), target); |
| 6240 | } |
| 6241 | |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 6242 | // .dmi.TransceiverType trans_type = 2; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6243 | if (this->trans_type() != 0) { |
| 6244 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 6245 | 2, this->trans_type(), target); |
| 6246 | } |
| 6247 | |
| 6248 | // uint32 max_distance = 3; |
| 6249 | if (this->max_distance() != 0) { |
| 6250 | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->max_distance(), target); |
| 6251 | } |
| 6252 | |
| 6253 | // .dmi.ValueScale max_distance_scale = 4; |
| 6254 | if (this->max_distance_scale() != 0) { |
| 6255 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 6256 | 4, this->max_distance_scale(), target); |
| 6257 | } |
| 6258 | |
| 6259 | // repeated uint32 rx_wavelength = 5; |
| 6260 | if (this->rx_wavelength_size() > 0) { |
| 6261 | target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( |
| 6262 | 5, |
| 6263 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
| 6264 | target); |
| 6265 | target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
| 6266 | _rx_wavelength_cached_byte_size_.load(std::memory_order_relaxed), |
| 6267 | target); |
| 6268 | target = ::google::protobuf::internal::WireFormatLite:: |
| 6269 | WriteUInt32NoTagToArray(this->rx_wavelength_, target); |
| 6270 | } |
| 6271 | |
| 6272 | // repeated uint32 tx_wavelength = 6; |
| 6273 | if (this->tx_wavelength_size() > 0) { |
| 6274 | target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( |
| 6275 | 6, |
| 6276 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
| 6277 | target); |
| 6278 | target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
| 6279 | _tx_wavelength_cached_byte_size_.load(std::memory_order_relaxed), |
| 6280 | target); |
| 6281 | target = ::google::protobuf::internal::WireFormatLite:: |
| 6282 | WriteUInt32NoTagToArray(this->tx_wavelength_, target); |
| 6283 | } |
| 6284 | |
| 6285 | // .dmi.ValueScale wavelength_scale = 7; |
| 6286 | if (this->wavelength_scale() != 0) { |
| 6287 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 6288 | 7, this->wavelength_scale(), target); |
| 6289 | } |
| 6290 | |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 6291 | // repeated int32 tx_power = 8; |
| 6292 | if (this->tx_power_size() > 0) { |
| 6293 | target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( |
| 6294 | 8, |
| 6295 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
| 6296 | target); |
| 6297 | target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
| 6298 | _tx_power_cached_byte_size_.load(std::memory_order_relaxed), |
| 6299 | target); |
| 6300 | target = ::google::protobuf::internal::WireFormatLite:: |
| 6301 | WriteInt32NoTagToArray(this->tx_power_, target); |
| 6302 | } |
| 6303 | |
| 6304 | // .dmi.ValueScale tx_power_scale = 9; |
| 6305 | if (this->tx_power_scale() != 0) { |
| 6306 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 6307 | 9, this->tx_power_scale(), target); |
| 6308 | } |
| 6309 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6310 | if (_internal_metadata_.have_unknown_fields()) { |
| 6311 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 6312 | _internal_metadata_.unknown_fields(), target); |
| 6313 | } |
| 6314 | // @@protoc_insertion_point(serialize_to_array_end:dmi.TransceiverComponentsAttributes) |
| 6315 | return target; |
| 6316 | } |
| 6317 | |
| 6318 | size_t TransceiverComponentsAttributes::ByteSizeLong() const { |
| 6319 | // @@protoc_insertion_point(message_byte_size_start:dmi.TransceiverComponentsAttributes) |
| 6320 | size_t total_size = 0; |
| 6321 | |
| 6322 | if (_internal_metadata_.have_unknown_fields()) { |
| 6323 | total_size += |
| 6324 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 6325 | _internal_metadata_.unknown_fields()); |
| 6326 | } |
| 6327 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 6328 | // Prevent compiler warnings about cached_has_bits being unused |
| 6329 | (void) cached_has_bits; |
| 6330 | |
| 6331 | // repeated uint32 rx_wavelength = 5; |
| 6332 | { |
| 6333 | size_t data_size = ::google::protobuf::internal::WireFormatLite:: |
| 6334 | UInt32Size(this->rx_wavelength_); |
| 6335 | if (data_size > 0) { |
| 6336 | total_size += 1 + |
| 6337 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 6338 | static_cast<::google::protobuf::int32>(data_size)); |
| 6339 | } |
| 6340 | int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); |
| 6341 | _rx_wavelength_cached_byte_size_.store(cached_size, |
| 6342 | std::memory_order_relaxed); |
| 6343 | total_size += data_size; |
| 6344 | } |
| 6345 | |
| 6346 | // repeated uint32 tx_wavelength = 6; |
| 6347 | { |
| 6348 | size_t data_size = ::google::protobuf::internal::WireFormatLite:: |
| 6349 | UInt32Size(this->tx_wavelength_); |
| 6350 | if (data_size > 0) { |
| 6351 | total_size += 1 + |
| 6352 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 6353 | static_cast<::google::protobuf::int32>(data_size)); |
| 6354 | } |
| 6355 | int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); |
| 6356 | _tx_wavelength_cached_byte_size_.store(cached_size, |
| 6357 | std::memory_order_relaxed); |
| 6358 | total_size += data_size; |
| 6359 | } |
| 6360 | |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 6361 | // repeated int32 tx_power = 8; |
| 6362 | { |
| 6363 | size_t data_size = ::google::protobuf::internal::WireFormatLite:: |
| 6364 | Int32Size(this->tx_power_); |
| 6365 | if (data_size > 0) { |
| 6366 | total_size += 1 + |
| 6367 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 6368 | static_cast<::google::protobuf::int32>(data_size)); |
| 6369 | } |
| 6370 | int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); |
| 6371 | _tx_power_cached_byte_size_.store(cached_size, |
| 6372 | std::memory_order_relaxed); |
| 6373 | total_size += data_size; |
| 6374 | } |
| 6375 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6376 | // .dmi.TransceiverComponentsAttributes.FormFactor form_factor = 1; |
| 6377 | if (this->form_factor() != 0) { |
| 6378 | total_size += 1 + |
| 6379 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->form_factor()); |
| 6380 | } |
| 6381 | |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 6382 | // .dmi.TransceiverType trans_type = 2; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6383 | if (this->trans_type() != 0) { |
| 6384 | total_size += 1 + |
| 6385 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->trans_type()); |
| 6386 | } |
| 6387 | |
| 6388 | // uint32 max_distance = 3; |
| 6389 | if (this->max_distance() != 0) { |
| 6390 | total_size += 1 + |
| 6391 | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
| 6392 | this->max_distance()); |
| 6393 | } |
| 6394 | |
| 6395 | // .dmi.ValueScale max_distance_scale = 4; |
| 6396 | if (this->max_distance_scale() != 0) { |
| 6397 | total_size += 1 + |
| 6398 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->max_distance_scale()); |
| 6399 | } |
| 6400 | |
| 6401 | // .dmi.ValueScale wavelength_scale = 7; |
| 6402 | if (this->wavelength_scale() != 0) { |
| 6403 | total_size += 1 + |
| 6404 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->wavelength_scale()); |
| 6405 | } |
| 6406 | |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 6407 | // .dmi.ValueScale tx_power_scale = 9; |
| 6408 | if (this->tx_power_scale() != 0) { |
| 6409 | total_size += 1 + |
| 6410 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->tx_power_scale()); |
| 6411 | } |
| 6412 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6413 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 6414 | SetCachedSize(cached_size); |
| 6415 | return total_size; |
| 6416 | } |
| 6417 | |
| 6418 | void TransceiverComponentsAttributes::MergeFrom(const ::google::protobuf::Message& from) { |
| 6419 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.TransceiverComponentsAttributes) |
| 6420 | GOOGLE_DCHECK_NE(&from, this); |
| 6421 | const TransceiverComponentsAttributes* source = |
| 6422 | ::google::protobuf::DynamicCastToGenerated<TransceiverComponentsAttributes>( |
| 6423 | &from); |
| 6424 | if (source == nullptr) { |
| 6425 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.TransceiverComponentsAttributes) |
| 6426 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 6427 | } else { |
| 6428 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.TransceiverComponentsAttributes) |
| 6429 | MergeFrom(*source); |
| 6430 | } |
| 6431 | } |
| 6432 | |
| 6433 | void TransceiverComponentsAttributes::MergeFrom(const TransceiverComponentsAttributes& from) { |
| 6434 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.TransceiverComponentsAttributes) |
| 6435 | GOOGLE_DCHECK_NE(&from, this); |
| 6436 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 6437 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 6438 | (void) cached_has_bits; |
| 6439 | |
| 6440 | rx_wavelength_.MergeFrom(from.rx_wavelength_); |
| 6441 | tx_wavelength_.MergeFrom(from.tx_wavelength_); |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 6442 | tx_power_.MergeFrom(from.tx_power_); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6443 | if (from.form_factor() != 0) { |
| 6444 | set_form_factor(from.form_factor()); |
| 6445 | } |
| 6446 | if (from.trans_type() != 0) { |
| 6447 | set_trans_type(from.trans_type()); |
| 6448 | } |
| 6449 | if (from.max_distance() != 0) { |
| 6450 | set_max_distance(from.max_distance()); |
| 6451 | } |
| 6452 | if (from.max_distance_scale() != 0) { |
| 6453 | set_max_distance_scale(from.max_distance_scale()); |
| 6454 | } |
| 6455 | if (from.wavelength_scale() != 0) { |
| 6456 | set_wavelength_scale(from.wavelength_scale()); |
| 6457 | } |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 6458 | if (from.tx_power_scale() != 0) { |
| 6459 | set_tx_power_scale(from.tx_power_scale()); |
| 6460 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6461 | } |
| 6462 | |
| 6463 | void TransceiverComponentsAttributes::CopyFrom(const ::google::protobuf::Message& from) { |
| 6464 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.TransceiverComponentsAttributes) |
| 6465 | if (&from == this) return; |
| 6466 | Clear(); |
| 6467 | MergeFrom(from); |
| 6468 | } |
| 6469 | |
| 6470 | void TransceiverComponentsAttributes::CopyFrom(const TransceiverComponentsAttributes& from) { |
| 6471 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.TransceiverComponentsAttributes) |
| 6472 | if (&from == this) return; |
| 6473 | Clear(); |
| 6474 | MergeFrom(from); |
| 6475 | } |
| 6476 | |
| 6477 | bool TransceiverComponentsAttributes::IsInitialized() const { |
| 6478 | return true; |
| 6479 | } |
| 6480 | |
| 6481 | void TransceiverComponentsAttributes::Swap(TransceiverComponentsAttributes* other) { |
| 6482 | if (other == this) return; |
| 6483 | InternalSwap(other); |
| 6484 | } |
| 6485 | void TransceiverComponentsAttributes::InternalSwap(TransceiverComponentsAttributes* other) { |
| 6486 | using std::swap; |
| 6487 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 6488 | rx_wavelength_.InternalSwap(&other->rx_wavelength_); |
| 6489 | tx_wavelength_.InternalSwap(&other->tx_wavelength_); |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 6490 | tx_power_.InternalSwap(&other->tx_power_); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6491 | swap(form_factor_, other->form_factor_); |
| 6492 | swap(trans_type_, other->trans_type_); |
| 6493 | swap(max_distance_, other->max_distance_); |
| 6494 | swap(max_distance_scale_, other->max_distance_scale_); |
| 6495 | swap(wavelength_scale_, other->wavelength_scale_); |
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 6496 | swap(tx_power_scale_, other->tx_power_scale_); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 6497 | } |
| 6498 | |
| 6499 | ::google::protobuf::Metadata TransceiverComponentsAttributes::GetMetadata() const { |
| 6500 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 6501 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 6502 | } |
| 6503 | |
| 6504 | |
| 6505 | // =================================================================== |
| 6506 | |
| 6507 | void Component::InitAsDefaultInstance() { |
| 6508 | ::dmi::_Component_default_instance_._instance.get_mutable()->mfg_date_ = const_cast< ::google::protobuf::Timestamp*>( |
| 6509 | ::google::protobuf::Timestamp::internal_default_instance()); |
| 6510 | ::dmi::_Component_default_instance_._instance.get_mutable()->uri_ = const_cast< ::dmi::Uri*>( |
| 6511 | ::dmi::Uri::internal_default_instance()); |
| 6512 | ::dmi::_Component_default_instance_._instance.get_mutable()->uuid_ = const_cast< ::dmi::Uuid*>( |
| 6513 | ::dmi::Uuid::internal_default_instance()); |
| 6514 | ::dmi::_Component_default_instance_._instance.get_mutable()->state_ = const_cast< ::dmi::ComponentState*>( |
| 6515 | ::dmi::ComponentState::internal_default_instance()); |
| 6516 | ::dmi::_Component_default_instance_.port_attr_ = const_cast< ::dmi::PortComponentAttributes*>( |
| 6517 | ::dmi::PortComponentAttributes::internal_default_instance()); |
| 6518 | ::dmi::_Component_default_instance_.container_attr_ = const_cast< ::dmi::ContainerComponentAttributes*>( |
| 6519 | ::dmi::ContainerComponentAttributes::internal_default_instance()); |
| 6520 | ::dmi::_Component_default_instance_.psu_attr_ = const_cast< ::dmi::PsuComponentAttributes*>( |
| 6521 | ::dmi::PsuComponentAttributes::internal_default_instance()); |
| 6522 | ::dmi::_Component_default_instance_.transceiver_attr_ = const_cast< ::dmi::TransceiverComponentsAttributes*>( |
| 6523 | ::dmi::TransceiverComponentsAttributes::internal_default_instance()); |
| 6524 | } |
| 6525 | class Component::HasBitSetters { |
| 6526 | public: |
| 6527 | static const ::google::protobuf::Timestamp& mfg_date(const Component* msg); |
| 6528 | static const ::dmi::Uri& uri(const Component* msg); |
| 6529 | static const ::dmi::Uuid& uuid(const Component* msg); |
| 6530 | static const ::dmi::ComponentState& state(const Component* msg); |
| 6531 | static const ::dmi::PortComponentAttributes& port_attr(const Component* msg); |
| 6532 | static const ::dmi::ContainerComponentAttributes& container_attr(const Component* msg); |
| 6533 | static const ::dmi::PsuComponentAttributes& psu_attr(const Component* msg); |
| 6534 | static const ::dmi::TransceiverComponentsAttributes& transceiver_attr(const Component* msg); |
| 6535 | }; |
| 6536 | |
| 6537 | const ::google::protobuf::Timestamp& |
| 6538 | Component::HasBitSetters::mfg_date(const Component* msg) { |
| 6539 | return *msg->mfg_date_; |
| 6540 | } |
| 6541 | const ::dmi::Uri& |
| 6542 | Component::HasBitSetters::uri(const Component* msg) { |
| 6543 | return *msg->uri_; |
| 6544 | } |
| 6545 | const ::dmi::Uuid& |
| 6546 | Component::HasBitSetters::uuid(const Component* msg) { |
| 6547 | return *msg->uuid_; |
| 6548 | } |
| 6549 | const ::dmi::ComponentState& |
| 6550 | Component::HasBitSetters::state(const Component* msg) { |
| 6551 | return *msg->state_; |
| 6552 | } |
| 6553 | const ::dmi::PortComponentAttributes& |
| 6554 | Component::HasBitSetters::port_attr(const Component* msg) { |
| 6555 | return *msg->specific_.port_attr_; |
| 6556 | } |
| 6557 | const ::dmi::ContainerComponentAttributes& |
| 6558 | Component::HasBitSetters::container_attr(const Component* msg) { |
| 6559 | return *msg->specific_.container_attr_; |
| 6560 | } |
| 6561 | const ::dmi::PsuComponentAttributes& |
| 6562 | Component::HasBitSetters::psu_attr(const Component* msg) { |
| 6563 | return *msg->specific_.psu_attr_; |
| 6564 | } |
| 6565 | const ::dmi::TransceiverComponentsAttributes& |
| 6566 | Component::HasBitSetters::transceiver_attr(const Component* msg) { |
| 6567 | return *msg->specific_.transceiver_attr_; |
| 6568 | } |
| 6569 | void Component::clear_mfg_date() { |
| 6570 | if (GetArenaNoVirtual() == nullptr && mfg_date_ != nullptr) { |
| 6571 | delete mfg_date_; |
| 6572 | } |
| 6573 | mfg_date_ = nullptr; |
| 6574 | } |
| 6575 | void Component::set_allocated_port_attr(::dmi::PortComponentAttributes* port_attr) { |
| 6576 | ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); |
| 6577 | clear_specific(); |
| 6578 | if (port_attr) { |
| 6579 | ::google::protobuf::Arena* submessage_arena = nullptr; |
| 6580 | if (message_arena != submessage_arena) { |
| 6581 | port_attr = ::google::protobuf::internal::GetOwnedMessage( |
| 6582 | message_arena, port_attr, submessage_arena); |
| 6583 | } |
| 6584 | set_has_port_attr(); |
| 6585 | specific_.port_attr_ = port_attr; |
| 6586 | } |
| 6587 | // @@protoc_insertion_point(field_set_allocated:dmi.Component.port_attr) |
| 6588 | } |
| 6589 | void Component::set_allocated_container_attr(::dmi::ContainerComponentAttributes* container_attr) { |
| 6590 | ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); |
| 6591 | clear_specific(); |
| 6592 | if (container_attr) { |
| 6593 | ::google::protobuf::Arena* submessage_arena = nullptr; |
| 6594 | if (message_arena != submessage_arena) { |
| 6595 | container_attr = ::google::protobuf::internal::GetOwnedMessage( |
| 6596 | message_arena, container_attr, submessage_arena); |
| 6597 | } |
| 6598 | set_has_container_attr(); |
| 6599 | specific_.container_attr_ = container_attr; |
| 6600 | } |
| 6601 | // @@protoc_insertion_point(field_set_allocated:dmi.Component.container_attr) |
| 6602 | } |
| 6603 | void Component::set_allocated_psu_attr(::dmi::PsuComponentAttributes* psu_attr) { |
| 6604 | ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); |
| 6605 | clear_specific(); |
| 6606 | if (psu_attr) { |
| 6607 | ::google::protobuf::Arena* submessage_arena = nullptr; |
| 6608 | if (message_arena != submessage_arena) { |
| 6609 | psu_attr = ::google::protobuf::internal::GetOwnedMessage( |
| 6610 | message_arena, psu_attr, submessage_arena); |
| 6611 | } |
| 6612 | set_has_psu_attr(); |
| 6613 | specific_.psu_attr_ = psu_attr; |
| 6614 | } |
| 6615 | // @@protoc_insertion_point(field_set_allocated:dmi.Component.psu_attr) |
| 6616 | } |
| 6617 | void Component::set_allocated_transceiver_attr(::dmi::TransceiverComponentsAttributes* transceiver_attr) { |
| 6618 | ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); |
| 6619 | clear_specific(); |
| 6620 | if (transceiver_attr) { |
| 6621 | ::google::protobuf::Arena* submessage_arena = nullptr; |
| 6622 | if (message_arena != submessage_arena) { |
| 6623 | transceiver_attr = ::google::protobuf::internal::GetOwnedMessage( |
| 6624 | message_arena, transceiver_attr, submessage_arena); |
| 6625 | } |
| 6626 | set_has_transceiver_attr(); |
| 6627 | specific_.transceiver_attr_ = transceiver_attr; |
| 6628 | } |
| 6629 | // @@protoc_insertion_point(field_set_allocated:dmi.Component.transceiver_attr) |
| 6630 | } |
| 6631 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 6632 | const int Component::kNameFieldNumber; |
| 6633 | const int Component::kClassFieldNumber; |
| 6634 | const int Component::kDescriptionFieldNumber; |
| 6635 | const int Component::kParentFieldNumber; |
| 6636 | const int Component::kParentRelPosFieldNumber; |
| 6637 | const int Component::kChildrenFieldNumber; |
| 6638 | const int Component::kHardwareRevFieldNumber; |
| 6639 | const int Component::kFirmwareRevFieldNumber; |
| 6640 | const int Component::kSoftwareRevFieldNumber; |
| 6641 | const int Component::kSerialNumFieldNumber; |
| 6642 | const int Component::kMfgNameFieldNumber; |
| 6643 | const int Component::kModelNameFieldNumber; |
| 6644 | const int Component::kAliasFieldNumber; |
| 6645 | const int Component::kAssetIdFieldNumber; |
| 6646 | const int Component::kIsFruFieldNumber; |
| 6647 | const int Component::kMfgDateFieldNumber; |
| 6648 | const int Component::kUriFieldNumber; |
| 6649 | const int Component::kUuidFieldNumber; |
| 6650 | const int Component::kStateFieldNumber; |
| 6651 | const int Component::kSensorDataFieldNumber; |
| 6652 | const int Component::kPortAttrFieldNumber; |
| 6653 | const int Component::kContainerAttrFieldNumber; |
| 6654 | const int Component::kPsuAttrFieldNumber; |
| 6655 | const int Component::kTransceiverAttrFieldNumber; |
| 6656 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 6657 | |
| 6658 | Component::Component() |
| 6659 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 6660 | SharedCtor(); |
| 6661 | // @@protoc_insertion_point(constructor:dmi.Component) |
| 6662 | } |
| 6663 | Component::Component(const Component& from) |
| 6664 | : ::google::protobuf::Message(), |
| 6665 | _internal_metadata_(nullptr), |
| 6666 | children_(from.children_), |
| 6667 | sensor_data_(from.sensor_data_) { |
| 6668 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 6669 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6670 | if (from.name().size() > 0) { |
| 6671 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
| 6672 | } |
| 6673 | description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6674 | if (from.description().size() > 0) { |
| 6675 | description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.description_); |
| 6676 | } |
| 6677 | parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6678 | if (from.parent().size() > 0) { |
| 6679 | parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); |
| 6680 | } |
| 6681 | hardware_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6682 | if (from.hardware_rev().size() > 0) { |
| 6683 | hardware_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.hardware_rev_); |
| 6684 | } |
| 6685 | firmware_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6686 | if (from.firmware_rev().size() > 0) { |
| 6687 | firmware_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.firmware_rev_); |
| 6688 | } |
| 6689 | software_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6690 | if (from.software_rev().size() > 0) { |
| 6691 | software_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.software_rev_); |
| 6692 | } |
| 6693 | serial_num_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6694 | if (from.serial_num().size() > 0) { |
| 6695 | serial_num_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.serial_num_); |
| 6696 | } |
| 6697 | mfg_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6698 | if (from.mfg_name().size() > 0) { |
| 6699 | mfg_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mfg_name_); |
| 6700 | } |
| 6701 | model_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6702 | if (from.model_name().size() > 0) { |
| 6703 | model_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.model_name_); |
| 6704 | } |
| 6705 | alias_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6706 | if (from.alias().size() > 0) { |
| 6707 | alias_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.alias_); |
| 6708 | } |
| 6709 | asset_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6710 | if (from.asset_id().size() > 0) { |
| 6711 | asset_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.asset_id_); |
| 6712 | } |
| 6713 | if (from.has_mfg_date()) { |
| 6714 | mfg_date_ = new ::google::protobuf::Timestamp(*from.mfg_date_); |
| 6715 | } else { |
| 6716 | mfg_date_ = nullptr; |
| 6717 | } |
| 6718 | if (from.has_uri()) { |
| 6719 | uri_ = new ::dmi::Uri(*from.uri_); |
| 6720 | } else { |
| 6721 | uri_ = nullptr; |
| 6722 | } |
| 6723 | if (from.has_uuid()) { |
| 6724 | uuid_ = new ::dmi::Uuid(*from.uuid_); |
| 6725 | } else { |
| 6726 | uuid_ = nullptr; |
| 6727 | } |
| 6728 | if (from.has_state()) { |
| 6729 | state_ = new ::dmi::ComponentState(*from.state_); |
| 6730 | } else { |
| 6731 | state_ = nullptr; |
| 6732 | } |
| 6733 | ::memcpy(&class__, &from.class__, |
| 6734 | static_cast<size_t>(reinterpret_cast<char*>(&is_fru_) - |
| 6735 | reinterpret_cast<char*>(&class__)) + sizeof(is_fru_)); |
| 6736 | clear_has_specific(); |
| 6737 | switch (from.specific_case()) { |
| 6738 | case kPortAttr: { |
| 6739 | mutable_port_attr()->::dmi::PortComponentAttributes::MergeFrom(from.port_attr()); |
| 6740 | break; |
| 6741 | } |
| 6742 | case kContainerAttr: { |
| 6743 | mutable_container_attr()->::dmi::ContainerComponentAttributes::MergeFrom(from.container_attr()); |
| 6744 | break; |
| 6745 | } |
| 6746 | case kPsuAttr: { |
| 6747 | mutable_psu_attr()->::dmi::PsuComponentAttributes::MergeFrom(from.psu_attr()); |
| 6748 | break; |
| 6749 | } |
| 6750 | case kTransceiverAttr: { |
| 6751 | mutable_transceiver_attr()->::dmi::TransceiverComponentsAttributes::MergeFrom(from.transceiver_attr()); |
| 6752 | break; |
| 6753 | } |
| 6754 | case SPECIFIC_NOT_SET: { |
| 6755 | break; |
| 6756 | } |
| 6757 | } |
| 6758 | // @@protoc_insertion_point(copy_constructor:dmi.Component) |
| 6759 | } |
| 6760 | |
| 6761 | void Component::SharedCtor() { |
| 6762 | ::google::protobuf::internal::InitSCC( |
| 6763 | &scc_info_Component_dmi_2fhw_2eproto.base); |
| 6764 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6765 | description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6766 | parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6767 | hardware_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6768 | firmware_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6769 | software_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6770 | serial_num_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6771 | mfg_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6772 | model_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6773 | alias_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6774 | asset_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6775 | ::memset(&mfg_date_, 0, static_cast<size_t>( |
| 6776 | reinterpret_cast<char*>(&is_fru_) - |
| 6777 | reinterpret_cast<char*>(&mfg_date_)) + sizeof(is_fru_)); |
| 6778 | clear_has_specific(); |
| 6779 | } |
| 6780 | |
| 6781 | Component::~Component() { |
| 6782 | // @@protoc_insertion_point(destructor:dmi.Component) |
| 6783 | SharedDtor(); |
| 6784 | } |
| 6785 | |
| 6786 | void Component::SharedDtor() { |
| 6787 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6788 | description_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6789 | parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6790 | hardware_rev_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6791 | firmware_rev_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6792 | software_rev_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6793 | serial_num_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6794 | mfg_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6795 | model_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6796 | alias_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6797 | asset_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6798 | if (this != internal_default_instance()) delete mfg_date_; |
| 6799 | if (this != internal_default_instance()) delete uri_; |
| 6800 | if (this != internal_default_instance()) delete uuid_; |
| 6801 | if (this != internal_default_instance()) delete state_; |
| 6802 | if (has_specific()) { |
| 6803 | clear_specific(); |
| 6804 | } |
| 6805 | } |
| 6806 | |
| 6807 | void Component::SetCachedSize(int size) const { |
| 6808 | _cached_size_.Set(size); |
| 6809 | } |
| 6810 | const Component& Component::default_instance() { |
| 6811 | ::google::protobuf::internal::InitSCC(&::scc_info_Component_dmi_2fhw_2eproto.base); |
| 6812 | return *internal_default_instance(); |
| 6813 | } |
| 6814 | |
| 6815 | |
| 6816 | void Component::clear_specific() { |
| 6817 | // @@protoc_insertion_point(one_of_clear_start:dmi.Component) |
| 6818 | switch (specific_case()) { |
| 6819 | case kPortAttr: { |
| 6820 | delete specific_.port_attr_; |
| 6821 | break; |
| 6822 | } |
| 6823 | case kContainerAttr: { |
| 6824 | delete specific_.container_attr_; |
| 6825 | break; |
| 6826 | } |
| 6827 | case kPsuAttr: { |
| 6828 | delete specific_.psu_attr_; |
| 6829 | break; |
| 6830 | } |
| 6831 | case kTransceiverAttr: { |
| 6832 | delete specific_.transceiver_attr_; |
| 6833 | break; |
| 6834 | } |
| 6835 | case SPECIFIC_NOT_SET: { |
| 6836 | break; |
| 6837 | } |
| 6838 | } |
| 6839 | _oneof_case_[0] = SPECIFIC_NOT_SET; |
| 6840 | } |
| 6841 | |
| 6842 | |
| 6843 | void Component::Clear() { |
| 6844 | // @@protoc_insertion_point(message_clear_start:dmi.Component) |
| 6845 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 6846 | // Prevent compiler warnings about cached_has_bits being unused |
| 6847 | (void) cached_has_bits; |
| 6848 | |
| 6849 | children_.Clear(); |
| 6850 | sensor_data_.Clear(); |
| 6851 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6852 | description_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6853 | parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6854 | hardware_rev_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6855 | firmware_rev_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6856 | software_rev_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6857 | serial_num_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6858 | mfg_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6859 | model_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6860 | alias_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6861 | asset_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 6862 | if (GetArenaNoVirtual() == nullptr && mfg_date_ != nullptr) { |
| 6863 | delete mfg_date_; |
| 6864 | } |
| 6865 | mfg_date_ = nullptr; |
| 6866 | if (GetArenaNoVirtual() == nullptr && uri_ != nullptr) { |
| 6867 | delete uri_; |
| 6868 | } |
| 6869 | uri_ = nullptr; |
| 6870 | if (GetArenaNoVirtual() == nullptr && uuid_ != nullptr) { |
| 6871 | delete uuid_; |
| 6872 | } |
| 6873 | uuid_ = nullptr; |
| 6874 | if (GetArenaNoVirtual() == nullptr && state_ != nullptr) { |
| 6875 | delete state_; |
| 6876 | } |
| 6877 | state_ = nullptr; |
| 6878 | ::memset(&class__, 0, static_cast<size_t>( |
| 6879 | reinterpret_cast<char*>(&is_fru_) - |
| 6880 | reinterpret_cast<char*>(&class__)) + sizeof(is_fru_)); |
| 6881 | clear_specific(); |
| 6882 | _internal_metadata_.Clear(); |
| 6883 | } |
| 6884 | |
| 6885 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 6886 | const char* Component::_InternalParse(const char* begin, const char* end, void* object, |
| 6887 | ::google::protobuf::internal::ParseContext* ctx) { |
| 6888 | auto msg = static_cast<Component*>(object); |
| 6889 | ::google::protobuf::int32 size; (void)size; |
| 6890 | int depth; (void)depth; |
| 6891 | ::google::protobuf::uint32 tag; |
| 6892 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 6893 | auto ptr = begin; |
| 6894 | while (ptr < end) { |
| 6895 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 6896 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6897 | switch (tag >> 3) { |
| 6898 | // string name = 1; |
| 6899 | case 1: { |
| 6900 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 6901 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6902 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6903 | ctx->extra_parse_data().SetFieldName("dmi.Component.name"); |
| 6904 | object = msg->mutable_name(); |
| 6905 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6906 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6907 | goto string_till_end; |
| 6908 | } |
| 6909 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6910 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6911 | ptr += size; |
| 6912 | break; |
| 6913 | } |
| 6914 | // .dmi.ComponentType class = 2; |
| 6915 | case 2: { |
| 6916 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 6917 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 6918 | msg->set_class_(static_cast<::dmi::ComponentType>(val)); |
| 6919 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6920 | break; |
| 6921 | } |
| 6922 | // string description = 3; |
| 6923 | case 3: { |
| 6924 | if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; |
| 6925 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6926 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6927 | ctx->extra_parse_data().SetFieldName("dmi.Component.description"); |
| 6928 | object = msg->mutable_description(); |
| 6929 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6930 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6931 | goto string_till_end; |
| 6932 | } |
| 6933 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6934 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6935 | ptr += size; |
| 6936 | break; |
| 6937 | } |
| 6938 | // string parent = 4; |
| 6939 | case 4: { |
| 6940 | if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; |
| 6941 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6942 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6943 | ctx->extra_parse_data().SetFieldName("dmi.Component.parent"); |
| 6944 | object = msg->mutable_parent(); |
| 6945 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6946 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6947 | goto string_till_end; |
| 6948 | } |
| 6949 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6950 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6951 | ptr += size; |
| 6952 | break; |
| 6953 | } |
| 6954 | // int32 parent_rel_pos = 5; |
| 6955 | case 5: { |
| 6956 | if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; |
| 6957 | msg->set_parent_rel_pos(::google::protobuf::internal::ReadVarint(&ptr)); |
| 6958 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6959 | break; |
| 6960 | } |
| 6961 | // repeated .dmi.Component children = 6; |
| 6962 | case 6: { |
| 6963 | if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; |
| 6964 | do { |
| 6965 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6966 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6967 | parser_till_end = ::dmi::Component::_InternalParse; |
| 6968 | object = msg->add_children(); |
| 6969 | if (size > end - ptr) goto len_delim_till_end; |
| 6970 | ptr += size; |
| 6971 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 6972 | {parser_till_end, object}, ptr - size, ptr)); |
| 6973 | if (ptr >= end) break; |
| 6974 | } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 50 && (ptr += 1)); |
| 6975 | break; |
| 6976 | } |
| 6977 | // string hardware_rev = 7; |
| 6978 | case 7: { |
| 6979 | if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; |
| 6980 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6981 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6982 | ctx->extra_parse_data().SetFieldName("dmi.Component.hardware_rev"); |
| 6983 | object = msg->mutable_hardware_rev(); |
| 6984 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6985 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6986 | goto string_till_end; |
| 6987 | } |
| 6988 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6989 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6990 | ptr += size; |
| 6991 | break; |
| 6992 | } |
| 6993 | // string firmware_rev = 8; |
| 6994 | case 8: { |
| 6995 | if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual; |
| 6996 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6997 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6998 | ctx->extra_parse_data().SetFieldName("dmi.Component.firmware_rev"); |
| 6999 | object = msg->mutable_firmware_rev(); |
| 7000 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 7001 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 7002 | goto string_till_end; |
| 7003 | } |
| 7004 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 7005 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 7006 | ptr += size; |
| 7007 | break; |
| 7008 | } |
| 7009 | // string software_rev = 9; |
| 7010 | case 9: { |
| 7011 | if (static_cast<::google::protobuf::uint8>(tag) != 74) goto handle_unusual; |
| 7012 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7013 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7014 | ctx->extra_parse_data().SetFieldName("dmi.Component.software_rev"); |
| 7015 | object = msg->mutable_software_rev(); |
| 7016 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 7017 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 7018 | goto string_till_end; |
| 7019 | } |
| 7020 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 7021 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 7022 | ptr += size; |
| 7023 | break; |
| 7024 | } |
| 7025 | // string serial_num = 10; |
| 7026 | case 10: { |
| 7027 | if (static_cast<::google::protobuf::uint8>(tag) != 82) goto handle_unusual; |
| 7028 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7029 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7030 | ctx->extra_parse_data().SetFieldName("dmi.Component.serial_num"); |
| 7031 | object = msg->mutable_serial_num(); |
| 7032 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 7033 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 7034 | goto string_till_end; |
| 7035 | } |
| 7036 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 7037 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 7038 | ptr += size; |
| 7039 | break; |
| 7040 | } |
| 7041 | // string mfg_name = 11; |
| 7042 | case 11: { |
| 7043 | if (static_cast<::google::protobuf::uint8>(tag) != 90) goto handle_unusual; |
| 7044 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7045 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7046 | ctx->extra_parse_data().SetFieldName("dmi.Component.mfg_name"); |
| 7047 | object = msg->mutable_mfg_name(); |
| 7048 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 7049 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 7050 | goto string_till_end; |
| 7051 | } |
| 7052 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 7053 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 7054 | ptr += size; |
| 7055 | break; |
| 7056 | } |
| 7057 | // string model_name = 12; |
| 7058 | case 12: { |
| 7059 | if (static_cast<::google::protobuf::uint8>(tag) != 98) goto handle_unusual; |
| 7060 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7061 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7062 | ctx->extra_parse_data().SetFieldName("dmi.Component.model_name"); |
| 7063 | object = msg->mutable_model_name(); |
| 7064 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 7065 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 7066 | goto string_till_end; |
| 7067 | } |
| 7068 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 7069 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 7070 | ptr += size; |
| 7071 | break; |
| 7072 | } |
| 7073 | // string alias = 13; |
| 7074 | case 13: { |
| 7075 | if (static_cast<::google::protobuf::uint8>(tag) != 106) goto handle_unusual; |
| 7076 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7077 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7078 | ctx->extra_parse_data().SetFieldName("dmi.Component.alias"); |
| 7079 | object = msg->mutable_alias(); |
| 7080 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 7081 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 7082 | goto string_till_end; |
| 7083 | } |
| 7084 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 7085 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 7086 | ptr += size; |
| 7087 | break; |
| 7088 | } |
| 7089 | // string asset_id = 14; |
| 7090 | case 14: { |
| 7091 | if (static_cast<::google::protobuf::uint8>(tag) != 114) goto handle_unusual; |
| 7092 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7093 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7094 | ctx->extra_parse_data().SetFieldName("dmi.Component.asset_id"); |
| 7095 | object = msg->mutable_asset_id(); |
| 7096 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 7097 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 7098 | goto string_till_end; |
| 7099 | } |
| 7100 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 7101 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 7102 | ptr += size; |
| 7103 | break; |
| 7104 | } |
| 7105 | // bool is_fru = 15; |
| 7106 | case 15: { |
| 7107 | if (static_cast<::google::protobuf::uint8>(tag) != 120) goto handle_unusual; |
| 7108 | msg->set_is_fru(::google::protobuf::internal::ReadVarint(&ptr)); |
| 7109 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7110 | break; |
| 7111 | } |
| 7112 | // .google.protobuf.Timestamp mfg_date = 16; |
| 7113 | case 16: { |
| 7114 | if (static_cast<::google::protobuf::uint8>(tag) != 130) goto handle_unusual; |
| 7115 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7116 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7117 | parser_till_end = ::google::protobuf::Timestamp::_InternalParse; |
| 7118 | object = msg->mutable_mfg_date(); |
| 7119 | if (size > end - ptr) goto len_delim_till_end; |
| 7120 | ptr += size; |
| 7121 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7122 | {parser_till_end, object}, ptr - size, ptr)); |
| 7123 | break; |
| 7124 | } |
| 7125 | // .dmi.Uri uri = 17; |
| 7126 | case 17: { |
| 7127 | if (static_cast<::google::protobuf::uint8>(tag) != 138) goto handle_unusual; |
| 7128 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7129 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7130 | parser_till_end = ::dmi::Uri::_InternalParse; |
| 7131 | object = msg->mutable_uri(); |
| 7132 | if (size > end - ptr) goto len_delim_till_end; |
| 7133 | ptr += size; |
| 7134 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7135 | {parser_till_end, object}, ptr - size, ptr)); |
| 7136 | break; |
| 7137 | } |
| 7138 | // .dmi.Uuid uuid = 18; |
| 7139 | case 18: { |
| 7140 | if (static_cast<::google::protobuf::uint8>(tag) != 146) goto handle_unusual; |
| 7141 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7142 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7143 | parser_till_end = ::dmi::Uuid::_InternalParse; |
| 7144 | object = msg->mutable_uuid(); |
| 7145 | if (size > end - ptr) goto len_delim_till_end; |
| 7146 | ptr += size; |
| 7147 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7148 | {parser_till_end, object}, ptr - size, ptr)); |
| 7149 | break; |
| 7150 | } |
| 7151 | // .dmi.ComponentState state = 19; |
| 7152 | case 19: { |
| 7153 | if (static_cast<::google::protobuf::uint8>(tag) != 154) goto handle_unusual; |
| 7154 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7155 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7156 | parser_till_end = ::dmi::ComponentState::_InternalParse; |
| 7157 | object = msg->mutable_state(); |
| 7158 | if (size > end - ptr) goto len_delim_till_end; |
| 7159 | ptr += size; |
| 7160 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7161 | {parser_till_end, object}, ptr - size, ptr)); |
| 7162 | break; |
| 7163 | } |
| 7164 | // repeated .dmi.ComponentSensorData sensor_data = 20; |
| 7165 | case 20: { |
| 7166 | if (static_cast<::google::protobuf::uint8>(tag) != 162) goto handle_unusual; |
| 7167 | do { |
| 7168 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7169 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7170 | parser_till_end = ::dmi::ComponentSensorData::_InternalParse; |
| 7171 | object = msg->add_sensor_data(); |
| 7172 | if (size > end - ptr) goto len_delim_till_end; |
| 7173 | ptr += size; |
| 7174 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7175 | {parser_till_end, object}, ptr - size, ptr)); |
| 7176 | if (ptr >= end) break; |
| 7177 | } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 65535) == 418 && (ptr += 2)); |
| 7178 | break; |
| 7179 | } |
| 7180 | // .dmi.PortComponentAttributes port_attr = 50; |
| 7181 | case 50: { |
| 7182 | if (static_cast<::google::protobuf::uint8>(tag) != 146) goto handle_unusual; |
| 7183 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7184 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7185 | parser_till_end = ::dmi::PortComponentAttributes::_InternalParse; |
| 7186 | object = msg->mutable_port_attr(); |
| 7187 | if (size > end - ptr) goto len_delim_till_end; |
| 7188 | ptr += size; |
| 7189 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7190 | {parser_till_end, object}, ptr - size, ptr)); |
| 7191 | break; |
| 7192 | } |
| 7193 | // .dmi.ContainerComponentAttributes container_attr = 51; |
| 7194 | case 51: { |
| 7195 | if (static_cast<::google::protobuf::uint8>(tag) != 154) goto handle_unusual; |
| 7196 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7197 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7198 | parser_till_end = ::dmi::ContainerComponentAttributes::_InternalParse; |
| 7199 | object = msg->mutable_container_attr(); |
| 7200 | if (size > end - ptr) goto len_delim_till_end; |
| 7201 | ptr += size; |
| 7202 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7203 | {parser_till_end, object}, ptr - size, ptr)); |
| 7204 | break; |
| 7205 | } |
| 7206 | // .dmi.PsuComponentAttributes psu_attr = 52; |
| 7207 | case 52: { |
| 7208 | if (static_cast<::google::protobuf::uint8>(tag) != 162) goto handle_unusual; |
| 7209 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7210 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7211 | parser_till_end = ::dmi::PsuComponentAttributes::_InternalParse; |
| 7212 | object = msg->mutable_psu_attr(); |
| 7213 | if (size > end - ptr) goto len_delim_till_end; |
| 7214 | ptr += size; |
| 7215 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7216 | {parser_till_end, object}, ptr - size, ptr)); |
| 7217 | break; |
| 7218 | } |
| 7219 | // .dmi.TransceiverComponentsAttributes transceiver_attr = 53; |
| 7220 | case 53: { |
| 7221 | if (static_cast<::google::protobuf::uint8>(tag) != 170) goto handle_unusual; |
| 7222 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7223 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7224 | parser_till_end = ::dmi::TransceiverComponentsAttributes::_InternalParse; |
| 7225 | object = msg->mutable_transceiver_attr(); |
| 7226 | if (size > end - ptr) goto len_delim_till_end; |
| 7227 | ptr += size; |
| 7228 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7229 | {parser_till_end, object}, ptr - size, ptr)); |
| 7230 | break; |
| 7231 | } |
| 7232 | default: { |
| 7233 | handle_unusual: |
| 7234 | if ((tag & 7) == 4 || tag == 0) { |
| 7235 | ctx->EndGroup(tag); |
| 7236 | return ptr; |
| 7237 | } |
| 7238 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 7239 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 7240 | ptr = res.first; |
| 7241 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 7242 | if (res.second) return ptr; |
| 7243 | } |
| 7244 | } // switch |
| 7245 | } // while |
| 7246 | return ptr; |
| 7247 | string_till_end: |
| 7248 | static_cast<::std::string*>(object)->clear(); |
| 7249 | static_cast<::std::string*>(object)->reserve(size); |
| 7250 | goto len_delim_till_end; |
| 7251 | len_delim_till_end: |
| 7252 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 7253 | {parser_till_end, object}, size); |
| 7254 | } |
| 7255 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 7256 | bool Component::MergePartialFromCodedStream( |
| 7257 | ::google::protobuf::io::CodedInputStream* input) { |
| 7258 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 7259 | ::google::protobuf::uint32 tag; |
| 7260 | // @@protoc_insertion_point(parse_start:dmi.Component) |
| 7261 | for (;;) { |
| 7262 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); |
| 7263 | tag = p.first; |
| 7264 | if (!p.second) goto handle_unusual; |
| 7265 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 7266 | // string name = 1; |
| 7267 | case 1: { |
| 7268 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 7269 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7270 | input, this->mutable_name())); |
| 7271 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7272 | this->name().data(), static_cast<int>(this->name().length()), |
| 7273 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 7274 | "dmi.Component.name")); |
| 7275 | } else { |
| 7276 | goto handle_unusual; |
| 7277 | } |
| 7278 | break; |
| 7279 | } |
| 7280 | |
| 7281 | // .dmi.ComponentType class = 2; |
| 7282 | case 2: { |
| 7283 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 7284 | int value = 0; |
| 7285 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7286 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 7287 | input, &value))); |
| 7288 | set_class_(static_cast< ::dmi::ComponentType >(value)); |
| 7289 | } else { |
| 7290 | goto handle_unusual; |
| 7291 | } |
| 7292 | break; |
| 7293 | } |
| 7294 | |
| 7295 | // string description = 3; |
| 7296 | case 3: { |
| 7297 | if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { |
| 7298 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7299 | input, this->mutable_description())); |
| 7300 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7301 | this->description().data(), static_cast<int>(this->description().length()), |
| 7302 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 7303 | "dmi.Component.description")); |
| 7304 | } else { |
| 7305 | goto handle_unusual; |
| 7306 | } |
| 7307 | break; |
| 7308 | } |
| 7309 | |
| 7310 | // string parent = 4; |
| 7311 | case 4: { |
| 7312 | if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { |
| 7313 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7314 | input, this->mutable_parent())); |
| 7315 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7316 | this->parent().data(), static_cast<int>(this->parent().length()), |
| 7317 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 7318 | "dmi.Component.parent")); |
| 7319 | } else { |
| 7320 | goto handle_unusual; |
| 7321 | } |
| 7322 | break; |
| 7323 | } |
| 7324 | |
| 7325 | // int32 parent_rel_pos = 5; |
| 7326 | case 5: { |
| 7327 | if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { |
| 7328 | |
| 7329 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7330 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 7331 | input, &parent_rel_pos_))); |
| 7332 | } else { |
| 7333 | goto handle_unusual; |
| 7334 | } |
| 7335 | break; |
| 7336 | } |
| 7337 | |
| 7338 | // repeated .dmi.Component children = 6; |
| 7339 | case 6: { |
| 7340 | if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { |
| 7341 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7342 | input, add_children())); |
| 7343 | } else { |
| 7344 | goto handle_unusual; |
| 7345 | } |
| 7346 | break; |
| 7347 | } |
| 7348 | |
| 7349 | // string hardware_rev = 7; |
| 7350 | case 7: { |
| 7351 | if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) { |
| 7352 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7353 | input, this->mutable_hardware_rev())); |
| 7354 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7355 | this->hardware_rev().data(), static_cast<int>(this->hardware_rev().length()), |
| 7356 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 7357 | "dmi.Component.hardware_rev")); |
| 7358 | } else { |
| 7359 | goto handle_unusual; |
| 7360 | } |
| 7361 | break; |
| 7362 | } |
| 7363 | |
| 7364 | // string firmware_rev = 8; |
| 7365 | case 8: { |
| 7366 | if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) { |
| 7367 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7368 | input, this->mutable_firmware_rev())); |
| 7369 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7370 | this->firmware_rev().data(), static_cast<int>(this->firmware_rev().length()), |
| 7371 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 7372 | "dmi.Component.firmware_rev")); |
| 7373 | } else { |
| 7374 | goto handle_unusual; |
| 7375 | } |
| 7376 | break; |
| 7377 | } |
| 7378 | |
| 7379 | // string software_rev = 9; |
| 7380 | case 9: { |
| 7381 | if (static_cast< ::google::protobuf::uint8>(tag) == (74 & 0xFF)) { |
| 7382 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7383 | input, this->mutable_software_rev())); |
| 7384 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7385 | this->software_rev().data(), static_cast<int>(this->software_rev().length()), |
| 7386 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 7387 | "dmi.Component.software_rev")); |
| 7388 | } else { |
| 7389 | goto handle_unusual; |
| 7390 | } |
| 7391 | break; |
| 7392 | } |
| 7393 | |
| 7394 | // string serial_num = 10; |
| 7395 | case 10: { |
| 7396 | if (static_cast< ::google::protobuf::uint8>(tag) == (82 & 0xFF)) { |
| 7397 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7398 | input, this->mutable_serial_num())); |
| 7399 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7400 | this->serial_num().data(), static_cast<int>(this->serial_num().length()), |
| 7401 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 7402 | "dmi.Component.serial_num")); |
| 7403 | } else { |
| 7404 | goto handle_unusual; |
| 7405 | } |
| 7406 | break; |
| 7407 | } |
| 7408 | |
| 7409 | // string mfg_name = 11; |
| 7410 | case 11: { |
| 7411 | if (static_cast< ::google::protobuf::uint8>(tag) == (90 & 0xFF)) { |
| 7412 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7413 | input, this->mutable_mfg_name())); |
| 7414 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7415 | this->mfg_name().data(), static_cast<int>(this->mfg_name().length()), |
| 7416 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 7417 | "dmi.Component.mfg_name")); |
| 7418 | } else { |
| 7419 | goto handle_unusual; |
| 7420 | } |
| 7421 | break; |
| 7422 | } |
| 7423 | |
| 7424 | // string model_name = 12; |
| 7425 | case 12: { |
| 7426 | if (static_cast< ::google::protobuf::uint8>(tag) == (98 & 0xFF)) { |
| 7427 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7428 | input, this->mutable_model_name())); |
| 7429 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7430 | this->model_name().data(), static_cast<int>(this->model_name().length()), |
| 7431 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 7432 | "dmi.Component.model_name")); |
| 7433 | } else { |
| 7434 | goto handle_unusual; |
| 7435 | } |
| 7436 | break; |
| 7437 | } |
| 7438 | |
| 7439 | // string alias = 13; |
| 7440 | case 13: { |
| 7441 | if (static_cast< ::google::protobuf::uint8>(tag) == (106 & 0xFF)) { |
| 7442 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7443 | input, this->mutable_alias())); |
| 7444 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7445 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 7446 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 7447 | "dmi.Component.alias")); |
| 7448 | } else { |
| 7449 | goto handle_unusual; |
| 7450 | } |
| 7451 | break; |
| 7452 | } |
| 7453 | |
| 7454 | // string asset_id = 14; |
| 7455 | case 14: { |
| 7456 | if (static_cast< ::google::protobuf::uint8>(tag) == (114 & 0xFF)) { |
| 7457 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 7458 | input, this->mutable_asset_id())); |
| 7459 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7460 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 7461 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 7462 | "dmi.Component.asset_id")); |
| 7463 | } else { |
| 7464 | goto handle_unusual; |
| 7465 | } |
| 7466 | break; |
| 7467 | } |
| 7468 | |
| 7469 | // bool is_fru = 15; |
| 7470 | case 15: { |
| 7471 | if (static_cast< ::google::protobuf::uint8>(tag) == (120 & 0xFF)) { |
| 7472 | |
| 7473 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 7474 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 7475 | input, &is_fru_))); |
| 7476 | } else { |
| 7477 | goto handle_unusual; |
| 7478 | } |
| 7479 | break; |
| 7480 | } |
| 7481 | |
| 7482 | // .google.protobuf.Timestamp mfg_date = 16; |
| 7483 | case 16: { |
| 7484 | if (static_cast< ::google::protobuf::uint8>(tag) == (130 & 0xFF)) { |
| 7485 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7486 | input, mutable_mfg_date())); |
| 7487 | } else { |
| 7488 | goto handle_unusual; |
| 7489 | } |
| 7490 | break; |
| 7491 | } |
| 7492 | |
| 7493 | // .dmi.Uri uri = 17; |
| 7494 | case 17: { |
| 7495 | if (static_cast< ::google::protobuf::uint8>(tag) == (138 & 0xFF)) { |
| 7496 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7497 | input, mutable_uri())); |
| 7498 | } else { |
| 7499 | goto handle_unusual; |
| 7500 | } |
| 7501 | break; |
| 7502 | } |
| 7503 | |
| 7504 | // .dmi.Uuid uuid = 18; |
| 7505 | case 18: { |
| 7506 | if (static_cast< ::google::protobuf::uint8>(tag) == (146 & 0xFF)) { |
| 7507 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7508 | input, mutable_uuid())); |
| 7509 | } else { |
| 7510 | goto handle_unusual; |
| 7511 | } |
| 7512 | break; |
| 7513 | } |
| 7514 | |
| 7515 | // .dmi.ComponentState state = 19; |
| 7516 | case 19: { |
| 7517 | if (static_cast< ::google::protobuf::uint8>(tag) == (154 & 0xFF)) { |
| 7518 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7519 | input, mutable_state())); |
| 7520 | } else { |
| 7521 | goto handle_unusual; |
| 7522 | } |
| 7523 | break; |
| 7524 | } |
| 7525 | |
| 7526 | // repeated .dmi.ComponentSensorData sensor_data = 20; |
| 7527 | case 20: { |
| 7528 | if (static_cast< ::google::protobuf::uint8>(tag) == (162 & 0xFF)) { |
| 7529 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7530 | input, add_sensor_data())); |
| 7531 | } else { |
| 7532 | goto handle_unusual; |
| 7533 | } |
| 7534 | break; |
| 7535 | } |
| 7536 | |
| 7537 | // .dmi.PortComponentAttributes port_attr = 50; |
| 7538 | case 50: { |
| 7539 | if (static_cast< ::google::protobuf::uint8>(tag) == (402 & 0xFF)) { |
| 7540 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7541 | input, mutable_port_attr())); |
| 7542 | } else { |
| 7543 | goto handle_unusual; |
| 7544 | } |
| 7545 | break; |
| 7546 | } |
| 7547 | |
| 7548 | // .dmi.ContainerComponentAttributes container_attr = 51; |
| 7549 | case 51: { |
| 7550 | if (static_cast< ::google::protobuf::uint8>(tag) == (410 & 0xFF)) { |
| 7551 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7552 | input, mutable_container_attr())); |
| 7553 | } else { |
| 7554 | goto handle_unusual; |
| 7555 | } |
| 7556 | break; |
| 7557 | } |
| 7558 | |
| 7559 | // .dmi.PsuComponentAttributes psu_attr = 52; |
| 7560 | case 52: { |
| 7561 | if (static_cast< ::google::protobuf::uint8>(tag) == (418 & 0xFF)) { |
| 7562 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7563 | input, mutable_psu_attr())); |
| 7564 | } else { |
| 7565 | goto handle_unusual; |
| 7566 | } |
| 7567 | break; |
| 7568 | } |
| 7569 | |
| 7570 | // .dmi.TransceiverComponentsAttributes transceiver_attr = 53; |
| 7571 | case 53: { |
| 7572 | if (static_cast< ::google::protobuf::uint8>(tag) == (426 & 0xFF)) { |
| 7573 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7574 | input, mutable_transceiver_attr())); |
| 7575 | } else { |
| 7576 | goto handle_unusual; |
| 7577 | } |
| 7578 | break; |
| 7579 | } |
| 7580 | |
| 7581 | default: { |
| 7582 | handle_unusual: |
| 7583 | if (tag == 0) { |
| 7584 | goto success; |
| 7585 | } |
| 7586 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 7587 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 7588 | break; |
| 7589 | } |
| 7590 | } |
| 7591 | } |
| 7592 | success: |
| 7593 | // @@protoc_insertion_point(parse_success:dmi.Component) |
| 7594 | return true; |
| 7595 | failure: |
| 7596 | // @@protoc_insertion_point(parse_failure:dmi.Component) |
| 7597 | return false; |
| 7598 | #undef DO_ |
| 7599 | } |
| 7600 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 7601 | |
| 7602 | void Component::SerializeWithCachedSizes( |
| 7603 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 7604 | // @@protoc_insertion_point(serialize_start:dmi.Component) |
| 7605 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 7606 | (void) cached_has_bits; |
| 7607 | |
| 7608 | // string name = 1; |
| 7609 | if (this->name().size() > 0) { |
| 7610 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7611 | this->name().data(), static_cast<int>(this->name().length()), |
| 7612 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7613 | "dmi.Component.name"); |
| 7614 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7615 | 1, this->name(), output); |
| 7616 | } |
| 7617 | |
| 7618 | // .dmi.ComponentType class = 2; |
| 7619 | if (this->class_() != 0) { |
| 7620 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 7621 | 2, this->class_(), output); |
| 7622 | } |
| 7623 | |
| 7624 | // string description = 3; |
| 7625 | if (this->description().size() > 0) { |
| 7626 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7627 | this->description().data(), static_cast<int>(this->description().length()), |
| 7628 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7629 | "dmi.Component.description"); |
| 7630 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7631 | 3, this->description(), output); |
| 7632 | } |
| 7633 | |
| 7634 | // string parent = 4; |
| 7635 | if (this->parent().size() > 0) { |
| 7636 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7637 | this->parent().data(), static_cast<int>(this->parent().length()), |
| 7638 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7639 | "dmi.Component.parent"); |
| 7640 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7641 | 4, this->parent(), output); |
| 7642 | } |
| 7643 | |
| 7644 | // int32 parent_rel_pos = 5; |
| 7645 | if (this->parent_rel_pos() != 0) { |
| 7646 | ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->parent_rel_pos(), output); |
| 7647 | } |
| 7648 | |
| 7649 | // repeated .dmi.Component children = 6; |
| 7650 | for (unsigned int i = 0, |
| 7651 | n = static_cast<unsigned int>(this->children_size()); i < n; i++) { |
| 7652 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7653 | 6, |
| 7654 | this->children(static_cast<int>(i)), |
| 7655 | output); |
| 7656 | } |
| 7657 | |
| 7658 | // string hardware_rev = 7; |
| 7659 | if (this->hardware_rev().size() > 0) { |
| 7660 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7661 | this->hardware_rev().data(), static_cast<int>(this->hardware_rev().length()), |
| 7662 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7663 | "dmi.Component.hardware_rev"); |
| 7664 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7665 | 7, this->hardware_rev(), output); |
| 7666 | } |
| 7667 | |
| 7668 | // string firmware_rev = 8; |
| 7669 | if (this->firmware_rev().size() > 0) { |
| 7670 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7671 | this->firmware_rev().data(), static_cast<int>(this->firmware_rev().length()), |
| 7672 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7673 | "dmi.Component.firmware_rev"); |
| 7674 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7675 | 8, this->firmware_rev(), output); |
| 7676 | } |
| 7677 | |
| 7678 | // string software_rev = 9; |
| 7679 | if (this->software_rev().size() > 0) { |
| 7680 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7681 | this->software_rev().data(), static_cast<int>(this->software_rev().length()), |
| 7682 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7683 | "dmi.Component.software_rev"); |
| 7684 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7685 | 9, this->software_rev(), output); |
| 7686 | } |
| 7687 | |
| 7688 | // string serial_num = 10; |
| 7689 | if (this->serial_num().size() > 0) { |
| 7690 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7691 | this->serial_num().data(), static_cast<int>(this->serial_num().length()), |
| 7692 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7693 | "dmi.Component.serial_num"); |
| 7694 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7695 | 10, this->serial_num(), output); |
| 7696 | } |
| 7697 | |
| 7698 | // string mfg_name = 11; |
| 7699 | if (this->mfg_name().size() > 0) { |
| 7700 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7701 | this->mfg_name().data(), static_cast<int>(this->mfg_name().length()), |
| 7702 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7703 | "dmi.Component.mfg_name"); |
| 7704 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7705 | 11, this->mfg_name(), output); |
| 7706 | } |
| 7707 | |
| 7708 | // string model_name = 12; |
| 7709 | if (this->model_name().size() > 0) { |
| 7710 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7711 | this->model_name().data(), static_cast<int>(this->model_name().length()), |
| 7712 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7713 | "dmi.Component.model_name"); |
| 7714 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7715 | 12, this->model_name(), output); |
| 7716 | } |
| 7717 | |
| 7718 | // string alias = 13; |
| 7719 | if (this->alias().size() > 0) { |
| 7720 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7721 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 7722 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7723 | "dmi.Component.alias"); |
| 7724 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7725 | 13, this->alias(), output); |
| 7726 | } |
| 7727 | |
| 7728 | // string asset_id = 14; |
| 7729 | if (this->asset_id().size() > 0) { |
| 7730 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7731 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 7732 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7733 | "dmi.Component.asset_id"); |
| 7734 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 7735 | 14, this->asset_id(), output); |
| 7736 | } |
| 7737 | |
| 7738 | // bool is_fru = 15; |
| 7739 | if (this->is_fru() != 0) { |
| 7740 | ::google::protobuf::internal::WireFormatLite::WriteBool(15, this->is_fru(), output); |
| 7741 | } |
| 7742 | |
| 7743 | // .google.protobuf.Timestamp mfg_date = 16; |
| 7744 | if (this->has_mfg_date()) { |
| 7745 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7746 | 16, HasBitSetters::mfg_date(this), output); |
| 7747 | } |
| 7748 | |
| 7749 | // .dmi.Uri uri = 17; |
| 7750 | if (this->has_uri()) { |
| 7751 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7752 | 17, HasBitSetters::uri(this), output); |
| 7753 | } |
| 7754 | |
| 7755 | // .dmi.Uuid uuid = 18; |
| 7756 | if (this->has_uuid()) { |
| 7757 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7758 | 18, HasBitSetters::uuid(this), output); |
| 7759 | } |
| 7760 | |
| 7761 | // .dmi.ComponentState state = 19; |
| 7762 | if (this->has_state()) { |
| 7763 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7764 | 19, HasBitSetters::state(this), output); |
| 7765 | } |
| 7766 | |
| 7767 | // repeated .dmi.ComponentSensorData sensor_data = 20; |
| 7768 | for (unsigned int i = 0, |
| 7769 | n = static_cast<unsigned int>(this->sensor_data_size()); i < n; i++) { |
| 7770 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7771 | 20, |
| 7772 | this->sensor_data(static_cast<int>(i)), |
| 7773 | output); |
| 7774 | } |
| 7775 | |
| 7776 | // .dmi.PortComponentAttributes port_attr = 50; |
| 7777 | if (has_port_attr()) { |
| 7778 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7779 | 50, HasBitSetters::port_attr(this), output); |
| 7780 | } |
| 7781 | |
| 7782 | // .dmi.ContainerComponentAttributes container_attr = 51; |
| 7783 | if (has_container_attr()) { |
| 7784 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7785 | 51, HasBitSetters::container_attr(this), output); |
| 7786 | } |
| 7787 | |
| 7788 | // .dmi.PsuComponentAttributes psu_attr = 52; |
| 7789 | if (has_psu_attr()) { |
| 7790 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7791 | 52, HasBitSetters::psu_attr(this), output); |
| 7792 | } |
| 7793 | |
| 7794 | // .dmi.TransceiverComponentsAttributes transceiver_attr = 53; |
| 7795 | if (has_transceiver_attr()) { |
| 7796 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7797 | 53, HasBitSetters::transceiver_attr(this), output); |
| 7798 | } |
| 7799 | |
| 7800 | if (_internal_metadata_.have_unknown_fields()) { |
| 7801 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 7802 | _internal_metadata_.unknown_fields(), output); |
| 7803 | } |
| 7804 | // @@protoc_insertion_point(serialize_end:dmi.Component) |
| 7805 | } |
| 7806 | |
| 7807 | ::google::protobuf::uint8* Component::InternalSerializeWithCachedSizesToArray( |
| 7808 | ::google::protobuf::uint8* target) const { |
| 7809 | // @@protoc_insertion_point(serialize_to_array_start:dmi.Component) |
| 7810 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 7811 | (void) cached_has_bits; |
| 7812 | |
| 7813 | // string name = 1; |
| 7814 | if (this->name().size() > 0) { |
| 7815 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7816 | this->name().data(), static_cast<int>(this->name().length()), |
| 7817 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7818 | "dmi.Component.name"); |
| 7819 | target = |
| 7820 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7821 | 1, this->name(), target); |
| 7822 | } |
| 7823 | |
| 7824 | // .dmi.ComponentType class = 2; |
| 7825 | if (this->class_() != 0) { |
| 7826 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 7827 | 2, this->class_(), target); |
| 7828 | } |
| 7829 | |
| 7830 | // string description = 3; |
| 7831 | if (this->description().size() > 0) { |
| 7832 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7833 | this->description().data(), static_cast<int>(this->description().length()), |
| 7834 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7835 | "dmi.Component.description"); |
| 7836 | target = |
| 7837 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7838 | 3, this->description(), target); |
| 7839 | } |
| 7840 | |
| 7841 | // string parent = 4; |
| 7842 | if (this->parent().size() > 0) { |
| 7843 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7844 | this->parent().data(), static_cast<int>(this->parent().length()), |
| 7845 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7846 | "dmi.Component.parent"); |
| 7847 | target = |
| 7848 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7849 | 4, this->parent(), target); |
| 7850 | } |
| 7851 | |
| 7852 | // int32 parent_rel_pos = 5; |
| 7853 | if (this->parent_rel_pos() != 0) { |
| 7854 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->parent_rel_pos(), target); |
| 7855 | } |
| 7856 | |
| 7857 | // repeated .dmi.Component children = 6; |
| 7858 | for (unsigned int i = 0, |
| 7859 | n = static_cast<unsigned int>(this->children_size()); i < n; i++) { |
| 7860 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7861 | InternalWriteMessageToArray( |
| 7862 | 6, this->children(static_cast<int>(i)), target); |
| 7863 | } |
| 7864 | |
| 7865 | // string hardware_rev = 7; |
| 7866 | if (this->hardware_rev().size() > 0) { |
| 7867 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7868 | this->hardware_rev().data(), static_cast<int>(this->hardware_rev().length()), |
| 7869 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7870 | "dmi.Component.hardware_rev"); |
| 7871 | target = |
| 7872 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7873 | 7, this->hardware_rev(), target); |
| 7874 | } |
| 7875 | |
| 7876 | // string firmware_rev = 8; |
| 7877 | if (this->firmware_rev().size() > 0) { |
| 7878 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7879 | this->firmware_rev().data(), static_cast<int>(this->firmware_rev().length()), |
| 7880 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7881 | "dmi.Component.firmware_rev"); |
| 7882 | target = |
| 7883 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7884 | 8, this->firmware_rev(), target); |
| 7885 | } |
| 7886 | |
| 7887 | // string software_rev = 9; |
| 7888 | if (this->software_rev().size() > 0) { |
| 7889 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7890 | this->software_rev().data(), static_cast<int>(this->software_rev().length()), |
| 7891 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7892 | "dmi.Component.software_rev"); |
| 7893 | target = |
| 7894 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7895 | 9, this->software_rev(), target); |
| 7896 | } |
| 7897 | |
| 7898 | // string serial_num = 10; |
| 7899 | if (this->serial_num().size() > 0) { |
| 7900 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7901 | this->serial_num().data(), static_cast<int>(this->serial_num().length()), |
| 7902 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7903 | "dmi.Component.serial_num"); |
| 7904 | target = |
| 7905 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7906 | 10, this->serial_num(), target); |
| 7907 | } |
| 7908 | |
| 7909 | // string mfg_name = 11; |
| 7910 | if (this->mfg_name().size() > 0) { |
| 7911 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7912 | this->mfg_name().data(), static_cast<int>(this->mfg_name().length()), |
| 7913 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7914 | "dmi.Component.mfg_name"); |
| 7915 | target = |
| 7916 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7917 | 11, this->mfg_name(), target); |
| 7918 | } |
| 7919 | |
| 7920 | // string model_name = 12; |
| 7921 | if (this->model_name().size() > 0) { |
| 7922 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7923 | this->model_name().data(), static_cast<int>(this->model_name().length()), |
| 7924 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7925 | "dmi.Component.model_name"); |
| 7926 | target = |
| 7927 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7928 | 12, this->model_name(), target); |
| 7929 | } |
| 7930 | |
| 7931 | // string alias = 13; |
| 7932 | if (this->alias().size() > 0) { |
| 7933 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7934 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 7935 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7936 | "dmi.Component.alias"); |
| 7937 | target = |
| 7938 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7939 | 13, this->alias(), target); |
| 7940 | } |
| 7941 | |
| 7942 | // string asset_id = 14; |
| 7943 | if (this->asset_id().size() > 0) { |
| 7944 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7945 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 7946 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7947 | "dmi.Component.asset_id"); |
| 7948 | target = |
| 7949 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7950 | 14, this->asset_id(), target); |
| 7951 | } |
| 7952 | |
| 7953 | // bool is_fru = 15; |
| 7954 | if (this->is_fru() != 0) { |
| 7955 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(15, this->is_fru(), target); |
| 7956 | } |
| 7957 | |
| 7958 | // .google.protobuf.Timestamp mfg_date = 16; |
| 7959 | if (this->has_mfg_date()) { |
| 7960 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7961 | InternalWriteMessageToArray( |
| 7962 | 16, HasBitSetters::mfg_date(this), target); |
| 7963 | } |
| 7964 | |
| 7965 | // .dmi.Uri uri = 17; |
| 7966 | if (this->has_uri()) { |
| 7967 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7968 | InternalWriteMessageToArray( |
| 7969 | 17, HasBitSetters::uri(this), target); |
| 7970 | } |
| 7971 | |
| 7972 | // .dmi.Uuid uuid = 18; |
| 7973 | if (this->has_uuid()) { |
| 7974 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7975 | InternalWriteMessageToArray( |
| 7976 | 18, HasBitSetters::uuid(this), target); |
| 7977 | } |
| 7978 | |
| 7979 | // .dmi.ComponentState state = 19; |
| 7980 | if (this->has_state()) { |
| 7981 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7982 | InternalWriteMessageToArray( |
| 7983 | 19, HasBitSetters::state(this), target); |
| 7984 | } |
| 7985 | |
| 7986 | // repeated .dmi.ComponentSensorData sensor_data = 20; |
| 7987 | for (unsigned int i = 0, |
| 7988 | n = static_cast<unsigned int>(this->sensor_data_size()); i < n; i++) { |
| 7989 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7990 | InternalWriteMessageToArray( |
| 7991 | 20, this->sensor_data(static_cast<int>(i)), target); |
| 7992 | } |
| 7993 | |
| 7994 | // .dmi.PortComponentAttributes port_attr = 50; |
| 7995 | if (has_port_attr()) { |
| 7996 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7997 | InternalWriteMessageToArray( |
| 7998 | 50, HasBitSetters::port_attr(this), target); |
| 7999 | } |
| 8000 | |
| 8001 | // .dmi.ContainerComponentAttributes container_attr = 51; |
| 8002 | if (has_container_attr()) { |
| 8003 | target = ::google::protobuf::internal::WireFormatLite:: |
| 8004 | InternalWriteMessageToArray( |
| 8005 | 51, HasBitSetters::container_attr(this), target); |
| 8006 | } |
| 8007 | |
| 8008 | // .dmi.PsuComponentAttributes psu_attr = 52; |
| 8009 | if (has_psu_attr()) { |
| 8010 | target = ::google::protobuf::internal::WireFormatLite:: |
| 8011 | InternalWriteMessageToArray( |
| 8012 | 52, HasBitSetters::psu_attr(this), target); |
| 8013 | } |
| 8014 | |
| 8015 | // .dmi.TransceiverComponentsAttributes transceiver_attr = 53; |
| 8016 | if (has_transceiver_attr()) { |
| 8017 | target = ::google::protobuf::internal::WireFormatLite:: |
| 8018 | InternalWriteMessageToArray( |
| 8019 | 53, HasBitSetters::transceiver_attr(this), target); |
| 8020 | } |
| 8021 | |
| 8022 | if (_internal_metadata_.have_unknown_fields()) { |
| 8023 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 8024 | _internal_metadata_.unknown_fields(), target); |
| 8025 | } |
| 8026 | // @@protoc_insertion_point(serialize_to_array_end:dmi.Component) |
| 8027 | return target; |
| 8028 | } |
| 8029 | |
| 8030 | size_t Component::ByteSizeLong() const { |
| 8031 | // @@protoc_insertion_point(message_byte_size_start:dmi.Component) |
| 8032 | size_t total_size = 0; |
| 8033 | |
| 8034 | if (_internal_metadata_.have_unknown_fields()) { |
| 8035 | total_size += |
| 8036 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 8037 | _internal_metadata_.unknown_fields()); |
| 8038 | } |
| 8039 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8040 | // Prevent compiler warnings about cached_has_bits being unused |
| 8041 | (void) cached_has_bits; |
| 8042 | |
| 8043 | // repeated .dmi.Component children = 6; |
| 8044 | { |
| 8045 | unsigned int count = static_cast<unsigned int>(this->children_size()); |
| 8046 | total_size += 1UL * count; |
| 8047 | for (unsigned int i = 0; i < count; i++) { |
| 8048 | total_size += |
| 8049 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8050 | this->children(static_cast<int>(i))); |
| 8051 | } |
| 8052 | } |
| 8053 | |
| 8054 | // repeated .dmi.ComponentSensorData sensor_data = 20; |
| 8055 | { |
| 8056 | unsigned int count = static_cast<unsigned int>(this->sensor_data_size()); |
| 8057 | total_size += 2UL * count; |
| 8058 | for (unsigned int i = 0; i < count; i++) { |
| 8059 | total_size += |
| 8060 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8061 | this->sensor_data(static_cast<int>(i))); |
| 8062 | } |
| 8063 | } |
| 8064 | |
| 8065 | // string name = 1; |
| 8066 | if (this->name().size() > 0) { |
| 8067 | total_size += 1 + |
| 8068 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8069 | this->name()); |
| 8070 | } |
| 8071 | |
| 8072 | // string description = 3; |
| 8073 | if (this->description().size() > 0) { |
| 8074 | total_size += 1 + |
| 8075 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8076 | this->description()); |
| 8077 | } |
| 8078 | |
| 8079 | // string parent = 4; |
| 8080 | if (this->parent().size() > 0) { |
| 8081 | total_size += 1 + |
| 8082 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8083 | this->parent()); |
| 8084 | } |
| 8085 | |
| 8086 | // string hardware_rev = 7; |
| 8087 | if (this->hardware_rev().size() > 0) { |
| 8088 | total_size += 1 + |
| 8089 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8090 | this->hardware_rev()); |
| 8091 | } |
| 8092 | |
| 8093 | // string firmware_rev = 8; |
| 8094 | if (this->firmware_rev().size() > 0) { |
| 8095 | total_size += 1 + |
| 8096 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8097 | this->firmware_rev()); |
| 8098 | } |
| 8099 | |
| 8100 | // string software_rev = 9; |
| 8101 | if (this->software_rev().size() > 0) { |
| 8102 | total_size += 1 + |
| 8103 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8104 | this->software_rev()); |
| 8105 | } |
| 8106 | |
| 8107 | // string serial_num = 10; |
| 8108 | if (this->serial_num().size() > 0) { |
| 8109 | total_size += 1 + |
| 8110 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8111 | this->serial_num()); |
| 8112 | } |
| 8113 | |
| 8114 | // string mfg_name = 11; |
| 8115 | if (this->mfg_name().size() > 0) { |
| 8116 | total_size += 1 + |
| 8117 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8118 | this->mfg_name()); |
| 8119 | } |
| 8120 | |
| 8121 | // string model_name = 12; |
| 8122 | if (this->model_name().size() > 0) { |
| 8123 | total_size += 1 + |
| 8124 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8125 | this->model_name()); |
| 8126 | } |
| 8127 | |
| 8128 | // string alias = 13; |
| 8129 | if (this->alias().size() > 0) { |
| 8130 | total_size += 1 + |
| 8131 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8132 | this->alias()); |
| 8133 | } |
| 8134 | |
| 8135 | // string asset_id = 14; |
| 8136 | if (this->asset_id().size() > 0) { |
| 8137 | total_size += 1 + |
| 8138 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8139 | this->asset_id()); |
| 8140 | } |
| 8141 | |
| 8142 | // .google.protobuf.Timestamp mfg_date = 16; |
| 8143 | if (this->has_mfg_date()) { |
| 8144 | total_size += 2 + |
| 8145 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8146 | *mfg_date_); |
| 8147 | } |
| 8148 | |
| 8149 | // .dmi.Uri uri = 17; |
| 8150 | if (this->has_uri()) { |
| 8151 | total_size += 2 + |
| 8152 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8153 | *uri_); |
| 8154 | } |
| 8155 | |
| 8156 | // .dmi.Uuid uuid = 18; |
| 8157 | if (this->has_uuid()) { |
| 8158 | total_size += 2 + |
| 8159 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8160 | *uuid_); |
| 8161 | } |
| 8162 | |
| 8163 | // .dmi.ComponentState state = 19; |
| 8164 | if (this->has_state()) { |
| 8165 | total_size += 2 + |
| 8166 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8167 | *state_); |
| 8168 | } |
| 8169 | |
| 8170 | // .dmi.ComponentType class = 2; |
| 8171 | if (this->class_() != 0) { |
| 8172 | total_size += 1 + |
| 8173 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->class_()); |
| 8174 | } |
| 8175 | |
| 8176 | // int32 parent_rel_pos = 5; |
| 8177 | if (this->parent_rel_pos() != 0) { |
| 8178 | total_size += 1 + |
| 8179 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 8180 | this->parent_rel_pos()); |
| 8181 | } |
| 8182 | |
| 8183 | // bool is_fru = 15; |
| 8184 | if (this->is_fru() != 0) { |
| 8185 | total_size += 1 + 1; |
| 8186 | } |
| 8187 | |
| 8188 | switch (specific_case()) { |
| 8189 | // .dmi.PortComponentAttributes port_attr = 50; |
| 8190 | case kPortAttr: { |
| 8191 | total_size += 2 + |
| 8192 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8193 | *specific_.port_attr_); |
| 8194 | break; |
| 8195 | } |
| 8196 | // .dmi.ContainerComponentAttributes container_attr = 51; |
| 8197 | case kContainerAttr: { |
| 8198 | total_size += 2 + |
| 8199 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8200 | *specific_.container_attr_); |
| 8201 | break; |
| 8202 | } |
| 8203 | // .dmi.PsuComponentAttributes psu_attr = 52; |
| 8204 | case kPsuAttr: { |
| 8205 | total_size += 2 + |
| 8206 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8207 | *specific_.psu_attr_); |
| 8208 | break; |
| 8209 | } |
| 8210 | // .dmi.TransceiverComponentsAttributes transceiver_attr = 53; |
| 8211 | case kTransceiverAttr: { |
| 8212 | total_size += 2 + |
| 8213 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8214 | *specific_.transceiver_attr_); |
| 8215 | break; |
| 8216 | } |
| 8217 | case SPECIFIC_NOT_SET: { |
| 8218 | break; |
| 8219 | } |
| 8220 | } |
| 8221 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 8222 | SetCachedSize(cached_size); |
| 8223 | return total_size; |
| 8224 | } |
| 8225 | |
| 8226 | void Component::MergeFrom(const ::google::protobuf::Message& from) { |
| 8227 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.Component) |
| 8228 | GOOGLE_DCHECK_NE(&from, this); |
| 8229 | const Component* source = |
| 8230 | ::google::protobuf::DynamicCastToGenerated<Component>( |
| 8231 | &from); |
| 8232 | if (source == nullptr) { |
| 8233 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.Component) |
| 8234 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 8235 | } else { |
| 8236 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.Component) |
| 8237 | MergeFrom(*source); |
| 8238 | } |
| 8239 | } |
| 8240 | |
| 8241 | void Component::MergeFrom(const Component& from) { |
| 8242 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.Component) |
| 8243 | GOOGLE_DCHECK_NE(&from, this); |
| 8244 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 8245 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8246 | (void) cached_has_bits; |
| 8247 | |
| 8248 | children_.MergeFrom(from.children_); |
| 8249 | sensor_data_.MergeFrom(from.sensor_data_); |
| 8250 | if (from.name().size() > 0) { |
| 8251 | |
| 8252 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
| 8253 | } |
| 8254 | if (from.description().size() > 0) { |
| 8255 | |
| 8256 | description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.description_); |
| 8257 | } |
| 8258 | if (from.parent().size() > 0) { |
| 8259 | |
| 8260 | parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); |
| 8261 | } |
| 8262 | if (from.hardware_rev().size() > 0) { |
| 8263 | |
| 8264 | hardware_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.hardware_rev_); |
| 8265 | } |
| 8266 | if (from.firmware_rev().size() > 0) { |
| 8267 | |
| 8268 | firmware_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.firmware_rev_); |
| 8269 | } |
| 8270 | if (from.software_rev().size() > 0) { |
| 8271 | |
| 8272 | software_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.software_rev_); |
| 8273 | } |
| 8274 | if (from.serial_num().size() > 0) { |
| 8275 | |
| 8276 | serial_num_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.serial_num_); |
| 8277 | } |
| 8278 | if (from.mfg_name().size() > 0) { |
| 8279 | |
| 8280 | mfg_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mfg_name_); |
| 8281 | } |
| 8282 | if (from.model_name().size() > 0) { |
| 8283 | |
| 8284 | model_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.model_name_); |
| 8285 | } |
| 8286 | if (from.alias().size() > 0) { |
| 8287 | |
| 8288 | alias_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.alias_); |
| 8289 | } |
| 8290 | if (from.asset_id().size() > 0) { |
| 8291 | |
| 8292 | asset_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.asset_id_); |
| 8293 | } |
| 8294 | if (from.has_mfg_date()) { |
| 8295 | mutable_mfg_date()->::google::protobuf::Timestamp::MergeFrom(from.mfg_date()); |
| 8296 | } |
| 8297 | if (from.has_uri()) { |
| 8298 | mutable_uri()->::dmi::Uri::MergeFrom(from.uri()); |
| 8299 | } |
| 8300 | if (from.has_uuid()) { |
| 8301 | mutable_uuid()->::dmi::Uuid::MergeFrom(from.uuid()); |
| 8302 | } |
| 8303 | if (from.has_state()) { |
| 8304 | mutable_state()->::dmi::ComponentState::MergeFrom(from.state()); |
| 8305 | } |
| 8306 | if (from.class_() != 0) { |
| 8307 | set_class_(from.class_()); |
| 8308 | } |
| 8309 | if (from.parent_rel_pos() != 0) { |
| 8310 | set_parent_rel_pos(from.parent_rel_pos()); |
| 8311 | } |
| 8312 | if (from.is_fru() != 0) { |
| 8313 | set_is_fru(from.is_fru()); |
| 8314 | } |
| 8315 | switch (from.specific_case()) { |
| 8316 | case kPortAttr: { |
| 8317 | mutable_port_attr()->::dmi::PortComponentAttributes::MergeFrom(from.port_attr()); |
| 8318 | break; |
| 8319 | } |
| 8320 | case kContainerAttr: { |
| 8321 | mutable_container_attr()->::dmi::ContainerComponentAttributes::MergeFrom(from.container_attr()); |
| 8322 | break; |
| 8323 | } |
| 8324 | case kPsuAttr: { |
| 8325 | mutable_psu_attr()->::dmi::PsuComponentAttributes::MergeFrom(from.psu_attr()); |
| 8326 | break; |
| 8327 | } |
| 8328 | case kTransceiverAttr: { |
| 8329 | mutable_transceiver_attr()->::dmi::TransceiverComponentsAttributes::MergeFrom(from.transceiver_attr()); |
| 8330 | break; |
| 8331 | } |
| 8332 | case SPECIFIC_NOT_SET: { |
| 8333 | break; |
| 8334 | } |
| 8335 | } |
| 8336 | } |
| 8337 | |
| 8338 | void Component::CopyFrom(const ::google::protobuf::Message& from) { |
| 8339 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.Component) |
| 8340 | if (&from == this) return; |
| 8341 | Clear(); |
| 8342 | MergeFrom(from); |
| 8343 | } |
| 8344 | |
| 8345 | void Component::CopyFrom(const Component& from) { |
| 8346 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.Component) |
| 8347 | if (&from == this) return; |
| 8348 | Clear(); |
| 8349 | MergeFrom(from); |
| 8350 | } |
| 8351 | |
| 8352 | bool Component::IsInitialized() const { |
| 8353 | return true; |
| 8354 | } |
| 8355 | |
| 8356 | void Component::Swap(Component* other) { |
| 8357 | if (other == this) return; |
| 8358 | InternalSwap(other); |
| 8359 | } |
| 8360 | void Component::InternalSwap(Component* other) { |
| 8361 | using std::swap; |
| 8362 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 8363 | CastToBase(&children_)->InternalSwap(CastToBase(&other->children_)); |
| 8364 | CastToBase(&sensor_data_)->InternalSwap(CastToBase(&other->sensor_data_)); |
| 8365 | name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8366 | GetArenaNoVirtual()); |
| 8367 | description_.Swap(&other->description_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8368 | GetArenaNoVirtual()); |
| 8369 | parent_.Swap(&other->parent_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8370 | GetArenaNoVirtual()); |
| 8371 | hardware_rev_.Swap(&other->hardware_rev_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8372 | GetArenaNoVirtual()); |
| 8373 | firmware_rev_.Swap(&other->firmware_rev_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8374 | GetArenaNoVirtual()); |
| 8375 | software_rev_.Swap(&other->software_rev_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8376 | GetArenaNoVirtual()); |
| 8377 | serial_num_.Swap(&other->serial_num_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8378 | GetArenaNoVirtual()); |
| 8379 | mfg_name_.Swap(&other->mfg_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8380 | GetArenaNoVirtual()); |
| 8381 | model_name_.Swap(&other->model_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8382 | GetArenaNoVirtual()); |
| 8383 | alias_.Swap(&other->alias_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8384 | GetArenaNoVirtual()); |
| 8385 | asset_id_.Swap(&other->asset_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8386 | GetArenaNoVirtual()); |
| 8387 | swap(mfg_date_, other->mfg_date_); |
| 8388 | swap(uri_, other->uri_); |
| 8389 | swap(uuid_, other->uuid_); |
| 8390 | swap(state_, other->state_); |
| 8391 | swap(class__, other->class__); |
| 8392 | swap(parent_rel_pos_, other->parent_rel_pos_); |
| 8393 | swap(is_fru_, other->is_fru_); |
| 8394 | swap(specific_, other->specific_); |
| 8395 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
| 8396 | } |
| 8397 | |
| 8398 | ::google::protobuf::Metadata Component::GetMetadata() const { |
| 8399 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 8400 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 8401 | } |
| 8402 | |
| 8403 | |
| 8404 | // =================================================================== |
| 8405 | |
| 8406 | void Hardware::InitAsDefaultInstance() { |
| 8407 | ::dmi::_Hardware_default_instance_._instance.get_mutable()->last_change_ = const_cast< ::google::protobuf::Timestamp*>( |
| 8408 | ::google::protobuf::Timestamp::internal_default_instance()); |
| 8409 | ::dmi::_Hardware_default_instance_._instance.get_mutable()->root_ = const_cast< ::dmi::Component*>( |
| 8410 | ::dmi::Component::internal_default_instance()); |
| 8411 | ::dmi::_Hardware_default_instance_._instance.get_mutable()->last_booted_ = const_cast< ::google::protobuf::Timestamp*>( |
| 8412 | ::google::protobuf::Timestamp::internal_default_instance()); |
| 8413 | } |
| 8414 | class Hardware::HasBitSetters { |
| 8415 | public: |
| 8416 | static const ::google::protobuf::Timestamp& last_change(const Hardware* msg); |
| 8417 | static const ::dmi::Component& root(const Hardware* msg); |
| 8418 | static const ::google::protobuf::Timestamp& last_booted(const Hardware* msg); |
| 8419 | }; |
| 8420 | |
| 8421 | const ::google::protobuf::Timestamp& |
| 8422 | Hardware::HasBitSetters::last_change(const Hardware* msg) { |
| 8423 | return *msg->last_change_; |
| 8424 | } |
| 8425 | const ::dmi::Component& |
| 8426 | Hardware::HasBitSetters::root(const Hardware* msg) { |
| 8427 | return *msg->root_; |
| 8428 | } |
| 8429 | const ::google::protobuf::Timestamp& |
| 8430 | Hardware::HasBitSetters::last_booted(const Hardware* msg) { |
| 8431 | return *msg->last_booted_; |
| 8432 | } |
| 8433 | void Hardware::clear_last_change() { |
| 8434 | if (GetArenaNoVirtual() == nullptr && last_change_ != nullptr) { |
| 8435 | delete last_change_; |
| 8436 | } |
| 8437 | last_change_ = nullptr; |
| 8438 | } |
| 8439 | void Hardware::clear_last_booted() { |
| 8440 | if (GetArenaNoVirtual() == nullptr && last_booted_ != nullptr) { |
| 8441 | delete last_booted_; |
| 8442 | } |
| 8443 | last_booted_ = nullptr; |
| 8444 | } |
| 8445 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 8446 | const int Hardware::kLastChangeFieldNumber; |
| 8447 | const int Hardware::kRootFieldNumber; |
| 8448 | const int Hardware::kLastBootedFieldNumber; |
| 8449 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 8450 | |
| 8451 | Hardware::Hardware() |
| 8452 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 8453 | SharedCtor(); |
| 8454 | // @@protoc_insertion_point(constructor:dmi.Hardware) |
| 8455 | } |
| 8456 | Hardware::Hardware(const Hardware& from) |
| 8457 | : ::google::protobuf::Message(), |
| 8458 | _internal_metadata_(nullptr) { |
| 8459 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 8460 | if (from.has_last_change()) { |
| 8461 | last_change_ = new ::google::protobuf::Timestamp(*from.last_change_); |
| 8462 | } else { |
| 8463 | last_change_ = nullptr; |
| 8464 | } |
| 8465 | if (from.has_root()) { |
| 8466 | root_ = new ::dmi::Component(*from.root_); |
| 8467 | } else { |
| 8468 | root_ = nullptr; |
| 8469 | } |
| 8470 | if (from.has_last_booted()) { |
| 8471 | last_booted_ = new ::google::protobuf::Timestamp(*from.last_booted_); |
| 8472 | } else { |
| 8473 | last_booted_ = nullptr; |
| 8474 | } |
| 8475 | // @@protoc_insertion_point(copy_constructor:dmi.Hardware) |
| 8476 | } |
| 8477 | |
| 8478 | void Hardware::SharedCtor() { |
| 8479 | ::google::protobuf::internal::InitSCC( |
| 8480 | &scc_info_Hardware_dmi_2fhw_2eproto.base); |
| 8481 | ::memset(&last_change_, 0, static_cast<size_t>( |
| 8482 | reinterpret_cast<char*>(&last_booted_) - |
| 8483 | reinterpret_cast<char*>(&last_change_)) + sizeof(last_booted_)); |
| 8484 | } |
| 8485 | |
| 8486 | Hardware::~Hardware() { |
| 8487 | // @@protoc_insertion_point(destructor:dmi.Hardware) |
| 8488 | SharedDtor(); |
| 8489 | } |
| 8490 | |
| 8491 | void Hardware::SharedDtor() { |
| 8492 | if (this != internal_default_instance()) delete last_change_; |
| 8493 | if (this != internal_default_instance()) delete root_; |
| 8494 | if (this != internal_default_instance()) delete last_booted_; |
| 8495 | } |
| 8496 | |
| 8497 | void Hardware::SetCachedSize(int size) const { |
| 8498 | _cached_size_.Set(size); |
| 8499 | } |
| 8500 | const Hardware& Hardware::default_instance() { |
| 8501 | ::google::protobuf::internal::InitSCC(&::scc_info_Hardware_dmi_2fhw_2eproto.base); |
| 8502 | return *internal_default_instance(); |
| 8503 | } |
| 8504 | |
| 8505 | |
| 8506 | void Hardware::Clear() { |
| 8507 | // @@protoc_insertion_point(message_clear_start:dmi.Hardware) |
| 8508 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8509 | // Prevent compiler warnings about cached_has_bits being unused |
| 8510 | (void) cached_has_bits; |
| 8511 | |
| 8512 | if (GetArenaNoVirtual() == nullptr && last_change_ != nullptr) { |
| 8513 | delete last_change_; |
| 8514 | } |
| 8515 | last_change_ = nullptr; |
| 8516 | if (GetArenaNoVirtual() == nullptr && root_ != nullptr) { |
| 8517 | delete root_; |
| 8518 | } |
| 8519 | root_ = nullptr; |
| 8520 | if (GetArenaNoVirtual() == nullptr && last_booted_ != nullptr) { |
| 8521 | delete last_booted_; |
| 8522 | } |
| 8523 | last_booted_ = nullptr; |
| 8524 | _internal_metadata_.Clear(); |
| 8525 | } |
| 8526 | |
| 8527 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 8528 | const char* Hardware::_InternalParse(const char* begin, const char* end, void* object, |
| 8529 | ::google::protobuf::internal::ParseContext* ctx) { |
| 8530 | auto msg = static_cast<Hardware*>(object); |
| 8531 | ::google::protobuf::int32 size; (void)size; |
| 8532 | int depth; (void)depth; |
| 8533 | ::google::protobuf::uint32 tag; |
| 8534 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 8535 | auto ptr = begin; |
| 8536 | while (ptr < end) { |
| 8537 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 8538 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8539 | switch (tag >> 3) { |
| 8540 | // .google.protobuf.Timestamp last_change = 1; |
| 8541 | case 1: { |
| 8542 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 8543 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 8544 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8545 | parser_till_end = ::google::protobuf::Timestamp::_InternalParse; |
| 8546 | object = msg->mutable_last_change(); |
| 8547 | if (size > end - ptr) goto len_delim_till_end; |
| 8548 | ptr += size; |
| 8549 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 8550 | {parser_till_end, object}, ptr - size, ptr)); |
| 8551 | break; |
| 8552 | } |
| 8553 | // .dmi.Component root = 2; |
| 8554 | case 2: { |
| 8555 | if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; |
| 8556 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 8557 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8558 | parser_till_end = ::dmi::Component::_InternalParse; |
| 8559 | object = msg->mutable_root(); |
| 8560 | if (size > end - ptr) goto len_delim_till_end; |
| 8561 | ptr += size; |
| 8562 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 8563 | {parser_till_end, object}, ptr - size, ptr)); |
| 8564 | break; |
| 8565 | } |
| 8566 | // .google.protobuf.Timestamp last_booted = 3; |
| 8567 | case 3: { |
| 8568 | if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; |
| 8569 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 8570 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8571 | parser_till_end = ::google::protobuf::Timestamp::_InternalParse; |
| 8572 | object = msg->mutable_last_booted(); |
| 8573 | if (size > end - ptr) goto len_delim_till_end; |
| 8574 | ptr += size; |
| 8575 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 8576 | {parser_till_end, object}, ptr - size, ptr)); |
| 8577 | break; |
| 8578 | } |
| 8579 | default: { |
| 8580 | handle_unusual: |
| 8581 | if ((tag & 7) == 4 || tag == 0) { |
| 8582 | ctx->EndGroup(tag); |
| 8583 | return ptr; |
| 8584 | } |
| 8585 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 8586 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 8587 | ptr = res.first; |
| 8588 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 8589 | if (res.second) return ptr; |
| 8590 | } |
| 8591 | } // switch |
| 8592 | } // while |
| 8593 | return ptr; |
| 8594 | len_delim_till_end: |
| 8595 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 8596 | {parser_till_end, object}, size); |
| 8597 | } |
| 8598 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 8599 | bool Hardware::MergePartialFromCodedStream( |
| 8600 | ::google::protobuf::io::CodedInputStream* input) { |
| 8601 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 8602 | ::google::protobuf::uint32 tag; |
| 8603 | // @@protoc_insertion_point(parse_start:dmi.Hardware) |
| 8604 | for (;;) { |
| 8605 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 8606 | tag = p.first; |
| 8607 | if (!p.second) goto handle_unusual; |
| 8608 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 8609 | // .google.protobuf.Timestamp last_change = 1; |
| 8610 | case 1: { |
| 8611 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 8612 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 8613 | input, mutable_last_change())); |
| 8614 | } else { |
| 8615 | goto handle_unusual; |
| 8616 | } |
| 8617 | break; |
| 8618 | } |
| 8619 | |
| 8620 | // .dmi.Component root = 2; |
| 8621 | case 2: { |
| 8622 | if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { |
| 8623 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 8624 | input, mutable_root())); |
| 8625 | } else { |
| 8626 | goto handle_unusual; |
| 8627 | } |
| 8628 | break; |
| 8629 | } |
| 8630 | |
| 8631 | // .google.protobuf.Timestamp last_booted = 3; |
| 8632 | case 3: { |
| 8633 | if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { |
| 8634 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 8635 | input, mutable_last_booted())); |
| 8636 | } else { |
| 8637 | goto handle_unusual; |
| 8638 | } |
| 8639 | break; |
| 8640 | } |
| 8641 | |
| 8642 | default: { |
| 8643 | handle_unusual: |
| 8644 | if (tag == 0) { |
| 8645 | goto success; |
| 8646 | } |
| 8647 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 8648 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 8649 | break; |
| 8650 | } |
| 8651 | } |
| 8652 | } |
| 8653 | success: |
| 8654 | // @@protoc_insertion_point(parse_success:dmi.Hardware) |
| 8655 | return true; |
| 8656 | failure: |
| 8657 | // @@protoc_insertion_point(parse_failure:dmi.Hardware) |
| 8658 | return false; |
| 8659 | #undef DO_ |
| 8660 | } |
| 8661 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 8662 | |
| 8663 | void Hardware::SerializeWithCachedSizes( |
| 8664 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 8665 | // @@protoc_insertion_point(serialize_start:dmi.Hardware) |
| 8666 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8667 | (void) cached_has_bits; |
| 8668 | |
| 8669 | // .google.protobuf.Timestamp last_change = 1; |
| 8670 | if (this->has_last_change()) { |
| 8671 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 8672 | 1, HasBitSetters::last_change(this), output); |
| 8673 | } |
| 8674 | |
| 8675 | // .dmi.Component root = 2; |
| 8676 | if (this->has_root()) { |
| 8677 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 8678 | 2, HasBitSetters::root(this), output); |
| 8679 | } |
| 8680 | |
| 8681 | // .google.protobuf.Timestamp last_booted = 3; |
| 8682 | if (this->has_last_booted()) { |
| 8683 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 8684 | 3, HasBitSetters::last_booted(this), output); |
| 8685 | } |
| 8686 | |
| 8687 | if (_internal_metadata_.have_unknown_fields()) { |
| 8688 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 8689 | _internal_metadata_.unknown_fields(), output); |
| 8690 | } |
| 8691 | // @@protoc_insertion_point(serialize_end:dmi.Hardware) |
| 8692 | } |
| 8693 | |
| 8694 | ::google::protobuf::uint8* Hardware::InternalSerializeWithCachedSizesToArray( |
| 8695 | ::google::protobuf::uint8* target) const { |
| 8696 | // @@protoc_insertion_point(serialize_to_array_start:dmi.Hardware) |
| 8697 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8698 | (void) cached_has_bits; |
| 8699 | |
| 8700 | // .google.protobuf.Timestamp last_change = 1; |
| 8701 | if (this->has_last_change()) { |
| 8702 | target = ::google::protobuf::internal::WireFormatLite:: |
| 8703 | InternalWriteMessageToArray( |
| 8704 | 1, HasBitSetters::last_change(this), target); |
| 8705 | } |
| 8706 | |
| 8707 | // .dmi.Component root = 2; |
| 8708 | if (this->has_root()) { |
| 8709 | target = ::google::protobuf::internal::WireFormatLite:: |
| 8710 | InternalWriteMessageToArray( |
| 8711 | 2, HasBitSetters::root(this), target); |
| 8712 | } |
| 8713 | |
| 8714 | // .google.protobuf.Timestamp last_booted = 3; |
| 8715 | if (this->has_last_booted()) { |
| 8716 | target = ::google::protobuf::internal::WireFormatLite:: |
| 8717 | InternalWriteMessageToArray( |
| 8718 | 3, HasBitSetters::last_booted(this), target); |
| 8719 | } |
| 8720 | |
| 8721 | if (_internal_metadata_.have_unknown_fields()) { |
| 8722 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 8723 | _internal_metadata_.unknown_fields(), target); |
| 8724 | } |
| 8725 | // @@protoc_insertion_point(serialize_to_array_end:dmi.Hardware) |
| 8726 | return target; |
| 8727 | } |
| 8728 | |
| 8729 | size_t Hardware::ByteSizeLong() const { |
| 8730 | // @@protoc_insertion_point(message_byte_size_start:dmi.Hardware) |
| 8731 | size_t total_size = 0; |
| 8732 | |
| 8733 | if (_internal_metadata_.have_unknown_fields()) { |
| 8734 | total_size += |
| 8735 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 8736 | _internal_metadata_.unknown_fields()); |
| 8737 | } |
| 8738 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8739 | // Prevent compiler warnings about cached_has_bits being unused |
| 8740 | (void) cached_has_bits; |
| 8741 | |
| 8742 | // .google.protobuf.Timestamp last_change = 1; |
| 8743 | if (this->has_last_change()) { |
| 8744 | total_size += 1 + |
| 8745 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8746 | *last_change_); |
| 8747 | } |
| 8748 | |
| 8749 | // .dmi.Component root = 2; |
| 8750 | if (this->has_root()) { |
| 8751 | total_size += 1 + |
| 8752 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8753 | *root_); |
| 8754 | } |
| 8755 | |
| 8756 | // .google.protobuf.Timestamp last_booted = 3; |
| 8757 | if (this->has_last_booted()) { |
| 8758 | total_size += 1 + |
| 8759 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8760 | *last_booted_); |
| 8761 | } |
| 8762 | |
| 8763 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 8764 | SetCachedSize(cached_size); |
| 8765 | return total_size; |
| 8766 | } |
| 8767 | |
| 8768 | void Hardware::MergeFrom(const ::google::protobuf::Message& from) { |
| 8769 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.Hardware) |
| 8770 | GOOGLE_DCHECK_NE(&from, this); |
| 8771 | const Hardware* source = |
| 8772 | ::google::protobuf::DynamicCastToGenerated<Hardware>( |
| 8773 | &from); |
| 8774 | if (source == nullptr) { |
| 8775 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.Hardware) |
| 8776 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 8777 | } else { |
| 8778 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.Hardware) |
| 8779 | MergeFrom(*source); |
| 8780 | } |
| 8781 | } |
| 8782 | |
| 8783 | void Hardware::MergeFrom(const Hardware& from) { |
| 8784 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.Hardware) |
| 8785 | GOOGLE_DCHECK_NE(&from, this); |
| 8786 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 8787 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8788 | (void) cached_has_bits; |
| 8789 | |
| 8790 | if (from.has_last_change()) { |
| 8791 | mutable_last_change()->::google::protobuf::Timestamp::MergeFrom(from.last_change()); |
| 8792 | } |
| 8793 | if (from.has_root()) { |
| 8794 | mutable_root()->::dmi::Component::MergeFrom(from.root()); |
| 8795 | } |
| 8796 | if (from.has_last_booted()) { |
| 8797 | mutable_last_booted()->::google::protobuf::Timestamp::MergeFrom(from.last_booted()); |
| 8798 | } |
| 8799 | } |
| 8800 | |
| 8801 | void Hardware::CopyFrom(const ::google::protobuf::Message& from) { |
| 8802 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.Hardware) |
| 8803 | if (&from == this) return; |
| 8804 | Clear(); |
| 8805 | MergeFrom(from); |
| 8806 | } |
| 8807 | |
| 8808 | void Hardware::CopyFrom(const Hardware& from) { |
| 8809 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.Hardware) |
| 8810 | if (&from == this) return; |
| 8811 | Clear(); |
| 8812 | MergeFrom(from); |
| 8813 | } |
| 8814 | |
| 8815 | bool Hardware::IsInitialized() const { |
| 8816 | return true; |
| 8817 | } |
| 8818 | |
| 8819 | void Hardware::Swap(Hardware* other) { |
| 8820 | if (other == this) return; |
| 8821 | InternalSwap(other); |
| 8822 | } |
| 8823 | void Hardware::InternalSwap(Hardware* other) { |
| 8824 | using std::swap; |
| 8825 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 8826 | swap(last_change_, other->last_change_); |
| 8827 | swap(root_, other->root_); |
| 8828 | swap(last_booted_, other->last_booted_); |
| 8829 | } |
| 8830 | |
| 8831 | ::google::protobuf::Metadata Hardware::GetMetadata() const { |
| 8832 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 8833 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 8834 | } |
| 8835 | |
| 8836 | |
| 8837 | // =================================================================== |
| 8838 | |
| 8839 | void ModifiableComponent::InitAsDefaultInstance() { |
| 8840 | ::dmi::_ModifiableComponent_default_instance_._instance.get_mutable()->parent_ = const_cast< ::dmi::Component*>( |
| 8841 | ::dmi::Component::internal_default_instance()); |
| 8842 | ::dmi::_ModifiableComponent_default_instance_._instance.get_mutable()->uri_ = const_cast< ::dmi::Uri*>( |
| 8843 | ::dmi::Uri::internal_default_instance()); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8844 | ::dmi::_ModifiableComponent_default_instance_.port_attr_ = const_cast< ::dmi::PortComponentChangeAttributes*>( |
| 8845 | ::dmi::PortComponentChangeAttributes::internal_default_instance()); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 8846 | ::dmi::_ModifiableComponent_default_instance_.trx_attr_ = const_cast< ::dmi::TransceiverComponentChangeAttributes*>( |
| 8847 | ::dmi::TransceiverComponentChangeAttributes::internal_default_instance()); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8848 | } |
| 8849 | class ModifiableComponent::HasBitSetters { |
| 8850 | public: |
| 8851 | static const ::dmi::Component& parent(const ModifiableComponent* msg); |
| 8852 | static const ::dmi::Uri& uri(const ModifiableComponent* msg); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8853 | static const ::dmi::PortComponentChangeAttributes& port_attr(const ModifiableComponent* msg); |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 8854 | static const ::dmi::TransceiverComponentChangeAttributes& trx_attr(const ModifiableComponent* msg); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8855 | }; |
| 8856 | |
| 8857 | const ::dmi::Component& |
| 8858 | ModifiableComponent::HasBitSetters::parent(const ModifiableComponent* msg) { |
| 8859 | return *msg->parent_; |
| 8860 | } |
| 8861 | const ::dmi::Uri& |
| 8862 | ModifiableComponent::HasBitSetters::uri(const ModifiableComponent* msg) { |
| 8863 | return *msg->uri_; |
| 8864 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8865 | const ::dmi::PortComponentChangeAttributes& |
| 8866 | ModifiableComponent::HasBitSetters::port_attr(const ModifiableComponent* msg) { |
| 8867 | return *msg->specific_.port_attr_; |
| 8868 | } |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 8869 | const ::dmi::TransceiverComponentChangeAttributes& |
| 8870 | ModifiableComponent::HasBitSetters::trx_attr(const ModifiableComponent* msg) { |
| 8871 | return *msg->specific_.trx_attr_; |
| 8872 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8873 | void ModifiableComponent::set_allocated_port_attr(::dmi::PortComponentChangeAttributes* port_attr) { |
| 8874 | ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); |
| 8875 | clear_specific(); |
| 8876 | if (port_attr) { |
| 8877 | ::google::protobuf::Arena* submessage_arena = nullptr; |
| 8878 | if (message_arena != submessage_arena) { |
| 8879 | port_attr = ::google::protobuf::internal::GetOwnedMessage( |
| 8880 | message_arena, port_attr, submessage_arena); |
| 8881 | } |
| 8882 | set_has_port_attr(); |
| 8883 | specific_.port_attr_ = port_attr; |
| 8884 | } |
| 8885 | // @@protoc_insertion_point(field_set_allocated:dmi.ModifiableComponent.port_attr) |
| 8886 | } |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 8887 | void ModifiableComponent::set_allocated_trx_attr(::dmi::TransceiverComponentChangeAttributes* trx_attr) { |
| 8888 | ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); |
| 8889 | clear_specific(); |
| 8890 | if (trx_attr) { |
| 8891 | ::google::protobuf::Arena* submessage_arena = nullptr; |
| 8892 | if (message_arena != submessage_arena) { |
| 8893 | trx_attr = ::google::protobuf::internal::GetOwnedMessage( |
| 8894 | message_arena, trx_attr, submessage_arena); |
| 8895 | } |
| 8896 | set_has_trx_attr(); |
| 8897 | specific_.trx_attr_ = trx_attr; |
| 8898 | } |
| 8899 | // @@protoc_insertion_point(field_set_allocated:dmi.ModifiableComponent.trx_attr) |
| 8900 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8901 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 8902 | const int ModifiableComponent::kNameFieldNumber; |
| 8903 | const int ModifiableComponent::kClassFieldNumber; |
| 8904 | const int ModifiableComponent::kParentFieldNumber; |
| 8905 | const int ModifiableComponent::kParentRelPosFieldNumber; |
| 8906 | const int ModifiableComponent::kAliasFieldNumber; |
| 8907 | const int ModifiableComponent::kAssetIdFieldNumber; |
| 8908 | const int ModifiableComponent::kUriFieldNumber; |
| 8909 | const int ModifiableComponent::kAdminStateFieldNumber; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8910 | const int ModifiableComponent::kPortAttrFieldNumber; |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 8911 | const int ModifiableComponent::kTrxAttrFieldNumber; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8912 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 8913 | |
| 8914 | ModifiableComponent::ModifiableComponent() |
| 8915 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 8916 | SharedCtor(); |
| 8917 | // @@protoc_insertion_point(constructor:dmi.ModifiableComponent) |
| 8918 | } |
| 8919 | ModifiableComponent::ModifiableComponent(const ModifiableComponent& from) |
| 8920 | : ::google::protobuf::Message(), |
| 8921 | _internal_metadata_(nullptr) { |
| 8922 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 8923 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8924 | if (from.name().size() > 0) { |
| 8925 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
| 8926 | } |
| 8927 | alias_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8928 | if (from.alias().size() > 0) { |
| 8929 | alias_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.alias_); |
| 8930 | } |
| 8931 | asset_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8932 | if (from.asset_id().size() > 0) { |
| 8933 | asset_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.asset_id_); |
| 8934 | } |
| 8935 | if (from.has_parent()) { |
| 8936 | parent_ = new ::dmi::Component(*from.parent_); |
| 8937 | } else { |
| 8938 | parent_ = nullptr; |
| 8939 | } |
| 8940 | if (from.has_uri()) { |
| 8941 | uri_ = new ::dmi::Uri(*from.uri_); |
| 8942 | } else { |
| 8943 | uri_ = nullptr; |
| 8944 | } |
| 8945 | ::memcpy(&class__, &from.class__, |
| 8946 | static_cast<size_t>(reinterpret_cast<char*>(&admin_state_) - |
| 8947 | reinterpret_cast<char*>(&class__)) + sizeof(admin_state_)); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8948 | clear_has_specific(); |
| 8949 | switch (from.specific_case()) { |
| 8950 | case kPortAttr: { |
| 8951 | mutable_port_attr()->::dmi::PortComponentChangeAttributes::MergeFrom(from.port_attr()); |
| 8952 | break; |
| 8953 | } |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 8954 | case kTrxAttr: { |
| 8955 | mutable_trx_attr()->::dmi::TransceiverComponentChangeAttributes::MergeFrom(from.trx_attr()); |
| 8956 | break; |
| 8957 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8958 | case SPECIFIC_NOT_SET: { |
| 8959 | break; |
| 8960 | } |
| 8961 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8962 | // @@protoc_insertion_point(copy_constructor:dmi.ModifiableComponent) |
| 8963 | } |
| 8964 | |
| 8965 | void ModifiableComponent::SharedCtor() { |
| 8966 | ::google::protobuf::internal::InitSCC( |
| 8967 | &scc_info_ModifiableComponent_dmi_2fhw_2eproto.base); |
| 8968 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8969 | alias_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8970 | asset_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8971 | ::memset(&parent_, 0, static_cast<size_t>( |
| 8972 | reinterpret_cast<char*>(&admin_state_) - |
| 8973 | reinterpret_cast<char*>(&parent_)) + sizeof(admin_state_)); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8974 | clear_has_specific(); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8975 | } |
| 8976 | |
| 8977 | ModifiableComponent::~ModifiableComponent() { |
| 8978 | // @@protoc_insertion_point(destructor:dmi.ModifiableComponent) |
| 8979 | SharedDtor(); |
| 8980 | } |
| 8981 | |
| 8982 | void ModifiableComponent::SharedDtor() { |
| 8983 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8984 | alias_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8985 | asset_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8986 | if (this != internal_default_instance()) delete parent_; |
| 8987 | if (this != internal_default_instance()) delete uri_; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8988 | if (has_specific()) { |
| 8989 | clear_specific(); |
| 8990 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8991 | } |
| 8992 | |
| 8993 | void ModifiableComponent::SetCachedSize(int size) const { |
| 8994 | _cached_size_.Set(size); |
| 8995 | } |
| 8996 | const ModifiableComponent& ModifiableComponent::default_instance() { |
| 8997 | ::google::protobuf::internal::InitSCC(&::scc_info_ModifiableComponent_dmi_2fhw_2eproto.base); |
| 8998 | return *internal_default_instance(); |
| 8999 | } |
| 9000 | |
| 9001 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9002 | void ModifiableComponent::clear_specific() { |
| 9003 | // @@protoc_insertion_point(one_of_clear_start:dmi.ModifiableComponent) |
| 9004 | switch (specific_case()) { |
| 9005 | case kPortAttr: { |
| 9006 | delete specific_.port_attr_; |
| 9007 | break; |
| 9008 | } |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 9009 | case kTrxAttr: { |
| 9010 | delete specific_.trx_attr_; |
| 9011 | break; |
| 9012 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9013 | case SPECIFIC_NOT_SET: { |
| 9014 | break; |
| 9015 | } |
| 9016 | } |
| 9017 | _oneof_case_[0] = SPECIFIC_NOT_SET; |
| 9018 | } |
| 9019 | |
| 9020 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 9021 | void ModifiableComponent::Clear() { |
| 9022 | // @@protoc_insertion_point(message_clear_start:dmi.ModifiableComponent) |
| 9023 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 9024 | // Prevent compiler warnings about cached_has_bits being unused |
| 9025 | (void) cached_has_bits; |
| 9026 | |
| 9027 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 9028 | alias_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 9029 | asset_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 9030 | if (GetArenaNoVirtual() == nullptr && parent_ != nullptr) { |
| 9031 | delete parent_; |
| 9032 | } |
| 9033 | parent_ = nullptr; |
| 9034 | if (GetArenaNoVirtual() == nullptr && uri_ != nullptr) { |
| 9035 | delete uri_; |
| 9036 | } |
| 9037 | uri_ = nullptr; |
| 9038 | ::memset(&class__, 0, static_cast<size_t>( |
| 9039 | reinterpret_cast<char*>(&admin_state_) - |
| 9040 | reinterpret_cast<char*>(&class__)) + sizeof(admin_state_)); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9041 | clear_specific(); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 9042 | _internal_metadata_.Clear(); |
| 9043 | } |
| 9044 | |
| 9045 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 9046 | const char* ModifiableComponent::_InternalParse(const char* begin, const char* end, void* object, |
| 9047 | ::google::protobuf::internal::ParseContext* ctx) { |
| 9048 | auto msg = static_cast<ModifiableComponent*>(object); |
| 9049 | ::google::protobuf::int32 size; (void)size; |
| 9050 | int depth; (void)depth; |
| 9051 | ::google::protobuf::uint32 tag; |
| 9052 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 9053 | auto ptr = begin; |
| 9054 | while (ptr < end) { |
| 9055 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 9056 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 9057 | switch (tag >> 3) { |
| 9058 | // string name = 1; |
| 9059 | case 1: { |
| 9060 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 9061 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 9062 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 9063 | ctx->extra_parse_data().SetFieldName("dmi.ModifiableComponent.name"); |
| 9064 | object = msg->mutable_name(); |
| 9065 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 9066 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 9067 | goto string_till_end; |
| 9068 | } |
| 9069 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 9070 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 9071 | ptr += size; |
| 9072 | break; |
| 9073 | } |
| 9074 | // .dmi.ComponentType class = 2; |
| 9075 | case 2: { |
| 9076 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 9077 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 9078 | msg->set_class_(static_cast<::dmi::ComponentType>(val)); |
| 9079 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 9080 | break; |
| 9081 | } |
| 9082 | // .dmi.Component parent = 3; |
| 9083 | case 3: { |
| 9084 | if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; |
| 9085 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 9086 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 9087 | parser_till_end = ::dmi::Component::_InternalParse; |
| 9088 | object = msg->mutable_parent(); |
| 9089 | if (size > end - ptr) goto len_delim_till_end; |
| 9090 | ptr += size; |
| 9091 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 9092 | {parser_till_end, object}, ptr - size, ptr)); |
| 9093 | break; |
| 9094 | } |
| 9095 | // int32 parent_rel_pos = 4; |
| 9096 | case 4: { |
| 9097 | if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; |
| 9098 | msg->set_parent_rel_pos(::google::protobuf::internal::ReadVarint(&ptr)); |
| 9099 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 9100 | break; |
| 9101 | } |
| 9102 | // string alias = 5; |
| 9103 | case 5: { |
| 9104 | if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; |
| 9105 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 9106 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 9107 | ctx->extra_parse_data().SetFieldName("dmi.ModifiableComponent.alias"); |
| 9108 | object = msg->mutable_alias(); |
| 9109 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 9110 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 9111 | goto string_till_end; |
| 9112 | } |
| 9113 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 9114 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 9115 | ptr += size; |
| 9116 | break; |
| 9117 | } |
| 9118 | // string asset_id = 6; |
| 9119 | case 6: { |
| 9120 | if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; |
| 9121 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 9122 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 9123 | ctx->extra_parse_data().SetFieldName("dmi.ModifiableComponent.asset_id"); |
| 9124 | object = msg->mutable_asset_id(); |
| 9125 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 9126 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 9127 | goto string_till_end; |
| 9128 | } |
| 9129 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 9130 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 9131 | ptr += size; |
| 9132 | break; |
| 9133 | } |
| 9134 | // .dmi.Uri uri = 7; |
| 9135 | case 7: { |
| 9136 | if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; |
| 9137 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 9138 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 9139 | parser_till_end = ::dmi::Uri::_InternalParse; |
| 9140 | object = msg->mutable_uri(); |
| 9141 | if (size > end - ptr) goto len_delim_till_end; |
| 9142 | ptr += size; |
| 9143 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 9144 | {parser_till_end, object}, ptr - size, ptr)); |
| 9145 | break; |
| 9146 | } |
| 9147 | // .dmi.ComponentAdminState admin_state = 8; |
| 9148 | case 8: { |
| 9149 | if (static_cast<::google::protobuf::uint8>(tag) != 64) goto handle_unusual; |
| 9150 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 9151 | msg->set_admin_state(static_cast<::dmi::ComponentAdminState>(val)); |
| 9152 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 9153 | break; |
| 9154 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9155 | // .dmi.PortComponentChangeAttributes port_attr = 50; |
| 9156 | case 50: { |
| 9157 | if (static_cast<::google::protobuf::uint8>(tag) != 146) goto handle_unusual; |
| 9158 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 9159 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 9160 | parser_till_end = ::dmi::PortComponentChangeAttributes::_InternalParse; |
| 9161 | object = msg->mutable_port_attr(); |
| 9162 | if (size > end - ptr) goto len_delim_till_end; |
| 9163 | ptr += size; |
| 9164 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 9165 | {parser_till_end, object}, ptr - size, ptr)); |
| 9166 | break; |
| 9167 | } |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 9168 | // .dmi.TransceiverComponentChangeAttributes trx_attr = 51; |
| 9169 | case 51: { |
| 9170 | if (static_cast<::google::protobuf::uint8>(tag) != 154) goto handle_unusual; |
| 9171 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 9172 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 9173 | parser_till_end = ::dmi::TransceiverComponentChangeAttributes::_InternalParse; |
| 9174 | object = msg->mutable_trx_attr(); |
| 9175 | if (size > end - ptr) goto len_delim_till_end; |
| 9176 | ptr += size; |
| 9177 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 9178 | {parser_till_end, object}, ptr - size, ptr)); |
| 9179 | break; |
| 9180 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 9181 | default: { |
| 9182 | handle_unusual: |
| 9183 | if ((tag & 7) == 4 || tag == 0) { |
| 9184 | ctx->EndGroup(tag); |
| 9185 | return ptr; |
| 9186 | } |
| 9187 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 9188 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 9189 | ptr = res.first; |
| 9190 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 9191 | if (res.second) return ptr; |
| 9192 | } |
| 9193 | } // switch |
| 9194 | } // while |
| 9195 | return ptr; |
| 9196 | string_till_end: |
| 9197 | static_cast<::std::string*>(object)->clear(); |
| 9198 | static_cast<::std::string*>(object)->reserve(size); |
| 9199 | goto len_delim_till_end; |
| 9200 | len_delim_till_end: |
| 9201 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 9202 | {parser_till_end, object}, size); |
| 9203 | } |
| 9204 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 9205 | bool ModifiableComponent::MergePartialFromCodedStream( |
| 9206 | ::google::protobuf::io::CodedInputStream* input) { |
| 9207 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 9208 | ::google::protobuf::uint32 tag; |
| 9209 | // @@protoc_insertion_point(parse_start:dmi.ModifiableComponent) |
| 9210 | for (;;) { |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9211 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 9212 | tag = p.first; |
| 9213 | if (!p.second) goto handle_unusual; |
| 9214 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 9215 | // string name = 1; |
| 9216 | case 1: { |
| 9217 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 9218 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 9219 | input, this->mutable_name())); |
| 9220 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 9221 | this->name().data(), static_cast<int>(this->name().length()), |
| 9222 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 9223 | "dmi.ModifiableComponent.name")); |
| 9224 | } else { |
| 9225 | goto handle_unusual; |
| 9226 | } |
| 9227 | break; |
| 9228 | } |
| 9229 | |
| 9230 | // .dmi.ComponentType class = 2; |
| 9231 | case 2: { |
| 9232 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 9233 | int value = 0; |
| 9234 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9235 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 9236 | input, &value))); |
| 9237 | set_class_(static_cast< ::dmi::ComponentType >(value)); |
| 9238 | } else { |
| 9239 | goto handle_unusual; |
| 9240 | } |
| 9241 | break; |
| 9242 | } |
| 9243 | |
| 9244 | // .dmi.Component parent = 3; |
| 9245 | case 3: { |
| 9246 | if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { |
| 9247 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 9248 | input, mutable_parent())); |
| 9249 | } else { |
| 9250 | goto handle_unusual; |
| 9251 | } |
| 9252 | break; |
| 9253 | } |
| 9254 | |
| 9255 | // int32 parent_rel_pos = 4; |
| 9256 | case 4: { |
| 9257 | if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { |
| 9258 | |
| 9259 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9260 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 9261 | input, &parent_rel_pos_))); |
| 9262 | } else { |
| 9263 | goto handle_unusual; |
| 9264 | } |
| 9265 | break; |
| 9266 | } |
| 9267 | |
| 9268 | // string alias = 5; |
| 9269 | case 5: { |
| 9270 | if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { |
| 9271 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 9272 | input, this->mutable_alias())); |
| 9273 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 9274 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 9275 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 9276 | "dmi.ModifiableComponent.alias")); |
| 9277 | } else { |
| 9278 | goto handle_unusual; |
| 9279 | } |
| 9280 | break; |
| 9281 | } |
| 9282 | |
| 9283 | // string asset_id = 6; |
| 9284 | case 6: { |
| 9285 | if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { |
| 9286 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 9287 | input, this->mutable_asset_id())); |
| 9288 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 9289 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 9290 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 9291 | "dmi.ModifiableComponent.asset_id")); |
| 9292 | } else { |
| 9293 | goto handle_unusual; |
| 9294 | } |
| 9295 | break; |
| 9296 | } |
| 9297 | |
| 9298 | // .dmi.Uri uri = 7; |
| 9299 | case 7: { |
| 9300 | if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) { |
| 9301 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 9302 | input, mutable_uri())); |
| 9303 | } else { |
| 9304 | goto handle_unusual; |
| 9305 | } |
| 9306 | break; |
| 9307 | } |
| 9308 | |
| 9309 | // .dmi.ComponentAdminState admin_state = 8; |
| 9310 | case 8: { |
| 9311 | if (static_cast< ::google::protobuf::uint8>(tag) == (64 & 0xFF)) { |
| 9312 | int value = 0; |
| 9313 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 9314 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 9315 | input, &value))); |
| 9316 | set_admin_state(static_cast< ::dmi::ComponentAdminState >(value)); |
| 9317 | } else { |
| 9318 | goto handle_unusual; |
| 9319 | } |
| 9320 | break; |
| 9321 | } |
| 9322 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9323 | // .dmi.PortComponentChangeAttributes port_attr = 50; |
| 9324 | case 50: { |
| 9325 | if (static_cast< ::google::protobuf::uint8>(tag) == (402 & 0xFF)) { |
| 9326 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 9327 | input, mutable_port_attr())); |
| 9328 | } else { |
| 9329 | goto handle_unusual; |
| 9330 | } |
| 9331 | break; |
| 9332 | } |
| 9333 | |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 9334 | // .dmi.TransceiverComponentChangeAttributes trx_attr = 51; |
| 9335 | case 51: { |
| 9336 | if (static_cast< ::google::protobuf::uint8>(tag) == (410 & 0xFF)) { |
| 9337 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 9338 | input, mutable_trx_attr())); |
| 9339 | } else { |
| 9340 | goto handle_unusual; |
| 9341 | } |
| 9342 | break; |
| 9343 | } |
| 9344 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 9345 | default: { |
| 9346 | handle_unusual: |
| 9347 | if (tag == 0) { |
| 9348 | goto success; |
| 9349 | } |
| 9350 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 9351 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 9352 | break; |
| 9353 | } |
| 9354 | } |
| 9355 | } |
| 9356 | success: |
| 9357 | // @@protoc_insertion_point(parse_success:dmi.ModifiableComponent) |
| 9358 | return true; |
| 9359 | failure: |
| 9360 | // @@protoc_insertion_point(parse_failure:dmi.ModifiableComponent) |
| 9361 | return false; |
| 9362 | #undef DO_ |
| 9363 | } |
| 9364 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 9365 | |
| 9366 | void ModifiableComponent::SerializeWithCachedSizes( |
| 9367 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 9368 | // @@protoc_insertion_point(serialize_start:dmi.ModifiableComponent) |
| 9369 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 9370 | (void) cached_has_bits; |
| 9371 | |
| 9372 | // string name = 1; |
| 9373 | if (this->name().size() > 0) { |
| 9374 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 9375 | this->name().data(), static_cast<int>(this->name().length()), |
| 9376 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 9377 | "dmi.ModifiableComponent.name"); |
| 9378 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 9379 | 1, this->name(), output); |
| 9380 | } |
| 9381 | |
| 9382 | // .dmi.ComponentType class = 2; |
| 9383 | if (this->class_() != 0) { |
| 9384 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 9385 | 2, this->class_(), output); |
| 9386 | } |
| 9387 | |
| 9388 | // .dmi.Component parent = 3; |
| 9389 | if (this->has_parent()) { |
| 9390 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 9391 | 3, HasBitSetters::parent(this), output); |
| 9392 | } |
| 9393 | |
| 9394 | // int32 parent_rel_pos = 4; |
| 9395 | if (this->parent_rel_pos() != 0) { |
| 9396 | ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->parent_rel_pos(), output); |
| 9397 | } |
| 9398 | |
| 9399 | // string alias = 5; |
| 9400 | if (this->alias().size() > 0) { |
| 9401 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 9402 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 9403 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 9404 | "dmi.ModifiableComponent.alias"); |
| 9405 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 9406 | 5, this->alias(), output); |
| 9407 | } |
| 9408 | |
| 9409 | // string asset_id = 6; |
| 9410 | if (this->asset_id().size() > 0) { |
| 9411 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 9412 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 9413 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 9414 | "dmi.ModifiableComponent.asset_id"); |
| 9415 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 9416 | 6, this->asset_id(), output); |
| 9417 | } |
| 9418 | |
| 9419 | // .dmi.Uri uri = 7; |
| 9420 | if (this->has_uri()) { |
| 9421 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 9422 | 7, HasBitSetters::uri(this), output); |
| 9423 | } |
| 9424 | |
| 9425 | // .dmi.ComponentAdminState admin_state = 8; |
| 9426 | if (this->admin_state() != 0) { |
| 9427 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 9428 | 8, this->admin_state(), output); |
| 9429 | } |
| 9430 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9431 | // .dmi.PortComponentChangeAttributes port_attr = 50; |
| 9432 | if (has_port_attr()) { |
| 9433 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 9434 | 50, HasBitSetters::port_attr(this), output); |
| 9435 | } |
| 9436 | |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 9437 | // .dmi.TransceiverComponentChangeAttributes trx_attr = 51; |
| 9438 | if (has_trx_attr()) { |
| 9439 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 9440 | 51, HasBitSetters::trx_attr(this), output); |
| 9441 | } |
| 9442 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 9443 | if (_internal_metadata_.have_unknown_fields()) { |
| 9444 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 9445 | _internal_metadata_.unknown_fields(), output); |
| 9446 | } |
| 9447 | // @@protoc_insertion_point(serialize_end:dmi.ModifiableComponent) |
| 9448 | } |
| 9449 | |
| 9450 | ::google::protobuf::uint8* ModifiableComponent::InternalSerializeWithCachedSizesToArray( |
| 9451 | ::google::protobuf::uint8* target) const { |
| 9452 | // @@protoc_insertion_point(serialize_to_array_start:dmi.ModifiableComponent) |
| 9453 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 9454 | (void) cached_has_bits; |
| 9455 | |
| 9456 | // string name = 1; |
| 9457 | if (this->name().size() > 0) { |
| 9458 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 9459 | this->name().data(), static_cast<int>(this->name().length()), |
| 9460 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 9461 | "dmi.ModifiableComponent.name"); |
| 9462 | target = |
| 9463 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 9464 | 1, this->name(), target); |
| 9465 | } |
| 9466 | |
| 9467 | // .dmi.ComponentType class = 2; |
| 9468 | if (this->class_() != 0) { |
| 9469 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 9470 | 2, this->class_(), target); |
| 9471 | } |
| 9472 | |
| 9473 | // .dmi.Component parent = 3; |
| 9474 | if (this->has_parent()) { |
| 9475 | target = ::google::protobuf::internal::WireFormatLite:: |
| 9476 | InternalWriteMessageToArray( |
| 9477 | 3, HasBitSetters::parent(this), target); |
| 9478 | } |
| 9479 | |
| 9480 | // int32 parent_rel_pos = 4; |
| 9481 | if (this->parent_rel_pos() != 0) { |
| 9482 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->parent_rel_pos(), target); |
| 9483 | } |
| 9484 | |
| 9485 | // string alias = 5; |
| 9486 | if (this->alias().size() > 0) { |
| 9487 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 9488 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 9489 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 9490 | "dmi.ModifiableComponent.alias"); |
| 9491 | target = |
| 9492 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 9493 | 5, this->alias(), target); |
| 9494 | } |
| 9495 | |
| 9496 | // string asset_id = 6; |
| 9497 | if (this->asset_id().size() > 0) { |
| 9498 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 9499 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 9500 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 9501 | "dmi.ModifiableComponent.asset_id"); |
| 9502 | target = |
| 9503 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 9504 | 6, this->asset_id(), target); |
| 9505 | } |
| 9506 | |
| 9507 | // .dmi.Uri uri = 7; |
| 9508 | if (this->has_uri()) { |
| 9509 | target = ::google::protobuf::internal::WireFormatLite:: |
| 9510 | InternalWriteMessageToArray( |
| 9511 | 7, HasBitSetters::uri(this), target); |
| 9512 | } |
| 9513 | |
| 9514 | // .dmi.ComponentAdminState admin_state = 8; |
| 9515 | if (this->admin_state() != 0) { |
| 9516 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 9517 | 8, this->admin_state(), target); |
| 9518 | } |
| 9519 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9520 | // .dmi.PortComponentChangeAttributes port_attr = 50; |
| 9521 | if (has_port_attr()) { |
| 9522 | target = ::google::protobuf::internal::WireFormatLite:: |
| 9523 | InternalWriteMessageToArray( |
| 9524 | 50, HasBitSetters::port_attr(this), target); |
| 9525 | } |
| 9526 | |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 9527 | // .dmi.TransceiverComponentChangeAttributes trx_attr = 51; |
| 9528 | if (has_trx_attr()) { |
| 9529 | target = ::google::protobuf::internal::WireFormatLite:: |
| 9530 | InternalWriteMessageToArray( |
| 9531 | 51, HasBitSetters::trx_attr(this), target); |
| 9532 | } |
| 9533 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 9534 | if (_internal_metadata_.have_unknown_fields()) { |
| 9535 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 9536 | _internal_metadata_.unknown_fields(), target); |
| 9537 | } |
| 9538 | // @@protoc_insertion_point(serialize_to_array_end:dmi.ModifiableComponent) |
| 9539 | return target; |
| 9540 | } |
| 9541 | |
| 9542 | size_t ModifiableComponent::ByteSizeLong() const { |
| 9543 | // @@protoc_insertion_point(message_byte_size_start:dmi.ModifiableComponent) |
| 9544 | size_t total_size = 0; |
| 9545 | |
| 9546 | if (_internal_metadata_.have_unknown_fields()) { |
| 9547 | total_size += |
| 9548 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 9549 | _internal_metadata_.unknown_fields()); |
| 9550 | } |
| 9551 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 9552 | // Prevent compiler warnings about cached_has_bits being unused |
| 9553 | (void) cached_has_bits; |
| 9554 | |
| 9555 | // string name = 1; |
| 9556 | if (this->name().size() > 0) { |
| 9557 | total_size += 1 + |
| 9558 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 9559 | this->name()); |
| 9560 | } |
| 9561 | |
| 9562 | // string alias = 5; |
| 9563 | if (this->alias().size() > 0) { |
| 9564 | total_size += 1 + |
| 9565 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 9566 | this->alias()); |
| 9567 | } |
| 9568 | |
| 9569 | // string asset_id = 6; |
| 9570 | if (this->asset_id().size() > 0) { |
| 9571 | total_size += 1 + |
| 9572 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 9573 | this->asset_id()); |
| 9574 | } |
| 9575 | |
| 9576 | // .dmi.Component parent = 3; |
| 9577 | if (this->has_parent()) { |
| 9578 | total_size += 1 + |
| 9579 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 9580 | *parent_); |
| 9581 | } |
| 9582 | |
| 9583 | // .dmi.Uri uri = 7; |
| 9584 | if (this->has_uri()) { |
| 9585 | total_size += 1 + |
| 9586 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 9587 | *uri_); |
| 9588 | } |
| 9589 | |
| 9590 | // .dmi.ComponentType class = 2; |
| 9591 | if (this->class_() != 0) { |
| 9592 | total_size += 1 + |
| 9593 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->class_()); |
| 9594 | } |
| 9595 | |
| 9596 | // int32 parent_rel_pos = 4; |
| 9597 | if (this->parent_rel_pos() != 0) { |
| 9598 | total_size += 1 + |
| 9599 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 9600 | this->parent_rel_pos()); |
| 9601 | } |
| 9602 | |
| 9603 | // .dmi.ComponentAdminState admin_state = 8; |
| 9604 | if (this->admin_state() != 0) { |
| 9605 | total_size += 1 + |
| 9606 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->admin_state()); |
| 9607 | } |
| 9608 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9609 | switch (specific_case()) { |
| 9610 | // .dmi.PortComponentChangeAttributes port_attr = 50; |
| 9611 | case kPortAttr: { |
| 9612 | total_size += 2 + |
| 9613 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 9614 | *specific_.port_attr_); |
| 9615 | break; |
| 9616 | } |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 9617 | // .dmi.TransceiverComponentChangeAttributes trx_attr = 51; |
| 9618 | case kTrxAttr: { |
| 9619 | total_size += 2 + |
| 9620 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 9621 | *specific_.trx_attr_); |
| 9622 | break; |
| 9623 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9624 | case SPECIFIC_NOT_SET: { |
| 9625 | break; |
| 9626 | } |
| 9627 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 9628 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 9629 | SetCachedSize(cached_size); |
| 9630 | return total_size; |
| 9631 | } |
| 9632 | |
| 9633 | void ModifiableComponent::MergeFrom(const ::google::protobuf::Message& from) { |
| 9634 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.ModifiableComponent) |
| 9635 | GOOGLE_DCHECK_NE(&from, this); |
| 9636 | const ModifiableComponent* source = |
| 9637 | ::google::protobuf::DynamicCastToGenerated<ModifiableComponent>( |
| 9638 | &from); |
| 9639 | if (source == nullptr) { |
| 9640 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.ModifiableComponent) |
| 9641 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 9642 | } else { |
| 9643 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.ModifiableComponent) |
| 9644 | MergeFrom(*source); |
| 9645 | } |
| 9646 | } |
| 9647 | |
| 9648 | void ModifiableComponent::MergeFrom(const ModifiableComponent& from) { |
| 9649 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.ModifiableComponent) |
| 9650 | GOOGLE_DCHECK_NE(&from, this); |
| 9651 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 9652 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 9653 | (void) cached_has_bits; |
| 9654 | |
| 9655 | if (from.name().size() > 0) { |
| 9656 | |
| 9657 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
| 9658 | } |
| 9659 | if (from.alias().size() > 0) { |
| 9660 | |
| 9661 | alias_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.alias_); |
| 9662 | } |
| 9663 | if (from.asset_id().size() > 0) { |
| 9664 | |
| 9665 | asset_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.asset_id_); |
| 9666 | } |
| 9667 | if (from.has_parent()) { |
| 9668 | mutable_parent()->::dmi::Component::MergeFrom(from.parent()); |
| 9669 | } |
| 9670 | if (from.has_uri()) { |
| 9671 | mutable_uri()->::dmi::Uri::MergeFrom(from.uri()); |
| 9672 | } |
| 9673 | if (from.class_() != 0) { |
| 9674 | set_class_(from.class_()); |
| 9675 | } |
| 9676 | if (from.parent_rel_pos() != 0) { |
| 9677 | set_parent_rel_pos(from.parent_rel_pos()); |
| 9678 | } |
| 9679 | if (from.admin_state() != 0) { |
| 9680 | set_admin_state(from.admin_state()); |
| 9681 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9682 | switch (from.specific_case()) { |
| 9683 | case kPortAttr: { |
| 9684 | mutable_port_attr()->::dmi::PortComponentChangeAttributes::MergeFrom(from.port_attr()); |
| 9685 | break; |
| 9686 | } |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 9687 | case kTrxAttr: { |
| 9688 | mutable_trx_attr()->::dmi::TransceiverComponentChangeAttributes::MergeFrom(from.trx_attr()); |
| 9689 | break; |
| 9690 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9691 | case SPECIFIC_NOT_SET: { |
| 9692 | break; |
| 9693 | } |
| 9694 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 9695 | } |
| 9696 | |
| 9697 | void ModifiableComponent::CopyFrom(const ::google::protobuf::Message& from) { |
| 9698 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.ModifiableComponent) |
| 9699 | if (&from == this) return; |
| 9700 | Clear(); |
| 9701 | MergeFrom(from); |
| 9702 | } |
| 9703 | |
| 9704 | void ModifiableComponent::CopyFrom(const ModifiableComponent& from) { |
| 9705 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.ModifiableComponent) |
| 9706 | if (&from == this) return; |
| 9707 | Clear(); |
| 9708 | MergeFrom(from); |
| 9709 | } |
| 9710 | |
| 9711 | bool ModifiableComponent::IsInitialized() const { |
| 9712 | return true; |
| 9713 | } |
| 9714 | |
| 9715 | void ModifiableComponent::Swap(ModifiableComponent* other) { |
| 9716 | if (other == this) return; |
| 9717 | InternalSwap(other); |
| 9718 | } |
| 9719 | void ModifiableComponent::InternalSwap(ModifiableComponent* other) { |
| 9720 | using std::swap; |
| 9721 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 9722 | name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 9723 | GetArenaNoVirtual()); |
| 9724 | alias_.Swap(&other->alias_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 9725 | GetArenaNoVirtual()); |
| 9726 | asset_id_.Swap(&other->asset_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 9727 | GetArenaNoVirtual()); |
| 9728 | swap(parent_, other->parent_); |
| 9729 | swap(uri_, other->uri_); |
| 9730 | swap(class__, other->class__); |
| 9731 | swap(parent_rel_pos_, other->parent_rel_pos_); |
| 9732 | swap(admin_state_, other->admin_state_); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9733 | swap(specific_, other->specific_); |
| 9734 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 9735 | } |
| 9736 | |
| 9737 | ::google::protobuf::Metadata ModifiableComponent::GetMetadata() const { |
| 9738 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 9739 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 9740 | } |
| 9741 | |
| 9742 | |
| 9743 | // @@protoc_insertion_point(namespace_scope) |
| 9744 | } // namespace dmi |
| 9745 | namespace google { |
| 9746 | namespace protobuf { |
| 9747 | template<> PROTOBUF_NOINLINE ::dmi::Uuid* Arena::CreateMaybeMessage< ::dmi::Uuid >(Arena* arena) { |
| 9748 | return Arena::CreateInternal< ::dmi::Uuid >(arena); |
| 9749 | } |
| 9750 | template<> PROTOBUF_NOINLINE ::dmi::HardwareID* Arena::CreateMaybeMessage< ::dmi::HardwareID >(Arena* arena) { |
| 9751 | return Arena::CreateInternal< ::dmi::HardwareID >(arena); |
| 9752 | } |
| 9753 | template<> PROTOBUF_NOINLINE ::dmi::Uri* Arena::CreateMaybeMessage< ::dmi::Uri >(Arena* arena) { |
| 9754 | return Arena::CreateInternal< ::dmi::Uri >(arena); |
| 9755 | } |
| 9756 | template<> PROTOBUF_NOINLINE ::dmi::ComponentState* Arena::CreateMaybeMessage< ::dmi::ComponentState >(Arena* arena) { |
| 9757 | return Arena::CreateInternal< ::dmi::ComponentState >(arena); |
| 9758 | } |
| 9759 | template<> PROTOBUF_NOINLINE ::dmi::ComponentSensorData* Arena::CreateMaybeMessage< ::dmi::ComponentSensorData >(Arena* arena) { |
| 9760 | return Arena::CreateInternal< ::dmi::ComponentSensorData >(arena); |
| 9761 | } |
| 9762 | template<> PROTOBUF_NOINLINE ::dmi::PortComponentAttributes* Arena::CreateMaybeMessage< ::dmi::PortComponentAttributes >(Arena* arena) { |
| 9763 | return Arena::CreateInternal< ::dmi::PortComponentAttributes >(arena); |
| 9764 | } |
Abhilash laxmeshwar | d4a9fa3 | 2023-09-15 16:10:22 +0530 | [diff] [blame^] | 9765 | template<> PROTOBUF_NOINLINE ::dmi::PonDistance* Arena::CreateMaybeMessage< ::dmi::PonDistance >(Arena* arena) { |
| 9766 | return Arena::CreateInternal< ::dmi::PonDistance >(arena); |
| 9767 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9768 | template<> PROTOBUF_NOINLINE ::dmi::PortComponentChangeAttributes* Arena::CreateMaybeMessage< ::dmi::PortComponentChangeAttributes >(Arena* arena) { |
| 9769 | return Arena::CreateInternal< ::dmi::PortComponentChangeAttributes >(arena); |
| 9770 | } |
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 9771 | template<> PROTOBUF_NOINLINE ::dmi::TransceiverComponentChangeAttributes* Arena::CreateMaybeMessage< ::dmi::TransceiverComponentChangeAttributes >(Arena* arena) { |
| 9772 | return Arena::CreateInternal< ::dmi::TransceiverComponentChangeAttributes >(arena); |
| 9773 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 9774 | template<> PROTOBUF_NOINLINE ::dmi::PonIdConfig* Arena::CreateMaybeMessage< ::dmi::PonIdConfig >(Arena* arena) { |
| 9775 | return Arena::CreateInternal< ::dmi::PonIdConfig >(arena); |
| 9776 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 9777 | template<> PROTOBUF_NOINLINE ::dmi::ContainerComponentAttributes* Arena::CreateMaybeMessage< ::dmi::ContainerComponentAttributes >(Arena* arena) { |
| 9778 | return Arena::CreateInternal< ::dmi::ContainerComponentAttributes >(arena); |
| 9779 | } |
| 9780 | template<> PROTOBUF_NOINLINE ::dmi::PsuComponentAttributes* Arena::CreateMaybeMessage< ::dmi::PsuComponentAttributes >(Arena* arena) { |
| 9781 | return Arena::CreateInternal< ::dmi::PsuComponentAttributes >(arena); |
| 9782 | } |
| 9783 | template<> PROTOBUF_NOINLINE ::dmi::TransceiverComponentsAttributes* Arena::CreateMaybeMessage< ::dmi::TransceiverComponentsAttributes >(Arena* arena) { |
| 9784 | return Arena::CreateInternal< ::dmi::TransceiverComponentsAttributes >(arena); |
| 9785 | } |
| 9786 | template<> PROTOBUF_NOINLINE ::dmi::Component* Arena::CreateMaybeMessage< ::dmi::Component >(Arena* arena) { |
| 9787 | return Arena::CreateInternal< ::dmi::Component >(arena); |
| 9788 | } |
| 9789 | template<> PROTOBUF_NOINLINE ::dmi::Hardware* Arena::CreateMaybeMessage< ::dmi::Hardware >(Arena* arena) { |
| 9790 | return Arena::CreateInternal< ::dmi::Hardware >(arena); |
| 9791 | } |
| 9792 | template<> PROTOBUF_NOINLINE ::dmi::ModifiableComponent* Arena::CreateMaybeMessage< ::dmi::ModifiableComponent >(Arena* arena) { |
| 9793 | return Arena::CreateInternal< ::dmi::ModifiableComponent >(arena); |
| 9794 | } |
| 9795 | } // namespace protobuf |
| 9796 | } // namespace google |
| 9797 | |
| 9798 | // @@protoc_insertion_point(global_scope) |
| 9799 | #include <google/protobuf/port_undef.inc> |