Encapsulates the fields required to request a list of partitions for the given catalog and layer.
More...
#include <PartitionsRequest.h>
|
using | PartitionIds = std::vector< std::string > |
| An alias for the vector of partitions IDs.
|
|
using | AdditionalFields = std::vector< std::string > |
| An alias for the set of additional fields.
|
|
|
static constexpr const char * | kDataSize = "dataSize" |
| Additional field to request partition data size, see GetPartitions.
|
|
static constexpr const char * | kChecksum = "checksum" |
| Additional field to request partition checksum, see GetPartitions.
|
|
static constexpr const char * | kCompressedDataSize = "compressedDataSize" |
|
static constexpr const char * | kCrc = "crc" |
| Additional field to request partition crc, see GetPartitions.
|
|
Encapsulates the fields required to request a list of partitions for the given catalog and layer.
◆ CreateKey()
std::string olp::dataservice::read::PartitionsRequest::CreateKey |
( |
const std::string & |
layer_id, |
|
|
boost::optional< int64_t > |
version = boost::none |
|
) |
| const |
|
inline |
Creates a readable format for the request.
- Parameters
-
layer_id | The ID of the layer that is used for the request. |
version | The catalog version. |
- Returns
- A string representation of the request.
◆ GetAdditionalFields()
const AdditionalFields& olp::dataservice::read::PartitionsRequest::GetAdditionalFields |
( |
| ) |
const |
|
inline |
Gets the list of additional fields.
- Returns
- The set of additional fields.
◆ GetBillingTag()
const boost::optional<std::string>& olp::dataservice::read::PartitionsRequest::GetBillingTag |
( |
| ) |
const |
|
inline |
Gets the billing tag to group billing records together.
The billing tag is an optional free-form tag that is used for grouping billing records together. If supplied, it must be 4–16 characters long and contain only alphanumeric ASCII characters [A-Za-z0-9].
- Returns
- The
BillingTag
string or boost::none
if the billing tag is not set.
◆ GetFetchOption()
FetchOptions olp::dataservice::read::PartitionsRequest::GetFetchOption |
( |
| ) |
const |
|
inline |
Gets the fetch option that controls how requests are handled.
The default option is OnlineIfNotFound
that queries the network if the requested resource is not in the cache.
- Returns
- The fetch option.
◆ GetPartitionIds()
const PartitionIds& olp::dataservice::read::PartitionsRequest::GetPartitionIds |
( |
| ) |
const |
|
inline |
Gets the list of the partitions.
- Returns
- The vector of strings that represent partitions.
◆ WithAdditionalFields()
Sets the list of additional fields.
When specified, the result metadata will include the additional information requested. The supported fields are:
- dataSize
- checksum
- compressedDataSize
- crc
- Parameters
-
additional_fields | The list of additional fields. |
- Returns
- A reference to the updated
PartitionsRequest
instance.
◆ WithBillingTag() [1/2]
PartitionsRequest& olp::dataservice::read::PartitionsRequest::WithBillingTag |
( |
boost::optional< std::string > |
billingTag | ) |
|
|
inline |
Sets the billing tag for the request.
- See also
GetBillingTag()
for information on usage and format.
- Parameters
-
billingTag | The BillingTag string or boost::none . |
- Returns
- A reference to the updated
PrefetchTilesRequest
instance.
◆ WithBillingTag() [2/2]
PartitionsRequest& olp::dataservice::read::PartitionsRequest::WithBillingTag |
( |
std::string && |
billingTag | ) |
|
|
inline |
Sets the billing tag for the request.
- See also
GetBillingTag()
for information on usage and format.
- Parameters
-
billingTag | The rvalue reference to the BillingTag string or boost::none . |
- Returns
- A reference to the updated
PrefetchTilesRequest
instance.
◆ WithFetchOption()
PartitionsRequest& olp::dataservice::read::PartitionsRequest::WithFetchOption |
( |
FetchOptions |
fetch_option | ) |
|
|
inline |
Sets the fetch option that you can use to set the source from which data should be fetched.
- See also
GetFetchOption()
for information on usage and format.
- Parameters
-
fetch_option | The FetchOption enum. |
- Returns
- A reference to the updated
PrefetchTilesRequest
instance.
◆ WithPartitionIds()
Sets the list of partitions.
When the list is empty, the GetPartitions method will download the whole layer metadata. Additionally, a single request supports up to 100 partitions.
- Parameters
-
partition_ids | The list of partitions to request. |
- Returns
- A reference to the updated
PartitionsRequest
instance.
◆ kCompressedDataSize
constexpr const char* olp::dataservice::read::PartitionsRequest::kCompressedDataSize = "compressedDataSize" |
|
staticconstexpr |
Additional field to request partition compressed data size, see GetPartitions
The documentation for this class was generated from the following file: