modelgbp Generated OpFlex Model 1.7.0
LocalL2Ep.hpp
1
10#pragma once
11#ifndef GI_EPDR_LOCALL2EP_HPP
12#define GI_EPDR_LOCALL2EP_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(gbpe/EpgMappingCtx)
19 */
20#include "modelgbp/gbpe/EpgMappingCtx.hpp"
21/*
22 * contains: item:mclass(epdr/EndPointToGroupRSrc)
23 */
24#include "modelgbp/epdr/EndPointToGroupRSrc.hpp"
25/*
26 * contains: item:mclass(epdr/EndPointToSecGroupRSrc)
27 */
28#include "modelgbp/epdr/EndPointToSecGroupRSrc.hpp"
29
30namespace modelgbp {
31namespace epdr {
32
34 : public opflex::modb::mointernal::MO
35{
36public:
37
41 static const opflex::modb::class_id_t CLASS_ID = 109;
42
47 bool isMacSet()
48 {
49 return getObjectInstance().isSet(3571714ul, opflex::modb::PropertyInfo::MAC);
50 }
51
56 boost::optional<const opflex::modb::MAC&> getMac()
57 {
58 if (isMacSet())
59 return getObjectInstance().getMAC(3571714ul);
60 return boost::none;
61 }
62
68 const opflex::modb::MAC& getMac(const opflex::modb::MAC& defaultValue)
69 {
70 return getMac().get_value_or(defaultValue);
71 }
72
81 modelgbp::epdr::LocalL2Ep& setMac(const opflex::modb::MAC& newValue)
82 {
83 getTLMutator().modify(getClassId(), getURI())->setMAC(3571714ul, newValue);
84 return *this;
85 }
86
94 {
95 getTLMutator().modify(getClassId(), getURI())->unset(3571714ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
96 return *this;
97 }
98
104 {
105 return getObjectInstance().isSet(3571713ul, opflex::modb::PropertyInfo::STRING);
106 }
107
112 boost::optional<const std::string&> getUuid()
113 {
114 if (isUuidSet())
115 return getObjectInstance().getString(3571713ul);
116 return boost::none;
117 }
118
124 const std::string& getUuid(const std::string& defaultValue)
125 {
126 return getUuid().get_value_or(defaultValue);
127 }
128
137 modelgbp::epdr::LocalL2Ep& setUuid(const std::string& newValue)
138 {
139 getTLMutator().modify(getClassId(), getURI())->setString(3571713ul, newValue);
140 return *this;
141 }
142
150 {
151 getTLMutator().modify(getClassId(), getURI())->unset(3571713ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
152 return *this;
153 }
154
166 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL2Ep> > resolve(
167 opflex::ofcore::OFFramework& framework,
168 const opflex::modb::URI& uri)
169 {
170 return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL2Ep>(framework, CLASS_ID, uri);
171 }
172
184 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL2Ep> > resolve(
185 const opflex::modb::URI& uri)
186 {
187 return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL2Ep>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
188 }
189
206 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL2Ep> > resolve(
207 opflex::ofcore::OFFramework& framework,
208 const std::string& epdrLocalL2EpUuid)
209 {
210 return resolve(framework,opflex::modb::URIBuilder().addElement("EpdrL2Discovered").addElement("EpdrLocalL2Ep").addElement(epdrLocalL2EpUuid).build());
211 }
212
228 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL2Ep> > resolve(
229 const std::string& epdrLocalL2EpUuid)
230 {
231 return resolve(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL2EpUuid);
232 }
233
243 boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtx> > resolveGbpeEpgMappingCtx(
244 )
245 {
246 return modelgbp::gbpe::EpgMappingCtx::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeEpgMappingCtx").build());
247 }
248
259 OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtx> addGbpeEpgMappingCtx(
260 )
261 {
262 OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtx> result = addChild<modelgbp::gbpe::EpgMappingCtx>(
263 CLASS_ID, getURI(), 2151055381ul, 21,
264 opflex::modb::URIBuilder(getURI()).addElement("GbpeEpgMappingCtx").build()
265 );
266 return result;
267 }
268
278 boost::optional<OF_SHARED_PTR<modelgbp::epdr::EndPointToGroupRSrc> > resolveEpdrEndPointToGroupRSrc(
279 )
280 {
281 return modelgbp::epdr::EndPointToGroupRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("EpdrEndPointToGroupRSrc").build());
282 }
283
294 OF_SHARED_PTR<modelgbp::epdr::EndPointToGroupRSrc> addEpdrEndPointToGroupRSrc(
295 )
296 {
297 OF_SHARED_PTR<modelgbp::epdr::EndPointToGroupRSrc> result = addChild<modelgbp::epdr::EndPointToGroupRSrc>(
298 CLASS_ID, getURI(), 2151055463ul, 103,
299 opflex::modb::URIBuilder(getURI()).addElement("EpdrEndPointToGroupRSrc").build()
300 );
301 return result;
302 }
303
317 boost::optional<OF_SHARED_PTR<modelgbp::epdr::EndPointToSecGroupRSrc> > resolveEpdrEndPointToSecGroupRSrc(
318 const std::string& epdrEndPointToSecGroupRSrcTargetName)
319 {
320 opflex::modb::class_id_t epdrEndPointToSecGroupRSrcTargetClass = 203;
321 return modelgbp::epdr::EndPointToSecGroupRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("EpdrEndPointToSecGroupRSrc").addElement(epdrEndPointToSecGroupRSrcTargetClass).addElement(epdrEndPointToSecGroupRSrcTargetName).build());
322 }
323
338 OF_SHARED_PTR<modelgbp::epdr::EndPointToSecGroupRSrc> addEpdrEndPointToSecGroupRSrc(
339 const std::string& epdrEndPointToSecGroupRSrcTargetName)
340 {
341 opflex::modb::class_id_t epdrEndPointToSecGroupRSrcTargetClass = 203;
342 OF_SHARED_PTR<modelgbp::epdr::EndPointToSecGroupRSrc> result = addChild<modelgbp::epdr::EndPointToSecGroupRSrc>(
343 CLASS_ID, getURI(), 2151055466ul, 106,
344 opflex::modb::URIBuilder(getURI()).addElement("EpdrEndPointToSecGroupRSrc").addElement(epdrEndPointToSecGroupRSrcTargetClass).addElement(epdrEndPointToSecGroupRSrcTargetName).build()
345 );
346 result->setTargetSecGroup(opflex::modb::URI(epdrEndPointToSecGroupRSrcTargetName));
347 return result;
348 }
349
364 void resolveEpdrEndPointToSecGroupRSrc(/* out */ std::vector<OF_SHARED_PTR<modelgbp::epdr::EndPointToSecGroupRSrc> >& out)
365 {
366 opflex::modb::mointernal::MO::resolveChildren<modelgbp::epdr::EndPointToSecGroupRSrc>(
367 getFramework(), CLASS_ID, getURI(), 2151055466ul, 106, out);
368 }
369
378 void remove()
379 {
380 getTLMutator().remove(CLASS_ID, getURI());
381 }
382
393 static void remove(opflex::ofcore::OFFramework& framework,
394 const opflex::modb::URI& uri)
395 {
396 MO::remove(framework, CLASS_ID, uri);
397 }
398
409 static void remove(const opflex::modb::URI& uri)
410 {
411 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
412 }
413
428 static void remove(
429 opflex::ofcore::OFFramework& framework,
430 const std::string& epdrLocalL2EpUuid)
431 {
432 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("EpdrL2Discovered").addElement("EpdrLocalL2Ep").addElement(epdrLocalL2EpUuid).build());
433 }
434
449 static void remove(
450 const std::string& epdrLocalL2EpUuid)
451 {
452 remove(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL2EpUuid);
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 LocalL2Ep
527
528} // namespace epdr
529} // namespace modelgbp
530#endif // GI_EPDR_LOCALL2EP_HPP
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::EndPointToGroupRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EndPointToGroupRSrc from the managed object store.
Definition EndPointToGroupRSrc.hpp:257
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::EndPointToSecGroupRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EndPointToSecGroupRSrc from the managed object store.
Definition EndPointToSecGroupRSrc.hpp:257
Definition LocalL2Ep.hpp:35
modelgbp::epdr::LocalL2Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition LocalL2Ep.hpp:149
modelgbp::epdr::LocalL2Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition LocalL2Ep.hpp:81
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtx > > resolveGbpeEpgMappingCtx()
Retrieve the child object with the specified naming properties.
Definition LocalL2Ep.hpp:243
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 LocalL2Ep.hpp:485
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the LocalL2Ep object with the specified URI using the currently-active mutator.
Definition LocalL2Ep.hpp:393
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition LocalL2Ep.hpp:56
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition LocalL2Ep.hpp:511
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for LocalL2Ep.
Definition LocalL2Ep.hpp:41
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::LocalL2Ep > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalL2Ep from the managed object store.
Definition LocalL2Ep.hpp:166
boost::optional< OF_SHARED_PTR< modelgbp::epdr::EndPointToSecGroupRSrc > > resolveEpdrEndPointToSecGroupRSrc(const std::string &epdrEndPointToSecGroupRSrcTargetName)
Retrieve the child object with the specified naming properties.
Definition LocalL2Ep.hpp:317
bool isUuidSet()
Check whether uuid has been set.
Definition LocalL2Ep.hpp:103
static void remove(const opflex::modb::URI &uri)
Remove the LocalL2Ep object with the specified URI using the currently-active mutator and the default...
Definition LocalL2Ep.hpp:409
static void remove(const std::string &epdrLocalL2EpUuid)
Remove the LocalL2Ep object with the specified path elements from the managed object store using the ...
Definition LocalL2Ep.hpp:449
void remove()
Remove this instance using the currently-active mutator.
Definition LocalL2Ep.hpp:378
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 LocalL2Ep.hpp:466
OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtx > addGbpeEpgMappingCtx()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition LocalL2Ep.hpp:259
boost::optional< OF_SHARED_PTR< modelgbp::epdr::EndPointToGroupRSrc > > resolveEpdrEndPointToGroupRSrc()
Retrieve the child object with the specified naming properties.
Definition LocalL2Ep.hpp:278
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition LocalL2Ep.hpp:112
LocalL2Ep(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of LocalL2Ep.
Definition LocalL2Ep.hpp:521
const opflex::modb::MAC & getMac(const opflex::modb::MAC &defaultValue)
Get the value of mac if set, otherwise the value of default passed in.
Definition LocalL2Ep.hpp:68
bool isMacSet()
Check whether mac has been set.
Definition LocalL2Ep.hpp:47
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition LocalL2Ep.hpp:497
OF_SHARED_PTR< modelgbp::epdr::EndPointToSecGroupRSrc > addEpdrEndPointToSecGroupRSrc(const std::string &epdrEndPointToSecGroupRSrcTargetName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition LocalL2Ep.hpp:338
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::LocalL2Ep > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of LocalL2Ep from the managed object store using the default framework instance.
Definition LocalL2Ep.hpp:184
modelgbp::epdr::LocalL2Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition LocalL2Ep.hpp:137
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::LocalL2Ep > > resolve(const std::string &epdrLocalL2EpUuid)
Retrieve an instance of LocalL2Ep from the default managed object store by constructing its URI from ...
Definition LocalL2Ep.hpp:228
OF_SHARED_PTR< modelgbp::epdr::EndPointToGroupRSrc > addEpdrEndPointToGroupRSrc()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition LocalL2Ep.hpp:294
void resolveEpdrEndPointToSecGroupRSrc(std::vector< OF_SHARED_PTR< modelgbp::epdr::EndPointToSecGroupRSrc > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::epdr::EndPointToSecGroupRSrc.
Definition LocalL2Ep.hpp:364
modelgbp::epdr::LocalL2Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition LocalL2Ep.hpp:93
static void remove(opflex::ofcore::OFFramework &framework, const std::string &epdrLocalL2EpUuid)
Remove the LocalL2Ep object with the specified path elements from the managed object store.
Definition LocalL2Ep.hpp:428
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::LocalL2Ep > > resolve(opflex::ofcore::OFFramework &framework, const std::string &epdrLocalL2EpUuid)
Retrieve an instance of LocalL2Ep from the managed object store by constructing its URI from the path...
Definition LocalL2Ep.hpp:206
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition LocalL2Ep.hpp:124
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtx > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpgMappingCtx from the managed object store.
Definition EpgMappingCtx.hpp:50
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12