1#ifndef TENDUKE_EE_LICENSING_FLUENTLICENSERENEWBUILDER_H
2#define TENDUKE_EE_LICENSING_FLUENTLICENSERENEWBUILDER_H
4#include "./LicenseRenewItem.h"
5#include "./LicenseRenewParameters.h"
13namespace tenduke {
namespace ee {
namespace licensing {
19template<
typename BUILDER>
28 BUILDER &
lease(const ::tenduke::ee::licensing::Lease &
lease)
34 return static_cast<BUILDER&
>(*this);
42 BUILDER &
leases(
const std::vector<::tenduke::ee::licensing::Lease> &pLeases)
44 for (
auto const &leaseToRenew : pLeases) {
47 return static_cast<BUILDER&
>(*this);
57 BUILDER &
leases(
const std::map<std::string, ::tenduke::ee::licensing::Lease> &pLeases)
59 for (
auto const &leaseToRenew : pLeases) {
60 lease(leaseToRenew.second);
62 return static_cast<BUILDER&
>(*this);
71 BUILDER &
duration(std::uint64_t pConsumeDuration)
73 this->consumeDuration = pConsumeDuration;
74 return static_cast<BUILDER&
>(*this);
85 return ::tenduke::ee::licensing::LicenseRenewParameters(
92 std::uint64_t consumeDuration;
93 std::vector<::tenduke::ee::licensing::LicenseRenewItem> leasesToRenew;
Inheritable base class building renew request parameters fluently.
Definition FluentLicenseRenewBuilder.h:21
BUILDER & leases(const std::map< std::string, ::tenduke::ee::licensing::Lease > &pLeases)
Adds leases to renew to the request.
Definition FluentLicenseRenewBuilder.h:57
BUILDER & lease(const ::tenduke::ee::licensing::Lease &lease)
Adds lease to renew to the request.
Definition FluentLicenseRenewBuilder.h:28
BUILDER & duration(std::uint64_t pConsumeDuration)
Sets "The requested duration of the license token (and the lease) in milliseconds....
Definition FluentLicenseRenewBuilder.h:71
virtual ::tenduke::ee::licensing::LicenseRenewParameters buildParameters()
Builds the parameters.
Definition FluentLicenseRenewBuilder.h:83
BUILDER & leases(const std::vector<::tenduke::ee::licensing::Lease > &pLeases)
Adds leases to renew to the request.
Definition FluentLicenseRenewBuilder.h:42
A license lease to renew.
Definition LicenseRenewItem.h:12
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4