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 = 207;
37 return getObjectInstance().isSet(6782978ul, opflex::modb::PropertyInfo::STRING);
47 return getObjectInstance().getString(6782978ul);
56 const std::string&
getAddress(
const std::string& defaultValue)
58 return getAddress().get_value_or(defaultValue);
71 getTLMutator().modify(getClassId(), getURI())->setString(6782978ul, newValue);
83 getTLMutator().modify(getClassId(), getURI())->unset(6782978ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
93 return getObjectInstance().isSet(6782983ul, opflex::modb::PropertyInfo::U64);
103 return (
const uint8_t)getObjectInstance().getUInt64(6782983ul);
127 getTLMutator().modify(getClassId(), getURI())->setUInt64(6782983ul, newValue);
139 getTLMutator().modify(getClassId(), getURI())->unset(6782983ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
149 return getObjectInstance().isSet(6782984ul, opflex::modb::PropertyInfo::U64);
159 return (uint32_t)getObjectInstance().getUInt64(6782984ul);
183 getTLMutator().modify(getClassId(), getURI())->setUInt64(6782984ul, newValue);
195 getTLMutator().modify(getClassId(), getURI())->unset(6782984ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
205 return getObjectInstance().isSet(6782982ul, opflex::modb::PropertyInfo::U64);
215 return (uint32_t)getObjectInstance().getUInt64(6782982ul);
239 getTLMutator().modify(getClassId(), getURI())->setUInt64(6782982ul, newValue);
251 getTLMutator().modify(getClassId(), getURI())->unset(6782982ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
261 return getObjectInstance().isSet(6782981ul, opflex::modb::PropertyInfo::MAC);
271 return getObjectInstance().getMAC(6782981ul);
280 const opflex::modb::MAC&
getMacAddress(
const opflex::modb::MAC& defaultValue)
295 getTLMutator().modify(getClassId(), getURI())->setMAC(6782981ul, newValue);
307 getTLMutator().modify(getClassId(), getURI())->unset(6782981ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
317 return getObjectInstance().isSet(6782977ul, opflex::modb::PropertyInfo::STRING);
327 return getObjectInstance().getString(6782977ul);
336 const std::string&
getName(
const std::string& defaultValue)
338 return getName().get_value_or(defaultValue);
351 getTLMutator().modify(getClassId(), getURI())->setString(6782977ul, newValue);
363 getTLMutator().modify(getClassId(), getURI())->unset(6782977ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
373 return getObjectInstance().isSet(6782979ul, opflex::modb::PropertyInfo::U64);
383 return (
const uint8_t)getObjectInstance().getUInt64(6782979ul);
407 getTLMutator().modify(getClassId(), getURI())->setUInt64(6782979ul, newValue);
419 getTLMutator().modify(getClassId(), getURI())->unset(6782979ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
429 return getObjectInstance().isSet(6782980ul, opflex::modb::PropertyInfo::STRING);
439 return getObjectInstance().getString(6782980ul);
463 getTLMutator().modify(getClassId(), getURI())->setString(6782980ul, newValue);
475 getTLMutator().modify(getClassId(), getURI())->unset(6782980ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
490 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Subnet> >
resolve(
491 opflex::ofcore::OFFramework& framework,
492 const opflex::modb::URI& uri)
494 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::Subnet>(framework,
CLASS_ID, uri);
508 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Subnet> >
resolve(
509 const opflex::modb::URI& uri)
511 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::Subnet>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
534 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Subnet> >
resolve(
535 opflex::ofcore::OFFramework& framework,
536 const std::string& policySpaceName,
537 const std::string& gbpSubnetsName,
538 const std::string& gbpSubnetName)
540 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSubnets").addElement(gbpSubnetsName).addElement(
"GbpSubnet").addElement(gbpSubnetName).build());
562 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::Subnet> >
resolve(
563 const std::string& policySpaceName,
564 const std::string& gbpSubnetsName,
565 const std::string& gbpSubnetName)
567 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSubnetsName,gbpSubnetName);
580 getTLMutator().remove(
CLASS_ID, getURI());
593 static void remove(opflex::ofcore::OFFramework& framework,
594 const opflex::modb::URI& uri)
596 MO::remove(framework,
CLASS_ID, uri);
609 static void remove(
const opflex::modb::URI& uri)
611 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
633 opflex::ofcore::OFFramework& framework,
634 const std::string& policySpaceName,
635 const std::string& gbpSubnetsName,
636 const std::string& gbpSubnetName)
638 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSubnets").addElement(gbpSubnetsName).addElement(
"GbpSubnet").addElement(gbpSubnetName).build());
660 const std::string& policySpaceName,
661 const std::string& gbpSubnetsName,
662 const std::string& gbpSubnetName)
664 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSubnetsName,gbpSubnetName);
679 opflex::ofcore::OFFramework& framework,
680 opflex::modb::ObjectListener* listener)
682 opflex::modb::mointernal
683 ::MO::registerListener(framework, listener,
CLASS_ID);
698 opflex::modb::ObjectListener* listener)
710 opflex::ofcore::OFFramework& framework,
711 opflex::modb::ObjectListener* listener)
713 opflex::modb::mointernal
714 ::MO::unregisterListener(framework, listener,
CLASS_ID);
724 opflex::modb::ObjectListener* listener)
734 opflex::ofcore::OFFramework& framework,
735 const opflex::modb::URI& uri,
736 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
737 : MO(framework,
CLASS_ID, uri, oi) { }
742 #endif // GI_GBP_SUBNET_HPP
bool isIpv6AdvAutonomousFlagSet()
Check whether ipv6AdvAutonomousFlag has been set.
Definition: Subnet.hpp:91
modelgbp::gbp::Subnet & unsetMacAddress()
Unset macAddress in the currently-active mutator.
Definition: Subnet.hpp:305
boost::optional< const opflex::modb::MAC & > getMacAddress()
Get the value of macAddress if it has been set.
Definition: Subnet.hpp:268
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:436
bool isPrefixLenSet()
Check whether prefixLen has been set.
Definition: Subnet.hpp:371
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:361
modelgbp::gbp::Subnet & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: Subnet.hpp:349
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: Subnet.hpp:324
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: Subnet.hpp:723
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:448
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:417
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
modelgbp::gbp::Subnet & setMacAddress(const opflex::modb::MAC &newValue)
Set macAddress to the specified value in the currently-active mutator.
Definition: Subnet.hpp:293
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:392
bool isVirtualRouterIpSet()
Check whether virtualRouterIp has been set.
Definition: Subnet.hpp:427
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:461
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:315
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:490
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:678
bool isMacAddressSet()
Check whether macAddress has been set.
Definition: Subnet.hpp:259
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:562
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:733
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:508
const opflex::modb::MAC & getMacAddress(const opflex::modb::MAC &defaultValue)
Get the value of macAddress if set, otherwise the value of default passed in.
Definition: Subnet.hpp:280
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: Subnet.hpp:709
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:697
modelgbp::gbp::Subnet & unsetVirtualRouterIp()
Unset virtualRouterIp in the currently-active mutator.
Definition: Subnet.hpp:473
boost::optional< const uint8_t > getPrefixLen()
Get the value of prefixLen if it has been set.
Definition: Subnet.hpp:380
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:405
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:534
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:336
bool isIpv6AdvPreferredLifetimeSet()
Check whether ipv6AdvPreferredLifetime has been set.
Definition: Subnet.hpp:147