Allows a Here Resource Name (HRN) to be passed to the operations that require it.
More...
#include <HRN.h>
Allows a Here Resource Name (HRN) to be passed to the operations that require it.
◆ ServiceType
Defines the objects to which the HRN can refer.
Enumerator |
---|
Unknown | The service type is unknown.
|
Data | This HRN represents the data catalog.
|
Schema | This HRN represents the schema type.
|
Pipeline | This HRN represents the pipeline instance.
|
◆ HRN()
olp::client::HRN::HRN |
( |
const std::string & |
input | ) |
|
|
explicit |
Creates the HRN
instance from a string.
The passed string must start with hrn:
.
- Parameters
-
◆ FromString()
static HRN olp::client::HRN::FromString |
( |
const std::string & |
input | ) |
|
|
static |
Creates the HRN
instance from a string.
The passed string must start with hrn:
.
- Parameters
-
- Returns
- The
HRN
instance created from the string.
◆ GetAccount()
const std::string& olp::client::HRN::GetAccount |
( |
| ) |
const |
|
inline |
Returns the account of this HRN.
- Returns
- The account associated with this HRN.
◆ GetCatalogId()
const std::string& olp::client::HRN::GetCatalogId |
( |
| ) |
const |
|
inline |
Returns the catalog ID.
- Note
- Must be valid in case
ServiceType == Data
.
- Returns
- The catalog ID.
◆ GetGroupId()
const std::string& olp::client::HRN::GetGroupId |
( |
| ) |
const |
|
inline |
Returns the group ID.
- Returns
- The group ID or a empty string in case
ServiceType != Schema
.
◆ GetLayerId()
const std::string& olp::client::HRN::GetLayerId |
( |
| ) |
const |
|
inline |
Returns the layer ID.
- Note
- This parameter is optional and not always used.
- Returns
- The layer ID or a empty string if not set.
◆ GetPartition()
const std::string& olp::client::HRN::GetPartition |
( |
| ) |
const |
|
inline |
Returns the partitions of this HRN.
- Note
- Must be valid when
ServiceType == Data
or when ServiceType == Pipeline
.
- Returns
- The partition of this HRN.
◆ GetPipelineId()
const std::string& olp::client::HRN::GetPipelineId |
( |
| ) |
const |
|
inline |
Returns the pipeline ID.
- Returns
- The pipeline ID or and empty string in case
HRNServiceType != Pipeline
and ServiceType != Schema
.
◆ GetRegion()
const std::string& olp::client::HRN::GetRegion |
( |
| ) |
const |
|
inline |
Returns the region of this HRN.
- Returns
- The region of this HRN.
◆ GetSchemaName()
const std::string& olp::client::HRN::GetSchemaName |
( |
| ) |
const |
|
inline |
Retruns the schema name.
- Returns
- The schema name or a empty string in case
ServiceType != Schema
.
◆ GetService()
Returns the service type of this HRN.
- Returns
- The service type enum.
◆ GetVersion()
const std::string& olp::client::HRN::GetVersion |
( |
| ) |
const |
|
inline |
Returns the catalog version.
- Returns
- The catalog version or a empty string in case
ServiceType != Schema
.
◆ IsNull()
bool olp::client::HRN::IsNull |
( |
| ) |
const |
Checks whether any of the service type fields of the HRN
instance are empty.
- Returns
- True if at least one of the service type fields of the
HRN
instance is empty; false otherwise.
◆ operator bool()
olp::client::HRN::operator bool |
( |
| ) |
const |
|
explicit |
Checks whether the service type fields of the HRN
instance are not empty.
- Returns
- True if the service type fields of the
HRN
instance are not empty; false otherwise.
◆ operator!=()
bool olp::client::HRN::operator!= |
( |
const HRN & |
rhs | ) |
const |
Checks whether the values of the HRN
parameter are not the same as the values of the rhs
parameter.
- Parameters
-
- Returns
- True if the values of the
HRN
and rhs
parameters are not equal; false otherwise.
◆ operator==()
bool olp::client::HRN::operator== |
( |
const HRN & |
rhs | ) |
const |
Checks whether the values of the HRN
parameter are the same as the values of the rhs
parameter.
- Parameters
-
- Returns
- True if the values of the
HRN
and rhs
parameters are equal; false otherwise.
◆ ToCatalogHRNString()
std::string olp::client::HRN::ToCatalogHRNString |
( |
| ) |
const |
Converts this HRN to a string catalog ID.
- Note
- Only relevant if the HRN has
ServiceType == Data
.
- Returns
- The catalog ID that has the
hrn:
prefix.
◆ ToString()
std::string olp::client::HRN::ToString |
( |
| ) |
const |
Converts this HRN to a string.
Example: hrn:partition:service:region:account:resource
- Returns
- The
HRN
string that has the hrn:
prefix.
◆ UniqueFromString()
static std::unique_ptr<HRN> olp::client::HRN::UniqueFromString |
( |
const std::string & |
input | ) |
|
|
static |
Creates the unique HRN
instance from a string.
The passed string must start with hrn:
.
- Parameters
-
- Returns
- The unique
HRN
instance created from the string.
The documentation for this class was generated from the following file:
- olp-cpp-sdk-core/include/olp/core/client/HRN.h