11 #ifndef GI_GBP_EXTERNALSUBNET_HPP
12 #define GI_GBP_EXTERNALSUBNET_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(4423682ul, opflex::modb::PropertyInfo::STRING);
47 return getObjectInstance().getString(4423682ul);
56 const std::string&
getAddress(
const std::string& defaultValue)
58 return getAddress().get_value_or(defaultValue);
71 getTLMutator().modify(getClassId(), getURI())->setString(4423682ul, newValue);
83 getTLMutator().modify(getClassId(), getURI())->unset(4423682ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
93 return getObjectInstance().isSet(4423681ul, opflex::modb::PropertyInfo::STRING);
103 return getObjectInstance().getString(4423681ul);
112 const std::string&
getName(
const std::string& defaultValue)
114 return getName().get_value_or(defaultValue);
127 getTLMutator().modify(getClassId(), getURI())->setString(4423681ul, newValue);
139 getTLMutator().modify(getClassId(), getURI())->unset(4423681ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
149 return getObjectInstance().isSet(4423683ul, opflex::modb::PropertyInfo::U64);
159 return (
const uint8_t)getObjectInstance().getUInt64(4423683ul);
183 getTLMutator().modify(getClassId(), getURI())->setUInt64(4423683ul, newValue);
195 getTLMutator().modify(getClassId(), getURI())->unset(4423683ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
210 static boost::optional<boost::shared_ptr<modelgbp::gbp::ExternalSubnet> >
resolve(
211 opflex::ofcore::OFFramework& framework,
212 const opflex::modb::URI& uri)
214 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::ExternalSubnet>(framework,
CLASS_ID, uri);
228 static boost::optional<boost::shared_ptr<modelgbp::gbp::ExternalSubnet> >
resolve(
229 const opflex::modb::URI& uri)
231 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::ExternalSubnet>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
258 static boost::optional<boost::shared_ptr<modelgbp::gbp::ExternalSubnet> >
resolve(
259 opflex::ofcore::OFFramework& framework,
260 const std::string& policySpaceName,
261 const std::string& gbpRoutingDomainName,
262 const std::string& gbpL3ExternalDomainName,
263 const std::string& gbpL3ExternalNetworkName,
264 const std::string& gbpExternalSubnetName)
266 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement(
"GbpL3ExternalDomain").addElement(gbpL3ExternalDomainName).addElement(
"GbpL3ExternalNetwork").addElement(gbpL3ExternalNetworkName).addElement(
"GbpExternalSubnet").addElement(gbpExternalSubnetName).build());
292 static boost::optional<boost::shared_ptr<modelgbp::gbp::ExternalSubnet> >
resolve(
293 const std::string& policySpaceName,
294 const std::string& gbpRoutingDomainName,
295 const std::string& gbpL3ExternalDomainName,
296 const std::string& gbpL3ExternalNetworkName,
297 const std::string& gbpExternalSubnetName)
299 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,gbpL3ExternalDomainName,gbpL3ExternalNetworkName,gbpExternalSubnetName);
312 getTLMutator().remove(
CLASS_ID, getURI());
325 static void remove(opflex::ofcore::OFFramework& framework,
326 const opflex::modb::URI& uri)
328 MO::remove(framework,
CLASS_ID, uri);
341 static void remove(
const opflex::modb::URI& uri)
343 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
369 opflex::ofcore::OFFramework& framework,
370 const std::string& policySpaceName,
371 const std::string& gbpRoutingDomainName,
372 const std::string& gbpL3ExternalDomainName,
373 const std::string& gbpL3ExternalNetworkName,
374 const std::string& gbpExternalSubnetName)
376 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement(
"GbpL3ExternalDomain").addElement(gbpL3ExternalDomainName).addElement(
"GbpL3ExternalNetwork").addElement(gbpL3ExternalNetworkName).addElement(
"GbpExternalSubnet").addElement(gbpExternalSubnetName).build());
402 const std::string& policySpaceName,
403 const std::string& gbpRoutingDomainName,
404 const std::string& gbpL3ExternalDomainName,
405 const std::string& gbpL3ExternalNetworkName,
406 const std::string& gbpExternalSubnetName)
408 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,gbpL3ExternalDomainName,gbpL3ExternalNetworkName,gbpExternalSubnetName);
423 opflex::ofcore::OFFramework& framework,
424 opflex::modb::ObjectListener* listener)
426 opflex::modb::mointernal
427 ::MO::registerListener(framework, listener,
CLASS_ID);
442 opflex::modb::ObjectListener* listener)
454 opflex::ofcore::OFFramework& framework,
455 opflex::modb::ObjectListener* listener)
457 opflex::modb::mointernal
458 ::MO::unregisterListener(framework, listener,
CLASS_ID);
468 opflex::modb::ObjectListener* listener)
478 opflex::ofcore::OFFramework& framework,
479 const opflex::modb::URI& uri,
480 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
481 : MO(framework,
CLASS_ID, uri, oi) { }
486 #endif // GI_GBP_EXTERNALSUBNET_HPP
modelgbp::gbp::ExternalSubnet & unsetName()
Unset name in the currently-active mutator.
Definition: ExternalSubnet.hpp:137
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: ExternalSubnet.hpp:467
static boost::optional< boost::shared_ptr< modelgbp::gbp::ExternalSubnet > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of ExternalSubnet from the managed object store.
Definition: ExternalSubnet.hpp:210
boost::optional< const std::string & > getAddress()
Get the value of address if it has been set.
Definition: ExternalSubnet.hpp:44
static boost::optional< boost::shared_ptr< modelgbp::gbp::ExternalSubnet > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of ExternalSubnet from the managed object store using the default framework inst...
Definition: ExternalSubnet.hpp:228
modelgbp::gbp::ExternalSubnet & unsetPrefixLen()
Unset prefixLen in the currently-active mutator.
Definition: ExternalSubnet.hpp:193
modelgbp::gbp::ExternalSubnet & setAddress(const std::string &newValue)
Set address to the specified value in the currently-active mutator.
Definition: ExternalSubnet.hpp:69
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for ExternalSubnet.
Definition: ExternalSubnet.hpp:29
modelgbp::gbp::ExternalSubnet & setPrefixLen(const uint8_t newValue)
Set prefixLen to the specified value in the currently-active mutator.
Definition: ExternalSubnet.hpp:181
bool isAddressSet()
Check whether address has been set.
Definition: ExternalSubnet.hpp:35
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: ExternalSubnet.hpp:112
static boost::optional< boost::shared_ptr< modelgbp::gbp::ExternalSubnet > > resolve(const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &gbpL3ExternalDomainName, const std::string &gbpL3ExternalNetworkName, const std::string &gbpExternalSubnetName)
Retrieve an instance of ExternalSubnet from the default managed object store by constructing its URI ...
Definition: ExternalSubnet.hpp:292
bool isPrefixLenSet()
Check whether prefixLen has been set.
Definition: ExternalSubnet.hpp:147
Definition: ExternalSubnet.hpp:21
const uint8_t getPrefixLen(const uint8_t defaultValue)
Get the value of prefixLen if set, otherwise the value of default passed in.
Definition: ExternalSubnet.hpp:168
const std::string & getAddress(const std::string &defaultValue)
Get the value of address if set, otherwise the value of default passed in.
Definition: ExternalSubnet.hpp:56
boost::optional< const uint8_t > getPrefixLen()
Get the value of prefixLen if it has been set.
Definition: ExternalSubnet.hpp:156
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: ExternalSubnet.hpp:453
modelgbp::gbp::ExternalSubnet & unsetAddress()
Unset address in the currently-active mutator.
Definition: ExternalSubnet.hpp:81
bool isNameSet()
Check whether name has been set.
Definition: ExternalSubnet.hpp:91
static boost::optional< boost::shared_ptr< modelgbp::gbp::ExternalSubnet > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &gbpL3ExternalDomainName, const std::string &gbpL3ExternalNetworkName, const std::string &gbpExternalSubnetName)
Retrieve an instance of ExternalSubnet from the managed object store by constructing its URI from the...
Definition: ExternalSubnet.hpp:258
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: ExternalSubnet.hpp:100
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: ExternalSubnet.hpp:422
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: ExternalSubnet.hpp:441
modelgbp::gbp::ExternalSubnet & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: ExternalSubnet.hpp:125
ExternalSubnet(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of ExternalSubnet.
Definition: ExternalSubnet.hpp:477