11 #ifndef GI_GBPE_ATTRIBUTEMAPPINGRULE_HPP
12 #define GI_GBPE_ATTRIBUTEMAPPINGRULE_HPP
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
20 #include "modelgbp/gbpe/MappingRuleToGroupRSrc.hpp"
26 :
public opflex::modb::mointernal::MO
33 static const opflex::modb::class_id_t
CLASS_ID = 24;
41 return getObjectInstance().isSet(786435ul, opflex::modb::PropertyInfo::STRING);
51 return getObjectInstance().getString(786435ul);
75 getTLMutator().modify(getClassId(), getURI())->setString(786435ul, newValue);
87 getTLMutator().modify(getClassId(), getURI())->unset(786435ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
97 return getObjectInstance().isSet(786438ul, opflex::modb::PropertyInfo::STRING);
107 return getObjectInstance().getString(786438ul);
131 getTLMutator().modify(getClassId(), getURI())->setString(786438ul, newValue);
143 getTLMutator().modify(getClassId(), getURI())->unset(786438ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
153 return getObjectInstance().isSet(786436ul, opflex::modb::PropertyInfo::ENUM8);
163 return (
const uint8_t)getObjectInstance().getUInt64(786436ul);
187 getTLMutator().modify(getClassId(), getURI())->setUInt64(786436ul, newValue);
199 getTLMutator().modify(getClassId(), getURI())->unset(786436ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
209 return getObjectInstance().isSet(786433ul, opflex::modb::PropertyInfo::STRING);
219 return getObjectInstance().getString(786433ul);
228 const std::string&
getName(
const std::string& defaultValue)
230 return getName().get_value_or(defaultValue);
243 getTLMutator().modify(getClassId(), getURI())->setString(786433ul, newValue);
255 getTLMutator().modify(getClassId(), getURI())->unset(786433ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
265 return getObjectInstance().isSet(786437ul, opflex::modb::PropertyInfo::U64);
275 return (
const uint8_t)getObjectInstance().getUInt64(786437ul);
286 return getNegated().get_value_or(defaultValue);
299 getTLMutator().modify(getClassId(), getURI())->setUInt64(786437ul, newValue);
311 getTLMutator().modify(getClassId(), getURI())->unset(786437ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
321 return getObjectInstance().isSet(786434ul, opflex::modb::PropertyInfo::U64);
331 return (uint32_t)getObjectInstance().getUInt64(786434ul);
342 return getOrder().get_value_or(defaultValue);
355 getTLMutator().modify(getClassId(), getURI())->setUInt64(786434ul, newValue);
367 getTLMutator().modify(getClassId(), getURI())->unset(786434ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
382 static boost::optional<boost::shared_ptr<modelgbp::gbpe::AttributeMappingRule> >
resolve(
383 opflex::ofcore::OFFramework& framework,
384 const opflex::modb::URI& uri)
386 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::AttributeMappingRule>(framework,
CLASS_ID, uri);
400 static boost::optional<boost::shared_ptr<modelgbp::gbpe::AttributeMappingRule> >
resolve(
401 const opflex::modb::URI& uri)
403 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::AttributeMappingRule>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
424 static boost::optional<boost::shared_ptr<modelgbp::gbpe::AttributeMappingRule> >
resolve(
425 opflex::ofcore::OFFramework& framework,
426 const std::string& gbpeEpgMappingName,
427 const std::string& gbpeAttributeMappingRuleName)
429 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"GbpeEpgMapping").addElement(gbpeEpgMappingName).addElement(
"GbpeAttributeMappingRule").addElement(gbpeAttributeMappingRuleName).build());
449 static boost::optional<boost::shared_ptr<modelgbp::gbpe::AttributeMappingRule> >
resolve(
450 const std::string& gbpeEpgMappingName,
451 const std::string& gbpeAttributeMappingRuleName)
453 return resolve(opflex::ofcore::OFFramework::defaultInstance(),gbpeEpgMappingName,gbpeAttributeMappingRuleName);
484 boost::shared_ptr<modelgbp::gbpe::MappingRuleToGroupRSrc> result = addChild<modelgbp::gbpe::MappingRuleToGroupRSrc>(
485 CLASS_ID, getURI(), 2148270101ul, 21,
486 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeMappingRuleToGroupRSrc").build()
501 getTLMutator().remove(
CLASS_ID, getURI());
514 static void remove(opflex::ofcore::OFFramework& framework,
515 const opflex::modb::URI& uri)
517 MO::remove(framework,
CLASS_ID, uri);
530 static void remove(
const opflex::modb::URI& uri)
532 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
552 opflex::ofcore::OFFramework& framework,
553 const std::string& gbpeEpgMappingName,
554 const std::string& gbpeAttributeMappingRuleName)
556 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"GbpeEpgMapping").addElement(gbpeEpgMappingName).addElement(
"GbpeAttributeMappingRule").addElement(gbpeAttributeMappingRuleName).build());
576 const std::string& gbpeEpgMappingName,
577 const std::string& gbpeAttributeMappingRuleName)
579 remove(opflex::ofcore::OFFramework::defaultInstance(),gbpeEpgMappingName,gbpeAttributeMappingRuleName);
594 opflex::ofcore::OFFramework& framework,
595 opflex::modb::ObjectListener* listener)
597 opflex::modb::mointernal
598 ::MO::registerListener(framework, listener,
CLASS_ID);
613 opflex::modb::ObjectListener* listener)
625 opflex::ofcore::OFFramework& framework,
626 opflex::modb::ObjectListener* listener)
628 opflex::modb::mointernal
629 ::MO::unregisterListener(framework, listener,
CLASS_ID);
639 opflex::modb::ObjectListener* listener)
649 opflex::ofcore::OFFramework& framework,
650 const opflex::modb::URI& uri,
651 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
652 : MO(framework,
CLASS_ID, uri, oi) { }
657 #endif // GI_GBPE_ATTRIBUTEMAPPINGRULE_HPP
static boost::optional< boost::shared_ptr< modelgbp::gbpe::AttributeMappingRule > > resolve(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
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
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 boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of AttributeMappingRule.
Definition: AttributeMappingRule.hpp:648
boost::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:481
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
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
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:612
boost::optional< boost::shared_ptr< modelgbp::gbpe::MappingRuleToGroupRSrc > > resolveGbpeMappingRuleToGroupRSrc()
Retrieve the child object with the specified naming properties.
Definition: AttributeMappingRule.hpp:465
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
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 boost::optional< boost::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
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< boost::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 & 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
static boost::optional< boost::shared_ptr< modelgbp::gbpe::AttributeMappingRule > > resolve(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
boost::optional< const uint8_t > getNegated()
Get the value of negated if it has been set.
Definition: AttributeMappingRule.hpp:272
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:593
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: AttributeMappingRule.hpp:638
static boost::optional< boost::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
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
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:624
modelgbp::gbpe::AttributeMappingRule & unsetNegated()
Unset negated in the currently-active mutator.
Definition: AttributeMappingRule.hpp:309