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 (uint32_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::STRING);
159 return getObjectInstance().getString(2457605ul);
168 const std::string&
getRtIP(
const std::string& defaultValue)
170 return getRtIP().get_value_or(defaultValue);
183 getTLMutator().modify(getClassId(), getURI())->setString(2457605ul, newValue);
195 getTLMutator().modify(getClassId(), getURI())->unset(2457605ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
205 return getObjectInstance().isSet(2457606ul, opflex::modb::PropertyInfo::U64);
215 return (uint32_t)getObjectInstance().getUInt64(2457606ul);
226 return getRtNN().get_value_or(defaultValue);
239 getTLMutator().modify(getClassId(), getURI())->setUInt64(2457606ul, newValue);
251 getTLMutator().modify(getClassId(), getURI())->unset(2457606ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
261 return getObjectInstance().isSet(2457602ul, opflex::modb::PropertyInfo::ENUM8);
271 return (
const uint8_t)getObjectInstance().getUInt64(2457602ul);
295 getTLMutator().modify(getClassId(), getURI())->setUInt64(2457602ul, newValue);
307 getTLMutator().modify(getClassId(), getURI())->unset(2457602ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
317 return getObjectInstance().isSet(2457603ul, opflex::modb::PropertyInfo::ENUM8);
327 return (
const uint8_t)getObjectInstance().getUInt64(2457603ul);
336 const uint8_t
getType(
const uint8_t defaultValue)
338 return getType().get_value_or(defaultValue);
351 getTLMutator().modify(getClassId(), getURI())->setUInt64(2457603ul, newValue);
363 getTLMutator().modify(getClassId(), getURI())->unset(2457603ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
378 static boost::optional<boost::shared_ptr<modelgbp::dci::RouteTargetDef> >
resolve(
379 opflex::ofcore::OFFramework& framework,
380 const opflex::modb::URI& uri)
382 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::RouteTargetDef>(framework,
CLASS_ID, uri);
396 static boost::optional<boost::shared_ptr<modelgbp::dci::RouteTargetDef> >
resolve(
397 const opflex::modb::URI& uri)
399 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::RouteTargetDef>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
424 static boost::optional<boost::shared_ptr<modelgbp::dci::RouteTargetDef> >
resolve(
425 opflex::ofcore::OFFramework& framework,
426 const std::string& policySpaceName,
427 const std::string& gbpRoutingDomainName,
428 const std::string& dciRouteTargetPdefName,
429 const std::string& dciRouteTargetDefName)
431 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());
455 static boost::optional<boost::shared_ptr<modelgbp::dci::RouteTargetDef> >
resolve(
456 const std::string& policySpaceName,
457 const std::string& gbpRoutingDomainName,
458 const std::string& dciRouteTargetPdefName,
459 const std::string& dciRouteTargetDefName)
461 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,dciRouteTargetPdefName,dciRouteTargetDefName);
474 getTLMutator().remove(
CLASS_ID, getURI());
487 static void remove(opflex::ofcore::OFFramework& framework,
488 const opflex::modb::URI& uri)
490 MO::remove(framework,
CLASS_ID, uri);
503 static void remove(
const opflex::modb::URI& uri)
505 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
529 opflex::ofcore::OFFramework& framework,
530 const std::string& policySpaceName,
531 const std::string& gbpRoutingDomainName,
532 const std::string& dciRouteTargetPdefName,
533 const std::string& dciRouteTargetDefName)
535 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());
559 const std::string& policySpaceName,
560 const std::string& gbpRoutingDomainName,
561 const std::string& dciRouteTargetPdefName,
562 const std::string& dciRouteTargetDefName)
564 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,dciRouteTargetPdefName,dciRouteTargetDefName);
579 opflex::ofcore::OFFramework& framework,
580 opflex::modb::ObjectListener* listener)
582 opflex::modb::mointernal
583 ::MO::registerListener(framework, listener,
CLASS_ID);
598 opflex::modb::ObjectListener* listener)
610 opflex::ofcore::OFFramework& framework,
611 opflex::modb::ObjectListener* listener)
613 opflex::modb::mointernal
614 ::MO::unregisterListener(framework, listener,
CLASS_ID);
624 opflex::modb::ObjectListener* listener)
634 opflex::ofcore::OFFramework& framework,
635 const opflex::modb::URI& uri,
636 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
637 : MO(framework,
CLASS_ID, uri, oi) { }
642 #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:336
boost::optional< uint32_t > getRtAS()
Get the value of rtAS if it has been set.
Definition: RouteTargetDef.hpp:100
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
modelgbp::dci::RouteTargetDef & setRtIP(const std::string &newValue)
Set rtIP to the specified value in the currently-active mutator.
Definition: RouteTargetDef.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: RouteTargetDef.hpp:578
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:396
modelgbp::dci::RouteTargetDef & unsetTargetAf()
Unset targetAf in the currently-active mutator.
Definition: RouteTargetDef.hpp:305
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:633
modelgbp::dci::RouteTargetDef & setTargetAf(const uint8_t newValue)
Set targetAf to the specified value in the currently-active mutator.
Definition: RouteTargetDef.hpp:293
modelgbp::dci::RouteTargetDef & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition: RouteTargetDef.hpp:349
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:378
bool isRtNNSet()
Check whether rtNN has been set.
Definition: RouteTargetDef.hpp:203
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: RouteTargetDef.hpp:623
modelgbp::dci::RouteTargetDef & setRtAS(uint32_t newValue)
Set rtAS to the specified value in the currently-active mutator.
Definition: RouteTargetDef.hpp:125
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: RouteTargetDef.hpp:609
boost::optional< const uint8_t > getTargetAf()
Get the value of targetAf if it has been set.
Definition: RouteTargetDef.hpp:268
bool isTargetAfSet()
Check whether targetAf has been set.
Definition: RouteTargetDef.hpp:259
const std::string & getRtIP(const std::string &defaultValue)
Get the value of rtIP if set, otherwise the value of default passed in.
Definition: RouteTargetDef.hpp:168
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
uint32_t getRtAS(uint32_t defaultValue)
Get the value of rtAS if set, otherwise the value of default passed in.
Definition: RouteTargetDef.hpp:112
modelgbp::dci::RouteTargetDef & unsetRtAS()
Unset rtAS in the currently-active mutator.
Definition: RouteTargetDef.hpp:137
bool isRtIPSet()
Check whether rtIP has been set.
Definition: RouteTargetDef.hpp:147
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:280
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition: RouteTargetDef.hpp:324
boost::optional< uint32_t > getRtNN()
Get the value of rtNN if it has been set.
Definition: RouteTargetDef.hpp:212
modelgbp::dci::RouteTargetDef & unsetRtNN()
Unset rtNN in the currently-active mutator.
Definition: RouteTargetDef.hpp:249
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:361
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:424
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:597
modelgbp::dci::RouteTargetDef & unsetRtIP()
Unset rtIP in the currently-active mutator.
Definition: RouteTargetDef.hpp:193
boost::optional< const std::string & > getRtIP()
Get the value of rtIP if it has been set.
Definition: RouteTargetDef.hpp:156
bool isTypeSet()
Check whether type has been set.
Definition: RouteTargetDef.hpp:315
modelgbp::dci::RouteTargetDef & setRtNN(uint32_t newValue)
Set rtNN to the specified value in the currently-active mutator.
Definition: RouteTargetDef.hpp:237
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:455
uint32_t getRtNN(uint32_t defaultValue)
Get the value of rtNN if set, otherwise the value of default passed in.
Definition: RouteTargetDef.hpp:224