modelgbp Generated OpFlex Model 1.7.0
SecGroup.hpp
1
10#pragma once
11#ifndef GI_GBP_SECGROUP_HPP
12#define GI_GBP_SECGROUP_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(epdr/EndPointFromSecGroupRTgt)
19 */
20#include "modelgbp/epdr/EndPointFromSecGroupRTgt.hpp"
21/*
22 * contains: item:mclass(inv/LocalInventoryEpFromSecGroupRTgt)
23 */
24#include "modelgbp/inv/LocalInventoryEpFromSecGroupRTgt.hpp"
25/*
26 * contains: item:mclass(gbp/SecGroupSubject)
27 */
28#include "modelgbp/gbp/SecGroupSubject.hpp"
29
30namespace modelgbp {
31namespace gbp {
32
34 : public opflex::modb::mointernal::MO
35{
36public:
37
41 static const opflex::modb::class_id_t CLASS_ID = 203;
42
47 bool isNameSet()
48 {
49 return getObjectInstance().isSet(6651905ul, opflex::modb::PropertyInfo::STRING);
50 }
51
56 boost::optional<const std::string&> getName()
57 {
58 if (isNameSet())
59 return getObjectInstance().getString(6651905ul);
60 return boost::none;
61 }
62
68 const std::string& getName(const std::string& defaultValue)
69 {
70 return getName().get_value_or(defaultValue);
71 }
72
81 modelgbp::gbp::SecGroup& setName(const std::string& newValue)
82 {
83 getTLMutator().modify(getClassId(), getURI())->setString(6651905ul, newValue);
84 return *this;
85 }
86
94 {
95 getTLMutator().modify(getClassId(), getURI())->unset(6651905ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
96 return *this;
97 }
98
110 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroup> > resolve(
111 opflex::ofcore::OFFramework& framework,
112 const opflex::modb::URI& uri)
113 {
114 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::SecGroup>(framework, CLASS_ID, uri);
115 }
116
128 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroup> > resolve(
129 const opflex::modb::URI& uri)
130 {
131 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::SecGroup>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
132 }
133
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)
156 {
157 return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpSecGroup").addElement(gbpSecGroupName).build());
158 }
159
177 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroup> > resolve(
178 const std::string& policySpaceName,
179 const std::string& gbpSecGroupName)
180 {
181 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSecGroupName);
182 }
183
195 boost::optional<OF_SHARED_PTR<modelgbp::epdr::EndPointFromSecGroupRTgt> > resolveEpdrEndPointFromSecGroupRTgt(
196 const std::string& epdrEndPointFromSecGroupRTgtSource)
197 {
198 return modelgbp::epdr::EndPointFromSecGroupRTgt::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("EpdrEndPointFromSecGroupRTgt").addElement(epdrEndPointFromSecGroupRTgtSource).build());
199 }
200
213 OF_SHARED_PTR<modelgbp::epdr::EndPointFromSecGroupRTgt> addEpdrEndPointFromSecGroupRTgt(
214 const std::string& epdrEndPointFromSecGroupRTgtSource)
215 {
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()
219 );
220 result->setSource(epdrEndPointFromSecGroupRTgtSource);
221 return result;
222 }
223
238 void resolveEpdrEndPointFromSecGroupRTgt(/* out */ std::vector<OF_SHARED_PTR<modelgbp::epdr::EndPointFromSecGroupRTgt> >& out)
239 {
240 opflex::modb::mointernal::MO::resolveChildren<modelgbp::epdr::EndPointFromSecGroupRTgt>(
241 getFramework(), CLASS_ID, getURI(), 2154135659ul, 107, out);
242 }
243
255 boost::optional<OF_SHARED_PTR<modelgbp::inv::LocalInventoryEpFromSecGroupRTgt> > resolveInvLocalInventoryEpFromSecGroupRTgt(
256 const std::string& invLocalInventoryEpFromSecGroupRTgtSource)
257 {
258 return modelgbp::inv::LocalInventoryEpFromSecGroupRTgt::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("InvLocalInventoryEpFromSecGroupRTgt").addElement(invLocalInventoryEpFromSecGroupRTgtSource).build());
259 }
260
273 OF_SHARED_PTR<modelgbp::inv::LocalInventoryEpFromSecGroupRTgt> addInvLocalInventoryEpFromSecGroupRTgt(
274 const std::string& invLocalInventoryEpFromSecGroupRTgtSource)
275 {
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()
279 );
280 result->setSource(invLocalInventoryEpFromSecGroupRTgtSource);
281 return result;
282 }
283
298 void resolveInvLocalInventoryEpFromSecGroupRTgt(/* out */ std::vector<OF_SHARED_PTR<modelgbp::inv::LocalInventoryEpFromSecGroupRTgt> >& out)
299 {
300 opflex::modb::mointernal::MO::resolveChildren<modelgbp::inv::LocalInventoryEpFromSecGroupRTgt>(
301 getFramework(), CLASS_ID, getURI(), 2154135673ul, 121, out);
302 }
303
315 boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroupSubject> > resolveGbpSecGroupSubject(
316 const std::string& gbpSecGroupSubjectName)
317 {
318 return modelgbp::gbp::SecGroupSubject::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpSecGroupSubject").addElement(gbpSecGroupSubjectName).build());
319 }
320
333 OF_SHARED_PTR<modelgbp::gbp::SecGroupSubject> addGbpSecGroupSubject(
334 const std::string& gbpSecGroupSubjectName)
335 {
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()
339 );
340 result->setName(gbpSecGroupSubjectName);
341 return result;
342 }
343
358 void resolveGbpSecGroupSubject(/* out */ std::vector<OF_SHARED_PTR<modelgbp::gbp::SecGroupSubject> >& out)
359 {
360 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::SecGroupSubject>(
361 getFramework(), CLASS_ID, getURI(), 2154135756ul, 204, out);
362 }
363
372 void remove()
373 {
374 getTLMutator().remove(CLASS_ID, getURI());
375 }
376
387 static void remove(opflex::ofcore::OFFramework& framework,
388 const opflex::modb::URI& uri)
389 {
390 MO::remove(framework, CLASS_ID, uri);
391 }
392
403 static void remove(const opflex::modb::URI& uri)
404 {
405 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
406 }
407
424 static void remove(
425 opflex::ofcore::OFFramework& framework,
426 const std::string& policySpaceName,
427 const std::string& gbpSecGroupName)
428 {
429 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpSecGroup").addElement(gbpSecGroupName).build());
430 }
431
448 static void remove(
449 const std::string& policySpaceName,
450 const std::string& gbpSecGroupName)
451 {
452 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSecGroupName);
453 }
454
466 static void registerListener(
467 opflex::ofcore::OFFramework& framework,
468 opflex::modb::ObjectListener* listener)
469 {
470 opflex::modb::mointernal
471 ::MO::registerListener(framework, listener, CLASS_ID);
472 }
473
485 static void registerListener(
486 opflex::modb::ObjectListener* listener)
487 {
488 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
489 }
490
498 opflex::ofcore::OFFramework& framework,
499 opflex::modb::ObjectListener* listener)
500 {
501 opflex::modb::mointernal
502 ::MO::unregisterListener(framework, listener, CLASS_ID);
503 }
504
512 opflex::modb::ObjectListener* listener)
513 {
514 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
515 }
516
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) { }
526}; // class SecGroup
527
528} // namespace gbp
529} // namespace modelgbp
530#endif // GI_GBP_SECGROUP_HPP
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 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
Definition SecGroup.hpp:35
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 remove()
Remove this instance using the currently-active mutator.
Definition SecGroup.hpp:372
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition SecGroup.hpp:56
static void remove(const opflex::modb::URI &uri)
Remove the SecGroup object with the specified URI using the currently-active mutator and the default ...
Definition SecGroup.hpp:403
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
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
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
modelgbp::gbp::SecGroup & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition SecGroup.hpp:81
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition SecGroup.hpp:511
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
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
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
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 const opflex::modb::class_id_t CLASS_ID
The unique class ID for SecGroup.
Definition SecGroup.hpp:41
static void remove(const std::string &policySpaceName, const std::string &gbpSecGroupName)
Remove the SecGroup object with the specified path elements from the managed object store using the d...
Definition SecGroup.hpp:448
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
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
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
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
bool isNameSet()
Check whether name has been set.
Definition SecGroup.hpp:47
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition SecGroup.hpp:497
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 void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the SecGroup object with the specified URI using the currently-active mutator.
Definition SecGroup.hpp:387
static void remove(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpSecGroupName)
Remove the SecGroup object with the specified path elements from the managed object store.
Definition SecGroup.hpp:424
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
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
modelgbp::gbp::SecGroup & unsetName()
Unset name in the currently-active mutator.
Definition SecGroup.hpp:93
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
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 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
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12