modelgbp Generated OpFlex Model  1.7.0
L24ClassifierCounter.hpp
1 
10 #pragma once
11 #ifndef GI_GBPE_L24CLASSIFIERCOUNTER_HPP
12 #define GI_GBPE_L24CLASSIFIERCOUNTER_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 = 48;
30 
35  bool isBytesSet()
36  {
37  return getObjectInstance().isSet(1572871ul, opflex::modb::PropertyInfo::U64);
38  }
39 
44  boost::optional<uint64_t> getBytes()
45  {
46  if (isBytesSet())
47  return getObjectInstance().getUInt64(1572871ul);
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(1572871ul, newValue);
72  return *this;
73  }
74 
82  {
83  getTLMutator().modify(getClassId(), getURI())->unset(1572871ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
84  return *this;
85  }
86 
92  {
93  return getObjectInstance().isSet(1572869ul, opflex::modb::PropertyInfo::STRING);
94  }
95 
100  boost::optional<const std::string&> getClassifier()
101  {
102  if (isClassifierSet())
103  return getObjectInstance().getString(1572869ul);
104  return boost::none;
105  }
106 
112  const std::string& getClassifier(const std::string& defaultValue)
113  {
114  return getClassifier().get_value_or(defaultValue);
115  }
116 
126  {
127  getTLMutator().modify(getClassId(), getURI())->setString(1572869ul, newValue);
128  return *this;
129  }
130 
138  {
139  getTLMutator().modify(getClassId(), getURI())->unset(1572869ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
140  return *this;
141  }
142 
147  bool isDstEpgSet()
148  {
149  return getObjectInstance().isSet(1572868ul, opflex::modb::PropertyInfo::STRING);
150  }
151 
156  boost::optional<const std::string&> getDstEpg()
157  {
158  if (isDstEpgSet())
159  return getObjectInstance().getString(1572868ul);
160  return boost::none;
161  }
162 
168  const std::string& getDstEpg(const std::string& defaultValue)
169  {
170  return getDstEpg().get_value_or(defaultValue);
171  }
172 
181  modelgbp::gbpe::L24ClassifierCounter& setDstEpg(const std::string& newValue)
182  {
183  getTLMutator().modify(getClassId(), getURI())->setString(1572868ul, newValue);
184  return *this;
185  }
186 
194  {
195  getTLMutator().modify(getClassId(), getURI())->unset(1572868ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
196  return *this;
197  }
198 
203  bool isGenIdSet()
204  {
205  return getObjectInstance().isSet(1572866ul, opflex::modb::PropertyInfo::U64);
206  }
207 
212  boost::optional<uint64_t> getGenId()
213  {
214  if (isGenIdSet())
215  return getObjectInstance().getUInt64(1572866ul);
216  return boost::none;
217  }
218 
224  uint64_t getGenId(uint64_t defaultValue)
225  {
226  return getGenId().get_value_or(defaultValue);
227  }
228 
238  {
239  getTLMutator().modify(getClassId(), getURI())->setUInt64(1572866ul, newValue);
240  return *this;
241  }
242 
250  {
251  getTLMutator().modify(getClassId(), getURI())->unset(1572866ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
252  return *this;
253  }
254 
260  {
261  return getObjectInstance().isSet(1572870ul, opflex::modb::PropertyInfo::U64);
262  }
263 
268  boost::optional<uint64_t> getPackets()
269  {
270  if (isPacketsSet())
271  return getObjectInstance().getUInt64(1572870ul);
272  return boost::none;
273  }
274 
280  uint64_t getPackets(uint64_t defaultValue)
281  {
282  return getPackets().get_value_or(defaultValue);
283  }
284 
294  {
295  getTLMutator().modify(getClassId(), getURI())->setUInt64(1572870ul, newValue);
296  return *this;
297  }
298 
306  {
307  getTLMutator().modify(getClassId(), getURI())->unset(1572870ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
308  return *this;
309  }
310 
315  bool isSrcEpgSet()
316  {
317  return getObjectInstance().isSet(1572867ul, opflex::modb::PropertyInfo::STRING);
318  }
319 
324  boost::optional<const std::string&> getSrcEpg()
325  {
326  if (isSrcEpgSet())
327  return getObjectInstance().getString(1572867ul);
328  return boost::none;
329  }
330 
336  const std::string& getSrcEpg(const std::string& defaultValue)
337  {
338  return getSrcEpg().get_value_or(defaultValue);
339  }
340 
349  modelgbp::gbpe::L24ClassifierCounter& setSrcEpg(const std::string& newValue)
350  {
351  getTLMutator().modify(getClassId(), getURI())->setString(1572867ul, newValue);
352  return *this;
353  }
354 
362  {
363  getTLMutator().modify(getClassId(), getURI())->unset(1572867ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
364  return *this;
365  }
366 
371  bool isUuidSet()
372  {
373  return getObjectInstance().isSet(1572865ul, opflex::modb::PropertyInfo::STRING);
374  }
375 
380  boost::optional<const std::string&> getUuid()
381  {
382  if (isUuidSet())
383  return getObjectInstance().getString(1572865ul);
384  return boost::none;
385  }
386 
392  const std::string& getUuid(const std::string& defaultValue)
393  {
394  return getUuid().get_value_or(defaultValue);
395  }
396 
405  modelgbp::gbpe::L24ClassifierCounter& setUuid(const std::string& newValue)
406  {
407  getTLMutator().modify(getClassId(), getURI())->setString(1572865ul, newValue);
408  return *this;
409  }
410 
418  {
419  getTLMutator().modify(getClassId(), getURI())->unset(1572865ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
420  return *this;
421  }
422 
434  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::L24ClassifierCounter> > resolve(
435  opflex::ofcore::OFFramework& framework,
436  const opflex::modb::URI& uri)
437  {
438  return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::L24ClassifierCounter>(framework, CLASS_ID, uri);
439  }
440 
452  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::L24ClassifierCounter> > resolve(
453  const opflex::modb::URI& uri)
454  {
455  return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::L24ClassifierCounter>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
456  }
457 
482  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::L24ClassifierCounter> > resolve(
483  opflex::ofcore::OFFramework& framework,
484  const std::string& gbpeL24ClassifierCounterUuid,
485  uint64_t gbpeL24ClassifierCounterGenId,
486  const std::string& gbpeL24ClassifierCounterSrcEpg,
487  const std::string& gbpeL24ClassifierCounterDstEpg,
488  const std::string& gbpeL24ClassifierCounterClassifier)
489  {
490  return resolve(framework,opflex::modb::URIBuilder().addElement("ObserverPolicyStatUniverse").addElement("GbpeL24ClassifierCounter").addElement(gbpeL24ClassifierCounterUuid).addElement(gbpeL24ClassifierCounterGenId).addElement(gbpeL24ClassifierCounterSrcEpg).addElement(gbpeL24ClassifierCounterDstEpg).addElement(gbpeL24ClassifierCounterClassifier).build());
491  }
492 
516  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::L24ClassifierCounter> > resolve(
517  const std::string& gbpeL24ClassifierCounterUuid,
518  uint64_t gbpeL24ClassifierCounterGenId,
519  const std::string& gbpeL24ClassifierCounterSrcEpg,
520  const std::string& gbpeL24ClassifierCounterDstEpg,
521  const std::string& gbpeL24ClassifierCounterClassifier)
522  {
523  return resolve(opflex::ofcore::OFFramework::defaultInstance(),gbpeL24ClassifierCounterUuid,gbpeL24ClassifierCounterGenId,gbpeL24ClassifierCounterSrcEpg,gbpeL24ClassifierCounterDstEpg,gbpeL24ClassifierCounterClassifier);
524  }
525 
534  void remove()
535  {
536  getTLMutator().remove(CLASS_ID, getURI());
537  }
538 
549  static void remove(opflex::ofcore::OFFramework& framework,
550  const opflex::modb::URI& uri)
551  {
552  MO::remove(framework, CLASS_ID, uri);
553  }
554 
565  static void remove(const opflex::modb::URI& uri)
566  {
567  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
568  }
569 
592  static void remove(
593  opflex::ofcore::OFFramework& framework,
594  const std::string& gbpeL24ClassifierCounterUuid,
595  uint64_t gbpeL24ClassifierCounterGenId,
596  const std::string& gbpeL24ClassifierCounterSrcEpg,
597  const std::string& gbpeL24ClassifierCounterDstEpg,
598  const std::string& gbpeL24ClassifierCounterClassifier)
599  {
600  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("ObserverPolicyStatUniverse").addElement("GbpeL24ClassifierCounter").addElement(gbpeL24ClassifierCounterUuid).addElement(gbpeL24ClassifierCounterGenId).addElement(gbpeL24ClassifierCounterSrcEpg).addElement(gbpeL24ClassifierCounterDstEpg).addElement(gbpeL24ClassifierCounterClassifier).build());
601  }
602 
625  static void remove(
626  const std::string& gbpeL24ClassifierCounterUuid,
627  uint64_t gbpeL24ClassifierCounterGenId,
628  const std::string& gbpeL24ClassifierCounterSrcEpg,
629  const std::string& gbpeL24ClassifierCounterDstEpg,
630  const std::string& gbpeL24ClassifierCounterClassifier)
631  {
632  remove(opflex::ofcore::OFFramework::defaultInstance(),gbpeL24ClassifierCounterUuid,gbpeL24ClassifierCounterGenId,gbpeL24ClassifierCounterSrcEpg,gbpeL24ClassifierCounterDstEpg,gbpeL24ClassifierCounterClassifier);
633  }
634 
646  static void registerListener(
647  opflex::ofcore::OFFramework& framework,
648  opflex::modb::ObjectListener* listener)
649  {
650  opflex::modb::mointernal
651  ::MO::registerListener(framework, listener, CLASS_ID);
652  }
653 
665  static void registerListener(
666  opflex::modb::ObjectListener* listener)
667  {
668  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
669  }
670 
677  static void unregisterListener(
678  opflex::ofcore::OFFramework& framework,
679  opflex::modb::ObjectListener* listener)
680  {
681  opflex::modb::mointernal
682  ::MO::unregisterListener(framework, listener, CLASS_ID);
683  }
684 
691  static void unregisterListener(
692  opflex::modb::ObjectListener* listener)
693  {
694  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
695  }
696 
702  opflex::ofcore::OFFramework& framework,
703  const opflex::modb::URI& uri,
704  const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
705  : MO(framework, CLASS_ID, uri, oi) { }
706 }; // class L24ClassifierCounter
707 
708 } // namespace gbpe
709 } // namespace modelgbp
710 #endif // GI_GBPE_L24CLASSIFIERCOUNTER_HPP
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::L24ClassifierCounter > > resolve(const std::string &gbpeL24ClassifierCounterUuid, uint64_t gbpeL24ClassifierCounterGenId, const std::string &gbpeL24ClassifierCounterSrcEpg, const std::string &gbpeL24ClassifierCounterDstEpg, const std::string &gbpeL24ClassifierCounterClassifier)
Retrieve an instance of L24ClassifierCounter from the default managed object store by constructing it...
Definition: L24ClassifierCounter.hpp:516
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for L24ClassifierCounter.
Definition: L24ClassifierCounter.hpp:29
modelgbp::gbpe::L24ClassifierCounter & setPackets(uint64_t newValue)
Set packets to the specified value in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:293
boost::optional< uint64_t > getGenId()
Get the value of genId if it has been set.
Definition: L24ClassifierCounter.hpp:212
bool isSrcEpgSet()
Check whether srcEpg has been set.
Definition: L24ClassifierCounter.hpp:315
modelgbp::gbpe::L24ClassifierCounter & unsetBytes()
Unset bytes in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:81
modelgbp::gbpe::L24ClassifierCounter & setSrcEpg(const std::string &newValue)
Set srcEpg to the specified value in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:349
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::L24ClassifierCounter > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of L24ClassifierCounter from the managed object store using the default framewor...
Definition: L24ClassifierCounter.hpp:452
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: L24ClassifierCounter.hpp:646
uint64_t getPackets(uint64_t defaultValue)
Get the value of packets if set, otherwise the value of default passed in.
Definition: L24ClassifierCounter.hpp:280
bool isPacketsSet()
Check whether packets has been set.
Definition: L24ClassifierCounter.hpp:259
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: L24ClassifierCounter.hpp:691
modelgbp::gbpe::L24ClassifierCounter & unsetSrcEpg()
Unset srcEpg in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:361
modelgbp::gbpe::L24ClassifierCounter & unsetGenId()
Unset genId in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:249
modelgbp::gbpe::L24ClassifierCounter & setDstEpg(const std::string &newValue)
Set dstEpg to the specified value in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:181
boost::optional< const std::string & > getSrcEpg()
Get the value of srcEpg if it has been set.
Definition: L24ClassifierCounter.hpp:324
boost::optional< const std::string & > getDstEpg()
Get the value of dstEpg if it has been set.
Definition: L24ClassifierCounter.hpp:156
modelgbp::gbpe::L24ClassifierCounter & unsetClassifier()
Unset classifier in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:137
modelgbp::gbpe::L24ClassifierCounter & setBytes(uint64_t newValue)
Set bytes to the specified value in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:69
boost::optional< uint64_t > getPackets()
Get the value of packets if it has been set.
Definition: L24ClassifierCounter.hpp:268
modelgbp::gbpe::L24ClassifierCounter & setGenId(uint64_t newValue)
Set genId to the specified value in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:237
bool isBytesSet()
Check whether bytes has been set.
Definition: L24ClassifierCounter.hpp:35
L24ClassifierCounter(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of L24ClassifierCounter.
Definition: L24ClassifierCounter.hpp:701
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: L24ClassifierCounter.hpp:665
uint64_t getBytes(uint64_t defaultValue)
Get the value of bytes if set, otherwise the value of default passed in.
Definition: L24ClassifierCounter.hpp:56
boost::optional< const std::string & > getClassifier()
Get the value of classifier if it has been set.
Definition: L24ClassifierCounter.hpp:100
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: L24ClassifierCounter.hpp:380
bool isGenIdSet()
Check whether genId has been set.
Definition: L24ClassifierCounter.hpp:203
uint64_t getGenId(uint64_t defaultValue)
Get the value of genId if set, otherwise the value of default passed in.
Definition: L24ClassifierCounter.hpp:224
modelgbp::gbpe::L24ClassifierCounter & unsetPackets()
Unset packets in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:305
const std::string & getSrcEpg(const std::string &defaultValue)
Get the value of srcEpg if set, otherwise the value of default passed in.
Definition: L24ClassifierCounter.hpp:336
modelgbp::gbpe::L24ClassifierCounter & setClassifier(const std::string &newValue)
Set classifier to the specified value in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:125
boost::optional< uint64_t > getBytes()
Get the value of bytes if it has been set.
Definition: L24ClassifierCounter.hpp:44
bool isDstEpgSet()
Check whether dstEpg has been set.
Definition: L24ClassifierCounter.hpp:147
bool isClassifierSet()
Check whether classifier has been set.
Definition: L24ClassifierCounter.hpp:91
modelgbp::gbpe::L24ClassifierCounter & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:405
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: L24ClassifierCounter.hpp:677
modelgbp::gbpe::L24ClassifierCounter & unsetDstEpg()
Unset dstEpg in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:193
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::L24ClassifierCounter > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of L24ClassifierCounter from the managed object store.
Definition: L24ClassifierCounter.hpp:434
const std::string & getClassifier(const std::string &defaultValue)
Get the value of classifier if set, otherwise the value of default passed in.
Definition: L24ClassifierCounter.hpp:112
modelgbp::gbpe::L24ClassifierCounter & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: L24ClassifierCounter.hpp:417
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition: L24ClassifierCounter.hpp:392
const std::string & getDstEpg(const std::string &defaultValue)
Get the value of dstEpg if set, otherwise the value of default passed in.
Definition: L24ClassifierCounter.hpp:168
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::L24ClassifierCounter > > resolve(opflex::ofcore::OFFramework &framework, const std::string &gbpeL24ClassifierCounterUuid, uint64_t gbpeL24ClassifierCounterGenId, const std::string &gbpeL24ClassifierCounterSrcEpg, const std::string &gbpeL24ClassifierCounterDstEpg, const std::string &gbpeL24ClassifierCounterClassifier)
Retrieve an instance of L24ClassifierCounter from the managed object store by constructing its URI fr...
Definition: L24ClassifierCounter.hpp:482
bool isUuidSet()
Check whether uuid has been set.
Definition: L24ClassifierCounter.hpp:371
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
Definition: L24ClassifierCounter.hpp:21