olp-cpp-sdk
1.22.0
|
Encapsulates the fields required to request data for the given catalog, layer, and partition. More...
#include <DataRequest.h>
Public Member Functions | |
const boost::optional< std::string > & | GetPartitionId () const |
Gets the ID of the requested partition. More... | |
DataRequest & | WithPartitionId (boost::optional< std::string > partition_id) |
Sets the partition ID. More... | |
DataRequest & | WithPartitionId (std::string &&partition_id) |
Sets the partition ID. More... | |
const boost::optional< std::string > & | GetDataHandle () const |
Get the partition data handle. More... | |
DataRequest & | WithDataHandle (boost::optional< std::string > data_handle) |
Sets the partition data handle. More... | |
DataRequest & | WithDataHandle (std::string &&data_handle) |
Sets the partition data handle. More... | |
const boost::optional< std::string > & | GetBillingTag () const |
Gets the billing tag to group billing records together. More... | |
DataRequest & | WithBillingTag (boost::optional< std::string > tag) |
Sets the billing tag for the request. More... | |
DataRequest & | WithBillingTag (std::string &&tag) |
Sets the billing tag for the request. More... | |
FetchOptions | GetFetchOption () const |
Gets the fetch option that controls how requests are handled. More... | |
DataRequest & | WithFetchOption (FetchOptions fetch_option) |
Sets the fetch option that you can use to set the source from which data should be fetched. More... | |
uint32_t | GetPriority () const |
Gets the request priority. More... | |
DataRequest & | WithPriority (uint32_t priority) |
Sets the priority of the request. More... | |
std::string | CreateKey (const std::string &layer_id, boost::optional< int64_t > version) const |
Creates a readable format for the request. More... | |
Encapsulates the fields required to request data for the given catalog, layer, and partition.
You should specify either a partition ID or a data handle. If both the partition ID and data handle are set in the request, the request fails with the following error: ErrorCode::PreconditionFailed
.
|
inline |
Creates a readable format for the request.
layer_id | The ID of the layer that is used for the request. |
version | The catalog version. |
|
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].
BillingTag
string or boost::none
if the billing tag is not set.
|
inline |
Get the partition data handle.
You can use the data handle to retrieve the data that relates to this partition. The data handle identifies a specific blob so that you can request the blob contents with the Blob API. When requesting data from the Blob API, you must specify the catalog ID, layer ID, and data handle.
|
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.
|
inline |
Gets the ID of the requested partition.
|
inline |
Gets the request priority.
The default priority is Priority::NORMAL
.
|
inline |
Sets the billing tag for the request.
GetBillingTag()
for information on usage and format.tag | The BillingTag string or boost::none . |
DataRequest
instance.
|
inline |
Sets the billing tag for the request.
GetBillingTag()
for information on usage and format.tag | The rvalue reference to the BillingTag string or boost::none . |
DataRequest
instance.
|
inline |
Sets the partition data handle.
If the data handle cannot be found in the layer, the callback returns with an empty response (the null
result for data and an error).
GetDataHandle
for information on the partition data handle.data_handle | The partition data handle. |
DataRequest
instance.
|
inline |
Sets the partition data handle.
If the data handle cannot be found in the layer, the callback returns with an empty response (the null
result for data and an error).
GetDataHandle
for information on the partition data handle.data_handle | The partition data handle. |
DataRequest
instance.
|
inline |
Sets the fetch option that you can use to set the source from which data should be fetched.
GetFetchOption()
for information on usage and format.fetch_option | The FetchOption enum. |
DataRequest
instance.
|
inline |
Sets the partition ID.
If the partition cannot be found in the layer, the callback returns with an empty response (the null
result for data and an error).
partition_id | The partition ID. |
DataRequest
instance.
|
inline |
Sets the partition ID.
If the partition cannot be found in the layer, the callback returns with an empty response (the null
result for data and an error).
partition_id | The partition ID. |
DataRequest
instance.
|
inline |
Sets the priority of the request.
priority | The priority of the request. |
DataRequest
instance.