10Duke Scale C++ Client
Loading...
Searching...
No Matches
DefaultDescribeLicenseKeyRequest.h
1#ifndef TENDUKE_SE_LICENSING_REST_DEFAULTDESCRIBELICENSEKEYREQUEST_H
2#define TENDUKE_SE_LICENSING_REST_DEFAULTDESCRIBELICENSEKEYREQUEST_H
3
4#include "./DescribeLicenseKeyRequest.h"
5#include "../../../config/BackendConfiguration.h"
6#include "../../../rest/AbstractPagingAPIRequest.h"
7#include "http/HTTPClient.h"
8#include "http/HTTPRequestAuthenticator.h"
9#include "http/HTTPResponseToException.h"
10#include "json/JSONParser.h"
11
12#include <memory>
13
14namespace tenduke { namespace se { namespace licensing { namespace rest {
15
19class DefaultDescribeLicenseKeyRequest : public ::tenduke::se::licensing::rest::AbstractPagingAPIRequest<::tenduke::se::licensing::LicenseKeyLicensesStatus>
21{
22public:
35 const ::tenduke::se::BackendConfiguration &backendConfiguration
36 , const std::shared_ptr<const ::tenduke::http::HTTPClient> &httpClient
37 , const std::shared_ptr<const ::tenduke::http::HTTPRequestAuthenticator> &httpRequestAuthenticator
38 , const std::shared_ptr<const ::tenduke::http::HTTPResponseToException> &throwException
39 , const std::shared_ptr<const ::tenduke::json::JSONParser> &jsonParser
40 , std::string licenseKey
41 , const ::tenduke::se::Paging &paging
42 , bool withMetadata
43 );
44
45public:
47
48protected:
50 void buildUrl(::tenduke::net::URLBuilder &) const override;
51
52private:
53 const std::string licenseKey;
54 const bool withMetadata;
55};
56
57}}}}
58
59#endif //TENDUKE_SE_LICENSING_REST_DEFAULTDESCRIBELICENSEKEYREQUEST_H
Very simple URL-builder.
Definition URLBuilder.h:19
Interface for 10Duke Scale API-requests.
Definition APIRequest.h:12
A tenduke::se::APIRequest, which uses tenduke::oidc::OIDCSession to maintain request authorization.
Definition StatefulAPIRequest.h:27
A REST-entity to describe licenses matching a license key.
Definition LicenseKeyLicensesStatus.h:14
const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > throwException
Service to throw exceptions based on HTTP status codes.
Definition AbstractAPIRequestMixin.h:117
const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > httpRequestAuthenticator
For authenticating the request.
Definition AbstractAPIRequestMixin.h:114
Abstract base class for API-requests, which support paging.
Definition AbstractPagingAPIRequest.h:17
Default implmentation of tenduke::se::licensing::rest::DescribeLicenseKeyRequest.
Definition DefaultDescribeLicenseKeyRequest.h:21
void buildUrl(::tenduke::net::URLBuilder &) const override
Builds the request URL.
Definition DefaultDescribeLicenseKeyRequest.cpp:28
::tenduke::se::licensing::LicenseKeyLicensesStatus fromJSON(const std::string &responseBody) const override
Converts the response body from JSON to the response type.
Definition DefaultDescribeLicenseKeyRequest.cpp:40
::tenduke::se::licensing::LicenseKeyLicensesStatus execute() override
Execute the request synchronously.
Definition DefaultDescribeLicenseKeyRequest.cpp:23
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7