Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ class DATASERVICE_WRITE_API StreamLayerClient {
*
* @param request The `PublishDataRequest` object.
*
* @return An optional boost that is `boost::none` if the queue call is
* @return An optional boost that is `olp::porting::none` if the queue call is
* successful. Otherwise, it contains a string with error details.
*/
boost::optional<std::string> Queue(model::PublishDataRequest request);
porting::optional<std::string> Queue(model::PublishDataRequest request);

/**
* @brief Flushes `PublishDataRequests` that are queued via the Queue API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <string>
#include <utility>

#include <boost/optional.hpp>
#include <olp/core/porting/optional.hpp>

#include <olp/dataservice/write/DataServiceWriteApi.h>

Expand Down Expand Up @@ -324,9 +324,9 @@ class DATASERVICE_WRITE_API Index final {
: id_(std::move(uuid)), indexFields_(std::move(indexFields)) {}

private:
boost::optional<std::string> checksum_;
boost::optional<std::map<std::string, std::string>> metadata_;
boost::optional<int64_t> size_;
porting::optional<std::string> checksum_;
porting::optional<std::map<std::string, std::string>> metadata_;
porting::optional<int64_t> size_;
std::string id_;
std::map<IndexName, std::shared_ptr<IndexValue>> indexFields_;

Expand All @@ -336,14 +336,16 @@ class DATASERVICE_WRITE_API Index final {
*
* @return The checksum.
*/
const boost::optional<std::string>& GetCheckSum() const { return checksum_; }
const porting::optional<std::string>& GetCheckSum() const {
return checksum_;
}

/**
* @brief Gets a mutable reference to the checksum of the index layer.
*
* @return The mutable reference to the checksum.
*/
boost::optional<std::string>& GetMutableCheckSum() { return checksum_; }
porting::optional<std::string>& GetMutableCheckSum() { return checksum_; }

/**
* @brief Sets the checksum.
Expand All @@ -357,7 +359,7 @@ class DATASERVICE_WRITE_API Index final {
*
* @return The metadata of the index layer.
*/
const boost::optional<std::map<std::string, std::string>>& GetMetadata()
const porting::optional<std::map<std::string, std::string>>& GetMetadata()
const {
return metadata_;
}
Expand All @@ -367,7 +369,7 @@ class DATASERVICE_WRITE_API Index final {
*
* @return The mutable reference to the metadata.
*/
boost::optional<std::map<std::string, std::string>>& GetMutableMetadata() {
porting::optional<std::map<std::string, std::string>>& GetMutableMetadata() {
return metadata_;
}

Expand Down Expand Up @@ -435,14 +437,14 @@ class DATASERVICE_WRITE_API Index final {
*
* @return The size of the index layer.
*/
const boost::optional<int64_t>& GetSize() const { return size_; }
const porting::optional<int64_t>& GetSize() const { return size_; }

/**
* @brief Gets a mutable reference to the size of the index layer.
*
* @return The mutable reference to the size of the index layer.
*/
boost::optional<int64_t>& GetMutableSize() { return size_; }
porting::optional<int64_t>& GetMutableSize() { return size_; }

/**
* @brief Sets the size of the index layer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <string>
#include <vector>

#include <boost/optional.hpp>
#include <olp/core/porting/optional.hpp>

#include <olp/dataservice/write/DataServiceWriteApi.h>
#include <olp/dataservice/write/generated/model/Details.h>
Expand All @@ -44,26 +44,26 @@ class DATASERVICE_WRITE_API Publication {
virtual ~Publication() = default;

private:
boost::optional<std::string> id_;
boost::optional<Details> details_;
boost::optional<std::vector<std::string>> layer_ids_;
boost::optional<int64_t> catalog_version_;
boost::optional<std::vector<VersionDependency>> version_dependencies_;
porting::optional<std::string> id_;
porting::optional<Details> details_;
porting::optional<std::vector<std::string>> layer_ids_;
porting::optional<int64_t> catalog_version_;
porting::optional<std::vector<VersionDependency>> version_dependencies_;

public:
/**
* @brief Gets the publication ID.
*
* @return The publication ID.
*/
const boost::optional<std::string>& GetId() const { return id_; }
const porting::optional<std::string>& GetId() const { return id_; }

/**
* @brief Gets a mutable reference to the publication ID.
*
* @return The mutable reference to the publication ID.
*/
boost::optional<std::string>& GetMutableId() { return id_; }
porting::optional<std::string>& GetMutableId() { return id_; }

/**
* @brief Sets the publication ID.
Expand All @@ -77,14 +77,14 @@ class DATASERVICE_WRITE_API Publication {
*
* @return The details of the publication.
*/
const boost::optional<Details>& GetDetails() const { return details_; }
const porting::optional<Details>& GetDetails() const { return details_; }

/**
* @brief Gets a mutable reference to the details of the publication.
*
* @return The mutable reference to the details of the publication.
*/
boost::optional<Details>& GetMutableDetails() { return details_; }
porting::optional<Details>& GetMutableDetails() { return details_; }

/**
* @brief Sets the details of the publication.
Expand All @@ -98,7 +98,7 @@ class DATASERVICE_WRITE_API Publication {
*
* @return The layer ID.
*/
const boost::optional<std::vector<std::string>>& GetLayerIds() const {
const porting::optional<std::vector<std::string>>& GetLayerIds() const {
return layer_ids_;
}

Expand All @@ -108,7 +108,7 @@ class DATASERVICE_WRITE_API Publication {
*
* @return The mutable reference to the layer ID.
*/
boost::optional<std::vector<std::string>>& GetMutableLayerIds() {
porting::optional<std::vector<std::string>>& GetMutableLayerIds() {
return layer_ids_;
}

Expand All @@ -126,7 +126,7 @@ class DATASERVICE_WRITE_API Publication {
*
* @return The catalog version.
*/
const boost::optional<int64_t>& GetCatalogVersion() const {
const porting::optional<int64_t>& GetCatalogVersion() const {
return catalog_version_;
}

Expand All @@ -137,7 +137,7 @@ class DATASERVICE_WRITE_API Publication {
* @return The mutable reference to the version of the catalog to be
* published.
*/
boost::optional<int64_t>& GetMutableCatalogVersion() {
porting::optional<int64_t>& GetMutableCatalogVersion() {
return catalog_version_;
}

Expand All @@ -155,7 +155,7 @@ class DATASERVICE_WRITE_API Publication {
*
* @return The version dependencies.
*/
const boost::optional<std::vector<VersionDependency>>&
const porting::optional<std::vector<VersionDependency>>&
GetVersionDependencies() const {
return version_dependencies_;
}
Expand All @@ -165,7 +165,7 @@ class DATASERVICE_WRITE_API Publication {
*
* @return The mutable reference to the version dependencies.
*/
boost::optional<std::vector<VersionDependency>>&
porting::optional<std::vector<VersionDependency>>&
GetMutableVersionDependencies() {
return version_dependencies_;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <utility>
#include <vector>

#include <boost/optional.hpp>
#include <olp/core/porting/optional.hpp>

#include <olp/dataservice/write/DataServiceWriteApi.h>

Expand Down Expand Up @@ -113,7 +113,7 @@ class DATASERVICE_WRITE_API PublishDataRequest {
*
* @return The trace ID of the request.
*/
inline const boost::optional<std::string>& GetTraceId() const {
inline const porting::optional<std::string>& GetTraceId() const {
return trace_id_;
}

Expand Down Expand Up @@ -152,10 +152,10 @@ class DATASERVICE_WRITE_API PublishDataRequest {
* billing records together. If supplied, it must be 4–16 characters
* long and contain only alphanumeric ASCII characters [A-Za-z0-9].
*
* @return The `BillingTag` string or `boost::none` if the billing tag is not
* set.
* @return The `BillingTag` string or `olp::porting::none` if the billing tag
* is not set.
*/
inline const boost::optional<std::string>& GetBillingTag() const {
inline const porting::optional<std::string>& GetBillingTag() const {
return billing_tag_;
}

Expand All @@ -164,7 +164,7 @@ class DATASERVICE_WRITE_API PublishDataRequest {
*
* @see `GetBillingTag()` for information on usage and format.
*
* @param billing_tag The `BillingTag` string or `boost::none`.
* @param billing_tag The `BillingTag` string or `olp::porting::none`.
*/
inline PublishDataRequest& WithBillingTag(const std::string& billing_tag) {
billing_tag_ = billing_tag;
Expand All @@ -177,7 +177,7 @@ class DATASERVICE_WRITE_API PublishDataRequest {
* @see `GetBillingTag()` for information on usage and format.
*
* @param billing_tag The rvalue reference to the `BillingTag` string or
* `boost::none`.
* `olp::porting::none`.
*/
inline PublishDataRequest& WithBillingTag(std::string&& billing_tag) {
billing_tag_ = std::move(billing_tag);
Expand All @@ -195,7 +195,7 @@ class DATASERVICE_WRITE_API PublishDataRequest {
*
* @return The request checksum.
*/
inline const boost::optional<std::string>& GetChecksum() const {
inline const porting::optional<std::string>& GetChecksum() const {
return checksum_;
}

Expand Down Expand Up @@ -228,11 +228,11 @@ class DATASERVICE_WRITE_API PublishDataRequest {

std::string layer_id_;

boost::optional<std::string> trace_id_;
porting::optional<std::string> trace_id_;

boost::optional<std::string> billing_tag_;
porting::optional<std::string> billing_tag_;

boost::optional<std::string> checksum_;
porting::optional<std::string> checksum_;
};

} // namespace model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <utility>
#include <vector>

#include <boost/optional.hpp>
#include <olp/core/porting/optional.hpp>

#include <olp/dataservice/write/DataServiceWriteApi.h>
#include <olp/dataservice/write/generated/model/Index.h>
Expand Down Expand Up @@ -112,10 +112,10 @@ class DATASERVICE_WRITE_API PublishIndexRequest {
* billing records together. If supplied, it must be 4–16 characters
* long and contain only alphanumeric ASCII characters [A-Za-z0-9].
*
* @return The `BillingTag` string or `boost::none` if the billing tag is not
* set.
* @return The `BillingTag` string or `olp::porting::none` if the billing tag
* is not set.
*/
inline const boost::optional<std::string>& GetBillingTag() const {
inline const porting::optional<std::string>& GetBillingTag() const {
return billing_tag_;
}

Expand All @@ -125,7 +125,7 @@ class DATASERVICE_WRITE_API PublishIndexRequest {
* @see `GetBillingTag()` for information on usage and format.
*
* @param billing_tag The rvalue reference to the `BillingTag` string or
* `boost::none`.
* `olp::porting::none`.
*/
inline PublishIndexRequest& WithBillingTag(const std::string& billing_tag) {
billing_tag_ = billing_tag;
Expand All @@ -138,7 +138,7 @@ class DATASERVICE_WRITE_API PublishIndexRequest {
* @see `GetBillingTag()` for information on usage and format.
*
* @param billing_tag The rvalue reference to the `BillingTag` string or
* `boost::none`.
* `olp::porting::none`.
*/
inline PublishIndexRequest& WithBillingTag(std::string&& billing_tag) {
billing_tag_ = std::move(billing_tag);
Expand All @@ -156,7 +156,7 @@ class DATASERVICE_WRITE_API PublishIndexRequest {
*
* @return The request checksum.
*/
inline const boost::optional<std::string>& GetChecksum() const {
inline const porting::optional<std::string>& GetChecksum() const {
return checksum_;
}

Expand Down Expand Up @@ -226,9 +226,9 @@ class DATASERVICE_WRITE_API PublishIndexRequest {

std::string layer_id_;

boost::optional<std::string> billing_tag_;
porting::optional<std::string> billing_tag_;

boost::optional<std::string> checksum_;
porting::optional<std::string> checksum_;

Index index_;
};
Expand Down
Loading
Loading