modelgbp Generated OpFlex Model 1.7.0
TunnelEp.hpp
1
10#pragma once
11#ifndef GI_GBPE_TUNNELEP_HPP
12#define GI_GBPE_TUNNELEP_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/Attestation)
19 */
20#include "modelgbp/gbpe/Attestation.hpp"
21
22namespace modelgbp {
23namespace gbpe {
24
26 : public opflex::modb::mointernal::MO
27{
28public:
29
33 static const opflex::modb::class_id_t CLASS_ID = 45;
34
40 {
41 return getObjectInstance().isSet(1474565ul, opflex::modb::PropertyInfo::U64);
42 }
43
48 boost::optional<uint32_t> getEncapId()
49 {
50 if (isEncapIdSet())
51 return (uint32_t)getObjectInstance().getUInt64(1474565ul);
52 return boost::none;
53 }
54
60 uint32_t getEncapId(uint32_t defaultValue)
61 {
62 return getEncapId().get_value_or(defaultValue);
63 }
64
74 {
75 getTLMutator().modify(getClassId(), getURI())->setUInt64(1474565ul, newValue);
76 return *this;
77 }
78
86 {
87 getTLMutator().modify(getClassId(), getURI())->unset(1474565ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
88 return *this;
89 }
90
96 {
97 return getObjectInstance().isSet(1474564ul, opflex::modb::PropertyInfo::ENUM8);
98 }
99
104 boost::optional<const uint8_t> getEncapType()
105 {
106 if (isEncapTypeSet())
107 return (const uint8_t)getObjectInstance().getUInt64(1474564ul);
108 return boost::none;
109 }
110
116 const uint8_t getEncapType(const uint8_t defaultValue)
117 {
118 return getEncapType().get_value_or(defaultValue);
119 }
120
129 modelgbp::gbpe::TunnelEp& setEncapType(const uint8_t newValue)
130 {
131 getTLMutator().modify(getClassId(), getURI())->setUInt64(1474564ul, newValue);
132 return *this;
133 }
134
142 {
143 getTLMutator().modify(getClassId(), getURI())->unset(1474564ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
144 return *this;
145 }
146
151 bool isMacSet()
152 {
153 return getObjectInstance().isSet(1474563ul, opflex::modb::PropertyInfo::MAC);
154 }
155
160 boost::optional<const opflex::modb::MAC&> getMac()
161 {
162 if (isMacSet())
163 return getObjectInstance().getMAC(1474563ul);
164 return boost::none;
165 }
166
172 const opflex::modb::MAC& getMac(const opflex::modb::MAC& defaultValue)
173 {
174 return getMac().get_value_or(defaultValue);
175 }
176
185 modelgbp::gbpe::TunnelEp& setMac(const opflex::modb::MAC& newValue)
186 {
187 getTLMutator().modify(getClassId(), getURI())->setMAC(1474563ul, newValue);
188 return *this;
189 }
190
198 {
199 getTLMutator().modify(getClassId(), getURI())->unset(1474563ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
200 return *this;
201 }
202
208 {
209 return getObjectInstance().isSet(1474562ul, opflex::modb::PropertyInfo::STRING);
210 }
211
216 boost::optional<const std::string&> getTerminatorIp()
217 {
218 if (isTerminatorIpSet())
219 return getObjectInstance().getString(1474562ul);
220 return boost::none;
221 }
222
228 const std::string& getTerminatorIp(const std::string& defaultValue)
229 {
230 return getTerminatorIp().get_value_or(defaultValue);
231 }
232
241 modelgbp::gbpe::TunnelEp& setTerminatorIp(const std::string& newValue)
242 {
243 getTLMutator().modify(getClassId(), getURI())->setString(1474562ul, newValue);
244 return *this;
245 }
246
254 {
255 getTLMutator().modify(getClassId(), getURI())->unset(1474562ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
256 return *this;
257 }
258
264 {
265 return getObjectInstance().isSet(1474561ul, opflex::modb::PropertyInfo::STRING);
266 }
267
272 boost::optional<const std::string&> getUuid()
273 {
274 if (isUuidSet())
275 return getObjectInstance().getString(1474561ul);
276 return boost::none;
277 }
278
284 const std::string& getUuid(const std::string& defaultValue)
285 {
286 return getUuid().get_value_or(defaultValue);
287 }
288
297 modelgbp::gbpe::TunnelEp& setUuid(const std::string& newValue)
298 {
299 getTLMutator().modify(getClassId(), getURI())->setString(1474561ul, newValue);
300 return *this;
301 }
302
310 {
311 getTLMutator().modify(getClassId(), getURI())->unset(1474561ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
312 return *this;
313 }
314
326 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::TunnelEp> > resolve(
327 opflex::ofcore::OFFramework& framework,
328 const opflex::modb::URI& uri)
329 {
330 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::TunnelEp>(framework, CLASS_ID, uri);
331 }
332
344 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::TunnelEp> > resolve(
345 const opflex::modb::URI& uri)
346 {
347 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::TunnelEp>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
348 }
349
366 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::TunnelEp> > resolve(
367 opflex::ofcore::OFFramework& framework,
368 const std::string& gbpeTunnelEpUuid)
369 {
370 return resolve(framework,opflex::modb::URIBuilder().addElement("GbpeTunnelEpUniverse").addElement("GbpeTunnelEp").addElement(gbpeTunnelEpUuid).build());
371 }
372
388 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::TunnelEp> > resolve(
389 const std::string& gbpeTunnelEpUuid)
390 {
391 return resolve(opflex::ofcore::OFFramework::defaultInstance(),gbpeTunnelEpUuid);
392 }
393
405 boost::optional<OF_SHARED_PTR<modelgbp::gbpe::Attestation> > resolveGbpeAttestation(
406 const std::string& gbpeAttestationName)
407 {
408 return modelgbp::gbpe::Attestation::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeAttestation").addElement(gbpeAttestationName).build());
409 }
410
423 OF_SHARED_PTR<modelgbp::gbpe::Attestation> addGbpeAttestation(
424 const std::string& gbpeAttestationName)
425 {
426 OF_SHARED_PTR<modelgbp::gbpe::Attestation> result = addChild<modelgbp::gbpe::Attestation>(
427 CLASS_ID, getURI(), 2148958255ul, 47,
428 opflex::modb::URIBuilder(getURI()).addElement("GbpeAttestation").addElement(gbpeAttestationName).build()
429 );
430 result->setName(gbpeAttestationName);
431 return result;
432 }
433
448 void resolveGbpeAttestation(/* out */ std::vector<OF_SHARED_PTR<modelgbp::gbpe::Attestation> >& out)
449 {
450 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::Attestation>(
451 getFramework(), CLASS_ID, getURI(), 2148958255ul, 47, out);
452 }
453
462 void remove()
463 {
464 getTLMutator().remove(CLASS_ID, getURI());
465 }
466
477 static void remove(opflex::ofcore::OFFramework& framework,
478 const opflex::modb::URI& uri)
479 {
480 MO::remove(framework, CLASS_ID, uri);
481 }
482
493 static void remove(const opflex::modb::URI& uri)
494 {
495 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
496 }
497
512 static void remove(
513 opflex::ofcore::OFFramework& framework,
514 const std::string& gbpeTunnelEpUuid)
515 {
516 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("GbpeTunnelEpUniverse").addElement("GbpeTunnelEp").addElement(gbpeTunnelEpUuid).build());
517 }
518
533 static void remove(
534 const std::string& gbpeTunnelEpUuid)
535 {
536 remove(opflex::ofcore::OFFramework::defaultInstance(),gbpeTunnelEpUuid);
537 }
538
550 static void registerListener(
551 opflex::ofcore::OFFramework& framework,
552 opflex::modb::ObjectListener* listener)
553 {
554 opflex::modb::mointernal
555 ::MO::registerListener(framework, listener, CLASS_ID);
556 }
557
569 static void registerListener(
570 opflex::modb::ObjectListener* listener)
571 {
572 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
573 }
574
582 opflex::ofcore::OFFramework& framework,
583 opflex::modb::ObjectListener* listener)
584 {
585 opflex::modb::mointernal
586 ::MO::unregisterListener(framework, listener, CLASS_ID);
587 }
588
596 opflex::modb::ObjectListener* listener)
597 {
598 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
599 }
600
606 opflex::ofcore::OFFramework& framework,
607 const opflex::modb::URI& uri,
608 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
609 : MO(framework, CLASS_ID, uri, oi) { }
610}; // class TunnelEp
611
612} // namespace gbpe
613} // namespace modelgbp
614#endif // GI_GBPE_TUNNELEP_HPP
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::Attestation > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Attestation from the managed object store.
Definition Attestation.hpp:210
Definition TunnelEp.hpp:27
modelgbp::gbpe::TunnelEp & unsetMac()
Unset mac in the currently-active mutator.
Definition TunnelEp.hpp:197
modelgbp::gbpe::TunnelEp & setTerminatorIp(const std::string &newValue)
Set terminatorIp to the specified value in the currently-active mutator.
Definition TunnelEp.hpp:241
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for TunnelEp.
Definition TunnelEp.hpp:33
static void remove(const std::string &gbpeTunnelEpUuid)
Remove the TunnelEp object with the specified path elements from the managed object store using the d...
Definition TunnelEp.hpp:533
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the TunnelEp object with the specified URI using the currently-active mutator.
Definition TunnelEp.hpp:477
modelgbp::gbpe::TunnelEp & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition TunnelEp.hpp:297
static void remove(const opflex::modb::URI &uri)
Remove the TunnelEp object with the specified URI using the currently-active mutator and the default ...
Definition TunnelEp.hpp:493
void resolveGbpeAttestation(std::vector< OF_SHARED_PTR< modelgbp::gbpe::Attestation > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::Attestation.
Definition TunnelEp.hpp:448
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 TunnelEp.hpp:569
static void remove(opflex::ofcore::OFFramework &framework, const std::string &gbpeTunnelEpUuid)
Remove the TunnelEp object with the specified path elements from the managed object store.
Definition TunnelEp.hpp:512
bool isEncapIdSet()
Check whether encapId has been set.
Definition TunnelEp.hpp:39
uint32_t getEncapId(uint32_t defaultValue)
Get the value of encapId if set, otherwise the value of default passed in.
Definition TunnelEp.hpp:60
bool isEncapTypeSet()
Check whether encapType has been set.
Definition TunnelEp.hpp:95
modelgbp::gbpe::TunnelEp & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition TunnelEp.hpp:185
bool isTerminatorIpSet()
Check whether terminatorIp has been set.
Definition TunnelEp.hpp:207
void remove()
Remove this instance using the currently-active mutator.
Definition TunnelEp.hpp:462
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 TunnelEp.hpp:550
modelgbp::gbpe::TunnelEp & unsetEncapId()
Unset encapId in the currently-active mutator.
Definition TunnelEp.hpp:85
modelgbp::gbpe::TunnelEp & unsetEncapType()
Unset encapType in the currently-active mutator.
Definition TunnelEp.hpp:141
boost::optional< const uint8_t > getEncapType()
Get the value of encapType if it has been set.
Definition TunnelEp.hpp:104
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::TunnelEp > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of TunnelEp from the managed object store using the default framework instance.
Definition TunnelEp.hpp:344
TunnelEp(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of TunnelEp.
Definition TunnelEp.hpp:605
const std::string & getTerminatorIp(const std::string &defaultValue)
Get the value of terminatorIp if set, otherwise the value of default passed in.
Definition TunnelEp.hpp:228
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition TunnelEp.hpp:160
OF_SHARED_PTR< modelgbp::gbpe::Attestation > addGbpeAttestation(const std::string &gbpeAttestationName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition TunnelEp.hpp:423
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::Attestation > > resolveGbpeAttestation(const std::string &gbpeAttestationName)
Retrieve the child object with the specified naming properties.
Definition TunnelEp.hpp:405
modelgbp::gbpe::TunnelEp & setEncapId(uint32_t newValue)
Set encapId to the specified value in the currently-active mutator.
Definition TunnelEp.hpp:73
boost::optional< const std::string & > getTerminatorIp()
Get the value of terminatorIp if it has been set.
Definition TunnelEp.hpp:216
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition TunnelEp.hpp:272
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::TunnelEp > > resolve(opflex::ofcore::OFFramework &framework, const std::string &gbpeTunnelEpUuid)
Retrieve an instance of TunnelEp from the managed object store by constructing its URI from the path ...
Definition TunnelEp.hpp:366
boost::optional< uint32_t > getEncapId()
Get the value of encapId if it has been set.
Definition TunnelEp.hpp:48
modelgbp::gbpe::TunnelEp & unsetTerminatorIp()
Unset terminatorIp in the currently-active mutator.
Definition TunnelEp.hpp:253
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::TunnelEp > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of TunnelEp from the managed object store.
Definition TunnelEp.hpp:326
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 TunnelEp.hpp:172
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition TunnelEp.hpp:581
modelgbp::gbpe::TunnelEp & setEncapType(const uint8_t newValue)
Set encapType to the specified value in the currently-active mutator.
Definition TunnelEp.hpp:129
bool isUuidSet()
Check whether uuid has been set.
Definition TunnelEp.hpp:263
modelgbp::gbpe::TunnelEp & unsetUuid()
Unset uuid in the currently-active mutator.
Definition TunnelEp.hpp:309
bool isMacSet()
Check whether mac has been set.
Definition TunnelEp.hpp:151
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition TunnelEp.hpp:284
const uint8_t getEncapType(const uint8_t defaultValue)
Get the value of encapType if set, otherwise the value of default passed in.
Definition TunnelEp.hpp:116
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition TunnelEp.hpp:595
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::TunnelEp > > resolve(const std::string &gbpeTunnelEpUuid)
Retrieve an instance of TunnelEp from the default managed object store by constructing its URI from t...
Definition TunnelEp.hpp:388
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12