1#ifndef TENDUKE_SE_LICENSING_REST_DEFAULTLICENSECHECKOUTREQUEST_H
2#define TENDUKE_SE_LICENSING_REST_DEFAULTLICENSECHECKOUTREQUEST_H
4#include "./AbstractLicenseRequest.h"
5#include "./LicenseCheckoutRequest.h"
6#include "../../api/licenses/JWTToLease.h"
7#include "../../api/licenses/checkout/LicenseCheckoutParameters.h"
8#include "../../api/licenses/checkout/LicenseCheckoutResponse.h"
9#include "../../../rest/RESTConfiguration.h"
10#include "../../../config/ClientProperties.h"
11#include "http/HTTPClient.h"
12#include "http/HTTPRequestAuthenticator.h"
13#include "http/HTTPResponseToException.h"
14#include "json/JSONParser.h"
15#include "jwt/JWTParser.h"
43 const std::shared_ptr<const ::tenduke::se::ClientProperties> &
clientProperties,
44 const std::shared_ptr<const ::tenduke::se::rest::RESTConfiguration> &
configuration,
45 const std::shared_ptr<const ::tenduke::http::HTTPClient> &httpClient,
47 const std::shared_ptr<const ::tenduke::http::HTTPResponseToException> &
throwException,
48 const std::shared_ptr<const ::tenduke::json::JSONParser> &jsonParser,
49 const std::shared_ptr<const ::tenduke::jwt::JWTParser> &jwtParser,
50 const std::shared_ptr<const ::tenduke::se::licensing::JWTToLease> &jwtToLease,
64 const ::tenduke::se::licensing::LicenseCheckoutParameters parameters;
66 const std::shared_ptr<const ::tenduke::se::licensing::JWTToLease> createLease;
67 const std::shared_ptr<const ::tenduke::jwt::JWTParser> parseJWT;
DefaultLicenseCheckoutRequest(::tenduke::se::licensing::LicenseCheckoutParameters parameters, 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, const std::shared_ptr< const ::tenduke::jwt::JWTParser > &jwtParser, const std::shared_ptr< const ::tenduke::se::licensing::JWTToLease > &jwtToLease, const std::string &licenseKey=::tenduke::se::licensing::rest::AbstractLicenseRequest::NO_LICENSE_KEY, bool metered=::tenduke::se::licensing::rest::AbstractLicenseRequest::NON_METERED)
Constructs new instance.
Definition DefaultLicenseCheckoutRequest.cpp:116
Parameters for license checkout request.
Definition LicenseCheckoutParameters.h:14
Response from license checkout call.
Definition LicenseCheckoutResponse.h:17
Abstract base class for license-related requests.
Definition AbstractLicenseRequest.h:20
static const bool NON_METERED
Magic value to indicate that this is normal (not metered) license request.
Definition AbstractLicenseRequest.h:28
static const std::string NO_LICENSE_KEY
Magic value to indicate that this is not a license key request.
Definition AbstractLicenseRequest.h:23
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
const std::shared_ptr< const ::tenduke::se::ClientProperties > clientProperties
Client properties.
Definition AbstractLicenseRequest.h:83
const std::shared_ptr< const ::tenduke::se::rest::RESTConfiguration > configuration
Config.
Definition AbstractLicenseRequest.h:85
::tenduke::se::licensing::LicenseCheckoutResponse fromJSON(const std::string &jsonDocument) const
Maps the request entity from JSON message payload.
Definition DefaultLicenseCheckoutRequest.cpp:43
DefaultLicenseCheckoutRequest(::tenduke::se::licensing::LicenseCheckoutParameters parameters, 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, const std::shared_ptr< const ::tenduke::jwt::JWTParser > &jwtParser, const std::shared_ptr< const ::tenduke::se::licensing::JWTToLease > &jwtToLease, const std::string &licenseKey=::tenduke::se::licensing::rest::AbstractLicenseRequest::NO_LICENSE_KEY, bool metered=::tenduke::se::licensing::rest::AbstractLicenseRequest::NON_METERED)
Constructs new instance.
Definition DefaultLicenseCheckoutRequest.cpp:116
::tenduke::se::licensing::LicenseCheckoutResponse execute() override
Execute the request synchronously.
Definition DefaultLicenseCheckoutRequest.cpp:78
Low-level services for performing licensing REST-requests.
Definition DefaultDescribeLicenseConsumerClientBindingsRequest.h:9
::tenduke::se::APIRequest<::tenduke::se::licensing::LicenseCheckoutResponse > LicenseCheckoutRequest
License checkout request.
Definition LicenseCheckoutRequest.h:12
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