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

Encapsulates the fields required to request catalog configuration. More...

#include <CatalogRequest.h>

Public Member Functions

const boost::optional< std::string > & GetBillingTag () const
 Gets the billing tag to group billing records together. More...
 
CatalogRequestWithBillingTag (boost::optional< std::string > tag)
 Sets the billing tag for the request. More...
 
CatalogRequestWithBillingTag (std::string &&tag)
 Sets the billing tag for the request. More...
 
FetchOptions GetFetchOption () const
 Gets the fetch option that controls how requests are handled. More...
 
CatalogRequestWithFetchOption (FetchOptions fetch_option)
 Sets the fetch option that you can use to set the source from which data should be fetched. More...
 
std::string CreateKey () const
 Creates a readable format of the request. More...
 

Detailed Description

Encapsulates the fields required to request catalog configuration.

Member Function Documentation

◆ CreateKey()

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

Creates a readable format of the request.

Returns
A string representation of the request.

◆ GetBillingTag()

const boost::optional<std::string>& olp::dataservice::read::CatalogRequest::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.

◆ GetFetchOption()

FetchOptions olp::dataservice::read::CatalogRequest::GetFetchOption ( ) const
inline

Gets the fetch option that controls how requests are handled.

The default option is OnlineIfNotFound that queries the network if the requested resource is not in the cache.

Returns
The fetch option.

◆ WithBillingTag() [1/2]

CatalogRequest& olp::dataservice::read::CatalogRequest::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 CatalogRequest instance.

◆ WithBillingTag() [2/2]

CatalogRequest& olp::dataservice::read::CatalogRequest::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 CatalogRequest instance.

◆ WithFetchOption()

CatalogRequest& olp::dataservice::read::CatalogRequest::WithFetchOption ( FetchOptions  fetch_option)
inline

Sets the fetch option that you can use to set the source from which data should be fetched.

See also
GetFetchOption() for information on usage and format.
Parameters
fetch_optionThe FetchOption enum.
Returns
A reference to the updated CatalogVersionRequest instance.

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