modelgbp Generated OpFlex Model  1.2.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 namespace modelgbp {
27 namespace epdr {
28 
29 class LocalL3Ep
30  : public opflex::modb::mointernal::MO
31 {
32 public:
33 
37  static const opflex::modb::class_id_t CLASS_ID = 89;
38 
43  bool isIpSet()
44  {
45  return getObjectInstance().isSet(2916355ul, opflex::modb::PropertyInfo::STRING);
46  }
47 
52  boost::optional<const std::string&> getIp()
53  {
54  if (isIpSet())
55  return getObjectInstance().getString(2916355ul);
56  return boost::none;
57  }
58 
64  const std::string& getIp(const std::string& defaultValue)
65  {
66  return getIp().get_value_or(defaultValue);
67  }
68 
77  modelgbp::epdr::LocalL3Ep& setIp(const std::string& newValue)
78  {
79  getTLMutator().modify(getClassId(), getURI())->setString(2916355ul, newValue);
80  return *this;
81  }
82 
90  {
91  getTLMutator().modify(getClassId(), getURI())->unset(2916355ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
92  return *this;
93  }
94 
99  bool isMacSet()
100  {
101  return getObjectInstance().isSet(2916354ul, opflex::modb::PropertyInfo::MAC);
102  }
103 
108  boost::optional<const opflex::modb::MAC&> getMac()
109  {
110  if (isMacSet())
111  return getObjectInstance().getMAC(2916354ul);
112  return boost::none;
113  }
114 
120  const opflex::modb::MAC& getMac(const opflex::modb::MAC& defaultValue)
121  {
122  return getMac().get_value_or(defaultValue);
123  }
124 
133  modelgbp::epdr::LocalL3Ep& setMac(const opflex::modb::MAC& newValue)
134  {
135  getTLMutator().modify(getClassId(), getURI())->setMAC(2916354ul, newValue);
136  return *this;
137  }
138 
146  {
147  getTLMutator().modify(getClassId(), getURI())->unset(2916354ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
148  return *this;
149  }
150 
155  bool isUuidSet()
156  {
157  return getObjectInstance().isSet(2916353ul, opflex::modb::PropertyInfo::STRING);
158  }
159 
164  boost::optional<const std::string&> getUuid()
165  {
166  if (isUuidSet())
167  return getObjectInstance().getString(2916353ul);
168  return boost::none;
169  }
170 
176  const std::string& getUuid(const std::string& defaultValue)
177  {
178  return getUuid().get_value_or(defaultValue);
179  }
180 
189  modelgbp::epdr::LocalL3Ep& setUuid(const std::string& newValue)
190  {
191  getTLMutator().modify(getClassId(), getURI())->setString(2916353ul, newValue);
192  return *this;
193  }
194 
202  {
203  getTLMutator().modify(getClassId(), getURI())->unset(2916353ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
204  return *this;
205  }
206 
218  static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL3Ep> > resolve(
219  opflex::ofcore::OFFramework& framework,
220  const opflex::modb::URI& uri)
221  {
222  return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL3Ep>(framework, CLASS_ID, uri);
223  }
224 
236  static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL3Ep> > resolve(
237  const opflex::modb::URI& uri)
238  {
239  return opflex::modb::mointernal::MO::resolve<modelgbp::epdr::LocalL3Ep>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
240  }
241 
258  static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL3Ep> > resolve(
259  opflex::ofcore::OFFramework& framework,
260  const std::string& epdrLocalL3EpUuid)
261  {
262  return resolve(framework,opflex::modb::URIBuilder().addElement("EpdrL3Discovered").addElement("EpdrLocalL3Ep").addElement(epdrLocalL3EpUuid).build());
263  }
264 
280  static boost::optional<boost::shared_ptr<modelgbp::epdr::LocalL3Ep> > resolve(
281  const std::string& epdrLocalL3EpUuid)
282  {
283  return resolve(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL3EpUuid);
284  }
285 
295  boost::optional<boost::shared_ptr<modelgbp::gbpe::EpgMappingCtx> > resolveGbpeEpgMappingCtx(
296  )
297  {
298  return modelgbp::gbpe::EpgMappingCtx::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpeEpgMappingCtx").build());
299  }
300 
311  boost::shared_ptr<modelgbp::gbpe::EpgMappingCtx> addGbpeEpgMappingCtx(
312  )
313  {
314  boost::shared_ptr<modelgbp::gbpe::EpgMappingCtx> result = addChild<modelgbp::gbpe::EpgMappingCtx>(
315  CLASS_ID, getURI(), 2150400013ul, 13,
316  opflex::modb::URIBuilder(getURI()).addElement("GbpeEpgMappingCtx").build()
317  );
318  return result;
319  }
320 
330  boost::optional<boost::shared_ptr<modelgbp::epdr::EndPointToGroupRSrc> > resolveEpdrEndPointToGroupRSrc(
331  )
332  {
333  return modelgbp::epdr::EndPointToGroupRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("EpdrEndPointToGroupRSrc").build());
334  }
335 
346  boost::shared_ptr<modelgbp::epdr::EndPointToGroupRSrc> addEpdrEndPointToGroupRSrc(
347  )
348  {
349  boost::shared_ptr<modelgbp::epdr::EndPointToGroupRSrc> result = addChild<modelgbp::epdr::EndPointToGroupRSrc>(
350  CLASS_ID, getURI(), 2150400085ul, 85,
351  opflex::modb::URIBuilder(getURI()).addElement("EpdrEndPointToGroupRSrc").build()
352  );
353  return result;
354  }
355 
364  void remove()
365  {
366  getTLMutator().remove(CLASS_ID, getURI());
367  }
368 
379  static void remove(opflex::ofcore::OFFramework& framework,
380  const opflex::modb::URI& uri)
381  {
382  MO::remove(framework, CLASS_ID, uri);
383  }
384 
395  static void remove(const opflex::modb::URI& uri)
396  {
397  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
398  }
399 
414  static void remove(
415  opflex::ofcore::OFFramework& framework,
416  const std::string& epdrLocalL3EpUuid)
417  {
418  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("EpdrL3Discovered").addElement("EpdrLocalL3Ep").addElement(epdrLocalL3EpUuid).build());
419  }
420 
435  static void remove(
436  const std::string& epdrLocalL3EpUuid)
437  {
438  remove(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL3EpUuid);
439  }
440 
452  static void registerListener(
453  opflex::ofcore::OFFramework& framework,
454  opflex::modb::ObjectListener* listener)
455  {
456  opflex::modb::mointernal
457  ::MO::registerListener(framework, listener, CLASS_ID);
458  }
459 
471  static void registerListener(
472  opflex::modb::ObjectListener* listener)
473  {
474  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
475  }
476 
483  static void unregisterListener(
484  opflex::ofcore::OFFramework& framework,
485  opflex::modb::ObjectListener* listener)
486  {
487  opflex::modb::mointernal
488  ::MO::unregisterListener(framework, listener, CLASS_ID);
489  }
490 
497  static void unregisterListener(
498  opflex::modb::ObjectListener* listener)
499  {
500  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
501  }
502 
508  opflex::ofcore::OFFramework& framework,
509  const opflex::modb::URI& uri,
510  const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
511  : MO(framework, CLASS_ID, uri, oi) { }
512 }; // class LocalL3Ep
513 
514 } // namespace epdr
515 } // namespace modelgbp
516 #endif // GI_EPDR_LOCALL3EP_HPP
modelgbp::epdr::LocalL3Ep & setIp(const std::string &newValue)
Set ip to the specified value in the currently-active mutator.
Definition: LocalL3Ep.hpp:77
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for LocalL3Ep.
Definition: LocalL3Ep.hpp:37
boost::optional< boost::shared_ptr< modelgbp::epdr::EndPointToGroupRSrc > > resolveEpdrEndPointToGroupRSrc()
Retrieve the child object with the specified naming properties.
Definition: LocalL3Ep.hpp:330
LocalL3Ep(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of LocalL3Ep.
Definition: LocalL3Ep.hpp:507
boost::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:311
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition: LocalL3Ep.hpp:108
static boost::optional< boost::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:236
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:176
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: LocalL3Ep.hpp:483
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: LocalL3Ep.hpp:497
bool isIpSet()
Check whether ip has been set.
Definition: LocalL3Ep.hpp:43
bool isMacSet()
Check whether mac has been set.
Definition: LocalL3Ep.hpp:99
static boost::optional< boost::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:280
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:64
modelgbp::epdr::LocalL3Ep & unsetMac()
Unset mac in the currently-active mutator.
Definition: LocalL3Ep.hpp:145
modelgbp::epdr::LocalL3Ep & unsetIp()
Unset ip in the currently-active mutator.
Definition: LocalL3Ep.hpp:89
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:471
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:120
bool isUuidSet()
Check whether uuid has been set.
Definition: LocalL3Ep.hpp:155
modelgbp::epdr::LocalL3Ep & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: LocalL3Ep.hpp:201
boost::optional< const std::string & > getIp()
Get the value of ip if it has been set.
Definition: LocalL3Ep.hpp:52
boost::optional< boost::shared_ptr< modelgbp::gbpe::EpgMappingCtx > > resolveGbpeEpgMappingCtx()
Retrieve the child object with the specified naming properties.
Definition: LocalL3Ep.hpp:295
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:452
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: LocalL3Ep.hpp:164
boost::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:346
static boost::optional< boost::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
Definition: LocalL3Ep.hpp:29
modelgbp::epdr::LocalL3Ep & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: LocalL3Ep.hpp:133
static boost::optional< boost::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:258
static boost::optional< boost::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
static boost::optional< boost::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:218
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
modelgbp::epdr::LocalL3Ep & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: LocalL3Ep.hpp:189