modelgbp Generated OpFlex Model 1.7.0
L3ExternalDomain.hpp
1
10#pragma once
11#ifndef GI_GBP_L3EXTERNALDOMAIN_HPP
12#define GI_GBP_L3EXTERNALDOMAIN_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(gbp/L3ExternalNetwork)
19 */
20#include "modelgbp/gbp/L3ExternalNetwork.hpp"
21
22namespace modelgbp {
23namespace gbp {
24
26 : public opflex::modb::mointernal::MO
27{
28public:
29
33 static const opflex::modb::class_id_t CLASS_ID = 168;
34
39 bool isNameSet()
40 {
41 return getObjectInstance().isSet(5505025ul, opflex::modb::PropertyInfo::STRING);
42 }
43
48 boost::optional<const std::string&> getName()
49 {
50 if (isNameSet())
51 return getObjectInstance().getString(5505025ul);
52 return boost::none;
53 }
54
60 const std::string& getName(const std::string& defaultValue)
61 {
62 return getName().get_value_or(defaultValue);
63 }
64
73 modelgbp::gbp::L3ExternalDomain& setName(const std::string& newValue)
74 {
75 getTLMutator().modify(getClassId(), getURI())->setString(5505025ul, newValue);
76 return *this;
77 }
78
86 {
87 getTLMutator().modify(getClassId(), getURI())->unset(5505025ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
88 return *this;
89 }
90
102 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::L3ExternalDomain> > resolve(
103 opflex::ofcore::OFFramework& framework,
104 const opflex::modb::URI& uri)
105 {
106 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::L3ExternalDomain>(framework, CLASS_ID, uri);
107 }
108
120 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::L3ExternalDomain> > resolve(
121 const opflex::modb::URI& uri)
122 {
123 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::L3ExternalDomain>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
124 }
125
146 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::L3ExternalDomain> > resolve(
147 opflex::ofcore::OFFramework& framework,
148 const std::string& policySpaceName,
149 const std::string& gbpRoutingDomainName,
150 const std::string& gbpL3ExternalDomainName)
151 {
152 return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement("GbpL3ExternalDomain").addElement(gbpL3ExternalDomainName).build());
153 }
154
174 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::L3ExternalDomain> > resolve(
175 const std::string& policySpaceName,
176 const std::string& gbpRoutingDomainName,
177 const std::string& gbpL3ExternalDomainName)
178 {
179 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,gbpL3ExternalDomainName);
180 }
181
193 boost::optional<OF_SHARED_PTR<modelgbp::gbp::L3ExternalNetwork> > resolveGbpL3ExternalNetwork(
194 const std::string& gbpL3ExternalNetworkName)
195 {
196 return modelgbp::gbp::L3ExternalNetwork::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("GbpL3ExternalNetwork").addElement(gbpL3ExternalNetworkName).build());
197 }
198
211 OF_SHARED_PTR<modelgbp::gbp::L3ExternalNetwork> addGbpL3ExternalNetwork(
212 const std::string& gbpL3ExternalNetworkName)
213 {
214 OF_SHARED_PTR<modelgbp::gbp::L3ExternalNetwork> result = addChild<modelgbp::gbp::L3ExternalNetwork>(
215 CLASS_ID, getURI(), 2152988841ul, 169,
216 opflex::modb::URIBuilder(getURI()).addElement("GbpL3ExternalNetwork").addElement(gbpL3ExternalNetworkName).build()
217 );
218 result->setName(gbpL3ExternalNetworkName);
219 return result;
220 }
221
236 void resolveGbpL3ExternalNetwork(/* out */ std::vector<OF_SHARED_PTR<modelgbp::gbp::L3ExternalNetwork> >& out)
237 {
238 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::L3ExternalNetwork>(
239 getFramework(), CLASS_ID, getURI(), 2152988841ul, 169, out);
240 }
241
250 void remove()
251 {
252 getTLMutator().remove(CLASS_ID, getURI());
253 }
254
265 static void remove(opflex::ofcore::OFFramework& framework,
266 const opflex::modb::URI& uri)
267 {
268 MO::remove(framework, CLASS_ID, uri);
269 }
270
281 static void remove(const opflex::modb::URI& uri)
282 {
283 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
284 }
285
304 static void remove(
305 opflex::ofcore::OFFramework& framework,
306 const std::string& policySpaceName,
307 const std::string& gbpRoutingDomainName,
308 const std::string& gbpL3ExternalDomainName)
309 {
310 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement("GbpL3ExternalDomain").addElement(gbpL3ExternalDomainName).build());
311 }
312
331 static void remove(
332 const std::string& policySpaceName,
333 const std::string& gbpRoutingDomainName,
334 const std::string& gbpL3ExternalDomainName)
335 {
336 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,gbpL3ExternalDomainName);
337 }
338
350 static void registerListener(
351 opflex::ofcore::OFFramework& framework,
352 opflex::modb::ObjectListener* listener)
353 {
354 opflex::modb::mointernal
355 ::MO::registerListener(framework, listener, CLASS_ID);
356 }
357
369 static void registerListener(
370 opflex::modb::ObjectListener* listener)
371 {
372 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
373 }
374
382 opflex::ofcore::OFFramework& framework,
383 opflex::modb::ObjectListener* listener)
384 {
385 opflex::modb::mointernal
386 ::MO::unregisterListener(framework, listener, CLASS_ID);
387 }
388
396 opflex::modb::ObjectListener* listener)
397 {
398 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
399 }
400
406 opflex::ofcore::OFFramework& framework,
407 const opflex::modb::URI& uri,
408 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
409 : MO(framework, CLASS_ID, uri, oi) { }
410}; // class L3ExternalDomain
411
412} // namespace gbp
413} // namespace modelgbp
414#endif // GI_GBP_L3EXTERNALDOMAIN_HPP
Definition L3ExternalDomain.hpp:27
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::L3ExternalDomain > > resolve(const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &gbpL3ExternalDomainName)
Retrieve an instance of L3ExternalDomain from the default managed object store by constructing its UR...
Definition L3ExternalDomain.hpp:174
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition L3ExternalDomain.hpp:60
static void remove(const opflex::modb::URI &uri)
Remove the L3ExternalDomain object with the specified URI using the currently-active mutator and the ...
Definition L3ExternalDomain.hpp:281
void remove()
Remove this instance using the currently-active mutator.
Definition L3ExternalDomain.hpp:250
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition L3ExternalDomain.hpp:48
L3ExternalDomain(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of L3ExternalDomain.
Definition L3ExternalDomain.hpp:405
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for L3ExternalDomain.
Definition L3ExternalDomain.hpp:33
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::L3ExternalDomain > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of L3ExternalDomain from the managed object store.
Definition L3ExternalDomain.hpp:102
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition L3ExternalDomain.hpp:395
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition L3ExternalDomain.hpp:381
modelgbp::gbp::L3ExternalDomain & unsetName()
Unset name in the currently-active mutator.
Definition L3ExternalDomain.hpp:85
static void remove(const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &gbpL3ExternalDomainName)
Remove the L3ExternalDomain object with the specified path elements from the managed object store usi...
Definition L3ExternalDomain.hpp:331
bool isNameSet()
Check whether name has been set.
Definition L3ExternalDomain.hpp:39
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 L3ExternalDomain.hpp:350
static void remove(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &gbpL3ExternalDomainName)
Remove the L3ExternalDomain object with the specified path elements from the managed object store.
Definition L3ExternalDomain.hpp:304
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the L3ExternalDomain object with the specified URI using the currently-active mutator.
Definition L3ExternalDomain.hpp:265
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 L3ExternalDomain.hpp:369
modelgbp::gbp::L3ExternalDomain & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition L3ExternalDomain.hpp:73
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::L3ExternalDomain > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of L3ExternalDomain from the managed object store using the default framework in...
Definition L3ExternalDomain.hpp:120
void resolveGbpL3ExternalNetwork(std::vector< OF_SHARED_PTR< modelgbp::gbp::L3ExternalNetwork > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::L3ExternalNetwork.
Definition L3ExternalDomain.hpp:236
boost::optional< OF_SHARED_PTR< modelgbp::gbp::L3ExternalNetwork > > resolveGbpL3ExternalNetwork(const std::string &gbpL3ExternalNetworkName)
Retrieve the child object with the specified naming properties.
Definition L3ExternalDomain.hpp:193
OF_SHARED_PTR< modelgbp::gbp::L3ExternalNetwork > addGbpL3ExternalNetwork(const std::string &gbpL3ExternalNetworkName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition L3ExternalDomain.hpp:211
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::L3ExternalDomain > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &gbpL3ExternalDomainName)
Retrieve an instance of L3ExternalDomain from the managed object store by constructing its URI from t...
Definition L3ExternalDomain.hpp:146
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::L3ExternalNetwork > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of L3ExternalNetwork from the managed object store.
Definition L3ExternalNetwork.hpp:114
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12