1#ifndef TENDUKE_SE_LICENSING_REST_ABSTRACTLICENSEREQUEST_H
2#define TENDUKE_SE_LICENSING_REST_ABSTRACTLICENSEREQUEST_H
4#include "../../../rest/RESTConfiguration.h"
5#include "../../../config/ClientProperties.h"
6#include "http/HTTPClient.h"
7#include "http/HTTPRequestAuthenticator.h"
8#include "http/HTTPResponseToException.h"
9#include "json/JSONParser.h"
43 std::string licenseKey,
45 const std::shared_ptr<const ::tenduke::se::ClientProperties> &
clientProperties,
46 const std::shared_ptr<const ::tenduke::se::rest::RESTConfiguration> &
configuration,
47 const std::shared_ptr<const ::tenduke::http::HTTPClient> &httpClient,
49 const std::shared_ptr<const ::tenduke::http::HTTPResponseToException> &
throwException,
50 const std::shared_ptr<const ::tenduke::json::JSONParser> &jsonParser
77 const std::string licenseKey;
85 const std::shared_ptr<const ::tenduke::se::rest::RESTConfiguration>
configuration;
89 const std::shared_ptr<const ::tenduke::http::HTTPClient>
http;
93 const std::shared_ptr<const ::tenduke::http::HTTPResponseToException>
throwException;
95 const std::shared_ptr<const ::tenduke::json::JSONParser>
parseJSON;
AbstractLicenseRequest(std::string licenseKey, bool metered, const std::shared_ptr< const ::tenduke::se::ClientProperties > &clientProperties, const std::shared_ptr< const ::tenduke::se::rest::RESTConfiguration > &configuration, const std::shared_ptr< const ::tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &httpRequestAuthenticator, const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const ::tenduke::json::JSONParser > &jsonParser)
Constructs new instance.
Definition AbstractLicenseRequest.cpp:52
Builds HTTPRequest.
Definition HTTPRequestBuilder.h:23
static const bool NON_METERED
Magic value to indicate that this is normal (not metered) license request.
Definition AbstractLicenseRequest.h:28
void setClientClaims(::tenduke::http::HTTPRequestBuilder &request) const
Sets client claims to the request.
Definition AbstractLicenseRequest.cpp:34
static const std::string NO_LICENSE_KEY
Magic value to indicate that this is not a license key request.
Definition AbstractLicenseRequest.h:23
static const bool METERED
Magic value to indicate that this is metered license request.
Definition AbstractLicenseRequest.h:26
const std::shared_ptr< const ::tenduke::http::HTTPClient > http
HTTP-client.
Definition AbstractLicenseRequest.h:89
const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > httpRequestAuthenticator
HTTP-request authenticator.
Definition AbstractLicenseRequest.h:91
const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > throwException
Throw-exception.
Definition AbstractLicenseRequest.h:93
bool isMetered() const
Checks if this metered-request.
std::string getLicenseKey() const
Returns license key.
Definition AbstractLicenseRequest.cpp:16
bool hasLicenseKey() const
Checks if this is license-key request.
Definition AbstractLicenseRequest.cpp:22
const std::shared_ptr< const ::tenduke::se::ClientProperties > clientProperties
Client properties.
Definition AbstractLicenseRequest.h:83
AbstractLicenseRequest(std::string licenseKey, bool metered, const std::shared_ptr< const ::tenduke::se::ClientProperties > &clientProperties, const std::shared_ptr< const ::tenduke::se::rest::RESTConfiguration > &configuration, const std::shared_ptr< const ::tenduke::http::HTTPClient > &httpClient, const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > &httpRequestAuthenticator, const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > &throwException, const std::shared_ptr< const ::tenduke::json::JSONParser > &jsonParser)
Constructs new instance.
Definition AbstractLicenseRequest.cpp:52
const std::shared_ptr< const ::tenduke::json::JSONParser > parseJSON
Parses JSON.
Definition AbstractLicenseRequest.h:95
const std::shared_ptr< const ::tenduke::se::rest::RESTConfiguration > configuration
Config.
Definition AbstractLicenseRequest.h:85
Low-level services for performing licensing REST-requests.
Definition DefaultDescribeLicenseConsumerClientBindingsRequest.h:9
Licensing operations for 10Duke Scale.
Definition LicenseConsumerClientBindingStatus.h:8
Classes, functions and globals of 10Duke Scale C++ Client.
Definition AbstractClientFactory.h:16
Root for classes, functions and globals of 10Duke C++ Client.
Definition AbstractClientFactory.h:16