27 #include <olp/core/geo/tiling/TileKey.h>
28 #include <olp/core/porting/deprecated.h>
29 #include <olp/core/thread/TaskScheduler.h>
30 #include <olp/dataservice/read/DataServiceReadApi.h>
31 #include <boost/optional.hpp>
34 namespace dataservice {
66 std::vector<geo::TileKey> tile_keys) {
67 tile_keys_ = std::move(tile_keys);
76 inline unsigned int GetMinLevel()
const {
return min_level_; }
86 min_level_ = min_level;
95 inline unsigned int GetMaxLevel()
const {
return max_level_; }
105 max_level_ = max_level;
133 boost::optional<std::string> tag) {
134 billing_tag_ = std::move(tag);
149 billing_tag_ = std::move(tag);
167 bool data_aggregation_enabled) {
168 data_aggregation_enabled_ = data_aggregation_enabled;
180 return data_aggregation_enabled_;
200 priority_ = priority;
211 inline std::string
CreateKey(
const std::string& layer_id)
const {
212 std::stringstream out;
213 out << layer_id <<
"[" << GetMinLevel() <<
"/" << GetMaxLevel() <<
"]"
214 <<
"(" << GetTileKeys().size() <<
")";
215 if (GetBillingTag()) {
216 out <<
"$" << GetBillingTag().get();
222 std::string layer_id_;
223 std::vector<geo::TileKey> tile_keys_;
224 unsigned int min_level_{geo::TileKey::LevelCount};
225 unsigned int max_level_{geo::TileKey::LevelCount};
226 boost::optional<std::string> billing_tag_;
227 bool data_aggregation_enabled_{
false};
228 uint32_t priority_{thread::LOW};
Encapsulates the fields required to prefetch the specified layers, tiles, and levels.
Definition: PrefetchTilesRequest.h:47
bool GetDataAggregationEnabled() const
Gets the data aggregation flag.
Definition: PrefetchTilesRequest.h:179
PrefetchTilesRequest & WithBillingTag(std::string &&tag)
Sets the billing tag for the request.
Definition: PrefetchTilesRequest.h:148
PrefetchTilesRequest & WithDataAggregationEnabled(bool data_aggregation_enabled)
Changes the prefetch behavior when prefetching a list of tiles.
Definition: PrefetchTilesRequest.h:166
PrefetchTilesRequest & WithPriority(uint32_t priority)
Sets the priority of the prefetch request.
Definition: PrefetchTilesRequest.h:199
unsigned int GetMinLevel() const
Gets the minimum tiles level to prefetch.
Definition: PrefetchTilesRequest.h:76
uint32_t GetPriority() const
Gets the request priority.
Definition: PrefetchTilesRequest.h:190
PrefetchTilesRequest & WithBillingTag(boost::optional< std::string > tag)
Sets the billing tag for the request.
Definition: PrefetchTilesRequest.h:132
unsigned int GetMaxLevel() const
Gets the maximum tiles level to prefetch.
Definition: PrefetchTilesRequest.h:95
PrefetchTilesRequest & WithMaxLevel(unsigned int max_level)
Sets the maximum tile level for the request.
Definition: PrefetchTilesRequest.h:104
PrefetchTilesRequest & WithMinLevel(unsigned int min_level)
Sets the minimum tiles level for the request.
Definition: PrefetchTilesRequest.h:85
std::string CreateKey(const std::string &layer_id) const
Creates a readable format for the request.
Definition: PrefetchTilesRequest.h:211
const boost::optional< std::string > & GetBillingTag() const
Gets the billing tag to group billing records together.
Definition: PrefetchTilesRequest.h:119
const std::vector< geo::TileKey > & GetTileKeys() const
Get the vector of the root tile keys.
Definition: PrefetchTilesRequest.h:54
PrefetchTilesRequest & WithTileKeys(std::vector< geo::TileKey > tile_keys)
Sets the vector of the root tile keys for the request.
Definition: PrefetchTilesRequest.h:65
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24