11#ifndef GI_GBP_RULE_HPP
12#define GI_GBP_RULE_HPP
14#include <boost/optional.hpp>
15#include "opflex/modb/URIBuilder.h"
16#include "opflex/modb/mo-internal/MO.h"
20#include "modelgbp/gbp/RuleToClassifierRSrc.hpp"
24#include "modelgbp/gbp/RuleToActionRSrc.hpp"
30 :
public opflex::modb::mointernal::MO
37 static const opflex::modb::class_id_t
CLASS_ID = 145;
147 getTLMutator().modify(
getClassId(),
getURI())->unset(4751361ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
218 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Rule> >
resolve(
220 const opflex::modb::URI&
uri)
236 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Rule> >
resolve(
237 const opflex::modb::URI&
uri)
239 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::Rule>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID,
uri);
264 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Rule> >
resolve(
295 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Rule> >
resolve(
366 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::RuleToClassifierRSrc>(
432 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::RuleToActionRSrc>(
460 const opflex::modb::URI&
uri)
477 remove(opflex::ofcore::OFFramework::defaultInstance(),
uri);
552 opflex::modb::ObjectListener*
listener)
554 opflex::modb::mointernal
570 opflex::modb::ObjectListener*
listener)
583 opflex::modb::ObjectListener*
listener)
585 opflex::modb::mointernal
596 opflex::modb::ObjectListener*
listener)
607 const opflex::modb::URI&
uri,
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::RuleToActionRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RuleToActionRSrc from the managed object store.
Definition RuleToActionRSrc.hpp:257
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::RuleToClassifierRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RuleToClassifierRSrc from the managed object store.
Definition RuleToClassifierRSrc.hpp:257
modelgbp::gbp::Rule & unsetName()
Unset name in the currently-active mutator.
Definition Rule.hpp:145
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition Rule.hpp:595
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition Rule.hpp:108
uint32_t getOrder(uint32_t defaultValue)
Get the value of order if set, otherwise the value of default passed in.
Definition Rule.hpp:176
OF_SHARED_PTR< modelgbp::gbp::RuleToActionRSrc > addGbpRuleToActionRSrc(const std::string &gbpRuleToActionRSrcTargetName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition Rule.hpp:404
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::Rule > > resolve(const std::string &policySpaceName, const std::string &gbpContractName, const std::string &gbpSubjectName, const std::string &gbpRuleName)
Retrieve an instance of Rule from the default managed object store by constructing its URI from the p...
Definition Rule.hpp:295
static void remove(const std::string &policySpaceName, const std::string &gbpContractName, const std::string &gbpSubjectName, const std::string &gbpRuleName)
Remove the Rule object with the specified path elements from the managed object store using the defau...
Definition Rule.hpp:530
modelgbp::gbp::Rule & unsetDirection()
Unset direction in the currently-active mutator.
Definition Rule.hpp:89
static void remove(const opflex::modb::URI &uri)
Remove the Rule object with the specified URI using the currently-active mutator and the default fram...
Definition Rule.hpp:475
void resolveGbpRuleToClassifierRSrc(std::vector< OF_SHARED_PTR< modelgbp::gbp::RuleToClassifierRSrc > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::RuleToClassifierRSrc.
Definition Rule.hpp:364
boost::optional< OF_SHARED_PTR< modelgbp::gbp::RuleToActionRSrc > > resolveGbpRuleToActionRSrc(const std::string &gbpRuleToActionRSrcTargetName)
Retrieve the child object with the specified naming properties.
Definition Rule.hpp:383
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition Rule.hpp:120
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition Rule.hpp:581
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Rule.
Definition Rule.hpp:37
const uint8_t getDirection(const uint8_t defaultValue)
Get the value of direction if set, otherwise the value of default passed in.
Definition Rule.hpp:64
void remove()
Remove this instance using the currently-active mutator.
Definition Rule.hpp:444
bool isOrderSet()
Check whether order has been set.
Definition Rule.hpp:155
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 Rule.hpp:569
boost::optional< uint32_t > getOrder()
Get the value of order if it has been set.
Definition Rule.hpp:164
OF_SHARED_PTR< modelgbp::gbp::RuleToClassifierRSrc > addGbpRuleToClassifierRSrc(const std::string &gbpRuleToClassifierRSrcTargetName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition Rule.hpp:338
Rule(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Rule.
Definition Rule.hpp:605
bool isDirectionSet()
Check whether direction has been set.
Definition Rule.hpp:43
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::Rule > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpContractName, const std::string &gbpSubjectName, const std::string &gbpRuleName)
Retrieve an instance of Rule from the managed object store by constructing its URI from the path elem...
Definition Rule.hpp:264
modelgbp::gbp::Rule & setOrder(uint32_t newValue)
Set order to the specified value in the currently-active mutator.
Definition Rule.hpp:189
boost::optional< OF_SHARED_PTR< modelgbp::gbp::RuleToClassifierRSrc > > resolveGbpRuleToClassifierRSrc(const std::string &gbpRuleToClassifierRSrcTargetName)
Retrieve the child object with the specified naming properties.
Definition Rule.hpp:317
modelgbp::gbp::Rule & setDirection(const uint8_t newValue)
Set direction to the specified value in the currently-active mutator.
Definition Rule.hpp:77
static void remove(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpContractName, const std::string &gbpSubjectName, const std::string &gbpRuleName)
Remove the Rule object with the specified path elements from the managed object store.
Definition Rule.hpp:500
bool isNameSet()
Check whether name has been set.
Definition Rule.hpp:99
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::Rule > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Rule from the managed object store.
Definition Rule.hpp:218
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the Rule object with the specified URI using the currently-active mutator.
Definition Rule.hpp:459
void resolveGbpRuleToActionRSrc(std::vector< OF_SHARED_PTR< modelgbp::gbp::RuleToActionRSrc > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::RuleToActionRSrc.
Definition Rule.hpp:430
boost::optional< const uint8_t > getDirection()
Get the value of direction if it has been set.
Definition Rule.hpp:52
modelgbp::gbp::Rule & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition Rule.hpp:133
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 Rule.hpp:550
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::Rule > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Rule from the managed object store using the default framework instance.
Definition Rule.hpp:236
modelgbp::gbp::Rule & unsetOrder()
Unset order in the currently-active mutator.
Definition Rule.hpp:201
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12