modelgbp Generated OpFlex Model  1.3.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  * contains: item:mclass(epr/SecurityGroupContext)
27  */
28 #include "modelgbp/epr/SecurityGroupContext.hpp"
29 
30 namespace modelgbp {
31 namespace epr {
32 
33 class L3Ep
34  : public opflex::modb::mointernal::MO
35 {
36 public:
37 
41  static const opflex::modb::class_id_t CLASS_ID = 84;
42 
47  bool isContextSet()
48  {
49  return getObjectInstance().isSet(2752517ul, opflex::modb::PropertyInfo::STRING);
50  }
51 
56  boost::optional<const std::string&> getContext()
57  {
58  if (isContextSet())
59  return getObjectInstance().getString(2752517ul);
60  return boost::none;
61  }
62 
68  const std::string& getContext(const std::string& defaultValue)
69  {
70  return getContext().get_value_or(defaultValue);
71  }
72 
81  modelgbp::epr::L3Ep& setContext(const std::string& newValue)
82  {
83  getTLMutator().modify(getClassId(), getURI())->setString(2752517ul, newValue);
84  return *this;
85  }
86 
94  {
95  getTLMutator().modify(getClassId(), getURI())->unset(2752517ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
96  return *this;
97  }
98 
103  bool isGroupSet()
104  {
105  return getObjectInstance().isSet(2752515ul, opflex::modb::PropertyInfo::STRING);
106  }
107 
112  boost::optional<const std::string&> getGroup()
113  {
114  if (isGroupSet())
115  return getObjectInstance().getString(2752515ul);
116  return boost::none;
117  }
118 
124  const std::string& getGroup(const std::string& defaultValue)
125  {
126  return getGroup().get_value_or(defaultValue);
127  }
128 
137  modelgbp::epr::L3Ep& setGroup(const std::string& newValue)
138  {
139  getTLMutator().modify(getClassId(), getURI())->setString(2752515ul, newValue);
140  return *this;
141  }
142 
150  {
151  getTLMutator().modify(getClassId(), getURI())->unset(2752515ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
152  return *this;
153  }
154 
159  bool isIpSet()
160  {
161  return getObjectInstance().isSet(2752516ul, opflex::modb::PropertyInfo::STRING);
162  }
163 
168  boost::optional<const std::string&> getIp()
169  {
170  if (isIpSet())
171  return getObjectInstance().getString(2752516ul);
172  return boost::none;
173  }
174 
180  const std::string& getIp(const std::string& defaultValue)
181  {
182  return getIp().get_value_or(defaultValue);
183  }
184 
193  modelgbp::epr::L3Ep& setIp(const std::string& newValue)
194  {
195  getTLMutator().modify(getClassId(), getURI())->setString(2752516ul, newValue);
196  return *this;
197  }
198 
206  {
207  getTLMutator().modify(getClassId(), getURI())->unset(2752516ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
208  return *this;
209  }
210 
215  bool isMacSet()
216  {
217  return getObjectInstance().isSet(2752514ul, opflex::modb::PropertyInfo::MAC);
218  }
219 
224  boost::optional<const opflex::modb::MAC&> getMac()
225  {
226  if (isMacSet())
227  return getObjectInstance().getMAC(2752514ul);
228  return boost::none;
229  }
230 
236  const opflex::modb::MAC& getMac(const opflex::modb::MAC& defaultValue)
237  {
238  return getMac().get_value_or(defaultValue);
239  }
240 
249  modelgbp::epr::L3Ep& setMac(const opflex::modb::MAC& newValue)
250  {
251  getTLMutator().modify(getClassId(), getURI())->setMAC(2752514ul, newValue);
252  return *this;
253  }
254 
262  {
263  getTLMutator().modify(getClassId(), getURI())->unset(2752514ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
264  return *this;
265  }
266 
271  bool isUuidSet()
272  {
273  return getObjectInstance().isSet(2752513ul, opflex::modb::PropertyInfo::STRING);
274  }
275 
280  boost::optional<const std::string&> getUuid()
281  {
282  if (isUuidSet())
283  return getObjectInstance().getString(2752513ul);
284  return boost::none;
285  }
286 
292  const std::string& getUuid(const std::string& defaultValue)
293  {
294  return getUuid().get_value_or(defaultValue);
295  }
296 
305  modelgbp::epr::L3Ep& setUuid(const std::string& newValue)
306  {
307  getTLMutator().modify(getClassId(), getURI())->setString(2752513ul, newValue);
308  return *this;
309  }
310 
318  {
319  getTLMutator().modify(getClassId(), getURI())->unset(2752513ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
320  return *this;
321  }
322 
334  static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> > resolve(
335  opflex::ofcore::OFFramework& framework,
336  const opflex::modb::URI& uri)
337  {
338  return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Ep>(framework, CLASS_ID, uri);
339  }
340 
352  static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> > resolve(
353  const opflex::modb::URI& uri)
354  {
355  return opflex::modb::mointernal::MO::resolve<modelgbp::epr::L3Ep>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
356  }
357 
376  static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> > resolve(
377  opflex::ofcore::OFFramework& framework,
378  const std::string& eprL3EpContext,
379  const std::string& eprL3EpIp)
380  {
381  return resolve(framework,opflex::modb::URIBuilder().addElement("EprL3Universe").addElement("EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
382  }
383 
401  static boost::optional<boost::shared_ptr<modelgbp::epr::L3Ep> > resolve(
402  const std::string& eprL3EpContext,
403  const std::string& eprL3EpIp)
404  {
405  return resolve(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp);
406  }
407 
419  boost::optional<boost::shared_ptr<modelgbp::gbpe::Attestation> > resolveGbpeAttestation(
420  const std::string& gbpeAttestationName)
421  {
422  return modelgbp::gbpe::Attestation::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeAttestation").addElement(gbpeAttestationName).build());
423  }
424 
437  boost::shared_ptr<modelgbp::gbpe::Attestation> addGbpeAttestation(
438  const std::string& gbpeAttestationName)
439  {
440  boost::shared_ptr<modelgbp::gbpe::Attestation> result = addChild<modelgbp::gbpe::Attestation>(
441  CLASS_ID, getURI(), 2150236196ul, 36,
442  opflex::modb::URIBuilder(getURI()).addElement("GbpeAttestation").addElement(gbpeAttestationName).build()
443  );
444  result->setName(gbpeAttestationName);
445  return result;
446  }
447 
462  void resolveGbpeAttestation(/* out */ std::vector<boost::shared_ptr<modelgbp::gbpe::Attestation> >& out)
463  {
464  opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::Attestation>(
465  getFramework(), CLASS_ID, getURI(), 2150236196ul, 36, out);
466  }
467 
479  boost::optional<boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> > resolveSpanLocalEpFromEpRTgt(
480  const std::string& spanLocalEpFromEpRTgtSource)
481  {
482  return modelgbp::span::LocalEpFromEpRTgt::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build());
483  }
484 
497  boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> addSpanLocalEpFromEpRTgt(
498  const std::string& spanLocalEpFromEpRTgtSource)
499  {
500  boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> result = addChild<modelgbp::span::LocalEpFromEpRTgt>(
501  CLASS_ID, getURI(), 2150236214ul, 54,
502  opflex::modb::URIBuilder(getURI()).addElement("SpanLocalEpFromEpRTgt").addElement(spanLocalEpFromEpRTgtSource).build()
503  );
504  result->setSource(spanLocalEpFromEpRTgtSource);
505  return result;
506  }
507 
522  void resolveSpanLocalEpFromEpRTgt(/* out */ std::vector<boost::shared_ptr<modelgbp::span::LocalEpFromEpRTgt> >& out)
523  {
524  opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::LocalEpFromEpRTgt>(
525  getFramework(), CLASS_ID, getURI(), 2150236214ul, 54, out);
526  }
527 
539  boost::optional<boost::shared_ptr<modelgbp::epr::SecurityGroupContext> > resolveEprSecurityGroupContext(
540  const std::string& eprSecurityGroupContextSecGroup)
541  {
542  return modelgbp::epr::SecurityGroupContext::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("EprSecurityGroupContext").addElement(eprSecurityGroupContextSecGroup).build());
543  }
544 
557  boost::shared_ptr<modelgbp::epr::SecurityGroupContext> addEprSecurityGroupContext(
558  const std::string& eprSecurityGroupContextSecGroup)
559  {
560  boost::shared_ptr<modelgbp::epr::SecurityGroupContext> result = addChild<modelgbp::epr::SecurityGroupContext>(
561  CLASS_ID, getURI(), 2150236241ul, 81,
562  opflex::modb::URIBuilder(getURI()).addElement("EprSecurityGroupContext").addElement(eprSecurityGroupContextSecGroup).build()
563  );
564  result->setSecGroup(eprSecurityGroupContextSecGroup);
565  return result;
566  }
567 
582  void resolveEprSecurityGroupContext(/* out */ std::vector<boost::shared_ptr<modelgbp::epr::SecurityGroupContext> >& out)
583  {
584  opflex::modb::mointernal::MO::resolveChildren<modelgbp::epr::SecurityGroupContext>(
585  getFramework(), CLASS_ID, getURI(), 2150236241ul, 81, out);
586  }
587 
596  void remove()
597  {
598  getTLMutator().remove(CLASS_ID, getURI());
599  }
600 
611  static void remove(opflex::ofcore::OFFramework& framework,
612  const opflex::modb::URI& uri)
613  {
614  MO::remove(framework, CLASS_ID, uri);
615  }
616 
627  static void remove(const opflex::modb::URI& uri)
628  {
629  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
630  }
631 
648  static void remove(
649  opflex::ofcore::OFFramework& framework,
650  const std::string& eprL3EpContext,
651  const std::string& eprL3EpIp)
652  {
653  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("EprL3Universe").addElement("EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
654  }
655 
672  static void remove(
673  const std::string& eprL3EpContext,
674  const std::string& eprL3EpIp)
675  {
676  remove(opflex::ofcore::OFFramework::defaultInstance(),eprL3EpContext,eprL3EpIp);
677  }
678 
690  static void registerListener(
691  opflex::ofcore::OFFramework& framework,
692  opflex::modb::ObjectListener* listener)
693  {
694  opflex::modb::mointernal
695  ::MO::registerListener(framework, listener, CLASS_ID);
696  }
697 
709  static void registerListener(
710  opflex::modb::ObjectListener* listener)
711  {
712  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
713  }
714 
721  static void unregisterListener(
722  opflex::ofcore::OFFramework& framework,
723  opflex::modb::ObjectListener* listener)
724  {
725  opflex::modb::mointernal
726  ::MO::unregisterListener(framework, listener, CLASS_ID);
727  }
728 
735  static void unregisterListener(
736  opflex::modb::ObjectListener* listener)
737  {
738  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
739  }
740 
746  opflex::ofcore::OFFramework& framework,
747  const opflex::modb::URI& uri,
748  const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
749  : MO(framework, CLASS_ID, uri, oi) { }
750 }; // class L3Ep
751 
752 } // namespace epr
753 } // namespace modelgbp
754 #endif // GI_EPR_L3EP_HPP
bool isIpSet()
Check whether ip has been set.
Definition: L3Ep.hpp:159
bool isContextSet()
Check whether context has been set.
Definition: L3Ep.hpp:47
modelgbp::epr::L3Ep & unsetGroup()
Unset group in the currently-active mutator.
Definition: L3Ep.hpp:149
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:376
modelgbp::epr::L3Ep & unsetIp()
Unset ip in the currently-active mutator.
Definition: L3Ep.hpp:205
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:419
bool isUuidSet()
Check whether uuid has been set.
Definition: L3Ep.hpp:271
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:352
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:124
boost::optional< const std::string & > getIp()
Get the value of ip if it has been set.
Definition: L3Ep.hpp:168
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:68
modelgbp::epr::L3Ep & setIp(const std::string &newValue)
Set ip to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:193
modelgbp::epr::L3Ep & setGroup(const std::string &newValue)
Set group to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:137
modelgbp::epr::L3Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:249
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: L3Ep.hpp:735
boost::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:557
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:522
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: L3Ep.hpp:721
boost::optional< const std::string & > getContext()
Get the value of context if it has been set.
Definition: L3Ep.hpp:56
bool isGroupSet()
Check whether group has been set.
Definition: L3Ep.hpp:103
boost::optional< boost::shared_ptr< modelgbp::epr::SecurityGroupContext > > resolveEprSecurityGroupContext(const std::string &eprSecurityGroupContextSecGroup)
Retrieve the child object with the specified naming properties.
Definition: L3Ep.hpp:539
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:292
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: L3Ep.hpp:280
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:236
void resolveEprSecurityGroupContext(std::vector< boost::shared_ptr< modelgbp::epr::SecurityGroupContext > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::epr::SecurityGroupContext.
Definition: L3Ep.hpp:582
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:709
modelgbp::epr::L3Ep & setContext(const std::string &newValue)
Set context to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:81
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:224
modelgbp::epr::L3Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: L3Ep.hpp:317
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:437
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:479
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for L3Ep.
Definition: L3Ep.hpp:41
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:334
static boost::optional< boost::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 & unsetMac()
Unset mac in the currently-active mutator.
Definition: L3Ep.hpp:261
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:745
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:180
modelgbp::epr::L3Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: L3Ep.hpp:305
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:401
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:690
bool isMacSet()
Check whether mac has been set.
Definition: L3Ep.hpp:215
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:497
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:462
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:93
boost::optional< const std::string & > getGroup()
Get the value of group if it has been set.
Definition: L3Ep.hpp:112
Definition: L3Ep.hpp:33