1#ifndef TENDUKE_EE_LICENSING_FLUENTLICENSERELEASEBEUILDER_H
2#define TENDUKE_EE_LICENSING_FLUENTLICENSERELEASEBEUILDER_H
5#include "../release/LicenseReleaseParameters.h"
6#include "../release/LicenseReleaseResponse.h"
13namespace tenduke {
namespace ee {
namespace licensing {
20template <
typename BUILDER>
32 return static_cast<BUILDER &
>(*this);
41 BUILDER &
leases(
const std::map<std::string, tenduke::ee::licensing::Lease>& items)
43 for (
const auto &item : items) {
44 leaseIds.push_back(item.second.leaseId);
46 return static_cast<BUILDER &
>(*this);
55 BUILDER &
leases(
const std::vector<tenduke::ee::licensing::Lease>& items)
57 for (
const auto &item : items) {
58 leaseIds.push_back(item.leaseId);
60 return static_cast<BUILDER &
>(*this);
86 std::vector<std::string> leaseIds;
Utility for building tenduke::ee::licensing::LicenseReleaseRequest.
Definition FluentLicenseReleaseBuilder.h:22
BUILDER & leaseId(const std::string &leaseId)
Adds a lease-id to release.
Definition FluentLicenseReleaseBuilder.h:29
BUILDER & leases(const std::vector< tenduke::ee::licensing::Lease > &items)
Adds multiple leases to release from a vector.
Definition FluentLicenseReleaseBuilder.h:55
BUILDER & lease(const tenduke::ee::licensing::Lease &license)
Adds single lease to release from tenduke::ee::licensing::LicenseCheckoutItem.
Definition FluentLicenseReleaseBuilder.h:69
tenduke::ee::licensing::LicenseReleaseParameters buildParameters()
Builds tenduke::ee::licensing::LicenseReleaseParameters.
Definition FluentLicenseReleaseBuilder.h:79
BUILDER & leases(const std::map< std::string, tenduke::ee::licensing::Lease > &items)
Adds multiple leases to release from a map.
Definition FluentLicenseReleaseBuilder.h:41
Describes checked out licensed item.
Definition Lease.h:21
const std::string leaseId
Id of the lease.
Definition Lease.h:109
Parameters for license-release request.
Definition LicenseReleaseParameters.h:13
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4