26#include <olp/core/geo/tiling/TileKey.h>
27#include <olp/core/porting/optional.h>
28#include <olp/core/thread/TaskScheduler.h>
29#include <olp/dataservice/read/FetchOptions.h>
32namespace dataservice {
67 template <
class T = porting::optional<std::
string>>
69 billing_tag_ = std::forward<T>(tag);
81 tile_key_ = std::move(tile_key);
113 fetch_option_ = fetch_option;
134 priority_ = priority;
145 std::string
CreateKey(
const std::string& layer_id)
const {
146 std::stringstream out;
147 out << layer_id <<
"[" << GetTileKey().ToHereTile() <<
"]";
148 if (GetBillingTag()) {
149 out <<
"$" << *GetBillingTag();
151 out <<
"^" << GetFetchOption();
156 porting::optional<std::string> billing_tag_;
158 FetchOptions fetch_option_{OnlineIfNotFound};
159 uint32_t priority_{thread::NORMAL};
Encapsulates the fields required to request tile for the given key.
Definition TileRequest.h:42
TileRequest & WithFetchOption(FetchOptions fetch_option)
Sets the fetch option that you can use to set the source from which data should be fetched.
Definition TileRequest.h:112
TileRequest & WithTileKey(geo::TileKey tile_key)
Sets the tile key for the request.
Definition TileRequest.h:80
const porting::optional< std::string > & GetBillingTag() const
Gets the billing tag to group billing records together.
Definition TileRequest.h:54
TileRequest & WithPriority(uint32_t priority)
Sets the priority of the request.
Definition TileRequest.h:133
std::string CreateKey(const std::string &layer_id) const
Creates a readable format for the request.
Definition TileRequest.h:145
TileRequest & WithBillingTag(T &&tag)
Sets the billing tag for the request.
Definition TileRequest.h:68
FetchOptions GetFetchOption() const
Gets the fetch option that controls how requests are handled.
Definition TileRequest.h:100
uint32_t GetPriority() const
Gets the request priority.
Definition TileRequest.h:124
const geo::TileKey & GetTileKey() const
Gets a tile key value.
Definition TileRequest.h:90
Addresses a tile in a quadtree.
Definition TileKey.h:63
Rules all the other namespaces.
Definition AppleSignInProperties.h:24