11 #ifndef GI_INV_SEARCHLISTENTRY_HPP
12 #define GI_INV_SEARCHLISTENTRY_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 = 135;
37 return getObjectInstance().isSet(4423681ul, opflex::modb::PropertyInfo::STRING);
44 boost::optional<const std::string&>
getName()
47 return getObjectInstance().getString(4423681ul);
56 const std::string&
getName(
const std::string& defaultValue)
58 return getName().get_value_or(defaultValue);
71 getTLMutator().modify(getClassId(), getURI())->setString(4423681ul, newValue);
83 getTLMutator().modify(getClassId(), getURI())->unset(4423681ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
98 static boost::optional<OF_SHARED_PTR<modelgbp::inv::SearchListEntry> >
resolve(
99 opflex::ofcore::OFFramework& framework,
100 const opflex::modb::URI& uri)
102 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::SearchListEntry>(framework,
CLASS_ID, uri);
116 static boost::optional<OF_SHARED_PTR<modelgbp::inv::SearchListEntry> >
resolve(
117 const opflex::modb::URI& uri)
119 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::SearchListEntry>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
142 static boost::optional<OF_SHARED_PTR<modelgbp::inv::SearchListEntry> >
resolve(
143 opflex::ofcore::OFFramework& framework,
144 const std::string& invLocalEndpointInventoryName,
145 const std::string& invLocalInventoryEpUuid,
146 const std::string& invSearchListEntryName)
148 return resolve(framework,opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement(
"InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement(
"InvDHCPv6Config").addElement(
"InvSearchListEntry").addElement(invSearchListEntryName).build());
170 static boost::optional<OF_SHARED_PTR<modelgbp::inv::SearchListEntry> >
resolve(
171 const std::string& invLocalEndpointInventoryName,
172 const std::string& invLocalInventoryEpUuid,
173 const std::string& invSearchListEntryName)
175 return resolve(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invSearchListEntryName);
188 getTLMutator().remove(
CLASS_ID, getURI());
201 static void remove(opflex::ofcore::OFFramework& framework,
202 const opflex::modb::URI& uri)
204 MO::remove(framework,
CLASS_ID, uri);
217 static void remove(
const opflex::modb::URI& uri)
219 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
241 opflex::ofcore::OFFramework& framework,
242 const std::string& invLocalEndpointInventoryName,
243 const std::string& invLocalInventoryEpUuid,
244 const std::string& invSearchListEntryName)
246 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement(
"InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement(
"InvDHCPv6Config").addElement(
"InvSearchListEntry").addElement(invSearchListEntryName).build());
268 const std::string& invLocalEndpointInventoryName,
269 const std::string& invLocalInventoryEpUuid,
270 const std::string& invSearchListEntryName)
272 remove(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invSearchListEntryName);
287 opflex::ofcore::OFFramework& framework,
288 opflex::modb::ObjectListener* listener)
290 opflex::modb::mointernal
291 ::MO::registerListener(framework, listener,
CLASS_ID);
306 opflex::modb::ObjectListener* listener)
318 opflex::ofcore::OFFramework& framework,
319 opflex::modb::ObjectListener* listener)
321 opflex::modb::mointernal
322 ::MO::unregisterListener(framework, listener,
CLASS_ID);
332 opflex::modb::ObjectListener* listener)
342 opflex::ofcore::OFFramework& framework,
343 const opflex::modb::URI& uri,
344 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
345 : MO(framework,
CLASS_ID, uri, oi) { }
350 #endif // GI_INV_SEARCHLISTENTRY_HPP
bool isNameSet()
Check whether name has been set.
Definition: SearchListEntry.hpp:35
static boost::optional< OF_SHARED_PTR< modelgbp::inv::SearchListEntry > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SearchListEntry from the managed object store.
Definition: SearchListEntry.hpp:98
SearchListEntry(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of SearchListEntry.
Definition: SearchListEntry.hpp:341
Definition: SearchListEntry.hpp:21
modelgbp::inv::SearchListEntry & unsetName()
Unset name in the currently-active mutator.
Definition: SearchListEntry.hpp:81
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: SearchListEntry.hpp:331
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: SearchListEntry.hpp:305
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for SearchListEntry.
Definition: SearchListEntry.hpp:29
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: SearchListEntry.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: SearchListEntry.hpp:56
static boost::optional< OF_SHARED_PTR< modelgbp::inv::SearchListEntry > > resolve(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invSearchListEntryName)
Retrieve an instance of SearchListEntry from the managed object store by constructing its URI from th...
Definition: SearchListEntry.hpp:142
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: SearchListEntry.hpp:317
static boost::optional< OF_SHARED_PTR< modelgbp::inv::SearchListEntry > > resolve(const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invSearchListEntryName)
Retrieve an instance of SearchListEntry from the default managed object store by constructing its URI...
Definition: SearchListEntry.hpp:170
modelgbp::inv::SearchListEntry & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: SearchListEntry.hpp:69
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: SearchListEntry.hpp:286
static boost::optional< OF_SHARED_PTR< modelgbp::inv::SearchListEntry > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of SearchListEntry from the managed object store using the default framework ins...
Definition: SearchListEntry.hpp:116