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

Encapsulates the fields required to request tile for the given key. More...

#include <TileRequest.h>

Public Member Functions

const boost::optional< std::string > & GetBillingTag () const
 Gets the billing tag to group billing records together. More...
 
TileRequestWithBillingTag (boost::optional< std::string > tag)
 Sets the billing tag for the request. More...
 
TileRequestWithBillingTag (std::string tag)
 Sets the billing tag for the request. More...
 
TileRequestWithTileKey (geo::TileKey tile_key)
 Sets the tile key for the request. More...
 
const geo::TileKeyGetTileKey () const
 Gets a tile key value. More...
 
FetchOptions GetFetchOption () const
 Gets the fetch option that controls how requests are handled. More...
 
TileRequestWithFetchOption (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...
 
TileRequestWithPriority (uint32_t priority)
 Sets the priority of the request. More...
 
std::string CreateKey (const std::string &layer_id) const
 Creates a readable format for the request. More...
 

Detailed Description

Encapsulates the fields required to request tile for the given key.

You should specify tile key. Additionaly offset and depth could be set. If not set used default values, for offset default value is 2, for depth - 4.

Member Function Documentation

◆ CreateKey()

std::string olp::dataservice::read::TileRequest::CreateKey ( const std::string &  layer_id) const
inline

Creates a readable format for the request.

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

◆ GetBillingTag()

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

◆ GetPriority()

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

Gets the request priority.

The default priority is Priority::NORMAL.

Returns
The request priority.

◆ GetTileKey()

const geo::TileKey& olp::dataservice::read::TileRequest::GetTileKey ( ) const
inline

Gets a tile key value.

Returns
The tile key or boost::none if tile_key is not set.

◆ WithBillingTag() [1/2]

TileRequest& olp::dataservice::read::TileRequest::WithBillingTag ( boost::optional< std::string >  tag)
inline

Sets the billing tag for the request.

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

◆ WithBillingTag() [2/2]

TileRequest& olp::dataservice::read::TileRequest::WithBillingTag ( std::string  tag)
inline

Sets the billing tag for the request.

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

◆ WithFetchOption()

TileRequest& olp::dataservice::read::TileRequest::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_optionThe FetchOption enum.
Returns
A reference to the updated TileRequest instance.

◆ WithPriority()

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

Sets the priority of the request.

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

◆ WithTileKey()

TileRequest& olp::dataservice::read::TileRequest::WithTileKey ( geo::TileKey  tile_key)
inline

Sets the tile key for the request.

Parameters
tile_keyTile key value.
Returns
A reference to the updated TileRequest instance.

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