modelgbp Generated OpFlex Model 1.7.0
IpMapping.hpp
1
10#pragma once
11#ifndef GI_INV_IPMAPPING_HPP
12#define GI_INV_IPMAPPING_HPP
13
14#include <boost/optional.hpp>
15#include "opflex/modb/URIBuilder.h"
16#include "opflex/modb/mo-internal/MO.h"
17/*
18 * contains: item:mclass(inv/IpMappingToGroupRSrc)
19 */
20#include "modelgbp/inv/IpMappingToGroupRSrc.hpp"
21
22namespace modelgbp {
23namespace inv {
24
26 : public opflex::modb::mointernal::MO
27{
28public:
29
33 static const opflex::modb::class_id_t CLASS_ID = 124;
34
40 {
41 return getObjectInstance().isSet(4063235ul, opflex::modb::PropertyInfo::STRING);
42 }
43
48 boost::optional<const std::string&> getFloatingIp()
49 {
50 if (isFloatingIpSet())
51 return getObjectInstance().getString(4063235ul);
52 return boost::none;
53 }
54
60 const std::string& getFloatingIp(const std::string& defaultValue)
61 {
62 return getFloatingIp().get_value_or(defaultValue);
63 }
64
73 modelgbp::inv::IpMapping& setFloatingIp(const std::string& newValue)
74 {
75 getTLMutator().modify(getClassId(), getURI())->setString(4063235ul, newValue);
76 return *this;
77 }
78
86 {
87 getTLMutator().modify(getClassId(), getURI())->unset(4063235ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
88 return *this;
89 }
90
96 {
97 return getObjectInstance().isSet(4063234ul, opflex::modb::PropertyInfo::STRING);
98 }
99
104 boost::optional<const std::string&> getMappedIp()
105 {
106 if (isMappedIpSet())
107 return getObjectInstance().getString(4063234ul);
108 return boost::none;
109 }
110
116 const std::string& getMappedIp(const std::string& defaultValue)
117 {
118 return getMappedIp().get_value_or(defaultValue);
119 }
120
129 modelgbp::inv::IpMapping& setMappedIp(const std::string& newValue)
130 {
131 getTLMutator().modify(getClassId(), getURI())->setString(4063234ul, newValue);
132 return *this;
133 }
134
142 {
143 getTLMutator().modify(getClassId(), getURI())->unset(4063234ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
144 return *this;
145 }
146
152 {
153 return getObjectInstance().isSet(4063233ul, opflex::modb::PropertyInfo::STRING);
154 }
155
160 boost::optional<const std::string&> getName()
161 {
162 if (isNameSet())
163 return getObjectInstance().getString(4063233ul);
164 return boost::none;
165 }
166
172 const std::string& getName(const std::string& defaultValue)
173 {
174 return getName().get_value_or(defaultValue);
175 }
176
185 modelgbp::inv::IpMapping& setName(const std::string& newValue)
186 {
187 getTLMutator().modify(getClassId(), getURI())->setString(4063233ul, newValue);
188 return *this;
189 }
190
198 {
199 getTLMutator().modify(getClassId(), getURI())->unset(4063233ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
200 return *this;
201 }
202
208 {
209 return getObjectInstance().isSet(4063236ul, opflex::modb::PropertyInfo::STRING);
210 }
211
216 boost::optional<const std::string&> getNextHopIf()
217 {
218 if (isNextHopIfSet())
219 return getObjectInstance().getString(4063236ul);
220 return boost::none;
221 }
222
228 const std::string& getNextHopIf(const std::string& defaultValue)
229 {
230 return getNextHopIf().get_value_or(defaultValue);
231 }
232
241 modelgbp::inv::IpMapping& setNextHopIf(const std::string& newValue)
242 {
243 getTLMutator().modify(getClassId(), getURI())->setString(4063236ul, newValue);
244 return *this;
245 }
246
254 {
255 getTLMutator().modify(getClassId(), getURI())->unset(4063236ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
256 return *this;
257 }
258
264 {
265 return getObjectInstance().isSet(4063237ul, opflex::modb::PropertyInfo::MAC);
266 }
267
272 boost::optional<const opflex::modb::MAC&> getNextHopMac()
273 {
274 if (isNextHopMacSet())
275 return getObjectInstance().getMAC(4063237ul);
276 return boost::none;
277 }
278
284 const opflex::modb::MAC& getNextHopMac(const opflex::modb::MAC& defaultValue)
285 {
286 return getNextHopMac().get_value_or(defaultValue);
287 }
288
297 modelgbp::inv::IpMapping& setNextHopMac(const opflex::modb::MAC& newValue)
298 {
299 getTLMutator().modify(getClassId(), getURI())->setMAC(4063237ul, newValue);
300 return *this;
301 }
302
310 {
311 getTLMutator().modify(getClassId(), getURI())->unset(4063237ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
312 return *this;
313 }
314
326 static boost::optional<OF_SHARED_PTR<modelgbp::inv::IpMapping> > resolve(
327 opflex::ofcore::OFFramework& framework,
328 const opflex::modb::URI& uri)
329 {
330 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::IpMapping>(framework, CLASS_ID, uri);
331 }
332
344 static boost::optional<OF_SHARED_PTR<modelgbp::inv::IpMapping> > resolve(
345 const opflex::modb::URI& uri)
346 {
347 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::IpMapping>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
348 }
349
370 static boost::optional<OF_SHARED_PTR<modelgbp::inv::IpMapping> > resolve(
371 opflex::ofcore::OFFramework& framework,
372 const std::string& invLocalEndpointInventoryName,
373 const std::string& invLocalInventoryEpUuid,
374 const std::string& invIpMappingName)
375 {
376 return resolve(framework,opflex::modb::URIBuilder().addElement("InvUniverse").addElement("InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement("InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement("InvIpMapping").addElement(invIpMappingName).build());
377 }
378
398 static boost::optional<OF_SHARED_PTR<modelgbp::inv::IpMapping> > resolve(
399 const std::string& invLocalEndpointInventoryName,
400 const std::string& invLocalInventoryEpUuid,
401 const std::string& invIpMappingName)
402 {
403 return resolve(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invIpMappingName);
404 }
405
415 boost::optional<OF_SHARED_PTR<modelgbp::inv::IpMappingToGroupRSrc> > resolveInvIpMappingToGroupRSrc(
416 )
417 {
418 return modelgbp::inv::IpMappingToGroupRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("InvIpMappingToGroupRSrc").build());
419 }
420
431 OF_SHARED_PTR<modelgbp::inv::IpMappingToGroupRSrc> addInvIpMappingToGroupRSrc(
432 )
433 {
434 OF_SHARED_PTR<modelgbp::inv::IpMappingToGroupRSrc> result = addChild<modelgbp::inv::IpMappingToGroupRSrc>(
435 CLASS_ID, getURI(), 2151547005ul, 125,
436 opflex::modb::URIBuilder(getURI()).addElement("InvIpMappingToGroupRSrc").build()
437 );
438 return result;
439 }
440
449 void remove()
450 {
451 getTLMutator().remove(CLASS_ID, getURI());
452 }
453
464 static void remove(opflex::ofcore::OFFramework& framework,
465 const opflex::modb::URI& uri)
466 {
467 MO::remove(framework, CLASS_ID, uri);
468 }
469
480 static void remove(const opflex::modb::URI& uri)
481 {
482 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
483 }
484
503 static void remove(
504 opflex::ofcore::OFFramework& framework,
505 const std::string& invLocalEndpointInventoryName,
506 const std::string& invLocalInventoryEpUuid,
507 const std::string& invIpMappingName)
508 {
509 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("InvUniverse").addElement("InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement("InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement("InvIpMapping").addElement(invIpMappingName).build());
510 }
511
530 static void remove(
531 const std::string& invLocalEndpointInventoryName,
532 const std::string& invLocalInventoryEpUuid,
533 const std::string& invIpMappingName)
534 {
535 remove(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invIpMappingName);
536 }
537
549 static void registerListener(
550 opflex::ofcore::OFFramework& framework,
551 opflex::modb::ObjectListener* listener)
552 {
553 opflex::modb::mointernal
554 ::MO::registerListener(framework, listener, CLASS_ID);
555 }
556
568 static void registerListener(
569 opflex::modb::ObjectListener* listener)
570 {
571 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
572 }
573
581 opflex::ofcore::OFFramework& framework,
582 opflex::modb::ObjectListener* listener)
583 {
584 opflex::modb::mointernal
585 ::MO::unregisterListener(framework, listener, CLASS_ID);
586 }
587
595 opflex::modb::ObjectListener* listener)
596 {
597 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
598 }
599
605 opflex::ofcore::OFFramework& framework,
606 const opflex::modb::URI& uri,
607 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
608 : MO(framework, CLASS_ID, uri, oi) { }
609}; // class IpMapping
610
611} // namespace inv
612} // namespace modelgbp
613#endif // GI_INV_IPMAPPING_HPP
static boost::optional< OF_SHARED_PTR< modelgbp::inv::IpMappingToGroupRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of IpMappingToGroupRSrc from the managed object store.
Definition IpMappingToGroupRSrc.hpp:257
Definition IpMapping.hpp:27
static boost::optional< OF_SHARED_PTR< modelgbp::inv::IpMapping > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of IpMapping from the managed object store using the default framework instance.
Definition IpMapping.hpp:344
bool isFloatingIpSet()
Check whether floatingIp has been set.
Definition IpMapping.hpp:39
boost::optional< OF_SHARED_PTR< modelgbp::inv::IpMappingToGroupRSrc > > resolveInvIpMappingToGroupRSrc()
Retrieve the child object with the specified naming properties.
Definition IpMapping.hpp:415
const std::string & getFloatingIp(const std::string &defaultValue)
Get the value of floatingIp if set, otherwise the value of default passed in.
Definition IpMapping.hpp:60
void remove()
Remove this instance using the currently-active mutator.
Definition IpMapping.hpp:449
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition IpMapping.hpp:172
bool isNextHopMacSet()
Check whether nextHopMac has been set.
Definition IpMapping.hpp:263
boost::optional< const std::string & > getMappedIp()
Get the value of mappedIp if it has been set.
Definition IpMapping.hpp:104
modelgbp::inv::IpMapping & setNextHopIf(const std::string &newValue)
Set nextHopIf to the specified value in the currently-active mutator.
Definition IpMapping.hpp:241
boost::optional< const std::string & > getNextHopIf()
Get the value of nextHopIf if it has been set.
Definition IpMapping.hpp:216
const std::string & getNextHopIf(const std::string &defaultValue)
Get the value of nextHopIf if set, otherwise the value of default passed in.
Definition IpMapping.hpp:228
static boost::optional< OF_SHARED_PTR< modelgbp::inv::IpMapping > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of IpMapping from the managed object store.
Definition IpMapping.hpp:326
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 IpMapping.hpp:549
boost::optional< const std::string & > getFloatingIp()
Get the value of floatingIp if it has been set.
Definition IpMapping.hpp:48
modelgbp::inv::IpMapping & unsetMappedIp()
Unset mappedIp in the currently-active mutator.
Definition IpMapping.hpp:141
static boost::optional< OF_SHARED_PTR< modelgbp::inv::IpMapping > > resolve(const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invIpMappingName)
Retrieve an instance of IpMapping from the default managed object store by constructing its URI from ...
Definition IpMapping.hpp:398
modelgbp::inv::IpMapping & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition IpMapping.hpp:185
modelgbp::inv::IpMapping & unsetNextHopIf()
Unset nextHopIf in the currently-active mutator.
Definition IpMapping.hpp:253
modelgbp::inv::IpMapping & setNextHopMac(const opflex::modb::MAC &newValue)
Set nextHopMac to the specified value in the currently-active mutator.
Definition IpMapping.hpp:297
boost::optional< const opflex::modb::MAC & > getNextHopMac()
Get the value of nextHopMac if it has been set.
Definition IpMapping.hpp:272
IpMapping(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of IpMapping.
Definition IpMapping.hpp:604
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition IpMapping.hpp:160
OF_SHARED_PTR< modelgbp::inv::IpMappingToGroupRSrc > addInvIpMappingToGroupRSrc()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition IpMapping.hpp:431
static void remove(const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invIpMappingName)
Remove the IpMapping object with the specified path elements from the managed object store using the ...
Definition IpMapping.hpp:530
bool isNextHopIfSet()
Check whether nextHopIf has been set.
Definition IpMapping.hpp:207
modelgbp::inv::IpMapping & unsetName()
Unset name in the currently-active mutator.
Definition IpMapping.hpp:197
modelgbp::inv::IpMapping & unsetFloatingIp()
Unset floatingIp in the currently-active mutator.
Definition IpMapping.hpp:85
static void remove(const opflex::modb::URI &uri)
Remove the IpMapping object with the specified URI using the currently-active mutator and the default...
Definition IpMapping.hpp:480
bool isMappedIpSet()
Check whether mappedIp has been set.
Definition IpMapping.hpp:95
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition IpMapping.hpp:594
static boost::optional< OF_SHARED_PTR< modelgbp::inv::IpMapping > > resolve(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invIpMappingName)
Retrieve an instance of IpMapping from the managed object store by constructing its URI from the path...
Definition IpMapping.hpp:370
static void remove(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invIpMappingName)
Remove the IpMapping object with the specified path elements from the managed object store.
Definition IpMapping.hpp:503
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the IpMapping object with the specified URI using the currently-active mutator.
Definition IpMapping.hpp:464
const opflex::modb::MAC & getNextHopMac(const opflex::modb::MAC &defaultValue)
Get the value of nextHopMac if set, otherwise the value of default passed in.
Definition IpMapping.hpp:284
const std::string & getMappedIp(const std::string &defaultValue)
Get the value of mappedIp if set, otherwise the value of default passed in.
Definition IpMapping.hpp:116
modelgbp::inv::IpMapping & unsetNextHopMac()
Unset nextHopMac in the currently-active mutator.
Definition IpMapping.hpp:309
modelgbp::inv::IpMapping & setMappedIp(const std::string &newValue)
Set mappedIp to the specified value in the currently-active mutator.
Definition IpMapping.hpp:129
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition IpMapping.hpp:580
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 IpMapping.hpp:568
modelgbp::inv::IpMapping & setFloatingIp(const std::string &newValue)
Set floatingIp to the specified value in the currently-active mutator.
Definition IpMapping.hpp:73
bool isNameSet()
Check whether name has been set.
Definition IpMapping.hpp:151
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for IpMapping.
Definition IpMapping.hpp:33
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12