olp-cpp-sdk  1.22.0
Public Types | Public Member Functions | List of all members
olp::dataservice::read::PrefetchPartitionsRequest Class Referencefinal

Encapsulates the fields required to prefetch a list of partitions for the given catalog and layer. More...

#include <PrefetchPartitionsRequest.h>

Public Types

using PartitionIds = std::vector< std::string >
 An alias for the vector of partitions IDs.
 

Public Member Functions

PrefetchPartitionsRequestWithPartitionIds (PartitionIds partition_ids)
 Sets the list of partitions. More...
 
const PartitionIdsGetPartitionIds () const
 Gets the list of the partitions. More...
 
const boost::optional< std::string > & GetBillingTag () const
 Gets the billing tag to group billing records together. More...
 
PrefetchPartitionsRequestWithBillingTag (boost::optional< std::string > billing_tag)
 Sets the billing tag for the request. More...
 
PrefetchPartitionsRequestWithBillingTag (std::string &&billing_tag)
 Sets the billing tag for the request. More...
 
uint32_t GetPriority () const
 Gets the request priority. More...
 
PrefetchPartitionsRequestWithPriority (uint32_t priority)
 Sets the priority of the prefetch request. More...
 
std::string CreateKey (const std::string &layer_id, boost::optional< int64_t > version=boost::none) const
 Creates a readable format for the request. More...
 

Detailed Description

Encapsulates the fields required to prefetch a list of partitions for the given catalog and layer.

Member Function Documentation

◆ CreateKey()

std::string olp::dataservice::read::PrefetchPartitionsRequest::CreateKey ( const std::string &  layer_id,
boost::optional< int64_t >  version = boost::none 
) const
inline

Creates a readable format for the request.

Parameters
layer_idThe ID of the layer that is used for the request.
versionThe catalog version.
Returns
A string representation of the request.

◆ GetBillingTag()

const boost::optional<std::string>& olp::dataservice::read::PrefetchPartitionsRequest::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.

◆ GetPartitionIds()

const PartitionIds& olp::dataservice::read::PrefetchPartitionsRequest::GetPartitionIds ( ) const
inline

Gets the list of the partitions.

Returns
The vector of strings that represent partitions.

◆ GetPriority()

uint32_t olp::dataservice::read::PrefetchPartitionsRequest::GetPriority ( ) const
inline

Gets the request priority.

The default priority is Priority::LOW.

Returns
The request priority.

◆ WithBillingTag() [1/2]

PrefetchPartitionsRequest& olp::dataservice::read::PrefetchPartitionsRequest::WithBillingTag ( boost::optional< std::string >  billing_tag)
inline

Sets the billing tag for the request.

See also
GetBillingTag() for information on usage and format.
Parameters
billing_tagThe BillingTag string or boost::none.
Returns
A reference to the updated PrefetchTilesRequest instance.

◆ WithBillingTag() [2/2]

PrefetchPartitionsRequest& olp::dataservice::read::PrefetchPartitionsRequest::WithBillingTag ( std::string &&  billing_tag)
inline

Sets the billing tag for the request.

See also
GetBillingTag() for information on usage and format.
Parameters
billing_tagThe rvalue reference to the BillingTag string or boost::none.
Returns
A reference to the updated PrefetchTilesRequest instance.

◆ WithPartitionIds()

PrefetchPartitionsRequest& olp::dataservice::read::PrefetchPartitionsRequest::WithPartitionIds ( PartitionIds  partition_ids)
inline

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. If partitions list has more than 100, it will be split internally to multiple requests.

Parameters
partition_idsThe list of partitions to request.
Returns
A reference to the updated PrefetchPartitionsRequest instance.

◆ WithPriority()

PrefetchPartitionsRequest& olp::dataservice::read::PrefetchPartitionsRequest::WithPriority ( uint32_t  priority)
inline

Sets the priority of the prefetch request.

Parameters
priorityThe priority of the request.
Returns
A reference to the updated PrefetchPartitionsRequest instance.

The documentation for this class was generated from the following file: