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; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 20 | 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] | 21 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PsuComponentAttributes_dmi_2fhw_2eproto; |
| 22 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TransceiverComponentsAttributes_dmi_2fhw_2eproto; |
| 23 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Uri_dmi_2fhw_2eproto; |
| 24 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Uuid_dmi_2fhw_2eproto; |
| 25 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ComponentSensorData_dmi_2fhw_2eproto; |
| 26 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ComponentState_dmi_2fhw_2eproto; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 27 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_PortComponentAttributes_dmi_2fhw_2eproto; |
| 28 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 29 | extern PROTOBUF_INTERNAL_EXPORT_dmi_2fhw_2eproto ::google::protobuf::internal::SCCInfo<9> scc_info_Component_dmi_2fhw_2eproto; |
| 30 | extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto; |
| 31 | namespace dmi { |
| 32 | class UuidDefaultTypeInternal { |
| 33 | public: |
| 34 | ::google::protobuf::internal::ExplicitlyConstructed<Uuid> _instance; |
| 35 | } _Uuid_default_instance_; |
| 36 | class HardwareIDDefaultTypeInternal { |
| 37 | public: |
| 38 | ::google::protobuf::internal::ExplicitlyConstructed<HardwareID> _instance; |
| 39 | } _HardwareID_default_instance_; |
| 40 | class UriDefaultTypeInternal { |
| 41 | public: |
| 42 | ::google::protobuf::internal::ExplicitlyConstructed<Uri> _instance; |
| 43 | } _Uri_default_instance_; |
| 44 | class ComponentStateDefaultTypeInternal { |
| 45 | public: |
| 46 | ::google::protobuf::internal::ExplicitlyConstructed<ComponentState> _instance; |
| 47 | } _ComponentState_default_instance_; |
| 48 | class ComponentSensorDataDefaultTypeInternal { |
| 49 | public: |
| 50 | ::google::protobuf::internal::ExplicitlyConstructed<ComponentSensorData> _instance; |
| 51 | } _ComponentSensorData_default_instance_; |
| 52 | class PortComponentAttributesDefaultTypeInternal { |
| 53 | public: |
| 54 | ::google::protobuf::internal::ExplicitlyConstructed<PortComponentAttributes> _instance; |
| 55 | } _PortComponentAttributes_default_instance_; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 56 | class PortComponentChangeAttributesDefaultTypeInternal { |
| 57 | public: |
| 58 | ::google::protobuf::internal::ExplicitlyConstructed<PortComponentChangeAttributes> _instance; |
| 59 | } _PortComponentChangeAttributes_default_instance_; |
| 60 | class PonIdConfigDefaultTypeInternal { |
| 61 | public: |
| 62 | ::google::protobuf::internal::ExplicitlyConstructed<PonIdConfig> _instance; |
| 63 | } _PonIdConfig_default_instance_; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 64 | class ContainerComponentAttributesDefaultTypeInternal { |
| 65 | public: |
| 66 | ::google::protobuf::internal::ExplicitlyConstructed<ContainerComponentAttributes> _instance; |
| 67 | } _ContainerComponentAttributes_default_instance_; |
| 68 | class PsuComponentAttributesDefaultTypeInternal { |
| 69 | public: |
| 70 | ::google::protobuf::internal::ExplicitlyConstructed<PsuComponentAttributes> _instance; |
| 71 | } _PsuComponentAttributes_default_instance_; |
| 72 | class TransceiverComponentsAttributesDefaultTypeInternal { |
| 73 | public: |
| 74 | ::google::protobuf::internal::ExplicitlyConstructed<TransceiverComponentsAttributes> _instance; |
| 75 | } _TransceiverComponentsAttributes_default_instance_; |
| 76 | class ComponentDefaultTypeInternal { |
| 77 | public: |
| 78 | ::google::protobuf::internal::ExplicitlyConstructed<Component> _instance; |
| 79 | const ::dmi::PortComponentAttributes* port_attr_; |
| 80 | const ::dmi::ContainerComponentAttributes* container_attr_; |
| 81 | const ::dmi::PsuComponentAttributes* psu_attr_; |
| 82 | const ::dmi::TransceiverComponentsAttributes* transceiver_attr_; |
| 83 | } _Component_default_instance_; |
| 84 | class HardwareDefaultTypeInternal { |
| 85 | public: |
| 86 | ::google::protobuf::internal::ExplicitlyConstructed<Hardware> _instance; |
| 87 | } _Hardware_default_instance_; |
| 88 | class ModifiableComponentDefaultTypeInternal { |
| 89 | public: |
| 90 | ::google::protobuf::internal::ExplicitlyConstructed<ModifiableComponent> _instance; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 91 | const ::dmi::PortComponentChangeAttributes* port_attr_; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 92 | } _ModifiableComponent_default_instance_; |
| 93 | } // namespace dmi |
| 94 | static void InitDefaultsUuid_dmi_2fhw_2eproto() { |
| 95 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 96 | |
| 97 | { |
| 98 | void* ptr = &::dmi::_Uuid_default_instance_; |
| 99 | new (ptr) ::dmi::Uuid(); |
| 100 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 101 | } |
| 102 | ::dmi::Uuid::InitAsDefaultInstance(); |
| 103 | } |
| 104 | |
| 105 | ::google::protobuf::internal::SCCInfo<0> scc_info_Uuid_dmi_2fhw_2eproto = |
| 106 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsUuid_dmi_2fhw_2eproto}, {}}; |
| 107 | |
| 108 | static void InitDefaultsHardwareID_dmi_2fhw_2eproto() { |
| 109 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 110 | |
| 111 | { |
| 112 | void* ptr = &::dmi::_HardwareID_default_instance_; |
| 113 | new (ptr) ::dmi::HardwareID(); |
| 114 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 115 | } |
| 116 | ::dmi::HardwareID::InitAsDefaultInstance(); |
| 117 | } |
| 118 | |
| 119 | ::google::protobuf::internal::SCCInfo<1> scc_info_HardwareID_dmi_2fhw_2eproto = |
| 120 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsHardwareID_dmi_2fhw_2eproto}, { |
| 121 | &scc_info_Uuid_dmi_2fhw_2eproto.base,}}; |
| 122 | |
| 123 | static void InitDefaultsUri_dmi_2fhw_2eproto() { |
| 124 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 125 | |
| 126 | { |
| 127 | void* ptr = &::dmi::_Uri_default_instance_; |
| 128 | new (ptr) ::dmi::Uri(); |
| 129 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 130 | } |
| 131 | ::dmi::Uri::InitAsDefaultInstance(); |
| 132 | } |
| 133 | |
| 134 | ::google::protobuf::internal::SCCInfo<0> scc_info_Uri_dmi_2fhw_2eproto = |
| 135 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsUri_dmi_2fhw_2eproto}, {}}; |
| 136 | |
| 137 | static void InitDefaultsComponentState_dmi_2fhw_2eproto() { |
| 138 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 139 | |
| 140 | { |
| 141 | void* ptr = &::dmi::_ComponentState_default_instance_; |
| 142 | new (ptr) ::dmi::ComponentState(); |
| 143 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 144 | } |
| 145 | ::dmi::ComponentState::InitAsDefaultInstance(); |
| 146 | } |
| 147 | |
| 148 | ::google::protobuf::internal::SCCInfo<1> scc_info_ComponentState_dmi_2fhw_2eproto = |
| 149 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsComponentState_dmi_2fhw_2eproto}, { |
| 150 | &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}}; |
| 151 | |
| 152 | static void InitDefaultsComponentSensorData_dmi_2fhw_2eproto() { |
| 153 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 154 | |
| 155 | { |
| 156 | void* ptr = &::dmi::_ComponentSensorData_default_instance_; |
| 157 | new (ptr) ::dmi::ComponentSensorData(); |
| 158 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 159 | } |
| 160 | ::dmi::ComponentSensorData::InitAsDefaultInstance(); |
| 161 | } |
| 162 | |
| 163 | ::google::protobuf::internal::SCCInfo<1> scc_info_ComponentSensorData_dmi_2fhw_2eproto = |
| 164 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsComponentSensorData_dmi_2fhw_2eproto}, { |
| 165 | &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}}; |
| 166 | |
| 167 | static void InitDefaultsPortComponentAttributes_dmi_2fhw_2eproto() { |
| 168 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 169 | |
| 170 | { |
| 171 | void* ptr = &::dmi::_PortComponentAttributes_default_instance_; |
| 172 | new (ptr) ::dmi::PortComponentAttributes(); |
| 173 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 174 | } |
| 175 | ::dmi::PortComponentAttributes::InitAsDefaultInstance(); |
| 176 | } |
| 177 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 178 | ::google::protobuf::internal::SCCInfo<1> scc_info_PortComponentAttributes_dmi_2fhw_2eproto = |
| 179 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsPortComponentAttributes_dmi_2fhw_2eproto}, { |
| 180 | &scc_info_PonIdConfig_dmi_2fhw_2eproto.base,}}; |
| 181 | |
| 182 | static void InitDefaultsPortComponentChangeAttributes_dmi_2fhw_2eproto() { |
| 183 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 184 | |
| 185 | { |
| 186 | void* ptr = &::dmi::_PortComponentChangeAttributes_default_instance_; |
| 187 | new (ptr) ::dmi::PortComponentChangeAttributes(); |
| 188 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 189 | } |
| 190 | ::dmi::PortComponentChangeAttributes::InitAsDefaultInstance(); |
| 191 | } |
| 192 | |
| 193 | ::google::protobuf::internal::SCCInfo<1> scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto = |
| 194 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsPortComponentChangeAttributes_dmi_2fhw_2eproto}, { |
| 195 | &scc_info_PonIdConfig_dmi_2fhw_2eproto.base,}}; |
| 196 | |
| 197 | static void InitDefaultsPonIdConfig_dmi_2fhw_2eproto() { |
| 198 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 199 | |
| 200 | { |
| 201 | void* ptr = &::dmi::_PonIdConfig_default_instance_; |
| 202 | new (ptr) ::dmi::PonIdConfig(); |
| 203 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 204 | } |
| 205 | ::dmi::PonIdConfig::InitAsDefaultInstance(); |
| 206 | } |
| 207 | |
| 208 | ::google::protobuf::internal::SCCInfo<0> scc_info_PonIdConfig_dmi_2fhw_2eproto = |
| 209 | {{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] | 210 | |
| 211 | static void InitDefaultsContainerComponentAttributes_dmi_2fhw_2eproto() { |
| 212 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 213 | |
| 214 | { |
| 215 | void* ptr = &::dmi::_ContainerComponentAttributes_default_instance_; |
| 216 | new (ptr) ::dmi::ContainerComponentAttributes(); |
| 217 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 218 | } |
| 219 | ::dmi::ContainerComponentAttributes::InitAsDefaultInstance(); |
| 220 | } |
| 221 | |
| 222 | ::google::protobuf::internal::SCCInfo<0> scc_info_ContainerComponentAttributes_dmi_2fhw_2eproto = |
| 223 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsContainerComponentAttributes_dmi_2fhw_2eproto}, {}}; |
| 224 | |
| 225 | static void InitDefaultsPsuComponentAttributes_dmi_2fhw_2eproto() { |
| 226 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 227 | |
| 228 | { |
| 229 | void* ptr = &::dmi::_PsuComponentAttributes_default_instance_; |
| 230 | new (ptr) ::dmi::PsuComponentAttributes(); |
| 231 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 232 | } |
| 233 | ::dmi::PsuComponentAttributes::InitAsDefaultInstance(); |
| 234 | } |
| 235 | |
| 236 | ::google::protobuf::internal::SCCInfo<0> scc_info_PsuComponentAttributes_dmi_2fhw_2eproto = |
| 237 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPsuComponentAttributes_dmi_2fhw_2eproto}, {}}; |
| 238 | |
| 239 | static void InitDefaultsTransceiverComponentsAttributes_dmi_2fhw_2eproto() { |
| 240 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 241 | |
| 242 | { |
| 243 | void* ptr = &::dmi::_TransceiverComponentsAttributes_default_instance_; |
| 244 | new (ptr) ::dmi::TransceiverComponentsAttributes(); |
| 245 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 246 | } |
| 247 | ::dmi::TransceiverComponentsAttributes::InitAsDefaultInstance(); |
| 248 | } |
| 249 | |
| 250 | ::google::protobuf::internal::SCCInfo<0> scc_info_TransceiverComponentsAttributes_dmi_2fhw_2eproto = |
| 251 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTransceiverComponentsAttributes_dmi_2fhw_2eproto}, {}}; |
| 252 | |
| 253 | static void InitDefaultsComponent_dmi_2fhw_2eproto() { |
| 254 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 255 | |
| 256 | { |
| 257 | void* ptr = &::dmi::_Component_default_instance_; |
| 258 | new (ptr) ::dmi::Component(); |
| 259 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 260 | } |
| 261 | ::dmi::Component::InitAsDefaultInstance(); |
| 262 | } |
| 263 | |
| 264 | ::google::protobuf::internal::SCCInfo<9> scc_info_Component_dmi_2fhw_2eproto = |
| 265 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 9, InitDefaultsComponent_dmi_2fhw_2eproto}, { |
| 266 | &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base, |
| 267 | &scc_info_Uri_dmi_2fhw_2eproto.base, |
| 268 | &scc_info_Uuid_dmi_2fhw_2eproto.base, |
| 269 | &scc_info_ComponentState_dmi_2fhw_2eproto.base, |
| 270 | &scc_info_ComponentSensorData_dmi_2fhw_2eproto.base, |
| 271 | &scc_info_PortComponentAttributes_dmi_2fhw_2eproto.base, |
| 272 | &scc_info_ContainerComponentAttributes_dmi_2fhw_2eproto.base, |
| 273 | &scc_info_PsuComponentAttributes_dmi_2fhw_2eproto.base, |
| 274 | &scc_info_TransceiverComponentsAttributes_dmi_2fhw_2eproto.base,}}; |
| 275 | |
| 276 | static void InitDefaultsHardware_dmi_2fhw_2eproto() { |
| 277 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 278 | |
| 279 | { |
| 280 | void* ptr = &::dmi::_Hardware_default_instance_; |
| 281 | new (ptr) ::dmi::Hardware(); |
| 282 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 283 | } |
| 284 | ::dmi::Hardware::InitAsDefaultInstance(); |
| 285 | } |
| 286 | |
| 287 | ::google::protobuf::internal::SCCInfo<2> scc_info_Hardware_dmi_2fhw_2eproto = |
| 288 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsHardware_dmi_2fhw_2eproto}, { |
| 289 | &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base, |
| 290 | &scc_info_Component_dmi_2fhw_2eproto.base,}}; |
| 291 | |
| 292 | static void InitDefaultsModifiableComponent_dmi_2fhw_2eproto() { |
| 293 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
| 294 | |
| 295 | { |
| 296 | void* ptr = &::dmi::_ModifiableComponent_default_instance_; |
| 297 | new (ptr) ::dmi::ModifiableComponent(); |
| 298 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
| 299 | } |
| 300 | ::dmi::ModifiableComponent::InitAsDefaultInstance(); |
| 301 | } |
| 302 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 303 | ::google::protobuf::internal::SCCInfo<3> scc_info_ModifiableComponent_dmi_2fhw_2eproto = |
| 304 | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsModifiableComponent_dmi_2fhw_2eproto}, { |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 305 | &scc_info_Component_dmi_2fhw_2eproto.base, |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 306 | &scc_info_Uri_dmi_2fhw_2eproto.base, |
| 307 | &scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto.base,}}; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 308 | |
| 309 | void InitDefaults_dmi_2fhw_2eproto() { |
| 310 | ::google::protobuf::internal::InitSCC(&scc_info_Uuid_dmi_2fhw_2eproto.base); |
| 311 | ::google::protobuf::internal::InitSCC(&scc_info_HardwareID_dmi_2fhw_2eproto.base); |
| 312 | ::google::protobuf::internal::InitSCC(&scc_info_Uri_dmi_2fhw_2eproto.base); |
| 313 | ::google::protobuf::internal::InitSCC(&scc_info_ComponentState_dmi_2fhw_2eproto.base); |
| 314 | ::google::protobuf::internal::InitSCC(&scc_info_ComponentSensorData_dmi_2fhw_2eproto.base); |
| 315 | ::google::protobuf::internal::InitSCC(&scc_info_PortComponentAttributes_dmi_2fhw_2eproto.base); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 316 | ::google::protobuf::internal::InitSCC(&scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto.base); |
| 317 | ::google::protobuf::internal::InitSCC(&scc_info_PonIdConfig_dmi_2fhw_2eproto.base); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 318 | ::google::protobuf::internal::InitSCC(&scc_info_ContainerComponentAttributes_dmi_2fhw_2eproto.base); |
| 319 | ::google::protobuf::internal::InitSCC(&scc_info_PsuComponentAttributes_dmi_2fhw_2eproto.base); |
| 320 | ::google::protobuf::internal::InitSCC(&scc_info_TransceiverComponentsAttributes_dmi_2fhw_2eproto.base); |
| 321 | ::google::protobuf::internal::InitSCC(&scc_info_Component_dmi_2fhw_2eproto.base); |
| 322 | ::google::protobuf::internal::InitSCC(&scc_info_Hardware_dmi_2fhw_2eproto.base); |
| 323 | ::google::protobuf::internal::InitSCC(&scc_info_ModifiableComponent_dmi_2fhw_2eproto.base); |
| 324 | } |
| 325 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 326 | ::google::protobuf::Metadata file_level_metadata_dmi_2fhw_2eproto[14]; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 327 | const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_dmi_2fhw_2eproto[15]; |
| 328 | constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_dmi_2fhw_2eproto = nullptr; |
| 329 | |
| 330 | const ::google::protobuf::uint32 TableStruct_dmi_2fhw_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
| 331 | ~0u, // no _has_bits_ |
| 332 | PROTOBUF_FIELD_OFFSET(::dmi::Uuid, _internal_metadata_), |
| 333 | ~0u, // no _extensions_ |
| 334 | ~0u, // no _oneof_case_ |
| 335 | ~0u, // no _weak_field_map_ |
| 336 | PROTOBUF_FIELD_OFFSET(::dmi::Uuid, uuid_), |
| 337 | ~0u, // no _has_bits_ |
| 338 | PROTOBUF_FIELD_OFFSET(::dmi::HardwareID, _internal_metadata_), |
| 339 | ~0u, // no _extensions_ |
| 340 | ~0u, // no _oneof_case_ |
| 341 | ~0u, // no _weak_field_map_ |
| 342 | PROTOBUF_FIELD_OFFSET(::dmi::HardwareID, uuid_), |
| 343 | ~0u, // no _has_bits_ |
| 344 | PROTOBUF_FIELD_OFFSET(::dmi::Uri, _internal_metadata_), |
| 345 | ~0u, // no _extensions_ |
| 346 | ~0u, // no _oneof_case_ |
| 347 | ~0u, // no _weak_field_map_ |
| 348 | PROTOBUF_FIELD_OFFSET(::dmi::Uri, uri_), |
| 349 | ~0u, // no _has_bits_ |
| 350 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, _internal_metadata_), |
| 351 | ~0u, // no _extensions_ |
| 352 | ~0u, // no _oneof_case_ |
| 353 | ~0u, // no _weak_field_map_ |
| 354 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, state_last_changed_), |
| 355 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, admin_state_), |
| 356 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, oper_state_), |
| 357 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, usage_state_), |
| 358 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, alarm_state_), |
| 359 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentState, standby_state_), |
| 360 | ~0u, // no _has_bits_ |
| 361 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, _internal_metadata_), |
| 362 | ~0u, // no _extensions_ |
| 363 | ~0u, // no _oneof_case_ |
| 364 | ~0u, // no _weak_field_map_ |
| 365 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, value_), |
| 366 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, type_), |
| 367 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, scale_), |
| 368 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, precision_), |
| 369 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, status_), |
| 370 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, units_display_), |
| 371 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, timestamp_), |
| 372 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, value_update_rate_), |
| 373 | PROTOBUF_FIELD_OFFSET(::dmi::ComponentSensorData, data_type_), |
| 374 | ~0u, // no _has_bits_ |
| 375 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, _internal_metadata_), |
| 376 | ~0u, // no _extensions_ |
| 377 | ~0u, // no _oneof_case_ |
| 378 | ~0u, // no _weak_field_map_ |
| 379 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, connector_type_), |
| 380 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, speed_), |
| 381 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, protocol_), |
| 382 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, physical_label_), |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 383 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, mapping_label_), |
| 384 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, pon_id_config_), |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 385 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentAttributes, speed_autonegotiation_), |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 386 | ~0u, // no _has_bits_ |
| 387 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentChangeAttributes, _internal_metadata_), |
| 388 | ~0u, // no _extensions_ |
| 389 | ~0u, // no _oneof_case_ |
| 390 | ~0u, // no _weak_field_map_ |
| 391 | PROTOBUF_FIELD_OFFSET(::dmi::PortComponentChangeAttributes, pon_id_config_), |
| 392 | ~0u, // no _has_bits_ |
| 393 | PROTOBUF_FIELD_OFFSET(::dmi::PonIdConfig, _internal_metadata_), |
| 394 | ~0u, // no _extensions_ |
| 395 | ~0u, // no _oneof_case_ |
| 396 | ~0u, // no _weak_field_map_ |
| 397 | PROTOBUF_FIELD_OFFSET(::dmi::PonIdConfig, pon_id_), |
| 398 | PROTOBUF_FIELD_OFFSET(::dmi::PonIdConfig, pon_id_transmit_periodicity_), |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 399 | ~0u, // no _has_bits_ |
| 400 | PROTOBUF_FIELD_OFFSET(::dmi::ContainerComponentAttributes, _internal_metadata_), |
| 401 | ~0u, // no _extensions_ |
| 402 | ~0u, // no _oneof_case_ |
| 403 | ~0u, // no _weak_field_map_ |
| 404 | PROTOBUF_FIELD_OFFSET(::dmi::ContainerComponentAttributes, physical_label_), |
| 405 | ~0u, // no _has_bits_ |
| 406 | PROTOBUF_FIELD_OFFSET(::dmi::PsuComponentAttributes, _internal_metadata_), |
| 407 | ~0u, // no _extensions_ |
| 408 | ~0u, // no _oneof_case_ |
| 409 | ~0u, // no _weak_field_map_ |
| 410 | PROTOBUF_FIELD_OFFSET(::dmi::PsuComponentAttributes, supported_voltage_), |
| 411 | ~0u, // no _has_bits_ |
| 412 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, _internal_metadata_), |
| 413 | ~0u, // no _extensions_ |
| 414 | ~0u, // no _oneof_case_ |
| 415 | ~0u, // no _weak_field_map_ |
| 416 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, form_factor_), |
| 417 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, trans_type_), |
| 418 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, max_distance_), |
| 419 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, max_distance_scale_), |
| 420 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, rx_wavelength_), |
| 421 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, tx_wavelength_), |
| 422 | PROTOBUF_FIELD_OFFSET(::dmi::TransceiverComponentsAttributes, wavelength_scale_), |
| 423 | ~0u, // no _has_bits_ |
| 424 | PROTOBUF_FIELD_OFFSET(::dmi::Component, _internal_metadata_), |
| 425 | ~0u, // no _extensions_ |
| 426 | PROTOBUF_FIELD_OFFSET(::dmi::Component, _oneof_case_[0]), |
| 427 | ~0u, // no _weak_field_map_ |
| 428 | PROTOBUF_FIELD_OFFSET(::dmi::Component, name_), |
| 429 | PROTOBUF_FIELD_OFFSET(::dmi::Component, class__), |
| 430 | PROTOBUF_FIELD_OFFSET(::dmi::Component, description_), |
| 431 | PROTOBUF_FIELD_OFFSET(::dmi::Component, parent_), |
| 432 | PROTOBUF_FIELD_OFFSET(::dmi::Component, parent_rel_pos_), |
| 433 | PROTOBUF_FIELD_OFFSET(::dmi::Component, children_), |
| 434 | PROTOBUF_FIELD_OFFSET(::dmi::Component, hardware_rev_), |
| 435 | PROTOBUF_FIELD_OFFSET(::dmi::Component, firmware_rev_), |
| 436 | PROTOBUF_FIELD_OFFSET(::dmi::Component, software_rev_), |
| 437 | PROTOBUF_FIELD_OFFSET(::dmi::Component, serial_num_), |
| 438 | PROTOBUF_FIELD_OFFSET(::dmi::Component, mfg_name_), |
| 439 | PROTOBUF_FIELD_OFFSET(::dmi::Component, model_name_), |
| 440 | PROTOBUF_FIELD_OFFSET(::dmi::Component, alias_), |
| 441 | PROTOBUF_FIELD_OFFSET(::dmi::Component, asset_id_), |
| 442 | PROTOBUF_FIELD_OFFSET(::dmi::Component, is_fru_), |
| 443 | PROTOBUF_FIELD_OFFSET(::dmi::Component, mfg_date_), |
| 444 | PROTOBUF_FIELD_OFFSET(::dmi::Component, uri_), |
| 445 | PROTOBUF_FIELD_OFFSET(::dmi::Component, uuid_), |
| 446 | PROTOBUF_FIELD_OFFSET(::dmi::Component, state_), |
| 447 | PROTOBUF_FIELD_OFFSET(::dmi::Component, sensor_data_), |
| 448 | offsetof(::dmi::ComponentDefaultTypeInternal, port_attr_), |
| 449 | offsetof(::dmi::ComponentDefaultTypeInternal, container_attr_), |
| 450 | offsetof(::dmi::ComponentDefaultTypeInternal, psu_attr_), |
| 451 | offsetof(::dmi::ComponentDefaultTypeInternal, transceiver_attr_), |
| 452 | PROTOBUF_FIELD_OFFSET(::dmi::Component, specific_), |
| 453 | ~0u, // no _has_bits_ |
| 454 | PROTOBUF_FIELD_OFFSET(::dmi::Hardware, _internal_metadata_), |
| 455 | ~0u, // no _extensions_ |
| 456 | ~0u, // no _oneof_case_ |
| 457 | ~0u, // no _weak_field_map_ |
| 458 | PROTOBUF_FIELD_OFFSET(::dmi::Hardware, last_change_), |
| 459 | PROTOBUF_FIELD_OFFSET(::dmi::Hardware, root_), |
| 460 | PROTOBUF_FIELD_OFFSET(::dmi::Hardware, last_booted_), |
| 461 | ~0u, // no _has_bits_ |
| 462 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, _internal_metadata_), |
| 463 | ~0u, // no _extensions_ |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 464 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, _oneof_case_[0]), |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 465 | ~0u, // no _weak_field_map_ |
| 466 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, name_), |
| 467 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, class__), |
| 468 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, parent_), |
| 469 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, parent_rel_pos_), |
| 470 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, alias_), |
| 471 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, asset_id_), |
| 472 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, uri_), |
| 473 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, admin_state_), |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 474 | offsetof(::dmi::ModifiableComponentDefaultTypeInternal, port_attr_), |
| 475 | PROTOBUF_FIELD_OFFSET(::dmi::ModifiableComponent, specific_), |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 476 | }; |
| 477 | static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
| 478 | { 0, -1, sizeof(::dmi::Uuid)}, |
| 479 | { 6, -1, sizeof(::dmi::HardwareID)}, |
| 480 | { 12, -1, sizeof(::dmi::Uri)}, |
| 481 | { 18, -1, sizeof(::dmi::ComponentState)}, |
| 482 | { 29, -1, sizeof(::dmi::ComponentSensorData)}, |
| 483 | { 43, -1, sizeof(::dmi::PortComponentAttributes)}, |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 484 | { 55, -1, sizeof(::dmi::PortComponentChangeAttributes)}, |
| 485 | { 61, -1, sizeof(::dmi::PonIdConfig)}, |
| 486 | { 68, -1, sizeof(::dmi::ContainerComponentAttributes)}, |
| 487 | { 74, -1, sizeof(::dmi::PsuComponentAttributes)}, |
| 488 | { 80, -1, sizeof(::dmi::TransceiverComponentsAttributes)}, |
| 489 | { 92, -1, sizeof(::dmi::Component)}, |
| 490 | { 122, -1, sizeof(::dmi::Hardware)}, |
| 491 | { 130, -1, sizeof(::dmi::ModifiableComponent)}, |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 492 | }; |
| 493 | |
| 494 | static ::google::protobuf::Message const * const file_default_instances[] = { |
| 495 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_Uuid_default_instance_), |
| 496 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_HardwareID_default_instance_), |
| 497 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_Uri_default_instance_), |
| 498 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_ComponentState_default_instance_), |
| 499 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_ComponentSensorData_default_instance_), |
| 500 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_PortComponentAttributes_default_instance_), |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 501 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_PortComponentChangeAttributes_default_instance_), |
| 502 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_PonIdConfig_default_instance_), |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 503 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_ContainerComponentAttributes_default_instance_), |
| 504 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_PsuComponentAttributes_default_instance_), |
| 505 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_TransceiverComponentsAttributes_default_instance_), |
| 506 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_Component_default_instance_), |
| 507 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_Hardware_default_instance_), |
| 508 | reinterpret_cast<const ::google::protobuf::Message*>(&::dmi::_ModifiableComponent_default_instance_), |
| 509 | }; |
| 510 | |
| 511 | ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_dmi_2fhw_2eproto = { |
| 512 | {}, AddDescriptors_dmi_2fhw_2eproto, "dmi/hw.proto", schemas, |
| 513 | file_default_instances, TableStruct_dmi_2fhw_2eproto::offsets, |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 514 | file_level_metadata_dmi_2fhw_2eproto, 14, 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] | 515 | }; |
| 516 | |
| 517 | const char descriptor_table_protodef_dmi_2fhw_2eproto[] = |
| 518 | "\n\014dmi/hw.proto\022\003dmi\032\037google/protobuf/tim" |
| 519 | "estamp.proto\"\024\n\004Uuid\022\014\n\004uuid\030\001 \001(\t\"%\n\nHa" |
| 520 | "rdwareID\022\027\n\004uuid\030\001 \001(\0132\t.dmi.Uuid\"\022\n\003Uri" |
| 521 | "\022\013\n\003uri\030\001 \001(\t\"\265\002\n\016ComponentState\0226\n\022stat" |
| 522 | "e_last_changed\030\001 \001(\0132\032.google.protobuf.T" |
| 523 | "imestamp\022-\n\013admin_state\030\002 \001(\0162\030.dmi.Comp" |
| 524 | "onentAdminState\022+\n\noper_state\030\003 \001(\0162\027.dm" |
| 525 | "i.ComponentOperState\022-\n\013usage_state\030\004 \001(" |
| 526 | "\0162\030.dmi.ComponentUsageState\022-\n\013alarm_sta" |
| 527 | "te\030\005 \001(\0162\030.dmi.ComponentAlarmState\0221\n\rst" |
| 528 | "andby_state\030\006 \001(\0162\032.dmi.ComponentStandby" |
| 529 | "State\"\220\002\n\023ComponentSensorData\022\r\n\005value\030\001" |
| 530 | " \001(\005\022 \n\004type\030\002 \001(\0162\022.dmi.DataValueType\022\036" |
| 531 | "\n\005scale\030\003 \001(\0162\017.dmi.ValueScale\022\021\n\tprecis" |
| 532 | "ion\030\004 \001(\005\022!\n\006status\030\005 \001(\0162\021.dmi.SensorSt" |
| 533 | "atus\022\025\n\runits_display\030\006 \001(\t\022-\n\ttimestamp" |
| 534 | "\030\007 \001(\0132\032.google.protobuf.Timestamp\022\031\n\021va" |
| 535 | "lue_update_rate\030\010 \001(\r\022\021\n\tdata_type\030\t \001(\t" |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 536 | "\"\341\005\n\027PortComponentAttributes\022B\n\016connecto" |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 537 | "r_type\030\001 \001(\0162*.dmi.PortComponentAttribut" |
| 538 | "es.ConnectorType\0221\n\005speed\030\002 \001(\0162\".dmi.Po" |
| 539 | "rtComponentAttributes.Speed\0227\n\010protocol\030" |
| 540 | "\003 \001(\0162%.dmi.PortComponentAttributes.Prot" |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 541 | "ocol\022\026\n\016physical_label\030\004 \001(\t\022\025\n\rmapping_" |
| 542 | "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] | 543 | ".PonIdConfig\022\035\n\025speed_autonegotiation\030\007 " |
| 544 | "\001(\010\"p\n\rConnectorType\022\034\n\030CONNECTOR_TYPE_U" |
| 545 | "NDEFINED\020\000\022\010\n\004RJ45\020\001\022\014\n\010FIBER_LC\020\002\022\017\n\013FI" |
| 546 | "BER_SC_PC\020\003\022\r\n\tFIBER_MPO\020\004\022\t\n\005RS232\020\005\"\256\001" |
| 547 | "\n\005Speed\022\023\n\017SPEED_UNDEFINED\020\000\022\013\n\007DYNAMIC\020" |
| 548 | "\001\022\r\n\tGIGABIT_1\020\002\022\016\n\nGIGABIT_10\020\003\022\016\n\nGIGA" |
| 549 | "BIT_25\020\004\022\016\n\nGIGABIT_40\020\005\022\017\n\013GIGABIT_100\020" |
| 550 | "\006\022\017\n\013GIGABIT_400\020\007\022\020\n\014MEGABIT_2500\020\010\022\020\n\014" |
| 551 | "MEGABIT_1250\020\t\"|\n\010Protocol\022\026\n\022PROTOCOL_U" |
| 552 | "NDEFINED\020\000\022\014\n\010ETHERNET\020\001\022\010\n\004GPON\020\002\022\t\n\005XG" |
| 553 | "PON\020\003\022\n\n\006XGSPON\020\004\022\t\n\005GFAST\020\005\022\n\n\006SERIAL\020\006" |
| 554 | "\022\010\n\004EPON\020\007\022\010\n\004BITS\020\010\"H\n\035PortComponentCha" |
| 555 | "ngeAttributes\022\'\n\rpon_id_config\030\001 \001(\0132\020.d" |
| 556 | "mi.PonIdConfig\"B\n\013PonIdConfig\022\016\n\006pon_id\030" |
| 557 | "\001 \001(\014\022#\n\033pon_id_transmit_periodicity\030\002 \001" |
| 558 | "(\r\"6\n\034ContainerComponentAttributes\022\026\n\016ph" |
| 559 | "ysical_label\030\001 \001(\t\"\263\001\n\026PsuComponentAttri" |
| 560 | "butes\022G\n\021supported_voltage\030\001 \001(\0162,.dmi.P" |
| 561 | "suComponentAttributes.SupportedVoltage\"P" |
| 562 | "\n\020SupportedVoltage\022\037\n\033SUPPORTED_VOLTAGE_" |
| 563 | "UNDEFINED\020\000\022\007\n\003V48\020\001\022\010\n\004V230\020\002\022\010\n\004V115\020\003" |
| 564 | "\"\357\004\n\037TransceiverComponentsAttributes\022D\n\013" |
| 565 | "form_factor\030\001 \001(\0162/.dmi.TransceiverCompo" |
| 566 | "nentsAttributes.FormFactor\022=\n\ntrans_type" |
| 567 | "\030\002 \001(\0162).dmi.TransceiverComponentsAttrib" |
| 568 | "utes.Type\022\024\n\014max_distance\030\003 \001(\r\022+\n\022max_d" |
| 569 | "istance_scale\030\004 \001(\0162\017.dmi.ValueScale\022\025\n\r" |
| 570 | "rx_wavelength\030\005 \003(\r\022\025\n\rtx_wavelength\030\006 \003" |
| 571 | "(\r\022)\n\020wavelength_scale\030\007 \001(\0162\017.dmi.Value" |
| 572 | "Scale\"\300\001\n\nFormFactor\022\027\n\023FORM_FACTOR_UNKN" |
| 573 | "OWN\020\000\022\010\n\004QSFP\020\001\022\r\n\tQSFP_PLUS\020\002\022\n\n\006QSFP28" |
| 574 | "\020\003\022\007\n\003SFP\020\004\022\014\n\010SFP_PLUS\020\005\022\007\n\003XFP\020\006\022\010\n\004CF" |
| 575 | "P4\020\007\022\010\n\004CFP2\020\010\022\010\n\004CPAK\020\t\022\006\n\002X2\020\n\022\t\n\005OTHE" |
| 576 | "R\020\013\022\007\n\003CFP\020\014\022\014\n\010CFP2_ACO\020\r\022\014\n\010CFP2_DCO\020\016" |
| 577 | "\"h\n\004Type\022\020\n\014TYPE_UNKNOWN\020\000\022\014\n\010ETHERNET\020\001" |
| 578 | "\022\010\n\004GPON\020\002\022\t\n\005XGPON\020\003\022\n\n\006XGSPON\020\004\022\010\n\004CPO" |
| 579 | "N\020\005\022\013\n\007NG_PON2\020\006\022\010\n\004EPON\020\007\"\350\005\n\tComponent" |
| 580 | "\022\014\n\004name\030\001 \001(\t\022!\n\005class\030\002 \001(\0162\022.dmi.Comp" |
| 581 | "onentType\022\023\n\013description\030\003 \001(\t\022\016\n\006parent" |
| 582 | "\030\004 \001(\t\022\026\n\016parent_rel_pos\030\005 \001(\005\022 \n\010childr" |
| 583 | "en\030\006 \003(\0132\016.dmi.Component\022\024\n\014hardware_rev" |
| 584 | "\030\007 \001(\t\022\024\n\014firmware_rev\030\010 \001(\t\022\024\n\014software" |
| 585 | "_rev\030\t \001(\t\022\022\n\nserial_num\030\n \001(\t\022\020\n\010mfg_na" |
| 586 | "me\030\013 \001(\t\022\022\n\nmodel_name\030\014 \001(\t\022\r\n\005alias\030\r " |
| 587 | "\001(\t\022\020\n\010asset_id\030\016 \001(\t\022\016\n\006is_fru\030\017 \001(\010\022,\n" |
| 588 | "\010mfg_date\030\020 \001(\0132\032.google.protobuf.Timest" |
| 589 | "amp\022\025\n\003uri\030\021 \001(\0132\010.dmi.Uri\022\027\n\004uuid\030\022 \001(\013" |
| 590 | "2\t.dmi.Uuid\022\"\n\005state\030\023 \001(\0132\023.dmi.Compone" |
| 591 | "ntState\022-\n\013sensor_data\030\024 \003(\0132\030.dmi.Compo" |
| 592 | "nentSensorData\0221\n\tport_attr\0302 \001(\0132\034.dmi." |
| 593 | "PortComponentAttributesH\000\022;\n\016container_a" |
| 594 | "ttr\0303 \001(\0132!.dmi.ContainerComponentAttrib" |
| 595 | "utesH\000\022/\n\010psu_attr\0304 \001(\0132\033.dmi.PsuCompon" |
| 596 | "entAttributesH\000\022@\n\020transceiver_attr\0305 \001(" |
| 597 | "\0132$.dmi.TransceiverComponentsAttributesH" |
| 598 | "\000B\n\n\010specific\"\212\001\n\010Hardware\022/\n\013last_chang" |
| 599 | "e\030\001 \001(\0132\032.google.protobuf.Timestamp\022\034\n\004r" |
| 600 | "oot\030\002 \001(\0132\016.dmi.Component\022/\n\013last_booted" |
| 601 | "\030\003 \001(\0132\032.google.protobuf.Timestamp\"\252\002\n\023M" |
| 602 | "odifiableComponent\022\014\n\004name\030\001 \001(\t\022!\n\005clas" |
| 603 | "s\030\002 \001(\0162\022.dmi.ComponentType\022\036\n\006parent\030\003 " |
| 604 | "\001(\0132\016.dmi.Component\022\026\n\016parent_rel_pos\030\004 " |
| 605 | "\001(\005\022\r\n\005alias\030\005 \001(\t\022\020\n\010asset_id\030\006 \001(\t\022\025\n\003" |
| 606 | "uri\030\007 \001(\0132\010.dmi.Uri\022-\n\013admin_state\030\010 \001(\016" |
| 607 | "2\030.dmi.ComponentAdminState\0227\n\tport_attr\030" |
| 608 | "2 \001(\0132\".dmi.PortComponentChangeAttribute" |
| 609 | "sH\000B\n\n\010specific*\264\003\n\rComponentType\022\034\n\030COM" |
| 610 | "PONENT_TYPE_UNDEFINED\020\000\022\032\n\026COMPONENT_TYP" |
| 611 | "E_UNKNOWN\020\001\022\032\n\026COMPONENT_TYPE_CHASSIS\020\002\022" |
| 612 | "\034\n\030COMPONENT_TYPE_BACKPLANE\020\003\022\034\n\030COMPONE" |
| 613 | "NT_TYPE_CONTAINER\020\004\022\037\n\033COMPONENT_TYPE_PO" |
| 614 | "WER_SUPPLY\020\005\022\026\n\022COMPONENT_TYPE_FAN\020\006\022\031\n\025" |
| 615 | "COMPONENT_TYPE_SENSOR\020\007\022\031\n\025COMPONENT_TYP" |
| 616 | "E_MODULE\020\010\022\027\n\023COMPONENT_TYPE_PORT\020\t\022\026\n\022C" |
| 617 | "OMPONENT_TYPE_CPU\020\n\022\032\n\026COMPONENT_TYPE_BA" |
| 618 | "TTERY\020\013\022\032\n\026COMPONENT_TYPE_STORAGE\020\014\022\031\n\025C" |
| 619 | "OMPONENT_TYPE_MEMORY\020\r\022\036\n\032COMPONENT_TYPE" |
| 620 | "_TRANSCEIVER\020\016*\263\001\n\023ComponentAdminState\022\036" |
| 621 | "\n\032COMP_ADMIN_STATE_UNDEFINED\020\000\022\034\n\030COMP_A" |
| 622 | "DMIN_STATE_UNKNOWN\020\001\022\033\n\027COMP_ADMIN_STATE" |
| 623 | "_LOCKED\020\002\022\"\n\036COMP_ADMIN_STATE_SHUTTING_D" |
| 624 | "OWN\020\003\022\035\n\031COMP_ADMIN_STATE_UNLOCKED\020\004*\250\001\n" |
| 625 | "\022ComponentOperState\022\035\n\031COMP_OPER_STATE_U" |
| 626 | "NDEFINED\020\000\022\033\n\027COMP_OPER_STATE_UNKNOWN\020\001\022" |
| 627 | "\034\n\030COMP_OPER_STATE_DISABLED\020\002\022\033\n\027COMP_OP" |
| 628 | "ER_STATE_ENABLED\020\003\022\033\n\027COMP_OPER_STATE_TE" |
| 629 | "STING\020\004*\246\001\n\023ComponentUsageState\022\036\n\032COMP_" |
| 630 | "USAGE_STATE_UNDEFINED\020\000\022\034\n\030COMP_USAGE_ST" |
| 631 | "ATE_UNKNOWN\020\001\022\031\n\025COMP_USAGE_STATE_IDLE\020\002" |
| 632 | "\022\033\n\027COMP_USAGE_STATE_ACTIVE\020\003\022\031\n\025COMP_US" |
| 633 | "AGE_STATE_BUSY\020\004*\217\002\n\023ComponentAlarmState" |
| 634 | "\022\036\n\032COMP_ALARM_STATE_UNDEFINED\020\000\022\034\n\030COMP" |
| 635 | "_ALARM_STATE_UNKNOWN\020\001\022!\n\035COMP_ALARM_STA" |
| 636 | "TE_UNDER_REPAIR\020\002\022\035\n\031COMP_ALARM_STATE_CR" |
| 637 | "ITICAL\020\003\022\032\n\026COMP_ALARM_STATE_MAJOR\020\004\022\032\n\026" |
| 638 | "COMP_ALARM_STATE_MINOR\020\005\022\034\n\030COMP_ALARM_S" |
| 639 | "TATE_WARNING\020\006\022\"\n\036COMP_ALARM_STATE_INDET" |
| 640 | "ERMINATE\020\007*\274\001\n\025ComponentStandbyState\022 \n\034" |
| 641 | "COMP_STANDBY_STATE_UNDEFINED\020\000\022\036\n\032COMP_S" |
| 642 | "TANDBY_STATE_UNKNOWN\020\001\022\032\n\026COMP_STANDBY_S" |
| 643 | "TATE_HOT\020\002\022\033\n\027COMP_STANDBY_STATE_COLD\020\003\022" |
| 644 | "(\n$COMP_STANDBY_STATE_PROVIDING_SERVICE\020" |
| 645 | "\004*\211\003\n\rDataValueType\022\030\n\024VALUE_TYPE_UNDEFI" |
| 646 | "NED\020\000\022\024\n\020VALUE_TYPE_OTHER\020\001\022\026\n\022VALUE_TYP" |
| 647 | "E_UNKNOWN\020\002\022\027\n\023VALUE_TYPE_VOLTS_AC\020\003\022\027\n\023" |
| 648 | "VALUE_TYPE_VOLTS_DC\020\004\022\026\n\022VALUE_TYPE_AMPE" |
| 649 | "RES\020\005\022\024\n\020VALUE_TYPE_WATTS\020\006\022\024\n\020VALUE_TYP" |
| 650 | "E_HERTZ\020\007\022\026\n\022VALUE_TYPE_CELSIUS\020\010\022\031\n\025VAL" |
| 651 | "UE_TYPE_PERCENT_RH\020\t\022\022\n\016VALUE_TYPE_RPM\020\n" |
| 652 | "\022\022\n\016VALUE_TYPE_CMM\020\013\022\032\n\026VALUE_TYPE_TRUTH" |
| 653 | "_VALUE\020\014\022\026\n\022VALUE_TYPE_PERCENT\020\r\022\025\n\021VALU" |
| 654 | "E_TYPE_METERS\020\016\022\024\n\020VALUE_TYPE_BYTES\020\017*\244\003" |
| 655 | "\n\nValueScale\022\031\n\025VALUE_SCALE_UNDEFINED\020\000\022" |
| 656 | "\025\n\021VALUE_SCALE_YOCTO\020\001\022\025\n\021VALUE_SCALE_ZE" |
| 657 | "PTO\020\002\022\024\n\020VALUE_SCALE_ATTO\020\003\022\025\n\021VALUE_SCA" |
| 658 | "LE_FEMTO\020\004\022\024\n\020VALUE_SCALE_PICO\020\005\022\024\n\020VALU" |
| 659 | "E_SCALE_NANO\020\006\022\025\n\021VALUE_SCALE_MICRO\020\007\022\025\n" |
| 660 | "\021VALUE_SCALE_MILLI\020\010\022\025\n\021VALUE_SCALE_UNIT" |
| 661 | "S\020\t\022\024\n\020VALUE_SCALE_KILO\020\n\022\024\n\020VALUE_SCALE" |
| 662 | "_MEGA\020\013\022\024\n\020VALUE_SCALE_GIGA\020\014\022\024\n\020VALUE_S" |
| 663 | "CALE_TERA\020\r\022\024\n\020VALUE_SCALE_PETA\020\016\022\023\n\017VAL" |
| 664 | "UE_SCALE_EXA\020\017\022\025\n\021VALUE_SCALE_ZETTA\020\020\022\025\n" |
| 665 | "\021VALUE_SCALE_YOTTA\020\021*\202\001\n\014SensorStatus\022\033\n" |
| 666 | "\027SENSOR_STATUS_UNDEFINED\020\000\022\024\n\020SENSOR_STA" |
| 667 | "TUS_OK\020\001\022\035\n\031SENSOR_STATUS_UNAVAILABLE\020\002\022" |
| 668 | " \n\034SENSOR_STATUS_NONOPERATIONAL\020\003B;Z9git" |
| 669 | "hub.com/opencord/device-management-inter" |
| 670 | "face/v3/go/dmib\006proto3" |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 671 | ; |
| 672 | ::google::protobuf::internal::DescriptorTable descriptor_table_dmi_2fhw_2eproto = { |
| 673 | false, InitDefaults_dmi_2fhw_2eproto, |
| 674 | descriptor_table_protodef_dmi_2fhw_2eproto, |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 675 | "dmi/hw.proto", &assign_descriptors_table_dmi_2fhw_2eproto, 6102, |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 676 | }; |
| 677 | |
| 678 | void AddDescriptors_dmi_2fhw_2eproto() { |
| 679 | static constexpr ::google::protobuf::internal::InitFunc deps[1] = |
| 680 | { |
| 681 | ::AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto, |
| 682 | }; |
| 683 | ::google::protobuf::internal::AddDescriptors(&descriptor_table_dmi_2fhw_2eproto, deps, 1); |
| 684 | } |
| 685 | |
| 686 | // Force running AddDescriptors() at dynamic initialization time. |
| 687 | static bool dynamic_init_dummy_dmi_2fhw_2eproto = []() { AddDescriptors_dmi_2fhw_2eproto(); return true; }(); |
| 688 | namespace dmi { |
| 689 | const ::google::protobuf::EnumDescriptor* PortComponentAttributes_ConnectorType_descriptor() { |
| 690 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 691 | return file_level_enum_descriptors_dmi_2fhw_2eproto[0]; |
| 692 | } |
| 693 | bool PortComponentAttributes_ConnectorType_IsValid(int value) { |
| 694 | switch (value) { |
| 695 | case 0: |
| 696 | case 1: |
| 697 | case 2: |
| 698 | case 3: |
| 699 | case 4: |
| 700 | case 5: |
| 701 | return true; |
| 702 | default: |
| 703 | return false; |
| 704 | } |
| 705 | } |
| 706 | |
| 707 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 708 | const PortComponentAttributes_ConnectorType PortComponentAttributes::CONNECTOR_TYPE_UNDEFINED; |
| 709 | const PortComponentAttributes_ConnectorType PortComponentAttributes::RJ45; |
| 710 | const PortComponentAttributes_ConnectorType PortComponentAttributes::FIBER_LC; |
| 711 | const PortComponentAttributes_ConnectorType PortComponentAttributes::FIBER_SC_PC; |
| 712 | const PortComponentAttributes_ConnectorType PortComponentAttributes::FIBER_MPO; |
| 713 | const PortComponentAttributes_ConnectorType PortComponentAttributes::RS232; |
| 714 | const PortComponentAttributes_ConnectorType PortComponentAttributes::ConnectorType_MIN; |
| 715 | const PortComponentAttributes_ConnectorType PortComponentAttributes::ConnectorType_MAX; |
| 716 | const int PortComponentAttributes::ConnectorType_ARRAYSIZE; |
| 717 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 718 | const ::google::protobuf::EnumDescriptor* PortComponentAttributes_Speed_descriptor() { |
| 719 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 720 | return file_level_enum_descriptors_dmi_2fhw_2eproto[1]; |
| 721 | } |
| 722 | bool PortComponentAttributes_Speed_IsValid(int value) { |
| 723 | switch (value) { |
| 724 | case 0: |
| 725 | case 1: |
| 726 | case 2: |
| 727 | case 3: |
| 728 | case 4: |
| 729 | case 5: |
| 730 | case 6: |
| 731 | case 7: |
| 732 | case 8: |
| 733 | case 9: |
| 734 | return true; |
| 735 | default: |
| 736 | return false; |
| 737 | } |
| 738 | } |
| 739 | |
| 740 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 741 | const PortComponentAttributes_Speed PortComponentAttributes::SPEED_UNDEFINED; |
| 742 | const PortComponentAttributes_Speed PortComponentAttributes::DYNAMIC; |
| 743 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_1; |
| 744 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_10; |
| 745 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_25; |
| 746 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_40; |
| 747 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_100; |
| 748 | const PortComponentAttributes_Speed PortComponentAttributes::GIGABIT_400; |
| 749 | const PortComponentAttributes_Speed PortComponentAttributes::MEGABIT_2500; |
| 750 | const PortComponentAttributes_Speed PortComponentAttributes::MEGABIT_1250; |
| 751 | const PortComponentAttributes_Speed PortComponentAttributes::Speed_MIN; |
| 752 | const PortComponentAttributes_Speed PortComponentAttributes::Speed_MAX; |
| 753 | const int PortComponentAttributes::Speed_ARRAYSIZE; |
| 754 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 755 | const ::google::protobuf::EnumDescriptor* PortComponentAttributes_Protocol_descriptor() { |
| 756 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 757 | return file_level_enum_descriptors_dmi_2fhw_2eproto[2]; |
| 758 | } |
| 759 | bool PortComponentAttributes_Protocol_IsValid(int value) { |
| 760 | switch (value) { |
| 761 | case 0: |
| 762 | case 1: |
| 763 | case 2: |
| 764 | case 3: |
| 765 | case 4: |
| 766 | case 5: |
| 767 | case 6: |
| 768 | case 7: |
| 769 | case 8: |
| 770 | return true; |
| 771 | default: |
| 772 | return false; |
| 773 | } |
| 774 | } |
| 775 | |
| 776 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 777 | const PortComponentAttributes_Protocol PortComponentAttributes::PROTOCOL_UNDEFINED; |
| 778 | const PortComponentAttributes_Protocol PortComponentAttributes::ETHERNET; |
| 779 | const PortComponentAttributes_Protocol PortComponentAttributes::GPON; |
| 780 | const PortComponentAttributes_Protocol PortComponentAttributes::XGPON; |
| 781 | const PortComponentAttributes_Protocol PortComponentAttributes::XGSPON; |
| 782 | const PortComponentAttributes_Protocol PortComponentAttributes::GFAST; |
| 783 | const PortComponentAttributes_Protocol PortComponentAttributes::SERIAL; |
| 784 | const PortComponentAttributes_Protocol PortComponentAttributes::EPON; |
| 785 | const PortComponentAttributes_Protocol PortComponentAttributes::BITS; |
| 786 | const PortComponentAttributes_Protocol PortComponentAttributes::Protocol_MIN; |
| 787 | const PortComponentAttributes_Protocol PortComponentAttributes::Protocol_MAX; |
| 788 | const int PortComponentAttributes::Protocol_ARRAYSIZE; |
| 789 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 790 | const ::google::protobuf::EnumDescriptor* PsuComponentAttributes_SupportedVoltage_descriptor() { |
| 791 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 792 | return file_level_enum_descriptors_dmi_2fhw_2eproto[3]; |
| 793 | } |
| 794 | bool PsuComponentAttributes_SupportedVoltage_IsValid(int value) { |
| 795 | switch (value) { |
| 796 | case 0: |
| 797 | case 1: |
| 798 | case 2: |
| 799 | case 3: |
| 800 | return true; |
| 801 | default: |
| 802 | return false; |
| 803 | } |
| 804 | } |
| 805 | |
| 806 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 807 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::SUPPORTED_VOLTAGE_UNDEFINED; |
| 808 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::V48; |
| 809 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::V230; |
| 810 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::V115; |
| 811 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::SupportedVoltage_MIN; |
| 812 | const PsuComponentAttributes_SupportedVoltage PsuComponentAttributes::SupportedVoltage_MAX; |
| 813 | const int PsuComponentAttributes::SupportedVoltage_ARRAYSIZE; |
| 814 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 815 | const ::google::protobuf::EnumDescriptor* TransceiverComponentsAttributes_FormFactor_descriptor() { |
| 816 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 817 | return file_level_enum_descriptors_dmi_2fhw_2eproto[4]; |
| 818 | } |
| 819 | bool TransceiverComponentsAttributes_FormFactor_IsValid(int value) { |
| 820 | switch (value) { |
| 821 | case 0: |
| 822 | case 1: |
| 823 | case 2: |
| 824 | case 3: |
| 825 | case 4: |
| 826 | case 5: |
| 827 | case 6: |
| 828 | case 7: |
| 829 | case 8: |
| 830 | case 9: |
| 831 | case 10: |
| 832 | case 11: |
| 833 | case 12: |
| 834 | case 13: |
| 835 | case 14: |
| 836 | return true; |
| 837 | default: |
| 838 | return false; |
| 839 | } |
| 840 | } |
| 841 | |
| 842 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 843 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::FORM_FACTOR_UNKNOWN; |
| 844 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::QSFP; |
| 845 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::QSFP_PLUS; |
| 846 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::QSFP28; |
| 847 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::SFP; |
| 848 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::SFP_PLUS; |
| 849 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::XFP; |
| 850 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CFP4; |
| 851 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CFP2; |
| 852 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CPAK; |
| 853 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::X2; |
| 854 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::OTHER; |
| 855 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CFP; |
| 856 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CFP2_ACO; |
| 857 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::CFP2_DCO; |
| 858 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::FormFactor_MIN; |
| 859 | const TransceiverComponentsAttributes_FormFactor TransceiverComponentsAttributes::FormFactor_MAX; |
| 860 | const int TransceiverComponentsAttributes::FormFactor_ARRAYSIZE; |
| 861 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 862 | const ::google::protobuf::EnumDescriptor* TransceiverComponentsAttributes_Type_descriptor() { |
| 863 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 864 | return file_level_enum_descriptors_dmi_2fhw_2eproto[5]; |
| 865 | } |
| 866 | bool TransceiverComponentsAttributes_Type_IsValid(int value) { |
| 867 | switch (value) { |
| 868 | case 0: |
| 869 | case 1: |
| 870 | case 2: |
| 871 | case 3: |
| 872 | case 4: |
| 873 | case 5: |
| 874 | case 6: |
| 875 | case 7: |
| 876 | return true; |
| 877 | default: |
| 878 | return false; |
| 879 | } |
| 880 | } |
| 881 | |
| 882 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 883 | const TransceiverComponentsAttributes_Type TransceiverComponentsAttributes::TYPE_UNKNOWN; |
| 884 | const TransceiverComponentsAttributes_Type TransceiverComponentsAttributes::ETHERNET; |
| 885 | const TransceiverComponentsAttributes_Type TransceiverComponentsAttributes::GPON; |
| 886 | const TransceiverComponentsAttributes_Type TransceiverComponentsAttributes::XGPON; |
| 887 | const TransceiverComponentsAttributes_Type TransceiverComponentsAttributes::XGSPON; |
| 888 | const TransceiverComponentsAttributes_Type TransceiverComponentsAttributes::CPON; |
| 889 | const TransceiverComponentsAttributes_Type TransceiverComponentsAttributes::NG_PON2; |
| 890 | const TransceiverComponentsAttributes_Type TransceiverComponentsAttributes::EPON; |
| 891 | const TransceiverComponentsAttributes_Type TransceiverComponentsAttributes::Type_MIN; |
| 892 | const TransceiverComponentsAttributes_Type TransceiverComponentsAttributes::Type_MAX; |
| 893 | const int TransceiverComponentsAttributes::Type_ARRAYSIZE; |
| 894 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 895 | const ::google::protobuf::EnumDescriptor* ComponentType_descriptor() { |
| 896 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 897 | return file_level_enum_descriptors_dmi_2fhw_2eproto[6]; |
| 898 | } |
| 899 | bool ComponentType_IsValid(int value) { |
| 900 | switch (value) { |
| 901 | case 0: |
| 902 | case 1: |
| 903 | case 2: |
| 904 | case 3: |
| 905 | case 4: |
| 906 | case 5: |
| 907 | case 6: |
| 908 | case 7: |
| 909 | case 8: |
| 910 | case 9: |
| 911 | case 10: |
| 912 | case 11: |
| 913 | case 12: |
| 914 | case 13: |
| 915 | case 14: |
| 916 | return true; |
| 917 | default: |
| 918 | return false; |
| 919 | } |
| 920 | } |
| 921 | |
| 922 | const ::google::protobuf::EnumDescriptor* ComponentAdminState_descriptor() { |
| 923 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 924 | return file_level_enum_descriptors_dmi_2fhw_2eproto[7]; |
| 925 | } |
| 926 | bool ComponentAdminState_IsValid(int value) { |
| 927 | switch (value) { |
| 928 | case 0: |
| 929 | case 1: |
| 930 | case 2: |
| 931 | case 3: |
| 932 | case 4: |
| 933 | return true; |
| 934 | default: |
| 935 | return false; |
| 936 | } |
| 937 | } |
| 938 | |
| 939 | const ::google::protobuf::EnumDescriptor* ComponentOperState_descriptor() { |
| 940 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 941 | return file_level_enum_descriptors_dmi_2fhw_2eproto[8]; |
| 942 | } |
| 943 | bool ComponentOperState_IsValid(int value) { |
| 944 | switch (value) { |
| 945 | case 0: |
| 946 | case 1: |
| 947 | case 2: |
| 948 | case 3: |
| 949 | case 4: |
| 950 | return true; |
| 951 | default: |
| 952 | return false; |
| 953 | } |
| 954 | } |
| 955 | |
| 956 | const ::google::protobuf::EnumDescriptor* ComponentUsageState_descriptor() { |
| 957 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 958 | return file_level_enum_descriptors_dmi_2fhw_2eproto[9]; |
| 959 | } |
| 960 | bool ComponentUsageState_IsValid(int value) { |
| 961 | switch (value) { |
| 962 | case 0: |
| 963 | case 1: |
| 964 | case 2: |
| 965 | case 3: |
| 966 | case 4: |
| 967 | return true; |
| 968 | default: |
| 969 | return false; |
| 970 | } |
| 971 | } |
| 972 | |
| 973 | const ::google::protobuf::EnumDescriptor* ComponentAlarmState_descriptor() { |
| 974 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 975 | return file_level_enum_descriptors_dmi_2fhw_2eproto[10]; |
| 976 | } |
| 977 | bool ComponentAlarmState_IsValid(int value) { |
| 978 | switch (value) { |
| 979 | case 0: |
| 980 | case 1: |
| 981 | case 2: |
| 982 | case 3: |
| 983 | case 4: |
| 984 | case 5: |
| 985 | case 6: |
| 986 | case 7: |
| 987 | return true; |
| 988 | default: |
| 989 | return false; |
| 990 | } |
| 991 | } |
| 992 | |
| 993 | const ::google::protobuf::EnumDescriptor* ComponentStandbyState_descriptor() { |
| 994 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 995 | return file_level_enum_descriptors_dmi_2fhw_2eproto[11]; |
| 996 | } |
| 997 | bool ComponentStandbyState_IsValid(int value) { |
| 998 | switch (value) { |
| 999 | case 0: |
| 1000 | case 1: |
| 1001 | case 2: |
| 1002 | case 3: |
| 1003 | case 4: |
| 1004 | return true; |
| 1005 | default: |
| 1006 | return false; |
| 1007 | } |
| 1008 | } |
| 1009 | |
| 1010 | const ::google::protobuf::EnumDescriptor* DataValueType_descriptor() { |
| 1011 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 1012 | return file_level_enum_descriptors_dmi_2fhw_2eproto[12]; |
| 1013 | } |
| 1014 | bool DataValueType_IsValid(int value) { |
| 1015 | switch (value) { |
| 1016 | case 0: |
| 1017 | case 1: |
| 1018 | case 2: |
| 1019 | case 3: |
| 1020 | case 4: |
| 1021 | case 5: |
| 1022 | case 6: |
| 1023 | case 7: |
| 1024 | case 8: |
| 1025 | case 9: |
| 1026 | case 10: |
| 1027 | case 11: |
| 1028 | case 12: |
| 1029 | case 13: |
| 1030 | case 14: |
| 1031 | case 15: |
| 1032 | return true; |
| 1033 | default: |
| 1034 | return false; |
| 1035 | } |
| 1036 | } |
| 1037 | |
| 1038 | const ::google::protobuf::EnumDescriptor* ValueScale_descriptor() { |
| 1039 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 1040 | return file_level_enum_descriptors_dmi_2fhw_2eproto[13]; |
| 1041 | } |
| 1042 | bool ValueScale_IsValid(int value) { |
| 1043 | switch (value) { |
| 1044 | case 0: |
| 1045 | case 1: |
| 1046 | case 2: |
| 1047 | case 3: |
| 1048 | case 4: |
| 1049 | case 5: |
| 1050 | case 6: |
| 1051 | case 7: |
| 1052 | case 8: |
| 1053 | case 9: |
| 1054 | case 10: |
| 1055 | case 11: |
| 1056 | case 12: |
| 1057 | case 13: |
| 1058 | case 14: |
| 1059 | case 15: |
| 1060 | case 16: |
| 1061 | case 17: |
| 1062 | return true; |
| 1063 | default: |
| 1064 | return false; |
| 1065 | } |
| 1066 | } |
| 1067 | |
| 1068 | const ::google::protobuf::EnumDescriptor* SensorStatus_descriptor() { |
| 1069 | ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_dmi_2fhw_2eproto); |
| 1070 | return file_level_enum_descriptors_dmi_2fhw_2eproto[14]; |
| 1071 | } |
| 1072 | bool SensorStatus_IsValid(int value) { |
| 1073 | switch (value) { |
| 1074 | case 0: |
| 1075 | case 1: |
| 1076 | case 2: |
| 1077 | case 3: |
| 1078 | return true; |
| 1079 | default: |
| 1080 | return false; |
| 1081 | } |
| 1082 | } |
| 1083 | |
| 1084 | |
| 1085 | // =================================================================== |
| 1086 | |
| 1087 | void Uuid::InitAsDefaultInstance() { |
| 1088 | } |
| 1089 | class Uuid::HasBitSetters { |
| 1090 | public: |
| 1091 | }; |
| 1092 | |
| 1093 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1094 | const int Uuid::kUuidFieldNumber; |
| 1095 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1096 | |
| 1097 | Uuid::Uuid() |
| 1098 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 1099 | SharedCtor(); |
| 1100 | // @@protoc_insertion_point(constructor:dmi.Uuid) |
| 1101 | } |
| 1102 | Uuid::Uuid(const Uuid& from) |
| 1103 | : ::google::protobuf::Message(), |
| 1104 | _internal_metadata_(nullptr) { |
| 1105 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1106 | uuid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1107 | if (from.uuid().size() > 0) { |
| 1108 | uuid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.uuid_); |
| 1109 | } |
| 1110 | // @@protoc_insertion_point(copy_constructor:dmi.Uuid) |
| 1111 | } |
| 1112 | |
| 1113 | void Uuid::SharedCtor() { |
| 1114 | ::google::protobuf::internal::InitSCC( |
| 1115 | &scc_info_Uuid_dmi_2fhw_2eproto.base); |
| 1116 | uuid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1117 | } |
| 1118 | |
| 1119 | Uuid::~Uuid() { |
| 1120 | // @@protoc_insertion_point(destructor:dmi.Uuid) |
| 1121 | SharedDtor(); |
| 1122 | } |
| 1123 | |
| 1124 | void Uuid::SharedDtor() { |
| 1125 | uuid_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1126 | } |
| 1127 | |
| 1128 | void Uuid::SetCachedSize(int size) const { |
| 1129 | _cached_size_.Set(size); |
| 1130 | } |
| 1131 | const Uuid& Uuid::default_instance() { |
| 1132 | ::google::protobuf::internal::InitSCC(&::scc_info_Uuid_dmi_2fhw_2eproto.base); |
| 1133 | return *internal_default_instance(); |
| 1134 | } |
| 1135 | |
| 1136 | |
| 1137 | void Uuid::Clear() { |
| 1138 | // @@protoc_insertion_point(message_clear_start:dmi.Uuid) |
| 1139 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1140 | // Prevent compiler warnings about cached_has_bits being unused |
| 1141 | (void) cached_has_bits; |
| 1142 | |
| 1143 | uuid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1144 | _internal_metadata_.Clear(); |
| 1145 | } |
| 1146 | |
| 1147 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1148 | const char* Uuid::_InternalParse(const char* begin, const char* end, void* object, |
| 1149 | ::google::protobuf::internal::ParseContext* ctx) { |
| 1150 | auto msg = static_cast<Uuid*>(object); |
| 1151 | ::google::protobuf::int32 size; (void)size; |
| 1152 | int depth; (void)depth; |
| 1153 | ::google::protobuf::uint32 tag; |
| 1154 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 1155 | auto ptr = begin; |
| 1156 | while (ptr < end) { |
| 1157 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 1158 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1159 | switch (tag >> 3) { |
| 1160 | // string uuid = 1; |
| 1161 | case 1: { |
| 1162 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 1163 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 1164 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1165 | ctx->extra_parse_data().SetFieldName("dmi.Uuid.uuid"); |
| 1166 | object = msg->mutable_uuid(); |
| 1167 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 1168 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 1169 | goto string_till_end; |
| 1170 | } |
| 1171 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 1172 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 1173 | ptr += size; |
| 1174 | break; |
| 1175 | } |
| 1176 | default: { |
| 1177 | handle_unusual: |
| 1178 | if ((tag & 7) == 4 || tag == 0) { |
| 1179 | ctx->EndGroup(tag); |
| 1180 | return ptr; |
| 1181 | } |
| 1182 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 1183 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 1184 | ptr = res.first; |
| 1185 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 1186 | if (res.second) return ptr; |
| 1187 | } |
| 1188 | } // switch |
| 1189 | } // while |
| 1190 | return ptr; |
| 1191 | string_till_end: |
| 1192 | static_cast<::std::string*>(object)->clear(); |
| 1193 | static_cast<::std::string*>(object)->reserve(size); |
| 1194 | goto len_delim_till_end; |
| 1195 | len_delim_till_end: |
| 1196 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 1197 | {parser_till_end, object}, size); |
| 1198 | } |
| 1199 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1200 | bool Uuid::MergePartialFromCodedStream( |
| 1201 | ::google::protobuf::io::CodedInputStream* input) { |
| 1202 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 1203 | ::google::protobuf::uint32 tag; |
| 1204 | // @@protoc_insertion_point(parse_start:dmi.Uuid) |
| 1205 | for (;;) { |
| 1206 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 1207 | tag = p.first; |
| 1208 | if (!p.second) goto handle_unusual; |
| 1209 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 1210 | // string uuid = 1; |
| 1211 | case 1: { |
| 1212 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 1213 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1214 | input, this->mutable_uuid())); |
| 1215 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1216 | this->uuid().data(), static_cast<int>(this->uuid().length()), |
| 1217 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 1218 | "dmi.Uuid.uuid")); |
| 1219 | } else { |
| 1220 | goto handle_unusual; |
| 1221 | } |
| 1222 | break; |
| 1223 | } |
| 1224 | |
| 1225 | default: { |
| 1226 | handle_unusual: |
| 1227 | if (tag == 0) { |
| 1228 | goto success; |
| 1229 | } |
| 1230 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 1231 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 1232 | break; |
| 1233 | } |
| 1234 | } |
| 1235 | } |
| 1236 | success: |
| 1237 | // @@protoc_insertion_point(parse_success:dmi.Uuid) |
| 1238 | return true; |
| 1239 | failure: |
| 1240 | // @@protoc_insertion_point(parse_failure:dmi.Uuid) |
| 1241 | return false; |
| 1242 | #undef DO_ |
| 1243 | } |
| 1244 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1245 | |
| 1246 | void Uuid::SerializeWithCachedSizes( |
| 1247 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 1248 | // @@protoc_insertion_point(serialize_start:dmi.Uuid) |
| 1249 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1250 | (void) cached_has_bits; |
| 1251 | |
| 1252 | // string uuid = 1; |
| 1253 | if (this->uuid().size() > 0) { |
| 1254 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1255 | this->uuid().data(), static_cast<int>(this->uuid().length()), |
| 1256 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1257 | "dmi.Uuid.uuid"); |
| 1258 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1259 | 1, this->uuid(), output); |
| 1260 | } |
| 1261 | |
| 1262 | if (_internal_metadata_.have_unknown_fields()) { |
| 1263 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 1264 | _internal_metadata_.unknown_fields(), output); |
| 1265 | } |
| 1266 | // @@protoc_insertion_point(serialize_end:dmi.Uuid) |
| 1267 | } |
| 1268 | |
| 1269 | ::google::protobuf::uint8* Uuid::InternalSerializeWithCachedSizesToArray( |
| 1270 | ::google::protobuf::uint8* target) const { |
| 1271 | // @@protoc_insertion_point(serialize_to_array_start:dmi.Uuid) |
| 1272 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1273 | (void) cached_has_bits; |
| 1274 | |
| 1275 | // string uuid = 1; |
| 1276 | if (this->uuid().size() > 0) { |
| 1277 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1278 | this->uuid().data(), static_cast<int>(this->uuid().length()), |
| 1279 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1280 | "dmi.Uuid.uuid"); |
| 1281 | target = |
| 1282 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1283 | 1, this->uuid(), target); |
| 1284 | } |
| 1285 | |
| 1286 | if (_internal_metadata_.have_unknown_fields()) { |
| 1287 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 1288 | _internal_metadata_.unknown_fields(), target); |
| 1289 | } |
| 1290 | // @@protoc_insertion_point(serialize_to_array_end:dmi.Uuid) |
| 1291 | return target; |
| 1292 | } |
| 1293 | |
| 1294 | size_t Uuid::ByteSizeLong() const { |
| 1295 | // @@protoc_insertion_point(message_byte_size_start:dmi.Uuid) |
| 1296 | size_t total_size = 0; |
| 1297 | |
| 1298 | if (_internal_metadata_.have_unknown_fields()) { |
| 1299 | total_size += |
| 1300 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 1301 | _internal_metadata_.unknown_fields()); |
| 1302 | } |
| 1303 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1304 | // Prevent compiler warnings about cached_has_bits being unused |
| 1305 | (void) cached_has_bits; |
| 1306 | |
| 1307 | // string uuid = 1; |
| 1308 | if (this->uuid().size() > 0) { |
| 1309 | total_size += 1 + |
| 1310 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1311 | this->uuid()); |
| 1312 | } |
| 1313 | |
| 1314 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 1315 | SetCachedSize(cached_size); |
| 1316 | return total_size; |
| 1317 | } |
| 1318 | |
| 1319 | void Uuid::MergeFrom(const ::google::protobuf::Message& from) { |
| 1320 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.Uuid) |
| 1321 | GOOGLE_DCHECK_NE(&from, this); |
| 1322 | const Uuid* source = |
| 1323 | ::google::protobuf::DynamicCastToGenerated<Uuid>( |
| 1324 | &from); |
| 1325 | if (source == nullptr) { |
| 1326 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.Uuid) |
| 1327 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 1328 | } else { |
| 1329 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.Uuid) |
| 1330 | MergeFrom(*source); |
| 1331 | } |
| 1332 | } |
| 1333 | |
| 1334 | void Uuid::MergeFrom(const Uuid& from) { |
| 1335 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.Uuid) |
| 1336 | GOOGLE_DCHECK_NE(&from, this); |
| 1337 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1338 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1339 | (void) cached_has_bits; |
| 1340 | |
| 1341 | if (from.uuid().size() > 0) { |
| 1342 | |
| 1343 | uuid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.uuid_); |
| 1344 | } |
| 1345 | } |
| 1346 | |
| 1347 | void Uuid::CopyFrom(const ::google::protobuf::Message& from) { |
| 1348 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.Uuid) |
| 1349 | if (&from == this) return; |
| 1350 | Clear(); |
| 1351 | MergeFrom(from); |
| 1352 | } |
| 1353 | |
| 1354 | void Uuid::CopyFrom(const Uuid& from) { |
| 1355 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.Uuid) |
| 1356 | if (&from == this) return; |
| 1357 | Clear(); |
| 1358 | MergeFrom(from); |
| 1359 | } |
| 1360 | |
| 1361 | bool Uuid::IsInitialized() const { |
| 1362 | return true; |
| 1363 | } |
| 1364 | |
| 1365 | void Uuid::Swap(Uuid* other) { |
| 1366 | if (other == this) return; |
| 1367 | InternalSwap(other); |
| 1368 | } |
| 1369 | void Uuid::InternalSwap(Uuid* other) { |
| 1370 | using std::swap; |
| 1371 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 1372 | uuid_.Swap(&other->uuid_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 1373 | GetArenaNoVirtual()); |
| 1374 | } |
| 1375 | |
| 1376 | ::google::protobuf::Metadata Uuid::GetMetadata() const { |
| 1377 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 1378 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 1379 | } |
| 1380 | |
| 1381 | |
| 1382 | // =================================================================== |
| 1383 | |
| 1384 | void HardwareID::InitAsDefaultInstance() { |
| 1385 | ::dmi::_HardwareID_default_instance_._instance.get_mutable()->uuid_ = const_cast< ::dmi::Uuid*>( |
| 1386 | ::dmi::Uuid::internal_default_instance()); |
| 1387 | } |
| 1388 | class HardwareID::HasBitSetters { |
| 1389 | public: |
| 1390 | static const ::dmi::Uuid& uuid(const HardwareID* msg); |
| 1391 | }; |
| 1392 | |
| 1393 | const ::dmi::Uuid& |
| 1394 | HardwareID::HasBitSetters::uuid(const HardwareID* msg) { |
| 1395 | return *msg->uuid_; |
| 1396 | } |
| 1397 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1398 | const int HardwareID::kUuidFieldNumber; |
| 1399 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1400 | |
| 1401 | HardwareID::HardwareID() |
| 1402 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 1403 | SharedCtor(); |
| 1404 | // @@protoc_insertion_point(constructor:dmi.HardwareID) |
| 1405 | } |
| 1406 | HardwareID::HardwareID(const HardwareID& from) |
| 1407 | : ::google::protobuf::Message(), |
| 1408 | _internal_metadata_(nullptr) { |
| 1409 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1410 | if (from.has_uuid()) { |
| 1411 | uuid_ = new ::dmi::Uuid(*from.uuid_); |
| 1412 | } else { |
| 1413 | uuid_ = nullptr; |
| 1414 | } |
| 1415 | // @@protoc_insertion_point(copy_constructor:dmi.HardwareID) |
| 1416 | } |
| 1417 | |
| 1418 | void HardwareID::SharedCtor() { |
| 1419 | ::google::protobuf::internal::InitSCC( |
| 1420 | &scc_info_HardwareID_dmi_2fhw_2eproto.base); |
| 1421 | uuid_ = nullptr; |
| 1422 | } |
| 1423 | |
| 1424 | HardwareID::~HardwareID() { |
| 1425 | // @@protoc_insertion_point(destructor:dmi.HardwareID) |
| 1426 | SharedDtor(); |
| 1427 | } |
| 1428 | |
| 1429 | void HardwareID::SharedDtor() { |
| 1430 | if (this != internal_default_instance()) delete uuid_; |
| 1431 | } |
| 1432 | |
| 1433 | void HardwareID::SetCachedSize(int size) const { |
| 1434 | _cached_size_.Set(size); |
| 1435 | } |
| 1436 | const HardwareID& HardwareID::default_instance() { |
| 1437 | ::google::protobuf::internal::InitSCC(&::scc_info_HardwareID_dmi_2fhw_2eproto.base); |
| 1438 | return *internal_default_instance(); |
| 1439 | } |
| 1440 | |
| 1441 | |
| 1442 | void HardwareID::Clear() { |
| 1443 | // @@protoc_insertion_point(message_clear_start:dmi.HardwareID) |
| 1444 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1445 | // Prevent compiler warnings about cached_has_bits being unused |
| 1446 | (void) cached_has_bits; |
| 1447 | |
| 1448 | if (GetArenaNoVirtual() == nullptr && uuid_ != nullptr) { |
| 1449 | delete uuid_; |
| 1450 | } |
| 1451 | uuid_ = nullptr; |
| 1452 | _internal_metadata_.Clear(); |
| 1453 | } |
| 1454 | |
| 1455 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1456 | const char* HardwareID::_InternalParse(const char* begin, const char* end, void* object, |
| 1457 | ::google::protobuf::internal::ParseContext* ctx) { |
| 1458 | auto msg = static_cast<HardwareID*>(object); |
| 1459 | ::google::protobuf::int32 size; (void)size; |
| 1460 | int depth; (void)depth; |
| 1461 | ::google::protobuf::uint32 tag; |
| 1462 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 1463 | auto ptr = begin; |
| 1464 | while (ptr < end) { |
| 1465 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 1466 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1467 | switch (tag >> 3) { |
| 1468 | // .dmi.Uuid uuid = 1; |
| 1469 | case 1: { |
| 1470 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 1471 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 1472 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1473 | parser_till_end = ::dmi::Uuid::_InternalParse; |
| 1474 | object = msg->mutable_uuid(); |
| 1475 | if (size > end - ptr) goto len_delim_till_end; |
| 1476 | ptr += size; |
| 1477 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 1478 | {parser_till_end, object}, ptr - size, ptr)); |
| 1479 | break; |
| 1480 | } |
| 1481 | default: { |
| 1482 | handle_unusual: |
| 1483 | if ((tag & 7) == 4 || tag == 0) { |
| 1484 | ctx->EndGroup(tag); |
| 1485 | return ptr; |
| 1486 | } |
| 1487 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 1488 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 1489 | ptr = res.first; |
| 1490 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 1491 | if (res.second) return ptr; |
| 1492 | } |
| 1493 | } // switch |
| 1494 | } // while |
| 1495 | return ptr; |
| 1496 | len_delim_till_end: |
| 1497 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 1498 | {parser_till_end, object}, size); |
| 1499 | } |
| 1500 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1501 | bool HardwareID::MergePartialFromCodedStream( |
| 1502 | ::google::protobuf::io::CodedInputStream* input) { |
| 1503 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 1504 | ::google::protobuf::uint32 tag; |
| 1505 | // @@protoc_insertion_point(parse_start:dmi.HardwareID) |
| 1506 | for (;;) { |
| 1507 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 1508 | tag = p.first; |
| 1509 | if (!p.second) goto handle_unusual; |
| 1510 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 1511 | // .dmi.Uuid uuid = 1; |
| 1512 | case 1: { |
| 1513 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 1514 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 1515 | input, mutable_uuid())); |
| 1516 | } else { |
| 1517 | goto handle_unusual; |
| 1518 | } |
| 1519 | break; |
| 1520 | } |
| 1521 | |
| 1522 | default: { |
| 1523 | handle_unusual: |
| 1524 | if (tag == 0) { |
| 1525 | goto success; |
| 1526 | } |
| 1527 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 1528 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 1529 | break; |
| 1530 | } |
| 1531 | } |
| 1532 | } |
| 1533 | success: |
| 1534 | // @@protoc_insertion_point(parse_success:dmi.HardwareID) |
| 1535 | return true; |
| 1536 | failure: |
| 1537 | // @@protoc_insertion_point(parse_failure:dmi.HardwareID) |
| 1538 | return false; |
| 1539 | #undef DO_ |
| 1540 | } |
| 1541 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1542 | |
| 1543 | void HardwareID::SerializeWithCachedSizes( |
| 1544 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 1545 | // @@protoc_insertion_point(serialize_start:dmi.HardwareID) |
| 1546 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1547 | (void) cached_has_bits; |
| 1548 | |
| 1549 | // .dmi.Uuid uuid = 1; |
| 1550 | if (this->has_uuid()) { |
| 1551 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 1552 | 1, HasBitSetters::uuid(this), output); |
| 1553 | } |
| 1554 | |
| 1555 | if (_internal_metadata_.have_unknown_fields()) { |
| 1556 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 1557 | _internal_metadata_.unknown_fields(), output); |
| 1558 | } |
| 1559 | // @@protoc_insertion_point(serialize_end:dmi.HardwareID) |
| 1560 | } |
| 1561 | |
| 1562 | ::google::protobuf::uint8* HardwareID::InternalSerializeWithCachedSizesToArray( |
| 1563 | ::google::protobuf::uint8* target) const { |
| 1564 | // @@protoc_insertion_point(serialize_to_array_start:dmi.HardwareID) |
| 1565 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1566 | (void) cached_has_bits; |
| 1567 | |
| 1568 | // .dmi.Uuid uuid = 1; |
| 1569 | if (this->has_uuid()) { |
| 1570 | target = ::google::protobuf::internal::WireFormatLite:: |
| 1571 | InternalWriteMessageToArray( |
| 1572 | 1, HasBitSetters::uuid(this), target); |
| 1573 | } |
| 1574 | |
| 1575 | if (_internal_metadata_.have_unknown_fields()) { |
| 1576 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 1577 | _internal_metadata_.unknown_fields(), target); |
| 1578 | } |
| 1579 | // @@protoc_insertion_point(serialize_to_array_end:dmi.HardwareID) |
| 1580 | return target; |
| 1581 | } |
| 1582 | |
| 1583 | size_t HardwareID::ByteSizeLong() const { |
| 1584 | // @@protoc_insertion_point(message_byte_size_start:dmi.HardwareID) |
| 1585 | size_t total_size = 0; |
| 1586 | |
| 1587 | if (_internal_metadata_.have_unknown_fields()) { |
| 1588 | total_size += |
| 1589 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 1590 | _internal_metadata_.unknown_fields()); |
| 1591 | } |
| 1592 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1593 | // Prevent compiler warnings about cached_has_bits being unused |
| 1594 | (void) cached_has_bits; |
| 1595 | |
| 1596 | // .dmi.Uuid uuid = 1; |
| 1597 | if (this->has_uuid()) { |
| 1598 | total_size += 1 + |
| 1599 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 1600 | *uuid_); |
| 1601 | } |
| 1602 | |
| 1603 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 1604 | SetCachedSize(cached_size); |
| 1605 | return total_size; |
| 1606 | } |
| 1607 | |
| 1608 | void HardwareID::MergeFrom(const ::google::protobuf::Message& from) { |
| 1609 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.HardwareID) |
| 1610 | GOOGLE_DCHECK_NE(&from, this); |
| 1611 | const HardwareID* source = |
| 1612 | ::google::protobuf::DynamicCastToGenerated<HardwareID>( |
| 1613 | &from); |
| 1614 | if (source == nullptr) { |
| 1615 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.HardwareID) |
| 1616 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 1617 | } else { |
| 1618 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.HardwareID) |
| 1619 | MergeFrom(*source); |
| 1620 | } |
| 1621 | } |
| 1622 | |
| 1623 | void HardwareID::MergeFrom(const HardwareID& from) { |
| 1624 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.HardwareID) |
| 1625 | GOOGLE_DCHECK_NE(&from, this); |
| 1626 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1627 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1628 | (void) cached_has_bits; |
| 1629 | |
| 1630 | if (from.has_uuid()) { |
| 1631 | mutable_uuid()->::dmi::Uuid::MergeFrom(from.uuid()); |
| 1632 | } |
| 1633 | } |
| 1634 | |
| 1635 | void HardwareID::CopyFrom(const ::google::protobuf::Message& from) { |
| 1636 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.HardwareID) |
| 1637 | if (&from == this) return; |
| 1638 | Clear(); |
| 1639 | MergeFrom(from); |
| 1640 | } |
| 1641 | |
| 1642 | void HardwareID::CopyFrom(const HardwareID& from) { |
| 1643 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.HardwareID) |
| 1644 | if (&from == this) return; |
| 1645 | Clear(); |
| 1646 | MergeFrom(from); |
| 1647 | } |
| 1648 | |
| 1649 | bool HardwareID::IsInitialized() const { |
| 1650 | return true; |
| 1651 | } |
| 1652 | |
| 1653 | void HardwareID::Swap(HardwareID* other) { |
| 1654 | if (other == this) return; |
| 1655 | InternalSwap(other); |
| 1656 | } |
| 1657 | void HardwareID::InternalSwap(HardwareID* other) { |
| 1658 | using std::swap; |
| 1659 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 1660 | swap(uuid_, other->uuid_); |
| 1661 | } |
| 1662 | |
| 1663 | ::google::protobuf::Metadata HardwareID::GetMetadata() const { |
| 1664 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 1665 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 1666 | } |
| 1667 | |
| 1668 | |
| 1669 | // =================================================================== |
| 1670 | |
| 1671 | void Uri::InitAsDefaultInstance() { |
| 1672 | } |
| 1673 | class Uri::HasBitSetters { |
| 1674 | public: |
| 1675 | }; |
| 1676 | |
| 1677 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1678 | const int Uri::kUriFieldNumber; |
| 1679 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1680 | |
| 1681 | Uri::Uri() |
| 1682 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 1683 | SharedCtor(); |
| 1684 | // @@protoc_insertion_point(constructor:dmi.Uri) |
| 1685 | } |
| 1686 | Uri::Uri(const Uri& from) |
| 1687 | : ::google::protobuf::Message(), |
| 1688 | _internal_metadata_(nullptr) { |
| 1689 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1690 | uri_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1691 | if (from.uri().size() > 0) { |
| 1692 | uri_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.uri_); |
| 1693 | } |
| 1694 | // @@protoc_insertion_point(copy_constructor:dmi.Uri) |
| 1695 | } |
| 1696 | |
| 1697 | void Uri::SharedCtor() { |
| 1698 | ::google::protobuf::internal::InitSCC( |
| 1699 | &scc_info_Uri_dmi_2fhw_2eproto.base); |
| 1700 | uri_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1701 | } |
| 1702 | |
| 1703 | Uri::~Uri() { |
| 1704 | // @@protoc_insertion_point(destructor:dmi.Uri) |
| 1705 | SharedDtor(); |
| 1706 | } |
| 1707 | |
| 1708 | void Uri::SharedDtor() { |
| 1709 | uri_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1710 | } |
| 1711 | |
| 1712 | void Uri::SetCachedSize(int size) const { |
| 1713 | _cached_size_.Set(size); |
| 1714 | } |
| 1715 | const Uri& Uri::default_instance() { |
| 1716 | ::google::protobuf::internal::InitSCC(&::scc_info_Uri_dmi_2fhw_2eproto.base); |
| 1717 | return *internal_default_instance(); |
| 1718 | } |
| 1719 | |
| 1720 | |
| 1721 | void Uri::Clear() { |
| 1722 | // @@protoc_insertion_point(message_clear_start:dmi.Uri) |
| 1723 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1724 | // Prevent compiler warnings about cached_has_bits being unused |
| 1725 | (void) cached_has_bits; |
| 1726 | |
| 1727 | uri_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 1728 | _internal_metadata_.Clear(); |
| 1729 | } |
| 1730 | |
| 1731 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1732 | const char* Uri::_InternalParse(const char* begin, const char* end, void* object, |
| 1733 | ::google::protobuf::internal::ParseContext* ctx) { |
| 1734 | auto msg = static_cast<Uri*>(object); |
| 1735 | ::google::protobuf::int32 size; (void)size; |
| 1736 | int depth; (void)depth; |
| 1737 | ::google::protobuf::uint32 tag; |
| 1738 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 1739 | auto ptr = begin; |
| 1740 | while (ptr < end) { |
| 1741 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 1742 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1743 | switch (tag >> 3) { |
| 1744 | // string uri = 1; |
| 1745 | case 1: { |
| 1746 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 1747 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 1748 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 1749 | ctx->extra_parse_data().SetFieldName("dmi.Uri.uri"); |
| 1750 | object = msg->mutable_uri(); |
| 1751 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 1752 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 1753 | goto string_till_end; |
| 1754 | } |
| 1755 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 1756 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 1757 | ptr += size; |
| 1758 | break; |
| 1759 | } |
| 1760 | default: { |
| 1761 | handle_unusual: |
| 1762 | if ((tag & 7) == 4 || tag == 0) { |
| 1763 | ctx->EndGroup(tag); |
| 1764 | return ptr; |
| 1765 | } |
| 1766 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 1767 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 1768 | ptr = res.first; |
| 1769 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 1770 | if (res.second) return ptr; |
| 1771 | } |
| 1772 | } // switch |
| 1773 | } // while |
| 1774 | return ptr; |
| 1775 | string_till_end: |
| 1776 | static_cast<::std::string*>(object)->clear(); |
| 1777 | static_cast<::std::string*>(object)->reserve(size); |
| 1778 | goto len_delim_till_end; |
| 1779 | len_delim_till_end: |
| 1780 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 1781 | {parser_till_end, object}, size); |
| 1782 | } |
| 1783 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1784 | bool Uri::MergePartialFromCodedStream( |
| 1785 | ::google::protobuf::io::CodedInputStream* input) { |
| 1786 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 1787 | ::google::protobuf::uint32 tag; |
| 1788 | // @@protoc_insertion_point(parse_start:dmi.Uri) |
| 1789 | for (;;) { |
| 1790 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 1791 | tag = p.first; |
| 1792 | if (!p.second) goto handle_unusual; |
| 1793 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 1794 | // string uri = 1; |
| 1795 | case 1: { |
| 1796 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 1797 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 1798 | input, this->mutable_uri())); |
| 1799 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1800 | this->uri().data(), static_cast<int>(this->uri().length()), |
| 1801 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 1802 | "dmi.Uri.uri")); |
| 1803 | } else { |
| 1804 | goto handle_unusual; |
| 1805 | } |
| 1806 | break; |
| 1807 | } |
| 1808 | |
| 1809 | default: { |
| 1810 | handle_unusual: |
| 1811 | if (tag == 0) { |
| 1812 | goto success; |
| 1813 | } |
| 1814 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 1815 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 1816 | break; |
| 1817 | } |
| 1818 | } |
| 1819 | } |
| 1820 | success: |
| 1821 | // @@protoc_insertion_point(parse_success:dmi.Uri) |
| 1822 | return true; |
| 1823 | failure: |
| 1824 | // @@protoc_insertion_point(parse_failure:dmi.Uri) |
| 1825 | return false; |
| 1826 | #undef DO_ |
| 1827 | } |
| 1828 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 1829 | |
| 1830 | void Uri::SerializeWithCachedSizes( |
| 1831 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 1832 | // @@protoc_insertion_point(serialize_start:dmi.Uri) |
| 1833 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1834 | (void) cached_has_bits; |
| 1835 | |
| 1836 | // string uri = 1; |
| 1837 | if (this->uri().size() > 0) { |
| 1838 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1839 | this->uri().data(), static_cast<int>(this->uri().length()), |
| 1840 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1841 | "dmi.Uri.uri"); |
| 1842 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 1843 | 1, this->uri(), output); |
| 1844 | } |
| 1845 | |
| 1846 | if (_internal_metadata_.have_unknown_fields()) { |
| 1847 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 1848 | _internal_metadata_.unknown_fields(), output); |
| 1849 | } |
| 1850 | // @@protoc_insertion_point(serialize_end:dmi.Uri) |
| 1851 | } |
| 1852 | |
| 1853 | ::google::protobuf::uint8* Uri::InternalSerializeWithCachedSizesToArray( |
| 1854 | ::google::protobuf::uint8* target) const { |
| 1855 | // @@protoc_insertion_point(serialize_to_array_start:dmi.Uri) |
| 1856 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1857 | (void) cached_has_bits; |
| 1858 | |
| 1859 | // string uri = 1; |
| 1860 | if (this->uri().size() > 0) { |
| 1861 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 1862 | this->uri().data(), static_cast<int>(this->uri().length()), |
| 1863 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 1864 | "dmi.Uri.uri"); |
| 1865 | target = |
| 1866 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 1867 | 1, this->uri(), target); |
| 1868 | } |
| 1869 | |
| 1870 | if (_internal_metadata_.have_unknown_fields()) { |
| 1871 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 1872 | _internal_metadata_.unknown_fields(), target); |
| 1873 | } |
| 1874 | // @@protoc_insertion_point(serialize_to_array_end:dmi.Uri) |
| 1875 | return target; |
| 1876 | } |
| 1877 | |
| 1878 | size_t Uri::ByteSizeLong() const { |
| 1879 | // @@protoc_insertion_point(message_byte_size_start:dmi.Uri) |
| 1880 | size_t total_size = 0; |
| 1881 | |
| 1882 | if (_internal_metadata_.have_unknown_fields()) { |
| 1883 | total_size += |
| 1884 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 1885 | _internal_metadata_.unknown_fields()); |
| 1886 | } |
| 1887 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1888 | // Prevent compiler warnings about cached_has_bits being unused |
| 1889 | (void) cached_has_bits; |
| 1890 | |
| 1891 | // string uri = 1; |
| 1892 | if (this->uri().size() > 0) { |
| 1893 | total_size += 1 + |
| 1894 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 1895 | this->uri()); |
| 1896 | } |
| 1897 | |
| 1898 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 1899 | SetCachedSize(cached_size); |
| 1900 | return total_size; |
| 1901 | } |
| 1902 | |
| 1903 | void Uri::MergeFrom(const ::google::protobuf::Message& from) { |
| 1904 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.Uri) |
| 1905 | GOOGLE_DCHECK_NE(&from, this); |
| 1906 | const Uri* source = |
| 1907 | ::google::protobuf::DynamicCastToGenerated<Uri>( |
| 1908 | &from); |
| 1909 | if (source == nullptr) { |
| 1910 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.Uri) |
| 1911 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 1912 | } else { |
| 1913 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.Uri) |
| 1914 | MergeFrom(*source); |
| 1915 | } |
| 1916 | } |
| 1917 | |
| 1918 | void Uri::MergeFrom(const Uri& from) { |
| 1919 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.Uri) |
| 1920 | GOOGLE_DCHECK_NE(&from, this); |
| 1921 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 1922 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 1923 | (void) cached_has_bits; |
| 1924 | |
| 1925 | if (from.uri().size() > 0) { |
| 1926 | |
| 1927 | uri_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.uri_); |
| 1928 | } |
| 1929 | } |
| 1930 | |
| 1931 | void Uri::CopyFrom(const ::google::protobuf::Message& from) { |
| 1932 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.Uri) |
| 1933 | if (&from == this) return; |
| 1934 | Clear(); |
| 1935 | MergeFrom(from); |
| 1936 | } |
| 1937 | |
| 1938 | void Uri::CopyFrom(const Uri& from) { |
| 1939 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.Uri) |
| 1940 | if (&from == this) return; |
| 1941 | Clear(); |
| 1942 | MergeFrom(from); |
| 1943 | } |
| 1944 | |
| 1945 | bool Uri::IsInitialized() const { |
| 1946 | return true; |
| 1947 | } |
| 1948 | |
| 1949 | void Uri::Swap(Uri* other) { |
| 1950 | if (other == this) return; |
| 1951 | InternalSwap(other); |
| 1952 | } |
| 1953 | void Uri::InternalSwap(Uri* other) { |
| 1954 | using std::swap; |
| 1955 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 1956 | uri_.Swap(&other->uri_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 1957 | GetArenaNoVirtual()); |
| 1958 | } |
| 1959 | |
| 1960 | ::google::protobuf::Metadata Uri::GetMetadata() const { |
| 1961 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 1962 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 1963 | } |
| 1964 | |
| 1965 | |
| 1966 | // =================================================================== |
| 1967 | |
| 1968 | void ComponentState::InitAsDefaultInstance() { |
| 1969 | ::dmi::_ComponentState_default_instance_._instance.get_mutable()->state_last_changed_ = const_cast< ::google::protobuf::Timestamp*>( |
| 1970 | ::google::protobuf::Timestamp::internal_default_instance()); |
| 1971 | } |
| 1972 | class ComponentState::HasBitSetters { |
| 1973 | public: |
| 1974 | static const ::google::protobuf::Timestamp& state_last_changed(const ComponentState* msg); |
| 1975 | }; |
| 1976 | |
| 1977 | const ::google::protobuf::Timestamp& |
| 1978 | ComponentState::HasBitSetters::state_last_changed(const ComponentState* msg) { |
| 1979 | return *msg->state_last_changed_; |
| 1980 | } |
| 1981 | void ComponentState::clear_state_last_changed() { |
| 1982 | if (GetArenaNoVirtual() == nullptr && state_last_changed_ != nullptr) { |
| 1983 | delete state_last_changed_; |
| 1984 | } |
| 1985 | state_last_changed_ = nullptr; |
| 1986 | } |
| 1987 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1988 | const int ComponentState::kStateLastChangedFieldNumber; |
| 1989 | const int ComponentState::kAdminStateFieldNumber; |
| 1990 | const int ComponentState::kOperStateFieldNumber; |
| 1991 | const int ComponentState::kUsageStateFieldNumber; |
| 1992 | const int ComponentState::kAlarmStateFieldNumber; |
| 1993 | const int ComponentState::kStandbyStateFieldNumber; |
| 1994 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 1995 | |
| 1996 | ComponentState::ComponentState() |
| 1997 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 1998 | SharedCtor(); |
| 1999 | // @@protoc_insertion_point(constructor:dmi.ComponentState) |
| 2000 | } |
| 2001 | ComponentState::ComponentState(const ComponentState& from) |
| 2002 | : ::google::protobuf::Message(), |
| 2003 | _internal_metadata_(nullptr) { |
| 2004 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 2005 | if (from.has_state_last_changed()) { |
| 2006 | state_last_changed_ = new ::google::protobuf::Timestamp(*from.state_last_changed_); |
| 2007 | } else { |
| 2008 | state_last_changed_ = nullptr; |
| 2009 | } |
| 2010 | ::memcpy(&admin_state_, &from.admin_state_, |
| 2011 | static_cast<size_t>(reinterpret_cast<char*>(&standby_state_) - |
| 2012 | reinterpret_cast<char*>(&admin_state_)) + sizeof(standby_state_)); |
| 2013 | // @@protoc_insertion_point(copy_constructor:dmi.ComponentState) |
| 2014 | } |
| 2015 | |
| 2016 | void ComponentState::SharedCtor() { |
| 2017 | ::google::protobuf::internal::InitSCC( |
| 2018 | &scc_info_ComponentState_dmi_2fhw_2eproto.base); |
| 2019 | ::memset(&state_last_changed_, 0, static_cast<size_t>( |
| 2020 | reinterpret_cast<char*>(&standby_state_) - |
| 2021 | reinterpret_cast<char*>(&state_last_changed_)) + sizeof(standby_state_)); |
| 2022 | } |
| 2023 | |
| 2024 | ComponentState::~ComponentState() { |
| 2025 | // @@protoc_insertion_point(destructor:dmi.ComponentState) |
| 2026 | SharedDtor(); |
| 2027 | } |
| 2028 | |
| 2029 | void ComponentState::SharedDtor() { |
| 2030 | if (this != internal_default_instance()) delete state_last_changed_; |
| 2031 | } |
| 2032 | |
| 2033 | void ComponentState::SetCachedSize(int size) const { |
| 2034 | _cached_size_.Set(size); |
| 2035 | } |
| 2036 | const ComponentState& ComponentState::default_instance() { |
| 2037 | ::google::protobuf::internal::InitSCC(&::scc_info_ComponentState_dmi_2fhw_2eproto.base); |
| 2038 | return *internal_default_instance(); |
| 2039 | } |
| 2040 | |
| 2041 | |
| 2042 | void ComponentState::Clear() { |
| 2043 | // @@protoc_insertion_point(message_clear_start:dmi.ComponentState) |
| 2044 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2045 | // Prevent compiler warnings about cached_has_bits being unused |
| 2046 | (void) cached_has_bits; |
| 2047 | |
| 2048 | if (GetArenaNoVirtual() == nullptr && state_last_changed_ != nullptr) { |
| 2049 | delete state_last_changed_; |
| 2050 | } |
| 2051 | state_last_changed_ = nullptr; |
| 2052 | ::memset(&admin_state_, 0, static_cast<size_t>( |
| 2053 | reinterpret_cast<char*>(&standby_state_) - |
| 2054 | reinterpret_cast<char*>(&admin_state_)) + sizeof(standby_state_)); |
| 2055 | _internal_metadata_.Clear(); |
| 2056 | } |
| 2057 | |
| 2058 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2059 | const char* ComponentState::_InternalParse(const char* begin, const char* end, void* object, |
| 2060 | ::google::protobuf::internal::ParseContext* ctx) { |
| 2061 | auto msg = static_cast<ComponentState*>(object); |
| 2062 | ::google::protobuf::int32 size; (void)size; |
| 2063 | int depth; (void)depth; |
| 2064 | ::google::protobuf::uint32 tag; |
| 2065 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 2066 | auto ptr = begin; |
| 2067 | while (ptr < end) { |
| 2068 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 2069 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2070 | switch (tag >> 3) { |
| 2071 | // .google.protobuf.Timestamp state_last_changed = 1; |
| 2072 | case 1: { |
| 2073 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 2074 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 2075 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2076 | parser_till_end = ::google::protobuf::Timestamp::_InternalParse; |
| 2077 | object = msg->mutable_state_last_changed(); |
| 2078 | if (size > end - ptr) goto len_delim_till_end; |
| 2079 | ptr += size; |
| 2080 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 2081 | {parser_till_end, object}, ptr - size, ptr)); |
| 2082 | break; |
| 2083 | } |
| 2084 | // .dmi.ComponentAdminState admin_state = 2; |
| 2085 | case 2: { |
| 2086 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 2087 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2088 | msg->set_admin_state(static_cast<::dmi::ComponentAdminState>(val)); |
| 2089 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2090 | break; |
| 2091 | } |
| 2092 | // .dmi.ComponentOperState oper_state = 3; |
| 2093 | case 3: { |
| 2094 | if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; |
| 2095 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2096 | msg->set_oper_state(static_cast<::dmi::ComponentOperState>(val)); |
| 2097 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2098 | break; |
| 2099 | } |
| 2100 | // .dmi.ComponentUsageState usage_state = 4; |
| 2101 | case 4: { |
| 2102 | if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; |
| 2103 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2104 | msg->set_usage_state(static_cast<::dmi::ComponentUsageState>(val)); |
| 2105 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2106 | break; |
| 2107 | } |
| 2108 | // .dmi.ComponentAlarmState alarm_state = 5; |
| 2109 | case 5: { |
| 2110 | if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; |
| 2111 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2112 | msg->set_alarm_state(static_cast<::dmi::ComponentAlarmState>(val)); |
| 2113 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2114 | break; |
| 2115 | } |
| 2116 | // .dmi.ComponentStandbyState standby_state = 6; |
| 2117 | case 6: { |
| 2118 | if (static_cast<::google::protobuf::uint8>(tag) != 48) goto handle_unusual; |
| 2119 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2120 | msg->set_standby_state(static_cast<::dmi::ComponentStandbyState>(val)); |
| 2121 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2122 | break; |
| 2123 | } |
| 2124 | default: { |
| 2125 | handle_unusual: |
| 2126 | if ((tag & 7) == 4 || tag == 0) { |
| 2127 | ctx->EndGroup(tag); |
| 2128 | return ptr; |
| 2129 | } |
| 2130 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 2131 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 2132 | ptr = res.first; |
| 2133 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 2134 | if (res.second) return ptr; |
| 2135 | } |
| 2136 | } // switch |
| 2137 | } // while |
| 2138 | return ptr; |
| 2139 | len_delim_till_end: |
| 2140 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 2141 | {parser_till_end, object}, size); |
| 2142 | } |
| 2143 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2144 | bool ComponentState::MergePartialFromCodedStream( |
| 2145 | ::google::protobuf::io::CodedInputStream* input) { |
| 2146 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 2147 | ::google::protobuf::uint32 tag; |
| 2148 | // @@protoc_insertion_point(parse_start:dmi.ComponentState) |
| 2149 | for (;;) { |
| 2150 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 2151 | tag = p.first; |
| 2152 | if (!p.second) goto handle_unusual; |
| 2153 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 2154 | // .google.protobuf.Timestamp state_last_changed = 1; |
| 2155 | case 1: { |
| 2156 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 2157 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 2158 | input, mutable_state_last_changed())); |
| 2159 | } else { |
| 2160 | goto handle_unusual; |
| 2161 | } |
| 2162 | break; |
| 2163 | } |
| 2164 | |
| 2165 | // .dmi.ComponentAdminState admin_state = 2; |
| 2166 | case 2: { |
| 2167 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 2168 | int value = 0; |
| 2169 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2170 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2171 | input, &value))); |
| 2172 | set_admin_state(static_cast< ::dmi::ComponentAdminState >(value)); |
| 2173 | } else { |
| 2174 | goto handle_unusual; |
| 2175 | } |
| 2176 | break; |
| 2177 | } |
| 2178 | |
| 2179 | // .dmi.ComponentOperState oper_state = 3; |
| 2180 | case 3: { |
| 2181 | if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { |
| 2182 | int value = 0; |
| 2183 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2184 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2185 | input, &value))); |
| 2186 | set_oper_state(static_cast< ::dmi::ComponentOperState >(value)); |
| 2187 | } else { |
| 2188 | goto handle_unusual; |
| 2189 | } |
| 2190 | break; |
| 2191 | } |
| 2192 | |
| 2193 | // .dmi.ComponentUsageState usage_state = 4; |
| 2194 | case 4: { |
| 2195 | if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { |
| 2196 | int value = 0; |
| 2197 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2198 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2199 | input, &value))); |
| 2200 | set_usage_state(static_cast< ::dmi::ComponentUsageState >(value)); |
| 2201 | } else { |
| 2202 | goto handle_unusual; |
| 2203 | } |
| 2204 | break; |
| 2205 | } |
| 2206 | |
| 2207 | // .dmi.ComponentAlarmState alarm_state = 5; |
| 2208 | case 5: { |
| 2209 | if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { |
| 2210 | int value = 0; |
| 2211 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2212 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2213 | input, &value))); |
| 2214 | set_alarm_state(static_cast< ::dmi::ComponentAlarmState >(value)); |
| 2215 | } else { |
| 2216 | goto handle_unusual; |
| 2217 | } |
| 2218 | break; |
| 2219 | } |
| 2220 | |
| 2221 | // .dmi.ComponentStandbyState standby_state = 6; |
| 2222 | case 6: { |
| 2223 | if (static_cast< ::google::protobuf::uint8>(tag) == (48 & 0xFF)) { |
| 2224 | int value = 0; |
| 2225 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2226 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2227 | input, &value))); |
| 2228 | set_standby_state(static_cast< ::dmi::ComponentStandbyState >(value)); |
| 2229 | } else { |
| 2230 | goto handle_unusual; |
| 2231 | } |
| 2232 | break; |
| 2233 | } |
| 2234 | |
| 2235 | default: { |
| 2236 | handle_unusual: |
| 2237 | if (tag == 0) { |
| 2238 | goto success; |
| 2239 | } |
| 2240 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 2241 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 2242 | break; |
| 2243 | } |
| 2244 | } |
| 2245 | } |
| 2246 | success: |
| 2247 | // @@protoc_insertion_point(parse_success:dmi.ComponentState) |
| 2248 | return true; |
| 2249 | failure: |
| 2250 | // @@protoc_insertion_point(parse_failure:dmi.ComponentState) |
| 2251 | return false; |
| 2252 | #undef DO_ |
| 2253 | } |
| 2254 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2255 | |
| 2256 | void ComponentState::SerializeWithCachedSizes( |
| 2257 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 2258 | // @@protoc_insertion_point(serialize_start:dmi.ComponentState) |
| 2259 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2260 | (void) cached_has_bits; |
| 2261 | |
| 2262 | // .google.protobuf.Timestamp state_last_changed = 1; |
| 2263 | if (this->has_state_last_changed()) { |
| 2264 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 2265 | 1, HasBitSetters::state_last_changed(this), output); |
| 2266 | } |
| 2267 | |
| 2268 | // .dmi.ComponentAdminState admin_state = 2; |
| 2269 | if (this->admin_state() != 0) { |
| 2270 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2271 | 2, this->admin_state(), output); |
| 2272 | } |
| 2273 | |
| 2274 | // .dmi.ComponentOperState oper_state = 3; |
| 2275 | if (this->oper_state() != 0) { |
| 2276 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2277 | 3, this->oper_state(), output); |
| 2278 | } |
| 2279 | |
| 2280 | // .dmi.ComponentUsageState usage_state = 4; |
| 2281 | if (this->usage_state() != 0) { |
| 2282 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2283 | 4, this->usage_state(), output); |
| 2284 | } |
| 2285 | |
| 2286 | // .dmi.ComponentAlarmState alarm_state = 5; |
| 2287 | if (this->alarm_state() != 0) { |
| 2288 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2289 | 5, this->alarm_state(), output); |
| 2290 | } |
| 2291 | |
| 2292 | // .dmi.ComponentStandbyState standby_state = 6; |
| 2293 | if (this->standby_state() != 0) { |
| 2294 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2295 | 6, this->standby_state(), output); |
| 2296 | } |
| 2297 | |
| 2298 | if (_internal_metadata_.have_unknown_fields()) { |
| 2299 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 2300 | _internal_metadata_.unknown_fields(), output); |
| 2301 | } |
| 2302 | // @@protoc_insertion_point(serialize_end:dmi.ComponentState) |
| 2303 | } |
| 2304 | |
| 2305 | ::google::protobuf::uint8* ComponentState::InternalSerializeWithCachedSizesToArray( |
| 2306 | ::google::protobuf::uint8* target) const { |
| 2307 | // @@protoc_insertion_point(serialize_to_array_start:dmi.ComponentState) |
| 2308 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2309 | (void) cached_has_bits; |
| 2310 | |
| 2311 | // .google.protobuf.Timestamp state_last_changed = 1; |
| 2312 | if (this->has_state_last_changed()) { |
| 2313 | target = ::google::protobuf::internal::WireFormatLite:: |
| 2314 | InternalWriteMessageToArray( |
| 2315 | 1, HasBitSetters::state_last_changed(this), target); |
| 2316 | } |
| 2317 | |
| 2318 | // .dmi.ComponentAdminState admin_state = 2; |
| 2319 | if (this->admin_state() != 0) { |
| 2320 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2321 | 2, this->admin_state(), target); |
| 2322 | } |
| 2323 | |
| 2324 | // .dmi.ComponentOperState oper_state = 3; |
| 2325 | if (this->oper_state() != 0) { |
| 2326 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2327 | 3, this->oper_state(), target); |
| 2328 | } |
| 2329 | |
| 2330 | // .dmi.ComponentUsageState usage_state = 4; |
| 2331 | if (this->usage_state() != 0) { |
| 2332 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2333 | 4, this->usage_state(), target); |
| 2334 | } |
| 2335 | |
| 2336 | // .dmi.ComponentAlarmState alarm_state = 5; |
| 2337 | if (this->alarm_state() != 0) { |
| 2338 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2339 | 5, this->alarm_state(), target); |
| 2340 | } |
| 2341 | |
| 2342 | // .dmi.ComponentStandbyState standby_state = 6; |
| 2343 | if (this->standby_state() != 0) { |
| 2344 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2345 | 6, this->standby_state(), target); |
| 2346 | } |
| 2347 | |
| 2348 | if (_internal_metadata_.have_unknown_fields()) { |
| 2349 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 2350 | _internal_metadata_.unknown_fields(), target); |
| 2351 | } |
| 2352 | // @@protoc_insertion_point(serialize_to_array_end:dmi.ComponentState) |
| 2353 | return target; |
| 2354 | } |
| 2355 | |
| 2356 | size_t ComponentState::ByteSizeLong() const { |
| 2357 | // @@protoc_insertion_point(message_byte_size_start:dmi.ComponentState) |
| 2358 | size_t total_size = 0; |
| 2359 | |
| 2360 | if (_internal_metadata_.have_unknown_fields()) { |
| 2361 | total_size += |
| 2362 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 2363 | _internal_metadata_.unknown_fields()); |
| 2364 | } |
| 2365 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2366 | // Prevent compiler warnings about cached_has_bits being unused |
| 2367 | (void) cached_has_bits; |
| 2368 | |
| 2369 | // .google.protobuf.Timestamp state_last_changed = 1; |
| 2370 | if (this->has_state_last_changed()) { |
| 2371 | total_size += 1 + |
| 2372 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 2373 | *state_last_changed_); |
| 2374 | } |
| 2375 | |
| 2376 | // .dmi.ComponentAdminState admin_state = 2; |
| 2377 | if (this->admin_state() != 0) { |
| 2378 | total_size += 1 + |
| 2379 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->admin_state()); |
| 2380 | } |
| 2381 | |
| 2382 | // .dmi.ComponentOperState oper_state = 3; |
| 2383 | if (this->oper_state() != 0) { |
| 2384 | total_size += 1 + |
| 2385 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->oper_state()); |
| 2386 | } |
| 2387 | |
| 2388 | // .dmi.ComponentUsageState usage_state = 4; |
| 2389 | if (this->usage_state() != 0) { |
| 2390 | total_size += 1 + |
| 2391 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->usage_state()); |
| 2392 | } |
| 2393 | |
| 2394 | // .dmi.ComponentAlarmState alarm_state = 5; |
| 2395 | if (this->alarm_state() != 0) { |
| 2396 | total_size += 1 + |
| 2397 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->alarm_state()); |
| 2398 | } |
| 2399 | |
| 2400 | // .dmi.ComponentStandbyState standby_state = 6; |
| 2401 | if (this->standby_state() != 0) { |
| 2402 | total_size += 1 + |
| 2403 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->standby_state()); |
| 2404 | } |
| 2405 | |
| 2406 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 2407 | SetCachedSize(cached_size); |
| 2408 | return total_size; |
| 2409 | } |
| 2410 | |
| 2411 | void ComponentState::MergeFrom(const ::google::protobuf::Message& from) { |
| 2412 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.ComponentState) |
| 2413 | GOOGLE_DCHECK_NE(&from, this); |
| 2414 | const ComponentState* source = |
| 2415 | ::google::protobuf::DynamicCastToGenerated<ComponentState>( |
| 2416 | &from); |
| 2417 | if (source == nullptr) { |
| 2418 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.ComponentState) |
| 2419 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 2420 | } else { |
| 2421 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.ComponentState) |
| 2422 | MergeFrom(*source); |
| 2423 | } |
| 2424 | } |
| 2425 | |
| 2426 | void ComponentState::MergeFrom(const ComponentState& from) { |
| 2427 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.ComponentState) |
| 2428 | GOOGLE_DCHECK_NE(&from, this); |
| 2429 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 2430 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2431 | (void) cached_has_bits; |
| 2432 | |
| 2433 | if (from.has_state_last_changed()) { |
| 2434 | mutable_state_last_changed()->::google::protobuf::Timestamp::MergeFrom(from.state_last_changed()); |
| 2435 | } |
| 2436 | if (from.admin_state() != 0) { |
| 2437 | set_admin_state(from.admin_state()); |
| 2438 | } |
| 2439 | if (from.oper_state() != 0) { |
| 2440 | set_oper_state(from.oper_state()); |
| 2441 | } |
| 2442 | if (from.usage_state() != 0) { |
| 2443 | set_usage_state(from.usage_state()); |
| 2444 | } |
| 2445 | if (from.alarm_state() != 0) { |
| 2446 | set_alarm_state(from.alarm_state()); |
| 2447 | } |
| 2448 | if (from.standby_state() != 0) { |
| 2449 | set_standby_state(from.standby_state()); |
| 2450 | } |
| 2451 | } |
| 2452 | |
| 2453 | void ComponentState::CopyFrom(const ::google::protobuf::Message& from) { |
| 2454 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.ComponentState) |
| 2455 | if (&from == this) return; |
| 2456 | Clear(); |
| 2457 | MergeFrom(from); |
| 2458 | } |
| 2459 | |
| 2460 | void ComponentState::CopyFrom(const ComponentState& from) { |
| 2461 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.ComponentState) |
| 2462 | if (&from == this) return; |
| 2463 | Clear(); |
| 2464 | MergeFrom(from); |
| 2465 | } |
| 2466 | |
| 2467 | bool ComponentState::IsInitialized() const { |
| 2468 | return true; |
| 2469 | } |
| 2470 | |
| 2471 | void ComponentState::Swap(ComponentState* other) { |
| 2472 | if (other == this) return; |
| 2473 | InternalSwap(other); |
| 2474 | } |
| 2475 | void ComponentState::InternalSwap(ComponentState* other) { |
| 2476 | using std::swap; |
| 2477 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 2478 | swap(state_last_changed_, other->state_last_changed_); |
| 2479 | swap(admin_state_, other->admin_state_); |
| 2480 | swap(oper_state_, other->oper_state_); |
| 2481 | swap(usage_state_, other->usage_state_); |
| 2482 | swap(alarm_state_, other->alarm_state_); |
| 2483 | swap(standby_state_, other->standby_state_); |
| 2484 | } |
| 2485 | |
| 2486 | ::google::protobuf::Metadata ComponentState::GetMetadata() const { |
| 2487 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 2488 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 2489 | } |
| 2490 | |
| 2491 | |
| 2492 | // =================================================================== |
| 2493 | |
| 2494 | void ComponentSensorData::InitAsDefaultInstance() { |
| 2495 | ::dmi::_ComponentSensorData_default_instance_._instance.get_mutable()->timestamp_ = const_cast< ::google::protobuf::Timestamp*>( |
| 2496 | ::google::protobuf::Timestamp::internal_default_instance()); |
| 2497 | } |
| 2498 | class ComponentSensorData::HasBitSetters { |
| 2499 | public: |
| 2500 | static const ::google::protobuf::Timestamp& timestamp(const ComponentSensorData* msg); |
| 2501 | }; |
| 2502 | |
| 2503 | const ::google::protobuf::Timestamp& |
| 2504 | ComponentSensorData::HasBitSetters::timestamp(const ComponentSensorData* msg) { |
| 2505 | return *msg->timestamp_; |
| 2506 | } |
| 2507 | void ComponentSensorData::clear_timestamp() { |
| 2508 | if (GetArenaNoVirtual() == nullptr && timestamp_ != nullptr) { |
| 2509 | delete timestamp_; |
| 2510 | } |
| 2511 | timestamp_ = nullptr; |
| 2512 | } |
| 2513 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 2514 | const int ComponentSensorData::kValueFieldNumber; |
| 2515 | const int ComponentSensorData::kTypeFieldNumber; |
| 2516 | const int ComponentSensorData::kScaleFieldNumber; |
| 2517 | const int ComponentSensorData::kPrecisionFieldNumber; |
| 2518 | const int ComponentSensorData::kStatusFieldNumber; |
| 2519 | const int ComponentSensorData::kUnitsDisplayFieldNumber; |
| 2520 | const int ComponentSensorData::kTimestampFieldNumber; |
| 2521 | const int ComponentSensorData::kValueUpdateRateFieldNumber; |
| 2522 | const int ComponentSensorData::kDataTypeFieldNumber; |
| 2523 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 2524 | |
| 2525 | ComponentSensorData::ComponentSensorData() |
| 2526 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 2527 | SharedCtor(); |
| 2528 | // @@protoc_insertion_point(constructor:dmi.ComponentSensorData) |
| 2529 | } |
| 2530 | ComponentSensorData::ComponentSensorData(const ComponentSensorData& from) |
| 2531 | : ::google::protobuf::Message(), |
| 2532 | _internal_metadata_(nullptr) { |
| 2533 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 2534 | units_display_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2535 | if (from.units_display().size() > 0) { |
| 2536 | units_display_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.units_display_); |
| 2537 | } |
| 2538 | data_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2539 | if (from.data_type().size() > 0) { |
| 2540 | data_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_type_); |
| 2541 | } |
| 2542 | if (from.has_timestamp()) { |
| 2543 | timestamp_ = new ::google::protobuf::Timestamp(*from.timestamp_); |
| 2544 | } else { |
| 2545 | timestamp_ = nullptr; |
| 2546 | } |
| 2547 | ::memcpy(&value_, &from.value_, |
| 2548 | static_cast<size_t>(reinterpret_cast<char*>(&value_update_rate_) - |
| 2549 | reinterpret_cast<char*>(&value_)) + sizeof(value_update_rate_)); |
| 2550 | // @@protoc_insertion_point(copy_constructor:dmi.ComponentSensorData) |
| 2551 | } |
| 2552 | |
| 2553 | void ComponentSensorData::SharedCtor() { |
| 2554 | ::google::protobuf::internal::InitSCC( |
| 2555 | &scc_info_ComponentSensorData_dmi_2fhw_2eproto.base); |
| 2556 | units_display_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2557 | data_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2558 | ::memset(×tamp_, 0, static_cast<size_t>( |
| 2559 | reinterpret_cast<char*>(&value_update_rate_) - |
| 2560 | reinterpret_cast<char*>(×tamp_)) + sizeof(value_update_rate_)); |
| 2561 | } |
| 2562 | |
| 2563 | ComponentSensorData::~ComponentSensorData() { |
| 2564 | // @@protoc_insertion_point(destructor:dmi.ComponentSensorData) |
| 2565 | SharedDtor(); |
| 2566 | } |
| 2567 | |
| 2568 | void ComponentSensorData::SharedDtor() { |
| 2569 | units_display_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2570 | data_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2571 | if (this != internal_default_instance()) delete timestamp_; |
| 2572 | } |
| 2573 | |
| 2574 | void ComponentSensorData::SetCachedSize(int size) const { |
| 2575 | _cached_size_.Set(size); |
| 2576 | } |
| 2577 | const ComponentSensorData& ComponentSensorData::default_instance() { |
| 2578 | ::google::protobuf::internal::InitSCC(&::scc_info_ComponentSensorData_dmi_2fhw_2eproto.base); |
| 2579 | return *internal_default_instance(); |
| 2580 | } |
| 2581 | |
| 2582 | |
| 2583 | void ComponentSensorData::Clear() { |
| 2584 | // @@protoc_insertion_point(message_clear_start:dmi.ComponentSensorData) |
| 2585 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2586 | // Prevent compiler warnings about cached_has_bits being unused |
| 2587 | (void) cached_has_bits; |
| 2588 | |
| 2589 | units_display_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2590 | data_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 2591 | if (GetArenaNoVirtual() == nullptr && timestamp_ != nullptr) { |
| 2592 | delete timestamp_; |
| 2593 | } |
| 2594 | timestamp_ = nullptr; |
| 2595 | ::memset(&value_, 0, static_cast<size_t>( |
| 2596 | reinterpret_cast<char*>(&value_update_rate_) - |
| 2597 | reinterpret_cast<char*>(&value_)) + sizeof(value_update_rate_)); |
| 2598 | _internal_metadata_.Clear(); |
| 2599 | } |
| 2600 | |
| 2601 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2602 | const char* ComponentSensorData::_InternalParse(const char* begin, const char* end, void* object, |
| 2603 | ::google::protobuf::internal::ParseContext* ctx) { |
| 2604 | auto msg = static_cast<ComponentSensorData*>(object); |
| 2605 | ::google::protobuf::int32 size; (void)size; |
| 2606 | int depth; (void)depth; |
| 2607 | ::google::protobuf::uint32 tag; |
| 2608 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 2609 | auto ptr = begin; |
| 2610 | while (ptr < end) { |
| 2611 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 2612 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2613 | switch (tag >> 3) { |
| 2614 | // int32 value = 1; |
| 2615 | case 1: { |
| 2616 | if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; |
| 2617 | msg->set_value(::google::protobuf::internal::ReadVarint(&ptr)); |
| 2618 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2619 | break; |
| 2620 | } |
| 2621 | // .dmi.DataValueType type = 2; |
| 2622 | case 2: { |
| 2623 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 2624 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2625 | msg->set_type(static_cast<::dmi::DataValueType>(val)); |
| 2626 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2627 | break; |
| 2628 | } |
| 2629 | // .dmi.ValueScale scale = 3; |
| 2630 | case 3: { |
| 2631 | if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; |
| 2632 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2633 | msg->set_scale(static_cast<::dmi::ValueScale>(val)); |
| 2634 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2635 | break; |
| 2636 | } |
| 2637 | // int32 precision = 4; |
| 2638 | case 4: { |
| 2639 | if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; |
| 2640 | msg->set_precision(::google::protobuf::internal::ReadVarint(&ptr)); |
| 2641 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2642 | break; |
| 2643 | } |
| 2644 | // .dmi.SensorStatus status = 5; |
| 2645 | case 5: { |
| 2646 | if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; |
| 2647 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 2648 | msg->set_status(static_cast<::dmi::SensorStatus>(val)); |
| 2649 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2650 | break; |
| 2651 | } |
| 2652 | // string units_display = 6; |
| 2653 | case 6: { |
| 2654 | if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; |
| 2655 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 2656 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2657 | ctx->extra_parse_data().SetFieldName("dmi.ComponentSensorData.units_display"); |
| 2658 | object = msg->mutable_units_display(); |
| 2659 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 2660 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 2661 | goto string_till_end; |
| 2662 | } |
| 2663 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 2664 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 2665 | ptr += size; |
| 2666 | break; |
| 2667 | } |
| 2668 | // .google.protobuf.Timestamp timestamp = 7; |
| 2669 | case 7: { |
| 2670 | if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; |
| 2671 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 2672 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2673 | parser_till_end = ::google::protobuf::Timestamp::_InternalParse; |
| 2674 | object = msg->mutable_timestamp(); |
| 2675 | if (size > end - ptr) goto len_delim_till_end; |
| 2676 | ptr += size; |
| 2677 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 2678 | {parser_till_end, object}, ptr - size, ptr)); |
| 2679 | break; |
| 2680 | } |
| 2681 | // uint32 value_update_rate = 8; |
| 2682 | case 8: { |
| 2683 | if (static_cast<::google::protobuf::uint8>(tag) != 64) goto handle_unusual; |
| 2684 | msg->set_value_update_rate(::google::protobuf::internal::ReadVarint(&ptr)); |
| 2685 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2686 | break; |
| 2687 | } |
| 2688 | // string data_type = 9; |
| 2689 | case 9: { |
| 2690 | if (static_cast<::google::protobuf::uint8>(tag) != 74) goto handle_unusual; |
| 2691 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 2692 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 2693 | ctx->extra_parse_data().SetFieldName("dmi.ComponentSensorData.data_type"); |
| 2694 | object = msg->mutable_data_type(); |
| 2695 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 2696 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 2697 | goto string_till_end; |
| 2698 | } |
| 2699 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 2700 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 2701 | ptr += size; |
| 2702 | break; |
| 2703 | } |
| 2704 | default: { |
| 2705 | handle_unusual: |
| 2706 | if ((tag & 7) == 4 || tag == 0) { |
| 2707 | ctx->EndGroup(tag); |
| 2708 | return ptr; |
| 2709 | } |
| 2710 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 2711 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 2712 | ptr = res.first; |
| 2713 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 2714 | if (res.second) return ptr; |
| 2715 | } |
| 2716 | } // switch |
| 2717 | } // while |
| 2718 | return ptr; |
| 2719 | string_till_end: |
| 2720 | static_cast<::std::string*>(object)->clear(); |
| 2721 | static_cast<::std::string*>(object)->reserve(size); |
| 2722 | goto len_delim_till_end; |
| 2723 | len_delim_till_end: |
| 2724 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 2725 | {parser_till_end, object}, size); |
| 2726 | } |
| 2727 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2728 | bool ComponentSensorData::MergePartialFromCodedStream( |
| 2729 | ::google::protobuf::io::CodedInputStream* input) { |
| 2730 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 2731 | ::google::protobuf::uint32 tag; |
| 2732 | // @@protoc_insertion_point(parse_start:dmi.ComponentSensorData) |
| 2733 | for (;;) { |
| 2734 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 2735 | tag = p.first; |
| 2736 | if (!p.second) goto handle_unusual; |
| 2737 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 2738 | // int32 value = 1; |
| 2739 | case 1: { |
| 2740 | if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { |
| 2741 | |
| 2742 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2743 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2744 | input, &value_))); |
| 2745 | } else { |
| 2746 | goto handle_unusual; |
| 2747 | } |
| 2748 | break; |
| 2749 | } |
| 2750 | |
| 2751 | // .dmi.DataValueType type = 2; |
| 2752 | case 2: { |
| 2753 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 2754 | int value = 0; |
| 2755 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2756 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2757 | input, &value))); |
| 2758 | set_type(static_cast< ::dmi::DataValueType >(value)); |
| 2759 | } else { |
| 2760 | goto handle_unusual; |
| 2761 | } |
| 2762 | break; |
| 2763 | } |
| 2764 | |
| 2765 | // .dmi.ValueScale scale = 3; |
| 2766 | case 3: { |
| 2767 | if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { |
| 2768 | int value = 0; |
| 2769 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2770 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2771 | input, &value))); |
| 2772 | set_scale(static_cast< ::dmi::ValueScale >(value)); |
| 2773 | } else { |
| 2774 | goto handle_unusual; |
| 2775 | } |
| 2776 | break; |
| 2777 | } |
| 2778 | |
| 2779 | // int32 precision = 4; |
| 2780 | case 4: { |
| 2781 | if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { |
| 2782 | |
| 2783 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2784 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 2785 | input, &precision_))); |
| 2786 | } else { |
| 2787 | goto handle_unusual; |
| 2788 | } |
| 2789 | break; |
| 2790 | } |
| 2791 | |
| 2792 | // .dmi.SensorStatus status = 5; |
| 2793 | case 5: { |
| 2794 | if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { |
| 2795 | int value = 0; |
| 2796 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2797 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 2798 | input, &value))); |
| 2799 | set_status(static_cast< ::dmi::SensorStatus >(value)); |
| 2800 | } else { |
| 2801 | goto handle_unusual; |
| 2802 | } |
| 2803 | break; |
| 2804 | } |
| 2805 | |
| 2806 | // string units_display = 6; |
| 2807 | case 6: { |
| 2808 | if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { |
| 2809 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 2810 | input, this->mutable_units_display())); |
| 2811 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2812 | this->units_display().data(), static_cast<int>(this->units_display().length()), |
| 2813 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 2814 | "dmi.ComponentSensorData.units_display")); |
| 2815 | } else { |
| 2816 | goto handle_unusual; |
| 2817 | } |
| 2818 | break; |
| 2819 | } |
| 2820 | |
| 2821 | // .google.protobuf.Timestamp timestamp = 7; |
| 2822 | case 7: { |
| 2823 | if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) { |
| 2824 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 2825 | input, mutable_timestamp())); |
| 2826 | } else { |
| 2827 | goto handle_unusual; |
| 2828 | } |
| 2829 | break; |
| 2830 | } |
| 2831 | |
| 2832 | // uint32 value_update_rate = 8; |
| 2833 | case 8: { |
| 2834 | if (static_cast< ::google::protobuf::uint8>(tag) == (64 & 0xFF)) { |
| 2835 | |
| 2836 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 2837 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 2838 | input, &value_update_rate_))); |
| 2839 | } else { |
| 2840 | goto handle_unusual; |
| 2841 | } |
| 2842 | break; |
| 2843 | } |
| 2844 | |
| 2845 | // string data_type = 9; |
| 2846 | case 9: { |
| 2847 | if (static_cast< ::google::protobuf::uint8>(tag) == (74 & 0xFF)) { |
| 2848 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 2849 | input, this->mutable_data_type())); |
| 2850 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2851 | this->data_type().data(), static_cast<int>(this->data_type().length()), |
| 2852 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 2853 | "dmi.ComponentSensorData.data_type")); |
| 2854 | } else { |
| 2855 | goto handle_unusual; |
| 2856 | } |
| 2857 | break; |
| 2858 | } |
| 2859 | |
| 2860 | default: { |
| 2861 | handle_unusual: |
| 2862 | if (tag == 0) { |
| 2863 | goto success; |
| 2864 | } |
| 2865 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 2866 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 2867 | break; |
| 2868 | } |
| 2869 | } |
| 2870 | } |
| 2871 | success: |
| 2872 | // @@protoc_insertion_point(parse_success:dmi.ComponentSensorData) |
| 2873 | return true; |
| 2874 | failure: |
| 2875 | // @@protoc_insertion_point(parse_failure:dmi.ComponentSensorData) |
| 2876 | return false; |
| 2877 | #undef DO_ |
| 2878 | } |
| 2879 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 2880 | |
| 2881 | void ComponentSensorData::SerializeWithCachedSizes( |
| 2882 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 2883 | // @@protoc_insertion_point(serialize_start:dmi.ComponentSensorData) |
| 2884 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2885 | (void) cached_has_bits; |
| 2886 | |
| 2887 | // int32 value = 1; |
| 2888 | if (this->value() != 0) { |
| 2889 | ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->value(), output); |
| 2890 | } |
| 2891 | |
| 2892 | // .dmi.DataValueType type = 2; |
| 2893 | if (this->type() != 0) { |
| 2894 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2895 | 2, this->type(), output); |
| 2896 | } |
| 2897 | |
| 2898 | // .dmi.ValueScale scale = 3; |
| 2899 | if (this->scale() != 0) { |
| 2900 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2901 | 3, this->scale(), output); |
| 2902 | } |
| 2903 | |
| 2904 | // int32 precision = 4; |
| 2905 | if (this->precision() != 0) { |
| 2906 | ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->precision(), output); |
| 2907 | } |
| 2908 | |
| 2909 | // .dmi.SensorStatus status = 5; |
| 2910 | if (this->status() != 0) { |
| 2911 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2912 | 5, this->status(), output); |
| 2913 | } |
| 2914 | |
| 2915 | // string units_display = 6; |
| 2916 | if (this->units_display().size() > 0) { |
| 2917 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2918 | this->units_display().data(), static_cast<int>(this->units_display().length()), |
| 2919 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 2920 | "dmi.ComponentSensorData.units_display"); |
| 2921 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 2922 | 6, this->units_display(), output); |
| 2923 | } |
| 2924 | |
| 2925 | // .google.protobuf.Timestamp timestamp = 7; |
| 2926 | if (this->has_timestamp()) { |
| 2927 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 2928 | 7, HasBitSetters::timestamp(this), output); |
| 2929 | } |
| 2930 | |
| 2931 | // uint32 value_update_rate = 8; |
| 2932 | if (this->value_update_rate() != 0) { |
| 2933 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->value_update_rate(), output); |
| 2934 | } |
| 2935 | |
| 2936 | // string data_type = 9; |
| 2937 | if (this->data_type().size() > 0) { |
| 2938 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2939 | this->data_type().data(), static_cast<int>(this->data_type().length()), |
| 2940 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 2941 | "dmi.ComponentSensorData.data_type"); |
| 2942 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 2943 | 9, this->data_type(), output); |
| 2944 | } |
| 2945 | |
| 2946 | if (_internal_metadata_.have_unknown_fields()) { |
| 2947 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 2948 | _internal_metadata_.unknown_fields(), output); |
| 2949 | } |
| 2950 | // @@protoc_insertion_point(serialize_end:dmi.ComponentSensorData) |
| 2951 | } |
| 2952 | |
| 2953 | ::google::protobuf::uint8* ComponentSensorData::InternalSerializeWithCachedSizesToArray( |
| 2954 | ::google::protobuf::uint8* target) const { |
| 2955 | // @@protoc_insertion_point(serialize_to_array_start:dmi.ComponentSensorData) |
| 2956 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 2957 | (void) cached_has_bits; |
| 2958 | |
| 2959 | // int32 value = 1; |
| 2960 | if (this->value() != 0) { |
| 2961 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->value(), target); |
| 2962 | } |
| 2963 | |
| 2964 | // .dmi.DataValueType type = 2; |
| 2965 | if (this->type() != 0) { |
| 2966 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2967 | 2, this->type(), target); |
| 2968 | } |
| 2969 | |
| 2970 | // .dmi.ValueScale scale = 3; |
| 2971 | if (this->scale() != 0) { |
| 2972 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2973 | 3, this->scale(), target); |
| 2974 | } |
| 2975 | |
| 2976 | // int32 precision = 4; |
| 2977 | if (this->precision() != 0) { |
| 2978 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->precision(), target); |
| 2979 | } |
| 2980 | |
| 2981 | // .dmi.SensorStatus status = 5; |
| 2982 | if (this->status() != 0) { |
| 2983 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2984 | 5, this->status(), target); |
| 2985 | } |
| 2986 | |
| 2987 | // string units_display = 6; |
| 2988 | if (this->units_display().size() > 0) { |
| 2989 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 2990 | this->units_display().data(), static_cast<int>(this->units_display().length()), |
| 2991 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 2992 | "dmi.ComponentSensorData.units_display"); |
| 2993 | target = |
| 2994 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 2995 | 6, this->units_display(), target); |
| 2996 | } |
| 2997 | |
| 2998 | // .google.protobuf.Timestamp timestamp = 7; |
| 2999 | if (this->has_timestamp()) { |
| 3000 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3001 | InternalWriteMessageToArray( |
| 3002 | 7, HasBitSetters::timestamp(this), target); |
| 3003 | } |
| 3004 | |
| 3005 | // uint32 value_update_rate = 8; |
| 3006 | if (this->value_update_rate() != 0) { |
| 3007 | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->value_update_rate(), target); |
| 3008 | } |
| 3009 | |
| 3010 | // string data_type = 9; |
| 3011 | if (this->data_type().size() > 0) { |
| 3012 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3013 | this->data_type().data(), static_cast<int>(this->data_type().length()), |
| 3014 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3015 | "dmi.ComponentSensorData.data_type"); |
| 3016 | target = |
| 3017 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 3018 | 9, this->data_type(), target); |
| 3019 | } |
| 3020 | |
| 3021 | if (_internal_metadata_.have_unknown_fields()) { |
| 3022 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 3023 | _internal_metadata_.unknown_fields(), target); |
| 3024 | } |
| 3025 | // @@protoc_insertion_point(serialize_to_array_end:dmi.ComponentSensorData) |
| 3026 | return target; |
| 3027 | } |
| 3028 | |
| 3029 | size_t ComponentSensorData::ByteSizeLong() const { |
| 3030 | // @@protoc_insertion_point(message_byte_size_start:dmi.ComponentSensorData) |
| 3031 | size_t total_size = 0; |
| 3032 | |
| 3033 | if (_internal_metadata_.have_unknown_fields()) { |
| 3034 | total_size += |
| 3035 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 3036 | _internal_metadata_.unknown_fields()); |
| 3037 | } |
| 3038 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3039 | // Prevent compiler warnings about cached_has_bits being unused |
| 3040 | (void) cached_has_bits; |
| 3041 | |
| 3042 | // string units_display = 6; |
| 3043 | if (this->units_display().size() > 0) { |
| 3044 | total_size += 1 + |
| 3045 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3046 | this->units_display()); |
| 3047 | } |
| 3048 | |
| 3049 | // string data_type = 9; |
| 3050 | if (this->data_type().size() > 0) { |
| 3051 | total_size += 1 + |
| 3052 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3053 | this->data_type()); |
| 3054 | } |
| 3055 | |
| 3056 | // .google.protobuf.Timestamp timestamp = 7; |
| 3057 | if (this->has_timestamp()) { |
| 3058 | total_size += 1 + |
| 3059 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 3060 | *timestamp_); |
| 3061 | } |
| 3062 | |
| 3063 | // int32 value = 1; |
| 3064 | if (this->value() != 0) { |
| 3065 | total_size += 1 + |
| 3066 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 3067 | this->value()); |
| 3068 | } |
| 3069 | |
| 3070 | // .dmi.DataValueType type = 2; |
| 3071 | if (this->type() != 0) { |
| 3072 | total_size += 1 + |
| 3073 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); |
| 3074 | } |
| 3075 | |
| 3076 | // .dmi.ValueScale scale = 3; |
| 3077 | if (this->scale() != 0) { |
| 3078 | total_size += 1 + |
| 3079 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->scale()); |
| 3080 | } |
| 3081 | |
| 3082 | // int32 precision = 4; |
| 3083 | if (this->precision() != 0) { |
| 3084 | total_size += 1 + |
| 3085 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 3086 | this->precision()); |
| 3087 | } |
| 3088 | |
| 3089 | // .dmi.SensorStatus status = 5; |
| 3090 | if (this->status() != 0) { |
| 3091 | total_size += 1 + |
| 3092 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); |
| 3093 | } |
| 3094 | |
| 3095 | // uint32 value_update_rate = 8; |
| 3096 | if (this->value_update_rate() != 0) { |
| 3097 | total_size += 1 + |
| 3098 | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
| 3099 | this->value_update_rate()); |
| 3100 | } |
| 3101 | |
| 3102 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 3103 | SetCachedSize(cached_size); |
| 3104 | return total_size; |
| 3105 | } |
| 3106 | |
| 3107 | void ComponentSensorData::MergeFrom(const ::google::protobuf::Message& from) { |
| 3108 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.ComponentSensorData) |
| 3109 | GOOGLE_DCHECK_NE(&from, this); |
| 3110 | const ComponentSensorData* source = |
| 3111 | ::google::protobuf::DynamicCastToGenerated<ComponentSensorData>( |
| 3112 | &from); |
| 3113 | if (source == nullptr) { |
| 3114 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.ComponentSensorData) |
| 3115 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 3116 | } else { |
| 3117 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.ComponentSensorData) |
| 3118 | MergeFrom(*source); |
| 3119 | } |
| 3120 | } |
| 3121 | |
| 3122 | void ComponentSensorData::MergeFrom(const ComponentSensorData& from) { |
| 3123 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.ComponentSensorData) |
| 3124 | GOOGLE_DCHECK_NE(&from, this); |
| 3125 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 3126 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3127 | (void) cached_has_bits; |
| 3128 | |
| 3129 | if (from.units_display().size() > 0) { |
| 3130 | |
| 3131 | units_display_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.units_display_); |
| 3132 | } |
| 3133 | if (from.data_type().size() > 0) { |
| 3134 | |
| 3135 | data_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_type_); |
| 3136 | } |
| 3137 | if (from.has_timestamp()) { |
| 3138 | mutable_timestamp()->::google::protobuf::Timestamp::MergeFrom(from.timestamp()); |
| 3139 | } |
| 3140 | if (from.value() != 0) { |
| 3141 | set_value(from.value()); |
| 3142 | } |
| 3143 | if (from.type() != 0) { |
| 3144 | set_type(from.type()); |
| 3145 | } |
| 3146 | if (from.scale() != 0) { |
| 3147 | set_scale(from.scale()); |
| 3148 | } |
| 3149 | if (from.precision() != 0) { |
| 3150 | set_precision(from.precision()); |
| 3151 | } |
| 3152 | if (from.status() != 0) { |
| 3153 | set_status(from.status()); |
| 3154 | } |
| 3155 | if (from.value_update_rate() != 0) { |
| 3156 | set_value_update_rate(from.value_update_rate()); |
| 3157 | } |
| 3158 | } |
| 3159 | |
| 3160 | void ComponentSensorData::CopyFrom(const ::google::protobuf::Message& from) { |
| 3161 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.ComponentSensorData) |
| 3162 | if (&from == this) return; |
| 3163 | Clear(); |
| 3164 | MergeFrom(from); |
| 3165 | } |
| 3166 | |
| 3167 | void ComponentSensorData::CopyFrom(const ComponentSensorData& from) { |
| 3168 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.ComponentSensorData) |
| 3169 | if (&from == this) return; |
| 3170 | Clear(); |
| 3171 | MergeFrom(from); |
| 3172 | } |
| 3173 | |
| 3174 | bool ComponentSensorData::IsInitialized() const { |
| 3175 | return true; |
| 3176 | } |
| 3177 | |
| 3178 | void ComponentSensorData::Swap(ComponentSensorData* other) { |
| 3179 | if (other == this) return; |
| 3180 | InternalSwap(other); |
| 3181 | } |
| 3182 | void ComponentSensorData::InternalSwap(ComponentSensorData* other) { |
| 3183 | using std::swap; |
| 3184 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 3185 | units_display_.Swap(&other->units_display_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3186 | GetArenaNoVirtual()); |
| 3187 | data_type_.Swap(&other->data_type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3188 | GetArenaNoVirtual()); |
| 3189 | swap(timestamp_, other->timestamp_); |
| 3190 | swap(value_, other->value_); |
| 3191 | swap(type_, other->type_); |
| 3192 | swap(scale_, other->scale_); |
| 3193 | swap(precision_, other->precision_); |
| 3194 | swap(status_, other->status_); |
| 3195 | swap(value_update_rate_, other->value_update_rate_); |
| 3196 | } |
| 3197 | |
| 3198 | ::google::protobuf::Metadata ComponentSensorData::GetMetadata() const { |
| 3199 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 3200 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 3201 | } |
| 3202 | |
| 3203 | |
| 3204 | // =================================================================== |
| 3205 | |
| 3206 | void PortComponentAttributes::InitAsDefaultInstance() { |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3207 | ::dmi::_PortComponentAttributes_default_instance_._instance.get_mutable()->pon_id_config_ = const_cast< ::dmi::PonIdConfig*>( |
| 3208 | ::dmi::PonIdConfig::internal_default_instance()); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3209 | } |
| 3210 | class PortComponentAttributes::HasBitSetters { |
| 3211 | public: |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3212 | static const ::dmi::PonIdConfig& pon_id_config(const PortComponentAttributes* msg); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3213 | }; |
| 3214 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3215 | const ::dmi::PonIdConfig& |
| 3216 | PortComponentAttributes::HasBitSetters::pon_id_config(const PortComponentAttributes* msg) { |
| 3217 | return *msg->pon_id_config_; |
| 3218 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3219 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 3220 | const int PortComponentAttributes::kConnectorTypeFieldNumber; |
| 3221 | const int PortComponentAttributes::kSpeedFieldNumber; |
| 3222 | const int PortComponentAttributes::kProtocolFieldNumber; |
| 3223 | const int PortComponentAttributes::kPhysicalLabelFieldNumber; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3224 | const int PortComponentAttributes::kMappingLabelFieldNumber; |
| 3225 | const int PortComponentAttributes::kPonIdConfigFieldNumber; |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3226 | const int PortComponentAttributes::kSpeedAutonegotiationFieldNumber; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3227 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 3228 | |
| 3229 | PortComponentAttributes::PortComponentAttributes() |
| 3230 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 3231 | SharedCtor(); |
| 3232 | // @@protoc_insertion_point(constructor:dmi.PortComponentAttributes) |
| 3233 | } |
| 3234 | PortComponentAttributes::PortComponentAttributes(const PortComponentAttributes& from) |
| 3235 | : ::google::protobuf::Message(), |
| 3236 | _internal_metadata_(nullptr) { |
| 3237 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 3238 | physical_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3239 | if (from.physical_label().size() > 0) { |
| 3240 | physical_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.physical_label_); |
| 3241 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3242 | mapping_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3243 | if (from.mapping_label().size() > 0) { |
| 3244 | mapping_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mapping_label_); |
| 3245 | } |
| 3246 | if (from.has_pon_id_config()) { |
| 3247 | pon_id_config_ = new ::dmi::PonIdConfig(*from.pon_id_config_); |
| 3248 | } else { |
| 3249 | pon_id_config_ = nullptr; |
| 3250 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3251 | ::memcpy(&connector_type_, &from.connector_type_, |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3252 | static_cast<size_t>(reinterpret_cast<char*>(&speed_autonegotiation_) - |
| 3253 | reinterpret_cast<char*>(&connector_type_)) + sizeof(speed_autonegotiation_)); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3254 | // @@protoc_insertion_point(copy_constructor:dmi.PortComponentAttributes) |
| 3255 | } |
| 3256 | |
| 3257 | void PortComponentAttributes::SharedCtor() { |
| 3258 | ::google::protobuf::internal::InitSCC( |
| 3259 | &scc_info_PortComponentAttributes_dmi_2fhw_2eproto.base); |
| 3260 | physical_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3261 | mapping_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3262 | ::memset(&pon_id_config_, 0, static_cast<size_t>( |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3263 | reinterpret_cast<char*>(&speed_autonegotiation_) - |
| 3264 | reinterpret_cast<char*>(&pon_id_config_)) + sizeof(speed_autonegotiation_)); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3265 | } |
| 3266 | |
| 3267 | PortComponentAttributes::~PortComponentAttributes() { |
| 3268 | // @@protoc_insertion_point(destructor:dmi.PortComponentAttributes) |
| 3269 | SharedDtor(); |
| 3270 | } |
| 3271 | |
| 3272 | void PortComponentAttributes::SharedDtor() { |
| 3273 | physical_label_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3274 | mapping_label_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3275 | if (this != internal_default_instance()) delete pon_id_config_; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3276 | } |
| 3277 | |
| 3278 | void PortComponentAttributes::SetCachedSize(int size) const { |
| 3279 | _cached_size_.Set(size); |
| 3280 | } |
| 3281 | const PortComponentAttributes& PortComponentAttributes::default_instance() { |
| 3282 | ::google::protobuf::internal::InitSCC(&::scc_info_PortComponentAttributes_dmi_2fhw_2eproto.base); |
| 3283 | return *internal_default_instance(); |
| 3284 | } |
| 3285 | |
| 3286 | |
| 3287 | void PortComponentAttributes::Clear() { |
| 3288 | // @@protoc_insertion_point(message_clear_start:dmi.PortComponentAttributes) |
| 3289 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3290 | // Prevent compiler warnings about cached_has_bits being unused |
| 3291 | (void) cached_has_bits; |
| 3292 | |
| 3293 | physical_label_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3294 | mapping_label_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 3295 | if (GetArenaNoVirtual() == nullptr && pon_id_config_ != nullptr) { |
| 3296 | delete pon_id_config_; |
| 3297 | } |
| 3298 | pon_id_config_ = nullptr; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3299 | ::memset(&connector_type_, 0, static_cast<size_t>( |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3300 | reinterpret_cast<char*>(&speed_autonegotiation_) - |
| 3301 | reinterpret_cast<char*>(&connector_type_)) + sizeof(speed_autonegotiation_)); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3302 | _internal_metadata_.Clear(); |
| 3303 | } |
| 3304 | |
| 3305 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 3306 | const char* PortComponentAttributes::_InternalParse(const char* begin, const char* end, void* object, |
| 3307 | ::google::protobuf::internal::ParseContext* ctx) { |
| 3308 | auto msg = static_cast<PortComponentAttributes*>(object); |
| 3309 | ::google::protobuf::int32 size; (void)size; |
| 3310 | int depth; (void)depth; |
| 3311 | ::google::protobuf::uint32 tag; |
| 3312 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 3313 | auto ptr = begin; |
| 3314 | while (ptr < end) { |
| 3315 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 3316 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3317 | switch (tag >> 3) { |
| 3318 | // .dmi.PortComponentAttributes.ConnectorType connector_type = 1; |
| 3319 | case 1: { |
| 3320 | if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; |
| 3321 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 3322 | msg->set_connector_type(static_cast<::dmi::PortComponentAttributes_ConnectorType>(val)); |
| 3323 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3324 | break; |
| 3325 | } |
| 3326 | // .dmi.PortComponentAttributes.Speed speed = 2; |
| 3327 | case 2: { |
| 3328 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 3329 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 3330 | msg->set_speed(static_cast<::dmi::PortComponentAttributes_Speed>(val)); |
| 3331 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3332 | break; |
| 3333 | } |
| 3334 | // .dmi.PortComponentAttributes.Protocol protocol = 3; |
| 3335 | case 3: { |
| 3336 | if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; |
| 3337 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 3338 | msg->set_protocol(static_cast<::dmi::PortComponentAttributes_Protocol>(val)); |
| 3339 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3340 | break; |
| 3341 | } |
| 3342 | // string physical_label = 4; |
| 3343 | case 4: { |
| 3344 | if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; |
| 3345 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 3346 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3347 | ctx->extra_parse_data().SetFieldName("dmi.PortComponentAttributes.physical_label"); |
| 3348 | object = msg->mutable_physical_label(); |
| 3349 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 3350 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 3351 | goto string_till_end; |
| 3352 | } |
| 3353 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 3354 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 3355 | ptr += size; |
| 3356 | break; |
| 3357 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3358 | // string mapping_label = 5; |
| 3359 | case 5: { |
| 3360 | if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; |
| 3361 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 3362 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3363 | ctx->extra_parse_data().SetFieldName("dmi.PortComponentAttributes.mapping_label"); |
| 3364 | object = msg->mutable_mapping_label(); |
| 3365 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 3366 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 3367 | goto string_till_end; |
| 3368 | } |
| 3369 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 3370 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 3371 | ptr += size; |
| 3372 | break; |
| 3373 | } |
| 3374 | // .dmi.PonIdConfig pon_id_config = 6; |
| 3375 | case 6: { |
| 3376 | if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; |
| 3377 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 3378 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3379 | parser_till_end = ::dmi::PonIdConfig::_InternalParse; |
| 3380 | object = msg->mutable_pon_id_config(); |
| 3381 | if (size > end - ptr) goto len_delim_till_end; |
| 3382 | ptr += size; |
| 3383 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 3384 | {parser_till_end, object}, ptr - size, ptr)); |
| 3385 | break; |
| 3386 | } |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3387 | // bool speed_autonegotiation = 7; |
| 3388 | case 7: { |
| 3389 | if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual; |
| 3390 | msg->set_speed_autonegotiation(::google::protobuf::internal::ReadVarint(&ptr)); |
| 3391 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3392 | break; |
| 3393 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3394 | default: { |
| 3395 | handle_unusual: |
| 3396 | if ((tag & 7) == 4 || tag == 0) { |
| 3397 | ctx->EndGroup(tag); |
| 3398 | return ptr; |
| 3399 | } |
| 3400 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 3401 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 3402 | ptr = res.first; |
| 3403 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 3404 | if (res.second) return ptr; |
| 3405 | } |
| 3406 | } // switch |
| 3407 | } // while |
| 3408 | return ptr; |
| 3409 | string_till_end: |
| 3410 | static_cast<::std::string*>(object)->clear(); |
| 3411 | static_cast<::std::string*>(object)->reserve(size); |
| 3412 | goto len_delim_till_end; |
| 3413 | len_delim_till_end: |
| 3414 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 3415 | {parser_till_end, object}, size); |
| 3416 | } |
| 3417 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 3418 | bool PortComponentAttributes::MergePartialFromCodedStream( |
| 3419 | ::google::protobuf::io::CodedInputStream* input) { |
| 3420 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 3421 | ::google::protobuf::uint32 tag; |
| 3422 | // @@protoc_insertion_point(parse_start:dmi.PortComponentAttributes) |
| 3423 | for (;;) { |
| 3424 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 3425 | tag = p.first; |
| 3426 | if (!p.second) goto handle_unusual; |
| 3427 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 3428 | // .dmi.PortComponentAttributes.ConnectorType connector_type = 1; |
| 3429 | case 1: { |
| 3430 | if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { |
| 3431 | int value = 0; |
| 3432 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 3433 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 3434 | input, &value))); |
| 3435 | set_connector_type(static_cast< ::dmi::PortComponentAttributes_ConnectorType >(value)); |
| 3436 | } else { |
| 3437 | goto handle_unusual; |
| 3438 | } |
| 3439 | break; |
| 3440 | } |
| 3441 | |
| 3442 | // .dmi.PortComponentAttributes.Speed speed = 2; |
| 3443 | case 2: { |
| 3444 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 3445 | int value = 0; |
| 3446 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 3447 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 3448 | input, &value))); |
| 3449 | set_speed(static_cast< ::dmi::PortComponentAttributes_Speed >(value)); |
| 3450 | } else { |
| 3451 | goto handle_unusual; |
| 3452 | } |
| 3453 | break; |
| 3454 | } |
| 3455 | |
| 3456 | // .dmi.PortComponentAttributes.Protocol protocol = 3; |
| 3457 | case 3: { |
| 3458 | if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { |
| 3459 | int value = 0; |
| 3460 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 3461 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 3462 | input, &value))); |
| 3463 | set_protocol(static_cast< ::dmi::PortComponentAttributes_Protocol >(value)); |
| 3464 | } else { |
| 3465 | goto handle_unusual; |
| 3466 | } |
| 3467 | break; |
| 3468 | } |
| 3469 | |
| 3470 | // string physical_label = 4; |
| 3471 | case 4: { |
| 3472 | if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { |
| 3473 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 3474 | input, this->mutable_physical_label())); |
| 3475 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3476 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 3477 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 3478 | "dmi.PortComponentAttributes.physical_label")); |
| 3479 | } else { |
| 3480 | goto handle_unusual; |
| 3481 | } |
| 3482 | break; |
| 3483 | } |
| 3484 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3485 | // string mapping_label = 5; |
| 3486 | case 5: { |
| 3487 | if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { |
| 3488 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 3489 | input, this->mutable_mapping_label())); |
| 3490 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3491 | this->mapping_label().data(), static_cast<int>(this->mapping_label().length()), |
| 3492 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 3493 | "dmi.PortComponentAttributes.mapping_label")); |
| 3494 | } else { |
| 3495 | goto handle_unusual; |
| 3496 | } |
| 3497 | break; |
| 3498 | } |
| 3499 | |
| 3500 | // .dmi.PonIdConfig pon_id_config = 6; |
| 3501 | case 6: { |
| 3502 | if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { |
| 3503 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 3504 | input, mutable_pon_id_config())); |
| 3505 | } else { |
| 3506 | goto handle_unusual; |
| 3507 | } |
| 3508 | break; |
| 3509 | } |
| 3510 | |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3511 | // bool speed_autonegotiation = 7; |
| 3512 | case 7: { |
| 3513 | if (static_cast< ::google::protobuf::uint8>(tag) == (56 & 0xFF)) { |
| 3514 | |
| 3515 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 3516 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 3517 | input, &speed_autonegotiation_))); |
| 3518 | } else { |
| 3519 | goto handle_unusual; |
| 3520 | } |
| 3521 | break; |
| 3522 | } |
| 3523 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3524 | default: { |
| 3525 | handle_unusual: |
| 3526 | if (tag == 0) { |
| 3527 | goto success; |
| 3528 | } |
| 3529 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 3530 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 3531 | break; |
| 3532 | } |
| 3533 | } |
| 3534 | } |
| 3535 | success: |
| 3536 | // @@protoc_insertion_point(parse_success:dmi.PortComponentAttributes) |
| 3537 | return true; |
| 3538 | failure: |
| 3539 | // @@protoc_insertion_point(parse_failure:dmi.PortComponentAttributes) |
| 3540 | return false; |
| 3541 | #undef DO_ |
| 3542 | } |
| 3543 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 3544 | |
| 3545 | void PortComponentAttributes::SerializeWithCachedSizes( |
| 3546 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 3547 | // @@protoc_insertion_point(serialize_start:dmi.PortComponentAttributes) |
| 3548 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3549 | (void) cached_has_bits; |
| 3550 | |
| 3551 | // .dmi.PortComponentAttributes.ConnectorType connector_type = 1; |
| 3552 | if (this->connector_type() != 0) { |
| 3553 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 3554 | 1, this->connector_type(), output); |
| 3555 | } |
| 3556 | |
| 3557 | // .dmi.PortComponentAttributes.Speed speed = 2; |
| 3558 | if (this->speed() != 0) { |
| 3559 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 3560 | 2, this->speed(), output); |
| 3561 | } |
| 3562 | |
| 3563 | // .dmi.PortComponentAttributes.Protocol protocol = 3; |
| 3564 | if (this->protocol() != 0) { |
| 3565 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 3566 | 3, this->protocol(), output); |
| 3567 | } |
| 3568 | |
| 3569 | // string physical_label = 4; |
| 3570 | if (this->physical_label().size() > 0) { |
| 3571 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3572 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 3573 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3574 | "dmi.PortComponentAttributes.physical_label"); |
| 3575 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 3576 | 4, this->physical_label(), output); |
| 3577 | } |
| 3578 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3579 | // string mapping_label = 5; |
| 3580 | if (this->mapping_label().size() > 0) { |
| 3581 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3582 | this->mapping_label().data(), static_cast<int>(this->mapping_label().length()), |
| 3583 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3584 | "dmi.PortComponentAttributes.mapping_label"); |
| 3585 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 3586 | 5, this->mapping_label(), output); |
| 3587 | } |
| 3588 | |
| 3589 | // .dmi.PonIdConfig pon_id_config = 6; |
| 3590 | if (this->has_pon_id_config()) { |
| 3591 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3592 | 6, HasBitSetters::pon_id_config(this), output); |
| 3593 | } |
| 3594 | |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3595 | // bool speed_autonegotiation = 7; |
| 3596 | if (this->speed_autonegotiation() != 0) { |
| 3597 | ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->speed_autonegotiation(), output); |
| 3598 | } |
| 3599 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3600 | if (_internal_metadata_.have_unknown_fields()) { |
| 3601 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 3602 | _internal_metadata_.unknown_fields(), output); |
| 3603 | } |
| 3604 | // @@protoc_insertion_point(serialize_end:dmi.PortComponentAttributes) |
| 3605 | } |
| 3606 | |
| 3607 | ::google::protobuf::uint8* PortComponentAttributes::InternalSerializeWithCachedSizesToArray( |
| 3608 | ::google::protobuf::uint8* target) const { |
| 3609 | // @@protoc_insertion_point(serialize_to_array_start:dmi.PortComponentAttributes) |
| 3610 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3611 | (void) cached_has_bits; |
| 3612 | |
| 3613 | // .dmi.PortComponentAttributes.ConnectorType connector_type = 1; |
| 3614 | if (this->connector_type() != 0) { |
| 3615 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 3616 | 1, this->connector_type(), target); |
| 3617 | } |
| 3618 | |
| 3619 | // .dmi.PortComponentAttributes.Speed speed = 2; |
| 3620 | if (this->speed() != 0) { |
| 3621 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 3622 | 2, this->speed(), target); |
| 3623 | } |
| 3624 | |
| 3625 | // .dmi.PortComponentAttributes.Protocol protocol = 3; |
| 3626 | if (this->protocol() != 0) { |
| 3627 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 3628 | 3, this->protocol(), target); |
| 3629 | } |
| 3630 | |
| 3631 | // string physical_label = 4; |
| 3632 | if (this->physical_label().size() > 0) { |
| 3633 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3634 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 3635 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3636 | "dmi.PortComponentAttributes.physical_label"); |
| 3637 | target = |
| 3638 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 3639 | 4, this->physical_label(), target); |
| 3640 | } |
| 3641 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3642 | // string mapping_label = 5; |
| 3643 | if (this->mapping_label().size() > 0) { |
| 3644 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 3645 | this->mapping_label().data(), static_cast<int>(this->mapping_label().length()), |
| 3646 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 3647 | "dmi.PortComponentAttributes.mapping_label"); |
| 3648 | target = |
| 3649 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 3650 | 5, this->mapping_label(), target); |
| 3651 | } |
| 3652 | |
| 3653 | // .dmi.PonIdConfig pon_id_config = 6; |
| 3654 | if (this->has_pon_id_config()) { |
| 3655 | target = ::google::protobuf::internal::WireFormatLite:: |
| 3656 | InternalWriteMessageToArray( |
| 3657 | 6, HasBitSetters::pon_id_config(this), target); |
| 3658 | } |
| 3659 | |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3660 | // bool speed_autonegotiation = 7; |
| 3661 | if (this->speed_autonegotiation() != 0) { |
| 3662 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->speed_autonegotiation(), target); |
| 3663 | } |
| 3664 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3665 | if (_internal_metadata_.have_unknown_fields()) { |
| 3666 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 3667 | _internal_metadata_.unknown_fields(), target); |
| 3668 | } |
| 3669 | // @@protoc_insertion_point(serialize_to_array_end:dmi.PortComponentAttributes) |
| 3670 | return target; |
| 3671 | } |
| 3672 | |
| 3673 | size_t PortComponentAttributes::ByteSizeLong() const { |
| 3674 | // @@protoc_insertion_point(message_byte_size_start:dmi.PortComponentAttributes) |
| 3675 | size_t total_size = 0; |
| 3676 | |
| 3677 | if (_internal_metadata_.have_unknown_fields()) { |
| 3678 | total_size += |
| 3679 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 3680 | _internal_metadata_.unknown_fields()); |
| 3681 | } |
| 3682 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3683 | // Prevent compiler warnings about cached_has_bits being unused |
| 3684 | (void) cached_has_bits; |
| 3685 | |
| 3686 | // string physical_label = 4; |
| 3687 | if (this->physical_label().size() > 0) { |
| 3688 | total_size += 1 + |
| 3689 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3690 | this->physical_label()); |
| 3691 | } |
| 3692 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3693 | // string mapping_label = 5; |
| 3694 | if (this->mapping_label().size() > 0) { |
| 3695 | total_size += 1 + |
| 3696 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 3697 | this->mapping_label()); |
| 3698 | } |
| 3699 | |
| 3700 | // .dmi.PonIdConfig pon_id_config = 6; |
| 3701 | if (this->has_pon_id_config()) { |
| 3702 | total_size += 1 + |
| 3703 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 3704 | *pon_id_config_); |
| 3705 | } |
| 3706 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3707 | // .dmi.PortComponentAttributes.ConnectorType connector_type = 1; |
| 3708 | if (this->connector_type() != 0) { |
| 3709 | total_size += 1 + |
| 3710 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->connector_type()); |
| 3711 | } |
| 3712 | |
| 3713 | // .dmi.PortComponentAttributes.Speed speed = 2; |
| 3714 | if (this->speed() != 0) { |
| 3715 | total_size += 1 + |
| 3716 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->speed()); |
| 3717 | } |
| 3718 | |
| 3719 | // .dmi.PortComponentAttributes.Protocol protocol = 3; |
| 3720 | if (this->protocol() != 0) { |
| 3721 | total_size += 1 + |
| 3722 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->protocol()); |
| 3723 | } |
| 3724 | |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3725 | // bool speed_autonegotiation = 7; |
| 3726 | if (this->speed_autonegotiation() != 0) { |
| 3727 | total_size += 1 + 1; |
| 3728 | } |
| 3729 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3730 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 3731 | SetCachedSize(cached_size); |
| 3732 | return total_size; |
| 3733 | } |
| 3734 | |
| 3735 | void PortComponentAttributes::MergeFrom(const ::google::protobuf::Message& from) { |
| 3736 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.PortComponentAttributes) |
| 3737 | GOOGLE_DCHECK_NE(&from, this); |
| 3738 | const PortComponentAttributes* source = |
| 3739 | ::google::protobuf::DynamicCastToGenerated<PortComponentAttributes>( |
| 3740 | &from); |
| 3741 | if (source == nullptr) { |
| 3742 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.PortComponentAttributes) |
| 3743 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 3744 | } else { |
| 3745 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.PortComponentAttributes) |
| 3746 | MergeFrom(*source); |
| 3747 | } |
| 3748 | } |
| 3749 | |
| 3750 | void PortComponentAttributes::MergeFrom(const PortComponentAttributes& from) { |
| 3751 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.PortComponentAttributes) |
| 3752 | GOOGLE_DCHECK_NE(&from, this); |
| 3753 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 3754 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3755 | (void) cached_has_bits; |
| 3756 | |
| 3757 | if (from.physical_label().size() > 0) { |
| 3758 | |
| 3759 | physical_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.physical_label_); |
| 3760 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3761 | if (from.mapping_label().size() > 0) { |
| 3762 | |
| 3763 | mapping_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mapping_label_); |
| 3764 | } |
| 3765 | if (from.has_pon_id_config()) { |
| 3766 | mutable_pon_id_config()->::dmi::PonIdConfig::MergeFrom(from.pon_id_config()); |
| 3767 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3768 | if (from.connector_type() != 0) { |
| 3769 | set_connector_type(from.connector_type()); |
| 3770 | } |
| 3771 | if (from.speed() != 0) { |
| 3772 | set_speed(from.speed()); |
| 3773 | } |
| 3774 | if (from.protocol() != 0) { |
| 3775 | set_protocol(from.protocol()); |
| 3776 | } |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3777 | if (from.speed_autonegotiation() != 0) { |
| 3778 | set_speed_autonegotiation(from.speed_autonegotiation()); |
| 3779 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3780 | } |
| 3781 | |
| 3782 | void PortComponentAttributes::CopyFrom(const ::google::protobuf::Message& from) { |
| 3783 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.PortComponentAttributes) |
| 3784 | if (&from == this) return; |
| 3785 | Clear(); |
| 3786 | MergeFrom(from); |
| 3787 | } |
| 3788 | |
| 3789 | void PortComponentAttributes::CopyFrom(const PortComponentAttributes& from) { |
| 3790 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.PortComponentAttributes) |
| 3791 | if (&from == this) return; |
| 3792 | Clear(); |
| 3793 | MergeFrom(from); |
| 3794 | } |
| 3795 | |
| 3796 | bool PortComponentAttributes::IsInitialized() const { |
| 3797 | return true; |
| 3798 | } |
| 3799 | |
| 3800 | void PortComponentAttributes::Swap(PortComponentAttributes* other) { |
| 3801 | if (other == this) return; |
| 3802 | InternalSwap(other); |
| 3803 | } |
| 3804 | void PortComponentAttributes::InternalSwap(PortComponentAttributes* other) { |
| 3805 | using std::swap; |
| 3806 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 3807 | physical_label_.Swap(&other->physical_label_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3808 | GetArenaNoVirtual()); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3809 | mapping_label_.Swap(&other->mapping_label_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 3810 | GetArenaNoVirtual()); |
| 3811 | swap(pon_id_config_, other->pon_id_config_); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3812 | swap(connector_type_, other->connector_type_); |
| 3813 | swap(speed_, other->speed_); |
| 3814 | swap(protocol_, other->protocol_); |
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 3815 | swap(speed_autonegotiation_, other->speed_autonegotiation_); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 3816 | } |
| 3817 | |
| 3818 | ::google::protobuf::Metadata PortComponentAttributes::GetMetadata() const { |
| 3819 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 3820 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 3821 | } |
| 3822 | |
| 3823 | |
| 3824 | // =================================================================== |
| 3825 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 3826 | void PortComponentChangeAttributes::InitAsDefaultInstance() { |
| 3827 | ::dmi::_PortComponentChangeAttributes_default_instance_._instance.get_mutable()->pon_id_config_ = const_cast< ::dmi::PonIdConfig*>( |
| 3828 | ::dmi::PonIdConfig::internal_default_instance()); |
| 3829 | } |
| 3830 | class PortComponentChangeAttributes::HasBitSetters { |
| 3831 | public: |
| 3832 | static const ::dmi::PonIdConfig& pon_id_config(const PortComponentChangeAttributes* msg); |
| 3833 | }; |
| 3834 | |
| 3835 | const ::dmi::PonIdConfig& |
| 3836 | PortComponentChangeAttributes::HasBitSetters::pon_id_config(const PortComponentChangeAttributes* msg) { |
| 3837 | return *msg->pon_id_config_; |
| 3838 | } |
| 3839 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 3840 | const int PortComponentChangeAttributes::kPonIdConfigFieldNumber; |
| 3841 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 3842 | |
| 3843 | PortComponentChangeAttributes::PortComponentChangeAttributes() |
| 3844 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 3845 | SharedCtor(); |
| 3846 | // @@protoc_insertion_point(constructor:dmi.PortComponentChangeAttributes) |
| 3847 | } |
| 3848 | PortComponentChangeAttributes::PortComponentChangeAttributes(const PortComponentChangeAttributes& from) |
| 3849 | : ::google::protobuf::Message(), |
| 3850 | _internal_metadata_(nullptr) { |
| 3851 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 3852 | if (from.has_pon_id_config()) { |
| 3853 | pon_id_config_ = new ::dmi::PonIdConfig(*from.pon_id_config_); |
| 3854 | } else { |
| 3855 | pon_id_config_ = nullptr; |
| 3856 | } |
| 3857 | // @@protoc_insertion_point(copy_constructor:dmi.PortComponentChangeAttributes) |
| 3858 | } |
| 3859 | |
| 3860 | void PortComponentChangeAttributes::SharedCtor() { |
| 3861 | ::google::protobuf::internal::InitSCC( |
| 3862 | &scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto.base); |
| 3863 | pon_id_config_ = nullptr; |
| 3864 | } |
| 3865 | |
| 3866 | PortComponentChangeAttributes::~PortComponentChangeAttributes() { |
| 3867 | // @@protoc_insertion_point(destructor:dmi.PortComponentChangeAttributes) |
| 3868 | SharedDtor(); |
| 3869 | } |
| 3870 | |
| 3871 | void PortComponentChangeAttributes::SharedDtor() { |
| 3872 | if (this != internal_default_instance()) delete pon_id_config_; |
| 3873 | } |
| 3874 | |
| 3875 | void PortComponentChangeAttributes::SetCachedSize(int size) const { |
| 3876 | _cached_size_.Set(size); |
| 3877 | } |
| 3878 | const PortComponentChangeAttributes& PortComponentChangeAttributes::default_instance() { |
| 3879 | ::google::protobuf::internal::InitSCC(&::scc_info_PortComponentChangeAttributes_dmi_2fhw_2eproto.base); |
| 3880 | return *internal_default_instance(); |
| 3881 | } |
| 3882 | |
| 3883 | |
| 3884 | void PortComponentChangeAttributes::Clear() { |
| 3885 | // @@protoc_insertion_point(message_clear_start:dmi.PortComponentChangeAttributes) |
| 3886 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3887 | // Prevent compiler warnings about cached_has_bits being unused |
| 3888 | (void) cached_has_bits; |
| 3889 | |
| 3890 | if (GetArenaNoVirtual() == nullptr && pon_id_config_ != nullptr) { |
| 3891 | delete pon_id_config_; |
| 3892 | } |
| 3893 | pon_id_config_ = nullptr; |
| 3894 | _internal_metadata_.Clear(); |
| 3895 | } |
| 3896 | |
| 3897 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 3898 | const char* PortComponentChangeAttributes::_InternalParse(const char* begin, const char* end, void* object, |
| 3899 | ::google::protobuf::internal::ParseContext* ctx) { |
| 3900 | auto msg = static_cast<PortComponentChangeAttributes*>(object); |
| 3901 | ::google::protobuf::int32 size; (void)size; |
| 3902 | int depth; (void)depth; |
| 3903 | ::google::protobuf::uint32 tag; |
| 3904 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 3905 | auto ptr = begin; |
| 3906 | while (ptr < end) { |
| 3907 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 3908 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3909 | switch (tag >> 3) { |
| 3910 | // .dmi.PonIdConfig pon_id_config = 1; |
| 3911 | case 1: { |
| 3912 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 3913 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 3914 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 3915 | parser_till_end = ::dmi::PonIdConfig::_InternalParse; |
| 3916 | object = msg->mutable_pon_id_config(); |
| 3917 | if (size > end - ptr) goto len_delim_till_end; |
| 3918 | ptr += size; |
| 3919 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 3920 | {parser_till_end, object}, ptr - size, ptr)); |
| 3921 | break; |
| 3922 | } |
| 3923 | default: { |
| 3924 | handle_unusual: |
| 3925 | if ((tag & 7) == 4 || tag == 0) { |
| 3926 | ctx->EndGroup(tag); |
| 3927 | return ptr; |
| 3928 | } |
| 3929 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 3930 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 3931 | ptr = res.first; |
| 3932 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 3933 | if (res.second) return ptr; |
| 3934 | } |
| 3935 | } // switch |
| 3936 | } // while |
| 3937 | return ptr; |
| 3938 | len_delim_till_end: |
| 3939 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 3940 | {parser_till_end, object}, size); |
| 3941 | } |
| 3942 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 3943 | bool PortComponentChangeAttributes::MergePartialFromCodedStream( |
| 3944 | ::google::protobuf::io::CodedInputStream* input) { |
| 3945 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 3946 | ::google::protobuf::uint32 tag; |
| 3947 | // @@protoc_insertion_point(parse_start:dmi.PortComponentChangeAttributes) |
| 3948 | for (;;) { |
| 3949 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 3950 | tag = p.first; |
| 3951 | if (!p.second) goto handle_unusual; |
| 3952 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 3953 | // .dmi.PonIdConfig pon_id_config = 1; |
| 3954 | case 1: { |
| 3955 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 3956 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 3957 | input, mutable_pon_id_config())); |
| 3958 | } else { |
| 3959 | goto handle_unusual; |
| 3960 | } |
| 3961 | break; |
| 3962 | } |
| 3963 | |
| 3964 | default: { |
| 3965 | handle_unusual: |
| 3966 | if (tag == 0) { |
| 3967 | goto success; |
| 3968 | } |
| 3969 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 3970 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 3971 | break; |
| 3972 | } |
| 3973 | } |
| 3974 | } |
| 3975 | success: |
| 3976 | // @@protoc_insertion_point(parse_success:dmi.PortComponentChangeAttributes) |
| 3977 | return true; |
| 3978 | failure: |
| 3979 | // @@protoc_insertion_point(parse_failure:dmi.PortComponentChangeAttributes) |
| 3980 | return false; |
| 3981 | #undef DO_ |
| 3982 | } |
| 3983 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 3984 | |
| 3985 | void PortComponentChangeAttributes::SerializeWithCachedSizes( |
| 3986 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 3987 | // @@protoc_insertion_point(serialize_start:dmi.PortComponentChangeAttributes) |
| 3988 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 3989 | (void) cached_has_bits; |
| 3990 | |
| 3991 | // .dmi.PonIdConfig pon_id_config = 1; |
| 3992 | if (this->has_pon_id_config()) { |
| 3993 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 3994 | 1, HasBitSetters::pon_id_config(this), output); |
| 3995 | } |
| 3996 | |
| 3997 | if (_internal_metadata_.have_unknown_fields()) { |
| 3998 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 3999 | _internal_metadata_.unknown_fields(), output); |
| 4000 | } |
| 4001 | // @@protoc_insertion_point(serialize_end:dmi.PortComponentChangeAttributes) |
| 4002 | } |
| 4003 | |
| 4004 | ::google::protobuf::uint8* PortComponentChangeAttributes::InternalSerializeWithCachedSizesToArray( |
| 4005 | ::google::protobuf::uint8* target) const { |
| 4006 | // @@protoc_insertion_point(serialize_to_array_start:dmi.PortComponentChangeAttributes) |
| 4007 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4008 | (void) cached_has_bits; |
| 4009 | |
| 4010 | // .dmi.PonIdConfig pon_id_config = 1; |
| 4011 | if (this->has_pon_id_config()) { |
| 4012 | target = ::google::protobuf::internal::WireFormatLite:: |
| 4013 | InternalWriteMessageToArray( |
| 4014 | 1, HasBitSetters::pon_id_config(this), target); |
| 4015 | } |
| 4016 | |
| 4017 | if (_internal_metadata_.have_unknown_fields()) { |
| 4018 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 4019 | _internal_metadata_.unknown_fields(), target); |
| 4020 | } |
| 4021 | // @@protoc_insertion_point(serialize_to_array_end:dmi.PortComponentChangeAttributes) |
| 4022 | return target; |
| 4023 | } |
| 4024 | |
| 4025 | size_t PortComponentChangeAttributes::ByteSizeLong() const { |
| 4026 | // @@protoc_insertion_point(message_byte_size_start:dmi.PortComponentChangeAttributes) |
| 4027 | size_t total_size = 0; |
| 4028 | |
| 4029 | if (_internal_metadata_.have_unknown_fields()) { |
| 4030 | total_size += |
| 4031 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 4032 | _internal_metadata_.unknown_fields()); |
| 4033 | } |
| 4034 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4035 | // Prevent compiler warnings about cached_has_bits being unused |
| 4036 | (void) cached_has_bits; |
| 4037 | |
| 4038 | // .dmi.PonIdConfig pon_id_config = 1; |
| 4039 | if (this->has_pon_id_config()) { |
| 4040 | total_size += 1 + |
| 4041 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 4042 | *pon_id_config_); |
| 4043 | } |
| 4044 | |
| 4045 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 4046 | SetCachedSize(cached_size); |
| 4047 | return total_size; |
| 4048 | } |
| 4049 | |
| 4050 | void PortComponentChangeAttributes::MergeFrom(const ::google::protobuf::Message& from) { |
| 4051 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.PortComponentChangeAttributes) |
| 4052 | GOOGLE_DCHECK_NE(&from, this); |
| 4053 | const PortComponentChangeAttributes* source = |
| 4054 | ::google::protobuf::DynamicCastToGenerated<PortComponentChangeAttributes>( |
| 4055 | &from); |
| 4056 | if (source == nullptr) { |
| 4057 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.PortComponentChangeAttributes) |
| 4058 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 4059 | } else { |
| 4060 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.PortComponentChangeAttributes) |
| 4061 | MergeFrom(*source); |
| 4062 | } |
| 4063 | } |
| 4064 | |
| 4065 | void PortComponentChangeAttributes::MergeFrom(const PortComponentChangeAttributes& from) { |
| 4066 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.PortComponentChangeAttributes) |
| 4067 | GOOGLE_DCHECK_NE(&from, this); |
| 4068 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4069 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4070 | (void) cached_has_bits; |
| 4071 | |
| 4072 | if (from.has_pon_id_config()) { |
| 4073 | mutable_pon_id_config()->::dmi::PonIdConfig::MergeFrom(from.pon_id_config()); |
| 4074 | } |
| 4075 | } |
| 4076 | |
| 4077 | void PortComponentChangeAttributes::CopyFrom(const ::google::protobuf::Message& from) { |
| 4078 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.PortComponentChangeAttributes) |
| 4079 | if (&from == this) return; |
| 4080 | Clear(); |
| 4081 | MergeFrom(from); |
| 4082 | } |
| 4083 | |
| 4084 | void PortComponentChangeAttributes::CopyFrom(const PortComponentChangeAttributes& from) { |
| 4085 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.PortComponentChangeAttributes) |
| 4086 | if (&from == this) return; |
| 4087 | Clear(); |
| 4088 | MergeFrom(from); |
| 4089 | } |
| 4090 | |
| 4091 | bool PortComponentChangeAttributes::IsInitialized() const { |
| 4092 | return true; |
| 4093 | } |
| 4094 | |
| 4095 | void PortComponentChangeAttributes::Swap(PortComponentChangeAttributes* other) { |
| 4096 | if (other == this) return; |
| 4097 | InternalSwap(other); |
| 4098 | } |
| 4099 | void PortComponentChangeAttributes::InternalSwap(PortComponentChangeAttributes* other) { |
| 4100 | using std::swap; |
| 4101 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 4102 | swap(pon_id_config_, other->pon_id_config_); |
| 4103 | } |
| 4104 | |
| 4105 | ::google::protobuf::Metadata PortComponentChangeAttributes::GetMetadata() const { |
| 4106 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 4107 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 4108 | } |
| 4109 | |
| 4110 | |
| 4111 | // =================================================================== |
| 4112 | |
| 4113 | void PonIdConfig::InitAsDefaultInstance() { |
| 4114 | } |
| 4115 | class PonIdConfig::HasBitSetters { |
| 4116 | public: |
| 4117 | }; |
| 4118 | |
| 4119 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4120 | const int PonIdConfig::kPonIdFieldNumber; |
| 4121 | const int PonIdConfig::kPonIdTransmitPeriodicityFieldNumber; |
| 4122 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4123 | |
| 4124 | PonIdConfig::PonIdConfig() |
| 4125 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 4126 | SharedCtor(); |
| 4127 | // @@protoc_insertion_point(constructor:dmi.PonIdConfig) |
| 4128 | } |
| 4129 | PonIdConfig::PonIdConfig(const PonIdConfig& from) |
| 4130 | : ::google::protobuf::Message(), |
| 4131 | _internal_metadata_(nullptr) { |
| 4132 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4133 | pon_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4134 | if (from.pon_id().size() > 0) { |
| 4135 | pon_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.pon_id_); |
| 4136 | } |
| 4137 | pon_id_transmit_periodicity_ = from.pon_id_transmit_periodicity_; |
| 4138 | // @@protoc_insertion_point(copy_constructor:dmi.PonIdConfig) |
| 4139 | } |
| 4140 | |
| 4141 | void PonIdConfig::SharedCtor() { |
| 4142 | ::google::protobuf::internal::InitSCC( |
| 4143 | &scc_info_PonIdConfig_dmi_2fhw_2eproto.base); |
| 4144 | pon_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4145 | pon_id_transmit_periodicity_ = 0u; |
| 4146 | } |
| 4147 | |
| 4148 | PonIdConfig::~PonIdConfig() { |
| 4149 | // @@protoc_insertion_point(destructor:dmi.PonIdConfig) |
| 4150 | SharedDtor(); |
| 4151 | } |
| 4152 | |
| 4153 | void PonIdConfig::SharedDtor() { |
| 4154 | pon_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4155 | } |
| 4156 | |
| 4157 | void PonIdConfig::SetCachedSize(int size) const { |
| 4158 | _cached_size_.Set(size); |
| 4159 | } |
| 4160 | const PonIdConfig& PonIdConfig::default_instance() { |
| 4161 | ::google::protobuf::internal::InitSCC(&::scc_info_PonIdConfig_dmi_2fhw_2eproto.base); |
| 4162 | return *internal_default_instance(); |
| 4163 | } |
| 4164 | |
| 4165 | |
| 4166 | void PonIdConfig::Clear() { |
| 4167 | // @@protoc_insertion_point(message_clear_start:dmi.PonIdConfig) |
| 4168 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4169 | // Prevent compiler warnings about cached_has_bits being unused |
| 4170 | (void) cached_has_bits; |
| 4171 | |
| 4172 | pon_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4173 | pon_id_transmit_periodicity_ = 0u; |
| 4174 | _internal_metadata_.Clear(); |
| 4175 | } |
| 4176 | |
| 4177 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4178 | const char* PonIdConfig::_InternalParse(const char* begin, const char* end, void* object, |
| 4179 | ::google::protobuf::internal::ParseContext* ctx) { |
| 4180 | auto msg = static_cast<PonIdConfig*>(object); |
| 4181 | ::google::protobuf::int32 size; (void)size; |
| 4182 | int depth; (void)depth; |
| 4183 | ::google::protobuf::uint32 tag; |
| 4184 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 4185 | auto ptr = begin; |
| 4186 | while (ptr < end) { |
| 4187 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 4188 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4189 | switch (tag >> 3) { |
| 4190 | // bytes pon_id = 1; |
| 4191 | case 1: { |
| 4192 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 4193 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 4194 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4195 | object = msg->mutable_pon_id(); |
| 4196 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 4197 | parser_till_end = ::google::protobuf::internal::GreedyStringParser; |
| 4198 | goto string_till_end; |
| 4199 | } |
| 4200 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheck(ptr, size, ctx)); |
| 4201 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 4202 | ptr += size; |
| 4203 | break; |
| 4204 | } |
| 4205 | // uint32 pon_id_transmit_periodicity = 2; |
| 4206 | case 2: { |
| 4207 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 4208 | msg->set_pon_id_transmit_periodicity(::google::protobuf::internal::ReadVarint(&ptr)); |
| 4209 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4210 | break; |
| 4211 | } |
| 4212 | default: { |
| 4213 | handle_unusual: |
| 4214 | if ((tag & 7) == 4 || tag == 0) { |
| 4215 | ctx->EndGroup(tag); |
| 4216 | return ptr; |
| 4217 | } |
| 4218 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 4219 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 4220 | ptr = res.first; |
| 4221 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 4222 | if (res.second) return ptr; |
| 4223 | } |
| 4224 | } // switch |
| 4225 | } // while |
| 4226 | return ptr; |
| 4227 | string_till_end: |
| 4228 | static_cast<::std::string*>(object)->clear(); |
| 4229 | static_cast<::std::string*>(object)->reserve(size); |
| 4230 | goto len_delim_till_end; |
| 4231 | len_delim_till_end: |
| 4232 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 4233 | {parser_till_end, object}, size); |
| 4234 | } |
| 4235 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4236 | bool PonIdConfig::MergePartialFromCodedStream( |
| 4237 | ::google::protobuf::io::CodedInputStream* input) { |
| 4238 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 4239 | ::google::protobuf::uint32 tag; |
| 4240 | // @@protoc_insertion_point(parse_start:dmi.PonIdConfig) |
| 4241 | for (;;) { |
| 4242 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 4243 | tag = p.first; |
| 4244 | if (!p.second) goto handle_unusual; |
| 4245 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 4246 | // bytes pon_id = 1; |
| 4247 | case 1: { |
| 4248 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 4249 | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
| 4250 | input, this->mutable_pon_id())); |
| 4251 | } else { |
| 4252 | goto handle_unusual; |
| 4253 | } |
| 4254 | break; |
| 4255 | } |
| 4256 | |
| 4257 | // uint32 pon_id_transmit_periodicity = 2; |
| 4258 | case 2: { |
| 4259 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 4260 | |
| 4261 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4262 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 4263 | input, &pon_id_transmit_periodicity_))); |
| 4264 | } else { |
| 4265 | goto handle_unusual; |
| 4266 | } |
| 4267 | break; |
| 4268 | } |
| 4269 | |
| 4270 | default: { |
| 4271 | handle_unusual: |
| 4272 | if (tag == 0) { |
| 4273 | goto success; |
| 4274 | } |
| 4275 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 4276 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 4277 | break; |
| 4278 | } |
| 4279 | } |
| 4280 | } |
| 4281 | success: |
| 4282 | // @@protoc_insertion_point(parse_success:dmi.PonIdConfig) |
| 4283 | return true; |
| 4284 | failure: |
| 4285 | // @@protoc_insertion_point(parse_failure:dmi.PonIdConfig) |
| 4286 | return false; |
| 4287 | #undef DO_ |
| 4288 | } |
| 4289 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4290 | |
| 4291 | void PonIdConfig::SerializeWithCachedSizes( |
| 4292 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 4293 | // @@protoc_insertion_point(serialize_start:dmi.PonIdConfig) |
| 4294 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4295 | (void) cached_has_bits; |
| 4296 | |
| 4297 | // bytes pon_id = 1; |
| 4298 | if (this->pon_id().size() > 0) { |
| 4299 | ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( |
| 4300 | 1, this->pon_id(), output); |
| 4301 | } |
| 4302 | |
| 4303 | // uint32 pon_id_transmit_periodicity = 2; |
| 4304 | if (this->pon_id_transmit_periodicity() != 0) { |
| 4305 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->pon_id_transmit_periodicity(), output); |
| 4306 | } |
| 4307 | |
| 4308 | if (_internal_metadata_.have_unknown_fields()) { |
| 4309 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 4310 | _internal_metadata_.unknown_fields(), output); |
| 4311 | } |
| 4312 | // @@protoc_insertion_point(serialize_end:dmi.PonIdConfig) |
| 4313 | } |
| 4314 | |
| 4315 | ::google::protobuf::uint8* PonIdConfig::InternalSerializeWithCachedSizesToArray( |
| 4316 | ::google::protobuf::uint8* target) const { |
| 4317 | // @@protoc_insertion_point(serialize_to_array_start:dmi.PonIdConfig) |
| 4318 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4319 | (void) cached_has_bits; |
| 4320 | |
| 4321 | // bytes pon_id = 1; |
| 4322 | if (this->pon_id().size() > 0) { |
| 4323 | target = |
| 4324 | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
| 4325 | 1, this->pon_id(), target); |
| 4326 | } |
| 4327 | |
| 4328 | // uint32 pon_id_transmit_periodicity = 2; |
| 4329 | if (this->pon_id_transmit_periodicity() != 0) { |
| 4330 | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->pon_id_transmit_periodicity(), target); |
| 4331 | } |
| 4332 | |
| 4333 | if (_internal_metadata_.have_unknown_fields()) { |
| 4334 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 4335 | _internal_metadata_.unknown_fields(), target); |
| 4336 | } |
| 4337 | // @@protoc_insertion_point(serialize_to_array_end:dmi.PonIdConfig) |
| 4338 | return target; |
| 4339 | } |
| 4340 | |
| 4341 | size_t PonIdConfig::ByteSizeLong() const { |
| 4342 | // @@protoc_insertion_point(message_byte_size_start:dmi.PonIdConfig) |
| 4343 | size_t total_size = 0; |
| 4344 | |
| 4345 | if (_internal_metadata_.have_unknown_fields()) { |
| 4346 | total_size += |
| 4347 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 4348 | _internal_metadata_.unknown_fields()); |
| 4349 | } |
| 4350 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4351 | // Prevent compiler warnings about cached_has_bits being unused |
| 4352 | (void) cached_has_bits; |
| 4353 | |
| 4354 | // bytes pon_id = 1; |
| 4355 | if (this->pon_id().size() > 0) { |
| 4356 | total_size += 1 + |
| 4357 | ::google::protobuf::internal::WireFormatLite::BytesSize( |
| 4358 | this->pon_id()); |
| 4359 | } |
| 4360 | |
| 4361 | // uint32 pon_id_transmit_periodicity = 2; |
| 4362 | if (this->pon_id_transmit_periodicity() != 0) { |
| 4363 | total_size += 1 + |
| 4364 | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
| 4365 | this->pon_id_transmit_periodicity()); |
| 4366 | } |
| 4367 | |
| 4368 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 4369 | SetCachedSize(cached_size); |
| 4370 | return total_size; |
| 4371 | } |
| 4372 | |
| 4373 | void PonIdConfig::MergeFrom(const ::google::protobuf::Message& from) { |
| 4374 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.PonIdConfig) |
| 4375 | GOOGLE_DCHECK_NE(&from, this); |
| 4376 | const PonIdConfig* source = |
| 4377 | ::google::protobuf::DynamicCastToGenerated<PonIdConfig>( |
| 4378 | &from); |
| 4379 | if (source == nullptr) { |
| 4380 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.PonIdConfig) |
| 4381 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 4382 | } else { |
| 4383 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.PonIdConfig) |
| 4384 | MergeFrom(*source); |
| 4385 | } |
| 4386 | } |
| 4387 | |
| 4388 | void PonIdConfig::MergeFrom(const PonIdConfig& from) { |
| 4389 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.PonIdConfig) |
| 4390 | GOOGLE_DCHECK_NE(&from, this); |
| 4391 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4392 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4393 | (void) cached_has_bits; |
| 4394 | |
| 4395 | if (from.pon_id().size() > 0) { |
| 4396 | |
| 4397 | pon_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.pon_id_); |
| 4398 | } |
| 4399 | if (from.pon_id_transmit_periodicity() != 0) { |
| 4400 | set_pon_id_transmit_periodicity(from.pon_id_transmit_periodicity()); |
| 4401 | } |
| 4402 | } |
| 4403 | |
| 4404 | void PonIdConfig::CopyFrom(const ::google::protobuf::Message& from) { |
| 4405 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.PonIdConfig) |
| 4406 | if (&from == this) return; |
| 4407 | Clear(); |
| 4408 | MergeFrom(from); |
| 4409 | } |
| 4410 | |
| 4411 | void PonIdConfig::CopyFrom(const PonIdConfig& from) { |
| 4412 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.PonIdConfig) |
| 4413 | if (&from == this) return; |
| 4414 | Clear(); |
| 4415 | MergeFrom(from); |
| 4416 | } |
| 4417 | |
| 4418 | bool PonIdConfig::IsInitialized() const { |
| 4419 | return true; |
| 4420 | } |
| 4421 | |
| 4422 | void PonIdConfig::Swap(PonIdConfig* other) { |
| 4423 | if (other == this) return; |
| 4424 | InternalSwap(other); |
| 4425 | } |
| 4426 | void PonIdConfig::InternalSwap(PonIdConfig* other) { |
| 4427 | using std::swap; |
| 4428 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 4429 | pon_id_.Swap(&other->pon_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 4430 | GetArenaNoVirtual()); |
| 4431 | swap(pon_id_transmit_periodicity_, other->pon_id_transmit_periodicity_); |
| 4432 | } |
| 4433 | |
| 4434 | ::google::protobuf::Metadata PonIdConfig::GetMetadata() const { |
| 4435 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 4436 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 4437 | } |
| 4438 | |
| 4439 | |
| 4440 | // =================================================================== |
| 4441 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 4442 | void ContainerComponentAttributes::InitAsDefaultInstance() { |
| 4443 | } |
| 4444 | class ContainerComponentAttributes::HasBitSetters { |
| 4445 | public: |
| 4446 | }; |
| 4447 | |
| 4448 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4449 | const int ContainerComponentAttributes::kPhysicalLabelFieldNumber; |
| 4450 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4451 | |
| 4452 | ContainerComponentAttributes::ContainerComponentAttributes() |
| 4453 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 4454 | SharedCtor(); |
| 4455 | // @@protoc_insertion_point(constructor:dmi.ContainerComponentAttributes) |
| 4456 | } |
| 4457 | ContainerComponentAttributes::ContainerComponentAttributes(const ContainerComponentAttributes& from) |
| 4458 | : ::google::protobuf::Message(), |
| 4459 | _internal_metadata_(nullptr) { |
| 4460 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4461 | physical_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4462 | if (from.physical_label().size() > 0) { |
| 4463 | physical_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.physical_label_); |
| 4464 | } |
| 4465 | // @@protoc_insertion_point(copy_constructor:dmi.ContainerComponentAttributes) |
| 4466 | } |
| 4467 | |
| 4468 | void ContainerComponentAttributes::SharedCtor() { |
| 4469 | ::google::protobuf::internal::InitSCC( |
| 4470 | &scc_info_ContainerComponentAttributes_dmi_2fhw_2eproto.base); |
| 4471 | physical_label_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4472 | } |
| 4473 | |
| 4474 | ContainerComponentAttributes::~ContainerComponentAttributes() { |
| 4475 | // @@protoc_insertion_point(destructor:dmi.ContainerComponentAttributes) |
| 4476 | SharedDtor(); |
| 4477 | } |
| 4478 | |
| 4479 | void ContainerComponentAttributes::SharedDtor() { |
| 4480 | physical_label_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4481 | } |
| 4482 | |
| 4483 | void ContainerComponentAttributes::SetCachedSize(int size) const { |
| 4484 | _cached_size_.Set(size); |
| 4485 | } |
| 4486 | const ContainerComponentAttributes& ContainerComponentAttributes::default_instance() { |
| 4487 | ::google::protobuf::internal::InitSCC(&::scc_info_ContainerComponentAttributes_dmi_2fhw_2eproto.base); |
| 4488 | return *internal_default_instance(); |
| 4489 | } |
| 4490 | |
| 4491 | |
| 4492 | void ContainerComponentAttributes::Clear() { |
| 4493 | // @@protoc_insertion_point(message_clear_start:dmi.ContainerComponentAttributes) |
| 4494 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4495 | // Prevent compiler warnings about cached_has_bits being unused |
| 4496 | (void) cached_has_bits; |
| 4497 | |
| 4498 | physical_label_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 4499 | _internal_metadata_.Clear(); |
| 4500 | } |
| 4501 | |
| 4502 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4503 | const char* ContainerComponentAttributes::_InternalParse(const char* begin, const char* end, void* object, |
| 4504 | ::google::protobuf::internal::ParseContext* ctx) { |
| 4505 | auto msg = static_cast<ContainerComponentAttributes*>(object); |
| 4506 | ::google::protobuf::int32 size; (void)size; |
| 4507 | int depth; (void)depth; |
| 4508 | ::google::protobuf::uint32 tag; |
| 4509 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 4510 | auto ptr = begin; |
| 4511 | while (ptr < end) { |
| 4512 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 4513 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4514 | switch (tag >> 3) { |
| 4515 | // string physical_label = 1; |
| 4516 | case 1: { |
| 4517 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 4518 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 4519 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4520 | ctx->extra_parse_data().SetFieldName("dmi.ContainerComponentAttributes.physical_label"); |
| 4521 | object = msg->mutable_physical_label(); |
| 4522 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 4523 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 4524 | goto string_till_end; |
| 4525 | } |
| 4526 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 4527 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 4528 | ptr += size; |
| 4529 | break; |
| 4530 | } |
| 4531 | default: { |
| 4532 | handle_unusual: |
| 4533 | if ((tag & 7) == 4 || tag == 0) { |
| 4534 | ctx->EndGroup(tag); |
| 4535 | return ptr; |
| 4536 | } |
| 4537 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 4538 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 4539 | ptr = res.first; |
| 4540 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 4541 | if (res.second) return ptr; |
| 4542 | } |
| 4543 | } // switch |
| 4544 | } // while |
| 4545 | return ptr; |
| 4546 | string_till_end: |
| 4547 | static_cast<::std::string*>(object)->clear(); |
| 4548 | static_cast<::std::string*>(object)->reserve(size); |
| 4549 | goto len_delim_till_end; |
| 4550 | len_delim_till_end: |
| 4551 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 4552 | {parser_till_end, object}, size); |
| 4553 | } |
| 4554 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4555 | bool ContainerComponentAttributes::MergePartialFromCodedStream( |
| 4556 | ::google::protobuf::io::CodedInputStream* input) { |
| 4557 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 4558 | ::google::protobuf::uint32 tag; |
| 4559 | // @@protoc_insertion_point(parse_start:dmi.ContainerComponentAttributes) |
| 4560 | for (;;) { |
| 4561 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 4562 | tag = p.first; |
| 4563 | if (!p.second) goto handle_unusual; |
| 4564 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 4565 | // string physical_label = 1; |
| 4566 | case 1: { |
| 4567 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 4568 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 4569 | input, this->mutable_physical_label())); |
| 4570 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 4571 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 4572 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 4573 | "dmi.ContainerComponentAttributes.physical_label")); |
| 4574 | } else { |
| 4575 | goto handle_unusual; |
| 4576 | } |
| 4577 | break; |
| 4578 | } |
| 4579 | |
| 4580 | default: { |
| 4581 | handle_unusual: |
| 4582 | if (tag == 0) { |
| 4583 | goto success; |
| 4584 | } |
| 4585 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 4586 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 4587 | break; |
| 4588 | } |
| 4589 | } |
| 4590 | } |
| 4591 | success: |
| 4592 | // @@protoc_insertion_point(parse_success:dmi.ContainerComponentAttributes) |
| 4593 | return true; |
| 4594 | failure: |
| 4595 | // @@protoc_insertion_point(parse_failure:dmi.ContainerComponentAttributes) |
| 4596 | return false; |
| 4597 | #undef DO_ |
| 4598 | } |
| 4599 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4600 | |
| 4601 | void ContainerComponentAttributes::SerializeWithCachedSizes( |
| 4602 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 4603 | // @@protoc_insertion_point(serialize_start:dmi.ContainerComponentAttributes) |
| 4604 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4605 | (void) cached_has_bits; |
| 4606 | |
| 4607 | // string physical_label = 1; |
| 4608 | if (this->physical_label().size() > 0) { |
| 4609 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 4610 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 4611 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 4612 | "dmi.ContainerComponentAttributes.physical_label"); |
| 4613 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 4614 | 1, this->physical_label(), output); |
| 4615 | } |
| 4616 | |
| 4617 | if (_internal_metadata_.have_unknown_fields()) { |
| 4618 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 4619 | _internal_metadata_.unknown_fields(), output); |
| 4620 | } |
| 4621 | // @@protoc_insertion_point(serialize_end:dmi.ContainerComponentAttributes) |
| 4622 | } |
| 4623 | |
| 4624 | ::google::protobuf::uint8* ContainerComponentAttributes::InternalSerializeWithCachedSizesToArray( |
| 4625 | ::google::protobuf::uint8* target) const { |
| 4626 | // @@protoc_insertion_point(serialize_to_array_start:dmi.ContainerComponentAttributes) |
| 4627 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4628 | (void) cached_has_bits; |
| 4629 | |
| 4630 | // string physical_label = 1; |
| 4631 | if (this->physical_label().size() > 0) { |
| 4632 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 4633 | this->physical_label().data(), static_cast<int>(this->physical_label().length()), |
| 4634 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 4635 | "dmi.ContainerComponentAttributes.physical_label"); |
| 4636 | target = |
| 4637 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 4638 | 1, this->physical_label(), target); |
| 4639 | } |
| 4640 | |
| 4641 | if (_internal_metadata_.have_unknown_fields()) { |
| 4642 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 4643 | _internal_metadata_.unknown_fields(), target); |
| 4644 | } |
| 4645 | // @@protoc_insertion_point(serialize_to_array_end:dmi.ContainerComponentAttributes) |
| 4646 | return target; |
| 4647 | } |
| 4648 | |
| 4649 | size_t ContainerComponentAttributes::ByteSizeLong() const { |
| 4650 | // @@protoc_insertion_point(message_byte_size_start:dmi.ContainerComponentAttributes) |
| 4651 | size_t total_size = 0; |
| 4652 | |
| 4653 | if (_internal_metadata_.have_unknown_fields()) { |
| 4654 | total_size += |
| 4655 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 4656 | _internal_metadata_.unknown_fields()); |
| 4657 | } |
| 4658 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4659 | // Prevent compiler warnings about cached_has_bits being unused |
| 4660 | (void) cached_has_bits; |
| 4661 | |
| 4662 | // string physical_label = 1; |
| 4663 | if (this->physical_label().size() > 0) { |
| 4664 | total_size += 1 + |
| 4665 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 4666 | this->physical_label()); |
| 4667 | } |
| 4668 | |
| 4669 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 4670 | SetCachedSize(cached_size); |
| 4671 | return total_size; |
| 4672 | } |
| 4673 | |
| 4674 | void ContainerComponentAttributes::MergeFrom(const ::google::protobuf::Message& from) { |
| 4675 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.ContainerComponentAttributes) |
| 4676 | GOOGLE_DCHECK_NE(&from, this); |
| 4677 | const ContainerComponentAttributes* source = |
| 4678 | ::google::protobuf::DynamicCastToGenerated<ContainerComponentAttributes>( |
| 4679 | &from); |
| 4680 | if (source == nullptr) { |
| 4681 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.ContainerComponentAttributes) |
| 4682 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 4683 | } else { |
| 4684 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.ContainerComponentAttributes) |
| 4685 | MergeFrom(*source); |
| 4686 | } |
| 4687 | } |
| 4688 | |
| 4689 | void ContainerComponentAttributes::MergeFrom(const ContainerComponentAttributes& from) { |
| 4690 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.ContainerComponentAttributes) |
| 4691 | GOOGLE_DCHECK_NE(&from, this); |
| 4692 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4693 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4694 | (void) cached_has_bits; |
| 4695 | |
| 4696 | if (from.physical_label().size() > 0) { |
| 4697 | |
| 4698 | physical_label_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.physical_label_); |
| 4699 | } |
| 4700 | } |
| 4701 | |
| 4702 | void ContainerComponentAttributes::CopyFrom(const ::google::protobuf::Message& from) { |
| 4703 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.ContainerComponentAttributes) |
| 4704 | if (&from == this) return; |
| 4705 | Clear(); |
| 4706 | MergeFrom(from); |
| 4707 | } |
| 4708 | |
| 4709 | void ContainerComponentAttributes::CopyFrom(const ContainerComponentAttributes& from) { |
| 4710 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.ContainerComponentAttributes) |
| 4711 | if (&from == this) return; |
| 4712 | Clear(); |
| 4713 | MergeFrom(from); |
| 4714 | } |
| 4715 | |
| 4716 | bool ContainerComponentAttributes::IsInitialized() const { |
| 4717 | return true; |
| 4718 | } |
| 4719 | |
| 4720 | void ContainerComponentAttributes::Swap(ContainerComponentAttributes* other) { |
| 4721 | if (other == this) return; |
| 4722 | InternalSwap(other); |
| 4723 | } |
| 4724 | void ContainerComponentAttributes::InternalSwap(ContainerComponentAttributes* other) { |
| 4725 | using std::swap; |
| 4726 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 4727 | physical_label_.Swap(&other->physical_label_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 4728 | GetArenaNoVirtual()); |
| 4729 | } |
| 4730 | |
| 4731 | ::google::protobuf::Metadata ContainerComponentAttributes::GetMetadata() const { |
| 4732 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 4733 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 4734 | } |
| 4735 | |
| 4736 | |
| 4737 | // =================================================================== |
| 4738 | |
| 4739 | void PsuComponentAttributes::InitAsDefaultInstance() { |
| 4740 | } |
| 4741 | class PsuComponentAttributes::HasBitSetters { |
| 4742 | public: |
| 4743 | }; |
| 4744 | |
| 4745 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4746 | const int PsuComponentAttributes::kSupportedVoltageFieldNumber; |
| 4747 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 4748 | |
| 4749 | PsuComponentAttributes::PsuComponentAttributes() |
| 4750 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 4751 | SharedCtor(); |
| 4752 | // @@protoc_insertion_point(constructor:dmi.PsuComponentAttributes) |
| 4753 | } |
| 4754 | PsuComponentAttributes::PsuComponentAttributes(const PsuComponentAttributes& from) |
| 4755 | : ::google::protobuf::Message(), |
| 4756 | _internal_metadata_(nullptr) { |
| 4757 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4758 | supported_voltage_ = from.supported_voltage_; |
| 4759 | // @@protoc_insertion_point(copy_constructor:dmi.PsuComponentAttributes) |
| 4760 | } |
| 4761 | |
| 4762 | void PsuComponentAttributes::SharedCtor() { |
| 4763 | supported_voltage_ = 0; |
| 4764 | } |
| 4765 | |
| 4766 | PsuComponentAttributes::~PsuComponentAttributes() { |
| 4767 | // @@protoc_insertion_point(destructor:dmi.PsuComponentAttributes) |
| 4768 | SharedDtor(); |
| 4769 | } |
| 4770 | |
| 4771 | void PsuComponentAttributes::SharedDtor() { |
| 4772 | } |
| 4773 | |
| 4774 | void PsuComponentAttributes::SetCachedSize(int size) const { |
| 4775 | _cached_size_.Set(size); |
| 4776 | } |
| 4777 | const PsuComponentAttributes& PsuComponentAttributes::default_instance() { |
| 4778 | ::google::protobuf::internal::InitSCC(&::scc_info_PsuComponentAttributes_dmi_2fhw_2eproto.base); |
| 4779 | return *internal_default_instance(); |
| 4780 | } |
| 4781 | |
| 4782 | |
| 4783 | void PsuComponentAttributes::Clear() { |
| 4784 | // @@protoc_insertion_point(message_clear_start:dmi.PsuComponentAttributes) |
| 4785 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4786 | // Prevent compiler warnings about cached_has_bits being unused |
| 4787 | (void) cached_has_bits; |
| 4788 | |
| 4789 | supported_voltage_ = 0; |
| 4790 | _internal_metadata_.Clear(); |
| 4791 | } |
| 4792 | |
| 4793 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4794 | const char* PsuComponentAttributes::_InternalParse(const char* begin, const char* end, void* object, |
| 4795 | ::google::protobuf::internal::ParseContext* ctx) { |
| 4796 | auto msg = static_cast<PsuComponentAttributes*>(object); |
| 4797 | ::google::protobuf::int32 size; (void)size; |
| 4798 | int depth; (void)depth; |
| 4799 | ::google::protobuf::uint32 tag; |
| 4800 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 4801 | auto ptr = begin; |
| 4802 | while (ptr < end) { |
| 4803 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 4804 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4805 | switch (tag >> 3) { |
| 4806 | // .dmi.PsuComponentAttributes.SupportedVoltage supported_voltage = 1; |
| 4807 | case 1: { |
| 4808 | if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; |
| 4809 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 4810 | msg->set_supported_voltage(static_cast<::dmi::PsuComponentAttributes_SupportedVoltage>(val)); |
| 4811 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 4812 | break; |
| 4813 | } |
| 4814 | default: { |
| 4815 | handle_unusual: |
| 4816 | if ((tag & 7) == 4 || tag == 0) { |
| 4817 | ctx->EndGroup(tag); |
| 4818 | return ptr; |
| 4819 | } |
| 4820 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 4821 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 4822 | ptr = res.first; |
| 4823 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 4824 | if (res.second) return ptr; |
| 4825 | } |
| 4826 | } // switch |
| 4827 | } // while |
| 4828 | return ptr; |
| 4829 | } |
| 4830 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4831 | bool PsuComponentAttributes::MergePartialFromCodedStream( |
| 4832 | ::google::protobuf::io::CodedInputStream* input) { |
| 4833 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 4834 | ::google::protobuf::uint32 tag; |
| 4835 | // @@protoc_insertion_point(parse_start:dmi.PsuComponentAttributes) |
| 4836 | for (;;) { |
| 4837 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 4838 | tag = p.first; |
| 4839 | if (!p.second) goto handle_unusual; |
| 4840 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 4841 | // .dmi.PsuComponentAttributes.SupportedVoltage supported_voltage = 1; |
| 4842 | case 1: { |
| 4843 | if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { |
| 4844 | int value = 0; |
| 4845 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 4846 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 4847 | input, &value))); |
| 4848 | set_supported_voltage(static_cast< ::dmi::PsuComponentAttributes_SupportedVoltage >(value)); |
| 4849 | } else { |
| 4850 | goto handle_unusual; |
| 4851 | } |
| 4852 | break; |
| 4853 | } |
| 4854 | |
| 4855 | default: { |
| 4856 | handle_unusual: |
| 4857 | if (tag == 0) { |
| 4858 | goto success; |
| 4859 | } |
| 4860 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 4861 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 4862 | break; |
| 4863 | } |
| 4864 | } |
| 4865 | } |
| 4866 | success: |
| 4867 | // @@protoc_insertion_point(parse_success:dmi.PsuComponentAttributes) |
| 4868 | return true; |
| 4869 | failure: |
| 4870 | // @@protoc_insertion_point(parse_failure:dmi.PsuComponentAttributes) |
| 4871 | return false; |
| 4872 | #undef DO_ |
| 4873 | } |
| 4874 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 4875 | |
| 4876 | void PsuComponentAttributes::SerializeWithCachedSizes( |
| 4877 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 4878 | // @@protoc_insertion_point(serialize_start:dmi.PsuComponentAttributes) |
| 4879 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4880 | (void) cached_has_bits; |
| 4881 | |
| 4882 | // .dmi.PsuComponentAttributes.SupportedVoltage supported_voltage = 1; |
| 4883 | if (this->supported_voltage() != 0) { |
| 4884 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 4885 | 1, this->supported_voltage(), output); |
| 4886 | } |
| 4887 | |
| 4888 | if (_internal_metadata_.have_unknown_fields()) { |
| 4889 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 4890 | _internal_metadata_.unknown_fields(), output); |
| 4891 | } |
| 4892 | // @@protoc_insertion_point(serialize_end:dmi.PsuComponentAttributes) |
| 4893 | } |
| 4894 | |
| 4895 | ::google::protobuf::uint8* PsuComponentAttributes::InternalSerializeWithCachedSizesToArray( |
| 4896 | ::google::protobuf::uint8* target) const { |
| 4897 | // @@protoc_insertion_point(serialize_to_array_start:dmi.PsuComponentAttributes) |
| 4898 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4899 | (void) cached_has_bits; |
| 4900 | |
| 4901 | // .dmi.PsuComponentAttributes.SupportedVoltage supported_voltage = 1; |
| 4902 | if (this->supported_voltage() != 0) { |
| 4903 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 4904 | 1, this->supported_voltage(), target); |
| 4905 | } |
| 4906 | |
| 4907 | if (_internal_metadata_.have_unknown_fields()) { |
| 4908 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 4909 | _internal_metadata_.unknown_fields(), target); |
| 4910 | } |
| 4911 | // @@protoc_insertion_point(serialize_to_array_end:dmi.PsuComponentAttributes) |
| 4912 | return target; |
| 4913 | } |
| 4914 | |
| 4915 | size_t PsuComponentAttributes::ByteSizeLong() const { |
| 4916 | // @@protoc_insertion_point(message_byte_size_start:dmi.PsuComponentAttributes) |
| 4917 | size_t total_size = 0; |
| 4918 | |
| 4919 | if (_internal_metadata_.have_unknown_fields()) { |
| 4920 | total_size += |
| 4921 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 4922 | _internal_metadata_.unknown_fields()); |
| 4923 | } |
| 4924 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4925 | // Prevent compiler warnings about cached_has_bits being unused |
| 4926 | (void) cached_has_bits; |
| 4927 | |
| 4928 | // .dmi.PsuComponentAttributes.SupportedVoltage supported_voltage = 1; |
| 4929 | if (this->supported_voltage() != 0) { |
| 4930 | total_size += 1 + |
| 4931 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->supported_voltage()); |
| 4932 | } |
| 4933 | |
| 4934 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 4935 | SetCachedSize(cached_size); |
| 4936 | return total_size; |
| 4937 | } |
| 4938 | |
| 4939 | void PsuComponentAttributes::MergeFrom(const ::google::protobuf::Message& from) { |
| 4940 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.PsuComponentAttributes) |
| 4941 | GOOGLE_DCHECK_NE(&from, this); |
| 4942 | const PsuComponentAttributes* source = |
| 4943 | ::google::protobuf::DynamicCastToGenerated<PsuComponentAttributes>( |
| 4944 | &from); |
| 4945 | if (source == nullptr) { |
| 4946 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.PsuComponentAttributes) |
| 4947 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 4948 | } else { |
| 4949 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.PsuComponentAttributes) |
| 4950 | MergeFrom(*source); |
| 4951 | } |
| 4952 | } |
| 4953 | |
| 4954 | void PsuComponentAttributes::MergeFrom(const PsuComponentAttributes& from) { |
| 4955 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.PsuComponentAttributes) |
| 4956 | GOOGLE_DCHECK_NE(&from, this); |
| 4957 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 4958 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 4959 | (void) cached_has_bits; |
| 4960 | |
| 4961 | if (from.supported_voltage() != 0) { |
| 4962 | set_supported_voltage(from.supported_voltage()); |
| 4963 | } |
| 4964 | } |
| 4965 | |
| 4966 | void PsuComponentAttributes::CopyFrom(const ::google::protobuf::Message& from) { |
| 4967 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.PsuComponentAttributes) |
| 4968 | if (&from == this) return; |
| 4969 | Clear(); |
| 4970 | MergeFrom(from); |
| 4971 | } |
| 4972 | |
| 4973 | void PsuComponentAttributes::CopyFrom(const PsuComponentAttributes& from) { |
| 4974 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.PsuComponentAttributes) |
| 4975 | if (&from == this) return; |
| 4976 | Clear(); |
| 4977 | MergeFrom(from); |
| 4978 | } |
| 4979 | |
| 4980 | bool PsuComponentAttributes::IsInitialized() const { |
| 4981 | return true; |
| 4982 | } |
| 4983 | |
| 4984 | void PsuComponentAttributes::Swap(PsuComponentAttributes* other) { |
| 4985 | if (other == this) return; |
| 4986 | InternalSwap(other); |
| 4987 | } |
| 4988 | void PsuComponentAttributes::InternalSwap(PsuComponentAttributes* other) { |
| 4989 | using std::swap; |
| 4990 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 4991 | swap(supported_voltage_, other->supported_voltage_); |
| 4992 | } |
| 4993 | |
| 4994 | ::google::protobuf::Metadata PsuComponentAttributes::GetMetadata() const { |
| 4995 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 4996 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 4997 | } |
| 4998 | |
| 4999 | |
| 5000 | // =================================================================== |
| 5001 | |
| 5002 | void TransceiverComponentsAttributes::InitAsDefaultInstance() { |
| 5003 | } |
| 5004 | class TransceiverComponentsAttributes::HasBitSetters { |
| 5005 | public: |
| 5006 | }; |
| 5007 | |
| 5008 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 5009 | const int TransceiverComponentsAttributes::kFormFactorFieldNumber; |
| 5010 | const int TransceiverComponentsAttributes::kTransTypeFieldNumber; |
| 5011 | const int TransceiverComponentsAttributes::kMaxDistanceFieldNumber; |
| 5012 | const int TransceiverComponentsAttributes::kMaxDistanceScaleFieldNumber; |
| 5013 | const int TransceiverComponentsAttributes::kRxWavelengthFieldNumber; |
| 5014 | const int TransceiverComponentsAttributes::kTxWavelengthFieldNumber; |
| 5015 | const int TransceiverComponentsAttributes::kWavelengthScaleFieldNumber; |
| 5016 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 5017 | |
| 5018 | TransceiverComponentsAttributes::TransceiverComponentsAttributes() |
| 5019 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 5020 | SharedCtor(); |
| 5021 | // @@protoc_insertion_point(constructor:dmi.TransceiverComponentsAttributes) |
| 5022 | } |
| 5023 | TransceiverComponentsAttributes::TransceiverComponentsAttributes(const TransceiverComponentsAttributes& from) |
| 5024 | : ::google::protobuf::Message(), |
| 5025 | _internal_metadata_(nullptr), |
| 5026 | rx_wavelength_(from.rx_wavelength_), |
| 5027 | tx_wavelength_(from.tx_wavelength_) { |
| 5028 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 5029 | ::memcpy(&form_factor_, &from.form_factor_, |
| 5030 | static_cast<size_t>(reinterpret_cast<char*>(&wavelength_scale_) - |
| 5031 | reinterpret_cast<char*>(&form_factor_)) + sizeof(wavelength_scale_)); |
| 5032 | // @@protoc_insertion_point(copy_constructor:dmi.TransceiverComponentsAttributes) |
| 5033 | } |
| 5034 | |
| 5035 | void TransceiverComponentsAttributes::SharedCtor() { |
| 5036 | ::memset(&form_factor_, 0, static_cast<size_t>( |
| 5037 | reinterpret_cast<char*>(&wavelength_scale_) - |
| 5038 | reinterpret_cast<char*>(&form_factor_)) + sizeof(wavelength_scale_)); |
| 5039 | } |
| 5040 | |
| 5041 | TransceiverComponentsAttributes::~TransceiverComponentsAttributes() { |
| 5042 | // @@protoc_insertion_point(destructor:dmi.TransceiverComponentsAttributes) |
| 5043 | SharedDtor(); |
| 5044 | } |
| 5045 | |
| 5046 | void TransceiverComponentsAttributes::SharedDtor() { |
| 5047 | } |
| 5048 | |
| 5049 | void TransceiverComponentsAttributes::SetCachedSize(int size) const { |
| 5050 | _cached_size_.Set(size); |
| 5051 | } |
| 5052 | const TransceiverComponentsAttributes& TransceiverComponentsAttributes::default_instance() { |
| 5053 | ::google::protobuf::internal::InitSCC(&::scc_info_TransceiverComponentsAttributes_dmi_2fhw_2eproto.base); |
| 5054 | return *internal_default_instance(); |
| 5055 | } |
| 5056 | |
| 5057 | |
| 5058 | void TransceiverComponentsAttributes::Clear() { |
| 5059 | // @@protoc_insertion_point(message_clear_start:dmi.TransceiverComponentsAttributes) |
| 5060 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5061 | // Prevent compiler warnings about cached_has_bits being unused |
| 5062 | (void) cached_has_bits; |
| 5063 | |
| 5064 | rx_wavelength_.Clear(); |
| 5065 | tx_wavelength_.Clear(); |
| 5066 | ::memset(&form_factor_, 0, static_cast<size_t>( |
| 5067 | reinterpret_cast<char*>(&wavelength_scale_) - |
| 5068 | reinterpret_cast<char*>(&form_factor_)) + sizeof(wavelength_scale_)); |
| 5069 | _internal_metadata_.Clear(); |
| 5070 | } |
| 5071 | |
| 5072 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5073 | const char* TransceiverComponentsAttributes::_InternalParse(const char* begin, const char* end, void* object, |
| 5074 | ::google::protobuf::internal::ParseContext* ctx) { |
| 5075 | auto msg = static_cast<TransceiverComponentsAttributes*>(object); |
| 5076 | ::google::protobuf::int32 size; (void)size; |
| 5077 | int depth; (void)depth; |
| 5078 | ::google::protobuf::uint32 tag; |
| 5079 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 5080 | auto ptr = begin; |
| 5081 | while (ptr < end) { |
| 5082 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 5083 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5084 | switch (tag >> 3) { |
| 5085 | // .dmi.TransceiverComponentsAttributes.FormFactor form_factor = 1; |
| 5086 | case 1: { |
| 5087 | if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; |
| 5088 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 5089 | msg->set_form_factor(static_cast<::dmi::TransceiverComponentsAttributes_FormFactor>(val)); |
| 5090 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5091 | break; |
| 5092 | } |
| 5093 | // .dmi.TransceiverComponentsAttributes.Type trans_type = 2; |
| 5094 | case 2: { |
| 5095 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 5096 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 5097 | msg->set_trans_type(static_cast<::dmi::TransceiverComponentsAttributes_Type>(val)); |
| 5098 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5099 | break; |
| 5100 | } |
| 5101 | // uint32 max_distance = 3; |
| 5102 | case 3: { |
| 5103 | if (static_cast<::google::protobuf::uint8>(tag) != 24) goto handle_unusual; |
| 5104 | msg->set_max_distance(::google::protobuf::internal::ReadVarint(&ptr)); |
| 5105 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5106 | break; |
| 5107 | } |
| 5108 | // .dmi.ValueScale max_distance_scale = 4; |
| 5109 | case 4: { |
| 5110 | if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; |
| 5111 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 5112 | msg->set_max_distance_scale(static_cast<::dmi::ValueScale>(val)); |
| 5113 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5114 | break; |
| 5115 | } |
| 5116 | // repeated uint32 rx_wavelength = 5; |
| 5117 | case 5: { |
| 5118 | if (static_cast<::google::protobuf::uint8>(tag) == 42) { |
| 5119 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 5120 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5121 | parser_till_end = ::google::protobuf::internal::PackedUInt32Parser; |
| 5122 | object = msg->mutable_rx_wavelength(); |
| 5123 | if (size > end - ptr) goto len_delim_till_end; |
| 5124 | auto newend = ptr + size; |
| 5125 | if (size) ptr = parser_till_end(ptr, newend, object, ctx); |
| 5126 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend); |
| 5127 | break; |
| 5128 | } else if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; |
| 5129 | do { |
| 5130 | msg->add_rx_wavelength(::google::protobuf::internal::ReadVarint(&ptr)); |
| 5131 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5132 | if (ptr >= end) break; |
| 5133 | } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 40 && (ptr += 1)); |
| 5134 | break; |
| 5135 | } |
| 5136 | // repeated uint32 tx_wavelength = 6; |
| 5137 | case 6: { |
| 5138 | if (static_cast<::google::protobuf::uint8>(tag) == 50) { |
| 5139 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 5140 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5141 | parser_till_end = ::google::protobuf::internal::PackedUInt32Parser; |
| 5142 | object = msg->mutable_tx_wavelength(); |
| 5143 | if (size > end - ptr) goto len_delim_till_end; |
| 5144 | auto newend = ptr + size; |
| 5145 | if (size) ptr = parser_till_end(ptr, newend, object, ctx); |
| 5146 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend); |
| 5147 | break; |
| 5148 | } else if (static_cast<::google::protobuf::uint8>(tag) != 48) goto handle_unusual; |
| 5149 | do { |
| 5150 | msg->add_tx_wavelength(::google::protobuf::internal::ReadVarint(&ptr)); |
| 5151 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5152 | if (ptr >= end) break; |
| 5153 | } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 48 && (ptr += 1)); |
| 5154 | break; |
| 5155 | } |
| 5156 | // .dmi.ValueScale wavelength_scale = 7; |
| 5157 | case 7: { |
| 5158 | if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual; |
| 5159 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 5160 | msg->set_wavelength_scale(static_cast<::dmi::ValueScale>(val)); |
| 5161 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 5162 | break; |
| 5163 | } |
| 5164 | default: { |
| 5165 | handle_unusual: |
| 5166 | if ((tag & 7) == 4 || tag == 0) { |
| 5167 | ctx->EndGroup(tag); |
| 5168 | return ptr; |
| 5169 | } |
| 5170 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 5171 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 5172 | ptr = res.first; |
| 5173 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 5174 | if (res.second) return ptr; |
| 5175 | } |
| 5176 | } // switch |
| 5177 | } // while |
| 5178 | return ptr; |
| 5179 | len_delim_till_end: |
| 5180 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 5181 | {parser_till_end, object}, size); |
| 5182 | } |
| 5183 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5184 | bool TransceiverComponentsAttributes::MergePartialFromCodedStream( |
| 5185 | ::google::protobuf::io::CodedInputStream* input) { |
| 5186 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 5187 | ::google::protobuf::uint32 tag; |
| 5188 | // @@protoc_insertion_point(parse_start:dmi.TransceiverComponentsAttributes) |
| 5189 | for (;;) { |
| 5190 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 5191 | tag = p.first; |
| 5192 | if (!p.second) goto handle_unusual; |
| 5193 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 5194 | // .dmi.TransceiverComponentsAttributes.FormFactor form_factor = 1; |
| 5195 | case 1: { |
| 5196 | if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { |
| 5197 | int value = 0; |
| 5198 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 5199 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 5200 | input, &value))); |
| 5201 | set_form_factor(static_cast< ::dmi::TransceiverComponentsAttributes_FormFactor >(value)); |
| 5202 | } else { |
| 5203 | goto handle_unusual; |
| 5204 | } |
| 5205 | break; |
| 5206 | } |
| 5207 | |
| 5208 | // .dmi.TransceiverComponentsAttributes.Type trans_type = 2; |
| 5209 | case 2: { |
| 5210 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 5211 | int value = 0; |
| 5212 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 5213 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 5214 | input, &value))); |
| 5215 | set_trans_type(static_cast< ::dmi::TransceiverComponentsAttributes_Type >(value)); |
| 5216 | } else { |
| 5217 | goto handle_unusual; |
| 5218 | } |
| 5219 | break; |
| 5220 | } |
| 5221 | |
| 5222 | // uint32 max_distance = 3; |
| 5223 | case 3: { |
| 5224 | if (static_cast< ::google::protobuf::uint8>(tag) == (24 & 0xFF)) { |
| 5225 | |
| 5226 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 5227 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 5228 | input, &max_distance_))); |
| 5229 | } else { |
| 5230 | goto handle_unusual; |
| 5231 | } |
| 5232 | break; |
| 5233 | } |
| 5234 | |
| 5235 | // .dmi.ValueScale max_distance_scale = 4; |
| 5236 | case 4: { |
| 5237 | if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { |
| 5238 | int value = 0; |
| 5239 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 5240 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 5241 | input, &value))); |
| 5242 | set_max_distance_scale(static_cast< ::dmi::ValueScale >(value)); |
| 5243 | } else { |
| 5244 | goto handle_unusual; |
| 5245 | } |
| 5246 | break; |
| 5247 | } |
| 5248 | |
| 5249 | // repeated uint32 rx_wavelength = 5; |
| 5250 | case 5: { |
| 5251 | if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { |
| 5252 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< |
| 5253 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 5254 | input, this->mutable_rx_wavelength()))); |
| 5255 | } else if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { |
| 5256 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
| 5257 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 5258 | 1, 42u, input, this->mutable_rx_wavelength()))); |
| 5259 | } else { |
| 5260 | goto handle_unusual; |
| 5261 | } |
| 5262 | break; |
| 5263 | } |
| 5264 | |
| 5265 | // repeated uint32 tx_wavelength = 6; |
| 5266 | case 6: { |
| 5267 | if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { |
| 5268 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< |
| 5269 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 5270 | input, this->mutable_tx_wavelength()))); |
| 5271 | } else if (static_cast< ::google::protobuf::uint8>(tag) == (48 & 0xFF)) { |
| 5272 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
| 5273 | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
| 5274 | 1, 50u, input, this->mutable_tx_wavelength()))); |
| 5275 | } else { |
| 5276 | goto handle_unusual; |
| 5277 | } |
| 5278 | break; |
| 5279 | } |
| 5280 | |
| 5281 | // .dmi.ValueScale wavelength_scale = 7; |
| 5282 | case 7: { |
| 5283 | if (static_cast< ::google::protobuf::uint8>(tag) == (56 & 0xFF)) { |
| 5284 | int value = 0; |
| 5285 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 5286 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 5287 | input, &value))); |
| 5288 | set_wavelength_scale(static_cast< ::dmi::ValueScale >(value)); |
| 5289 | } else { |
| 5290 | goto handle_unusual; |
| 5291 | } |
| 5292 | break; |
| 5293 | } |
| 5294 | |
| 5295 | default: { |
| 5296 | handle_unusual: |
| 5297 | if (tag == 0) { |
| 5298 | goto success; |
| 5299 | } |
| 5300 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 5301 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 5302 | break; |
| 5303 | } |
| 5304 | } |
| 5305 | } |
| 5306 | success: |
| 5307 | // @@protoc_insertion_point(parse_success:dmi.TransceiverComponentsAttributes) |
| 5308 | return true; |
| 5309 | failure: |
| 5310 | // @@protoc_insertion_point(parse_failure:dmi.TransceiverComponentsAttributes) |
| 5311 | return false; |
| 5312 | #undef DO_ |
| 5313 | } |
| 5314 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5315 | |
| 5316 | void TransceiverComponentsAttributes::SerializeWithCachedSizes( |
| 5317 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 5318 | // @@protoc_insertion_point(serialize_start:dmi.TransceiverComponentsAttributes) |
| 5319 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5320 | (void) cached_has_bits; |
| 5321 | |
| 5322 | // .dmi.TransceiverComponentsAttributes.FormFactor form_factor = 1; |
| 5323 | if (this->form_factor() != 0) { |
| 5324 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 5325 | 1, this->form_factor(), output); |
| 5326 | } |
| 5327 | |
| 5328 | // .dmi.TransceiverComponentsAttributes.Type trans_type = 2; |
| 5329 | if (this->trans_type() != 0) { |
| 5330 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 5331 | 2, this->trans_type(), output); |
| 5332 | } |
| 5333 | |
| 5334 | // uint32 max_distance = 3; |
| 5335 | if (this->max_distance() != 0) { |
| 5336 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->max_distance(), output); |
| 5337 | } |
| 5338 | |
| 5339 | // .dmi.ValueScale max_distance_scale = 4; |
| 5340 | if (this->max_distance_scale() != 0) { |
| 5341 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 5342 | 4, this->max_distance_scale(), output); |
| 5343 | } |
| 5344 | |
| 5345 | // repeated uint32 rx_wavelength = 5; |
| 5346 | if (this->rx_wavelength_size() > 0) { |
| 5347 | ::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
| 5348 | output->WriteVarint32(_rx_wavelength_cached_byte_size_.load( |
| 5349 | std::memory_order_relaxed)); |
| 5350 | } |
| 5351 | for (int i = 0, n = this->rx_wavelength_size(); i < n; i++) { |
| 5352 | ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag( |
| 5353 | this->rx_wavelength(i), output); |
| 5354 | } |
| 5355 | |
| 5356 | // repeated uint32 tx_wavelength = 6; |
| 5357 | if (this->tx_wavelength_size() > 0) { |
| 5358 | ::google::protobuf::internal::WireFormatLite::WriteTag(6, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
| 5359 | output->WriteVarint32(_tx_wavelength_cached_byte_size_.load( |
| 5360 | std::memory_order_relaxed)); |
| 5361 | } |
| 5362 | for (int i = 0, n = this->tx_wavelength_size(); i < n; i++) { |
| 5363 | ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag( |
| 5364 | this->tx_wavelength(i), output); |
| 5365 | } |
| 5366 | |
| 5367 | // .dmi.ValueScale wavelength_scale = 7; |
| 5368 | if (this->wavelength_scale() != 0) { |
| 5369 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 5370 | 7, this->wavelength_scale(), output); |
| 5371 | } |
| 5372 | |
| 5373 | if (_internal_metadata_.have_unknown_fields()) { |
| 5374 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 5375 | _internal_metadata_.unknown_fields(), output); |
| 5376 | } |
| 5377 | // @@protoc_insertion_point(serialize_end:dmi.TransceiverComponentsAttributes) |
| 5378 | } |
| 5379 | |
| 5380 | ::google::protobuf::uint8* TransceiverComponentsAttributes::InternalSerializeWithCachedSizesToArray( |
| 5381 | ::google::protobuf::uint8* target) const { |
| 5382 | // @@protoc_insertion_point(serialize_to_array_start:dmi.TransceiverComponentsAttributes) |
| 5383 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5384 | (void) cached_has_bits; |
| 5385 | |
| 5386 | // .dmi.TransceiverComponentsAttributes.FormFactor form_factor = 1; |
| 5387 | if (this->form_factor() != 0) { |
| 5388 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 5389 | 1, this->form_factor(), target); |
| 5390 | } |
| 5391 | |
| 5392 | // .dmi.TransceiverComponentsAttributes.Type trans_type = 2; |
| 5393 | if (this->trans_type() != 0) { |
| 5394 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 5395 | 2, this->trans_type(), target); |
| 5396 | } |
| 5397 | |
| 5398 | // uint32 max_distance = 3; |
| 5399 | if (this->max_distance() != 0) { |
| 5400 | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->max_distance(), target); |
| 5401 | } |
| 5402 | |
| 5403 | // .dmi.ValueScale max_distance_scale = 4; |
| 5404 | if (this->max_distance_scale() != 0) { |
| 5405 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 5406 | 4, this->max_distance_scale(), target); |
| 5407 | } |
| 5408 | |
| 5409 | // repeated uint32 rx_wavelength = 5; |
| 5410 | if (this->rx_wavelength_size() > 0) { |
| 5411 | target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( |
| 5412 | 5, |
| 5413 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
| 5414 | target); |
| 5415 | target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
| 5416 | _rx_wavelength_cached_byte_size_.load(std::memory_order_relaxed), |
| 5417 | target); |
| 5418 | target = ::google::protobuf::internal::WireFormatLite:: |
| 5419 | WriteUInt32NoTagToArray(this->rx_wavelength_, target); |
| 5420 | } |
| 5421 | |
| 5422 | // repeated uint32 tx_wavelength = 6; |
| 5423 | if (this->tx_wavelength_size() > 0) { |
| 5424 | target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( |
| 5425 | 6, |
| 5426 | ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
| 5427 | target); |
| 5428 | target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
| 5429 | _tx_wavelength_cached_byte_size_.load(std::memory_order_relaxed), |
| 5430 | target); |
| 5431 | target = ::google::protobuf::internal::WireFormatLite:: |
| 5432 | WriteUInt32NoTagToArray(this->tx_wavelength_, target); |
| 5433 | } |
| 5434 | |
| 5435 | // .dmi.ValueScale wavelength_scale = 7; |
| 5436 | if (this->wavelength_scale() != 0) { |
| 5437 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 5438 | 7, this->wavelength_scale(), target); |
| 5439 | } |
| 5440 | |
| 5441 | if (_internal_metadata_.have_unknown_fields()) { |
| 5442 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 5443 | _internal_metadata_.unknown_fields(), target); |
| 5444 | } |
| 5445 | // @@protoc_insertion_point(serialize_to_array_end:dmi.TransceiverComponentsAttributes) |
| 5446 | return target; |
| 5447 | } |
| 5448 | |
| 5449 | size_t TransceiverComponentsAttributes::ByteSizeLong() const { |
| 5450 | // @@protoc_insertion_point(message_byte_size_start:dmi.TransceiverComponentsAttributes) |
| 5451 | size_t total_size = 0; |
| 5452 | |
| 5453 | if (_internal_metadata_.have_unknown_fields()) { |
| 5454 | total_size += |
| 5455 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 5456 | _internal_metadata_.unknown_fields()); |
| 5457 | } |
| 5458 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5459 | // Prevent compiler warnings about cached_has_bits being unused |
| 5460 | (void) cached_has_bits; |
| 5461 | |
| 5462 | // repeated uint32 rx_wavelength = 5; |
| 5463 | { |
| 5464 | size_t data_size = ::google::protobuf::internal::WireFormatLite:: |
| 5465 | UInt32Size(this->rx_wavelength_); |
| 5466 | if (data_size > 0) { |
| 5467 | total_size += 1 + |
| 5468 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 5469 | static_cast<::google::protobuf::int32>(data_size)); |
| 5470 | } |
| 5471 | int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); |
| 5472 | _rx_wavelength_cached_byte_size_.store(cached_size, |
| 5473 | std::memory_order_relaxed); |
| 5474 | total_size += data_size; |
| 5475 | } |
| 5476 | |
| 5477 | // repeated uint32 tx_wavelength = 6; |
| 5478 | { |
| 5479 | size_t data_size = ::google::protobuf::internal::WireFormatLite:: |
| 5480 | UInt32Size(this->tx_wavelength_); |
| 5481 | if (data_size > 0) { |
| 5482 | total_size += 1 + |
| 5483 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 5484 | static_cast<::google::protobuf::int32>(data_size)); |
| 5485 | } |
| 5486 | int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); |
| 5487 | _tx_wavelength_cached_byte_size_.store(cached_size, |
| 5488 | std::memory_order_relaxed); |
| 5489 | total_size += data_size; |
| 5490 | } |
| 5491 | |
| 5492 | // .dmi.TransceiverComponentsAttributes.FormFactor form_factor = 1; |
| 5493 | if (this->form_factor() != 0) { |
| 5494 | total_size += 1 + |
| 5495 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->form_factor()); |
| 5496 | } |
| 5497 | |
| 5498 | // .dmi.TransceiverComponentsAttributes.Type trans_type = 2; |
| 5499 | if (this->trans_type() != 0) { |
| 5500 | total_size += 1 + |
| 5501 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->trans_type()); |
| 5502 | } |
| 5503 | |
| 5504 | // uint32 max_distance = 3; |
| 5505 | if (this->max_distance() != 0) { |
| 5506 | total_size += 1 + |
| 5507 | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
| 5508 | this->max_distance()); |
| 5509 | } |
| 5510 | |
| 5511 | // .dmi.ValueScale max_distance_scale = 4; |
| 5512 | if (this->max_distance_scale() != 0) { |
| 5513 | total_size += 1 + |
| 5514 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->max_distance_scale()); |
| 5515 | } |
| 5516 | |
| 5517 | // .dmi.ValueScale wavelength_scale = 7; |
| 5518 | if (this->wavelength_scale() != 0) { |
| 5519 | total_size += 1 + |
| 5520 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->wavelength_scale()); |
| 5521 | } |
| 5522 | |
| 5523 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 5524 | SetCachedSize(cached_size); |
| 5525 | return total_size; |
| 5526 | } |
| 5527 | |
| 5528 | void TransceiverComponentsAttributes::MergeFrom(const ::google::protobuf::Message& from) { |
| 5529 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.TransceiverComponentsAttributes) |
| 5530 | GOOGLE_DCHECK_NE(&from, this); |
| 5531 | const TransceiverComponentsAttributes* source = |
| 5532 | ::google::protobuf::DynamicCastToGenerated<TransceiverComponentsAttributes>( |
| 5533 | &from); |
| 5534 | if (source == nullptr) { |
| 5535 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.TransceiverComponentsAttributes) |
| 5536 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 5537 | } else { |
| 5538 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.TransceiverComponentsAttributes) |
| 5539 | MergeFrom(*source); |
| 5540 | } |
| 5541 | } |
| 5542 | |
| 5543 | void TransceiverComponentsAttributes::MergeFrom(const TransceiverComponentsAttributes& from) { |
| 5544 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.TransceiverComponentsAttributes) |
| 5545 | GOOGLE_DCHECK_NE(&from, this); |
| 5546 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 5547 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5548 | (void) cached_has_bits; |
| 5549 | |
| 5550 | rx_wavelength_.MergeFrom(from.rx_wavelength_); |
| 5551 | tx_wavelength_.MergeFrom(from.tx_wavelength_); |
| 5552 | if (from.form_factor() != 0) { |
| 5553 | set_form_factor(from.form_factor()); |
| 5554 | } |
| 5555 | if (from.trans_type() != 0) { |
| 5556 | set_trans_type(from.trans_type()); |
| 5557 | } |
| 5558 | if (from.max_distance() != 0) { |
| 5559 | set_max_distance(from.max_distance()); |
| 5560 | } |
| 5561 | if (from.max_distance_scale() != 0) { |
| 5562 | set_max_distance_scale(from.max_distance_scale()); |
| 5563 | } |
| 5564 | if (from.wavelength_scale() != 0) { |
| 5565 | set_wavelength_scale(from.wavelength_scale()); |
| 5566 | } |
| 5567 | } |
| 5568 | |
| 5569 | void TransceiverComponentsAttributes::CopyFrom(const ::google::protobuf::Message& from) { |
| 5570 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.TransceiverComponentsAttributes) |
| 5571 | if (&from == this) return; |
| 5572 | Clear(); |
| 5573 | MergeFrom(from); |
| 5574 | } |
| 5575 | |
| 5576 | void TransceiverComponentsAttributes::CopyFrom(const TransceiverComponentsAttributes& from) { |
| 5577 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.TransceiverComponentsAttributes) |
| 5578 | if (&from == this) return; |
| 5579 | Clear(); |
| 5580 | MergeFrom(from); |
| 5581 | } |
| 5582 | |
| 5583 | bool TransceiverComponentsAttributes::IsInitialized() const { |
| 5584 | return true; |
| 5585 | } |
| 5586 | |
| 5587 | void TransceiverComponentsAttributes::Swap(TransceiverComponentsAttributes* other) { |
| 5588 | if (other == this) return; |
| 5589 | InternalSwap(other); |
| 5590 | } |
| 5591 | void TransceiverComponentsAttributes::InternalSwap(TransceiverComponentsAttributes* other) { |
| 5592 | using std::swap; |
| 5593 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 5594 | rx_wavelength_.InternalSwap(&other->rx_wavelength_); |
| 5595 | tx_wavelength_.InternalSwap(&other->tx_wavelength_); |
| 5596 | swap(form_factor_, other->form_factor_); |
| 5597 | swap(trans_type_, other->trans_type_); |
| 5598 | swap(max_distance_, other->max_distance_); |
| 5599 | swap(max_distance_scale_, other->max_distance_scale_); |
| 5600 | swap(wavelength_scale_, other->wavelength_scale_); |
| 5601 | } |
| 5602 | |
| 5603 | ::google::protobuf::Metadata TransceiverComponentsAttributes::GetMetadata() const { |
| 5604 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 5605 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 5606 | } |
| 5607 | |
| 5608 | |
| 5609 | // =================================================================== |
| 5610 | |
| 5611 | void Component::InitAsDefaultInstance() { |
| 5612 | ::dmi::_Component_default_instance_._instance.get_mutable()->mfg_date_ = const_cast< ::google::protobuf::Timestamp*>( |
| 5613 | ::google::protobuf::Timestamp::internal_default_instance()); |
| 5614 | ::dmi::_Component_default_instance_._instance.get_mutable()->uri_ = const_cast< ::dmi::Uri*>( |
| 5615 | ::dmi::Uri::internal_default_instance()); |
| 5616 | ::dmi::_Component_default_instance_._instance.get_mutable()->uuid_ = const_cast< ::dmi::Uuid*>( |
| 5617 | ::dmi::Uuid::internal_default_instance()); |
| 5618 | ::dmi::_Component_default_instance_._instance.get_mutable()->state_ = const_cast< ::dmi::ComponentState*>( |
| 5619 | ::dmi::ComponentState::internal_default_instance()); |
| 5620 | ::dmi::_Component_default_instance_.port_attr_ = const_cast< ::dmi::PortComponentAttributes*>( |
| 5621 | ::dmi::PortComponentAttributes::internal_default_instance()); |
| 5622 | ::dmi::_Component_default_instance_.container_attr_ = const_cast< ::dmi::ContainerComponentAttributes*>( |
| 5623 | ::dmi::ContainerComponentAttributes::internal_default_instance()); |
| 5624 | ::dmi::_Component_default_instance_.psu_attr_ = const_cast< ::dmi::PsuComponentAttributes*>( |
| 5625 | ::dmi::PsuComponentAttributes::internal_default_instance()); |
| 5626 | ::dmi::_Component_default_instance_.transceiver_attr_ = const_cast< ::dmi::TransceiverComponentsAttributes*>( |
| 5627 | ::dmi::TransceiverComponentsAttributes::internal_default_instance()); |
| 5628 | } |
| 5629 | class Component::HasBitSetters { |
| 5630 | public: |
| 5631 | static const ::google::protobuf::Timestamp& mfg_date(const Component* msg); |
| 5632 | static const ::dmi::Uri& uri(const Component* msg); |
| 5633 | static const ::dmi::Uuid& uuid(const Component* msg); |
| 5634 | static const ::dmi::ComponentState& state(const Component* msg); |
| 5635 | static const ::dmi::PortComponentAttributes& port_attr(const Component* msg); |
| 5636 | static const ::dmi::ContainerComponentAttributes& container_attr(const Component* msg); |
| 5637 | static const ::dmi::PsuComponentAttributes& psu_attr(const Component* msg); |
| 5638 | static const ::dmi::TransceiverComponentsAttributes& transceiver_attr(const Component* msg); |
| 5639 | }; |
| 5640 | |
| 5641 | const ::google::protobuf::Timestamp& |
| 5642 | Component::HasBitSetters::mfg_date(const Component* msg) { |
| 5643 | return *msg->mfg_date_; |
| 5644 | } |
| 5645 | const ::dmi::Uri& |
| 5646 | Component::HasBitSetters::uri(const Component* msg) { |
| 5647 | return *msg->uri_; |
| 5648 | } |
| 5649 | const ::dmi::Uuid& |
| 5650 | Component::HasBitSetters::uuid(const Component* msg) { |
| 5651 | return *msg->uuid_; |
| 5652 | } |
| 5653 | const ::dmi::ComponentState& |
| 5654 | Component::HasBitSetters::state(const Component* msg) { |
| 5655 | return *msg->state_; |
| 5656 | } |
| 5657 | const ::dmi::PortComponentAttributes& |
| 5658 | Component::HasBitSetters::port_attr(const Component* msg) { |
| 5659 | return *msg->specific_.port_attr_; |
| 5660 | } |
| 5661 | const ::dmi::ContainerComponentAttributes& |
| 5662 | Component::HasBitSetters::container_attr(const Component* msg) { |
| 5663 | return *msg->specific_.container_attr_; |
| 5664 | } |
| 5665 | const ::dmi::PsuComponentAttributes& |
| 5666 | Component::HasBitSetters::psu_attr(const Component* msg) { |
| 5667 | return *msg->specific_.psu_attr_; |
| 5668 | } |
| 5669 | const ::dmi::TransceiverComponentsAttributes& |
| 5670 | Component::HasBitSetters::transceiver_attr(const Component* msg) { |
| 5671 | return *msg->specific_.transceiver_attr_; |
| 5672 | } |
| 5673 | void Component::clear_mfg_date() { |
| 5674 | if (GetArenaNoVirtual() == nullptr && mfg_date_ != nullptr) { |
| 5675 | delete mfg_date_; |
| 5676 | } |
| 5677 | mfg_date_ = nullptr; |
| 5678 | } |
| 5679 | void Component::set_allocated_port_attr(::dmi::PortComponentAttributes* port_attr) { |
| 5680 | ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); |
| 5681 | clear_specific(); |
| 5682 | if (port_attr) { |
| 5683 | ::google::protobuf::Arena* submessage_arena = nullptr; |
| 5684 | if (message_arena != submessage_arena) { |
| 5685 | port_attr = ::google::protobuf::internal::GetOwnedMessage( |
| 5686 | message_arena, port_attr, submessage_arena); |
| 5687 | } |
| 5688 | set_has_port_attr(); |
| 5689 | specific_.port_attr_ = port_attr; |
| 5690 | } |
| 5691 | // @@protoc_insertion_point(field_set_allocated:dmi.Component.port_attr) |
| 5692 | } |
| 5693 | void Component::set_allocated_container_attr(::dmi::ContainerComponentAttributes* container_attr) { |
| 5694 | ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); |
| 5695 | clear_specific(); |
| 5696 | if (container_attr) { |
| 5697 | ::google::protobuf::Arena* submessage_arena = nullptr; |
| 5698 | if (message_arena != submessage_arena) { |
| 5699 | container_attr = ::google::protobuf::internal::GetOwnedMessage( |
| 5700 | message_arena, container_attr, submessage_arena); |
| 5701 | } |
| 5702 | set_has_container_attr(); |
| 5703 | specific_.container_attr_ = container_attr; |
| 5704 | } |
| 5705 | // @@protoc_insertion_point(field_set_allocated:dmi.Component.container_attr) |
| 5706 | } |
| 5707 | void Component::set_allocated_psu_attr(::dmi::PsuComponentAttributes* psu_attr) { |
| 5708 | ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); |
| 5709 | clear_specific(); |
| 5710 | if (psu_attr) { |
| 5711 | ::google::protobuf::Arena* submessage_arena = nullptr; |
| 5712 | if (message_arena != submessage_arena) { |
| 5713 | psu_attr = ::google::protobuf::internal::GetOwnedMessage( |
| 5714 | message_arena, psu_attr, submessage_arena); |
| 5715 | } |
| 5716 | set_has_psu_attr(); |
| 5717 | specific_.psu_attr_ = psu_attr; |
| 5718 | } |
| 5719 | // @@protoc_insertion_point(field_set_allocated:dmi.Component.psu_attr) |
| 5720 | } |
| 5721 | void Component::set_allocated_transceiver_attr(::dmi::TransceiverComponentsAttributes* transceiver_attr) { |
| 5722 | ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); |
| 5723 | clear_specific(); |
| 5724 | if (transceiver_attr) { |
| 5725 | ::google::protobuf::Arena* submessage_arena = nullptr; |
| 5726 | if (message_arena != submessage_arena) { |
| 5727 | transceiver_attr = ::google::protobuf::internal::GetOwnedMessage( |
| 5728 | message_arena, transceiver_attr, submessage_arena); |
| 5729 | } |
| 5730 | set_has_transceiver_attr(); |
| 5731 | specific_.transceiver_attr_ = transceiver_attr; |
| 5732 | } |
| 5733 | // @@protoc_insertion_point(field_set_allocated:dmi.Component.transceiver_attr) |
| 5734 | } |
| 5735 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 5736 | const int Component::kNameFieldNumber; |
| 5737 | const int Component::kClassFieldNumber; |
| 5738 | const int Component::kDescriptionFieldNumber; |
| 5739 | const int Component::kParentFieldNumber; |
| 5740 | const int Component::kParentRelPosFieldNumber; |
| 5741 | const int Component::kChildrenFieldNumber; |
| 5742 | const int Component::kHardwareRevFieldNumber; |
| 5743 | const int Component::kFirmwareRevFieldNumber; |
| 5744 | const int Component::kSoftwareRevFieldNumber; |
| 5745 | const int Component::kSerialNumFieldNumber; |
| 5746 | const int Component::kMfgNameFieldNumber; |
| 5747 | const int Component::kModelNameFieldNumber; |
| 5748 | const int Component::kAliasFieldNumber; |
| 5749 | const int Component::kAssetIdFieldNumber; |
| 5750 | const int Component::kIsFruFieldNumber; |
| 5751 | const int Component::kMfgDateFieldNumber; |
| 5752 | const int Component::kUriFieldNumber; |
| 5753 | const int Component::kUuidFieldNumber; |
| 5754 | const int Component::kStateFieldNumber; |
| 5755 | const int Component::kSensorDataFieldNumber; |
| 5756 | const int Component::kPortAttrFieldNumber; |
| 5757 | const int Component::kContainerAttrFieldNumber; |
| 5758 | const int Component::kPsuAttrFieldNumber; |
| 5759 | const int Component::kTransceiverAttrFieldNumber; |
| 5760 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 5761 | |
| 5762 | Component::Component() |
| 5763 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 5764 | SharedCtor(); |
| 5765 | // @@protoc_insertion_point(constructor:dmi.Component) |
| 5766 | } |
| 5767 | Component::Component(const Component& from) |
| 5768 | : ::google::protobuf::Message(), |
| 5769 | _internal_metadata_(nullptr), |
| 5770 | children_(from.children_), |
| 5771 | sensor_data_(from.sensor_data_) { |
| 5772 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 5773 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5774 | if (from.name().size() > 0) { |
| 5775 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
| 5776 | } |
| 5777 | description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5778 | if (from.description().size() > 0) { |
| 5779 | description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.description_); |
| 5780 | } |
| 5781 | parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5782 | if (from.parent().size() > 0) { |
| 5783 | parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); |
| 5784 | } |
| 5785 | hardware_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5786 | if (from.hardware_rev().size() > 0) { |
| 5787 | hardware_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.hardware_rev_); |
| 5788 | } |
| 5789 | firmware_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5790 | if (from.firmware_rev().size() > 0) { |
| 5791 | firmware_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.firmware_rev_); |
| 5792 | } |
| 5793 | software_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5794 | if (from.software_rev().size() > 0) { |
| 5795 | software_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.software_rev_); |
| 5796 | } |
| 5797 | serial_num_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5798 | if (from.serial_num().size() > 0) { |
| 5799 | serial_num_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.serial_num_); |
| 5800 | } |
| 5801 | mfg_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5802 | if (from.mfg_name().size() > 0) { |
| 5803 | mfg_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mfg_name_); |
| 5804 | } |
| 5805 | model_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5806 | if (from.model_name().size() > 0) { |
| 5807 | model_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.model_name_); |
| 5808 | } |
| 5809 | alias_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5810 | if (from.alias().size() > 0) { |
| 5811 | alias_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.alias_); |
| 5812 | } |
| 5813 | asset_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5814 | if (from.asset_id().size() > 0) { |
| 5815 | asset_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.asset_id_); |
| 5816 | } |
| 5817 | if (from.has_mfg_date()) { |
| 5818 | mfg_date_ = new ::google::protobuf::Timestamp(*from.mfg_date_); |
| 5819 | } else { |
| 5820 | mfg_date_ = nullptr; |
| 5821 | } |
| 5822 | if (from.has_uri()) { |
| 5823 | uri_ = new ::dmi::Uri(*from.uri_); |
| 5824 | } else { |
| 5825 | uri_ = nullptr; |
| 5826 | } |
| 5827 | if (from.has_uuid()) { |
| 5828 | uuid_ = new ::dmi::Uuid(*from.uuid_); |
| 5829 | } else { |
| 5830 | uuid_ = nullptr; |
| 5831 | } |
| 5832 | if (from.has_state()) { |
| 5833 | state_ = new ::dmi::ComponentState(*from.state_); |
| 5834 | } else { |
| 5835 | state_ = nullptr; |
| 5836 | } |
| 5837 | ::memcpy(&class__, &from.class__, |
| 5838 | static_cast<size_t>(reinterpret_cast<char*>(&is_fru_) - |
| 5839 | reinterpret_cast<char*>(&class__)) + sizeof(is_fru_)); |
| 5840 | clear_has_specific(); |
| 5841 | switch (from.specific_case()) { |
| 5842 | case kPortAttr: { |
| 5843 | mutable_port_attr()->::dmi::PortComponentAttributes::MergeFrom(from.port_attr()); |
| 5844 | break; |
| 5845 | } |
| 5846 | case kContainerAttr: { |
| 5847 | mutable_container_attr()->::dmi::ContainerComponentAttributes::MergeFrom(from.container_attr()); |
| 5848 | break; |
| 5849 | } |
| 5850 | case kPsuAttr: { |
| 5851 | mutable_psu_attr()->::dmi::PsuComponentAttributes::MergeFrom(from.psu_attr()); |
| 5852 | break; |
| 5853 | } |
| 5854 | case kTransceiverAttr: { |
| 5855 | mutable_transceiver_attr()->::dmi::TransceiverComponentsAttributes::MergeFrom(from.transceiver_attr()); |
| 5856 | break; |
| 5857 | } |
| 5858 | case SPECIFIC_NOT_SET: { |
| 5859 | break; |
| 5860 | } |
| 5861 | } |
| 5862 | // @@protoc_insertion_point(copy_constructor:dmi.Component) |
| 5863 | } |
| 5864 | |
| 5865 | void Component::SharedCtor() { |
| 5866 | ::google::protobuf::internal::InitSCC( |
| 5867 | &scc_info_Component_dmi_2fhw_2eproto.base); |
| 5868 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5869 | description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5870 | parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5871 | hardware_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5872 | firmware_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5873 | software_rev_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5874 | serial_num_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5875 | mfg_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5876 | model_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5877 | alias_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5878 | asset_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5879 | ::memset(&mfg_date_, 0, static_cast<size_t>( |
| 5880 | reinterpret_cast<char*>(&is_fru_) - |
| 5881 | reinterpret_cast<char*>(&mfg_date_)) + sizeof(is_fru_)); |
| 5882 | clear_has_specific(); |
| 5883 | } |
| 5884 | |
| 5885 | Component::~Component() { |
| 5886 | // @@protoc_insertion_point(destructor:dmi.Component) |
| 5887 | SharedDtor(); |
| 5888 | } |
| 5889 | |
| 5890 | void Component::SharedDtor() { |
| 5891 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5892 | description_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5893 | parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5894 | hardware_rev_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5895 | firmware_rev_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5896 | software_rev_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5897 | serial_num_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5898 | mfg_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5899 | model_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5900 | alias_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5901 | asset_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5902 | if (this != internal_default_instance()) delete mfg_date_; |
| 5903 | if (this != internal_default_instance()) delete uri_; |
| 5904 | if (this != internal_default_instance()) delete uuid_; |
| 5905 | if (this != internal_default_instance()) delete state_; |
| 5906 | if (has_specific()) { |
| 5907 | clear_specific(); |
| 5908 | } |
| 5909 | } |
| 5910 | |
| 5911 | void Component::SetCachedSize(int size) const { |
| 5912 | _cached_size_.Set(size); |
| 5913 | } |
| 5914 | const Component& Component::default_instance() { |
| 5915 | ::google::protobuf::internal::InitSCC(&::scc_info_Component_dmi_2fhw_2eproto.base); |
| 5916 | return *internal_default_instance(); |
| 5917 | } |
| 5918 | |
| 5919 | |
| 5920 | void Component::clear_specific() { |
| 5921 | // @@protoc_insertion_point(one_of_clear_start:dmi.Component) |
| 5922 | switch (specific_case()) { |
| 5923 | case kPortAttr: { |
| 5924 | delete specific_.port_attr_; |
| 5925 | break; |
| 5926 | } |
| 5927 | case kContainerAttr: { |
| 5928 | delete specific_.container_attr_; |
| 5929 | break; |
| 5930 | } |
| 5931 | case kPsuAttr: { |
| 5932 | delete specific_.psu_attr_; |
| 5933 | break; |
| 5934 | } |
| 5935 | case kTransceiverAttr: { |
| 5936 | delete specific_.transceiver_attr_; |
| 5937 | break; |
| 5938 | } |
| 5939 | case SPECIFIC_NOT_SET: { |
| 5940 | break; |
| 5941 | } |
| 5942 | } |
| 5943 | _oneof_case_[0] = SPECIFIC_NOT_SET; |
| 5944 | } |
| 5945 | |
| 5946 | |
| 5947 | void Component::Clear() { |
| 5948 | // @@protoc_insertion_point(message_clear_start:dmi.Component) |
| 5949 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 5950 | // Prevent compiler warnings about cached_has_bits being unused |
| 5951 | (void) cached_has_bits; |
| 5952 | |
| 5953 | children_.Clear(); |
| 5954 | sensor_data_.Clear(); |
| 5955 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5956 | description_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5957 | parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5958 | hardware_rev_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5959 | firmware_rev_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5960 | software_rev_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5961 | serial_num_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5962 | mfg_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5963 | model_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5964 | alias_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5965 | asset_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 5966 | if (GetArenaNoVirtual() == nullptr && mfg_date_ != nullptr) { |
| 5967 | delete mfg_date_; |
| 5968 | } |
| 5969 | mfg_date_ = nullptr; |
| 5970 | if (GetArenaNoVirtual() == nullptr && uri_ != nullptr) { |
| 5971 | delete uri_; |
| 5972 | } |
| 5973 | uri_ = nullptr; |
| 5974 | if (GetArenaNoVirtual() == nullptr && uuid_ != nullptr) { |
| 5975 | delete uuid_; |
| 5976 | } |
| 5977 | uuid_ = nullptr; |
| 5978 | if (GetArenaNoVirtual() == nullptr && state_ != nullptr) { |
| 5979 | delete state_; |
| 5980 | } |
| 5981 | state_ = nullptr; |
| 5982 | ::memset(&class__, 0, static_cast<size_t>( |
| 5983 | reinterpret_cast<char*>(&is_fru_) - |
| 5984 | reinterpret_cast<char*>(&class__)) + sizeof(is_fru_)); |
| 5985 | clear_specific(); |
| 5986 | _internal_metadata_.Clear(); |
| 5987 | } |
| 5988 | |
| 5989 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 5990 | const char* Component::_InternalParse(const char* begin, const char* end, void* object, |
| 5991 | ::google::protobuf::internal::ParseContext* ctx) { |
| 5992 | auto msg = static_cast<Component*>(object); |
| 5993 | ::google::protobuf::int32 size; (void)size; |
| 5994 | int depth; (void)depth; |
| 5995 | ::google::protobuf::uint32 tag; |
| 5996 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 5997 | auto ptr = begin; |
| 5998 | while (ptr < end) { |
| 5999 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 6000 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6001 | switch (tag >> 3) { |
| 6002 | // string name = 1; |
| 6003 | case 1: { |
| 6004 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 6005 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6006 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6007 | ctx->extra_parse_data().SetFieldName("dmi.Component.name"); |
| 6008 | object = msg->mutable_name(); |
| 6009 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6010 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6011 | goto string_till_end; |
| 6012 | } |
| 6013 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6014 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6015 | ptr += size; |
| 6016 | break; |
| 6017 | } |
| 6018 | // .dmi.ComponentType class = 2; |
| 6019 | case 2: { |
| 6020 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 6021 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 6022 | msg->set_class_(static_cast<::dmi::ComponentType>(val)); |
| 6023 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6024 | break; |
| 6025 | } |
| 6026 | // string description = 3; |
| 6027 | case 3: { |
| 6028 | if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; |
| 6029 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6030 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6031 | ctx->extra_parse_data().SetFieldName("dmi.Component.description"); |
| 6032 | object = msg->mutable_description(); |
| 6033 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6034 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6035 | goto string_till_end; |
| 6036 | } |
| 6037 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6038 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6039 | ptr += size; |
| 6040 | break; |
| 6041 | } |
| 6042 | // string parent = 4; |
| 6043 | case 4: { |
| 6044 | if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; |
| 6045 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6046 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6047 | ctx->extra_parse_data().SetFieldName("dmi.Component.parent"); |
| 6048 | object = msg->mutable_parent(); |
| 6049 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6050 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6051 | goto string_till_end; |
| 6052 | } |
| 6053 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6054 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6055 | ptr += size; |
| 6056 | break; |
| 6057 | } |
| 6058 | // int32 parent_rel_pos = 5; |
| 6059 | case 5: { |
| 6060 | if (static_cast<::google::protobuf::uint8>(tag) != 40) goto handle_unusual; |
| 6061 | msg->set_parent_rel_pos(::google::protobuf::internal::ReadVarint(&ptr)); |
| 6062 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6063 | break; |
| 6064 | } |
| 6065 | // repeated .dmi.Component children = 6; |
| 6066 | case 6: { |
| 6067 | if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; |
| 6068 | do { |
| 6069 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6070 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6071 | parser_till_end = ::dmi::Component::_InternalParse; |
| 6072 | object = msg->add_children(); |
| 6073 | if (size > end - ptr) goto len_delim_till_end; |
| 6074 | ptr += size; |
| 6075 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 6076 | {parser_till_end, object}, ptr - size, ptr)); |
| 6077 | if (ptr >= end) break; |
| 6078 | } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 50 && (ptr += 1)); |
| 6079 | break; |
| 6080 | } |
| 6081 | // string hardware_rev = 7; |
| 6082 | case 7: { |
| 6083 | if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; |
| 6084 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6085 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6086 | ctx->extra_parse_data().SetFieldName("dmi.Component.hardware_rev"); |
| 6087 | object = msg->mutable_hardware_rev(); |
| 6088 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6089 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6090 | goto string_till_end; |
| 6091 | } |
| 6092 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6093 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6094 | ptr += size; |
| 6095 | break; |
| 6096 | } |
| 6097 | // string firmware_rev = 8; |
| 6098 | case 8: { |
| 6099 | if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual; |
| 6100 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6101 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6102 | ctx->extra_parse_data().SetFieldName("dmi.Component.firmware_rev"); |
| 6103 | object = msg->mutable_firmware_rev(); |
| 6104 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6105 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6106 | goto string_till_end; |
| 6107 | } |
| 6108 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6109 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6110 | ptr += size; |
| 6111 | break; |
| 6112 | } |
| 6113 | // string software_rev = 9; |
| 6114 | case 9: { |
| 6115 | if (static_cast<::google::protobuf::uint8>(tag) != 74) goto handle_unusual; |
| 6116 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6117 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6118 | ctx->extra_parse_data().SetFieldName("dmi.Component.software_rev"); |
| 6119 | object = msg->mutable_software_rev(); |
| 6120 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6121 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6122 | goto string_till_end; |
| 6123 | } |
| 6124 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6125 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6126 | ptr += size; |
| 6127 | break; |
| 6128 | } |
| 6129 | // string serial_num = 10; |
| 6130 | case 10: { |
| 6131 | if (static_cast<::google::protobuf::uint8>(tag) != 82) goto handle_unusual; |
| 6132 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6133 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6134 | ctx->extra_parse_data().SetFieldName("dmi.Component.serial_num"); |
| 6135 | object = msg->mutable_serial_num(); |
| 6136 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6137 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6138 | goto string_till_end; |
| 6139 | } |
| 6140 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6141 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6142 | ptr += size; |
| 6143 | break; |
| 6144 | } |
| 6145 | // string mfg_name = 11; |
| 6146 | case 11: { |
| 6147 | if (static_cast<::google::protobuf::uint8>(tag) != 90) goto handle_unusual; |
| 6148 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6149 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6150 | ctx->extra_parse_data().SetFieldName("dmi.Component.mfg_name"); |
| 6151 | object = msg->mutable_mfg_name(); |
| 6152 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6153 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6154 | goto string_till_end; |
| 6155 | } |
| 6156 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6157 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6158 | ptr += size; |
| 6159 | break; |
| 6160 | } |
| 6161 | // string model_name = 12; |
| 6162 | case 12: { |
| 6163 | if (static_cast<::google::protobuf::uint8>(tag) != 98) goto handle_unusual; |
| 6164 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6165 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6166 | ctx->extra_parse_data().SetFieldName("dmi.Component.model_name"); |
| 6167 | object = msg->mutable_model_name(); |
| 6168 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6169 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6170 | goto string_till_end; |
| 6171 | } |
| 6172 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6173 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6174 | ptr += size; |
| 6175 | break; |
| 6176 | } |
| 6177 | // string alias = 13; |
| 6178 | case 13: { |
| 6179 | if (static_cast<::google::protobuf::uint8>(tag) != 106) goto handle_unusual; |
| 6180 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6181 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6182 | ctx->extra_parse_data().SetFieldName("dmi.Component.alias"); |
| 6183 | object = msg->mutable_alias(); |
| 6184 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6185 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6186 | goto string_till_end; |
| 6187 | } |
| 6188 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6189 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6190 | ptr += size; |
| 6191 | break; |
| 6192 | } |
| 6193 | // string asset_id = 14; |
| 6194 | case 14: { |
| 6195 | if (static_cast<::google::protobuf::uint8>(tag) != 114) goto handle_unusual; |
| 6196 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6197 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6198 | ctx->extra_parse_data().SetFieldName("dmi.Component.asset_id"); |
| 6199 | object = msg->mutable_asset_id(); |
| 6200 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 6201 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 6202 | goto string_till_end; |
| 6203 | } |
| 6204 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 6205 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 6206 | ptr += size; |
| 6207 | break; |
| 6208 | } |
| 6209 | // bool is_fru = 15; |
| 6210 | case 15: { |
| 6211 | if (static_cast<::google::protobuf::uint8>(tag) != 120) goto handle_unusual; |
| 6212 | msg->set_is_fru(::google::protobuf::internal::ReadVarint(&ptr)); |
| 6213 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6214 | break; |
| 6215 | } |
| 6216 | // .google.protobuf.Timestamp mfg_date = 16; |
| 6217 | case 16: { |
| 6218 | if (static_cast<::google::protobuf::uint8>(tag) != 130) goto handle_unusual; |
| 6219 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6220 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6221 | parser_till_end = ::google::protobuf::Timestamp::_InternalParse; |
| 6222 | object = msg->mutable_mfg_date(); |
| 6223 | if (size > end - ptr) goto len_delim_till_end; |
| 6224 | ptr += size; |
| 6225 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 6226 | {parser_till_end, object}, ptr - size, ptr)); |
| 6227 | break; |
| 6228 | } |
| 6229 | // .dmi.Uri uri = 17; |
| 6230 | case 17: { |
| 6231 | if (static_cast<::google::protobuf::uint8>(tag) != 138) goto handle_unusual; |
| 6232 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6233 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6234 | parser_till_end = ::dmi::Uri::_InternalParse; |
| 6235 | object = msg->mutable_uri(); |
| 6236 | if (size > end - ptr) goto len_delim_till_end; |
| 6237 | ptr += size; |
| 6238 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 6239 | {parser_till_end, object}, ptr - size, ptr)); |
| 6240 | break; |
| 6241 | } |
| 6242 | // .dmi.Uuid uuid = 18; |
| 6243 | case 18: { |
| 6244 | if (static_cast<::google::protobuf::uint8>(tag) != 146) goto handle_unusual; |
| 6245 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6246 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6247 | parser_till_end = ::dmi::Uuid::_InternalParse; |
| 6248 | object = msg->mutable_uuid(); |
| 6249 | if (size > end - ptr) goto len_delim_till_end; |
| 6250 | ptr += size; |
| 6251 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 6252 | {parser_till_end, object}, ptr - size, ptr)); |
| 6253 | break; |
| 6254 | } |
| 6255 | // .dmi.ComponentState state = 19; |
| 6256 | case 19: { |
| 6257 | if (static_cast<::google::protobuf::uint8>(tag) != 154) goto handle_unusual; |
| 6258 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6259 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6260 | parser_till_end = ::dmi::ComponentState::_InternalParse; |
| 6261 | object = msg->mutable_state(); |
| 6262 | if (size > end - ptr) goto len_delim_till_end; |
| 6263 | ptr += size; |
| 6264 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 6265 | {parser_till_end, object}, ptr - size, ptr)); |
| 6266 | break; |
| 6267 | } |
| 6268 | // repeated .dmi.ComponentSensorData sensor_data = 20; |
| 6269 | case 20: { |
| 6270 | if (static_cast<::google::protobuf::uint8>(tag) != 162) goto handle_unusual; |
| 6271 | do { |
| 6272 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6273 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6274 | parser_till_end = ::dmi::ComponentSensorData::_InternalParse; |
| 6275 | object = msg->add_sensor_data(); |
| 6276 | if (size > end - ptr) goto len_delim_till_end; |
| 6277 | ptr += size; |
| 6278 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 6279 | {parser_till_end, object}, ptr - size, ptr)); |
| 6280 | if (ptr >= end) break; |
| 6281 | } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 65535) == 418 && (ptr += 2)); |
| 6282 | break; |
| 6283 | } |
| 6284 | // .dmi.PortComponentAttributes port_attr = 50; |
| 6285 | case 50: { |
| 6286 | if (static_cast<::google::protobuf::uint8>(tag) != 146) goto handle_unusual; |
| 6287 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6288 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6289 | parser_till_end = ::dmi::PortComponentAttributes::_InternalParse; |
| 6290 | object = msg->mutable_port_attr(); |
| 6291 | if (size > end - ptr) goto len_delim_till_end; |
| 6292 | ptr += size; |
| 6293 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 6294 | {parser_till_end, object}, ptr - size, ptr)); |
| 6295 | break; |
| 6296 | } |
| 6297 | // .dmi.ContainerComponentAttributes container_attr = 51; |
| 6298 | case 51: { |
| 6299 | if (static_cast<::google::protobuf::uint8>(tag) != 154) goto handle_unusual; |
| 6300 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6301 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6302 | parser_till_end = ::dmi::ContainerComponentAttributes::_InternalParse; |
| 6303 | object = msg->mutable_container_attr(); |
| 6304 | if (size > end - ptr) goto len_delim_till_end; |
| 6305 | ptr += size; |
| 6306 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 6307 | {parser_till_end, object}, ptr - size, ptr)); |
| 6308 | break; |
| 6309 | } |
| 6310 | // .dmi.PsuComponentAttributes psu_attr = 52; |
| 6311 | case 52: { |
| 6312 | if (static_cast<::google::protobuf::uint8>(tag) != 162) goto handle_unusual; |
| 6313 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6314 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6315 | parser_till_end = ::dmi::PsuComponentAttributes::_InternalParse; |
| 6316 | object = msg->mutable_psu_attr(); |
| 6317 | if (size > end - ptr) goto len_delim_till_end; |
| 6318 | ptr += size; |
| 6319 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 6320 | {parser_till_end, object}, ptr - size, ptr)); |
| 6321 | break; |
| 6322 | } |
| 6323 | // .dmi.TransceiverComponentsAttributes transceiver_attr = 53; |
| 6324 | case 53: { |
| 6325 | if (static_cast<::google::protobuf::uint8>(tag) != 170) goto handle_unusual; |
| 6326 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 6327 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 6328 | parser_till_end = ::dmi::TransceiverComponentsAttributes::_InternalParse; |
| 6329 | object = msg->mutable_transceiver_attr(); |
| 6330 | if (size > end - ptr) goto len_delim_till_end; |
| 6331 | ptr += size; |
| 6332 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 6333 | {parser_till_end, object}, ptr - size, ptr)); |
| 6334 | break; |
| 6335 | } |
| 6336 | default: { |
| 6337 | handle_unusual: |
| 6338 | if ((tag & 7) == 4 || tag == 0) { |
| 6339 | ctx->EndGroup(tag); |
| 6340 | return ptr; |
| 6341 | } |
| 6342 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 6343 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 6344 | ptr = res.first; |
| 6345 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 6346 | if (res.second) return ptr; |
| 6347 | } |
| 6348 | } // switch |
| 6349 | } // while |
| 6350 | return ptr; |
| 6351 | string_till_end: |
| 6352 | static_cast<::std::string*>(object)->clear(); |
| 6353 | static_cast<::std::string*>(object)->reserve(size); |
| 6354 | goto len_delim_till_end; |
| 6355 | len_delim_till_end: |
| 6356 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 6357 | {parser_till_end, object}, size); |
| 6358 | } |
| 6359 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 6360 | bool Component::MergePartialFromCodedStream( |
| 6361 | ::google::protobuf::io::CodedInputStream* input) { |
| 6362 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 6363 | ::google::protobuf::uint32 tag; |
| 6364 | // @@protoc_insertion_point(parse_start:dmi.Component) |
| 6365 | for (;;) { |
| 6366 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); |
| 6367 | tag = p.first; |
| 6368 | if (!p.second) goto handle_unusual; |
| 6369 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 6370 | // string name = 1; |
| 6371 | case 1: { |
| 6372 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 6373 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6374 | input, this->mutable_name())); |
| 6375 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6376 | this->name().data(), static_cast<int>(this->name().length()), |
| 6377 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 6378 | "dmi.Component.name")); |
| 6379 | } else { |
| 6380 | goto handle_unusual; |
| 6381 | } |
| 6382 | break; |
| 6383 | } |
| 6384 | |
| 6385 | // .dmi.ComponentType class = 2; |
| 6386 | case 2: { |
| 6387 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 6388 | int value = 0; |
| 6389 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 6390 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 6391 | input, &value))); |
| 6392 | set_class_(static_cast< ::dmi::ComponentType >(value)); |
| 6393 | } else { |
| 6394 | goto handle_unusual; |
| 6395 | } |
| 6396 | break; |
| 6397 | } |
| 6398 | |
| 6399 | // string description = 3; |
| 6400 | case 3: { |
| 6401 | if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { |
| 6402 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6403 | input, this->mutable_description())); |
| 6404 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6405 | this->description().data(), static_cast<int>(this->description().length()), |
| 6406 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 6407 | "dmi.Component.description")); |
| 6408 | } else { |
| 6409 | goto handle_unusual; |
| 6410 | } |
| 6411 | break; |
| 6412 | } |
| 6413 | |
| 6414 | // string parent = 4; |
| 6415 | case 4: { |
| 6416 | if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { |
| 6417 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6418 | input, this->mutable_parent())); |
| 6419 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6420 | this->parent().data(), static_cast<int>(this->parent().length()), |
| 6421 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 6422 | "dmi.Component.parent")); |
| 6423 | } else { |
| 6424 | goto handle_unusual; |
| 6425 | } |
| 6426 | break; |
| 6427 | } |
| 6428 | |
| 6429 | // int32 parent_rel_pos = 5; |
| 6430 | case 5: { |
| 6431 | if (static_cast< ::google::protobuf::uint8>(tag) == (40 & 0xFF)) { |
| 6432 | |
| 6433 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 6434 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 6435 | input, &parent_rel_pos_))); |
| 6436 | } else { |
| 6437 | goto handle_unusual; |
| 6438 | } |
| 6439 | break; |
| 6440 | } |
| 6441 | |
| 6442 | // repeated .dmi.Component children = 6; |
| 6443 | case 6: { |
| 6444 | if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { |
| 6445 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 6446 | input, add_children())); |
| 6447 | } else { |
| 6448 | goto handle_unusual; |
| 6449 | } |
| 6450 | break; |
| 6451 | } |
| 6452 | |
| 6453 | // string hardware_rev = 7; |
| 6454 | case 7: { |
| 6455 | if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) { |
| 6456 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6457 | input, this->mutable_hardware_rev())); |
| 6458 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6459 | this->hardware_rev().data(), static_cast<int>(this->hardware_rev().length()), |
| 6460 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 6461 | "dmi.Component.hardware_rev")); |
| 6462 | } else { |
| 6463 | goto handle_unusual; |
| 6464 | } |
| 6465 | break; |
| 6466 | } |
| 6467 | |
| 6468 | // string firmware_rev = 8; |
| 6469 | case 8: { |
| 6470 | if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) { |
| 6471 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6472 | input, this->mutable_firmware_rev())); |
| 6473 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6474 | this->firmware_rev().data(), static_cast<int>(this->firmware_rev().length()), |
| 6475 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 6476 | "dmi.Component.firmware_rev")); |
| 6477 | } else { |
| 6478 | goto handle_unusual; |
| 6479 | } |
| 6480 | break; |
| 6481 | } |
| 6482 | |
| 6483 | // string software_rev = 9; |
| 6484 | case 9: { |
| 6485 | if (static_cast< ::google::protobuf::uint8>(tag) == (74 & 0xFF)) { |
| 6486 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6487 | input, this->mutable_software_rev())); |
| 6488 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6489 | this->software_rev().data(), static_cast<int>(this->software_rev().length()), |
| 6490 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 6491 | "dmi.Component.software_rev")); |
| 6492 | } else { |
| 6493 | goto handle_unusual; |
| 6494 | } |
| 6495 | break; |
| 6496 | } |
| 6497 | |
| 6498 | // string serial_num = 10; |
| 6499 | case 10: { |
| 6500 | if (static_cast< ::google::protobuf::uint8>(tag) == (82 & 0xFF)) { |
| 6501 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6502 | input, this->mutable_serial_num())); |
| 6503 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6504 | this->serial_num().data(), static_cast<int>(this->serial_num().length()), |
| 6505 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 6506 | "dmi.Component.serial_num")); |
| 6507 | } else { |
| 6508 | goto handle_unusual; |
| 6509 | } |
| 6510 | break; |
| 6511 | } |
| 6512 | |
| 6513 | // string mfg_name = 11; |
| 6514 | case 11: { |
| 6515 | if (static_cast< ::google::protobuf::uint8>(tag) == (90 & 0xFF)) { |
| 6516 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6517 | input, this->mutable_mfg_name())); |
| 6518 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6519 | this->mfg_name().data(), static_cast<int>(this->mfg_name().length()), |
| 6520 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 6521 | "dmi.Component.mfg_name")); |
| 6522 | } else { |
| 6523 | goto handle_unusual; |
| 6524 | } |
| 6525 | break; |
| 6526 | } |
| 6527 | |
| 6528 | // string model_name = 12; |
| 6529 | case 12: { |
| 6530 | if (static_cast< ::google::protobuf::uint8>(tag) == (98 & 0xFF)) { |
| 6531 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6532 | input, this->mutable_model_name())); |
| 6533 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6534 | this->model_name().data(), static_cast<int>(this->model_name().length()), |
| 6535 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 6536 | "dmi.Component.model_name")); |
| 6537 | } else { |
| 6538 | goto handle_unusual; |
| 6539 | } |
| 6540 | break; |
| 6541 | } |
| 6542 | |
| 6543 | // string alias = 13; |
| 6544 | case 13: { |
| 6545 | if (static_cast< ::google::protobuf::uint8>(tag) == (106 & 0xFF)) { |
| 6546 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6547 | input, this->mutable_alias())); |
| 6548 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6549 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 6550 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 6551 | "dmi.Component.alias")); |
| 6552 | } else { |
| 6553 | goto handle_unusual; |
| 6554 | } |
| 6555 | break; |
| 6556 | } |
| 6557 | |
| 6558 | // string asset_id = 14; |
| 6559 | case 14: { |
| 6560 | if (static_cast< ::google::protobuf::uint8>(tag) == (114 & 0xFF)) { |
| 6561 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 6562 | input, this->mutable_asset_id())); |
| 6563 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6564 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 6565 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 6566 | "dmi.Component.asset_id")); |
| 6567 | } else { |
| 6568 | goto handle_unusual; |
| 6569 | } |
| 6570 | break; |
| 6571 | } |
| 6572 | |
| 6573 | // bool is_fru = 15; |
| 6574 | case 15: { |
| 6575 | if (static_cast< ::google::protobuf::uint8>(tag) == (120 & 0xFF)) { |
| 6576 | |
| 6577 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 6578 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
| 6579 | input, &is_fru_))); |
| 6580 | } else { |
| 6581 | goto handle_unusual; |
| 6582 | } |
| 6583 | break; |
| 6584 | } |
| 6585 | |
| 6586 | // .google.protobuf.Timestamp mfg_date = 16; |
| 6587 | case 16: { |
| 6588 | if (static_cast< ::google::protobuf::uint8>(tag) == (130 & 0xFF)) { |
| 6589 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 6590 | input, mutable_mfg_date())); |
| 6591 | } else { |
| 6592 | goto handle_unusual; |
| 6593 | } |
| 6594 | break; |
| 6595 | } |
| 6596 | |
| 6597 | // .dmi.Uri uri = 17; |
| 6598 | case 17: { |
| 6599 | if (static_cast< ::google::protobuf::uint8>(tag) == (138 & 0xFF)) { |
| 6600 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 6601 | input, mutable_uri())); |
| 6602 | } else { |
| 6603 | goto handle_unusual; |
| 6604 | } |
| 6605 | break; |
| 6606 | } |
| 6607 | |
| 6608 | // .dmi.Uuid uuid = 18; |
| 6609 | case 18: { |
| 6610 | if (static_cast< ::google::protobuf::uint8>(tag) == (146 & 0xFF)) { |
| 6611 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 6612 | input, mutable_uuid())); |
| 6613 | } else { |
| 6614 | goto handle_unusual; |
| 6615 | } |
| 6616 | break; |
| 6617 | } |
| 6618 | |
| 6619 | // .dmi.ComponentState state = 19; |
| 6620 | case 19: { |
| 6621 | if (static_cast< ::google::protobuf::uint8>(tag) == (154 & 0xFF)) { |
| 6622 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 6623 | input, mutable_state())); |
| 6624 | } else { |
| 6625 | goto handle_unusual; |
| 6626 | } |
| 6627 | break; |
| 6628 | } |
| 6629 | |
| 6630 | // repeated .dmi.ComponentSensorData sensor_data = 20; |
| 6631 | case 20: { |
| 6632 | if (static_cast< ::google::protobuf::uint8>(tag) == (162 & 0xFF)) { |
| 6633 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 6634 | input, add_sensor_data())); |
| 6635 | } else { |
| 6636 | goto handle_unusual; |
| 6637 | } |
| 6638 | break; |
| 6639 | } |
| 6640 | |
| 6641 | // .dmi.PortComponentAttributes port_attr = 50; |
| 6642 | case 50: { |
| 6643 | if (static_cast< ::google::protobuf::uint8>(tag) == (402 & 0xFF)) { |
| 6644 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 6645 | input, mutable_port_attr())); |
| 6646 | } else { |
| 6647 | goto handle_unusual; |
| 6648 | } |
| 6649 | break; |
| 6650 | } |
| 6651 | |
| 6652 | // .dmi.ContainerComponentAttributes container_attr = 51; |
| 6653 | case 51: { |
| 6654 | if (static_cast< ::google::protobuf::uint8>(tag) == (410 & 0xFF)) { |
| 6655 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 6656 | input, mutable_container_attr())); |
| 6657 | } else { |
| 6658 | goto handle_unusual; |
| 6659 | } |
| 6660 | break; |
| 6661 | } |
| 6662 | |
| 6663 | // .dmi.PsuComponentAttributes psu_attr = 52; |
| 6664 | case 52: { |
| 6665 | if (static_cast< ::google::protobuf::uint8>(tag) == (418 & 0xFF)) { |
| 6666 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 6667 | input, mutable_psu_attr())); |
| 6668 | } else { |
| 6669 | goto handle_unusual; |
| 6670 | } |
| 6671 | break; |
| 6672 | } |
| 6673 | |
| 6674 | // .dmi.TransceiverComponentsAttributes transceiver_attr = 53; |
| 6675 | case 53: { |
| 6676 | if (static_cast< ::google::protobuf::uint8>(tag) == (426 & 0xFF)) { |
| 6677 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 6678 | input, mutable_transceiver_attr())); |
| 6679 | } else { |
| 6680 | goto handle_unusual; |
| 6681 | } |
| 6682 | break; |
| 6683 | } |
| 6684 | |
| 6685 | default: { |
| 6686 | handle_unusual: |
| 6687 | if (tag == 0) { |
| 6688 | goto success; |
| 6689 | } |
| 6690 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 6691 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 6692 | break; |
| 6693 | } |
| 6694 | } |
| 6695 | } |
| 6696 | success: |
| 6697 | // @@protoc_insertion_point(parse_success:dmi.Component) |
| 6698 | return true; |
| 6699 | failure: |
| 6700 | // @@protoc_insertion_point(parse_failure:dmi.Component) |
| 6701 | return false; |
| 6702 | #undef DO_ |
| 6703 | } |
| 6704 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 6705 | |
| 6706 | void Component::SerializeWithCachedSizes( |
| 6707 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 6708 | // @@protoc_insertion_point(serialize_start:dmi.Component) |
| 6709 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 6710 | (void) cached_has_bits; |
| 6711 | |
| 6712 | // string name = 1; |
| 6713 | if (this->name().size() > 0) { |
| 6714 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6715 | this->name().data(), static_cast<int>(this->name().length()), |
| 6716 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6717 | "dmi.Component.name"); |
| 6718 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 6719 | 1, this->name(), output); |
| 6720 | } |
| 6721 | |
| 6722 | // .dmi.ComponentType class = 2; |
| 6723 | if (this->class_() != 0) { |
| 6724 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 6725 | 2, this->class_(), output); |
| 6726 | } |
| 6727 | |
| 6728 | // string description = 3; |
| 6729 | if (this->description().size() > 0) { |
| 6730 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6731 | this->description().data(), static_cast<int>(this->description().length()), |
| 6732 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6733 | "dmi.Component.description"); |
| 6734 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 6735 | 3, this->description(), output); |
| 6736 | } |
| 6737 | |
| 6738 | // string parent = 4; |
| 6739 | if (this->parent().size() > 0) { |
| 6740 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6741 | this->parent().data(), static_cast<int>(this->parent().length()), |
| 6742 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6743 | "dmi.Component.parent"); |
| 6744 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 6745 | 4, this->parent(), output); |
| 6746 | } |
| 6747 | |
| 6748 | // int32 parent_rel_pos = 5; |
| 6749 | if (this->parent_rel_pos() != 0) { |
| 6750 | ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->parent_rel_pos(), output); |
| 6751 | } |
| 6752 | |
| 6753 | // repeated .dmi.Component children = 6; |
| 6754 | for (unsigned int i = 0, |
| 6755 | n = static_cast<unsigned int>(this->children_size()); i < n; i++) { |
| 6756 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 6757 | 6, |
| 6758 | this->children(static_cast<int>(i)), |
| 6759 | output); |
| 6760 | } |
| 6761 | |
| 6762 | // string hardware_rev = 7; |
| 6763 | if (this->hardware_rev().size() > 0) { |
| 6764 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6765 | this->hardware_rev().data(), static_cast<int>(this->hardware_rev().length()), |
| 6766 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6767 | "dmi.Component.hardware_rev"); |
| 6768 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 6769 | 7, this->hardware_rev(), output); |
| 6770 | } |
| 6771 | |
| 6772 | // string firmware_rev = 8; |
| 6773 | if (this->firmware_rev().size() > 0) { |
| 6774 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6775 | this->firmware_rev().data(), static_cast<int>(this->firmware_rev().length()), |
| 6776 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6777 | "dmi.Component.firmware_rev"); |
| 6778 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 6779 | 8, this->firmware_rev(), output); |
| 6780 | } |
| 6781 | |
| 6782 | // string software_rev = 9; |
| 6783 | if (this->software_rev().size() > 0) { |
| 6784 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6785 | this->software_rev().data(), static_cast<int>(this->software_rev().length()), |
| 6786 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6787 | "dmi.Component.software_rev"); |
| 6788 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 6789 | 9, this->software_rev(), output); |
| 6790 | } |
| 6791 | |
| 6792 | // string serial_num = 10; |
| 6793 | if (this->serial_num().size() > 0) { |
| 6794 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6795 | this->serial_num().data(), static_cast<int>(this->serial_num().length()), |
| 6796 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6797 | "dmi.Component.serial_num"); |
| 6798 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 6799 | 10, this->serial_num(), output); |
| 6800 | } |
| 6801 | |
| 6802 | // string mfg_name = 11; |
| 6803 | if (this->mfg_name().size() > 0) { |
| 6804 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6805 | this->mfg_name().data(), static_cast<int>(this->mfg_name().length()), |
| 6806 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6807 | "dmi.Component.mfg_name"); |
| 6808 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 6809 | 11, this->mfg_name(), output); |
| 6810 | } |
| 6811 | |
| 6812 | // string model_name = 12; |
| 6813 | if (this->model_name().size() > 0) { |
| 6814 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6815 | this->model_name().data(), static_cast<int>(this->model_name().length()), |
| 6816 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6817 | "dmi.Component.model_name"); |
| 6818 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 6819 | 12, this->model_name(), output); |
| 6820 | } |
| 6821 | |
| 6822 | // string alias = 13; |
| 6823 | if (this->alias().size() > 0) { |
| 6824 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6825 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 6826 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6827 | "dmi.Component.alias"); |
| 6828 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 6829 | 13, this->alias(), output); |
| 6830 | } |
| 6831 | |
| 6832 | // string asset_id = 14; |
| 6833 | if (this->asset_id().size() > 0) { |
| 6834 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6835 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 6836 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6837 | "dmi.Component.asset_id"); |
| 6838 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 6839 | 14, this->asset_id(), output); |
| 6840 | } |
| 6841 | |
| 6842 | // bool is_fru = 15; |
| 6843 | if (this->is_fru() != 0) { |
| 6844 | ::google::protobuf::internal::WireFormatLite::WriteBool(15, this->is_fru(), output); |
| 6845 | } |
| 6846 | |
| 6847 | // .google.protobuf.Timestamp mfg_date = 16; |
| 6848 | if (this->has_mfg_date()) { |
| 6849 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 6850 | 16, HasBitSetters::mfg_date(this), output); |
| 6851 | } |
| 6852 | |
| 6853 | // .dmi.Uri uri = 17; |
| 6854 | if (this->has_uri()) { |
| 6855 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 6856 | 17, HasBitSetters::uri(this), output); |
| 6857 | } |
| 6858 | |
| 6859 | // .dmi.Uuid uuid = 18; |
| 6860 | if (this->has_uuid()) { |
| 6861 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 6862 | 18, HasBitSetters::uuid(this), output); |
| 6863 | } |
| 6864 | |
| 6865 | // .dmi.ComponentState state = 19; |
| 6866 | if (this->has_state()) { |
| 6867 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 6868 | 19, HasBitSetters::state(this), output); |
| 6869 | } |
| 6870 | |
| 6871 | // repeated .dmi.ComponentSensorData sensor_data = 20; |
| 6872 | for (unsigned int i = 0, |
| 6873 | n = static_cast<unsigned int>(this->sensor_data_size()); i < n; i++) { |
| 6874 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 6875 | 20, |
| 6876 | this->sensor_data(static_cast<int>(i)), |
| 6877 | output); |
| 6878 | } |
| 6879 | |
| 6880 | // .dmi.PortComponentAttributes port_attr = 50; |
| 6881 | if (has_port_attr()) { |
| 6882 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 6883 | 50, HasBitSetters::port_attr(this), output); |
| 6884 | } |
| 6885 | |
| 6886 | // .dmi.ContainerComponentAttributes container_attr = 51; |
| 6887 | if (has_container_attr()) { |
| 6888 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 6889 | 51, HasBitSetters::container_attr(this), output); |
| 6890 | } |
| 6891 | |
| 6892 | // .dmi.PsuComponentAttributes psu_attr = 52; |
| 6893 | if (has_psu_attr()) { |
| 6894 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 6895 | 52, HasBitSetters::psu_attr(this), output); |
| 6896 | } |
| 6897 | |
| 6898 | // .dmi.TransceiverComponentsAttributes transceiver_attr = 53; |
| 6899 | if (has_transceiver_attr()) { |
| 6900 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 6901 | 53, HasBitSetters::transceiver_attr(this), output); |
| 6902 | } |
| 6903 | |
| 6904 | if (_internal_metadata_.have_unknown_fields()) { |
| 6905 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 6906 | _internal_metadata_.unknown_fields(), output); |
| 6907 | } |
| 6908 | // @@protoc_insertion_point(serialize_end:dmi.Component) |
| 6909 | } |
| 6910 | |
| 6911 | ::google::protobuf::uint8* Component::InternalSerializeWithCachedSizesToArray( |
| 6912 | ::google::protobuf::uint8* target) const { |
| 6913 | // @@protoc_insertion_point(serialize_to_array_start:dmi.Component) |
| 6914 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 6915 | (void) cached_has_bits; |
| 6916 | |
| 6917 | // string name = 1; |
| 6918 | if (this->name().size() > 0) { |
| 6919 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6920 | this->name().data(), static_cast<int>(this->name().length()), |
| 6921 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6922 | "dmi.Component.name"); |
| 6923 | target = |
| 6924 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 6925 | 1, this->name(), target); |
| 6926 | } |
| 6927 | |
| 6928 | // .dmi.ComponentType class = 2; |
| 6929 | if (this->class_() != 0) { |
| 6930 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 6931 | 2, this->class_(), target); |
| 6932 | } |
| 6933 | |
| 6934 | // string description = 3; |
| 6935 | if (this->description().size() > 0) { |
| 6936 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6937 | this->description().data(), static_cast<int>(this->description().length()), |
| 6938 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6939 | "dmi.Component.description"); |
| 6940 | target = |
| 6941 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 6942 | 3, this->description(), target); |
| 6943 | } |
| 6944 | |
| 6945 | // string parent = 4; |
| 6946 | if (this->parent().size() > 0) { |
| 6947 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6948 | this->parent().data(), static_cast<int>(this->parent().length()), |
| 6949 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6950 | "dmi.Component.parent"); |
| 6951 | target = |
| 6952 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 6953 | 4, this->parent(), target); |
| 6954 | } |
| 6955 | |
| 6956 | // int32 parent_rel_pos = 5; |
| 6957 | if (this->parent_rel_pos() != 0) { |
| 6958 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->parent_rel_pos(), target); |
| 6959 | } |
| 6960 | |
| 6961 | // repeated .dmi.Component children = 6; |
| 6962 | for (unsigned int i = 0, |
| 6963 | n = static_cast<unsigned int>(this->children_size()); i < n; i++) { |
| 6964 | target = ::google::protobuf::internal::WireFormatLite:: |
| 6965 | InternalWriteMessageToArray( |
| 6966 | 6, this->children(static_cast<int>(i)), target); |
| 6967 | } |
| 6968 | |
| 6969 | // string hardware_rev = 7; |
| 6970 | if (this->hardware_rev().size() > 0) { |
| 6971 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6972 | this->hardware_rev().data(), static_cast<int>(this->hardware_rev().length()), |
| 6973 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6974 | "dmi.Component.hardware_rev"); |
| 6975 | target = |
| 6976 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 6977 | 7, this->hardware_rev(), target); |
| 6978 | } |
| 6979 | |
| 6980 | // string firmware_rev = 8; |
| 6981 | if (this->firmware_rev().size() > 0) { |
| 6982 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6983 | this->firmware_rev().data(), static_cast<int>(this->firmware_rev().length()), |
| 6984 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6985 | "dmi.Component.firmware_rev"); |
| 6986 | target = |
| 6987 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 6988 | 8, this->firmware_rev(), target); |
| 6989 | } |
| 6990 | |
| 6991 | // string software_rev = 9; |
| 6992 | if (this->software_rev().size() > 0) { |
| 6993 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 6994 | this->software_rev().data(), static_cast<int>(this->software_rev().length()), |
| 6995 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 6996 | "dmi.Component.software_rev"); |
| 6997 | target = |
| 6998 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 6999 | 9, this->software_rev(), target); |
| 7000 | } |
| 7001 | |
| 7002 | // string serial_num = 10; |
| 7003 | if (this->serial_num().size() > 0) { |
| 7004 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7005 | this->serial_num().data(), static_cast<int>(this->serial_num().length()), |
| 7006 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7007 | "dmi.Component.serial_num"); |
| 7008 | target = |
| 7009 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7010 | 10, this->serial_num(), target); |
| 7011 | } |
| 7012 | |
| 7013 | // string mfg_name = 11; |
| 7014 | if (this->mfg_name().size() > 0) { |
| 7015 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7016 | this->mfg_name().data(), static_cast<int>(this->mfg_name().length()), |
| 7017 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7018 | "dmi.Component.mfg_name"); |
| 7019 | target = |
| 7020 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7021 | 11, this->mfg_name(), target); |
| 7022 | } |
| 7023 | |
| 7024 | // string model_name = 12; |
| 7025 | if (this->model_name().size() > 0) { |
| 7026 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7027 | this->model_name().data(), static_cast<int>(this->model_name().length()), |
| 7028 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7029 | "dmi.Component.model_name"); |
| 7030 | target = |
| 7031 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7032 | 12, this->model_name(), target); |
| 7033 | } |
| 7034 | |
| 7035 | // string alias = 13; |
| 7036 | if (this->alias().size() > 0) { |
| 7037 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7038 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 7039 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7040 | "dmi.Component.alias"); |
| 7041 | target = |
| 7042 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7043 | 13, this->alias(), target); |
| 7044 | } |
| 7045 | |
| 7046 | // string asset_id = 14; |
| 7047 | if (this->asset_id().size() > 0) { |
| 7048 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 7049 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 7050 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 7051 | "dmi.Component.asset_id"); |
| 7052 | target = |
| 7053 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 7054 | 14, this->asset_id(), target); |
| 7055 | } |
| 7056 | |
| 7057 | // bool is_fru = 15; |
| 7058 | if (this->is_fru() != 0) { |
| 7059 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(15, this->is_fru(), target); |
| 7060 | } |
| 7061 | |
| 7062 | // .google.protobuf.Timestamp mfg_date = 16; |
| 7063 | if (this->has_mfg_date()) { |
| 7064 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7065 | InternalWriteMessageToArray( |
| 7066 | 16, HasBitSetters::mfg_date(this), target); |
| 7067 | } |
| 7068 | |
| 7069 | // .dmi.Uri uri = 17; |
| 7070 | if (this->has_uri()) { |
| 7071 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7072 | InternalWriteMessageToArray( |
| 7073 | 17, HasBitSetters::uri(this), target); |
| 7074 | } |
| 7075 | |
| 7076 | // .dmi.Uuid uuid = 18; |
| 7077 | if (this->has_uuid()) { |
| 7078 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7079 | InternalWriteMessageToArray( |
| 7080 | 18, HasBitSetters::uuid(this), target); |
| 7081 | } |
| 7082 | |
| 7083 | // .dmi.ComponentState state = 19; |
| 7084 | if (this->has_state()) { |
| 7085 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7086 | InternalWriteMessageToArray( |
| 7087 | 19, HasBitSetters::state(this), target); |
| 7088 | } |
| 7089 | |
| 7090 | // repeated .dmi.ComponentSensorData sensor_data = 20; |
| 7091 | for (unsigned int i = 0, |
| 7092 | n = static_cast<unsigned int>(this->sensor_data_size()); i < n; i++) { |
| 7093 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7094 | InternalWriteMessageToArray( |
| 7095 | 20, this->sensor_data(static_cast<int>(i)), target); |
| 7096 | } |
| 7097 | |
| 7098 | // .dmi.PortComponentAttributes port_attr = 50; |
| 7099 | if (has_port_attr()) { |
| 7100 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7101 | InternalWriteMessageToArray( |
| 7102 | 50, HasBitSetters::port_attr(this), target); |
| 7103 | } |
| 7104 | |
| 7105 | // .dmi.ContainerComponentAttributes container_attr = 51; |
| 7106 | if (has_container_attr()) { |
| 7107 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7108 | InternalWriteMessageToArray( |
| 7109 | 51, HasBitSetters::container_attr(this), target); |
| 7110 | } |
| 7111 | |
| 7112 | // .dmi.PsuComponentAttributes psu_attr = 52; |
| 7113 | if (has_psu_attr()) { |
| 7114 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7115 | InternalWriteMessageToArray( |
| 7116 | 52, HasBitSetters::psu_attr(this), target); |
| 7117 | } |
| 7118 | |
| 7119 | // .dmi.TransceiverComponentsAttributes transceiver_attr = 53; |
| 7120 | if (has_transceiver_attr()) { |
| 7121 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7122 | InternalWriteMessageToArray( |
| 7123 | 53, HasBitSetters::transceiver_attr(this), target); |
| 7124 | } |
| 7125 | |
| 7126 | if (_internal_metadata_.have_unknown_fields()) { |
| 7127 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 7128 | _internal_metadata_.unknown_fields(), target); |
| 7129 | } |
| 7130 | // @@protoc_insertion_point(serialize_to_array_end:dmi.Component) |
| 7131 | return target; |
| 7132 | } |
| 7133 | |
| 7134 | size_t Component::ByteSizeLong() const { |
| 7135 | // @@protoc_insertion_point(message_byte_size_start:dmi.Component) |
| 7136 | size_t total_size = 0; |
| 7137 | |
| 7138 | if (_internal_metadata_.have_unknown_fields()) { |
| 7139 | total_size += |
| 7140 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 7141 | _internal_metadata_.unknown_fields()); |
| 7142 | } |
| 7143 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 7144 | // Prevent compiler warnings about cached_has_bits being unused |
| 7145 | (void) cached_has_bits; |
| 7146 | |
| 7147 | // repeated .dmi.Component children = 6; |
| 7148 | { |
| 7149 | unsigned int count = static_cast<unsigned int>(this->children_size()); |
| 7150 | total_size += 1UL * count; |
| 7151 | for (unsigned int i = 0; i < count; i++) { |
| 7152 | total_size += |
| 7153 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7154 | this->children(static_cast<int>(i))); |
| 7155 | } |
| 7156 | } |
| 7157 | |
| 7158 | // repeated .dmi.ComponentSensorData sensor_data = 20; |
| 7159 | { |
| 7160 | unsigned int count = static_cast<unsigned int>(this->sensor_data_size()); |
| 7161 | total_size += 2UL * count; |
| 7162 | for (unsigned int i = 0; i < count; i++) { |
| 7163 | total_size += |
| 7164 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7165 | this->sensor_data(static_cast<int>(i))); |
| 7166 | } |
| 7167 | } |
| 7168 | |
| 7169 | // string name = 1; |
| 7170 | if (this->name().size() > 0) { |
| 7171 | total_size += 1 + |
| 7172 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7173 | this->name()); |
| 7174 | } |
| 7175 | |
| 7176 | // string description = 3; |
| 7177 | if (this->description().size() > 0) { |
| 7178 | total_size += 1 + |
| 7179 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7180 | this->description()); |
| 7181 | } |
| 7182 | |
| 7183 | // string parent = 4; |
| 7184 | if (this->parent().size() > 0) { |
| 7185 | total_size += 1 + |
| 7186 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7187 | this->parent()); |
| 7188 | } |
| 7189 | |
| 7190 | // string hardware_rev = 7; |
| 7191 | if (this->hardware_rev().size() > 0) { |
| 7192 | total_size += 1 + |
| 7193 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7194 | this->hardware_rev()); |
| 7195 | } |
| 7196 | |
| 7197 | // string firmware_rev = 8; |
| 7198 | if (this->firmware_rev().size() > 0) { |
| 7199 | total_size += 1 + |
| 7200 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7201 | this->firmware_rev()); |
| 7202 | } |
| 7203 | |
| 7204 | // string software_rev = 9; |
| 7205 | if (this->software_rev().size() > 0) { |
| 7206 | total_size += 1 + |
| 7207 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7208 | this->software_rev()); |
| 7209 | } |
| 7210 | |
| 7211 | // string serial_num = 10; |
| 7212 | if (this->serial_num().size() > 0) { |
| 7213 | total_size += 1 + |
| 7214 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7215 | this->serial_num()); |
| 7216 | } |
| 7217 | |
| 7218 | // string mfg_name = 11; |
| 7219 | if (this->mfg_name().size() > 0) { |
| 7220 | total_size += 1 + |
| 7221 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7222 | this->mfg_name()); |
| 7223 | } |
| 7224 | |
| 7225 | // string model_name = 12; |
| 7226 | if (this->model_name().size() > 0) { |
| 7227 | total_size += 1 + |
| 7228 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7229 | this->model_name()); |
| 7230 | } |
| 7231 | |
| 7232 | // string alias = 13; |
| 7233 | if (this->alias().size() > 0) { |
| 7234 | total_size += 1 + |
| 7235 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7236 | this->alias()); |
| 7237 | } |
| 7238 | |
| 7239 | // string asset_id = 14; |
| 7240 | if (this->asset_id().size() > 0) { |
| 7241 | total_size += 1 + |
| 7242 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 7243 | this->asset_id()); |
| 7244 | } |
| 7245 | |
| 7246 | // .google.protobuf.Timestamp mfg_date = 16; |
| 7247 | if (this->has_mfg_date()) { |
| 7248 | total_size += 2 + |
| 7249 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7250 | *mfg_date_); |
| 7251 | } |
| 7252 | |
| 7253 | // .dmi.Uri uri = 17; |
| 7254 | if (this->has_uri()) { |
| 7255 | total_size += 2 + |
| 7256 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7257 | *uri_); |
| 7258 | } |
| 7259 | |
| 7260 | // .dmi.Uuid uuid = 18; |
| 7261 | if (this->has_uuid()) { |
| 7262 | total_size += 2 + |
| 7263 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7264 | *uuid_); |
| 7265 | } |
| 7266 | |
| 7267 | // .dmi.ComponentState state = 19; |
| 7268 | if (this->has_state()) { |
| 7269 | total_size += 2 + |
| 7270 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7271 | *state_); |
| 7272 | } |
| 7273 | |
| 7274 | // .dmi.ComponentType class = 2; |
| 7275 | if (this->class_() != 0) { |
| 7276 | total_size += 1 + |
| 7277 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->class_()); |
| 7278 | } |
| 7279 | |
| 7280 | // int32 parent_rel_pos = 5; |
| 7281 | if (this->parent_rel_pos() != 0) { |
| 7282 | total_size += 1 + |
| 7283 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 7284 | this->parent_rel_pos()); |
| 7285 | } |
| 7286 | |
| 7287 | // bool is_fru = 15; |
| 7288 | if (this->is_fru() != 0) { |
| 7289 | total_size += 1 + 1; |
| 7290 | } |
| 7291 | |
| 7292 | switch (specific_case()) { |
| 7293 | // .dmi.PortComponentAttributes port_attr = 50; |
| 7294 | case kPortAttr: { |
| 7295 | total_size += 2 + |
| 7296 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7297 | *specific_.port_attr_); |
| 7298 | break; |
| 7299 | } |
| 7300 | // .dmi.ContainerComponentAttributes container_attr = 51; |
| 7301 | case kContainerAttr: { |
| 7302 | total_size += 2 + |
| 7303 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7304 | *specific_.container_attr_); |
| 7305 | break; |
| 7306 | } |
| 7307 | // .dmi.PsuComponentAttributes psu_attr = 52; |
| 7308 | case kPsuAttr: { |
| 7309 | total_size += 2 + |
| 7310 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7311 | *specific_.psu_attr_); |
| 7312 | break; |
| 7313 | } |
| 7314 | // .dmi.TransceiverComponentsAttributes transceiver_attr = 53; |
| 7315 | case kTransceiverAttr: { |
| 7316 | total_size += 2 + |
| 7317 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7318 | *specific_.transceiver_attr_); |
| 7319 | break; |
| 7320 | } |
| 7321 | case SPECIFIC_NOT_SET: { |
| 7322 | break; |
| 7323 | } |
| 7324 | } |
| 7325 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 7326 | SetCachedSize(cached_size); |
| 7327 | return total_size; |
| 7328 | } |
| 7329 | |
| 7330 | void Component::MergeFrom(const ::google::protobuf::Message& from) { |
| 7331 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.Component) |
| 7332 | GOOGLE_DCHECK_NE(&from, this); |
| 7333 | const Component* source = |
| 7334 | ::google::protobuf::DynamicCastToGenerated<Component>( |
| 7335 | &from); |
| 7336 | if (source == nullptr) { |
| 7337 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.Component) |
| 7338 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 7339 | } else { |
| 7340 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.Component) |
| 7341 | MergeFrom(*source); |
| 7342 | } |
| 7343 | } |
| 7344 | |
| 7345 | void Component::MergeFrom(const Component& from) { |
| 7346 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.Component) |
| 7347 | GOOGLE_DCHECK_NE(&from, this); |
| 7348 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 7349 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 7350 | (void) cached_has_bits; |
| 7351 | |
| 7352 | children_.MergeFrom(from.children_); |
| 7353 | sensor_data_.MergeFrom(from.sensor_data_); |
| 7354 | if (from.name().size() > 0) { |
| 7355 | |
| 7356 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
| 7357 | } |
| 7358 | if (from.description().size() > 0) { |
| 7359 | |
| 7360 | description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.description_); |
| 7361 | } |
| 7362 | if (from.parent().size() > 0) { |
| 7363 | |
| 7364 | parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); |
| 7365 | } |
| 7366 | if (from.hardware_rev().size() > 0) { |
| 7367 | |
| 7368 | hardware_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.hardware_rev_); |
| 7369 | } |
| 7370 | if (from.firmware_rev().size() > 0) { |
| 7371 | |
| 7372 | firmware_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.firmware_rev_); |
| 7373 | } |
| 7374 | if (from.software_rev().size() > 0) { |
| 7375 | |
| 7376 | software_rev_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.software_rev_); |
| 7377 | } |
| 7378 | if (from.serial_num().size() > 0) { |
| 7379 | |
| 7380 | serial_num_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.serial_num_); |
| 7381 | } |
| 7382 | if (from.mfg_name().size() > 0) { |
| 7383 | |
| 7384 | mfg_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mfg_name_); |
| 7385 | } |
| 7386 | if (from.model_name().size() > 0) { |
| 7387 | |
| 7388 | model_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.model_name_); |
| 7389 | } |
| 7390 | if (from.alias().size() > 0) { |
| 7391 | |
| 7392 | alias_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.alias_); |
| 7393 | } |
| 7394 | if (from.asset_id().size() > 0) { |
| 7395 | |
| 7396 | asset_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.asset_id_); |
| 7397 | } |
| 7398 | if (from.has_mfg_date()) { |
| 7399 | mutable_mfg_date()->::google::protobuf::Timestamp::MergeFrom(from.mfg_date()); |
| 7400 | } |
| 7401 | if (from.has_uri()) { |
| 7402 | mutable_uri()->::dmi::Uri::MergeFrom(from.uri()); |
| 7403 | } |
| 7404 | if (from.has_uuid()) { |
| 7405 | mutable_uuid()->::dmi::Uuid::MergeFrom(from.uuid()); |
| 7406 | } |
| 7407 | if (from.has_state()) { |
| 7408 | mutable_state()->::dmi::ComponentState::MergeFrom(from.state()); |
| 7409 | } |
| 7410 | if (from.class_() != 0) { |
| 7411 | set_class_(from.class_()); |
| 7412 | } |
| 7413 | if (from.parent_rel_pos() != 0) { |
| 7414 | set_parent_rel_pos(from.parent_rel_pos()); |
| 7415 | } |
| 7416 | if (from.is_fru() != 0) { |
| 7417 | set_is_fru(from.is_fru()); |
| 7418 | } |
| 7419 | switch (from.specific_case()) { |
| 7420 | case kPortAttr: { |
| 7421 | mutable_port_attr()->::dmi::PortComponentAttributes::MergeFrom(from.port_attr()); |
| 7422 | break; |
| 7423 | } |
| 7424 | case kContainerAttr: { |
| 7425 | mutable_container_attr()->::dmi::ContainerComponentAttributes::MergeFrom(from.container_attr()); |
| 7426 | break; |
| 7427 | } |
| 7428 | case kPsuAttr: { |
| 7429 | mutable_psu_attr()->::dmi::PsuComponentAttributes::MergeFrom(from.psu_attr()); |
| 7430 | break; |
| 7431 | } |
| 7432 | case kTransceiverAttr: { |
| 7433 | mutable_transceiver_attr()->::dmi::TransceiverComponentsAttributes::MergeFrom(from.transceiver_attr()); |
| 7434 | break; |
| 7435 | } |
| 7436 | case SPECIFIC_NOT_SET: { |
| 7437 | break; |
| 7438 | } |
| 7439 | } |
| 7440 | } |
| 7441 | |
| 7442 | void Component::CopyFrom(const ::google::protobuf::Message& from) { |
| 7443 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.Component) |
| 7444 | if (&from == this) return; |
| 7445 | Clear(); |
| 7446 | MergeFrom(from); |
| 7447 | } |
| 7448 | |
| 7449 | void Component::CopyFrom(const Component& from) { |
| 7450 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.Component) |
| 7451 | if (&from == this) return; |
| 7452 | Clear(); |
| 7453 | MergeFrom(from); |
| 7454 | } |
| 7455 | |
| 7456 | bool Component::IsInitialized() const { |
| 7457 | return true; |
| 7458 | } |
| 7459 | |
| 7460 | void Component::Swap(Component* other) { |
| 7461 | if (other == this) return; |
| 7462 | InternalSwap(other); |
| 7463 | } |
| 7464 | void Component::InternalSwap(Component* other) { |
| 7465 | using std::swap; |
| 7466 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 7467 | CastToBase(&children_)->InternalSwap(CastToBase(&other->children_)); |
| 7468 | CastToBase(&sensor_data_)->InternalSwap(CastToBase(&other->sensor_data_)); |
| 7469 | name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7470 | GetArenaNoVirtual()); |
| 7471 | description_.Swap(&other->description_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7472 | GetArenaNoVirtual()); |
| 7473 | parent_.Swap(&other->parent_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7474 | GetArenaNoVirtual()); |
| 7475 | hardware_rev_.Swap(&other->hardware_rev_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7476 | GetArenaNoVirtual()); |
| 7477 | firmware_rev_.Swap(&other->firmware_rev_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7478 | GetArenaNoVirtual()); |
| 7479 | software_rev_.Swap(&other->software_rev_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7480 | GetArenaNoVirtual()); |
| 7481 | serial_num_.Swap(&other->serial_num_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7482 | GetArenaNoVirtual()); |
| 7483 | mfg_name_.Swap(&other->mfg_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7484 | GetArenaNoVirtual()); |
| 7485 | model_name_.Swap(&other->model_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7486 | GetArenaNoVirtual()); |
| 7487 | alias_.Swap(&other->alias_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7488 | GetArenaNoVirtual()); |
| 7489 | asset_id_.Swap(&other->asset_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 7490 | GetArenaNoVirtual()); |
| 7491 | swap(mfg_date_, other->mfg_date_); |
| 7492 | swap(uri_, other->uri_); |
| 7493 | swap(uuid_, other->uuid_); |
| 7494 | swap(state_, other->state_); |
| 7495 | swap(class__, other->class__); |
| 7496 | swap(parent_rel_pos_, other->parent_rel_pos_); |
| 7497 | swap(is_fru_, other->is_fru_); |
| 7498 | swap(specific_, other->specific_); |
| 7499 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
| 7500 | } |
| 7501 | |
| 7502 | ::google::protobuf::Metadata Component::GetMetadata() const { |
| 7503 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 7504 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 7505 | } |
| 7506 | |
| 7507 | |
| 7508 | // =================================================================== |
| 7509 | |
| 7510 | void Hardware::InitAsDefaultInstance() { |
| 7511 | ::dmi::_Hardware_default_instance_._instance.get_mutable()->last_change_ = const_cast< ::google::protobuf::Timestamp*>( |
| 7512 | ::google::protobuf::Timestamp::internal_default_instance()); |
| 7513 | ::dmi::_Hardware_default_instance_._instance.get_mutable()->root_ = const_cast< ::dmi::Component*>( |
| 7514 | ::dmi::Component::internal_default_instance()); |
| 7515 | ::dmi::_Hardware_default_instance_._instance.get_mutable()->last_booted_ = const_cast< ::google::protobuf::Timestamp*>( |
| 7516 | ::google::protobuf::Timestamp::internal_default_instance()); |
| 7517 | } |
| 7518 | class Hardware::HasBitSetters { |
| 7519 | public: |
| 7520 | static const ::google::protobuf::Timestamp& last_change(const Hardware* msg); |
| 7521 | static const ::dmi::Component& root(const Hardware* msg); |
| 7522 | static const ::google::protobuf::Timestamp& last_booted(const Hardware* msg); |
| 7523 | }; |
| 7524 | |
| 7525 | const ::google::protobuf::Timestamp& |
| 7526 | Hardware::HasBitSetters::last_change(const Hardware* msg) { |
| 7527 | return *msg->last_change_; |
| 7528 | } |
| 7529 | const ::dmi::Component& |
| 7530 | Hardware::HasBitSetters::root(const Hardware* msg) { |
| 7531 | return *msg->root_; |
| 7532 | } |
| 7533 | const ::google::protobuf::Timestamp& |
| 7534 | Hardware::HasBitSetters::last_booted(const Hardware* msg) { |
| 7535 | return *msg->last_booted_; |
| 7536 | } |
| 7537 | void Hardware::clear_last_change() { |
| 7538 | if (GetArenaNoVirtual() == nullptr && last_change_ != nullptr) { |
| 7539 | delete last_change_; |
| 7540 | } |
| 7541 | last_change_ = nullptr; |
| 7542 | } |
| 7543 | void Hardware::clear_last_booted() { |
| 7544 | if (GetArenaNoVirtual() == nullptr && last_booted_ != nullptr) { |
| 7545 | delete last_booted_; |
| 7546 | } |
| 7547 | last_booted_ = nullptr; |
| 7548 | } |
| 7549 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 7550 | const int Hardware::kLastChangeFieldNumber; |
| 7551 | const int Hardware::kRootFieldNumber; |
| 7552 | const int Hardware::kLastBootedFieldNumber; |
| 7553 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 7554 | |
| 7555 | Hardware::Hardware() |
| 7556 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 7557 | SharedCtor(); |
| 7558 | // @@protoc_insertion_point(constructor:dmi.Hardware) |
| 7559 | } |
| 7560 | Hardware::Hardware(const Hardware& from) |
| 7561 | : ::google::protobuf::Message(), |
| 7562 | _internal_metadata_(nullptr) { |
| 7563 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 7564 | if (from.has_last_change()) { |
| 7565 | last_change_ = new ::google::protobuf::Timestamp(*from.last_change_); |
| 7566 | } else { |
| 7567 | last_change_ = nullptr; |
| 7568 | } |
| 7569 | if (from.has_root()) { |
| 7570 | root_ = new ::dmi::Component(*from.root_); |
| 7571 | } else { |
| 7572 | root_ = nullptr; |
| 7573 | } |
| 7574 | if (from.has_last_booted()) { |
| 7575 | last_booted_ = new ::google::protobuf::Timestamp(*from.last_booted_); |
| 7576 | } else { |
| 7577 | last_booted_ = nullptr; |
| 7578 | } |
| 7579 | // @@protoc_insertion_point(copy_constructor:dmi.Hardware) |
| 7580 | } |
| 7581 | |
| 7582 | void Hardware::SharedCtor() { |
| 7583 | ::google::protobuf::internal::InitSCC( |
| 7584 | &scc_info_Hardware_dmi_2fhw_2eproto.base); |
| 7585 | ::memset(&last_change_, 0, static_cast<size_t>( |
| 7586 | reinterpret_cast<char*>(&last_booted_) - |
| 7587 | reinterpret_cast<char*>(&last_change_)) + sizeof(last_booted_)); |
| 7588 | } |
| 7589 | |
| 7590 | Hardware::~Hardware() { |
| 7591 | // @@protoc_insertion_point(destructor:dmi.Hardware) |
| 7592 | SharedDtor(); |
| 7593 | } |
| 7594 | |
| 7595 | void Hardware::SharedDtor() { |
| 7596 | if (this != internal_default_instance()) delete last_change_; |
| 7597 | if (this != internal_default_instance()) delete root_; |
| 7598 | if (this != internal_default_instance()) delete last_booted_; |
| 7599 | } |
| 7600 | |
| 7601 | void Hardware::SetCachedSize(int size) const { |
| 7602 | _cached_size_.Set(size); |
| 7603 | } |
| 7604 | const Hardware& Hardware::default_instance() { |
| 7605 | ::google::protobuf::internal::InitSCC(&::scc_info_Hardware_dmi_2fhw_2eproto.base); |
| 7606 | return *internal_default_instance(); |
| 7607 | } |
| 7608 | |
| 7609 | |
| 7610 | void Hardware::Clear() { |
| 7611 | // @@protoc_insertion_point(message_clear_start:dmi.Hardware) |
| 7612 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 7613 | // Prevent compiler warnings about cached_has_bits being unused |
| 7614 | (void) cached_has_bits; |
| 7615 | |
| 7616 | if (GetArenaNoVirtual() == nullptr && last_change_ != nullptr) { |
| 7617 | delete last_change_; |
| 7618 | } |
| 7619 | last_change_ = nullptr; |
| 7620 | if (GetArenaNoVirtual() == nullptr && root_ != nullptr) { |
| 7621 | delete root_; |
| 7622 | } |
| 7623 | root_ = nullptr; |
| 7624 | if (GetArenaNoVirtual() == nullptr && last_booted_ != nullptr) { |
| 7625 | delete last_booted_; |
| 7626 | } |
| 7627 | last_booted_ = nullptr; |
| 7628 | _internal_metadata_.Clear(); |
| 7629 | } |
| 7630 | |
| 7631 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 7632 | const char* Hardware::_InternalParse(const char* begin, const char* end, void* object, |
| 7633 | ::google::protobuf::internal::ParseContext* ctx) { |
| 7634 | auto msg = static_cast<Hardware*>(object); |
| 7635 | ::google::protobuf::int32 size; (void)size; |
| 7636 | int depth; (void)depth; |
| 7637 | ::google::protobuf::uint32 tag; |
| 7638 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 7639 | auto ptr = begin; |
| 7640 | while (ptr < end) { |
| 7641 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 7642 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7643 | switch (tag >> 3) { |
| 7644 | // .google.protobuf.Timestamp last_change = 1; |
| 7645 | case 1: { |
| 7646 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 7647 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7648 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7649 | parser_till_end = ::google::protobuf::Timestamp::_InternalParse; |
| 7650 | object = msg->mutable_last_change(); |
| 7651 | if (size > end - ptr) goto len_delim_till_end; |
| 7652 | ptr += size; |
| 7653 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7654 | {parser_till_end, object}, ptr - size, ptr)); |
| 7655 | break; |
| 7656 | } |
| 7657 | // .dmi.Component root = 2; |
| 7658 | case 2: { |
| 7659 | if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; |
| 7660 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7661 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7662 | parser_till_end = ::dmi::Component::_InternalParse; |
| 7663 | object = msg->mutable_root(); |
| 7664 | if (size > end - ptr) goto len_delim_till_end; |
| 7665 | ptr += size; |
| 7666 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7667 | {parser_till_end, object}, ptr - size, ptr)); |
| 7668 | break; |
| 7669 | } |
| 7670 | // .google.protobuf.Timestamp last_booted = 3; |
| 7671 | case 3: { |
| 7672 | if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; |
| 7673 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 7674 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 7675 | parser_till_end = ::google::protobuf::Timestamp::_InternalParse; |
| 7676 | object = msg->mutable_last_booted(); |
| 7677 | if (size > end - ptr) goto len_delim_till_end; |
| 7678 | ptr += size; |
| 7679 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 7680 | {parser_till_end, object}, ptr - size, ptr)); |
| 7681 | break; |
| 7682 | } |
| 7683 | default: { |
| 7684 | handle_unusual: |
| 7685 | if ((tag & 7) == 4 || tag == 0) { |
| 7686 | ctx->EndGroup(tag); |
| 7687 | return ptr; |
| 7688 | } |
| 7689 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 7690 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 7691 | ptr = res.first; |
| 7692 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 7693 | if (res.second) return ptr; |
| 7694 | } |
| 7695 | } // switch |
| 7696 | } // while |
| 7697 | return ptr; |
| 7698 | len_delim_till_end: |
| 7699 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 7700 | {parser_till_end, object}, size); |
| 7701 | } |
| 7702 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 7703 | bool Hardware::MergePartialFromCodedStream( |
| 7704 | ::google::protobuf::io::CodedInputStream* input) { |
| 7705 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 7706 | ::google::protobuf::uint32 tag; |
| 7707 | // @@protoc_insertion_point(parse_start:dmi.Hardware) |
| 7708 | for (;;) { |
| 7709 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
| 7710 | tag = p.first; |
| 7711 | if (!p.second) goto handle_unusual; |
| 7712 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 7713 | // .google.protobuf.Timestamp last_change = 1; |
| 7714 | case 1: { |
| 7715 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 7716 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7717 | input, mutable_last_change())); |
| 7718 | } else { |
| 7719 | goto handle_unusual; |
| 7720 | } |
| 7721 | break; |
| 7722 | } |
| 7723 | |
| 7724 | // .dmi.Component root = 2; |
| 7725 | case 2: { |
| 7726 | if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { |
| 7727 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7728 | input, mutable_root())); |
| 7729 | } else { |
| 7730 | goto handle_unusual; |
| 7731 | } |
| 7732 | break; |
| 7733 | } |
| 7734 | |
| 7735 | // .google.protobuf.Timestamp last_booted = 3; |
| 7736 | case 3: { |
| 7737 | if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { |
| 7738 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 7739 | input, mutable_last_booted())); |
| 7740 | } else { |
| 7741 | goto handle_unusual; |
| 7742 | } |
| 7743 | break; |
| 7744 | } |
| 7745 | |
| 7746 | default: { |
| 7747 | handle_unusual: |
| 7748 | if (tag == 0) { |
| 7749 | goto success; |
| 7750 | } |
| 7751 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 7752 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 7753 | break; |
| 7754 | } |
| 7755 | } |
| 7756 | } |
| 7757 | success: |
| 7758 | // @@protoc_insertion_point(parse_success:dmi.Hardware) |
| 7759 | return true; |
| 7760 | failure: |
| 7761 | // @@protoc_insertion_point(parse_failure:dmi.Hardware) |
| 7762 | return false; |
| 7763 | #undef DO_ |
| 7764 | } |
| 7765 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 7766 | |
| 7767 | void Hardware::SerializeWithCachedSizes( |
| 7768 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 7769 | // @@protoc_insertion_point(serialize_start:dmi.Hardware) |
| 7770 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 7771 | (void) cached_has_bits; |
| 7772 | |
| 7773 | // .google.protobuf.Timestamp last_change = 1; |
| 7774 | if (this->has_last_change()) { |
| 7775 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7776 | 1, HasBitSetters::last_change(this), output); |
| 7777 | } |
| 7778 | |
| 7779 | // .dmi.Component root = 2; |
| 7780 | if (this->has_root()) { |
| 7781 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7782 | 2, HasBitSetters::root(this), output); |
| 7783 | } |
| 7784 | |
| 7785 | // .google.protobuf.Timestamp last_booted = 3; |
| 7786 | if (this->has_last_booted()) { |
| 7787 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 7788 | 3, HasBitSetters::last_booted(this), output); |
| 7789 | } |
| 7790 | |
| 7791 | if (_internal_metadata_.have_unknown_fields()) { |
| 7792 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 7793 | _internal_metadata_.unknown_fields(), output); |
| 7794 | } |
| 7795 | // @@protoc_insertion_point(serialize_end:dmi.Hardware) |
| 7796 | } |
| 7797 | |
| 7798 | ::google::protobuf::uint8* Hardware::InternalSerializeWithCachedSizesToArray( |
| 7799 | ::google::protobuf::uint8* target) const { |
| 7800 | // @@protoc_insertion_point(serialize_to_array_start:dmi.Hardware) |
| 7801 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 7802 | (void) cached_has_bits; |
| 7803 | |
| 7804 | // .google.protobuf.Timestamp last_change = 1; |
| 7805 | if (this->has_last_change()) { |
| 7806 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7807 | InternalWriteMessageToArray( |
| 7808 | 1, HasBitSetters::last_change(this), target); |
| 7809 | } |
| 7810 | |
| 7811 | // .dmi.Component root = 2; |
| 7812 | if (this->has_root()) { |
| 7813 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7814 | InternalWriteMessageToArray( |
| 7815 | 2, HasBitSetters::root(this), target); |
| 7816 | } |
| 7817 | |
| 7818 | // .google.protobuf.Timestamp last_booted = 3; |
| 7819 | if (this->has_last_booted()) { |
| 7820 | target = ::google::protobuf::internal::WireFormatLite:: |
| 7821 | InternalWriteMessageToArray( |
| 7822 | 3, HasBitSetters::last_booted(this), target); |
| 7823 | } |
| 7824 | |
| 7825 | if (_internal_metadata_.have_unknown_fields()) { |
| 7826 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 7827 | _internal_metadata_.unknown_fields(), target); |
| 7828 | } |
| 7829 | // @@protoc_insertion_point(serialize_to_array_end:dmi.Hardware) |
| 7830 | return target; |
| 7831 | } |
| 7832 | |
| 7833 | size_t Hardware::ByteSizeLong() const { |
| 7834 | // @@protoc_insertion_point(message_byte_size_start:dmi.Hardware) |
| 7835 | size_t total_size = 0; |
| 7836 | |
| 7837 | if (_internal_metadata_.have_unknown_fields()) { |
| 7838 | total_size += |
| 7839 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 7840 | _internal_metadata_.unknown_fields()); |
| 7841 | } |
| 7842 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 7843 | // Prevent compiler warnings about cached_has_bits being unused |
| 7844 | (void) cached_has_bits; |
| 7845 | |
| 7846 | // .google.protobuf.Timestamp last_change = 1; |
| 7847 | if (this->has_last_change()) { |
| 7848 | total_size += 1 + |
| 7849 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7850 | *last_change_); |
| 7851 | } |
| 7852 | |
| 7853 | // .dmi.Component root = 2; |
| 7854 | if (this->has_root()) { |
| 7855 | total_size += 1 + |
| 7856 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7857 | *root_); |
| 7858 | } |
| 7859 | |
| 7860 | // .google.protobuf.Timestamp last_booted = 3; |
| 7861 | if (this->has_last_booted()) { |
| 7862 | total_size += 1 + |
| 7863 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 7864 | *last_booted_); |
| 7865 | } |
| 7866 | |
| 7867 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 7868 | SetCachedSize(cached_size); |
| 7869 | return total_size; |
| 7870 | } |
| 7871 | |
| 7872 | void Hardware::MergeFrom(const ::google::protobuf::Message& from) { |
| 7873 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.Hardware) |
| 7874 | GOOGLE_DCHECK_NE(&from, this); |
| 7875 | const Hardware* source = |
| 7876 | ::google::protobuf::DynamicCastToGenerated<Hardware>( |
| 7877 | &from); |
| 7878 | if (source == nullptr) { |
| 7879 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.Hardware) |
| 7880 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 7881 | } else { |
| 7882 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.Hardware) |
| 7883 | MergeFrom(*source); |
| 7884 | } |
| 7885 | } |
| 7886 | |
| 7887 | void Hardware::MergeFrom(const Hardware& from) { |
| 7888 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.Hardware) |
| 7889 | GOOGLE_DCHECK_NE(&from, this); |
| 7890 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 7891 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 7892 | (void) cached_has_bits; |
| 7893 | |
| 7894 | if (from.has_last_change()) { |
| 7895 | mutable_last_change()->::google::protobuf::Timestamp::MergeFrom(from.last_change()); |
| 7896 | } |
| 7897 | if (from.has_root()) { |
| 7898 | mutable_root()->::dmi::Component::MergeFrom(from.root()); |
| 7899 | } |
| 7900 | if (from.has_last_booted()) { |
| 7901 | mutable_last_booted()->::google::protobuf::Timestamp::MergeFrom(from.last_booted()); |
| 7902 | } |
| 7903 | } |
| 7904 | |
| 7905 | void Hardware::CopyFrom(const ::google::protobuf::Message& from) { |
| 7906 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.Hardware) |
| 7907 | if (&from == this) return; |
| 7908 | Clear(); |
| 7909 | MergeFrom(from); |
| 7910 | } |
| 7911 | |
| 7912 | void Hardware::CopyFrom(const Hardware& from) { |
| 7913 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.Hardware) |
| 7914 | if (&from == this) return; |
| 7915 | Clear(); |
| 7916 | MergeFrom(from); |
| 7917 | } |
| 7918 | |
| 7919 | bool Hardware::IsInitialized() const { |
| 7920 | return true; |
| 7921 | } |
| 7922 | |
| 7923 | void Hardware::Swap(Hardware* other) { |
| 7924 | if (other == this) return; |
| 7925 | InternalSwap(other); |
| 7926 | } |
| 7927 | void Hardware::InternalSwap(Hardware* other) { |
| 7928 | using std::swap; |
| 7929 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 7930 | swap(last_change_, other->last_change_); |
| 7931 | swap(root_, other->root_); |
| 7932 | swap(last_booted_, other->last_booted_); |
| 7933 | } |
| 7934 | |
| 7935 | ::google::protobuf::Metadata Hardware::GetMetadata() const { |
| 7936 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 7937 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 7938 | } |
| 7939 | |
| 7940 | |
| 7941 | // =================================================================== |
| 7942 | |
| 7943 | void ModifiableComponent::InitAsDefaultInstance() { |
| 7944 | ::dmi::_ModifiableComponent_default_instance_._instance.get_mutable()->parent_ = const_cast< ::dmi::Component*>( |
| 7945 | ::dmi::Component::internal_default_instance()); |
| 7946 | ::dmi::_ModifiableComponent_default_instance_._instance.get_mutable()->uri_ = const_cast< ::dmi::Uri*>( |
| 7947 | ::dmi::Uri::internal_default_instance()); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 7948 | ::dmi::_ModifiableComponent_default_instance_.port_attr_ = const_cast< ::dmi::PortComponentChangeAttributes*>( |
| 7949 | ::dmi::PortComponentChangeAttributes::internal_default_instance()); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 7950 | } |
| 7951 | class ModifiableComponent::HasBitSetters { |
| 7952 | public: |
| 7953 | static const ::dmi::Component& parent(const ModifiableComponent* msg); |
| 7954 | static const ::dmi::Uri& uri(const ModifiableComponent* msg); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 7955 | static const ::dmi::PortComponentChangeAttributes& port_attr(const ModifiableComponent* msg); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 7956 | }; |
| 7957 | |
| 7958 | const ::dmi::Component& |
| 7959 | ModifiableComponent::HasBitSetters::parent(const ModifiableComponent* msg) { |
| 7960 | return *msg->parent_; |
| 7961 | } |
| 7962 | const ::dmi::Uri& |
| 7963 | ModifiableComponent::HasBitSetters::uri(const ModifiableComponent* msg) { |
| 7964 | return *msg->uri_; |
| 7965 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 7966 | const ::dmi::PortComponentChangeAttributes& |
| 7967 | ModifiableComponent::HasBitSetters::port_attr(const ModifiableComponent* msg) { |
| 7968 | return *msg->specific_.port_attr_; |
| 7969 | } |
| 7970 | void ModifiableComponent::set_allocated_port_attr(::dmi::PortComponentChangeAttributes* port_attr) { |
| 7971 | ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); |
| 7972 | clear_specific(); |
| 7973 | if (port_attr) { |
| 7974 | ::google::protobuf::Arena* submessage_arena = nullptr; |
| 7975 | if (message_arena != submessage_arena) { |
| 7976 | port_attr = ::google::protobuf::internal::GetOwnedMessage( |
| 7977 | message_arena, port_attr, submessage_arena); |
| 7978 | } |
| 7979 | set_has_port_attr(); |
| 7980 | specific_.port_attr_ = port_attr; |
| 7981 | } |
| 7982 | // @@protoc_insertion_point(field_set_allocated:dmi.ModifiableComponent.port_attr) |
| 7983 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 7984 | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 7985 | const int ModifiableComponent::kNameFieldNumber; |
| 7986 | const int ModifiableComponent::kClassFieldNumber; |
| 7987 | const int ModifiableComponent::kParentFieldNumber; |
| 7988 | const int ModifiableComponent::kParentRelPosFieldNumber; |
| 7989 | const int ModifiableComponent::kAliasFieldNumber; |
| 7990 | const int ModifiableComponent::kAssetIdFieldNumber; |
| 7991 | const int ModifiableComponent::kUriFieldNumber; |
| 7992 | const int ModifiableComponent::kAdminStateFieldNumber; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 7993 | const int ModifiableComponent::kPortAttrFieldNumber; |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 7994 | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
| 7995 | |
| 7996 | ModifiableComponent::ModifiableComponent() |
| 7997 | : ::google::protobuf::Message(), _internal_metadata_(nullptr) { |
| 7998 | SharedCtor(); |
| 7999 | // @@protoc_insertion_point(constructor:dmi.ModifiableComponent) |
| 8000 | } |
| 8001 | ModifiableComponent::ModifiableComponent(const ModifiableComponent& from) |
| 8002 | : ::google::protobuf::Message(), |
| 8003 | _internal_metadata_(nullptr) { |
| 8004 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 8005 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8006 | if (from.name().size() > 0) { |
| 8007 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
| 8008 | } |
| 8009 | alias_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8010 | if (from.alias().size() > 0) { |
| 8011 | alias_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.alias_); |
| 8012 | } |
| 8013 | asset_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8014 | if (from.asset_id().size() > 0) { |
| 8015 | asset_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.asset_id_); |
| 8016 | } |
| 8017 | if (from.has_parent()) { |
| 8018 | parent_ = new ::dmi::Component(*from.parent_); |
| 8019 | } else { |
| 8020 | parent_ = nullptr; |
| 8021 | } |
| 8022 | if (from.has_uri()) { |
| 8023 | uri_ = new ::dmi::Uri(*from.uri_); |
| 8024 | } else { |
| 8025 | uri_ = nullptr; |
| 8026 | } |
| 8027 | ::memcpy(&class__, &from.class__, |
| 8028 | static_cast<size_t>(reinterpret_cast<char*>(&admin_state_) - |
| 8029 | reinterpret_cast<char*>(&class__)) + sizeof(admin_state_)); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8030 | clear_has_specific(); |
| 8031 | switch (from.specific_case()) { |
| 8032 | case kPortAttr: { |
| 8033 | mutable_port_attr()->::dmi::PortComponentChangeAttributes::MergeFrom(from.port_attr()); |
| 8034 | break; |
| 8035 | } |
| 8036 | case SPECIFIC_NOT_SET: { |
| 8037 | break; |
| 8038 | } |
| 8039 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8040 | // @@protoc_insertion_point(copy_constructor:dmi.ModifiableComponent) |
| 8041 | } |
| 8042 | |
| 8043 | void ModifiableComponent::SharedCtor() { |
| 8044 | ::google::protobuf::internal::InitSCC( |
| 8045 | &scc_info_ModifiableComponent_dmi_2fhw_2eproto.base); |
| 8046 | name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8047 | alias_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8048 | asset_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8049 | ::memset(&parent_, 0, static_cast<size_t>( |
| 8050 | reinterpret_cast<char*>(&admin_state_) - |
| 8051 | reinterpret_cast<char*>(&parent_)) + sizeof(admin_state_)); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8052 | clear_has_specific(); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8053 | } |
| 8054 | |
| 8055 | ModifiableComponent::~ModifiableComponent() { |
| 8056 | // @@protoc_insertion_point(destructor:dmi.ModifiableComponent) |
| 8057 | SharedDtor(); |
| 8058 | } |
| 8059 | |
| 8060 | void ModifiableComponent::SharedDtor() { |
| 8061 | name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8062 | alias_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8063 | asset_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8064 | if (this != internal_default_instance()) delete parent_; |
| 8065 | if (this != internal_default_instance()) delete uri_; |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8066 | if (has_specific()) { |
| 8067 | clear_specific(); |
| 8068 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8069 | } |
| 8070 | |
| 8071 | void ModifiableComponent::SetCachedSize(int size) const { |
| 8072 | _cached_size_.Set(size); |
| 8073 | } |
| 8074 | const ModifiableComponent& ModifiableComponent::default_instance() { |
| 8075 | ::google::protobuf::internal::InitSCC(&::scc_info_ModifiableComponent_dmi_2fhw_2eproto.base); |
| 8076 | return *internal_default_instance(); |
| 8077 | } |
| 8078 | |
| 8079 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8080 | void ModifiableComponent::clear_specific() { |
| 8081 | // @@protoc_insertion_point(one_of_clear_start:dmi.ModifiableComponent) |
| 8082 | switch (specific_case()) { |
| 8083 | case kPortAttr: { |
| 8084 | delete specific_.port_attr_; |
| 8085 | break; |
| 8086 | } |
| 8087 | case SPECIFIC_NOT_SET: { |
| 8088 | break; |
| 8089 | } |
| 8090 | } |
| 8091 | _oneof_case_[0] = SPECIFIC_NOT_SET; |
| 8092 | } |
| 8093 | |
| 8094 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8095 | void ModifiableComponent::Clear() { |
| 8096 | // @@protoc_insertion_point(message_clear_start:dmi.ModifiableComponent) |
| 8097 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8098 | // Prevent compiler warnings about cached_has_bits being unused |
| 8099 | (void) cached_has_bits; |
| 8100 | |
| 8101 | name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8102 | alias_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8103 | asset_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
| 8104 | if (GetArenaNoVirtual() == nullptr && parent_ != nullptr) { |
| 8105 | delete parent_; |
| 8106 | } |
| 8107 | parent_ = nullptr; |
| 8108 | if (GetArenaNoVirtual() == nullptr && uri_ != nullptr) { |
| 8109 | delete uri_; |
| 8110 | } |
| 8111 | uri_ = nullptr; |
| 8112 | ::memset(&class__, 0, static_cast<size_t>( |
| 8113 | reinterpret_cast<char*>(&admin_state_) - |
| 8114 | reinterpret_cast<char*>(&class__)) + sizeof(admin_state_)); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8115 | clear_specific(); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8116 | _internal_metadata_.Clear(); |
| 8117 | } |
| 8118 | |
| 8119 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 8120 | const char* ModifiableComponent::_InternalParse(const char* begin, const char* end, void* object, |
| 8121 | ::google::protobuf::internal::ParseContext* ctx) { |
| 8122 | auto msg = static_cast<ModifiableComponent*>(object); |
| 8123 | ::google::protobuf::int32 size; (void)size; |
| 8124 | int depth; (void)depth; |
| 8125 | ::google::protobuf::uint32 tag; |
| 8126 | ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; |
| 8127 | auto ptr = begin; |
| 8128 | while (ptr < end) { |
| 8129 | ptr = ::google::protobuf::io::Parse32(ptr, &tag); |
| 8130 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8131 | switch (tag >> 3) { |
| 8132 | // string name = 1; |
| 8133 | case 1: { |
| 8134 | if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; |
| 8135 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 8136 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8137 | ctx->extra_parse_data().SetFieldName("dmi.ModifiableComponent.name"); |
| 8138 | object = msg->mutable_name(); |
| 8139 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 8140 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 8141 | goto string_till_end; |
| 8142 | } |
| 8143 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 8144 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 8145 | ptr += size; |
| 8146 | break; |
| 8147 | } |
| 8148 | // .dmi.ComponentType class = 2; |
| 8149 | case 2: { |
| 8150 | if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; |
| 8151 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 8152 | msg->set_class_(static_cast<::dmi::ComponentType>(val)); |
| 8153 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8154 | break; |
| 8155 | } |
| 8156 | // .dmi.Component parent = 3; |
| 8157 | case 3: { |
| 8158 | if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; |
| 8159 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 8160 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8161 | parser_till_end = ::dmi::Component::_InternalParse; |
| 8162 | object = msg->mutable_parent(); |
| 8163 | if (size > end - ptr) goto len_delim_till_end; |
| 8164 | ptr += size; |
| 8165 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 8166 | {parser_till_end, object}, ptr - size, ptr)); |
| 8167 | break; |
| 8168 | } |
| 8169 | // int32 parent_rel_pos = 4; |
| 8170 | case 4: { |
| 8171 | if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; |
| 8172 | msg->set_parent_rel_pos(::google::protobuf::internal::ReadVarint(&ptr)); |
| 8173 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8174 | break; |
| 8175 | } |
| 8176 | // string alias = 5; |
| 8177 | case 5: { |
| 8178 | if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; |
| 8179 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 8180 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8181 | ctx->extra_parse_data().SetFieldName("dmi.ModifiableComponent.alias"); |
| 8182 | object = msg->mutable_alias(); |
| 8183 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 8184 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 8185 | goto string_till_end; |
| 8186 | } |
| 8187 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 8188 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 8189 | ptr += size; |
| 8190 | break; |
| 8191 | } |
| 8192 | // string asset_id = 6; |
| 8193 | case 6: { |
| 8194 | if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; |
| 8195 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 8196 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8197 | ctx->extra_parse_data().SetFieldName("dmi.ModifiableComponent.asset_id"); |
| 8198 | object = msg->mutable_asset_id(); |
| 8199 | if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { |
| 8200 | parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; |
| 8201 | goto string_till_end; |
| 8202 | } |
| 8203 | GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); |
| 8204 | ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); |
| 8205 | ptr += size; |
| 8206 | break; |
| 8207 | } |
| 8208 | // .dmi.Uri uri = 7; |
| 8209 | case 7: { |
| 8210 | if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; |
| 8211 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 8212 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8213 | parser_till_end = ::dmi::Uri::_InternalParse; |
| 8214 | object = msg->mutable_uri(); |
| 8215 | if (size > end - ptr) goto len_delim_till_end; |
| 8216 | ptr += size; |
| 8217 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 8218 | {parser_till_end, object}, ptr - size, ptr)); |
| 8219 | break; |
| 8220 | } |
| 8221 | // .dmi.ComponentAdminState admin_state = 8; |
| 8222 | case 8: { |
| 8223 | if (static_cast<::google::protobuf::uint8>(tag) != 64) goto handle_unusual; |
| 8224 | ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); |
| 8225 | msg->set_admin_state(static_cast<::dmi::ComponentAdminState>(val)); |
| 8226 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8227 | break; |
| 8228 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8229 | // .dmi.PortComponentChangeAttributes port_attr = 50; |
| 8230 | case 50: { |
| 8231 | if (static_cast<::google::protobuf::uint8>(tag) != 146) goto handle_unusual; |
| 8232 | ptr = ::google::protobuf::io::ReadSize(ptr, &size); |
| 8233 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); |
| 8234 | parser_till_end = ::dmi::PortComponentChangeAttributes::_InternalParse; |
| 8235 | object = msg->mutable_port_attr(); |
| 8236 | if (size > end - ptr) goto len_delim_till_end; |
| 8237 | ptr += size; |
| 8238 | GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( |
| 8239 | {parser_till_end, object}, ptr - size, ptr)); |
| 8240 | break; |
| 8241 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8242 | default: { |
| 8243 | handle_unusual: |
| 8244 | if ((tag & 7) == 4 || tag == 0) { |
| 8245 | ctx->EndGroup(tag); |
| 8246 | return ptr; |
| 8247 | } |
| 8248 | auto res = UnknownFieldParse(tag, {_InternalParse, msg}, |
| 8249 | ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); |
| 8250 | ptr = res.first; |
| 8251 | GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); |
| 8252 | if (res.second) return ptr; |
| 8253 | } |
| 8254 | } // switch |
| 8255 | } // while |
| 8256 | return ptr; |
| 8257 | string_till_end: |
| 8258 | static_cast<::std::string*>(object)->clear(); |
| 8259 | static_cast<::std::string*>(object)->reserve(size); |
| 8260 | goto len_delim_till_end; |
| 8261 | len_delim_till_end: |
| 8262 | return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, |
| 8263 | {parser_till_end, object}, size); |
| 8264 | } |
| 8265 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 8266 | bool ModifiableComponent::MergePartialFromCodedStream( |
| 8267 | ::google::protobuf::io::CodedInputStream* input) { |
| 8268 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
| 8269 | ::google::protobuf::uint32 tag; |
| 8270 | // @@protoc_insertion_point(parse_start:dmi.ModifiableComponent) |
| 8271 | for (;;) { |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8272 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8273 | tag = p.first; |
| 8274 | if (!p.second) goto handle_unusual; |
| 8275 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| 8276 | // string name = 1; |
| 8277 | case 1: { |
| 8278 | if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { |
| 8279 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 8280 | input, this->mutable_name())); |
| 8281 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 8282 | this->name().data(), static_cast<int>(this->name().length()), |
| 8283 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 8284 | "dmi.ModifiableComponent.name")); |
| 8285 | } else { |
| 8286 | goto handle_unusual; |
| 8287 | } |
| 8288 | break; |
| 8289 | } |
| 8290 | |
| 8291 | // .dmi.ComponentType class = 2; |
| 8292 | case 2: { |
| 8293 | if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { |
| 8294 | int value = 0; |
| 8295 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 8296 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 8297 | input, &value))); |
| 8298 | set_class_(static_cast< ::dmi::ComponentType >(value)); |
| 8299 | } else { |
| 8300 | goto handle_unusual; |
| 8301 | } |
| 8302 | break; |
| 8303 | } |
| 8304 | |
| 8305 | // .dmi.Component parent = 3; |
| 8306 | case 3: { |
| 8307 | if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { |
| 8308 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 8309 | input, mutable_parent())); |
| 8310 | } else { |
| 8311 | goto handle_unusual; |
| 8312 | } |
| 8313 | break; |
| 8314 | } |
| 8315 | |
| 8316 | // int32 parent_rel_pos = 4; |
| 8317 | case 4: { |
| 8318 | if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { |
| 8319 | |
| 8320 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 8321 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| 8322 | input, &parent_rel_pos_))); |
| 8323 | } else { |
| 8324 | goto handle_unusual; |
| 8325 | } |
| 8326 | break; |
| 8327 | } |
| 8328 | |
| 8329 | // string alias = 5; |
| 8330 | case 5: { |
| 8331 | if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { |
| 8332 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 8333 | input, this->mutable_alias())); |
| 8334 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 8335 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 8336 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 8337 | "dmi.ModifiableComponent.alias")); |
| 8338 | } else { |
| 8339 | goto handle_unusual; |
| 8340 | } |
| 8341 | break; |
| 8342 | } |
| 8343 | |
| 8344 | // string asset_id = 6; |
| 8345 | case 6: { |
| 8346 | if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { |
| 8347 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
| 8348 | input, this->mutable_asset_id())); |
| 8349 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 8350 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 8351 | ::google::protobuf::internal::WireFormatLite::PARSE, |
| 8352 | "dmi.ModifiableComponent.asset_id")); |
| 8353 | } else { |
| 8354 | goto handle_unusual; |
| 8355 | } |
| 8356 | break; |
| 8357 | } |
| 8358 | |
| 8359 | // .dmi.Uri uri = 7; |
| 8360 | case 7: { |
| 8361 | if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) { |
| 8362 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 8363 | input, mutable_uri())); |
| 8364 | } else { |
| 8365 | goto handle_unusual; |
| 8366 | } |
| 8367 | break; |
| 8368 | } |
| 8369 | |
| 8370 | // .dmi.ComponentAdminState admin_state = 8; |
| 8371 | case 8: { |
| 8372 | if (static_cast< ::google::protobuf::uint8>(tag) == (64 & 0xFF)) { |
| 8373 | int value = 0; |
| 8374 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| 8375 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| 8376 | input, &value))); |
| 8377 | set_admin_state(static_cast< ::dmi::ComponentAdminState >(value)); |
| 8378 | } else { |
| 8379 | goto handle_unusual; |
| 8380 | } |
| 8381 | break; |
| 8382 | } |
| 8383 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8384 | // .dmi.PortComponentChangeAttributes port_attr = 50; |
| 8385 | case 50: { |
| 8386 | if (static_cast< ::google::protobuf::uint8>(tag) == (402 & 0xFF)) { |
| 8387 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
| 8388 | input, mutable_port_attr())); |
| 8389 | } else { |
| 8390 | goto handle_unusual; |
| 8391 | } |
| 8392 | break; |
| 8393 | } |
| 8394 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8395 | default: { |
| 8396 | handle_unusual: |
| 8397 | if (tag == 0) { |
| 8398 | goto success; |
| 8399 | } |
| 8400 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
| 8401 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
| 8402 | break; |
| 8403 | } |
| 8404 | } |
| 8405 | } |
| 8406 | success: |
| 8407 | // @@protoc_insertion_point(parse_success:dmi.ModifiableComponent) |
| 8408 | return true; |
| 8409 | failure: |
| 8410 | // @@protoc_insertion_point(parse_failure:dmi.ModifiableComponent) |
| 8411 | return false; |
| 8412 | #undef DO_ |
| 8413 | } |
| 8414 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
| 8415 | |
| 8416 | void ModifiableComponent::SerializeWithCachedSizes( |
| 8417 | ::google::protobuf::io::CodedOutputStream* output) const { |
| 8418 | // @@protoc_insertion_point(serialize_start:dmi.ModifiableComponent) |
| 8419 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8420 | (void) cached_has_bits; |
| 8421 | |
| 8422 | // string name = 1; |
| 8423 | if (this->name().size() > 0) { |
| 8424 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 8425 | this->name().data(), static_cast<int>(this->name().length()), |
| 8426 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 8427 | "dmi.ModifiableComponent.name"); |
| 8428 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 8429 | 1, this->name(), output); |
| 8430 | } |
| 8431 | |
| 8432 | // .dmi.ComponentType class = 2; |
| 8433 | if (this->class_() != 0) { |
| 8434 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 8435 | 2, this->class_(), output); |
| 8436 | } |
| 8437 | |
| 8438 | // .dmi.Component parent = 3; |
| 8439 | if (this->has_parent()) { |
| 8440 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 8441 | 3, HasBitSetters::parent(this), output); |
| 8442 | } |
| 8443 | |
| 8444 | // int32 parent_rel_pos = 4; |
| 8445 | if (this->parent_rel_pos() != 0) { |
| 8446 | ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->parent_rel_pos(), output); |
| 8447 | } |
| 8448 | |
| 8449 | // string alias = 5; |
| 8450 | if (this->alias().size() > 0) { |
| 8451 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 8452 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 8453 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 8454 | "dmi.ModifiableComponent.alias"); |
| 8455 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 8456 | 5, this->alias(), output); |
| 8457 | } |
| 8458 | |
| 8459 | // string asset_id = 6; |
| 8460 | if (this->asset_id().size() > 0) { |
| 8461 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 8462 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 8463 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 8464 | "dmi.ModifiableComponent.asset_id"); |
| 8465 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
| 8466 | 6, this->asset_id(), output); |
| 8467 | } |
| 8468 | |
| 8469 | // .dmi.Uri uri = 7; |
| 8470 | if (this->has_uri()) { |
| 8471 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 8472 | 7, HasBitSetters::uri(this), output); |
| 8473 | } |
| 8474 | |
| 8475 | // .dmi.ComponentAdminState admin_state = 8; |
| 8476 | if (this->admin_state() != 0) { |
| 8477 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 8478 | 8, this->admin_state(), output); |
| 8479 | } |
| 8480 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8481 | // .dmi.PortComponentChangeAttributes port_attr = 50; |
| 8482 | if (has_port_attr()) { |
| 8483 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
| 8484 | 50, HasBitSetters::port_attr(this), output); |
| 8485 | } |
| 8486 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8487 | if (_internal_metadata_.have_unknown_fields()) { |
| 8488 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| 8489 | _internal_metadata_.unknown_fields(), output); |
| 8490 | } |
| 8491 | // @@protoc_insertion_point(serialize_end:dmi.ModifiableComponent) |
| 8492 | } |
| 8493 | |
| 8494 | ::google::protobuf::uint8* ModifiableComponent::InternalSerializeWithCachedSizesToArray( |
| 8495 | ::google::protobuf::uint8* target) const { |
| 8496 | // @@protoc_insertion_point(serialize_to_array_start:dmi.ModifiableComponent) |
| 8497 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8498 | (void) cached_has_bits; |
| 8499 | |
| 8500 | // string name = 1; |
| 8501 | if (this->name().size() > 0) { |
| 8502 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 8503 | this->name().data(), static_cast<int>(this->name().length()), |
| 8504 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 8505 | "dmi.ModifiableComponent.name"); |
| 8506 | target = |
| 8507 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8508 | 1, this->name(), target); |
| 8509 | } |
| 8510 | |
| 8511 | // .dmi.ComponentType class = 2; |
| 8512 | if (this->class_() != 0) { |
| 8513 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 8514 | 2, this->class_(), target); |
| 8515 | } |
| 8516 | |
| 8517 | // .dmi.Component parent = 3; |
| 8518 | if (this->has_parent()) { |
| 8519 | target = ::google::protobuf::internal::WireFormatLite:: |
| 8520 | InternalWriteMessageToArray( |
| 8521 | 3, HasBitSetters::parent(this), target); |
| 8522 | } |
| 8523 | |
| 8524 | // int32 parent_rel_pos = 4; |
| 8525 | if (this->parent_rel_pos() != 0) { |
| 8526 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->parent_rel_pos(), target); |
| 8527 | } |
| 8528 | |
| 8529 | // string alias = 5; |
| 8530 | if (this->alias().size() > 0) { |
| 8531 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 8532 | this->alias().data(), static_cast<int>(this->alias().length()), |
| 8533 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 8534 | "dmi.ModifiableComponent.alias"); |
| 8535 | target = |
| 8536 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8537 | 5, this->alias(), target); |
| 8538 | } |
| 8539 | |
| 8540 | // string asset_id = 6; |
| 8541 | if (this->asset_id().size() > 0) { |
| 8542 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
| 8543 | this->asset_id().data(), static_cast<int>(this->asset_id().length()), |
| 8544 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
| 8545 | "dmi.ModifiableComponent.asset_id"); |
| 8546 | target = |
| 8547 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
| 8548 | 6, this->asset_id(), target); |
| 8549 | } |
| 8550 | |
| 8551 | // .dmi.Uri uri = 7; |
| 8552 | if (this->has_uri()) { |
| 8553 | target = ::google::protobuf::internal::WireFormatLite:: |
| 8554 | InternalWriteMessageToArray( |
| 8555 | 7, HasBitSetters::uri(this), target); |
| 8556 | } |
| 8557 | |
| 8558 | // .dmi.ComponentAdminState admin_state = 8; |
| 8559 | if (this->admin_state() != 0) { |
| 8560 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 8561 | 8, this->admin_state(), target); |
| 8562 | } |
| 8563 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8564 | // .dmi.PortComponentChangeAttributes port_attr = 50; |
| 8565 | if (has_port_attr()) { |
| 8566 | target = ::google::protobuf::internal::WireFormatLite:: |
| 8567 | InternalWriteMessageToArray( |
| 8568 | 50, HasBitSetters::port_attr(this), target); |
| 8569 | } |
| 8570 | |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8571 | if (_internal_metadata_.have_unknown_fields()) { |
| 8572 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| 8573 | _internal_metadata_.unknown_fields(), target); |
| 8574 | } |
| 8575 | // @@protoc_insertion_point(serialize_to_array_end:dmi.ModifiableComponent) |
| 8576 | return target; |
| 8577 | } |
| 8578 | |
| 8579 | size_t ModifiableComponent::ByteSizeLong() const { |
| 8580 | // @@protoc_insertion_point(message_byte_size_start:dmi.ModifiableComponent) |
| 8581 | size_t total_size = 0; |
| 8582 | |
| 8583 | if (_internal_metadata_.have_unknown_fields()) { |
| 8584 | total_size += |
| 8585 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| 8586 | _internal_metadata_.unknown_fields()); |
| 8587 | } |
| 8588 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8589 | // Prevent compiler warnings about cached_has_bits being unused |
| 8590 | (void) cached_has_bits; |
| 8591 | |
| 8592 | // string name = 1; |
| 8593 | if (this->name().size() > 0) { |
| 8594 | total_size += 1 + |
| 8595 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8596 | this->name()); |
| 8597 | } |
| 8598 | |
| 8599 | // string alias = 5; |
| 8600 | if (this->alias().size() > 0) { |
| 8601 | total_size += 1 + |
| 8602 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8603 | this->alias()); |
| 8604 | } |
| 8605 | |
| 8606 | // string asset_id = 6; |
| 8607 | if (this->asset_id().size() > 0) { |
| 8608 | total_size += 1 + |
| 8609 | ::google::protobuf::internal::WireFormatLite::StringSize( |
| 8610 | this->asset_id()); |
| 8611 | } |
| 8612 | |
| 8613 | // .dmi.Component parent = 3; |
| 8614 | if (this->has_parent()) { |
| 8615 | total_size += 1 + |
| 8616 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8617 | *parent_); |
| 8618 | } |
| 8619 | |
| 8620 | // .dmi.Uri uri = 7; |
| 8621 | if (this->has_uri()) { |
| 8622 | total_size += 1 + |
| 8623 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8624 | *uri_); |
| 8625 | } |
| 8626 | |
| 8627 | // .dmi.ComponentType class = 2; |
| 8628 | if (this->class_() != 0) { |
| 8629 | total_size += 1 + |
| 8630 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->class_()); |
| 8631 | } |
| 8632 | |
| 8633 | // int32 parent_rel_pos = 4; |
| 8634 | if (this->parent_rel_pos() != 0) { |
| 8635 | total_size += 1 + |
| 8636 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
| 8637 | this->parent_rel_pos()); |
| 8638 | } |
| 8639 | |
| 8640 | // .dmi.ComponentAdminState admin_state = 8; |
| 8641 | if (this->admin_state() != 0) { |
| 8642 | total_size += 1 + |
| 8643 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->admin_state()); |
| 8644 | } |
| 8645 | |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8646 | switch (specific_case()) { |
| 8647 | // .dmi.PortComponentChangeAttributes port_attr = 50; |
| 8648 | case kPortAttr: { |
| 8649 | total_size += 2 + |
| 8650 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
| 8651 | *specific_.port_attr_); |
| 8652 | break; |
| 8653 | } |
| 8654 | case SPECIFIC_NOT_SET: { |
| 8655 | break; |
| 8656 | } |
| 8657 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8658 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
| 8659 | SetCachedSize(cached_size); |
| 8660 | return total_size; |
| 8661 | } |
| 8662 | |
| 8663 | void ModifiableComponent::MergeFrom(const ::google::protobuf::Message& from) { |
| 8664 | // @@protoc_insertion_point(generalized_merge_from_start:dmi.ModifiableComponent) |
| 8665 | GOOGLE_DCHECK_NE(&from, this); |
| 8666 | const ModifiableComponent* source = |
| 8667 | ::google::protobuf::DynamicCastToGenerated<ModifiableComponent>( |
| 8668 | &from); |
| 8669 | if (source == nullptr) { |
| 8670 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:dmi.ModifiableComponent) |
| 8671 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| 8672 | } else { |
| 8673 | // @@protoc_insertion_point(generalized_merge_from_cast_success:dmi.ModifiableComponent) |
| 8674 | MergeFrom(*source); |
| 8675 | } |
| 8676 | } |
| 8677 | |
| 8678 | void ModifiableComponent::MergeFrom(const ModifiableComponent& from) { |
| 8679 | // @@protoc_insertion_point(class_specific_merge_from_start:dmi.ModifiableComponent) |
| 8680 | GOOGLE_DCHECK_NE(&from, this); |
| 8681 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 8682 | ::google::protobuf::uint32 cached_has_bits = 0; |
| 8683 | (void) cached_has_bits; |
| 8684 | |
| 8685 | if (from.name().size() > 0) { |
| 8686 | |
| 8687 | name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); |
| 8688 | } |
| 8689 | if (from.alias().size() > 0) { |
| 8690 | |
| 8691 | alias_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.alias_); |
| 8692 | } |
| 8693 | if (from.asset_id().size() > 0) { |
| 8694 | |
| 8695 | asset_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.asset_id_); |
| 8696 | } |
| 8697 | if (from.has_parent()) { |
| 8698 | mutable_parent()->::dmi::Component::MergeFrom(from.parent()); |
| 8699 | } |
| 8700 | if (from.has_uri()) { |
| 8701 | mutable_uri()->::dmi::Uri::MergeFrom(from.uri()); |
| 8702 | } |
| 8703 | if (from.class_() != 0) { |
| 8704 | set_class_(from.class_()); |
| 8705 | } |
| 8706 | if (from.parent_rel_pos() != 0) { |
| 8707 | set_parent_rel_pos(from.parent_rel_pos()); |
| 8708 | } |
| 8709 | if (from.admin_state() != 0) { |
| 8710 | set_admin_state(from.admin_state()); |
| 8711 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8712 | switch (from.specific_case()) { |
| 8713 | case kPortAttr: { |
| 8714 | mutable_port_attr()->::dmi::PortComponentChangeAttributes::MergeFrom(from.port_attr()); |
| 8715 | break; |
| 8716 | } |
| 8717 | case SPECIFIC_NOT_SET: { |
| 8718 | break; |
| 8719 | } |
| 8720 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8721 | } |
| 8722 | |
| 8723 | void ModifiableComponent::CopyFrom(const ::google::protobuf::Message& from) { |
| 8724 | // @@protoc_insertion_point(generalized_copy_from_start:dmi.ModifiableComponent) |
| 8725 | if (&from == this) return; |
| 8726 | Clear(); |
| 8727 | MergeFrom(from); |
| 8728 | } |
| 8729 | |
| 8730 | void ModifiableComponent::CopyFrom(const ModifiableComponent& from) { |
| 8731 | // @@protoc_insertion_point(class_specific_copy_from_start:dmi.ModifiableComponent) |
| 8732 | if (&from == this) return; |
| 8733 | Clear(); |
| 8734 | MergeFrom(from); |
| 8735 | } |
| 8736 | |
| 8737 | bool ModifiableComponent::IsInitialized() const { |
| 8738 | return true; |
| 8739 | } |
| 8740 | |
| 8741 | void ModifiableComponent::Swap(ModifiableComponent* other) { |
| 8742 | if (other == this) return; |
| 8743 | InternalSwap(other); |
| 8744 | } |
| 8745 | void ModifiableComponent::InternalSwap(ModifiableComponent* other) { |
| 8746 | using std::swap; |
| 8747 | _internal_metadata_.Swap(&other->_internal_metadata_); |
| 8748 | name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8749 | GetArenaNoVirtual()); |
| 8750 | alias_.Swap(&other->alias_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8751 | GetArenaNoVirtual()); |
| 8752 | asset_id_.Swap(&other->asset_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
| 8753 | GetArenaNoVirtual()); |
| 8754 | swap(parent_, other->parent_); |
| 8755 | swap(uri_, other->uri_); |
| 8756 | swap(class__, other->class__); |
| 8757 | swap(parent_rel_pos_, other->parent_rel_pos_); |
| 8758 | swap(admin_state_, other->admin_state_); |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8759 | swap(specific_, other->specific_); |
| 8760 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8761 | } |
| 8762 | |
| 8763 | ::google::protobuf::Metadata ModifiableComponent::GetMetadata() const { |
| 8764 | ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_dmi_2fhw_2eproto); |
| 8765 | return ::file_level_metadata_dmi_2fhw_2eproto[kIndexInFileMessages]; |
| 8766 | } |
| 8767 | |
| 8768 | |
| 8769 | // @@protoc_insertion_point(namespace_scope) |
| 8770 | } // namespace dmi |
| 8771 | namespace google { |
| 8772 | namespace protobuf { |
| 8773 | template<> PROTOBUF_NOINLINE ::dmi::Uuid* Arena::CreateMaybeMessage< ::dmi::Uuid >(Arena* arena) { |
| 8774 | return Arena::CreateInternal< ::dmi::Uuid >(arena); |
| 8775 | } |
| 8776 | template<> PROTOBUF_NOINLINE ::dmi::HardwareID* Arena::CreateMaybeMessage< ::dmi::HardwareID >(Arena* arena) { |
| 8777 | return Arena::CreateInternal< ::dmi::HardwareID >(arena); |
| 8778 | } |
| 8779 | template<> PROTOBUF_NOINLINE ::dmi::Uri* Arena::CreateMaybeMessage< ::dmi::Uri >(Arena* arena) { |
| 8780 | return Arena::CreateInternal< ::dmi::Uri >(arena); |
| 8781 | } |
| 8782 | template<> PROTOBUF_NOINLINE ::dmi::ComponentState* Arena::CreateMaybeMessage< ::dmi::ComponentState >(Arena* arena) { |
| 8783 | return Arena::CreateInternal< ::dmi::ComponentState >(arena); |
| 8784 | } |
| 8785 | template<> PROTOBUF_NOINLINE ::dmi::ComponentSensorData* Arena::CreateMaybeMessage< ::dmi::ComponentSensorData >(Arena* arena) { |
| 8786 | return Arena::CreateInternal< ::dmi::ComponentSensorData >(arena); |
| 8787 | } |
| 8788 | template<> PROTOBUF_NOINLINE ::dmi::PortComponentAttributes* Arena::CreateMaybeMessage< ::dmi::PortComponentAttributes >(Arena* arena) { |
| 8789 | return Arena::CreateInternal< ::dmi::PortComponentAttributes >(arena); |
| 8790 | } |
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 8791 | template<> PROTOBUF_NOINLINE ::dmi::PortComponentChangeAttributes* Arena::CreateMaybeMessage< ::dmi::PortComponentChangeAttributes >(Arena* arena) { |
| 8792 | return Arena::CreateInternal< ::dmi::PortComponentChangeAttributes >(arena); |
| 8793 | } |
| 8794 | template<> PROTOBUF_NOINLINE ::dmi::PonIdConfig* Arena::CreateMaybeMessage< ::dmi::PonIdConfig >(Arena* arena) { |
| 8795 | return Arena::CreateInternal< ::dmi::PonIdConfig >(arena); |
| 8796 | } |
Shivanagouda Malaginahalli | 335fe4d | 2021-03-31 16:52:28 +0530 | [diff] [blame] | 8797 | template<> PROTOBUF_NOINLINE ::dmi::ContainerComponentAttributes* Arena::CreateMaybeMessage< ::dmi::ContainerComponentAttributes >(Arena* arena) { |
| 8798 | return Arena::CreateInternal< ::dmi::ContainerComponentAttributes >(arena); |
| 8799 | } |
| 8800 | template<> PROTOBUF_NOINLINE ::dmi::PsuComponentAttributes* Arena::CreateMaybeMessage< ::dmi::PsuComponentAttributes >(Arena* arena) { |
| 8801 | return Arena::CreateInternal< ::dmi::PsuComponentAttributes >(arena); |
| 8802 | } |
| 8803 | template<> PROTOBUF_NOINLINE ::dmi::TransceiverComponentsAttributes* Arena::CreateMaybeMessage< ::dmi::TransceiverComponentsAttributes >(Arena* arena) { |
| 8804 | return Arena::CreateInternal< ::dmi::TransceiverComponentsAttributes >(arena); |
| 8805 | } |
| 8806 | template<> PROTOBUF_NOINLINE ::dmi::Component* Arena::CreateMaybeMessage< ::dmi::Component >(Arena* arena) { |
| 8807 | return Arena::CreateInternal< ::dmi::Component >(arena); |
| 8808 | } |
| 8809 | template<> PROTOBUF_NOINLINE ::dmi::Hardware* Arena::CreateMaybeMessage< ::dmi::Hardware >(Arena* arena) { |
| 8810 | return Arena::CreateInternal< ::dmi::Hardware >(arena); |
| 8811 | } |
| 8812 | template<> PROTOBUF_NOINLINE ::dmi::ModifiableComponent* Arena::CreateMaybeMessage< ::dmi::ModifiableComponent >(Arena* arena) { |
| 8813 | return Arena::CreateInternal< ::dmi::ModifiableComponent >(arena); |
| 8814 | } |
| 8815 | } // namespace protobuf |
| 8816 | } // namespace google |
| 8817 | |
| 8818 | // @@protoc_insertion_point(global_scope) |
| 8819 | #include <google/protobuf/port_undef.inc> |