11 #ifndef GI_DCI_ROUTETARGETDEF_HPP 12 #define GI_DCI_ROUTETARGETDEF_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 22 :
public opflex::modb::mointernal::MO
29 static const opflex::modb::class_id_t
CLASS_ID = 75;
37 return getObjectInstance().isSet(2457601ul, opflex::modb::PropertyInfo::STRING);
44 boost::optional<const std::string&>
getName()
47 return getObjectInstance().getString(2457601ul);
56 const std::string&
getName(
const std::string& defaultValue)
58 return getName().get_value_or(defaultValue);
71 getTLMutator().modify(getClassId(), getURI())->setString(2457601ul, newValue);
83 getTLMutator().modify(getClassId(), getURI())->unset(2457601ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
93 return getObjectInstance().isSet(2457604ul, opflex::modb::PropertyInfo::U64);
103 return (uint16_t)getObjectInstance().getUInt64(2457604ul);
114 return getRtAS().get_value_or(defaultValue);
127 getTLMutator().modify(getClassId(), getURI())->setUInt64(2457604ul, newValue);
139 getTLMutator().modify(getClassId(), getURI())->unset(2457604ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
149 return getObjectInstance().isSet(2457605ul, opflex::modb::PropertyInfo::U64);
159 return (uint32_t)getObjectInstance().getUInt64(2457605ul);
170 return getRtNN().get_value_or(defaultValue);
183 getTLMutator().modify(getClassId(), getURI())->setUInt64(2457605ul, newValue);
195 getTLMutator().modify(getClassId(), getURI())->unset(2457605ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
205 return getObjectInstance().isSet(2457602ul, opflex::modb::PropertyInfo::ENUM8);
215 return (
const uint8_t)getObjectInstance().getUInt64(2457602ul);
239 getTLMutator().modify(getClassId(), getURI())->setUInt64(2457602ul, newValue);
251 getTLMutator().modify(getClassId(), getURI())->unset(2457602ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
261 return getObjectInstance().isSet(2457603ul, opflex::modb::PropertyInfo::ENUM8);
271 return (
const uint8_t)getObjectInstance().getUInt64(2457603ul);
280 const uint8_t
getType(
const uint8_t defaultValue)
282 return getType().get_value_or(defaultValue);
295 getTLMutator().modify(getClassId(), getURI())->setUInt64(2457603ul, newValue);
307 getTLMutator().modify(getClassId(), getURI())->unset(2457603ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
322 static boost::optional<boost::shared_ptr<modelgbp::dci::RouteTargetDef> >
resolve(
323 opflex::ofcore::OFFramework& framework,
324 const opflex::modb::URI& uri)
326 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::RouteTargetDef>(framework,
CLASS_ID, uri);
340 static boost::optional<boost::shared_ptr<modelgbp::dci::RouteTargetDef> >
resolve(
341 const opflex::modb::URI& uri)
343 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::RouteTargetDef>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
368 static boost::optional<boost::shared_ptr<modelgbp::dci::RouteTargetDef> >
resolve(
369 opflex::ofcore::OFFramework& framework,
370 const std::string& policySpaceName,
371 const std::string& gbpRoutingDomainName,
372 const std::string& dciRouteTargetPdefName,
373 const std::string& dciRouteTargetDefName)
375 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement(
"DciRouteTargetPdef").addElement(dciRouteTargetPdefName).addElement(
"DciRouteTargetDef").addElement(dciRouteTargetDefName).build());
399 static boost::optional<boost::shared_ptr<modelgbp::dci::RouteTargetDef> >
resolve(
400 const std::string& policySpaceName,
401 const std::string& gbpRoutingDomainName,
402 const std::string& dciRouteTargetPdefName,
403 const std::string& dciRouteTargetDefName)
405 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,dciRouteTargetPdefName,dciRouteTargetDefName);
418 getTLMutator().remove(CLASS_ID, getURI());
431 static void remove(opflex::ofcore::OFFramework& framework,
432 const opflex::modb::URI& uri)
434 MO::remove(framework, CLASS_ID, uri);
447 static void remove(
const opflex::modb::URI& uri)
449 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
473 opflex::ofcore::OFFramework& framework,
474 const std::string& policySpaceName,
475 const std::string& gbpRoutingDomainName,
476 const std::string& dciRouteTargetPdefName,
477 const std::string& dciRouteTargetDefName)
479 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement(
"DciRouteTargetPdef").addElement(dciRouteTargetPdefName).addElement(
"DciRouteTargetDef").addElement(dciRouteTargetDefName).build());
503 const std::string& policySpaceName,
504 const std::string& gbpRoutingDomainName,
505 const std::string& dciRouteTargetPdefName,
506 const std::string& dciRouteTargetDefName)
508 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,dciRouteTargetPdefName,dciRouteTargetDefName);
523 opflex::ofcore::OFFramework& framework,
524 opflex::modb::ObjectListener* listener)
526 opflex::modb::mointernal
527 ::MO::registerListener(framework, listener, CLASS_ID);
542 opflex::modb::ObjectListener* listener)
554 opflex::ofcore::OFFramework& framework,
555 opflex::modb::ObjectListener* listener)
557 opflex::modb::mointernal
558 ::MO::unregisterListener(framework, listener, CLASS_ID);
568 opflex::modb::ObjectListener* listener)
578 opflex::ofcore::OFFramework& framework,
579 const opflex::modb::URI& uri,
580 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
581 : MO(framework, CLASS_ID, uri, oi) { }
586 #endif // GI_DCI_ROUTETARGETDEF_HPP const uint8_t getType(const uint8_t defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition: RouteTargetDef.hpp:280
bool isNameSet()
Check whether name has been set.
Definition: RouteTargetDef.hpp:35
modelgbp::dci::RouteTargetDef & unsetName()
Unset name in the currently-active mutator.
Definition: RouteTargetDef.hpp:81
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: RouteTargetDef.hpp:522
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: RouteTargetDef.hpp:56
static boost::optional< boost::shared_ptr< modelgbp::dci::RouteTargetDef > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of RouteTargetDef from the managed object store using the default framework inst...
Definition: RouteTargetDef.hpp:340
modelgbp::dci::RouteTargetDef & unsetTargetAf()
Unset targetAf in the currently-active mutator.
Definition: RouteTargetDef.hpp:249
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: RouteTargetDef.hpp:44
RouteTargetDef(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of RouteTargetDef.
Definition: RouteTargetDef.hpp:577
modelgbp::dci::RouteTargetDef & setTargetAf(const uint8_t newValue)
Set targetAf to the specified value in the currently-active mutator.
Definition: RouteTargetDef.hpp:237
modelgbp::dci::RouteTargetDef & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition: RouteTargetDef.hpp:293
static boost::optional< boost::shared_ptr< modelgbp::dci::RouteTargetDef > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RouteTargetDef from the managed object store.
Definition: RouteTargetDef.hpp:322
bool isRtNNSet()
Check whether rtNN has been set.
Definition: RouteTargetDef.hpp:147
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: RouteTargetDef.hpp:567
boost::optional< uint16_t > getRtAS()
Get the value of rtAS if it has been set.
Definition: RouteTargetDef.hpp:100
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: RouteTargetDef.hpp:553
boost::optional< const uint8_t > getTargetAf()
Get the value of targetAf if it has been set.
Definition: RouteTargetDef.hpp:212
modelgbp::dci::RouteTargetDef & setRtAS(uint16_t newValue)
Set rtAS to the specified value in the currently-active mutator.
Definition: RouteTargetDef.hpp:125
bool isTargetAfSet()
Check whether targetAf has been set.
Definition: RouteTargetDef.hpp:203
modelgbp::dci::RouteTargetDef & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: RouteTargetDef.hpp:69
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for RouteTargetDef.
Definition: RouteTargetDef.hpp:29
modelgbp::dci::RouteTargetDef & unsetRtAS()
Unset rtAS in the currently-active mutator.
Definition: RouteTargetDef.hpp:137
const uint8_t getTargetAf(const uint8_t defaultValue)
Get the value of targetAf if set, otherwise the value of default passed in.
Definition: RouteTargetDef.hpp:224
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition: RouteTargetDef.hpp:268
boost::optional< uint32_t > getRtNN()
Get the value of rtNN if it has been set.
Definition: RouteTargetDef.hpp:156
modelgbp::dci::RouteTargetDef & unsetRtNN()
Unset rtNN in the currently-active mutator.
Definition: RouteTargetDef.hpp:193
Definition: RouteTargetDef.hpp:21
bool isRtASSet()
Check whether rtAS has been set.
Definition: RouteTargetDef.hpp:91
modelgbp::dci::RouteTargetDef & unsetType()
Unset type in the currently-active mutator.
Definition: RouteTargetDef.hpp:305
static boost::optional< boost::shared_ptr< modelgbp::dci::RouteTargetDef > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciRouteTargetPdefName, const std::string &dciRouteTargetDefName)
Retrieve an instance of RouteTargetDef from the managed object store by constructing its URI from the...
Definition: RouteTargetDef.hpp:368
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: RouteTargetDef.hpp:541
bool isTypeSet()
Check whether type has been set.
Definition: RouteTargetDef.hpp:259
modelgbp::dci::RouteTargetDef & setRtNN(uint32_t newValue)
Set rtNN to the specified value in the currently-active mutator.
Definition: RouteTargetDef.hpp:181
uint16_t getRtAS(uint16_t defaultValue)
Get the value of rtAS if set, otherwise the value of default passed in.
Definition: RouteTargetDef.hpp:112
static boost::optional< boost::shared_ptr< modelgbp::dci::RouteTargetDef > > resolve(const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciRouteTargetPdefName, const std::string &dciRouteTargetDefName)
Retrieve an instance of RouteTargetDef from the default managed object store by constructing its URI ...
Definition: RouteTargetDef.hpp:399
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
uint32_t getRtNN(uint32_t defaultValue)
Get the value of rtNN if set, otherwise the value of default passed in.
Definition: RouteTargetDef.hpp:168