olp-cpp-sdk  1.22.0
Public Member Functions | List of all members
olp::dataservice::read::VersionsRequest Class Referencefinal

Encapsulates the fields required to request a list of versions for the given catalog. More...

#include <VersionsRequest.h>

Public Member Functions

VersionsRequestWithStartVersion (std::int64_t version)
 Sets the catalog metadata start version. More...
 
std::int64_t GetStartVersion () const
 Gets the catalog metadata start version of the requested versions list. More...
 
VersionsRequestWithEndVersion (std::int64_t version)
 Sets the catalog metadata end version. More...
 
std::int64_t GetEndVersion () const
 Gets the catalog metadata end version of the requested versions list. More...
 
const boost::optional< std::string > & GetBillingTag () const
 Gets the billing tag to group billing records together. More...
 
VersionsRequestWithBillingTag (boost::optional< std::string > tag)
 Sets the billing tag for the request. More...
 
VersionsRequestWithBillingTag (std::string tag)
 Sets the billing tag for the request. More...
 
std::string CreateKey () const
 Creates a readable format for the request. More...
 

Detailed Description

Encapsulates the fields required to request a list of versions for the given catalog.

Member Function Documentation

◆ CreateKey()

std::string olp::dataservice::read::VersionsRequest::CreateKey ( ) const
inline

Creates a readable format for the request.

Returns
A string representation of the request.

◆ GetBillingTag()

const boost::optional<std::string>& olp::dataservice::read::VersionsRequest::GetBillingTag ( ) const
inline

Gets the billing tag to group billing records together.

The billing tag is an optional free-form tag that is used for grouping billing records together. If supplied, it must be 4–16 characters long and contain only alphanumeric ASCII characters [A-Za-z0-9].

Returns
The BillingTag string or boost::none if the billing tag is not set.

◆ GetEndVersion()

std::int64_t olp::dataservice::read::VersionsRequest::GetEndVersion ( ) const
inline

Gets the catalog metadata end version of the requested versions list.

Returns
The catalog metadata end version.

◆ GetStartVersion()

std::int64_t olp::dataservice::read::VersionsRequest::GetStartVersion ( ) const
inline

Gets the catalog metadata start version of the requested versions list.

Returns
The catalog metadata start version.

◆ WithBillingTag() [1/2]

VersionsRequest& olp::dataservice::read::VersionsRequest::WithBillingTag ( boost::optional< std::string >  tag)
inline

Sets the billing tag for the request.

See also
GetBillingTag() for information on usage and format.
Parameters
tagThe BillingTag string or boost::none.
Returns
A reference to the updated VersionsRequest instance.

◆ WithBillingTag() [2/2]

VersionsRequest& olp::dataservice::read::VersionsRequest::WithBillingTag ( std::string  tag)
inline

Sets the billing tag for the request.

See also
GetBillingTag() for information on usage and format.
Parameters
tagThe rvalue reference to the BillingTag string or boost::none.
Returns
A reference to the updated VersionsRequest instance.

◆ WithEndVersion()

VersionsRequest& olp::dataservice::read::VersionsRequest::WithEndVersion ( std::int64_t  version)
inline

Sets the catalog metadata end version.

Note
The end of the range of versions that you want to get (inclusive). It must be a valid catalog version greater than the startVersion. The maximum value for this parameter is returned from the /versions/latest endpoint. If this version does not exist, 400 Bad Request is returned.
Parameters
versionThe catalog metadata end version of the requested versions list.
Returns
A reference to the updated VersionsRequest instance.

◆ WithStartVersion()

VersionsRequest& olp::dataservice::read::VersionsRequest::WithStartVersion ( std::int64_t  version)
inline

Sets the catalog metadata start version.

Note
The beginning of the range of versions that you want to get (exclusive). By convention, -1 indicates the initial version before the first publication. After the first publication, the catalog version is 0.
Parameters
versionThe catalog metadata start version of the requested versions list.
Returns
A reference to the updated VersionsRequest instance.

The documentation for this class was generated from the following file: