modelgbp Generated OpFlex Model  1.2.0
L3Ep.hpp
1 
10 #pragma once
11 #ifndef GI_EPR_L3EP_HPP
12 #define GI_EPR_L3EP_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 /*
22  * contains: item:mclass(span/LocalEpFromEpRTgt)
23  */
24 #include "modelgbp/span/LocalEpFromEpRTgt.hpp"
25 
26 namespace modelgbp {
27 namespace epr {
28 
29 class L3Ep
30  : public opflex::modb::mointernal::MO
31 {
32 public:
33 
37  static const opflex::modb::class_id_t CLASS_ID = 83;
38 
43  bool isContextSet()
44  {
45  return getObjectInstance().isSet(2719749ul, opflex::modb::PropertyInfo::STRING);
46  }
47 
52  boost::optional<const std::string&> getContext()
53  {
54  if (isContextSet())
55  return getObjectInstance().getString(2719749ul);
56  return boost::none;
57  }
58 
64  const std::string& getContext(const std::string& defaultValue)
65  {
66  return getContext().get_value_or(defaultValue);
67  }
68 
77  modelgbp::epr::L3Ep& setContext(const std::string& newValue)
78  {
79  getTLMutator().modify(getClassId(), getURI())->setString(2719749ul, newValue);
80  return *this;
81  }
82 
90  {
91  getTLMutator().modify(getClassId(), getURI())->unset(2719749ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
92  return *this;
93  }
94 
99  bool isGroupSet()
100  {
101  return getObjectInstance().isSet(2719747ul, opflex::modb::PropertyInfo::STRING);
102  }
103 
108  boost::optional<const std::string&> getGroup()
109  {
110  if (isGroupSet())
111  return getObjectInstance().getString(2719747ul);
112  return boost::none;
113  }
114 
120  const std::string& getGroup(const std::string& defaultValue)
121  {
122  return getGroup().get_value_or(defaultValue);
123  }
124 
133  modelgbp::epr::L3Ep& setGroup(const std::string& newValue)
134  {
135  getTLMutator().modify(getClassId(), getURI())->setString(2719747ul, newValue);
136  return *this;
137  }
138 
146  {
147  getTLMutator().modify(getClassId(), getURI())->unset(2719747ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
148  return *this;
149  }
150 
155  bool isIpSet()
156  {
157  return getObjectInstance().isSet(2719748ul, opflex::modb::PropertyInfo::STRING);
158  }
159 
164  boost::optional<const std::string&> getIp()
165  {
166  if (isIpSet())
167  return getObjectInstance().getString(2719748ul);
168  return boost::none;
169  }
170 
176  const std::string& getIp(const std::string& defaultValue)
177  {
178  return getIp().get_value_or(defaultValue);
179  }
180 
189  modelgbp::epr::L3Ep& setIp(const std::string& newValue)
190  {
191  getTLMutator().modify(getClassId(), getURI())->setString(2719748ul, newValue);
192  return *this;
193  }
194 
202  {
203  getTLMutator().modify(getClassId(), getURI())->unset(2719748ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
204  return *this;
205  }
206 
211  bool isMacSet()
212  {
213  return getObjectInstance().isSet(2719746ul, opflex::modb::PropertyInfo::MAC);
214  }
215 
220  boost::optional<const opflex::modb::MAC&> getMac()
221  {
222  if (isMacSet())
223  return getObjectInstance().getMAC(2719746ul);
224  return boost::none;
225  }
226 
232  const opflex::modb::MAC& getMac(const opflex::modb::MAC& defaultValue)
233  {
234  return getMac().get_value_or(defaultValue);
235  }
236 
245  modelgbp::epr::L3Ep& setMac(const opflex::modb::MAC& newValue)
246  {
247  getTLMutator().modify(getClassId(), getURI())->setMAC(2719746ul, newValue);
248  return *this;
249  }
250 
258  {
259  getTLMutator().modify(getClassId(), getURI())->unset(2719746ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
260  return *this;
261  }
262 
267  bool isUuidSet()
268  {
269  return getObjectInstance().isSet(2719745ul, opflex::modb::PropertyInfo::STRING);
270  }
271 
276  boost::optional<const std::string&> getUuid()
277  {
278  if (isUuidSet())
279  return getObjectInstance().getString(2719745ul);
280  return boost::none;
281  }
282 
288  const std::string& getUuid(const std::string& defaultValue)
289  {
290  return getUuid().get_value_or(defaultValue);
291  }
292 
301  modelgbp::epr::L3Ep& setUuid(const std::string& newValue)
302  {
303  getTLMutator().modify(getClassId(), getURI())->setString(2719745ul, newValue);
304  return *this;
305  }
306 
314  {
315  getTLMutator().modify(getClassId(), getURI())->unset(2719745ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
316  return *this;
317  }
318 
330  static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> > resolve(
331  opflex::ofcore::OFFramework& framework,
332  const opflex::modb::URI& uri)
333  {
334  return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Ep>(framework, CLASS_ID, uri);
335  }
336 
348  static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> > resolve(
349  const opflex::modb::URI& uri)
350  {
351  return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Ep>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
352  }
353 
372  static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> > resolve(
373  opflex::ofcore::OFFramework& framework,
374  const std::string& eprL3EpContext,
375  const std::string& eprL3EpIp)
376  {
377  return resolve(framework,opflex::modb::URIBuilder().addElement("EprL3Universe").addElement("EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
378  }
379 
397  static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> > resolve(
398  const std::string& eprL3EpContext,
399  const std::string& eprL3EpIp)
400  {
401  return resolve(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp);
402  }
403 
415  boost::optional<boost::shared_ptr<modelgbp::gbpe::Attestation> > resolveGbpeAttestation(
416  const std::string& gbpeAttestationName)
417  {
418  return modelgbp::gbpe::Attestation::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeAttestation").addElement(gbpeAttestationName).build());
419  }
420 
433  boost::shared_ptr<modelgbp::gbpe::Attestation> addGbpeAttestation(
434  const std::string& gbpeAttestationName)
435  {
436  boost::shared_ptr<modelgbp::gbpe::Attestation> result = addChild<modelgbp::gbpe::Attestation>(
437  CLASS_ID, getURI(), 2150203428ul, 36,
438  opflex::modb::URIBuilder(getURI()).addElement("GbpeAttestation").addElement(gbpeAttestationName).build()
439  );
440  result->setName(gbpeAttestationName);
441  return result;
442  }
443 
458  void resolveGbpeAttestation(/* out */ std::vector<boost::shared_ptr<modelgbp::gbpe::Attestation> >& out)
459  {
460  opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::Attestation>(
461  getFramework(), CLASS_ID, getURI(), 2150203428ul, 36, out);
462  }
463 
475  boost::optional<boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> > resolveSpanLocalEpFromEpRTgt(
476  const std::string& spanLocalEpFromEpRTgtSource)
477  {
478  return modelgbp::span::LocalEpFromEpRTgt::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build());
479  }
480 
493  boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> addSpanLocalEpFromEpRTgt(
494  const std::string& spanLocalEpFromEpRTgtSource)
495  {
496  boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> result = addChild<modelgbp::span::LocalEpFromEpRTgt>(
497  CLASS_ID, getURI(), 2150203446ul, 54,
498  opflex::modb::URIBuilder(getURI()).addElement("SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build()
499  );
500  result->setSource(spanLocalEpFromEpRTgtSource);
501  return result;
502  }
503 
518  void resolveSpanLocalEpFromEpRTgt(/* out */ std::vector<boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> >& out)
519  {
520  opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::LocalEpFromEpRTgt>(
521  getFramework(), CLASS_ID, getURI(), 2150203446ul, 54, out);
522  }
523 
532  void remove()
533  {
534  getTLMutator().remove(CLASS_ID, getURI());
535  }
536 
547  static void remove(opflex::ofcore::OFFramework& framework,
548  const opflex::modb::URI& uri)
549  {
550  MO::remove(framework, CLASS_ID, uri);
551  }
552 
563  static void remove(const opflex::modb::URI& uri)
564  {
565  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
566  }
567 
584  static void remove(
585  opflex::ofcore::OFFramework& framework,
586  const std::string& eprL3EpContext,
587  const std::string& eprL3EpIp)
588  {
589  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("EprL3Universe").addElement("EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
590  }
591 
608  static void remove(
609  const std::string& eprL3EpContext,
610  const std::string& eprL3EpIp)
611  {
612  remove(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp);
613  }
614 
626  static void registerListener(
627  opflex::ofcore::OFFramework& framework,
628  opflex::modb::ObjectListener* listener)
629  {
630  opflex::modb::mointernal
631  ::MO::registerListener(framework, listener, CLASS_ID);
632  }
633 
645  static void registerListener(
646  opflex::modb::ObjectListener* listener)
647  {
648  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
649  }
650 
657  static void unregisterListener(
658  opflex::ofcore::OFFramework& framework,
659  opflex::modb::ObjectListener* listener)
660  {
661  opflex::modb::mointernal
662  ::MO::unregisterListener(framework, listener, CLASS_ID);
663  }
664 
671  static void unregisterListener(
672  opflex::modb::ObjectListener* listener)
673  {
674  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
675  }
676 
682  opflex::ofcore::OFFramework& framework,
683  const opflex::modb::URI& uri,
684  const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
685  : MO(framework, CLASS_ID, uri, oi) { }
686 }; // class L3Ep
687 
688 } // namespace epr
689 } // namespace modelgbp
690 #endif // GI_EPR_L3EP_HPP
bool isIpSet()
Check whether ip has been set.
Definition: L3Ep.hpp:155
bool isContextSet()
Check whether context has been set.
Definition: L3Ep.hpp:43
modelgbp::epr::L3Ep & unsetGroup()
Unset group in the currently-active mutator.
Definition: L3Ep.hpp:145
static boost::optional< boost::shared_ptr< modelgbp::epr::L3Ep > > resolve(opflex::ofcore::OFFramework &framework, const std::string &eprL3EpContext, const std::string &eprL3EpIp)
Retrieve an instance of L3Ep from the managed object store by constructing its URI from the path elem...
Definition: L3Ep.hpp:372
modelgbp::epr::L3Ep & unsetIp()
Unset ip in the currently-active mutator.
Definition: L3Ep.hpp:201
boost::optional< boost::shared_ptr< modelgbp::gbpe::Attestation > > resolveGbpeAttestation(const std::string &gbpeAttestationName)
Retrieve the child object with the specified naming properties.
Definition: L3Ep.hpp:415
bool isUuidSet()
Check whether uuid has been set.
Definition: L3Ep.hpp:267
static boost::optional< boost::shared_ptr< modelgbp::epr::L3Ep > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of L3Ep from the managed object store using the default framework instance...
Definition: L3Ep.hpp:348
const std::string & getGroup(const std::string &defaultValue)
Get the value of group if set, otherwise the value of default passed in.
Definition: L3Ep.hpp:120
boost::optional< const std::string & > getIp()
Get the value of ip if it has been set.
Definition: L3Ep.hpp:164
const std::string & getContext(const std::string &defaultValue)
Get the value of context if set, otherwise the value of default passed in.
Definition: L3Ep.hpp:64
modelgbp::epr::L3Ep & setIp(const std::string &newValue)
Set ip to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:189
modelgbp::epr::L3Ep & setGroup(const std::string &newValue)
Set group to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:133
modelgbp::epr::L3Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:245
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: L3Ep.hpp:671
void resolveSpanLocalEpFromEpRTgt(std::vector< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::span::LocalEpFromEpRTgt.
Definition: L3Ep.hpp:518
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: L3Ep.hpp:657
boost::optional< const std::string & > getContext()
Get the value of context if it has been set.
Definition: L3Ep.hpp:52
bool isGroupSet()
Check whether group has been set.
Definition: L3Ep.hpp:99
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition: L3Ep.hpp:288
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: L3Ep.hpp:276
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: L3Ep.hpp:232
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: L3Ep.hpp:645
modelgbp::epr::L3Ep & setContext(const std::string &newValue)
Set context to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:77
static boost::optional< boost::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
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition: L3Ep.hpp:220
modelgbp::epr::L3Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: L3Ep.hpp:313
boost::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: L3Ep.hpp:433
boost::optional< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > resolveSpanLocalEpFromEpRTgt(const std::string &spanLocalEpFromEpRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: L3Ep.hpp:475
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for L3Ep.
Definition: L3Ep.hpp:37
static boost::optional< boost::shared_ptr< modelgbp::epr::L3Ep > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of L3Ep from the managed object store.
Definition: L3Ep.hpp:330
modelgbp::epr::L3Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition: L3Ep.hpp:257
L3Ep(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of L3Ep.
Definition: L3Ep.hpp:681
const std::string & getIp(const std::string &defaultValue)
Get the value of ip if set, otherwise the value of default passed in.
Definition: L3Ep.hpp:176
modelgbp::epr::L3Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:301
static boost::optional< boost::shared_ptr< modelgbp::epr::L3Ep > > resolve(const std::string &eprL3EpContext, const std::string &eprL3EpIp)
Retrieve an instance of L3Ep from the default managed object store by constructing its URI from the p...
Definition: L3Ep.hpp:397
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: L3Ep.hpp:626
bool isMacSet()
Check whether mac has been set.
Definition: L3Ep.hpp:211
boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > addSpanLocalEpFromEpRTgt(const std::string &spanLocalEpFromEpRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: L3Ep.hpp:493
void resolveGbpeAttestation(std::vector< boost::shared_ptr< modelgbp::gbpe::Attestation > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::Attestation.
Definition: L3Ep.hpp:458
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpFromEpRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalEpFromEpRTgt from the managed object store.
Definition: LocalEpFromEpRTgt.hpp:210
modelgbp::epr::L3Ep & unsetContext()
Unset context in the currently-active mutator.
Definition: L3Ep.hpp:89
boost::optional< const std::string & > getGroup()
Get the value of group if it has been set.
Definition: L3Ep.hpp:108
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
Definition: L3Ep.hpp:29