27 #include <olp/core/porting/deprecated.h>
28 #include <olp/dataservice/read/DataServiceReadApi.h>
29 #include <olp/dataservice/read/FetchOptions.h>
30 #include <boost/optional.hpp>
33 namespace dataservice {
46 static constexpr
const char* kDataSize =
"dataSize";
49 static constexpr
const char* kChecksum =
"checksum";
53 static constexpr
const char* kCompressedDataSize =
"compressedDataSize";
56 static constexpr
const char* kCrc =
"crc";
73 partition_ids_ = std::move(partition_ids);
100 additional_fields_ = std::move(additional_fields);
110 return additional_fields_;
137 boost::optional<std::string> billingTag) {
138 billing_tag_ = std::move(billingTag);
153 billing_tag_ = std::move(billingTag);
178 fetch_option_ = fetch_option;
191 boost::optional<int64_t> version = boost::none)
const {
192 std::stringstream out;
195 out <<
"@" << version.get();
197 if (GetBillingTag()) {
198 out <<
"$" << GetBillingTag().get();
200 out <<
"^" << GetFetchOption();
205 PartitionIds partition_ids_;
206 AdditionalFields additional_fields_;
207 boost::optional<std::string> billing_tag_;
208 FetchOptions fetch_option_{OnlineIfNotFound};
Encapsulates the fields required to request a list of partitions for the given catalog and layer.
Definition: PartitionsRequest.h:40
const boost::optional< std::string > & GetBillingTag() const
Gets the billing tag to group billing records together.
Definition: PartitionsRequest.h:123
PartitionsRequest & WithBillingTag(boost::optional< std::string > billingTag)
Sets the billing tag for the request.
Definition: PartitionsRequest.h:136
std::vector< std::string > AdditionalFields
An alias for the set of additional fields.
Definition: PartitionsRequest.h:59
const PartitionIds & GetPartitionIds() const
Gets the list of the partitions.
Definition: PartitionsRequest.h:82
PartitionsRequest & WithPartitionIds(PartitionIds partition_ids)
Sets the list of partitions.
Definition: PartitionsRequest.h:72
std::vector< std::string > PartitionIds
An alias for the vector of partitions IDs.
Definition: PartitionsRequest.h:43
std::string CreateKey(const std::string &layer_id, boost::optional< int64_t > version=boost::none) const
Creates a readable format for the request.
Definition: PartitionsRequest.h:190
const AdditionalFields & GetAdditionalFields() const
Gets the list of additional fields.
Definition: PartitionsRequest.h:109
PartitionsRequest & WithBillingTag(std::string &&billingTag)
Sets the billing tag for the request.
Definition: PartitionsRequest.h:152
PartitionsRequest & WithFetchOption(FetchOptions fetch_option)
Sets the fetch option that you can use to set the source from which data should be fetched.
Definition: PartitionsRequest.h:177
FetchOptions GetFetchOption() const
Gets the fetch option that controls how requests are handled.
Definition: PartitionsRequest.h:165
PartitionsRequest & WithAdditionalFields(AdditionalFields additional_fields)
Sets the list of additional fields.
Definition: PartitionsRequest.h:98
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24