11 #ifndef GI_DCI_ROUTETARGETPDEF_HPP 12 #define GI_DCI_ROUTETARGETPDEF_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/dci/RouteTargetDef.hpp" 26 :
public opflex::modb::mointernal::MO
33 static const opflex::modb::class_id_t
CLASS_ID = 91;
41 return getObjectInstance().isSet(2981890ul, opflex::modb::PropertyInfo::ENUM8);
48 boost::optional<const uint8_t>
getAf()
51 return (
const uint8_t)getObjectInstance().getUInt64(2981890ul);
60 const uint8_t
getAf(
const uint8_t defaultValue)
62 return getAf().get_value_or(defaultValue);
75 getTLMutator().modify(getClassId(), getURI())->setUInt64(2981890ul, newValue);
87 getTLMutator().modify(getClassId(), getURI())->unset(2981890ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
97 return getObjectInstance().isSet(2981889ul, opflex::modb::PropertyInfo::STRING);
107 return getObjectInstance().getString(2981889ul);
116 const std::string&
getName(
const std::string& defaultValue)
118 return getName().get_value_or(defaultValue);
131 getTLMutator().modify(getClassId(), getURI())->setString(2981889ul, newValue);
143 getTLMutator().modify(getClassId(), getURI())->unset(2981889ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
158 static boost::optional<OF_SHARED_PTR<modelgbp::dci::RouteTargetPdef> >
resolve(
159 opflex::ofcore::OFFramework& framework,
160 const opflex::modb::URI& uri)
162 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::RouteTargetPdef>(framework,
CLASS_ID, uri);
176 static boost::optional<OF_SHARED_PTR<modelgbp::dci::RouteTargetPdef> >
resolve(
177 const opflex::modb::URI& uri)
179 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::RouteTargetPdef>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
202 static boost::optional<OF_SHARED_PTR<modelgbp::dci::RouteTargetPdef> >
resolve(
203 opflex::ofcore::OFFramework& framework,
204 const std::string& policySpaceName,
205 const std::string& gbpRoutingDomainName,
206 const std::string& dciRouteTargetPdefName)
208 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement(
"DciRouteTargetPdef").addElement(dciRouteTargetPdefName).build());
230 static boost::optional<OF_SHARED_PTR<modelgbp::dci::RouteTargetPdef> >
resolve(
231 const std::string& policySpaceName,
232 const std::string& gbpRoutingDomainName,
233 const std::string& dciRouteTargetPdefName)
235 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,dciRouteTargetPdefName);
250 const std::string& dciRouteTargetDefName)
268 const std::string& dciRouteTargetDefName)
270 OF_SHARED_PTR<modelgbp::dci::RouteTargetDef> result = addChild<modelgbp::dci::RouteTargetDef>(
271 CLASS_ID, getURI(), 2150465628ul, 92,
272 opflex::modb::URIBuilder(getURI()).addElement(
"DciRouteTargetDef").addElement(dciRouteTargetDefName).build()
274 result->setName(dciRouteTargetDefName);
294 opflex::modb::mointernal::MO::resolveChildren<modelgbp::dci::RouteTargetDef>(
295 getFramework(),
CLASS_ID, getURI(), 2150465628ul, 92, out);
308 getTLMutator().remove(
CLASS_ID, getURI());
321 static void remove(opflex::ofcore::OFFramework& framework,
322 const opflex::modb::URI& uri)
324 MO::remove(framework,
CLASS_ID, uri);
337 static void remove(
const opflex::modb::URI& uri)
339 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
361 opflex::ofcore::OFFramework& framework,
362 const std::string& policySpaceName,
363 const std::string& gbpRoutingDomainName,
364 const std::string& dciRouteTargetPdefName)
366 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement(
"DciRouteTargetPdef").addElement(dciRouteTargetPdefName).build());
388 const std::string& policySpaceName,
389 const std::string& gbpRoutingDomainName,
390 const std::string& dciRouteTargetPdefName)
392 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,dciRouteTargetPdefName);
407 opflex::ofcore::OFFramework& framework,
408 opflex::modb::ObjectListener* listener)
410 opflex::modb::mointernal
411 ::MO::registerListener(framework, listener,
CLASS_ID);
426 opflex::modb::ObjectListener* listener)
438 opflex::ofcore::OFFramework& framework,
439 opflex::modb::ObjectListener* listener)
441 opflex::modb::mointernal
442 ::MO::unregisterListener(framework, listener,
CLASS_ID);
452 opflex::modb::ObjectListener* listener)
462 opflex::ofcore::OFFramework& framework,
463 const opflex::modb::URI& uri,
464 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
465 : MO(framework,
CLASS_ID, uri, oi) { }
470 #endif // GI_DCI_ROUTETARGETPDEF_HPP modelgbp::dci::RouteTargetPdef & setAf(const uint8_t newValue)
Set af to the specified value in the currently-active mutator.
Definition: RouteTargetPdef.hpp:73
OF_SHARED_PTR< modelgbp::dci::RouteTargetDef > addDciRouteTargetDef(const std::string &dciRouteTargetDefName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: RouteTargetPdef.hpp:267
modelgbp::dci::RouteTargetPdef & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: RouteTargetPdef.hpp:129
const uint8_t getAf(const uint8_t defaultValue)
Get the value of af if set, otherwise the value of default passed in.
Definition: RouteTargetPdef.hpp:60
bool isNameSet()
Check whether name has been set.
Definition: RouteTargetPdef.hpp:95
modelgbp::dci::RouteTargetPdef & unsetAf()
Unset af in the currently-active mutator.
Definition: RouteTargetPdef.hpp:85
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: RouteTargetPdef.hpp:116
RouteTargetPdef(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of RouteTargetPdef.
Definition: RouteTargetPdef.hpp:461
modelgbp::dci::RouteTargetPdef & unsetName()
Unset name in the currently-active mutator.
Definition: RouteTargetPdef.hpp:141
bool isAfSet()
Check whether af has been set.
Definition: RouteTargetPdef.hpp:39
boost::optional< const uint8_t > getAf()
Get the value of af if it has been set.
Definition: RouteTargetPdef.hpp:48
static boost::optional< OF_SHARED_PTR< modelgbp::dci::RouteTargetPdef > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of RouteTargetPdef from the managed object store using the default framework ins...
Definition: RouteTargetPdef.hpp:176
boost::optional< OF_SHARED_PTR< modelgbp::dci::RouteTargetDef > > resolveDciRouteTargetDef(const std::string &dciRouteTargetDefName)
Retrieve the child object with the specified naming properties.
Definition: RouteTargetPdef.hpp:249
static boost::optional< OF_SHARED_PTR< modelgbp::dci::RouteTargetPdef > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciRouteTargetPdefName)
Retrieve an instance of RouteTargetPdef from the managed object store by constructing its URI from th...
Definition: RouteTargetPdef.hpp:202
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: RouteTargetPdef.hpp:451
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for RouteTargetPdef.
Definition: RouteTargetPdef.hpp:33
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: RouteTargetPdef.hpp:425
static boost::optional< OF_SHARED_PTR< modelgbp::dci::RouteTargetPdef > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RouteTargetPdef from the managed object store.
Definition: RouteTargetPdef.hpp:158
void resolveDciRouteTargetDef(std::vector< OF_SHARED_PTR< modelgbp::dci::RouteTargetDef > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::dci::RouteTargetDef.
Definition: RouteTargetPdef.hpp:292
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: RouteTargetPdef.hpp:406
static boost::optional< OF_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
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: RouteTargetPdef.hpp:437
static boost::optional< OF_SHARED_PTR< modelgbp::dci::RouteTargetPdef > > resolve(const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciRouteTargetPdefName)
Retrieve an instance of RouteTargetPdef from the default managed object store by constructing its URI...
Definition: RouteTargetPdef.hpp:230
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: RouteTargetPdef.hpp:104
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
Definition: RouteTargetPdef.hpp:25