modelgbp Generated OpFlex Model  1.7.0
RoutingDomainDropCounter.hpp
1 
10 #pragma once
11 #ifndef GI_GBPE_ROUTINGDOMAINDROPCOUNTER_HPP
12 #define GI_GBPE_ROUTINGDOMAINDROPCOUNTER_HPP
13 
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
17 
18 namespace modelgbp {
19 namespace gbpe {
20 
22  : public opflex::modb::mointernal::MO
23 {
24 public:
25 
29  static const opflex::modb::class_id_t CLASS_ID = 50;
30 
35  bool isBytesSet()
36  {
37  return getObjectInstance().isSet(1638405ul, opflex::modb::PropertyInfo::U64);
38  }
39 
44  boost::optional<uint64_t> getBytes()
45  {
46  if (isBytesSet())
47  return getObjectInstance().getUInt64(1638405ul);
48  return boost::none;
49  }
50 
56  uint64_t getBytes(uint64_t defaultValue)
57  {
58  return getBytes().get_value_or(defaultValue);
59  }
60 
70  {
71  getTLMutator().modify(getClassId(), getURI())->setUInt64(1638405ul, newValue);
72  return *this;
73  }
74 
82  {
83  getTLMutator().modify(getClassId(), getURI())->unset(1638405ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
84  return *this;
85  }
86 
91  bool isGenIdSet()
92  {
93  return getObjectInstance().isSet(1638402ul, opflex::modb::PropertyInfo::U64);
94  }
95 
100  boost::optional<uint64_t> getGenId()
101  {
102  if (isGenIdSet())
103  return getObjectInstance().getUInt64(1638402ul);
104  return boost::none;
105  }
106 
112  uint64_t getGenId(uint64_t defaultValue)
113  {
114  return getGenId().get_value_or(defaultValue);
115  }
116 
126  {
127  getTLMutator().modify(getClassId(), getURI())->setUInt64(1638402ul, newValue);
128  return *this;
129  }
130 
138  {
139  getTLMutator().modify(getClassId(), getURI())->unset(1638402ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
140  return *this;
141  }
142 
148  {
149  return getObjectInstance().isSet(1638404ul, opflex::modb::PropertyInfo::U64);
150  }
151 
156  boost::optional<uint64_t> getPackets()
157  {
158  if (isPacketsSet())
159  return getObjectInstance().getUInt64(1638404ul);
160  return boost::none;
161  }
162 
168  uint64_t getPackets(uint64_t defaultValue)
169  {
170  return getPackets().get_value_or(defaultValue);
171  }
172 
182  {
183  getTLMutator().modify(getClassId(), getURI())->setUInt64(1638404ul, newValue);
184  return *this;
185  }
186 
194  {
195  getTLMutator().modify(getClassId(), getURI())->unset(1638404ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
196  return *this;
197  }
198 
204  {
205  return getObjectInstance().isSet(1638403ul, opflex::modb::PropertyInfo::STRING);
206  }
207 
212  boost::optional<const std::string&> getRoutingDomain()
213  {
214  if (isRoutingDomainSet())
215  return getObjectInstance().getString(1638403ul);
216  return boost::none;
217  }
218 
224  const std::string& getRoutingDomain(const std::string& defaultValue)
225  {
226  return getRoutingDomain().get_value_or(defaultValue);
227  }
228 
238  {
239  getTLMutator().modify(getClassId(), getURI())->setString(1638403ul, newValue);
240  return *this;
241  }
242 
250  {
251  getTLMutator().modify(getClassId(), getURI())->unset(1638403ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
252  return *this;
253  }
254 
259  bool isUuidSet()
260  {
261  return getObjectInstance().isSet(1638401ul, opflex::modb::PropertyInfo::STRING);
262  }
263 
268  boost::optional<const std::string&> getUuid()
269  {
270  if (isUuidSet())
271  return getObjectInstance().getString(1638401ul);
272  return boost::none;
273  }
274 
280  const std::string& getUuid(const std::string& defaultValue)
281  {
282  return getUuid().get_value_or(defaultValue);
283  }
284 
293  modelgbp::gbpe::RoutingDomainDropCounter& setUuid(const std::string& newValue)
294  {
295  getTLMutator().modify(getClassId(), getURI())->setString(1638401ul, newValue);
296  return *this;
297  }
298 
306  {
307  getTLMutator().modify(getClassId(), getURI())->unset(1638401ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
308  return *this;
309  }
310 
322  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::RoutingDomainDropCounter> > resolve(
323  opflex::ofcore::OFFramework& framework,
324  const opflex::modb::URI& uri)
325  {
326  return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::RoutingDomainDropCounter>(framework, CLASS_ID, uri);
327  }
328 
340  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::RoutingDomainDropCounter> > resolve(
341  const opflex::modb::URI& uri)
342  {
343  return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::RoutingDomainDropCounter>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
344  }
345 
366  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::RoutingDomainDropCounter> > resolve(
367  opflex::ofcore::OFFramework& framework,
368  const std::string& gbpeRoutingDomainDropCounterUuid,
369  uint64_t gbpeRoutingDomainDropCounterGenId,
370  const std::string& gbpeRoutingDomainDropCounterRoutingDomain)
371  {
372  return resolve(framework,opflex::modb::URIBuilder().addElement("ObserverPolicyStatUniverse").addElement("GbpeRoutingDomainDropCounter").addElement(gbpeRoutingDomainDropCounterUuid).addElement(gbpeRoutingDomainDropCounterGenId).addElement(gbpeRoutingDomainDropCounterRoutingDomain).build());
373  }
374 
394  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::RoutingDomainDropCounter> > resolve(
395  const std::string& gbpeRoutingDomainDropCounterUuid,
396  uint64_t gbpeRoutingDomainDropCounterGenId,
397  const std::string& gbpeRoutingDomainDropCounterRoutingDomain)
398  {
399  return resolve(opflex::ofcore::OFFramework::defaultInstance(),gbpeRoutingDomainDropCounterUuid,gbpeRoutingDomainDropCounterGenId,gbpeRoutingDomainDropCounterRoutingDomain);
400  }
401 
410  void remove()
411  {
412  getTLMutator().remove(CLASS_ID, getURI());
413  }
414 
425  static void remove(opflex::ofcore::OFFramework& framework,
426  const opflex::modb::URI& uri)
427  {
428  MO::remove(framework, CLASS_ID, uri);
429  }
430 
441  static void remove(const opflex::modb::URI& uri)
442  {
443  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
444  }
445 
464  static void remove(
465  opflex::ofcore::OFFramework& framework,
466  const std::string& gbpeRoutingDomainDropCounterUuid,
467  uint64_t gbpeRoutingDomainDropCounterGenId,
468  const std::string& gbpeRoutingDomainDropCounterRoutingDomain)
469  {
470  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("ObserverPolicyStatUniverse").addElement("GbpeRoutingDomainDropCounter").addElement(gbpeRoutingDomainDropCounterUuid).addElement(gbpeRoutingDomainDropCounterGenId).addElement(gbpeRoutingDomainDropCounterRoutingDomain).build());
471  }
472 
491  static void remove(
492  const std::string& gbpeRoutingDomainDropCounterUuid,
493  uint64_t gbpeRoutingDomainDropCounterGenId,
494  const std::string& gbpeRoutingDomainDropCounterRoutingDomain)
495  {
496  remove(opflex::ofcore::OFFramework::defaultInstance(),gbpeRoutingDomainDropCounterUuid,gbpeRoutingDomainDropCounterGenId,gbpeRoutingDomainDropCounterRoutingDomain);
497  }
498 
510  static void registerListener(
511  opflex::ofcore::OFFramework& framework,
512  opflex::modb::ObjectListener* listener)
513  {
514  opflex::modb::mointernal
515  ::MO::registerListener(framework, listener, CLASS_ID);
516  }
517 
529  static void registerListener(
530  opflex::modb::ObjectListener* listener)
531  {
532  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
533  }
534 
541  static void unregisterListener(
542  opflex::ofcore::OFFramework& framework,
543  opflex::modb::ObjectListener* listener)
544  {
545  opflex::modb::mointernal
546  ::MO::unregisterListener(framework, listener, CLASS_ID);
547  }
548 
555  static void unregisterListener(
556  opflex::modb::ObjectListener* listener)
557  {
558  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
559  }
560 
566  opflex::ofcore::OFFramework& framework,
567  const opflex::modb::URI& uri,
568  const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
569  : MO(framework, CLASS_ID, uri, oi) { }
570 }; // class RoutingDomainDropCounter
571 
572 } // namespace gbpe
573 } // namespace modelgbp
574 #endif // GI_GBPE_ROUTINGDOMAINDROPCOUNTER_HPP
boost::optional< uint64_t > getBytes()
Get the value of bytes if it has been set.
Definition: RoutingDomainDropCounter.hpp:44
modelgbp::gbpe::RoutingDomainDropCounter & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: RoutingDomainDropCounter.hpp:305
bool isRoutingDomainSet()
Check whether routingDomain has been set.
Definition: RoutingDomainDropCounter.hpp:203
boost::optional< const std::string & > getRoutingDomain()
Get the value of routingDomain if it has been set.
Definition: RoutingDomainDropCounter.hpp:212
static void registerListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class.
Definition: RoutingDomainDropCounter.hpp:510
modelgbp::gbpe::RoutingDomainDropCounter & setBytes(uint64_t newValue)
Set bytes to the specified value in the currently-active mutator.
Definition: RoutingDomainDropCounter.hpp:69
modelgbp::gbpe::RoutingDomainDropCounter & unsetBytes()
Unset bytes in the currently-active mutator.
Definition: RoutingDomainDropCounter.hpp:81
boost::optional< uint64_t > getGenId()
Get the value of genId if it has been set.
Definition: RoutingDomainDropCounter.hpp:100
Definition: RoutingDomainDropCounter.hpp:21
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: RoutingDomainDropCounter.hpp:541
modelgbp::gbpe::RoutingDomainDropCounter & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: RoutingDomainDropCounter.hpp:293
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition: RoutingDomainDropCounter.hpp:280
modelgbp::gbpe::RoutingDomainDropCounter & setRoutingDomain(const std::string &newValue)
Set routingDomain to the specified value in the currently-active mutator.
Definition: RoutingDomainDropCounter.hpp:237
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::RoutingDomainDropCounter > > resolve(const std::string &gbpeRoutingDomainDropCounterUuid, uint64_t gbpeRoutingDomainDropCounterGenId, const std::string &gbpeRoutingDomainDropCounterRoutingDomain)
Retrieve an instance of RoutingDomainDropCounter from the default managed object store by constructin...
Definition: RoutingDomainDropCounter.hpp:394
RoutingDomainDropCounter(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of RoutingDomainDropCounter.
Definition: RoutingDomainDropCounter.hpp:565
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: RoutingDomainDropCounter.hpp:268
bool isGenIdSet()
Check whether genId has been set.
Definition: RoutingDomainDropCounter.hpp:91
static void registerListener(opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class with the default framework...
Definition: RoutingDomainDropCounter.hpp:529
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::RoutingDomainDropCounter > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of RoutingDomainDropCounter from the managed object store using the default fram...
Definition: RoutingDomainDropCounter.hpp:340
modelgbp::gbpe::RoutingDomainDropCounter & unsetRoutingDomain()
Unset routingDomain in the currently-active mutator.
Definition: RoutingDomainDropCounter.hpp:249
boost::optional< uint64_t > getPackets()
Get the value of packets if it has been set.
Definition: RoutingDomainDropCounter.hpp:156
bool isBytesSet()
Check whether bytes has been set.
Definition: RoutingDomainDropCounter.hpp:35
const std::string & getRoutingDomain(const std::string &defaultValue)
Get the value of routingDomain if set, otherwise the value of default passed in.
Definition: RoutingDomainDropCounter.hpp:224
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for RoutingDomainDropCounter.
Definition: RoutingDomainDropCounter.hpp:29
uint64_t getGenId(uint64_t defaultValue)
Get the value of genId if set, otherwise the value of default passed in.
Definition: RoutingDomainDropCounter.hpp:112
bool isUuidSet()
Check whether uuid has been set.
Definition: RoutingDomainDropCounter.hpp:259
bool isPacketsSet()
Check whether packets has been set.
Definition: RoutingDomainDropCounter.hpp:147
modelgbp::gbpe::RoutingDomainDropCounter & setGenId(uint64_t newValue)
Set genId to the specified value in the currently-active mutator.
Definition: RoutingDomainDropCounter.hpp:125
uint64_t getPackets(uint64_t defaultValue)
Get the value of packets if set, otherwise the value of default passed in.
Definition: RoutingDomainDropCounter.hpp:168
uint64_t getBytes(uint64_t defaultValue)
Get the value of bytes if set, otherwise the value of default passed in.
Definition: RoutingDomainDropCounter.hpp:56
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: RoutingDomainDropCounter.hpp:555
modelgbp::gbpe::RoutingDomainDropCounter & setPackets(uint64_t newValue)
Set packets to the specified value in the currently-active mutator.
Definition: RoutingDomainDropCounter.hpp:181
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::RoutingDomainDropCounter > > resolve(opflex::ofcore::OFFramework &framework, const std::string &gbpeRoutingDomainDropCounterUuid, uint64_t gbpeRoutingDomainDropCounterGenId, const std::string &gbpeRoutingDomainDropCounterRoutingDomain)
Retrieve an instance of RoutingDomainDropCounter from the managed object store by constructing its UR...
Definition: RoutingDomainDropCounter.hpp:366
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::RoutingDomainDropCounter > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RoutingDomainDropCounter from the managed object store.
Definition: RoutingDomainDropCounter.hpp:322
modelgbp::gbpe::RoutingDomainDropCounter & unsetPackets()
Unset packets in the currently-active mutator.
Definition: RoutingDomainDropCounter.hpp:193
modelgbp::gbpe::RoutingDomainDropCounter & unsetGenId()
Unset genId in the currently-active mutator.
Definition: RoutingDomainDropCounter.hpp:137
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12