10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
LicenseCheckoutResponse.h
1#ifndef TENDUKE_EE_LICENSING_LICENSECHECKOUTRESPONSE_H
2#define TENDUKE_EE_LICENSING_LICENSECHECKOUTRESPONSE_H
3
4#include "../LicensingError.h"
5#include "../LicensingResponse.h"
6#include "../Lease.h"
7
8#include <map>
9#include <string>
10
11namespace tenduke { namespace ee { namespace licensing {
12
13
24{
25public:
32 const std::map<std::string, tenduke::ee::licensing::Lease> &leases,
33 const std::map<std::string, tenduke::ee::licensing::LicensingError> &errors
34 ): tenduke::ee::licensing::LicensingResponse(errors), leases(leases)
35 {}
36
41 bool failed() override
42 {
43 return (hasErrors() && leases.empty());
44 }
45
46public:
48 const std::map<std::string, tenduke::ee::licensing::Lease> leases;
49};
50
51
52}}}
53
54#endif // TENDUKE_EE_LICENSING_LICENSECHECKOUTRESPONSE_H
Response from license checkout request.
Definition LicenseCheckoutResponse.h:24
const std::map< std::string, tenduke::ee::licensing::Lease > leases
Leases, that is, successfully checked out licenses.
Definition LicenseCheckoutResponse.h:48
LicenseCheckoutResponse(const std::map< std::string, tenduke::ee::licensing::Lease > &leases, const std::map< std::string, tenduke::ee::licensing::LicensingError > &errors)
Constructs new instance.
Definition LicenseCheckoutResponse.h:31
bool failed() override
Checks it the entire request failed, i.e.
Definition LicenseCheckoutResponse.h:41
Response from tenduke::ee::licensing::LicensingRequest.
Definition LicensingResponse.h:17
const std::map< std::string, tenduke::ee::licensing::LicensingError > errors
Errors of this response.
Definition LicensingResponse.h:50
bool hasErrors() const
Checks if there are any errors.
Definition LicensingResponse.h:42
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4