11 #ifndef GI_GBP_SUBNET_HPP 12 #define GI_GBP_SUBNET_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 = 195;
37 return getObjectInstance().isSet(6389762ul, opflex::modb::PropertyInfo::STRING);
47 return getObjectInstance().getString(6389762ul);
56 const std::string&
getAddress(
const std::string& defaultValue)
58 return getAddress().get_value_or(defaultValue);
71 getTLMutator().modify(getClassId(), getURI())->setString(6389762ul, newValue);
83 getTLMutator().modify(getClassId(), getURI())->unset(6389762ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
93 return getObjectInstance().isSet(6389766ul, opflex::modb::PropertyInfo::U64);
103 return (
const uint8_t)getObjectInstance().getUInt64(6389766ul);
127 getTLMutator().modify(getClassId(), getURI())->setUInt64(6389766ul, newValue);
139 getTLMutator().modify(getClassId(), getURI())->unset(6389766ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
149 return getObjectInstance().isSet(6389767ul, opflex::modb::PropertyInfo::U64);
159 return (uint32_t)getObjectInstance().getUInt64(6389767ul);
183 getTLMutator().modify(getClassId(), getURI())->setUInt64(6389767ul, newValue);
195 getTLMutator().modify(getClassId(), getURI())->unset(6389767ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
205 return getObjectInstance().isSet(6389765ul, opflex::modb::PropertyInfo::U64);
215 return (uint32_t)getObjectInstance().getUInt64(6389765ul);
239 getTLMutator().modify(getClassId(), getURI())->setUInt64(6389765ul, newValue);
251 getTLMutator().modify(getClassId(), getURI())->unset(6389765ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
261 return getObjectInstance().isSet(6389761ul, opflex::modb::PropertyInfo::STRING);
271 return getObjectInstance().getString(6389761ul);
280 const std::string&
getName(
const std::string& defaultValue)
282 return getName().get_value_or(defaultValue);
295 getTLMutator().modify(getClassId(), getURI())->setString(6389761ul, newValue);
307 getTLMutator().modify(getClassId(), getURI())->unset(6389761ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
317 return getObjectInstance().isSet(6389763ul, opflex::modb::PropertyInfo::U64);
327 return (
const uint8_t)getObjectInstance().getUInt64(6389763ul);
351 getTLMutator().modify(getClassId(), getURI())->setUInt64(6389763ul, newValue);
363 getTLMutator().modify(getClassId(), getURI())->unset(6389763ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
373 return getObjectInstance().isSet(6389764ul, opflex::modb::PropertyInfo::STRING);
383 return getObjectInstance().getString(6389764ul);
407 getTLMutator().modify(getClassId(), getURI())->setString(6389764ul, newValue);
419 getTLMutator().modify(getClassId(), getURI())->unset(6389764ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
434 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Subnet> >
resolve(
435 opflex::ofcore::OFFramework& framework,
436 const opflex::modb::URI& uri)
438 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::Subnet>(framework,
CLASS_ID, uri);
452 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Subnet> >
resolve(
453 const opflex::modb::URI& uri)
455 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::Subnet>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
478 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Subnet> >
resolve(
479 opflex::ofcore::OFFramework& framework,
480 const std::string& policySpaceName,
481 const std::string& gbpSubnetsName,
482 const std::string& gbpSubnetName)
484 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSubnets").addElement(gbpSubnetsName).addElement(
"GbpSubnet").addElement(gbpSubnetName).build());
506 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Subnet> >
resolve(
507 const std::string& policySpaceName,
508 const std::string& gbpSubnetsName,
509 const std::string& gbpSubnetName)
511 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSubnetsName,gbpSubnetName);
524 getTLMutator().remove(
CLASS_ID, getURI());
537 static void remove(opflex::ofcore::OFFramework& framework,
538 const opflex::modb::URI& uri)
540 MO::remove(framework,
CLASS_ID, uri);
553 static void remove(
const opflex::modb::URI& uri)
555 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
577 opflex::ofcore::OFFramework& framework,
578 const std::string& policySpaceName,
579 const std::string& gbpSubnetsName,
580 const std::string& gbpSubnetName)
582 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSubnets").addElement(gbpSubnetsName).addElement(
"GbpSubnet").addElement(gbpSubnetName).build());
604 const std::string& policySpaceName,
605 const std::string& gbpSubnetsName,
606 const std::string& gbpSubnetName)
608 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSubnetsName,gbpSubnetName);
623 opflex::ofcore::OFFramework& framework,
624 opflex::modb::ObjectListener* listener)
626 opflex::modb::mointernal
627 ::MO::registerListener(framework, listener,
CLASS_ID);
642 opflex::modb::ObjectListener* listener)
654 opflex::ofcore::OFFramework& framework,
655 opflex::modb::ObjectListener* listener)
657 opflex::modb::mointernal
658 ::MO::unregisterListener(framework, listener,
CLASS_ID);
668 opflex::modb::ObjectListener* listener)
678 opflex::ofcore::OFFramework& framework,
679 const opflex::modb::URI& uri,
680 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
681 : MO(framework,
CLASS_ID, uri, oi) { }
686 #endif // GI_GBP_SUBNET_HPP bool isIpv6AdvAutonomousFlagSet()
Check whether ipv6AdvAutonomousFlag has been set.
Definition: Subnet.hpp:91
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Subnet.
Definition: Subnet.hpp:29
uint32_t getIpv6AdvPreferredLifetime(uint32_t defaultValue)
Get the value of ipv6AdvPreferredLifetime if set, otherwise the value of default passed in...
Definition: Subnet.hpp:168
modelgbp::gbp::Subnet & unsetAddress()
Unset address in the currently-active mutator.
Definition: Subnet.hpp:81
bool isAddressSet()
Check whether address has been set.
Definition: Subnet.hpp:35
boost::optional< uint32_t > getIpv6AdvValidLifetime()
Get the value of ipv6AdvValidLifetime if it has been set.
Definition: Subnet.hpp:212
uint32_t getIpv6AdvValidLifetime(uint32_t defaultValue)
Get the value of ipv6AdvValidLifetime if set, otherwise the value of default passed in...
Definition: Subnet.hpp:224
boost::optional< const std::string & > getVirtualRouterIp()
Get the value of virtualRouterIp if it has been set.
Definition: Subnet.hpp:380
bool isPrefixLenSet()
Check whether prefixLen has been set.
Definition: Subnet.hpp:315
modelgbp::gbp::Subnet & setAddress(const std::string &newValue)
Set address to the specified value in the currently-active mutator.
Definition: Subnet.hpp:69
modelgbp::gbp::Subnet & unsetIpv6AdvValidLifetime()
Unset ipv6AdvValidLifetime in the currently-active mutator.
Definition: Subnet.hpp:249
modelgbp::gbp::Subnet & unsetName()
Unset name in the currently-active mutator.
Definition: Subnet.hpp:305
modelgbp::gbp::Subnet & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: Subnet.hpp:293
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: Subnet.hpp:268
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: Subnet.hpp:667
const std::string & getVirtualRouterIp(const std::string &defaultValue)
Get the value of virtualRouterIp if set, otherwise the value of default passed in.
Definition: Subnet.hpp:392
boost::optional< const std::string & > getAddress()
Get the value of address if it has been set.
Definition: Subnet.hpp:44
modelgbp::gbp::Subnet & unsetIpv6AdvAutonomousFlag()
Unset ipv6AdvAutonomousFlag in the currently-active mutator.
Definition: Subnet.hpp:137
modelgbp::gbp::Subnet & unsetPrefixLen()
Unset prefixLen in the currently-active mutator.
Definition: Subnet.hpp:361
boost::optional< const uint8_t > getIpv6AdvAutonomousFlag()
Get the value of ipv6AdvAutonomousFlag if it has been set.
Definition: Subnet.hpp:100
modelgbp::gbp::Subnet & unsetIpv6AdvPreferredLifetime()
Unset ipv6AdvPreferredLifetime in the currently-active mutator.
Definition: Subnet.hpp:193
const uint8_t getPrefixLen(const uint8_t defaultValue)
Get the value of prefixLen if set, otherwise the value of default passed in.
Definition: Subnet.hpp:336
bool isVirtualRouterIpSet()
Check whether virtualRouterIp has been set.
Definition: Subnet.hpp:371
const uint8_t getIpv6AdvAutonomousFlag(const uint8_t defaultValue)
Get the value of ipv6AdvAutonomousFlag if set, otherwise the value of default passed in...
Definition: Subnet.hpp:112
modelgbp::gbp::Subnet & setVirtualRouterIp(const std::string &newValue)
Set virtualRouterIp to the specified value in the currently-active mutator.
Definition: Subnet.hpp:405
const std::string & getAddress(const std::string &defaultValue)
Get the value of address if set, otherwise the value of default passed in.
Definition: Subnet.hpp:56
bool isNameSet()
Check whether name has been set.
Definition: Subnet.hpp:259
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::Subnet > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Subnet from the managed object store.
Definition: Subnet.hpp:434
modelgbp::gbp::Subnet & setIpv6AdvAutonomousFlag(const uint8_t newValue)
Set ipv6AdvAutonomousFlag to the specified value in the currently-active mutator. ...
Definition: Subnet.hpp:125
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: Subnet.hpp:622
modelgbp::gbp::Subnet & setIpv6AdvValidLifetime(uint32_t newValue)
Set ipv6AdvValidLifetime to the specified value in the currently-active mutator.
Definition: Subnet.hpp:237
bool isIpv6AdvValidLifetimeSet()
Check whether ipv6AdvValidLifetime has been set.
Definition: Subnet.hpp:203
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::Subnet > > resolve(const std::string &policySpaceName, const std::string &gbpSubnetsName, const std::string &gbpSubnetName)
Retrieve an instance of Subnet from the default managed object store by constructing its URI from the...
Definition: Subnet.hpp:506
Subnet(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Subnet.
Definition: Subnet.hpp:677
boost::optional< uint32_t > getIpv6AdvPreferredLifetime()
Get the value of ipv6AdvPreferredLifetime if it has been set.
Definition: Subnet.hpp:156
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::Subnet > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Subnet from the managed object store using the default framework instance...
Definition: Subnet.hpp:452
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: Subnet.hpp:653
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: Subnet.hpp:641
modelgbp::gbp::Subnet & unsetVirtualRouterIp()
Unset virtualRouterIp in the currently-active mutator.
Definition: Subnet.hpp:417
boost::optional< const uint8_t > getPrefixLen()
Get the value of prefixLen if it has been set.
Definition: Subnet.hpp:324
Definition: Subnet.hpp:21
modelgbp::gbp::Subnet & setIpv6AdvPreferredLifetime(uint32_t newValue)
Set ipv6AdvPreferredLifetime to the specified value in the currently-active mutator.
Definition: Subnet.hpp:181
modelgbp::gbp::Subnet & setPrefixLen(const uint8_t newValue)
Set prefixLen to the specified value in the currently-active mutator.
Definition: Subnet.hpp:349
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::Subnet > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpSubnetsName, const std::string &gbpSubnetName)
Retrieve an instance of Subnet from the managed object store by constructing its URI from the path el...
Definition: Subnet.hpp:478
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: Subnet.hpp:280
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
bool isIpv6AdvPreferredLifetimeSet()
Check whether ipv6AdvPreferredLifetime has been set.
Definition: Subnet.hpp:147