modelgbp Generated OpFlex Model  1.7.0
AttributeMappingRule.hpp
1 
10 #pragma once
11 #ifndef GI_GBPE_ATTRIBUTEMAPPINGRULE_HPP
12 #define GI_GBPE_ATTRIBUTEMAPPINGRULE_HPP
13 
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
17 /*
18  * contains: item:mclass(gbpe/MappingRuleToGroupRSrc)
19  */
20 #include "modelgbp/gbpe/MappingRuleToGroupRSrc.hpp"
21 
22 namespace modelgbp {
23 namespace gbpe {
24 
26  : public opflex::modb::mointernal::MO
27 {
28 public:
29 
33  static const opflex::modb::class_id_t CLASS_ID = 33;
34 
40  {
41  return getObjectInstance().isSet(1081347ul, opflex::modb::PropertyInfo::STRING);
42  }
43 
48  boost::optional<const std::string&> getAttributeName()
49  {
50  if (isAttributeNameSet())
51  return getObjectInstance().getString(1081347ul);
52  return boost::none;
53  }
54 
60  const std::string& getAttributeName(const std::string& defaultValue)
61  {
62  return getAttributeName().get_value_or(defaultValue);
63  }
64 
74  {
75  getTLMutator().modify(getClassId(), getURI())->setString(1081347ul, newValue);
76  return *this;
77  }
78 
86  {
87  getTLMutator().modify(getClassId(), getURI())->unset(1081347ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
88  return *this;
89  }
90 
96  {
97  return getObjectInstance().isSet(1081350ul, opflex::modb::PropertyInfo::STRING);
98  }
99 
104  boost::optional<const std::string&> getMatchString()
105  {
106  if (isMatchStringSet())
107  return getObjectInstance().getString(1081350ul);
108  return boost::none;
109  }
110 
116  const std::string& getMatchString(const std::string& defaultValue)
117  {
118  return getMatchString().get_value_or(defaultValue);
119  }
120 
130  {
131  getTLMutator().modify(getClassId(), getURI())->setString(1081350ul, newValue);
132  return *this;
133  }
134 
142  {
143  getTLMutator().modify(getClassId(), getURI())->unset(1081350ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
144  return *this;
145  }
146 
152  {
153  return getObjectInstance().isSet(1081348ul, opflex::modb::PropertyInfo::ENUM8);
154  }
155 
160  boost::optional<const uint8_t> getMatchType()
161  {
162  if (isMatchTypeSet())
163  return (const uint8_t)getObjectInstance().getUInt64(1081348ul);
164  return boost::none;
165  }
166 
172  const uint8_t getMatchType(const uint8_t defaultValue)
173  {
174  return getMatchType().get_value_or(defaultValue);
175  }
176 
186  {
187  getTLMutator().modify(getClassId(), getURI())->setUInt64(1081348ul, newValue);
188  return *this;
189  }
190 
198  {
199  getTLMutator().modify(getClassId(), getURI())->unset(1081348ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
200  return *this;
201  }
202 
207  bool isNameSet()
208  {
209  return getObjectInstance().isSet(1081345ul, opflex::modb::PropertyInfo::STRING);
210  }
211 
216  boost::optional<const std::string&> getName()
217  {
218  if (isNameSet())
219  return getObjectInstance().getString(1081345ul);
220  return boost::none;
221  }
222 
228  const std::string& getName(const std::string& defaultValue)
229  {
230  return getName().get_value_or(defaultValue);
231  }
232 
241  modelgbp::gbpe::AttributeMappingRule& setName(const std::string& newValue)
242  {
243  getTLMutator().modify(getClassId(), getURI())->setString(1081345ul, newValue);
244  return *this;
245  }
246 
254  {
255  getTLMutator().modify(getClassId(), getURI())->unset(1081345ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
256  return *this;
257  }
258 
264  {
265  return getObjectInstance().isSet(1081349ul, opflex::modb::PropertyInfo::U64);
266  }
267 
272  boost::optional<const uint8_t> getNegated()
273  {
274  if (isNegatedSet())
275  return (const uint8_t)getObjectInstance().getUInt64(1081349ul);
276  return boost::none;
277  }
278 
284  const uint8_t getNegated(const uint8_t defaultValue)
285  {
286  return getNegated().get_value_or(defaultValue);
287  }
288 
298  {
299  getTLMutator().modify(getClassId(), getURI())->setUInt64(1081349ul, newValue);
300  return *this;
301  }
302 
310  {
311  getTLMutator().modify(getClassId(), getURI())->unset(1081349ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
312  return *this;
313  }
314 
319  bool isOrderSet()
320  {
321  return getObjectInstance().isSet(1081346ul, opflex::modb::PropertyInfo::U64);
322  }
323 
328  boost::optional<uint32_t> getOrder()
329  {
330  if (isOrderSet())
331  return (uint32_t)getObjectInstance().getUInt64(1081346ul);
332  return boost::none;
333  }
334 
340  uint32_t getOrder(uint32_t defaultValue)
341  {
342  return getOrder().get_value_or(defaultValue);
343  }
344 
354  {
355  getTLMutator().modify(getClassId(), getURI())->setUInt64(1081346ul, newValue);
356  return *this;
357  }
358 
366  {
367  getTLMutator().modify(getClassId(), getURI())->unset(1081346ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
368  return *this;
369  }
370 
382  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> > resolve(
383  opflex::ofcore::OFFramework& framework,
384  const opflex::modb::URI& uri)
385  {
386  return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::AttributeMappingRule>(framework, CLASS_ID, uri);
387  }
388 
400  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> > resolve(
401  const opflex::modb::URI& uri)
402  {
403  return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::AttributeMappingRule>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
404  }
405 
424  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> > resolveUnderPolicyUniverseGbpeEpgMapping(
425  opflex::ofcore::OFFramework& framework,
426  const std::string& gbpeEpgMappingName,
427  const std::string& gbpeAttributeMappingRuleName)
428  {
429  return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("GbpeEpgMapping").addElement(gbpeEpgMappingName).addElement("GbpeAttributeMappingRule").addElement(gbpeAttributeMappingRuleName).build());
430  }
431 
449  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> > resolveUnderPolicyUniverseGbpeEpgMapping(
450  const std::string& gbpeEpgMappingName,
451  const std::string& gbpeAttributeMappingRuleName)
452  {
453  return resolveUnderPolicyUniverseGbpeEpgMapping(opflex::ofcore::OFFramework::defaultInstance(),gbpeEpgMappingName,gbpeAttributeMappingRuleName);
454  }
455 
474  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> > resolveUnderPolicyUniverseGbpeMappingRuleSet(
475  opflex::ofcore::OFFramework& framework,
476  const std::string& gbpeMappingRuleSetName,
477  const std::string& gbpeAttributeMappingRuleName)
478  {
479  return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("GbpeMappingRuleSet").addElement(gbpeMappingRuleSetName).addElement("GbpeAttributeMappingRule").addElement(gbpeAttributeMappingRuleName).build());
480  }
481 
499  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::AttributeMappingRule> > resolveUnderPolicyUniverseGbpeMappingRuleSet(
500  const std::string& gbpeMappingRuleSetName,
501  const std::string& gbpeAttributeMappingRuleName)
502  {
503  return resolveUnderPolicyUniverseGbpeMappingRuleSet(opflex::ofcore::OFFramework::defaultInstance(),gbpeMappingRuleSetName,gbpeAttributeMappingRuleName);
504  }
505 
515  boost::optional<OF_SHARED_PTR<modelgbp::gbpe::MappingRuleToGroupRSrc> > resolveGbpeMappingRuleToGroupRSrc(
516  )
517  {
518  return modelgbp::gbpe::MappingRuleToGroupRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeMappingRuleToGroupRSrc").build());
519  }
520 
531  OF_SHARED_PTR<modelgbp::gbpe::MappingRuleToGroupRSrc> addGbpeMappingRuleToGroupRSrc(
532  )
533  {
534  OF_SHARED_PTR<modelgbp::gbpe::MappingRuleToGroupRSrc> result = addChild<modelgbp::gbpe::MappingRuleToGroupRSrc>(
535  CLASS_ID, getURI(), 2148565022ul, 30,
536  opflex::modb::URIBuilder(getURI()).addElement("GbpeMappingRuleToGroupRSrc").build()
537  );
538  return result;
539  }
540 
549  void remove()
550  {
551  getTLMutator().remove(CLASS_ID, getURI());
552  }
553 
564  static void remove(opflex::ofcore::OFFramework& framework,
565  const opflex::modb::URI& uri)
566  {
567  MO::remove(framework, CLASS_ID, uri);
568  }
569 
580  static void remove(const opflex::modb::URI& uri)
581  {
582  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
583  }
584 
602  opflex::ofcore::OFFramework& framework,
603  const std::string& gbpeEpgMappingName,
604  const std::string& gbpeAttributeMappingRuleName)
605  {
606  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("GbpeEpgMapping").addElement(gbpeEpgMappingName).addElement("GbpeAttributeMappingRule").addElement(gbpeAttributeMappingRuleName).build());
607  }
608 
626  const std::string& gbpeEpgMappingName,
627  const std::string& gbpeAttributeMappingRuleName)
628  {
629  removeUnderPolicyUniverseGbpeEpgMapping(opflex::ofcore::OFFramework::defaultInstance(),gbpeEpgMappingName,gbpeAttributeMappingRuleName);
630  }
631 
649  opflex::ofcore::OFFramework& framework,
650  const std::string& gbpeMappingRuleSetName,
651  const std::string& gbpeAttributeMappingRuleName)
652  {
653  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("GbpeMappingRuleSet").addElement(gbpeMappingRuleSetName).addElement("GbpeAttributeMappingRule").addElement(gbpeAttributeMappingRuleName).build());
654  }
655 
673  const std::string& gbpeMappingRuleSetName,
674  const std::string& gbpeAttributeMappingRuleName)
675  {
676  removeUnderPolicyUniverseGbpeMappingRuleSet(opflex::ofcore::OFFramework::defaultInstance(),gbpeMappingRuleSetName,gbpeAttributeMappingRuleName);
677  }
678 
690  static void registerListener(
691  opflex::ofcore::OFFramework& framework,
692  opflex::modb::ObjectListener* listener)
693  {
694  opflex::modb::mointernal
695  ::MO::registerListener(framework, listener, CLASS_ID);
696  }
697 
709  static void registerListener(
710  opflex::modb::ObjectListener* listener)
711  {
712  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
713  }
714 
721  static void unregisterListener(
722  opflex::ofcore::OFFramework& framework,
723  opflex::modb::ObjectListener* listener)
724  {
725  opflex::modb::mointernal
726  ::MO::unregisterListener(framework, listener, CLASS_ID);
727  }
728 
735  static void unregisterListener(
736  opflex::modb::ObjectListener* listener)
737  {
738  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
739  }
740 
746  opflex::ofcore::OFFramework& framework,
747  const opflex::modb::URI& uri,
748  const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
749  : MO(framework, CLASS_ID, uri, oi) { }
750 }; // class AttributeMappingRule
751 
752 } // namespace gbpe
753 } // namespace modelgbp
754 #endif // GI_GBPE_ATTRIBUTEMAPPINGRULE_HPP
modelgbp::gbpe::AttributeMappingRule & setNegated(const uint8_t newValue)
Set negated to the specified value in the currently-active mutator.
Definition: AttributeMappingRule.hpp:297
const uint8_t getMatchType(const uint8_t defaultValue)
Get the value of matchType if set, otherwise the value of default passed in.
Definition: AttributeMappingRule.hpp:172
boost::optional< const std::string & > getMatchString()
Get the value of matchString if it has been set.
Definition: AttributeMappingRule.hpp:104
bool isNameSet()
Check whether name has been set.
Definition: AttributeMappingRule.hpp:207
static void removeUnderPolicyUniverseGbpeMappingRuleSet(opflex::ofcore::OFFramework &framework, const std::string &gbpeMappingRuleSetName, const std::string &gbpeAttributeMappingRuleName)
Remove the AttributeMappingRule object with the specified path elements from the managed object store...
Definition: AttributeMappingRule.hpp:648
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: AttributeMappingRule.hpp:228
AttributeMappingRule(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of AttributeMappingRule.
Definition: AttributeMappingRule.hpp:745
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::MappingRuleToGroupRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of MappingRuleToGroupRSrc from the managed object store.
Definition: MappingRuleToGroupRSrc.hpp:257
modelgbp::gbpe::AttributeMappingRule & unsetName()
Unset name in the currently-active mutator.
Definition: AttributeMappingRule.hpp:253
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for AttributeMappingRule.
Definition: AttributeMappingRule.hpp:33
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::AttributeMappingRule > > resolveUnderPolicyUniverseGbpeEpgMapping(opflex::ofcore::OFFramework &framework, const std::string &gbpeEpgMappingName, const std::string &gbpeAttributeMappingRuleName)
Retrieve an instance of AttributeMappingRule from the managed object store by constructing its URI fr...
Definition: AttributeMappingRule.hpp:424
static void removeUnderPolicyUniverseGbpeEpgMapping(const std::string &gbpeEpgMappingName, const std::string &gbpeAttributeMappingRuleName)
Remove the AttributeMappingRule object with the specified path elements from the managed object store...
Definition: AttributeMappingRule.hpp:625
bool isMatchStringSet()
Check whether matchString has been set.
Definition: AttributeMappingRule.hpp:95
boost::optional< const uint8_t > getMatchType()
Get the value of matchType if it has been set.
Definition: AttributeMappingRule.hpp:160
modelgbp::gbpe::AttributeMappingRule & setMatchType(const uint8_t newValue)
Set matchType to the specified value in the currently-active mutator.
Definition: AttributeMappingRule.hpp:185
static void removeUnderPolicyUniverseGbpeEpgMapping(opflex::ofcore::OFFramework &framework, const std::string &gbpeEpgMappingName, const std::string &gbpeAttributeMappingRuleName)
Remove the AttributeMappingRule object with the specified path elements from the managed object store...
Definition: AttributeMappingRule.hpp:601
modelgbp::gbpe::AttributeMappingRule & setMatchString(const std::string &newValue)
Set matchString to the specified value in the currently-active mutator.
Definition: AttributeMappingRule.hpp:129
const std::string & getMatchString(const std::string &defaultValue)
Get the value of matchString if set, otherwise the value of default passed in.
Definition: AttributeMappingRule.hpp:116
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: AttributeMappingRule.hpp:709
boost::optional< uint32_t > getOrder()
Get the value of order if it has been set.
Definition: AttributeMappingRule.hpp:328
boost::optional< const std::string & > getAttributeName()
Get the value of attributeName if it has been set.
Definition: AttributeMappingRule.hpp:48
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::AttributeMappingRule > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of AttributeMappingRule from the managed object store using the default framewor...
Definition: AttributeMappingRule.hpp:400
bool isNegatedSet()
Check whether negated has been set.
Definition: AttributeMappingRule.hpp:263
modelgbp::gbpe::AttributeMappingRule & setOrder(uint32_t newValue)
Set order to the specified value in the currently-active mutator.
Definition: AttributeMappingRule.hpp:353
static void removeUnderPolicyUniverseGbpeMappingRuleSet(const std::string &gbpeMappingRuleSetName, const std::string &gbpeAttributeMappingRuleName)
Remove the AttributeMappingRule object with the specified path elements from the managed object store...
Definition: AttributeMappingRule.hpp:672
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::AttributeMappingRule > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of AttributeMappingRule from the managed object store.
Definition: AttributeMappingRule.hpp:382
OF_SHARED_PTR< modelgbp::gbpe::MappingRuleToGroupRSrc > addGbpeMappingRuleToGroupRSrc()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: AttributeMappingRule.hpp:531
modelgbp::gbpe::AttributeMappingRule & setAttributeName(const std::string &newValue)
Set attributeName to the specified value in the currently-active mutator.
Definition: AttributeMappingRule.hpp:73
modelgbp::gbpe::AttributeMappingRule & unsetMatchString()
Unset matchString in the currently-active mutator.
Definition: AttributeMappingRule.hpp:141
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: AttributeMappingRule.hpp:216
modelgbp::gbpe::AttributeMappingRule & unsetAttributeName()
Unset attributeName in the currently-active mutator.
Definition: AttributeMappingRule.hpp:85
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::AttributeMappingRule > > resolveUnderPolicyUniverseGbpeMappingRuleSet(opflex::ofcore::OFFramework &framework, const std::string &gbpeMappingRuleSetName, const std::string &gbpeAttributeMappingRuleName)
Retrieve an instance of AttributeMappingRule from the managed object store by constructing its URI fr...
Definition: AttributeMappingRule.hpp:474
modelgbp::gbpe::AttributeMappingRule & unsetMatchType()
Unset matchType in the currently-active mutator.
Definition: AttributeMappingRule.hpp:197
const uint8_t getNegated(const uint8_t defaultValue)
Get the value of negated if set, otherwise the value of default passed in.
Definition: AttributeMappingRule.hpp:284
bool isMatchTypeSet()
Check whether matchType has been set.
Definition: AttributeMappingRule.hpp:151
modelgbp::gbpe::AttributeMappingRule & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: AttributeMappingRule.hpp:241
boost::optional< const uint8_t > getNegated()
Get the value of negated if it has been set.
Definition: AttributeMappingRule.hpp:272
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::AttributeMappingRule > > resolveUnderPolicyUniverseGbpeEpgMapping(const std::string &gbpeEpgMappingName, const std::string &gbpeAttributeMappingRuleName)
Retrieve an instance of AttributeMappingRule from the default managed object store by constructing it...
Definition: AttributeMappingRule.hpp:449
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: AttributeMappingRule.hpp:690
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: AttributeMappingRule.hpp:735
Definition: AttributeMappingRule.hpp:25
bool isAttributeNameSet()
Check whether attributeName has been set.
Definition: AttributeMappingRule.hpp:39
modelgbp::gbpe::AttributeMappingRule & unsetOrder()
Unset order in the currently-active mutator.
Definition: AttributeMappingRule.hpp:365
bool isOrderSet()
Check whether order has been set.
Definition: AttributeMappingRule.hpp:319
uint32_t getOrder(uint32_t defaultValue)
Get the value of order if set, otherwise the value of default passed in.
Definition: AttributeMappingRule.hpp:340
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::MappingRuleToGroupRSrc > > resolveGbpeMappingRuleToGroupRSrc()
Retrieve the child object with the specified naming properties.
Definition: AttributeMappingRule.hpp:515
const std::string & getAttributeName(const std::string &defaultValue)
Get the value of attributeName if set, otherwise the value of default passed in.
Definition: AttributeMappingRule.hpp:60
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: AttributeMappingRule.hpp:721
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::AttributeMappingRule > > resolveUnderPolicyUniverseGbpeMappingRuleSet(const std::string &gbpeMappingRuleSetName, const std::string &gbpeAttributeMappingRuleName)
Retrieve an instance of AttributeMappingRule from the default managed object store by constructing it...
Definition: AttributeMappingRule.hpp:499
modelgbp::gbpe::AttributeMappingRule & unsetNegated()
Unset negated in the currently-active mutator.
Definition: AttributeMappingRule.hpp:309