modelgbp Generated OpFlex Model  1.7.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/ReportedEpAttributeSet)
19  */
20 #include "modelgbp/gbpe/ReportedEpAttributeSet.hpp"
21 /*
22  * contains: item:mclass(gbpe/Attestation)
23  */
24 #include "modelgbp/gbpe/Attestation.hpp"
25 /*
26  * contains: item:mclass(span/LocalEpFromEpRTgt)
27  */
28 #include "modelgbp/span/LocalEpFromEpRTgt.hpp"
29 /*
30  * contains: item:mclass(epr/SecurityGroupContext)
31  */
32 #include "modelgbp/epr/SecurityGroupContext.hpp"
33 
34 namespace modelgbp {
35 namespace epr {
36 
37 class L3Ep
38  : public opflex::modb::mointernal::MO
39 {
40 public:
41 
45  static const opflex::modb::class_id_t CLASS_ID = 101;
46 
51  bool isContextSet()
52  {
53  return getObjectInstance().isSet(3309573ul, opflex::modb::PropertyInfo::STRING);
54  }
55 
60  boost::optional<const std::string&> getContext()
61  {
62  if (isContextSet())
63  return getObjectInstance().getString(3309573ul);
64  return boost::none;
65  }
66 
72  const std::string& getContext(const std::string& defaultValue)
73  {
74  return getContext().get_value_or(defaultValue);
75  }
76 
85  modelgbp::epr::L3Ep& setContext(const std::string& newValue)
86  {
87  getTLMutator().modify(getClassId(), getURI())->setString(3309573ul, newValue);
88  return *this;
89  }
90 
98  {
99  getTLMutator().modify(getClassId(), getURI())->unset(3309573ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
100  return *this;
101  }
102 
107  bool isGroupSet()
108  {
109  return getObjectInstance().isSet(3309571ul, opflex::modb::PropertyInfo::STRING);
110  }
111 
116  boost::optional<const std::string&> getGroup()
117  {
118  if (isGroupSet())
119  return getObjectInstance().getString(3309571ul);
120  return boost::none;
121  }
122 
128  const std::string& getGroup(const std::string& defaultValue)
129  {
130  return getGroup().get_value_or(defaultValue);
131  }
132 
141  modelgbp::epr::L3Ep& setGroup(const std::string& newValue)
142  {
143  getTLMutator().modify(getClassId(), getURI())->setString(3309571ul, newValue);
144  return *this;
145  }
146 
154  {
155  getTLMutator().modify(getClassId(), getURI())->unset(3309571ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
156  return *this;
157  }
158 
163  bool isIpSet()
164  {
165  return getObjectInstance().isSet(3309572ul, opflex::modb::PropertyInfo::STRING);
166  }
167 
172  boost::optional<const std::string&> getIp()
173  {
174  if (isIpSet())
175  return getObjectInstance().getString(3309572ul);
176  return boost::none;
177  }
178 
184  const std::string& getIp(const std::string& defaultValue)
185  {
186  return getIp().get_value_or(defaultValue);
187  }
188 
197  modelgbp::epr::L3Ep& setIp(const std::string& newValue)
198  {
199  getTLMutator().modify(getClassId(), getURI())->setString(3309572ul, newValue);
200  return *this;
201  }
202 
210  {
211  getTLMutator().modify(getClassId(), getURI())->unset(3309572ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
212  return *this;
213  }
214 
219  bool isMacSet()
220  {
221  return getObjectInstance().isSet(3309570ul, opflex::modb::PropertyInfo::MAC);
222  }
223 
228  boost::optional<const opflex::modb::MAC&> getMac()
229  {
230  if (isMacSet())
231  return getObjectInstance().getMAC(3309570ul);
232  return boost::none;
233  }
234 
240  const opflex::modb::MAC& getMac(const opflex::modb::MAC& defaultValue)
241  {
242  return getMac().get_value_or(defaultValue);
243  }
244 
253  modelgbp::epr::L3Ep& setMac(const opflex::modb::MAC& newValue)
254  {
255  getTLMutator().modify(getClassId(), getURI())->setMAC(3309570ul, newValue);
256  return *this;
257  }
258 
266  {
267  getTLMutator().modify(getClassId(), getURI())->unset(3309570ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
268  return *this;
269  }
270 
275  bool isUuidSet()
276  {
277  return getObjectInstance().isSet(3309569ul, opflex::modb::PropertyInfo::STRING);
278  }
279 
284  boost::optional<const std::string&> getUuid()
285  {
286  if (isUuidSet())
287  return getObjectInstance().getString(3309569ul);
288  return boost::none;
289  }
290 
296  const std::string& getUuid(const std::string& defaultValue)
297  {
298  return getUuid().get_value_or(defaultValue);
299  }
300 
309  modelgbp::epr::L3Ep& setUuid(const std::string& newValue)
310  {
311  getTLMutator().modify(getClassId(), getURI())->setString(3309569ul, newValue);
312  return *this;
313  }
314 
322  {
323  getTLMutator().modify(getClassId(), getURI())->unset(3309569ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
324  return *this;
325  }
326 
338  static boost::optional<OF_SHARED_PTR<modelgbp::epr::L3Ep> > resolve(
339  opflex::ofcore::OFFramework& framework,
340  const opflex::modb::URI& uri)
341  {
342  return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Ep>(framework, CLASS_ID, uri);
343  }
344 
356  static boost::optional<OF_SHARED_PTR<modelgbp::epr::L3Ep> > resolve(
357  const opflex::modb::URI& uri)
358  {
359  return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Ep>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
360  }
361 
380  static boost::optional<OF_SHARED_PTR<modelgbp::epr::L3Ep> > resolve(
381  opflex::ofcore::OFFramework& framework,
382  const std::string& eprL3EpContext,
383  const std::string& eprL3EpIp)
384  {
385  return resolve(framework,opflex::modb::URIBuilder().addElement("EprL3Universe").addElement("EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
386  }
387 
405  static boost::optional<OF_SHARED_PTR<modelgbp::epr::L3Ep> > resolve(
406  const std::string& eprL3EpContext,
407  const std::string& eprL3EpIp)
408  {
409  return resolve(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp);
410  }
411 
421  boost::optional<OF_SHARED_PTR<modelgbp::gbpe::ReportedEpAttributeSet> > resolveGbpeReportedEpAttributeSet(
422  )
423  {
424  return modelgbp::gbpe::ReportedEpAttributeSet::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeReportedEpAttributeSet").build());
425  }
426 
437  OF_SHARED_PTR<modelgbp::gbpe::ReportedEpAttributeSet> addGbpeReportedEpAttributeSet(
438  )
439  {
440  OF_SHARED_PTR<modelgbp::gbpe::ReportedEpAttributeSet> result = addChild<modelgbp::gbpe::ReportedEpAttributeSet>(
441  CLASS_ID, getURI(), 2150793254ul, 38,
442  opflex::modb::URIBuilder(getURI()).addElement("GbpeReportedEpAttributeSet").build()
443  );
444  return result;
445  }
446 
458  boost::optional<OF_SHARED_PTR<modelgbp::gbpe::Attestation> > resolveGbpeAttestation(
459  const std::string& gbpeAttestationName)
460  {
461  return modelgbp::gbpe::Attestation::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeAttestation").addElement(gbpeAttestationName).build());
462  }
463 
476  OF_SHARED_PTR<modelgbp::gbpe::Attestation> addGbpeAttestation(
477  const std::string& gbpeAttestationName)
478  {
479  OF_SHARED_PTR<modelgbp::gbpe::Attestation> result = addChild<modelgbp::gbpe::Attestation>(
480  CLASS_ID, getURI(), 2150793263ul, 47,
481  opflex::modb::URIBuilder(getURI()).addElement("GbpeAttestation").addElement(gbpeAttestationName).build()
482  );
483  result->setName(gbpeAttestationName);
484  return result;
485  }
486 
501  void resolveGbpeAttestation(/* out */ std::vector<OF_SHARED_PTR<modelgbp::gbpe::Attestation> >& out)
502  {
503  opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::Attestation>(
504  getFramework(), CLASS_ID, getURI(), 2150793263ul, 47, out);
505  }
506 
518  boost::optional<OF_SHARED_PTR<modelgbp::span::LocalEpFromEpRTgt> > resolveSpanLocalEpFromEpRTgt(
519  const std::string& spanLocalEpFromEpRTgtSource)
520  {
521  return modelgbp::span::LocalEpFromEpRTgt::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build());
522  }
523 
536  OF_SHARED_PTR<modelgbp::span::LocalEpFromEpRTgt> addSpanLocalEpFromEpRTgt(
537  const std::string& spanLocalEpFromEpRTgtSource)
538  {
539  OF_SHARED_PTR<modelgbp::span::LocalEpFromEpRTgt> result = addChild<modelgbp::span::LocalEpFromEpRTgt>(
540  CLASS_ID, getURI(), 2150793287ul, 71,
541  opflex::modb::URIBuilder(getURI()).addElement("SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build()
542  );
543  result->setSource(spanLocalEpFromEpRTgtSource);
544  return result;
545  }
546 
561  void resolveSpanLocalEpFromEpRTgt(/* out */ std::vector<OF_SHARED_PTR<modelgbp::span::LocalEpFromEpRTgt> >& out)
562  {
563  opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::LocalEpFromEpRTgt>(
564  getFramework(), CLASS_ID, getURI(), 2150793287ul, 71, out);
565  }
566 
578  boost::optional<OF_SHARED_PTR<modelgbp::epr::SecurityGroupContext> > resolveEprSecurityGroupContext(
579  const std::string& eprSecurityGroupContextSecGroup)
580  {
581  return modelgbp::epr::SecurityGroupContext::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("EprSecurityGroupContext").addElement(eprSecurityGroupContextSecGroup).build());
582  }
583 
596  OF_SHARED_PTR<modelgbp::epr::SecurityGroupContext> addEprSecurityGroupContext(
597  const std::string& eprSecurityGroupContextSecGroup)
598  {
599  OF_SHARED_PTR<modelgbp::epr::SecurityGroupContext> result = addChild<modelgbp::epr::SecurityGroupContext>(
600  CLASS_ID, getURI(), 2150793314ul, 98,
601  opflex::modb::URIBuilder(getURI()).addElement("EprSecurityGroupContext").addElement(eprSecurityGroupContextSecGroup).build()
602  );
603  result->setSecGroup(eprSecurityGroupContextSecGroup);
604  return result;
605  }
606 
621  void resolveEprSecurityGroupContext(/* out */ std::vector<OF_SHARED_PTR<modelgbp::epr::SecurityGroupContext> >& out)
622  {
623  opflex::modb::mointernal::MO::resolveChildren<modelgbp::epr::SecurityGroupContext>(
624  getFramework(), CLASS_ID, getURI(), 2150793314ul, 98, out);
625  }
626 
635  void remove()
636  {
637  getTLMutator().remove(CLASS_ID, getURI());
638  }
639 
650  static void remove(opflex::ofcore::OFFramework& framework,
651  const opflex::modb::URI& uri)
652  {
653  MO::remove(framework, CLASS_ID, uri);
654  }
655 
666  static void remove(const opflex::modb::URI& uri)
667  {
668  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
669  }
670 
687  static void remove(
688  opflex::ofcore::OFFramework& framework,
689  const std::string& eprL3EpContext,
690  const std::string& eprL3EpIp)
691  {
692  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("EprL3Universe").addElement("EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
693  }
694 
711  static void remove(
712  const std::string& eprL3EpContext,
713  const std::string& eprL3EpIp)
714  {
715  remove(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp);
716  }
717 
729  static void registerListener(
730  opflex::ofcore::OFFramework& framework,
731  opflex::modb::ObjectListener* listener)
732  {
733  opflex::modb::mointernal
734  ::MO::registerListener(framework, listener, CLASS_ID);
735  }
736 
748  static void registerListener(
749  opflex::modb::ObjectListener* listener)
750  {
751  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
752  }
753 
760  static void unregisterListener(
761  opflex::ofcore::OFFramework& framework,
762  opflex::modb::ObjectListener* listener)
763  {
764  opflex::modb::mointernal
765  ::MO::unregisterListener(framework, listener, CLASS_ID);
766  }
767 
774  static void unregisterListener(
775  opflex::modb::ObjectListener* listener)
776  {
777  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
778  }
779 
785  opflex::ofcore::OFFramework& framework,
786  const opflex::modb::URI& uri,
787  const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
788  : MO(framework, CLASS_ID, uri, oi) { }
789 }; // class L3Ep
790 
791 } // namespace epr
792 } // namespace modelgbp
793 #endif // GI_EPR_L3EP_HPP
bool isIpSet()
Check whether ip has been set.
Definition: L3Ep.hpp:163
static boost::optional< OF_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:405
bool isContextSet()
Check whether context has been set.
Definition: L3Ep.hpp:51
modelgbp::epr::L3Ep & unsetGroup()
Unset group in the currently-active mutator.
Definition: L3Ep.hpp:153
static boost::optional< OF_SHARED_PTR< modelgbp::epr::SecurityGroupContext > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SecurityGroupContext from the managed object store.
Definition: SecurityGroupContext.hpp:154
modelgbp::epr::L3Ep & unsetIp()
Unset ip in the currently-active mutator.
Definition: L3Ep.hpp:209
bool isUuidSet()
Check whether uuid has been set.
Definition: L3Ep.hpp:275
boost::optional< OF_SHARED_PTR< modelgbp::epr::SecurityGroupContext > > resolveEprSecurityGroupContext(const std::string &eprSecurityGroupContextSecGroup)
Retrieve the child object with the specified naming properties.
Definition: L3Ep.hpp:578
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:128
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: L3Ep.hpp:501
boost::optional< const std::string & > getIp()
Get the value of ip if it has been set.
Definition: L3Ep.hpp:172
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:72
modelgbp::epr::L3Ep & setIp(const std::string &newValue)
Set ip to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:197
modelgbp::epr::L3Ep & setGroup(const std::string &newValue)
Set group to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:141
modelgbp::epr::L3Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:253
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: L3Ep.hpp:774
static boost::optional< OF_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:356
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::ReportedEpAttributeSet > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of ReportedEpAttributeSet from the managed object store.
Definition: ReportedEpAttributeSet.hpp:46
void resolveSpanLocalEpFromEpRTgt(std::vector< OF_SHARED_PTR< modelgbp::span::LocalEpFromEpRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::span::LocalEpFromEpRTgt.
Definition: L3Ep.hpp:561
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: L3Ep.hpp:760
boost::optional< const std::string & > getContext()
Get the value of context if it has been set.
Definition: L3Ep.hpp:60
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::Attestation > > resolveGbpeAttestation(const std::string &gbpeAttestationName)
Retrieve the child object with the specified naming properties.
Definition: L3Ep.hpp:458
boost::optional< OF_SHARED_PTR< modelgbp::gbpe::ReportedEpAttributeSet > > resolveGbpeReportedEpAttributeSet()
Retrieve the child object with the specified naming properties.
Definition: L3Ep.hpp:421
bool isGroupSet()
Check whether group has been set.
Definition: L3Ep.hpp:107
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:296
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: L3Ep.hpp:284
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:240
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:748
modelgbp::epr::L3Ep & setContext(const std::string &newValue)
Set context to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:85
void resolveEprSecurityGroupContext(std::vector< OF_SHARED_PTR< modelgbp::epr::SecurityGroupContext > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::epr::SecurityGroupContext.
Definition: L3Ep.hpp:621
static boost::optional< OF_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:380
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition: L3Ep.hpp:228
modelgbp::epr::L3Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: L3Ep.hpp:321
OF_SHARED_PTR< modelgbp::epr::SecurityGroupContext > addEprSecurityGroupContext(const std::string &eprSecurityGroupContextSecGroup)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: L3Ep.hpp:596
static boost::optional< OF_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:338
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for L3Ep.
Definition: L3Ep.hpp:45
modelgbp::epr::L3Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition: L3Ep.hpp:265
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:184
modelgbp::epr::L3Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:309
static boost::optional< OF_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
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:729
OF_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:536
bool isMacSet()
Check whether mac has been set.
Definition: L3Ep.hpp:219
modelgbp::epr::L3Ep & unsetContext()
Unset context in the currently-active mutator.
Definition: L3Ep.hpp:97
L3Ep(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of L3Ep.
Definition: L3Ep.hpp:784
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: L3Ep.hpp:476
OF_SHARED_PTR< modelgbp::gbpe::ReportedEpAttributeSet > addGbpeReportedEpAttributeSet()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: L3Ep.hpp:437
boost::optional< const std::string & > getGroup()
Get the value of group if it has been set.
Definition: L3Ep.hpp:116
boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEpFromEpRTgt > > resolveSpanLocalEpFromEpRTgt(const std::string &spanLocalEpFromEpRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: L3Ep.hpp:518
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: L3Ep.hpp:37