11 #ifndef GI_INV_REMOTEINVENTORYEP_HPP
12 #define GI_INV_REMOTEINVENTORYEP_HPP
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
20 #include "modelgbp/inv/RemoteIp.hpp"
24 #include "modelgbp/inv/RemoteInventoryEpToGroupRSrc.hpp"
30 :
public opflex::modb::mointernal::MO
37 static const opflex::modb::class_id_t
CLASS_ID = 142;
45 return getObjectInstance().isSet(4653058ul, opflex::modb::PropertyInfo::MAC);
52 boost::optional<const opflex::modb::MAC&>
getMac()
55 return getObjectInstance().getMAC(4653058ul);
64 const opflex::modb::MAC&
getMac(
const opflex::modb::MAC& defaultValue)
66 return getMac().get_value_or(defaultValue);
79 getTLMutator().modify(getClassId(), getURI())->setMAC(4653058ul, newValue);
91 getTLMutator().modify(getClassId(), getURI())->unset(4653058ul, opflex::modb::PropertyInfo::MAC, opflex::modb::PropertyInfo::SCALAR);
101 return getObjectInstance().isSet(4653059ul, opflex::modb::PropertyInfo::STRING);
111 return getObjectInstance().getString(4653059ul);
135 getTLMutator().modify(getClassId(), getURI())->setString(4653059ul, newValue);
147 getTLMutator().modify(getClassId(), getURI())->unset(4653059ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
157 return getObjectInstance().isSet(4653057ul, opflex::modb::PropertyInfo::STRING);
167 return getObjectInstance().getString(4653057ul);
176 const std::string&
getUuid(
const std::string& defaultValue)
178 return getUuid().get_value_or(defaultValue);
191 getTLMutator().modify(getClassId(), getURI())->setString(4653057ul, newValue);
203 getTLMutator().modify(getClassId(), getURI())->unset(4653057ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
218 static boost::optional<OF_SHARED_PTR<modelgbp::inv::RemoteInventoryEp> >
resolve(
219 opflex::ofcore::OFFramework& framework,
220 const opflex::modb::URI& uri)
222 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::RemoteInventoryEp>(framework,
CLASS_ID, uri);
236 static boost::optional<OF_SHARED_PTR<modelgbp::inv::RemoteInventoryEp> >
resolve(
237 const opflex::modb::URI& uri)
239 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::RemoteInventoryEp>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
258 static boost::optional<OF_SHARED_PTR<modelgbp::inv::RemoteInventoryEp> >
resolve(
259 opflex::ofcore::OFFramework& framework,
260 const std::string& invRemoteInventoryEpUuid)
262 return resolve(framework,opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvRemoteEndpointInventory").addElement(
"InvRemoteInventoryEp").addElement(invRemoteInventoryEpUuid).build());
280 static boost::optional<OF_SHARED_PTR<modelgbp::inv::RemoteInventoryEp> >
resolve(
281 const std::string& invRemoteInventoryEpUuid)
283 return resolve(opflex::ofcore::OFFramework::defaultInstance(),invRemoteInventoryEpUuid);
298 const std::string& invRemoteIpIp)
316 const std::string& invRemoteIpIp)
318 OF_SHARED_PTR<modelgbp::inv::RemoteIp> result = addChild<modelgbp::inv::RemoteIp>(
319 CLASS_ID, getURI(), 2152136831ul, 127,
320 opflex::modb::URIBuilder(getURI()).addElement(
"InvRemoteIp").addElement(invRemoteIpIp).build()
322 result->setIp(invRemoteIpIp);
342 opflex::modb::mointernal::MO::resolveChildren<modelgbp::inv::RemoteIp>(
343 getFramework(),
CLASS_ID, getURI(), 2152136831ul, 127, out);
374 OF_SHARED_PTR<modelgbp::inv::RemoteInventoryEpToGroupRSrc> result = addChild<modelgbp::inv::RemoteInventoryEpToGroupRSrc>(
375 CLASS_ID, getURI(), 2152136847ul, 143,
376 opflex::modb::URIBuilder(getURI()).addElement(
"InvRemoteInventoryEpToGroupRSrc").build()
391 getTLMutator().remove(
CLASS_ID, getURI());
404 static void remove(opflex::ofcore::OFFramework& framework,
405 const opflex::modb::URI& uri)
407 MO::remove(framework,
CLASS_ID, uri);
420 static void remove(
const opflex::modb::URI& uri)
422 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
440 opflex::ofcore::OFFramework& framework,
441 const std::string& invRemoteInventoryEpUuid)
443 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvRemoteEndpointInventory").addElement(
"InvRemoteInventoryEp").addElement(invRemoteInventoryEpUuid).build());
461 const std::string& invRemoteInventoryEpUuid)
463 remove(opflex::ofcore::OFFramework::defaultInstance(),invRemoteInventoryEpUuid);
478 opflex::ofcore::OFFramework& framework,
479 opflex::modb::ObjectListener* listener)
481 opflex::modb::mointernal
482 ::MO::registerListener(framework, listener,
CLASS_ID);
497 opflex::modb::ObjectListener* listener)
509 opflex::ofcore::OFFramework& framework,
510 opflex::modb::ObjectListener* listener)
512 opflex::modb::mointernal
513 ::MO::unregisterListener(framework, listener,
CLASS_ID);
523 opflex::modb::ObjectListener* listener)
533 opflex::ofcore::OFFramework& framework,
534 const opflex::modb::URI& uri,
535 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
536 : MO(framework,
CLASS_ID, uri, oi) { }
541 #endif // GI_INV_REMOTEINVENTORYEP_HPP
bool isMacSet()
Check whether mac has been set.
Definition: RemoteInventoryEp.hpp:43
boost::optional< OF_SHARED_PTR< modelgbp::inv::RemoteInventoryEpToGroupRSrc > > resolveInvRemoteInventoryEpToGroupRSrc()
Retrieve the child object with the specified naming properties.
Definition: RemoteInventoryEp.hpp:355
const std::string & getNextHopTunnel(const std::string &defaultValue)
Get the value of nextHopTunnel if set, otherwise the value of default passed in.
Definition: RemoteInventoryEp.hpp:120
static boost::optional< OF_SHARED_PTR< modelgbp::inv::RemoteInventoryEp > > resolve(opflex::ofcore::OFFramework &framework, const std::string &invRemoteInventoryEpUuid)
Retrieve an instance of RemoteInventoryEp from the managed object store by constructing its URI from ...
Definition: RemoteInventoryEp.hpp:258
OF_SHARED_PTR< modelgbp::inv::RemoteInventoryEpToGroupRSrc > addInvRemoteInventoryEpToGroupRSrc()
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: RemoteInventoryEp.hpp:371
static boost::optional< OF_SHARED_PTR< modelgbp::inv::RemoteIp > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RemoteIp from the managed object store.
Definition: RemoteIp.hpp:98
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: RemoteInventoryEp.hpp:496
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: RemoteInventoryEp.hpp:508
modelgbp::inv::RemoteInventoryEp & setUuid(const std::string &newValue)
Set uuid to the specified value in the currently-active mutator.
Definition: RemoteInventoryEp.hpp:189
modelgbp::inv::RemoteInventoryEp & setNextHopTunnel(const std::string &newValue)
Set nextHopTunnel to the specified value in the currently-active mutator.
Definition: RemoteInventoryEp.hpp:133
modelgbp::inv::RemoteInventoryEp & unsetMac()
Unset mac in the currently-active mutator.
Definition: RemoteInventoryEp.hpp:89
boost::optional< const std::string & > getNextHopTunnel()
Get the value of nextHopTunnel if it has been set.
Definition: RemoteInventoryEp.hpp:108
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for RemoteInventoryEp.
Definition: RemoteInventoryEp.hpp:37
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: RemoteInventoryEp.hpp:522
const opflex::modb::MAC & getMac(const opflex::modb::MAC &defaultValue)
Get the value of mac if set, otherwise the value of default passed in.
Definition: RemoteInventoryEp.hpp:64
void resolveInvRemoteIp(std::vector< OF_SHARED_PTR< modelgbp::inv::RemoteIp > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::inv::RemoteIp.
Definition: RemoteInventoryEp.hpp:340
bool isNextHopTunnelSet()
Check whether nextHopTunnel has been set.
Definition: RemoteInventoryEp.hpp:99
modelgbp::inv::RemoteInventoryEp & setMac(const opflex::modb::MAC &newValue)
Set mac to the specified value in the currently-active mutator.
Definition: RemoteInventoryEp.hpp:77
static boost::optional< OF_SHARED_PTR< modelgbp::inv::RemoteInventoryEpToGroupRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RemoteInventoryEpToGroupRSrc from the managed object store.
Definition: RemoteInventoryEpToGroupRSrc.hpp:257
boost::optional< const opflex::modb::MAC & > getMac()
Get the value of mac if it has been set.
Definition: RemoteInventoryEp.hpp:52
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: RemoteInventoryEp.hpp:477
bool isUuidSet()
Check whether uuid has been set.
Definition: RemoteInventoryEp.hpp:155
RemoteInventoryEp(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of RemoteInventoryEp.
Definition: RemoteInventoryEp.hpp:532
OF_SHARED_PTR< modelgbp::inv::RemoteIp > addInvRemoteIp(const std::string &invRemoteIpIp)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: RemoteInventoryEp.hpp:315
static boost::optional< OF_SHARED_PTR< modelgbp::inv::RemoteInventoryEp > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RemoteInventoryEp from the managed object store.
Definition: RemoteInventoryEp.hpp:218
Definition: RemoteInventoryEp.hpp:29
modelgbp::inv::RemoteInventoryEp & unsetUuid()
Unset uuid in the currently-active mutator.
Definition: RemoteInventoryEp.hpp:201
static boost::optional< OF_SHARED_PTR< modelgbp::inv::RemoteInventoryEp > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of RemoteInventoryEp from the managed object store using the default framework i...
Definition: RemoteInventoryEp.hpp:236
const std::string & getUuid(const std::string &defaultValue)
Get the value of uuid if set, otherwise the value of default passed in.
Definition: RemoteInventoryEp.hpp:176
boost::optional< const std::string & > getUuid()
Get the value of uuid if it has been set.
Definition: RemoteInventoryEp.hpp:164
boost::optional< OF_SHARED_PTR< modelgbp::inv::RemoteIp > > resolveInvRemoteIp(const std::string &invRemoteIpIp)
Retrieve the child object with the specified naming properties.
Definition: RemoteInventoryEp.hpp:297
static boost::optional< OF_SHARED_PTR< modelgbp::inv::RemoteInventoryEp > > resolve(const std::string &invRemoteInventoryEpUuid)
Retrieve an instance of RemoteInventoryEp from the default managed object store by constructing its U...
Definition: RemoteInventoryEp.hpp:280
modelgbp::inv::RemoteInventoryEp & unsetNextHopTunnel()
Unset nextHopTunnel in the currently-active mutator.
Definition: RemoteInventoryEp.hpp:145