modelgbp Generated OpFlex Model  1.7.0
EpgMappingCtxToAttrSetRSrc.hpp
1 
10 #pragma once
11 #ifndef GI_GBPE_EPGMAPPINGCTXTOATTRSETRSRC_HPP
12 #define GI_GBPE_EPGMAPPINGCTXTOATTRSETRSRC_HPP
13 
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
17 
18 namespace modelgbp {
19 namespace gbpe {
20 
22  : public opflex::modb::mointernal::MO
23 {
24 public:
25 
29  static const opflex::modb::class_id_t CLASS_ID = 25;
30 
35  bool isRoleSet()
36  {
37  return getObjectInstance().isSet(819202ul, opflex::modb::PropertyInfo::ENUM8);
38  }
39 
44  boost::optional<const uint8_t> getRole()
45  {
46  if (isRoleSet())
47  return (const uint8_t)getObjectInstance().getUInt64(819202ul);
48  return boost::none;
49  }
50 
56  const uint8_t getRole(const uint8_t defaultValue)
57  {
58  return getRole().get_value_or(defaultValue);
59  }
60 
70  {
71  getTLMutator().modify(getClassId(), getURI())->setUInt64(819202ul, newValue);
72  return *this;
73  }
74 
82  {
83  getTLMutator().modify(getClassId(), getURI())->unset(819202ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
84  return *this;
85  }
86 
91  bool isTargetSet()
92  {
93  return getObjectInstance().isSet(819203ul, opflex::modb::PropertyInfo::REFERENCE);
94  }
95 
100  boost::optional<opflex::modb::class_id_t> getTargetClass()
101  {
102  if (isTargetSet())
103  return getObjectInstance().getReference(819203ul).first;
104  return boost::none;
105  }
106 
111  boost::optional<opflex::modb::URI> getTargetURI()
112  {
113  if (isTargetSet())
114  return getObjectInstance().getReference(819203ul).second;
115  return boost::none;
116  }
117 
123  opflex::modb::class_id_t getTargetClass(opflex::modb::class_id_t defaultValue)
124  {
125  return getTargetClass().get_value_or(defaultValue);
126  }
127 
133  opflex::modb::URI getTargetURI(opflex::modb::URI defaultValue)
134  {
135  return getTargetURI().get_value_or(defaultValue);
136  }
137 
148  {
149  getTLMutator().modify(getClassId(), getURI())->setReference(819203ul, 36, uri);
150  return *this;
151  }
152 
169  const std::string& gbpeEpAttributeSetUuid)
170  {
171  getTLMutator().modify(getClassId(), getURI())->setReference(819203ul, 36, opflex::modb::URIBuilder().addElement("GbpeVMUniverse").addElement("GbpeEpAttributeSet").addElement(gbpeEpAttributeSetUuid).build());
172  return *this;
173  }
174 
182  {
183  getTLMutator().modify(getClassId(), getURI())->unset(819203ul, opflex::modb::PropertyInfo::REFERENCE, opflex::modb::PropertyInfo::SCALAR);
184  return *this;
185  }
186 
191  bool isTypeSet()
192  {
193  return getObjectInstance().isSet(819201ul, opflex::modb::PropertyInfo::ENUM8);
194  }
195 
200  boost::optional<const uint8_t> getType()
201  {
202  if (isTypeSet())
203  return (const uint8_t)getObjectInstance().getUInt64(819201ul);
204  return boost::none;
205  }
206 
212  const uint8_t getType(const uint8_t defaultValue)
213  {
214  return getType().get_value_or(defaultValue);
215  }
216 
226  {
227  getTLMutator().modify(getClassId(), getURI())->setUInt64(819201ul, newValue);
228  return *this;
229  }
230 
238  {
239  getTLMutator().modify(getClassId(), getURI())->unset(819201ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
240  return *this;
241  }
242 
254  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc> > resolve(
255  opflex::ofcore::OFFramework& framework,
256  const opflex::modb::URI& uri)
257  {
258  return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc>(framework, CLASS_ID, uri);
259  }
260 
272  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc> > resolve(
273  const opflex::modb::URI& uri)
274  {
275  return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
276  }
277 
294  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc> > resolveUnderEpdrL2DiscoveredEpdrLocalL2EpGbpeEpgMappingCtx(
295  opflex::ofcore::OFFramework& framework,
296  const std::string& epdrLocalL2EpUuid)
297  {
298  return resolve(framework,opflex::modb::URIBuilder().addElement("EpdrL2Discovered").addElement("EpdrLocalL2Ep").addElement(epdrLocalL2EpUuid).addElement("GbpeEpgMappingCtx").addElement("GbpeEpgMappingCtxToAttrSetRSrc").build());
299  }
300 
316  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc> > resolveUnderEpdrL2DiscoveredEpdrLocalL2EpGbpeEpgMappingCtx(
317  const std::string& epdrLocalL2EpUuid)
318  {
319  return resolveUnderEpdrL2DiscoveredEpdrLocalL2EpGbpeEpgMappingCtx(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL2EpUuid);
320  }
321 
338  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc> > resolveUnderEpdrL3DiscoveredEpdrLocalL3EpGbpeEpgMappingCtx(
339  opflex::ofcore::OFFramework& framework,
340  const std::string& epdrLocalL3EpUuid)
341  {
342  return resolve(framework,opflex::modb::URIBuilder().addElement("EpdrL3Discovered").addElement("EpdrLocalL3Ep").addElement(epdrLocalL3EpUuid).addElement("GbpeEpgMappingCtx").addElement("GbpeEpgMappingCtxToAttrSetRSrc").build());
343  }
344 
360  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc> > resolveUnderEpdrL3DiscoveredEpdrLocalL3EpGbpeEpgMappingCtx(
361  const std::string& epdrLocalL3EpUuid)
362  {
363  return resolveUnderEpdrL3DiscoveredEpdrLocalL3EpGbpeEpgMappingCtx(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL3EpUuid);
364  }
365 
374  void remove()
375  {
376  getTLMutator().remove(CLASS_ID, getURI());
377  }
378 
389  static void remove(opflex::ofcore::OFFramework& framework,
390  const opflex::modb::URI& uri)
391  {
392  MO::remove(framework, CLASS_ID, uri);
393  }
394 
405  static void remove(const opflex::modb::URI& uri)
406  {
407  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
408  }
409 
425  opflex::ofcore::OFFramework& framework,
426  const std::string& epdrLocalL2EpUuid)
427  {
428  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("EpdrL2Discovered").addElement("EpdrLocalL2Ep").addElement(epdrLocalL2EpUuid).addElement("GbpeEpgMappingCtx").addElement("GbpeEpgMappingCtxToAttrSetRSrc").build());
429  }
430 
446  const std::string& epdrLocalL2EpUuid)
447  {
448  removeUnderEpdrL2DiscoveredEpdrLocalL2EpGbpeEpgMappingCtx(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL2EpUuid);
449  }
450 
466  opflex::ofcore::OFFramework& framework,
467  const std::string& epdrLocalL3EpUuid)
468  {
469  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("EpdrL3Discovered").addElement("EpdrLocalL3Ep").addElement(epdrLocalL3EpUuid).addElement("GbpeEpgMappingCtx").addElement("GbpeEpgMappingCtxToAttrSetRSrc").build());
470  }
471 
487  const std::string& epdrLocalL3EpUuid)
488  {
489  removeUnderEpdrL3DiscoveredEpdrLocalL3EpGbpeEpgMappingCtx(opflex::ofcore::OFFramework::defaultInstance(),epdrLocalL3EpUuid);
490  }
491 
503  static void registerListener(
504  opflex::ofcore::OFFramework& framework,
505  opflex::modb::ObjectListener* listener)
506  {
507  opflex::modb::mointernal
508  ::MO::registerListener(framework, listener, CLASS_ID);
509  }
510 
522  static void registerListener(
523  opflex::modb::ObjectListener* listener)
524  {
525  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
526  }
527 
534  static void unregisterListener(
535  opflex::ofcore::OFFramework& framework,
536  opflex::modb::ObjectListener* listener)
537  {
538  opflex::modb::mointernal
539  ::MO::unregisterListener(framework, listener, CLASS_ID);
540  }
541 
548  static void unregisterListener(
549  opflex::modb::ObjectListener* listener)
550  {
551  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
552  }
553 
559  opflex::ofcore::OFFramework& framework,
560  const opflex::modb::URI& uri,
561  const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
562  : MO(framework, CLASS_ID, uri, oi) { }
563 }; // class EpgMappingCtxToAttrSetRSrc
564 
565 } // namespace gbpe
566 } // namespace modelgbp
567 #endif // GI_GBPE_EPGMAPPINGCTXTOATTRSETRSRC_HPP
const uint8_t getRole(const uint8_t defaultValue)
Get the value of role if set, otherwise the value of default passed in.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:56
modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc & unsetTarget()
Unset target in the currently-active mutator.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:181
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: EpgMappingCtxToAttrSetRSrc.hpp:503
EpgMappingCtxToAttrSetRSrc(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of EpgMappingCtxToAttrSetRSrc.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:558
modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc & unsetRole()
Unset role in the currently-active mutator.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:81
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:534
boost::optional< opflex::modb::class_id_t > getTargetClass()
Get the value of targetClass if it has been set.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:100
modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc & setTargetEpAttributeSet(const opflex::modb::URI &uri)
Set the reference to point to an instance of EpAttributeSet with the specified URI.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:147
bool isTargetSet()
Check whether target has been set.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:91
static void removeUnderEpdrL3DiscoveredEpdrLocalL3EpGbpeEpgMappingCtx(opflex::ofcore::OFFramework &framework, const std::string &epdrLocalL3EpUuid)
Remove the EpgMappingCtxToAttrSetRSrc object with the specified path elements from the managed object...
Definition: EpgMappingCtxToAttrSetRSrc.hpp:465
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:200
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for EpgMappingCtxToAttrSetRSrc.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:29
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc > > resolveUnderEpdrL2DiscoveredEpdrLocalL2EpGbpeEpgMappingCtx(const std::string &epdrLocalL2EpUuid)
Retrieve an instance of EpgMappingCtxToAttrSetRSrc from the default managed object store by construct...
Definition: EpgMappingCtxToAttrSetRSrc.hpp:316
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc > > resolveUnderEpdrL3DiscoveredEpdrLocalL3EpGbpeEpgMappingCtx(const std::string &epdrLocalL3EpUuid)
Retrieve an instance of EpgMappingCtxToAttrSetRSrc from the default managed object store by construct...
Definition: EpgMappingCtxToAttrSetRSrc.hpp:360
bool isRoleSet()
Check whether role has been set.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:35
modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc & setTargetEpAttributeSet(const std::string &gbpeEpAttributeSetUuid)
Set the reference to point to an instance of EpAttributeSet in the currently-active mutator by constr...
Definition: EpgMappingCtxToAttrSetRSrc.hpp:168
boost::optional< opflex::modb::URI > getTargetURI()
Get the value of targetURI if it has been set.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:111
modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:225
const uint8_t getType(const uint8_t defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:212
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: EpgMappingCtxToAttrSetRSrc.hpp:522
static void removeUnderEpdrL2DiscoveredEpdrLocalL2EpGbpeEpgMappingCtx(opflex::ofcore::OFFramework &framework, const std::string &epdrLocalL2EpUuid)
Remove the EpgMappingCtxToAttrSetRSrc object with the specified path elements from the managed object...
Definition: EpgMappingCtxToAttrSetRSrc.hpp:424
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc > > resolveUnderEpdrL3DiscoveredEpdrLocalL3EpGbpeEpgMappingCtx(opflex::ofcore::OFFramework &framework, const std::string &epdrLocalL3EpUuid)
Retrieve an instance of EpgMappingCtxToAttrSetRSrc from the managed object store by constructing its ...
Definition: EpgMappingCtxToAttrSetRSrc.hpp:338
boost::optional< const uint8_t > getRole()
Get the value of role if it has been set.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:44
opflex::modb::class_id_t getTargetClass(opflex::modb::class_id_t defaultValue)
Get the value of targetClass if set, otherwise the value of default passed in.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:123
opflex::modb::URI getTargetURI(opflex::modb::URI defaultValue)
Get the value of targetURI if set, otherwise the value of default passed in.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:133
modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc & setRole(const uint8_t newValue)
Set role to the specified value in the currently-active mutator.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:69
static void removeUnderEpdrL3DiscoveredEpdrLocalL3EpGbpeEpgMappingCtx(const std::string &epdrLocalL3EpUuid)
Remove the EpgMappingCtxToAttrSetRSrc object with the specified path elements from the managed object...
Definition: EpgMappingCtxToAttrSetRSrc.hpp:486
static void removeUnderEpdrL2DiscoveredEpdrLocalL2EpGbpeEpgMappingCtx(const std::string &epdrLocalL2EpUuid)
Remove the EpgMappingCtxToAttrSetRSrc object with the specified path elements from the managed object...
Definition: EpgMappingCtxToAttrSetRSrc.hpp:445
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpgMappingCtxToAttrSetRSrc from the managed object store. ...
Definition: EpgMappingCtxToAttrSetRSrc.hpp:254
modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc & unsetType()
Unset type in the currently-active mutator.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:237
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:548
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc > > resolveUnderEpdrL2DiscoveredEpdrLocalL2EpGbpeEpgMappingCtx(opflex::ofcore::OFFramework &framework, const std::string &epdrLocalL2EpUuid)
Retrieve an instance of EpgMappingCtxToAttrSetRSrc from the managed object store by constructing its ...
Definition: EpgMappingCtxToAttrSetRSrc.hpp:294
bool isTypeSet()
Check whether type has been set.
Definition: EpgMappingCtxToAttrSetRSrc.hpp:191
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::EpgMappingCtxToAttrSetRSrc > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of EpgMappingCtxToAttrSetRSrc from the managed object store using the default fr...
Definition: EpgMappingCtxToAttrSetRSrc.hpp:272
Definition: EpgMappingCtxToAttrSetRSrc.hpp:21