modelgbp Generated OpFlex Model 1.7.0
LocalEpToEpRSrc.hpp
1
10#pragma once
11#ifndef GI_SPAN_LOCALEPTOEPRSRC_HPP
12#define GI_SPAN_LOCALEPTOEPRSRC_HPP
13
14#include <boost/optional.hpp>
15#include "opflex/modb/URIBuilder.h"
16#include "opflex/modb/mo-internal/MO.h"
17
18namespace modelgbp {
19namespace span {
20
22 : public opflex::modb::mointernal::MO
23{
24public:
25
29 static const opflex::modb::class_id_t CLASS_ID = 70;
30
35 bool isRoleSet()
36 {
37 return getObjectInstance().isSet(2293762ul, opflex::modb::PropertyInfo::ENUM8);
38 }
39
44 boost::optional<const uint8_t> getRole()
45 {
46 if (isRoleSet())
47 return (const uint8_t)getObjectInstance().getUInt64(2293762ul);
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(2293762ul, newValue);
72 return *this;
73 }
74
82 {
83 getTLMutator().modify(getClassId(), getURI())->unset(2293762ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
84 return *this;
85 }
86
92 {
93 return getObjectInstance().isSet(2293763ul, opflex::modb::PropertyInfo::REFERENCE);
94 }
95
100 boost::optional<opflex::modb::class_id_t> getTargetClass()
101 {
102 if (isTargetSet())
103 return getObjectInstance().getReference(2293763ul).first;
104 return boost::none;
105 }
106
111 boost::optional<opflex::modb::URI> getTargetURI()
112 {
113 if (isTargetSet())
114 return getObjectInstance().getReference(2293763ul).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
147 modelgbp::span::LocalEpToEpRSrc& setTargetL2Ep(const opflex::modb::URI& uri)
148 {
149 getTLMutator().modify(getClassId(), getURI())->setReference(2293763ul, 99, uri);
150 return *this;
151 }
152
171 const std::string& eprL2EpContext,
172 const opflex::modb::MAC& eprL2EpMac)
173 {
174 getTLMutator().modify(getClassId(), getURI())->setReference(2293763ul, 99, opflex::modb::URIBuilder().addElement("EprL2Universe").addElement("EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).build());
175 return *this;
176 }
177
187 modelgbp::span::LocalEpToEpRSrc& setTargetL3Ep(const opflex::modb::URI& uri)
188 {
189 getTLMutator().modify(getClassId(), getURI())->setReference(2293763ul, 101, uri);
190 return *this;
191 }
192
211 const std::string& eprL3EpContext,
212 const std::string& eprL3EpIp)
213 {
214 getTLMutator().modify(getClassId(), getURI())->setReference(2293763ul, 101, opflex::modb::URIBuilder().addElement("EprL3Universe").addElement("EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
215 return *this;
216 }
217
225 {
226 getTLMutator().modify(getClassId(), getURI())->unset(2293763ul, opflex::modb::PropertyInfo::REFERENCE, opflex::modb::PropertyInfo::SCALAR);
227 return *this;
228 }
229
235 {
236 return getObjectInstance().isSet(2293761ul, opflex::modb::PropertyInfo::ENUM8);
237 }
238
243 boost::optional<const uint8_t> getType()
244 {
245 if (isTypeSet())
246 return (const uint8_t)getObjectInstance().getUInt64(2293761ul);
247 return boost::none;
248 }
249
255 const uint8_t getType(const uint8_t defaultValue)
256 {
257 return getType().get_value_or(defaultValue);
258 }
259
269 {
270 getTLMutator().modify(getClassId(), getURI())->setUInt64(2293761ul, newValue);
271 return *this;
272 }
273
281 {
282 getTLMutator().modify(getClassId(), getURI())->unset(2293761ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
283 return *this;
284 }
285
297 static boost::optional<OF_SHARED_PTR<modelgbp::span::LocalEpToEpRSrc> > resolve(
298 opflex::ofcore::OFFramework& framework,
299 const opflex::modb::URI& uri)
300 {
301 return opflex::modb::mointernal::MO::resolve<modelgbp::span::LocalEpToEpRSrc>(framework, CLASS_ID, uri);
302 }
303
315 static boost::optional<OF_SHARED_PTR<modelgbp::span::LocalEpToEpRSrc> > resolve(
316 const opflex::modb::URI& uri)
317 {
318 return opflex::modb::mointernal::MO::resolve<modelgbp::span::LocalEpToEpRSrc>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
319 }
320
339 static boost::optional<OF_SHARED_PTR<modelgbp::span::LocalEpToEpRSrc> > resolve(
340 opflex::ofcore::OFFramework& framework,
341 const std::string& platformConfigName,
342 const std::string& spanLocalEpName)
343 {
344 return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PlatformConfig").addElement(platformConfigName).addElement("SpanLocalEp").addElement(spanLocalEpName).addElement("SpanLocalEpToEpRSrc").build());
345 }
346
364 static boost::optional<OF_SHARED_PTR<modelgbp::span::LocalEpToEpRSrc> > resolve(
365 const std::string& platformConfigName,
366 const std::string& spanLocalEpName)
367 {
368 return resolve(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,spanLocalEpName);
369 }
370
379 void remove()
380 {
381 getTLMutator().remove(CLASS_ID, getURI());
382 }
383
394 static void remove(opflex::ofcore::OFFramework& framework,
395 const opflex::modb::URI& uri)
396 {
397 MO::remove(framework, CLASS_ID, uri);
398 }
399
410 static void remove(const opflex::modb::URI& uri)
411 {
412 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
413 }
414
431 static void remove(
432 opflex::ofcore::OFFramework& framework,
433 const std::string& platformConfigName,
434 const std::string& spanLocalEpName)
435 {
436 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PlatformConfig").addElement(platformConfigName).addElement("SpanLocalEp").addElement(spanLocalEpName).addElement("SpanLocalEpToEpRSrc").build());
437 }
438
455 static void remove(
456 const std::string& platformConfigName,
457 const std::string& spanLocalEpName)
458 {
459 remove(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,spanLocalEpName);
460 }
461
473 static void registerListener(
474 opflex::ofcore::OFFramework& framework,
475 opflex::modb::ObjectListener* listener)
476 {
477 opflex::modb::mointernal
478 ::MO::registerListener(framework, listener, CLASS_ID);
479 }
480
492 static void registerListener(
493 opflex::modb::ObjectListener* listener)
494 {
495 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
496 }
497
505 opflex::ofcore::OFFramework& framework,
506 opflex::modb::ObjectListener* listener)
507 {
508 opflex::modb::mointernal
509 ::MO::unregisterListener(framework, listener, CLASS_ID);
510 }
511
519 opflex::modb::ObjectListener* listener)
520 {
521 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
522 }
523
529 opflex::ofcore::OFFramework& framework,
530 const opflex::modb::URI& uri,
531 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
532 : MO(framework, CLASS_ID, uri, oi) { }
533}; // class LocalEpToEpRSrc
534
535} // namespace span
536} // namespace modelgbp
537#endif // GI_SPAN_LOCALEPTOEPRSRC_HPP
Definition LocalEpToEpRSrc.hpp:23
bool isTargetSet()
Check whether target has been set.
Definition LocalEpToEpRSrc.hpp:91
boost::optional< opflex::modb::class_id_t > getTargetClass()
Get the value of targetClass if it has been set.
Definition LocalEpToEpRSrc.hpp:100
static void remove(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanLocalEpName)
Remove the LocalEpToEpRSrc object with the specified path elements from the managed object store.
Definition LocalEpToEpRSrc.hpp:431
void remove()
Remove this instance using the currently-active mutator.
Definition LocalEpToEpRSrc.hpp:379
boost::optional< const uint8_t > getRole()
Get the value of role if it has been set.
Definition LocalEpToEpRSrc.hpp:44
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for LocalEpToEpRSrc.
Definition LocalEpToEpRSrc.hpp:29
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition LocalEpToEpRSrc.hpp:504
modelgbp::span::LocalEpToEpRSrc & setTargetL2Ep(const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac)
Set the reference to point to an instance of L2Ep in the currently-active mutator by constructing its...
Definition LocalEpToEpRSrc.hpp:170
static boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEpToEpRSrc > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of LocalEpToEpRSrc from the managed object store using the default framework ins...
Definition LocalEpToEpRSrc.hpp:315
modelgbp::span::LocalEpToEpRSrc & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition LocalEpToEpRSrc.hpp:268
modelgbp::span::LocalEpToEpRSrc & setTargetL2Ep(const opflex::modb::URI &uri)
Set the reference to point to an instance of L2Ep with the specified URI.
Definition LocalEpToEpRSrc.hpp:147
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 LocalEpToEpRSrc.hpp:473
static boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEpToEpRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalEpToEpRSrc from the managed object store.
Definition LocalEpToEpRSrc.hpp:297
static boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEpToEpRSrc > > resolve(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanLocalEpName)
Retrieve an instance of LocalEpToEpRSrc from the managed object store by constructing its URI from th...
Definition LocalEpToEpRSrc.hpp:339
const uint8_t getRole(const uint8_t defaultValue)
Get the value of role if set, otherwise the value of default passed in.
Definition LocalEpToEpRSrc.hpp:56
modelgbp::span::LocalEpToEpRSrc & setTargetL3Ep(const opflex::modb::URI &uri)
Set the reference to point to an instance of L3Ep with the specified URI.
Definition LocalEpToEpRSrc.hpp:187
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 LocalEpToEpRSrc.hpp:123
boost::optional< opflex::modb::URI > getTargetURI()
Get the value of targetURI if it has been set.
Definition LocalEpToEpRSrc.hpp:111
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition LocalEpToEpRSrc.hpp:518
bool isTypeSet()
Check whether type has been set.
Definition LocalEpToEpRSrc.hpp:234
static void remove(const std::string &platformConfigName, const std::string &spanLocalEpName)
Remove the LocalEpToEpRSrc object with the specified path elements from the managed object store usin...
Definition LocalEpToEpRSrc.hpp:455
bool isRoleSet()
Check whether role has been set.
Definition LocalEpToEpRSrc.hpp:35
modelgbp::span::LocalEpToEpRSrc & setTargetL3Ep(const std::string &eprL3EpContext, const std::string &eprL3EpIp)
Set the reference to point to an instance of L3Ep in the currently-active mutator by constructing its...
Definition LocalEpToEpRSrc.hpp:210
static boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEpToEpRSrc > > resolve(const std::string &platformConfigName, const std::string &spanLocalEpName)
Retrieve an instance of LocalEpToEpRSrc from the default managed object store by constructing its URI...
Definition LocalEpToEpRSrc.hpp:364
LocalEpToEpRSrc(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of LocalEpToEpRSrc.
Definition LocalEpToEpRSrc.hpp:528
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 LocalEpToEpRSrc.hpp:492
static void remove(const opflex::modb::URI &uri)
Remove the LocalEpToEpRSrc object with the specified URI using the currently-active mutator and the d...
Definition LocalEpToEpRSrc.hpp:410
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the LocalEpToEpRSrc object with the specified URI using the currently-active mutator.
Definition LocalEpToEpRSrc.hpp:394
modelgbp::span::LocalEpToEpRSrc & unsetTarget()
Unset target in the currently-active mutator.
Definition LocalEpToEpRSrc.hpp:224
const uint8_t getType(const uint8_t defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition LocalEpToEpRSrc.hpp:255
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition LocalEpToEpRSrc.hpp:243
modelgbp::span::LocalEpToEpRSrc & unsetType()
Unset type in the currently-active mutator.
Definition LocalEpToEpRSrc.hpp:280
modelgbp::span::LocalEpToEpRSrc & unsetRole()
Unset role in the currently-active mutator.
Definition LocalEpToEpRSrc.hpp:81
opflex::modb::URI getTargetURI(opflex::modb::URI defaultValue)
Get the value of targetURI if set, otherwise the value of default passed in.
Definition LocalEpToEpRSrc.hpp:133
modelgbp::span::LocalEpToEpRSrc & setRole(const uint8_t newValue)
Set role to the specified value in the currently-active mutator.
Definition LocalEpToEpRSrc.hpp:69
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12