modelgbp Generated OpFlex Model 1.7.0
SearchListEntry.hpp
1
10#pragma once
11#ifndef GI_INV_SEARCHLISTENTRY_HPP
12#define GI_INV_SEARCHLISTENTRY_HPP
13
14#include <boost/optional.hpp>
15#include "opflex/modb/URIBuilder.h"
16#include "opflex/modb/mo-internal/MO.h"
17
18namespace modelgbp {
19namespace inv {
20
22 : public opflex::modb::mointernal::MO
23{
24public:
25
29 static const opflex::modb::class_id_t CLASS_ID = 135;
30
35 bool isNameSet()
36 {
37 return getObjectInstance().isSet(4423681ul, opflex::modb::PropertyInfo::STRING);
38 }
39
44 boost::optional<const std::string&> getName()
45 {
46 if (isNameSet())
47 return getObjectInstance().getString(4423681ul);
48 return boost::none;
49 }
50
56 const std::string& getName(const std::string& defaultValue)
57 {
58 return getName().get_value_or(defaultValue);
59 }
60
69 modelgbp::inv::SearchListEntry& setName(const std::string& newValue)
70 {
71 getTLMutator().modify(getClassId(), getURI())->setString(4423681ul, newValue);
72 return *this;
73 }
74
82 {
83 getTLMutator().modify(getClassId(), getURI())->unset(4423681ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
84 return *this;
85 }
86
98 static boost::optional<OF_SHARED_PTR<modelgbp::inv::SearchListEntry> > resolve(
99 opflex::ofcore::OFFramework& framework,
100 const opflex::modb::URI& uri)
101 {
102 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::SearchListEntry>(framework, CLASS_ID, uri);
103 }
104
116 static boost::optional<OF_SHARED_PTR<modelgbp::inv::SearchListEntry> > resolve(
117 const opflex::modb::URI& uri)
118 {
119 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::SearchListEntry>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
120 }
121
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)
147 {
148 return resolve(framework,opflex::modb::URIBuilder().addElement("InvUniverse").addElement("InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement("InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement("InvDHCPv6Config").addElement("InvSearchListEntry").addElement(invSearchListEntryName).build());
149 }
150
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)
174 {
175 return resolve(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invSearchListEntryName);
176 }
177
186 void remove()
187 {
188 getTLMutator().remove(CLASS_ID, getURI());
189 }
190
201 static void remove(opflex::ofcore::OFFramework& framework,
202 const opflex::modb::URI& uri)
203 {
204 MO::remove(framework, CLASS_ID, uri);
205 }
206
217 static void remove(const opflex::modb::URI& uri)
218 {
219 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
220 }
221
240 static void remove(
241 opflex::ofcore::OFFramework& framework,
242 const std::string& invLocalEndpointInventoryName,
243 const std::string& invLocalInventoryEpUuid,
244 const std::string& invSearchListEntryName)
245 {
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());
247 }
248
267 static void remove(
268 const std::string& invLocalEndpointInventoryName,
269 const std::string& invLocalInventoryEpUuid,
270 const std::string& invSearchListEntryName)
271 {
272 remove(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invSearchListEntryName);
273 }
274
286 static void registerListener(
287 opflex::ofcore::OFFramework& framework,
288 opflex::modb::ObjectListener* listener)
289 {
290 opflex::modb::mointernal
291 ::MO::registerListener(framework, listener, CLASS_ID);
292 }
293
305 static void registerListener(
306 opflex::modb::ObjectListener* listener)
307 {
308 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
309 }
310
318 opflex::ofcore::OFFramework& framework,
319 opflex::modb::ObjectListener* listener)
320 {
321 opflex::modb::mointernal
322 ::MO::unregisterListener(framework, listener, CLASS_ID);
323 }
324
332 opflex::modb::ObjectListener* listener)
333 {
334 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
335 }
336
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) { }
346}; // class SearchListEntry
347
348} // namespace inv
349} // namespace modelgbp
350#endif // GI_INV_SEARCHLISTENTRY_HPP
Definition SearchListEntry.hpp:23
static void remove(const opflex::modb::URI &uri)
Remove the SearchListEntry object with the specified URI using the currently-active mutator and the d...
Definition SearchListEntry.hpp:217
void remove()
Remove this instance using the currently-active mutator.
Definition SearchListEntry.hpp:186
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
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for SearchListEntry.
Definition SearchListEntry.hpp:29
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
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition SearchListEntry.hpp:44
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 remove(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invSearchListEntryName)
Remove the SearchListEntry object with the specified path elements from the managed object store.
Definition SearchListEntry.hpp:240
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition SearchListEntry.hpp:317
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition SearchListEntry.hpp:331
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 void remove(const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invSearchListEntryName)
Remove the SearchListEntry object with the specified path elements from the managed object store usin...
Definition SearchListEntry.hpp:267
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
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
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
modelgbp::inv::SearchListEntry & unsetName()
Unset name in the currently-active mutator.
Definition SearchListEntry.hpp:81
bool isNameSet()
Check whether name has been set.
Definition SearchListEntry.hpp:35
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
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 remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the SearchListEntry object with the specified URI using the currently-active mutator.
Definition SearchListEntry.hpp:201
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12