modelgbp Generated OpFlex Model  1.7.0
SNATIPPool.hpp
1 
10 #pragma once
11 #ifndef GI_GBPE_SNATIPPOOL_HPP
12 #define GI_GBPE_SNATIPPOOL_HPP
13 
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
17 
18 namespace modelgbp {
19 namespace gbpe {
20 
22  : public opflex::modb::mointernal::MO
23 {
24 public:
25 
29  static const opflex::modb::class_id_t CLASS_ID = 46;
30 
35  bool isAddressSet()
36  {
37  return getObjectInstance().isSet(1507330ul, opflex::modb::PropertyInfo::STRING);
38  }
39 
44  boost::optional<const std::string&> getAddress()
45  {
46  if (isAddressSet())
47  return getObjectInstance().getString(1507330ul);
48  return boost::none;
49  }
50 
56  const std::string& getAddress(const std::string& defaultValue)
57  {
58  return getAddress().get_value_or(defaultValue);
59  }
60 
69  modelgbp::gbpe::SNATIPPool& setAddress(const std::string& newValue)
70  {
71  getTLMutator().modify(getClassId(), getURI())->setString(1507330ul, newValue);
72  return *this;
73  }
74 
82  {
83  getTLMutator().modify(getClassId(), getURI())->unset(1507330ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
84  return *this;
85  }
86 
91  bool isNameSet()
92  {
93  return getObjectInstance().isSet(1507329ul, opflex::modb::PropertyInfo::STRING);
94  }
95 
100  boost::optional<const std::string&> getName()
101  {
102  if (isNameSet())
103  return getObjectInstance().getString(1507329ul);
104  return boost::none;
105  }
106 
112  const std::string& getName(const std::string& defaultValue)
113  {
114  return getName().get_value_or(defaultValue);
115  }
116 
125  modelgbp::gbpe::SNATIPPool& setName(const std::string& newValue)
126  {
127  getTLMutator().modify(getClassId(), getURI())->setString(1507329ul, newValue);
128  return *this;
129  }
130 
138  {
139  getTLMutator().modify(getClassId(), getURI())->unset(1507329ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
140  return *this;
141  }
142 
148  {
149  return getObjectInstance().isSet(1507333ul, opflex::modb::PropertyInfo::STRING);
150  }
151 
156  boost::optional<const std::string&> getNatEpGroup()
157  {
158  if (isNatEpGroupSet())
159  return getObjectInstance().getString(1507333ul);
160  return boost::none;
161  }
162 
168  const std::string& getNatEpGroup(const std::string& defaultValue)
169  {
170  return getNatEpGroup().get_value_or(defaultValue);
171  }
172 
181  modelgbp::gbpe::SNATIPPool& setNatEpGroup(const std::string& newValue)
182  {
183  getTLMutator().modify(getClassId(), getURI())->setString(1507333ul, newValue);
184  return *this;
185  }
186 
194  {
195  getTLMutator().modify(getClassId(), getURI())->unset(1507333ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
196  return *this;
197  }
198 
204  {
205  return getObjectInstance().isSet(1507331ul, opflex::modb::PropertyInfo::U64);
206  }
207 
212  boost::optional<const uint8_t> getPrefixLen()
213  {
214  if (isPrefixLenSet())
215  return (const uint8_t)getObjectInstance().getUInt64(1507331ul);
216  return boost::none;
217  }
218 
224  const uint8_t getPrefixLen(const uint8_t defaultValue)
225  {
226  return getPrefixLen().get_value_or(defaultValue);
227  }
228 
237  modelgbp::gbpe::SNATIPPool& setPrefixLen(const uint8_t newValue)
238  {
239  getTLMutator().modify(getClassId(), getURI())->setUInt64(1507331ul, newValue);
240  return *this;
241  }
242 
250  {
251  getTLMutator().modify(getClassId(), getURI())->unset(1507331ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
252  return *this;
253  }
254 
260  {
261  return getObjectInstance().isSet(1507332ul, opflex::modb::PropertyInfo::STRING);
262  }
263 
268  boost::optional<const std::string&> getTunnelEpUuid()
269  {
270  if (isTunnelEpUuidSet())
271  return getObjectInstance().getString(1507332ul);
272  return boost::none;
273  }
274 
280  const std::string& getTunnelEpUuid(const std::string& defaultValue)
281  {
282  return getTunnelEpUuid().get_value_or(defaultValue);
283  }
284 
293  modelgbp::gbpe::SNATIPPool& setTunnelEpUuid(const std::string& newValue)
294  {
295  getTLMutator().modify(getClassId(), getURI())->setString(1507332ul, newValue);
296  return *this;
297  }
298 
306  {
307  getTLMutator().modify(getClassId(), getURI())->unset(1507332ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
308  return *this;
309  }
310 
322  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::SNATIPPool> > resolve(
323  opflex::ofcore::OFFramework& framework,
324  const opflex::modb::URI& uri)
325  {
326  return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::SNATIPPool>(framework, CLASS_ID, uri);
327  }
328 
340  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::SNATIPPool> > resolve(
341  const opflex::modb::URI& uri)
342  {
343  return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::SNATIPPool>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
344  }
345 
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)
368  {
369  return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PlatformConfig").addElement(platformConfigName).addElement("GbpeSNATIPPool").addElement(gbpeSNATIPPoolName).build());
370  }
371 
389  static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::SNATIPPool> > resolve(
390  const std::string& platformConfigName,
391  const std::string& gbpeSNATIPPoolName)
392  {
393  return resolve(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,gbpeSNATIPPoolName);
394  }
395 
404  void remove()
405  {
406  getTLMutator().remove(CLASS_ID, getURI());
407  }
408 
419  static void remove(opflex::ofcore::OFFramework& framework,
420  const opflex::modb::URI& uri)
421  {
422  MO::remove(framework, CLASS_ID, uri);
423  }
424 
435  static void remove(const opflex::modb::URI& uri)
436  {
437  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
438  }
439 
456  static void remove(
457  opflex::ofcore::OFFramework& framework,
458  const std::string& platformConfigName,
459  const std::string& gbpeSNATIPPoolName)
460  {
461  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PlatformConfig").addElement(platformConfigName).addElement("GbpeSNATIPPool").addElement(gbpeSNATIPPoolName).build());
462  }
463 
480  static void remove(
481  const std::string& platformConfigName,
482  const std::string& gbpeSNATIPPoolName)
483  {
484  remove(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,gbpeSNATIPPoolName);
485  }
486 
498  static void registerListener(
499  opflex::ofcore::OFFramework& framework,
500  opflex::modb::ObjectListener* listener)
501  {
502  opflex::modb::mointernal
503  ::MO::registerListener(framework, listener, CLASS_ID);
504  }
505 
517  static void registerListener(
518  opflex::modb::ObjectListener* listener)
519  {
520  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
521  }
522 
529  static void unregisterListener(
530  opflex::ofcore::OFFramework& framework,
531  opflex::modb::ObjectListener* listener)
532  {
533  opflex::modb::mointernal
534  ::MO::unregisterListener(framework, listener, CLASS_ID);
535  }
536 
543  static void unregisterListener(
544  opflex::modb::ObjectListener* listener)
545  {
546  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
547  }
548 
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) { }
558 }; // class SNATIPPool
559 
560 } // namespace gbpe
561 } // namespace modelgbp
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