modelgbp Generated OpFlex Model 1.7.0
SecGroupRuleToRemoteAddressRRes.hpp
1
10#pragma once
11#ifndef GI_GBP_SECGROUPRULETOREMOTEADDRESSRRES_HPP
12#define GI_GBP_SECGROUPRULETOREMOTEADDRESSRRES_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 gbp {
20
22 : public opflex::modb::mointernal::MO
23{
24public:
25
29 static const opflex::modb::class_id_t CLASS_ID = 208;
30
35 bool isRoleSet()
36 {
37 return getObjectInstance().isSet(6815746ul, opflex::modb::PropertyInfo::ENUM8);
38 }
39
44 boost::optional<const uint8_t> getRole()
45 {
46 if (isRoleSet())
47 return (const uint8_t)getObjectInstance().getUInt64(6815746ul);
48 return boost::none;
49 }
50
56 const uint8_t getRole(const uint8_t defaultValue)
57 {
58 return getRole().get_value_or(defaultValue);
59 }
60
70 {
71 getTLMutator().modify(getClassId(), getURI())->setUInt64(6815746ul, newValue);
72 return *this;
73 }
74
82 {
83 getTLMutator().modify(getClassId(), getURI())->unset(6815746ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
84 return *this;
85 }
86
91 bool isTypeSet()
92 {
93 return getObjectInstance().isSet(6815745ul, opflex::modb::PropertyInfo::ENUM8);
94 }
95
100 boost::optional<const uint8_t> getType()
101 {
102 if (isTypeSet())
103 return (const uint8_t)getObjectInstance().getUInt64(6815745ul);
104 return boost::none;
105 }
106
112 const uint8_t getType(const uint8_t defaultValue)
113 {
114 return getType().get_value_or(defaultValue);
115 }
116
126 {
127 getTLMutator().modify(getClassId(), getURI())->setUInt64(6815745ul, newValue);
128 return *this;
129 }
130
138 {
139 getTLMutator().modify(getClassId(), getURI())->unset(6815745ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
140 return *this;
141 }
142
154 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroupRuleToRemoteAddressRRes> > resolve(
155 opflex::ofcore::OFFramework& framework,
156 const opflex::modb::URI& uri)
157 {
158 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::SecGroupRuleToRemoteAddressRRes>(framework, CLASS_ID, uri);
159 }
160
172 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroupRuleToRemoteAddressRRes> > resolve(
173 const opflex::modb::URI& uri)
174 {
175 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::SecGroupRuleToRemoteAddressRRes>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
176 }
177
192 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroupRuleToRemoteAddressRRes> > resolve(
193 opflex::ofcore::OFFramework& framework)
194 {
195 return resolve(framework,opflex::modb::URIBuilder().addElement("RelatorUniverse").addElement("GbpSecGroupRuleToRemoteAddressRRes").build());
196 }
197
211 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroupRuleToRemoteAddressRRes> > resolve(
212 )
213 {
214 return resolve(opflex::ofcore::OFFramework::defaultInstance());
215 }
216
225 void remove()
226 {
227 getTLMutator().remove(CLASS_ID, getURI());
228 }
229
240 static void remove(opflex::ofcore::OFFramework& framework,
241 const opflex::modb::URI& uri)
242 {
243 MO::remove(framework, CLASS_ID, uri);
244 }
245
256 static void remove(const opflex::modb::URI& uri)
257 {
258 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
259 }
260
272 static void registerListener(
273 opflex::ofcore::OFFramework& framework,
274 opflex::modb::ObjectListener* listener)
275 {
276 opflex::modb::mointernal
277 ::MO::registerListener(framework, listener, CLASS_ID);
278 }
279
291 static void registerListener(
292 opflex::modb::ObjectListener* listener)
293 {
294 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
295 }
296
304 opflex::ofcore::OFFramework& framework,
305 opflex::modb::ObjectListener* listener)
306 {
307 opflex::modb::mointernal
308 ::MO::unregisterListener(framework, listener, CLASS_ID);
309 }
310
318 opflex::modb::ObjectListener* listener)
319 {
320 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
321 }
322
328 opflex::ofcore::OFFramework& framework,
329 const opflex::modb::URI& uri,
330 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
331 : MO(framework, CLASS_ID, uri, oi) { }
332}; // class SecGroupRuleToRemoteAddressRRes
333
334} // namespace gbp
335} // namespace modelgbp
336#endif // GI_GBP_SECGROUPRULETOREMOTEADDRESSRRES_HPP
Definition SecGroupRuleToRemoteAddressRRes.hpp:23
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition SecGroupRuleToRemoteAddressRRes.hpp:317
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRuleToRemoteAddressRRes > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SecGroupRuleToRemoteAddressRRes from the managed object store.
Definition SecGroupRuleToRemoteAddressRRes.hpp:154
modelgbp::gbp::SecGroupRuleToRemoteAddressRRes & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition SecGroupRuleToRemoteAddressRRes.hpp:125
SecGroupRuleToRemoteAddressRRes(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of SecGroupRuleToRemoteAddressRRes.
Definition SecGroupRuleToRemoteAddressRRes.hpp:327
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the SecGroupRuleToRemoteAddressRRes object with the specified URI using the currently-active m...
Definition SecGroupRuleToRemoteAddressRRes.hpp:240
boost::optional< const uint8_t > getRole()
Get the value of role if it has been set.
Definition SecGroupRuleToRemoteAddressRRes.hpp:44
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRuleToRemoteAddressRRes > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of SecGroupRuleToRemoteAddressRRes from the managed object store using the defau...
Definition SecGroupRuleToRemoteAddressRRes.hpp:172
bool isRoleSet()
Check whether role has been set.
Definition SecGroupRuleToRemoteAddressRRes.hpp:35
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for SecGroupRuleToRemoteAddressRRes.
Definition SecGroupRuleToRemoteAddressRRes.hpp:29
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRuleToRemoteAddressRRes > > resolve()
Retrieve an instance of SecGroupRuleToRemoteAddressRRes from the default managed object store by cons...
Definition SecGroupRuleToRemoteAddressRRes.hpp:211
modelgbp::gbp::SecGroupRuleToRemoteAddressRRes & unsetType()
Unset type in the currently-active mutator.
Definition SecGroupRuleToRemoteAddressRRes.hpp:137
modelgbp::gbp::SecGroupRuleToRemoteAddressRRes & setRole(const uint8_t newValue)
Set role to the specified value in the currently-active mutator.
Definition SecGroupRuleToRemoteAddressRRes.hpp:69
modelgbp::gbp::SecGroupRuleToRemoteAddressRRes & unsetRole()
Unset role in the currently-active mutator.
Definition SecGroupRuleToRemoteAddressRRes.hpp:81
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRuleToRemoteAddressRRes > > resolve(opflex::ofcore::OFFramework &framework)
Retrieve an instance of SecGroupRuleToRemoteAddressRRes from the managed object store by constructing...
Definition SecGroupRuleToRemoteAddressRRes.hpp:192
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 SecGroupRuleToRemoteAddressRRes.hpp:272
const uint8_t getType(const uint8_t defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition SecGroupRuleToRemoteAddressRRes.hpp:112
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 SecGroupRuleToRemoteAddressRRes.hpp:291
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition SecGroupRuleToRemoteAddressRRes.hpp:100
const uint8_t getRole(const uint8_t defaultValue)
Get the value of role if set, otherwise the value of default passed in.
Definition SecGroupRuleToRemoteAddressRRes.hpp:56
bool isTypeSet()
Check whether type has been set.
Definition SecGroupRuleToRemoteAddressRRes.hpp:91
static void remove(const opflex::modb::URI &uri)
Remove the SecGroupRuleToRemoteAddressRRes object with the specified URI using the currently-active m...
Definition SecGroupRuleToRemoteAddressRRes.hpp:256
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition SecGroupRuleToRemoteAddressRRes.hpp:303
void remove()
Remove this instance using the currently-active mutator.
Definition SecGroupRuleToRemoteAddressRRes.hpp:225
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12