11 #ifndef GI_GBP_ALLOWDENYACTION_HPP 12 #define GI_GBP_ALLOWDENYACTION_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/gbp/RuleFromActionRTgt.hpp" 26 :
public opflex::modb::mointernal::MO
33 static const opflex::modb::class_id_t
CLASS_ID = 141;
41 return getObjectInstance().isSet(4620291ul, opflex::modb::PropertyInfo::U64);
51 return (
const uint8_t)getObjectInstance().getUInt64(4620291ul);
60 const uint8_t
getAllow(
const uint8_t defaultValue)
62 return getAllow().get_value_or(defaultValue);
75 getTLMutator().modify(getClassId(), getURI())->setUInt64(4620291ul, newValue);
87 getTLMutator().modify(getClassId(), getURI())->unset(4620291ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
97 return getObjectInstance().isSet(4620289ul, opflex::modb::PropertyInfo::STRING);
107 return getObjectInstance().getString(4620289ul);
116 const std::string&
getName(
const std::string& defaultValue)
118 return getName().get_value_or(defaultValue);
131 getTLMutator().modify(getClassId(), getURI())->setString(4620289ul, newValue);
143 getTLMutator().modify(getClassId(), getURI())->unset(4620289ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
153 return getObjectInstance().isSet(4620290ul, opflex::modb::PropertyInfo::U64);
163 return (uint32_t)getObjectInstance().getUInt64(4620290ul);
174 return getOrder().get_value_or(defaultValue);
187 getTLMutator().modify(getClassId(), getURI())->setUInt64(4620290ul, newValue);
199 getTLMutator().modify(getClassId(), getURI())->unset(4620290ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
214 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::AllowDenyAction> >
resolve(
215 opflex::ofcore::OFFramework& framework,
216 const opflex::modb::URI& uri)
218 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::AllowDenyAction>(framework,
CLASS_ID, uri);
232 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::AllowDenyAction> >
resolve(
233 const opflex::modb::URI& uri)
235 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::AllowDenyAction>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
256 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::AllowDenyAction> >
resolve(
257 opflex::ofcore::OFFramework& framework,
258 const std::string& policySpaceName,
259 const std::string& gbpAllowDenyActionName)
261 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpAllowDenyAction").addElement(gbpAllowDenyActionName).build());
281 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::AllowDenyAction> >
resolve(
282 const std::string& policySpaceName,
283 const std::string& gbpAllowDenyActionName)
285 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpAllowDenyActionName);
300 const std::string& gbpRuleFromActionRTgtSource)
318 const std::string& gbpRuleFromActionRTgtSource)
320 OF_SHARED_PTR<modelgbp::gbp::RuleFromActionRTgt> result = addChild<modelgbp::gbp::RuleFromActionRTgt>(
321 CLASS_ID, getURI(), 2152104086ul, 150,
322 opflex::modb::URIBuilder(getURI()).addElement(
"GbpRuleFromActionRTgt").addElement(gbpRuleFromActionRTgtSource).build()
324 result->setSource(gbpRuleFromActionRTgtSource);
344 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::RuleFromActionRTgt>(
345 getFramework(),
CLASS_ID, getURI(), 2152104086ul, 150, out);
358 getTLMutator().remove(
CLASS_ID, getURI());
371 static void remove(opflex::ofcore::OFFramework& framework,
372 const opflex::modb::URI& uri)
374 MO::remove(framework,
CLASS_ID, uri);
387 static void remove(
const opflex::modb::URI& uri)
389 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
409 opflex::ofcore::OFFramework& framework,
410 const std::string& policySpaceName,
411 const std::string& gbpAllowDenyActionName)
413 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpAllowDenyAction").addElement(gbpAllowDenyActionName).build());
433 const std::string& policySpaceName,
434 const std::string& gbpAllowDenyActionName)
436 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpAllowDenyActionName);
451 opflex::ofcore::OFFramework& framework,
452 opflex::modb::ObjectListener* listener)
454 opflex::modb::mointernal
455 ::MO::registerListener(framework, listener,
CLASS_ID);
470 opflex::modb::ObjectListener* listener)
482 opflex::ofcore::OFFramework& framework,
483 opflex::modb::ObjectListener* listener)
485 opflex::modb::mointernal
486 ::MO::unregisterListener(framework, listener,
CLASS_ID);
496 opflex::modb::ObjectListener* listener)
506 opflex::ofcore::OFFramework& framework,
507 const opflex::modb::URI& uri,
508 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
509 : MO(framework,
CLASS_ID, uri, oi) { }
514 #endif // GI_GBP_ALLOWDENYACTION_HPP static boost::optional< OF_SHARED_PTR< modelgbp::gbp::AllowDenyAction > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of AllowDenyAction from the managed object store using the default framework ins...
Definition: AllowDenyAction.hpp:232
Definition: AllowDenyAction.hpp:25
bool isNameSet()
Check whether name has been set.
Definition: AllowDenyAction.hpp:95
AllowDenyAction(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of AllowDenyAction.
Definition: AllowDenyAction.hpp:505
modelgbp::gbp::AllowDenyAction & unsetOrder()
Unset order in the currently-active mutator.
Definition: AllowDenyAction.hpp:197
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::AllowDenyAction > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of AllowDenyAction from the managed object store.
Definition: AllowDenyAction.hpp:214
modelgbp::gbp::AllowDenyAction & unsetAllow()
Unset allow in the currently-active mutator.
Definition: AllowDenyAction.hpp:85
modelgbp::gbp::AllowDenyAction & setAllow(const uint8_t newValue)
Set allow to the specified value in the currently-active mutator.
Definition: AllowDenyAction.hpp:73
modelgbp::gbp::AllowDenyAction & unsetName()
Unset name in the currently-active mutator.
Definition: AllowDenyAction.hpp:141
uint32_t getOrder(uint32_t defaultValue)
Get the value of order if set, otherwise the value of default passed in.
Definition: AllowDenyAction.hpp:172
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: AllowDenyAction.hpp:104
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: AllowDenyAction.hpp:495
modelgbp::gbp::AllowDenyAction & setOrder(uint32_t newValue)
Set order to the specified value in the currently-active mutator.
Definition: AllowDenyAction.hpp:185
bool isAllowSet()
Check whether allow has been set.
Definition: AllowDenyAction.hpp:39
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: AllowDenyAction.hpp:481
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: AllowDenyAction.hpp:116
bool isOrderSet()
Check whether order has been set.
Definition: AllowDenyAction.hpp:151
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::AllowDenyAction > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpAllowDenyActionName)
Retrieve an instance of AllowDenyAction from the managed object store by constructing its URI from th...
Definition: AllowDenyAction.hpp:256
boost::optional< uint32_t > getOrder()
Get the value of order if it has been set.
Definition: AllowDenyAction.hpp:160
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::RuleFromActionRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RuleFromActionRTgt from the managed object store.
Definition: RuleFromActionRTgt.hpp:210
void resolveGbpRuleFromActionRTgt(std::vector< OF_SHARED_PTR< modelgbp::gbp::RuleFromActionRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::RuleFromActionRTgt.
Definition: AllowDenyAction.hpp:342
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: AllowDenyAction.hpp:450
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::AllowDenyAction > > resolve(const std::string &policySpaceName, const std::string &gbpAllowDenyActionName)
Retrieve an instance of AllowDenyAction from the default managed object store by constructing its URI...
Definition: AllowDenyAction.hpp:281
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for AllowDenyAction.
Definition: AllowDenyAction.hpp:33
OF_SHARED_PTR< modelgbp::gbp::RuleFromActionRTgt > addGbpRuleFromActionRTgt(const std::string &gbpRuleFromActionRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: AllowDenyAction.hpp:317
boost::optional< const uint8_t > getAllow()
Get the value of allow if it has been set.
Definition: AllowDenyAction.hpp:48
modelgbp::gbp::AllowDenyAction & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: AllowDenyAction.hpp:129
const uint8_t getAllow(const uint8_t defaultValue)
Get the value of allow if set, otherwise the value of default passed in.
Definition: AllowDenyAction.hpp:60
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
boost::optional< OF_SHARED_PTR< modelgbp::gbp::RuleFromActionRTgt > > resolveGbpRuleFromActionRTgt(const std::string &gbpRuleFromActionRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: AllowDenyAction.hpp:299
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: AllowDenyAction.hpp:469