27#include <olp/core/geo/tiling/TileKey.h>
28#include <olp/core/porting/optional.h>
29#include <olp/core/thread/TaskScheduler.h>
30#include <olp/dataservice/read/DataServiceReadApi.h>
33namespace dataservice {
53 const std::vector<geo::TileKey>&
GetTileKeys()
const {
return tile_keys_; }
63 tile_keys_ = std::move(tile_keys);
82 min_level_ = min_level;
101 max_level_ = max_level;
128 template <
class T = porting::optional<std::
string>>
130 billing_tag_ = std::forward<T>(tag);
148 const bool data_aggregation_enabled) {
149 data_aggregation_enabled_ = data_aggregation_enabled;
179 priority_ = priority;
190 std::string
CreateKey(
const std::string& layer_id)
const {
191 std::stringstream out;
192 out << layer_id <<
"[" << GetMinLevel() <<
"/" << GetMaxLevel() <<
"]"
193 <<
"(" << GetTileKeys().size() <<
")";
194 if (GetBillingTag()) {
195 out <<
"$" << *GetBillingTag();
201 std::string layer_id_;
202 std::vector<geo::TileKey> tile_keys_;
203 unsigned int min_level_{geo::TileKey::LevelCount};
204 unsigned int max_level_{geo::TileKey::LevelCount};
205 porting::optional<std::string> billing_tag_;
206 bool data_aggregation_enabled_{
false};
207 uint32_t priority_{thread::LOW};
Encapsulates the fields required to prefetch the specified layers, tiles, and levels.
Definition PrefetchTilesRequest.h:46
PrefetchTilesRequest & WithTileKeys(std::vector< geo::TileKey > tile_keys)
Sets the vector of the root tile keys for the request.
Definition PrefetchTilesRequest.h:62
bool GetDataAggregationEnabled() const
Gets the data aggregation flag.
Definition PrefetchTilesRequest.h:160
PrefetchTilesRequest & WithPriority(uint32_t priority)
Sets the priority of the prefetch request.
Definition PrefetchTilesRequest.h:178
PrefetchTilesRequest & WithBillingTag(T &&tag)
Sets the billing tag for the request.
Definition PrefetchTilesRequest.h:129
PrefetchTilesRequest & WithMinLevel(unsigned int min_level)
Sets the minimum tiles level for the request.
Definition PrefetchTilesRequest.h:81
unsigned int GetMinLevel() const
Gets the minimum tiles level to prefetch.
Definition PrefetchTilesRequest.h:72
const porting::optional< std::string > & GetBillingTag() const
Gets the billing tag to group billing records together.
Definition PrefetchTilesRequest.h:115
uint32_t GetPriority() const
Gets the request priority.
Definition PrefetchTilesRequest.h:169
unsigned int GetMaxLevel() const
Gets the maximum tiles level to prefetch.
Definition PrefetchTilesRequest.h:91
PrefetchTilesRequest & WithDataAggregationEnabled(const bool data_aggregation_enabled)
Changes the prefetch behavior when prefetching a list of tiles.
Definition PrefetchTilesRequest.h:147
std::string CreateKey(const std::string &layer_id) const
Creates a readable format for the request.
Definition PrefetchTilesRequest.h:190
const std::vector< geo::TileKey > & GetTileKeys() const
Get the vector of the root tile keys.
Definition PrefetchTilesRequest.h:53
PrefetchTilesRequest & WithMaxLevel(unsigned int max_level)
Sets the maximum tile level for the request.
Definition PrefetchTilesRequest.h:100
Rules all the other namespaces.
Definition AppleSignInProperties.h:24