olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
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.
 
const PartitionIdsGetPartitionIds () const
 Gets the list of the partitions.
 
const porting::optional< std::string > & GetBillingTag () const
 Gets the billing tag to group billing records together.
 
template<class T = porting::optional<std::string>>
PrefetchPartitionsRequestWithBillingTag (T &&billing_tag)
 Sets the billing tag for the request.
 
uint32_t GetPriority () const
 Gets the request priority.
 
PrefetchPartitionsRequestWithPriority (uint32_t priority)
 Sets the priority of the prefetch request.
 
std::string CreateKey (const std::string &layer_id, porting::optional< int64_t > version=porting::none) const
 Creates a readable format for the request.
 

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,
porting::optional< int64_t >  version = porting::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 porting::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 olp::porting::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()

template<class T = porting::optional<std::string>>
PrefetchPartitionsRequest & olp::dataservice::read::PrefetchPartitionsRequest::WithBillingTag ( T &&  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 olp::porting::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: