modelgbp Generated OpFlex Model 1.7.0
LocalL3Ep.hpp
1
10#pragma once
11#ifndef GI_EPDR_LOCALL3EP_HPP
12#define GI_EPDR_LOCALL3EP_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 = 110;
42
47 bool isIpSet()
48 {
49 return getObjectInstance().isSet(3604483ul, opflex::modb::PropertyInfo::STRING);
50 }
51
56 boost::optional<const std::string&> getIp()
57 {
58 if (isIpSet())
59 return getObjectInstance().getString(3604483ul);
60 return boost::none;
61 }
62
68 const std::string& getIp(const std::string& defaultValue)
69 {
70 return getIp().get_value_or(defaultValue);
71 }
72
81 modelgbp::epdr::LocalL3Ep& setIp(const std::string& newValue)
82 {
83 getTLMutator().modify(getClassId(), getURI())->setString(3604483ul, newValue);
84 return *this;
85 }
86
94 {
95 getTLMutator().modify(getClassId(), getURI())->unset(3604483ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
96 return *this;
97 }
98
103 bool isMacSet()
104 {
105 return getObjectInstance().isSet(3604482ul, opflex::modb::PropertyInfo::MAC);
106 }
107
112 boost::optional<const opflex::modb::MAC&> getMac()
113 {
114 if (isMacSet())
115 return getObjectInstance().getMAC(3604482ul);
116 return boost::none;
117 }
118
124 const opflex::modb::MAC& getMac(const opflex::modb::MAC& defaultValue)
125 {
126 return getMac().get_value_or(defaultValue);
127 }
128
137 modelgbp::epdr::LocalL3Ep& setMac(const opflex::modb::MAC& newValue)
138 {
139 getTLMutator().modify(getClassId(), getURI())->setMAC(3604482ul, newValue);
140 return *this;
141 }
142
150 {
151 getTLMutator().modify(getClassId(), getURI())->unset(3604482ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
152 return *this;
153 }
154
160 {
161 return getObjectInstance().isSet(3604481ul, opflex::modb::PropertyInfo::STRING);
162 }
163
168 boost::optional<const std::string&> getUuid()
169 {
170 if (isUuidSet())
171 return getObjectInstance().getString(3604481ul);
172 return boost::none;
173 }
174
180 const std::string& getUuid(const std::string& defaultValue)
181 {
182 return getUuid().get_value_or(defaultValue);
183 }
184
193 modelgbp::epdr::LocalL3Ep& setUuid(const std::string& newValue)
194 {
195 getTLMutator().modify(getClassId(), getURI())->setString(3604481ul, newValue);
196 return *this;
197 }
198
206 {
207 getTLMutator().modify(getClassId(), getURI())->unset(3604481ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
208 return *this;
209 }
210
222 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL3Ep> > resolve(
223 opflex::ofcore::OFFramework& framework,
224 const opflex::modb::URI& uri)
225 {
226 return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL3Ep>(framework, CLASS_ID, uri);
227 }
228
240 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL3Ep> > resolve(
241 const opflex::modb::URI& uri)
242 {
243 return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL3Ep>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
244 }
245
262 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL3Ep> > resolve(
263 opflex::ofcore::OFFramework& framework,
264 const std::string& epdrLocalL3EpUuid)
265 {
266 return resolve(framework,opflex::modb::URIBuilder().addElement("EpdrL3Discovered").addElement("EpdrLocalL3Ep").addElement(epdrLocalL3EpUuid).build());
267 }
268
284 static boost::optional<OF_SHARED_PTR<modelgbp::epdr::LocalL3Ep> > resolve(
285 const std::string& epdrLocalL3EpUuid)
286 {
287 return resolve(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL3EpUuid);
288 }
289
299 boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtx> > resolveGbpeEpgMappingCtx(
300 )
301 {
302 return modelgbp::gbpe::EpgMappingCtx::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeEpgMappingCtx").build());
303 }
304
315 OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtx> addGbpeEpgMappingCtx(
316 )
317 {
318 OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtx> result = addChild<modelgbp::gbpe::EpgMappingCtx>(
319 CLASS_ID, getURI(), 2151088149ul, 21,
320 opflex::modb::URIBuilder(getURI()).addElement("GbpeEpgMappingCtx").build()
321 );
322 return result;
323 }
324
334 boost::optional<OF_SHARED_PTR<modelgbp::epdr::EndPointToGroupRSrc> > resolveEpdrEndPointToGroupRSrc(
335 )
336 {
337 return modelgbp::epdr::EndPointToGroupRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("EpdrEndPointToGroupRSrc").build());
338 }
339
350 OF_SHARED_PTR<modelgbp::epdr::EndPointToGroupRSrc> addEpdrEndPointToGroupRSrc(
351 )
352 {
353 OF_SHARED_PTR<modelgbp::epdr::EndPointToGroupRSrc> result = addChild<modelgbp::epdr::EndPointToGroupRSrc>(
354 CLASS_ID, getURI(), 2151088231ul, 103,
355 opflex::modb::URIBuilder(getURI()).addElement("EpdrEndPointToGroupRSrc").build()
356 );
357 return result;
358 }
359
373 boost::optional<OF_SHARED_PTR<modelgbp::epdr::EndPointToSecGroupRSrc> > resolveEpdrEndPointToSecGroupRSrc(
374 const std::string& epdrEndPointToSecGroupRSrcTargetName)
375 {
376 opflex::modb::class_id_t epdrEndPointToSecGroupRSrcTargetClass = 203;
377 return modelgbp::epdr::EndPointToSecGroupRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("EpdrEndPointToSecGroupRSrc").addElement(epdrEndPointToSecGroupRSrcTargetClass).addElement(epdrEndPointToSecGroupRSrcTargetName).build());
378 }
379
394 OF_SHARED_PTR<modelgbp::epdr::EndPointToSecGroupRSrc> addEpdrEndPointToSecGroupRSrc(
395 const std::string& epdrEndPointToSecGroupRSrcTargetName)
396 {
397 opflex::modb::class_id_t epdrEndPointToSecGroupRSrcTargetClass = 203;
398 OF_SHARED_PTR<modelgbp::epdr::EndPointToSecGroupRSrc> result = addChild<modelgbp::epdr::EndPointToSecGroupRSrc>(
399 CLASS_ID, getURI(), 2151088234ul, 106,
400 opflex::modb::URIBuilder(getURI()).addElement("EpdrEndPointToSecGroupRSrc").addElement(epdrEndPointToSecGroupRSrcTargetClass).addElement(epdrEndPointToSecGroupRSrcTargetName).build()
401 );
402 result->setTargetSecGroup(opflex::modb::URI(epdrEndPointToSecGroupRSrcTargetName));
403 return result;
404 }
405
420 void resolveEpdrEndPointToSecGroupRSrc(/* out */ std::vector<OF_SHARED_PTR<modelgbp::epdr::EndPointToSecGroupRSrc> >& out)
421 {
422 opflex::modb::mointernal::MO::resolveChildren<modelgbp::epdr::EndPointToSecGroupRSrc>(
423 getFramework(), CLASS_ID, getURI(), 2151088234ul, 106, out);
424 }
425
434 void remove()
435 {
436 getTLMutator().remove(CLASS_ID, getURI());
437 }
438
449 static void remove(opflex::ofcore::OFFramework& framework,
450 const opflex::modb::URI& uri)
451 {
452 MO::remove(framework, CLASS_ID, uri);
453 }
454
465 static void remove(const opflex::modb::URI& uri)
466 {
467 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
468 }
469
484 static void remove(
485 opflex::ofcore::OFFramework& framework,
486 const std::string& epdrLocalL3EpUuid)
487 {
488 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("EpdrL3Discovered").addElement("EpdrLocalL3Ep").addElement(epdrLocalL3EpUuid).build());
489 }
490
505 static void remove(
506 const std::string& epdrLocalL3EpUuid)
507 {
508 remove(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL3EpUuid);
509 }
510
522 static void registerListener(
523 opflex::ofcore::OFFramework& framework,
524 opflex::modb::ObjectListener* listener)
525 {
526 opflex::modb::mointernal
527 ::MO::registerListener(framework, listener, CLASS_ID);
528 }
529
541 static void registerListener(
542 opflex::modb::ObjectListener* listener)
543 {
544 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
545 }
546
554 opflex::ofcore::OFFramework& framework,
555 opflex::modb::ObjectListener* listener)
556 {
557 opflex::modb::mointernal
558 ::MO::unregisterListener(framework, listener, CLASS_ID);
559 }
560
568 opflex::modb::ObjectListener* listener)
569 {
570 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
571 }
572
578 opflex::ofcore::OFFramework& framework,
579 const opflex::modb::URI& uri,
580 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
581 : MO(framework, CLASS_ID, uri, oi) { }
582}; // class LocalL3Ep
583
584} // namespace epdr
585} // namespace modelgbp
586#endif // GI_EPDR_LOCALL3EP_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 LocalL3Ep.hpp:35
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 LocalL3Ep.hpp:315
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 LocalL3Ep.hpp:124
static void remove(opflex::ofcore::OFFramework &framework, const std::string &epdrLocalL3EpUuid)
Remove the LocalL3Ep object with the specified path elements from the managed object store.
Definition LocalL3Ep.hpp:484
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition LocalL3Ep.hpp:168
modelgbp::epdr::LocalL3Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition LocalL3Ep.hpp:149
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 LocalL3Ep.hpp:522
modelgbp::epdr::LocalL3Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition LocalL3Ep.hpp:137
modelgbp::epdr::LocalL3Ep & setIp(const std::string &newValue)
Set ip to the specified value in the currently-active mutator.
Definition LocalL3Ep.hpp:81
void remove()
Remove this instance using the currently-active mutator.
Definition LocalL3Ep.hpp:434
modelgbp::epdr::LocalL3Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition LocalL3Ep.hpp:205
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::LocalL3Ep > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of LocalL3Ep from the managed object store using the default framework instance.
Definition LocalL3Ep.hpp:240
bool isMacSet()
Check whether mac has been set.
Definition LocalL3Ep.hpp:103
boost::optional< const std::string & > getIp()
Get the value of ip if it has been set.
Definition LocalL3Ep.hpp:56
modelgbp::epdr::LocalL3Ep & unsetIp()
Unset ip in the currently-active mutator.
Definition LocalL3Ep.hpp:93
static void remove(const std::string &epdrLocalL3EpUuid)
Remove the LocalL3Ep object with the specified path elements from the managed object store using the ...
Definition LocalL3Ep.hpp:505
boost::optional< OF_SHARED_PTR< modelgbp::epdr::EndPointToGroupRSrc > > resolveEpdrEndPointToGroupRSrc()
Retrieve the child object with the specified naming properties.
Definition LocalL3Ep.hpp:334
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::LocalL3Ep > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalL3Ep from the managed object store.
Definition LocalL3Ep.hpp:222
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 LocalL3Ep.hpp:394
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::LocalL3Ep > > resolve(const std::string &epdrLocalL3EpUuid)
Retrieve an instance of LocalL3Ep from the default managed object store by constructing its URI from ...
Definition LocalL3Ep.hpp:284
bool isUuidSet()
Check whether uuid has been set.
Definition LocalL3Ep.hpp:159
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the LocalL3Ep object with the specified URI using the currently-active mutator.
Definition LocalL3Ep.hpp:449
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtx > > resolveGbpeEpgMappingCtx()
Retrieve the child object with the specified naming properties.
Definition LocalL3Ep.hpp:299
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 LocalL3Ep.hpp:420
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition LocalL3Ep.hpp:553
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition LocalL3Ep.hpp:567
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 LocalL3Ep.hpp:541
LocalL3Ep(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of LocalL3Ep.
Definition LocalL3Ep.hpp:577
bool isIpSet()
Check whether ip has been set.
Definition LocalL3Ep.hpp:47
static void remove(const opflex::modb::URI &uri)
Remove the LocalL3Ep object with the specified URI using the currently-active mutator and the default...
Definition LocalL3Ep.hpp:465
const std::string & getIp(const std::string &defaultValue)
Get the value of ip if set, otherwise the value of default passed in.
Definition LocalL3Ep.hpp:68
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 LocalL3Ep.hpp:350
static boost::optional< OF_SHARED_PTR< modelgbp::epdr::LocalL3Ep > > resolve(opflex::ofcore::OFFramework &framework, const std::string &epdrLocalL3EpUuid)
Retrieve an instance of LocalL3Ep from the managed object store by constructing its URI from the path...
Definition LocalL3Ep.hpp:262
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition LocalL3Ep.hpp:180
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for LocalL3Ep.
Definition LocalL3Ep.hpp:41
boost::optional< OF_SHARED_PTR< modelgbp::epdr::EndPointToSecGroupRSrc > > resolveEpdrEndPointToSecGroupRSrc(const std::string &epdrEndPointToSecGroupRSrcTargetName)
Retrieve the child object with the specified naming properties.
Definition LocalL3Ep.hpp:373
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition LocalL3Ep.hpp:112
modelgbp::epdr::LocalL3Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition LocalL3Ep.hpp:193
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