11 #ifndef GI_GBPE_SNATIPPOOL_HPP
12 #define GI_GBPE_SNATIPPOOL_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 = 46;
37 return getObjectInstance().isSet(1507330ul, opflex::modb::PropertyInfo::STRING);
47 return getObjectInstance().getString(1507330ul);
56 const std::string&
getAddress(
const std::string& defaultValue)
58 return getAddress().get_value_or(defaultValue);
71 getTLMutator().modify(getClassId(), getURI())->setString(1507330ul, newValue);
83 getTLMutator().modify(getClassId(), getURI())->unset(1507330ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
93 return getObjectInstance().isSet(1507329ul, opflex::modb::PropertyInfo::STRING);
103 return getObjectInstance().getString(1507329ul);
112 const std::string&
getName(
const std::string& defaultValue)
114 return getName().get_value_or(defaultValue);
127 getTLMutator().modify(getClassId(), getURI())->setString(1507329ul, newValue);
139 getTLMutator().modify(getClassId(), getURI())->unset(1507329ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
149 return getObjectInstance().isSet(1507333ul, opflex::modb::PropertyInfo::STRING);
159 return getObjectInstance().getString(1507333ul);
183 getTLMutator().modify(getClassId(), getURI())->setString(1507333ul, newValue);
195 getTLMutator().modify(getClassId(), getURI())->unset(1507333ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
205 return getObjectInstance().isSet(1507331ul, opflex::modb::PropertyInfo::U64);
215 return (
const uint8_t)getObjectInstance().getUInt64(1507331ul);
239 getTLMutator().modify(getClassId(), getURI())->setUInt64(1507331ul, newValue);
251 getTLMutator().modify(getClassId(), getURI())->unset(1507331ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
261 return getObjectInstance().isSet(1507332ul, opflex::modb::PropertyInfo::STRING);
271 return getObjectInstance().getString(1507332ul);
295 getTLMutator().modify(getClassId(), getURI())->setString(1507332ul, newValue);
307 getTLMutator().modify(getClassId(), getURI())->unset(1507332ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
322 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::SNATIPPool> >
resolve(
323 opflex::ofcore::OFFramework& framework,
324 const opflex::modb::URI& uri)
326 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::SNATIPPool>(framework,
CLASS_ID, uri);
340 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::SNATIPPool> >
resolve(
341 const opflex::modb::URI& uri)
343 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::SNATIPPool>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
364 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::SNATIPPool> >
resolve(
365 opflex::ofcore::OFFramework& framework,
366 const std::string& platformConfigName,
367 const std::string& gbpeSNATIPPoolName)
369 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"GbpeSNATIPPool").addElement(gbpeSNATIPPoolName).build());
389 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::SNATIPPool> >
resolve(
390 const std::string& platformConfigName,
391 const std::string& gbpeSNATIPPoolName)
393 return resolve(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,gbpeSNATIPPoolName);
406 getTLMutator().remove(
CLASS_ID, getURI());
419 static void remove(opflex::ofcore::OFFramework& framework,
420 const opflex::modb::URI& uri)
422 MO::remove(framework,
CLASS_ID, uri);
435 static void remove(
const opflex::modb::URI& uri)
437 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
457 opflex::ofcore::OFFramework& framework,
458 const std::string& platformConfigName,
459 const std::string& gbpeSNATIPPoolName)
461 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"GbpeSNATIPPool").addElement(gbpeSNATIPPoolName).build());
481 const std::string& platformConfigName,
482 const std::string& gbpeSNATIPPoolName)
484 remove(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,gbpeSNATIPPoolName);
499 opflex::ofcore::OFFramework& framework,
500 opflex::modb::ObjectListener* listener)
502 opflex::modb::mointernal
503 ::MO::registerListener(framework, listener,
CLASS_ID);
518 opflex::modb::ObjectListener* listener)
530 opflex::ofcore::OFFramework& framework,
531 opflex::modb::ObjectListener* listener)
533 opflex::modb::mointernal
534 ::MO::unregisterListener(framework, listener,
CLASS_ID);
544 opflex::modb::ObjectListener* listener)
554 opflex::ofcore::OFFramework& framework,
555 const opflex::modb::URI& uri,
556 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
557 : MO(framework,
CLASS_ID, uri, oi) { }
562 #endif // GI_GBPE_SNATIPPOOL_HPP
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for SNATIPPool.
Definition: SNATIPPool.hpp:29
modelgbp::gbpe::SNATIPPool & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: SNATIPPool.hpp:125
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: SNATIPPool.hpp:529
modelgbp::gbpe::SNATIPPool & unsetPrefixLen()
Unset prefixLen in the currently-active mutator.
Definition: SNATIPPool.hpp:249
Definition: SNATIPPool.hpp:21
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::SNATIPPool > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of SNATIPPool from the managed object store using the default framework instance...
Definition: SNATIPPool.hpp:340
boost::optional< const std::string & > getNatEpGroup()
Get the value of natEpGroup if it has been set.
Definition: SNATIPPool.hpp:156
modelgbp::gbpe::SNATIPPool & unsetAddress()
Unset address in the currently-active mutator.
Definition: SNATIPPool.hpp:81
const uint8_t getPrefixLen(const uint8_t defaultValue)
Get the value of prefixLen if set, otherwise the value of default passed in.
Definition: SNATIPPool.hpp:224
bool isNatEpGroupSet()
Check whether natEpGroup has been set.
Definition: SNATIPPool.hpp:147
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: SNATIPPool.hpp:517
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::SNATIPPool > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SNATIPPool from the managed object store.
Definition: SNATIPPool.hpp:322
const std::string & getTunnelEpUuid(const std::string &defaultValue)
Get the value of tunnelEpUuid if set, otherwise the value of default passed in.
Definition: SNATIPPool.hpp:280
modelgbp::gbpe::SNATIPPool & unsetTunnelEpUuid()
Unset tunnelEpUuid in the currently-active mutator.
Definition: SNATIPPool.hpp:305
boost::optional< const std::string & > getAddress()
Get the value of address if it has been set.
Definition: SNATIPPool.hpp:44
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: SNATIPPool.hpp:112
SNATIPPool(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of SNATIPPool.
Definition: SNATIPPool.hpp:553
modelgbp::gbpe::SNATIPPool & unsetName()
Unset name in the currently-active mutator.
Definition: SNATIPPool.hpp:137
modelgbp::gbpe::SNATIPPool & setTunnelEpUuid(const std::string &newValue)
Set tunnelEpUuid to the specified value in the currently-active mutator.
Definition: SNATIPPool.hpp:293
const std::string & getAddress(const std::string &defaultValue)
Get the value of address if set, otherwise the value of default passed in.
Definition: SNATIPPool.hpp:56
bool isTunnelEpUuidSet()
Check whether tunnelEpUuid has been set.
Definition: SNATIPPool.hpp:259
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: SNATIPPool.hpp:543
modelgbp::gbpe::SNATIPPool & setPrefixLen(const uint8_t newValue)
Set prefixLen to the specified value in the currently-active mutator.
Definition: SNATIPPool.hpp:237
const std::string & getNatEpGroup(const std::string &defaultValue)
Get the value of natEpGroup if set, otherwise the value of default passed in.
Definition: SNATIPPool.hpp:168
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: SNATIPPool.hpp:498
modelgbp::gbpe::SNATIPPool & setNatEpGroup(const std::string &newValue)
Set natEpGroup to the specified value in the currently-active mutator.
Definition: SNATIPPool.hpp:181
modelgbp::gbpe::SNATIPPool & unsetNatEpGroup()
Unset natEpGroup in the currently-active mutator.
Definition: SNATIPPool.hpp:193
modelgbp::gbpe::SNATIPPool & setAddress(const std::string &newValue)
Set address to the specified value in the currently-active mutator.
Definition: SNATIPPool.hpp:69
boost::optional< const std::string & > getTunnelEpUuid()
Get the value of tunnelEpUuid if it has been set.
Definition: SNATIPPool.hpp:268
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: SNATIPPool.hpp:100
bool isAddressSet()
Check whether address has been set.
Definition: SNATIPPool.hpp:35
bool isPrefixLenSet()
Check whether prefixLen has been set.
Definition: SNATIPPool.hpp:203
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::SNATIPPool > > resolve(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &gbpeSNATIPPoolName)
Retrieve an instance of SNATIPPool from the managed object store by constructing its URI from the pat...
Definition: SNATIPPool.hpp:364
bool isNameSet()
Check whether name has been set.
Definition: SNATIPPool.hpp:91
boost::optional< const uint8_t > getPrefixLen()
Get the value of prefixLen if it has been set.
Definition: SNATIPPool.hpp:212
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::SNATIPPool > > resolve(const std::string &platformConfigName, const std::string &gbpeSNATIPPoolName)
Retrieve an instance of SNATIPPool from the default managed object store by constructing its URI from...
Definition: SNATIPPool.hpp:389