11 #ifndef GI_GBP_SECGROUP_HPP 12 #define GI_GBP_SECGROUP_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/epdr/EndPointFromSecGroupRTgt.hpp" 24 #include "modelgbp/inv/LocalInventoryEpFromSecGroupRTgt.hpp" 28 #include "modelgbp/gbp/SecGroupSubject.hpp" 34 :
public opflex::modb::mointernal::MO
41 static const opflex::modb::class_id_t
CLASS_ID = 203;
49 return getObjectInstance().isSet(6651905ul, opflex::modb::PropertyInfo::STRING);
56 boost::optional<const std::string&>
getName()
59 return getObjectInstance().getString(6651905ul);
68 const std::string&
getName(
const std::string& defaultValue)
70 return getName().get_value_or(defaultValue);
83 getTLMutator().modify(getClassId(), getURI())->setString(6651905ul, newValue);
95 getTLMutator().modify(getClassId(), getURI())->unset(6651905ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
110 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroup> >
resolve(
111 opflex::ofcore::OFFramework& framework,
112 const opflex::modb::URI& uri)
114 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::SecGroup>(framework,
CLASS_ID, uri);
128 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroup> >
resolve(
129 const opflex::modb::URI& uri)
131 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::SecGroup>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
152 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroup> >
resolve(
153 opflex::ofcore::OFFramework& framework,
154 const std::string& policySpaceName,
155 const std::string& gbpSecGroupName)
157 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSecGroup").addElement(gbpSecGroupName).build());
177 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroup> >
resolve(
178 const std::string& policySpaceName,
179 const std::string& gbpSecGroupName)
181 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSecGroupName);
196 const std::string& epdrEndPointFromSecGroupRTgtSource)
214 const std::string& epdrEndPointFromSecGroupRTgtSource)
216 OF_SHARED_PTR<modelgbp::epdr::EndPointFromSecGroupRTgt> result = addChild<modelgbp::epdr::EndPointFromSecGroupRTgt>(
217 CLASS_ID, getURI(), 2154135659ul, 107,
218 opflex::modb::URIBuilder(getURI()).addElement(
"EpdrEndPointFromSecGroupRTgt").addElement(epdrEndPointFromSecGroupRTgtSource).build()
220 result->setSource(epdrEndPointFromSecGroupRTgtSource);
240 opflex::modb::mointernal::MO::resolveChildren<modelgbp::epdr::EndPointFromSecGroupRTgt>(
241 getFramework(),
CLASS_ID, getURI(), 2154135659ul, 107, out);
256 const std::string& invLocalInventoryEpFromSecGroupRTgtSource)
274 const std::string& invLocalInventoryEpFromSecGroupRTgtSource)
276 OF_SHARED_PTR<modelgbp::inv::LocalInventoryEpFromSecGroupRTgt> result = addChild<modelgbp::inv::LocalInventoryEpFromSecGroupRTgt>(
277 CLASS_ID, getURI(), 2154135673ul, 121,
278 opflex::modb::URIBuilder(getURI()).addElement(
"InvLocalInventoryEpFromSecGroupRTgt").addElement(invLocalInventoryEpFromSecGroupRTgtSource).build()
280 result->setSource(invLocalInventoryEpFromSecGroupRTgtSource);
300 opflex::modb::mointernal::MO::resolveChildren<modelgbp::inv::LocalInventoryEpFromSecGroupRTgt>(
301 getFramework(),
CLASS_ID, getURI(), 2154135673ul, 121, out);
316 const std::string& gbpSecGroupSubjectName)
334 const std::string& gbpSecGroupSubjectName)
336 OF_SHARED_PTR<modelgbp::gbp::SecGroupSubject> result = addChild<modelgbp::gbp::SecGroupSubject>(
337 CLASS_ID, getURI(), 2154135756ul, 204,
338 opflex::modb::URIBuilder(getURI()).addElement(
"GbpSecGroupSubject").addElement(gbpSecGroupSubjectName).build()
340 result->setName(gbpSecGroupSubjectName);
360 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::SecGroupSubject>(
361 getFramework(),
CLASS_ID, getURI(), 2154135756ul, 204, out);
374 getTLMutator().remove(
CLASS_ID, getURI());
387 static void remove(opflex::ofcore::OFFramework& framework,
388 const opflex::modb::URI& uri)
390 MO::remove(framework,
CLASS_ID, uri);
403 static void remove(
const opflex::modb::URI& uri)
405 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
425 opflex::ofcore::OFFramework& framework,
426 const std::string& policySpaceName,
427 const std::string& gbpSecGroupName)
429 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSecGroup").addElement(gbpSecGroupName).build());
449 const std::string& policySpaceName,
450 const std::string& gbpSecGroupName)
452 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSecGroupName);
467 opflex::ofcore::OFFramework& framework,
468 opflex::modb::ObjectListener* listener)
470 opflex::modb::mointernal
471 ::MO::registerListener(framework, listener,
CLASS_ID);
486 opflex::modb::ObjectListener* listener)
498 opflex::ofcore::OFFramework& framework,
499 opflex::modb::ObjectListener* listener)
501 opflex::modb::mointernal
502 ::MO::unregisterListener(framework, listener,
CLASS_ID);
512 opflex::modb::ObjectListener* listener)
522 opflex::ofcore::OFFramework& framework,
523 const opflex::modb::URI& uri,
524 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
525 : MO(framework,
CLASS_ID, uri, oi) { }
530 #endif // GI_GBP_SECGROUP_HPP boost::optional< OF_SHARED_PTR< modelgbp::inv::LocalInventoryEpFromSecGroupRTgt > > resolveInvLocalInventoryEpFromSecGroupRTgt(const std::string &invLocalInventoryEpFromSecGroupRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: SecGroup.hpp:255
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroup > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of SecGroup from the managed object store using the default framework instance...
Definition: SecGroup.hpp:128
void resolveGbpSecGroupSubject(std::vector< OF_SHARED_PTR< modelgbp::gbp::SecGroupSubject > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::SecGroupSubject.
Definition: SecGroup.hpp:358
boost::optional< OF_SHARED_PTR< modelgbp::epdr::EndPointFromSecGroupRTgt > > resolveEpdrEndPointFromSecGroupRTgt(const std::string &epdrEndPointFromSecGroupRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: SecGroup.hpp:195
boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupSubject > > resolveGbpSecGroupSubject(const std::string &gbpSecGroupSubjectName)
Retrieve the child object with the specified naming properties.
Definition: SecGroup.hpp:315
OF_SHARED_PTR< modelgbp::epdr::EndPointFromSecGroupRTgt > addEpdrEndPointFromSecGroupRTgt(const std::string &epdrEndPointFromSecGroupRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: SecGroup.hpp:213
OF_SHARED_PTR< modelgbp::inv::LocalInventoryEpFromSecGroupRTgt > addInvLocalInventoryEpFromSecGroupRTgt(const std::string &invLocalInventoryEpFromSecGroupRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: SecGroup.hpp:273
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for SecGroup.
Definition: SecGroup.hpp:41
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroup > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpSecGroupName)
Retrieve an instance of SecGroup from the managed object store by constructing its URI from the path ...
Definition: SecGroup.hpp:152
modelgbp::gbp::SecGroup & unsetName()
Unset name in the currently-active mutator.
Definition: SecGroup.hpp:93
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: SecGroup.hpp:497
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: SecGroup.hpp:511
void resolveInvLocalInventoryEpFromSecGroupRTgt(std::vector< OF_SHARED_PTR< modelgbp::inv::LocalInventoryEpFromSecGroupRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::inv::LocalInventoryEpFromSecGrou...
Definition: SecGroup.hpp:298
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: SecGroup.hpp:466
static boost::optional< OF_SHARED_PTR< modelgbp::inv::LocalInventoryEpFromSecGroupRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalInventoryEpFromSecGroupRTgt from the managed object store.
Definition: LocalInventoryEpFromSecGroupRTgt.hpp:210
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: SecGroup.hpp:56
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroup > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SecGroup from the managed object store.
Definition: SecGroup.hpp:110
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroup > > resolve(const std::string &policySpaceName, const std::string &gbpSecGroupName)
Retrieve an instance of SecGroup from the default managed object store by constructing its URI from t...
Definition: SecGroup.hpp:177
Definition: SecGroup.hpp:33
OF_SHARED_PTR< modelgbp::gbp::SecGroupSubject > addGbpSecGroupSubject(const std::string &gbpSecGroupSubjectName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: SecGroup.hpp:333
bool isNameSet()
Check whether name has been set.
Definition: SecGroup.hpp:47
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: SecGroup.hpp:68
SecGroup(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of SecGroup.
Definition: SecGroup.hpp:521
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupSubject > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SecGroupSubject from the managed object store.
Definition: SecGroupSubject.hpp:102
void resolveEpdrEndPointFromSecGroupRTgt(std::vector< OF_SHARED_PTR< modelgbp::epdr::EndPointFromSecGroupRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::epdr::EndPointFromSecGroupRTgt.
Definition: SecGroup.hpp:238
modelgbp::gbp::SecGroup & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: SecGroup.hpp:81
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::EndPointFromSecGroupRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EndPointFromSecGroupRTgt from the managed object store.
Definition: EndPointFromSecGroupRTgt.hpp:210
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: SecGroup.hpp:485
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12