agilicus 1.295.1__py3-none-any.whl → 1.295.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -396,6 +396,8 @@ agilicus_api/docs/HttpRequestExtractorSource.md
396
396
  agilicus_api/docs/HttpRule.md
397
397
  agilicus_api/docs/HttpRuleCondition.md
398
398
  agilicus_api/docs/HttpRuleConditionType.md
399
+ agilicus_api/docs/HypotheticalLicenseDetails.md
400
+ agilicus_api/docs/HypotheticalLicenseDetailsQuery.md
399
401
  agilicus_api/docs/Icon.md
400
402
  agilicus_api/docs/IconDimensions.md
401
403
  agilicus_api/docs/IconPurpose.md
@@ -1295,6 +1297,8 @@ agilicus_api/model/http_rule_condition.py
1295
1297
  agilicus_api/model/http_rule_condition_type.py
1296
1298
  agilicus_api/model/http_security_settings.py
1297
1299
  agilicus_api/model/http_summary_stats.py
1300
+ agilicus_api/model/hypothetical_license_details.py
1301
+ agilicus_api/model/hypothetical_license_details_query.py
1298
1302
  agilicus_api/model/icon.py
1299
1303
  agilicus_api/model/icon_dimensions.py
1300
1304
  agilicus_api/model/icon_purpose.py
@@ -2191,6 +2195,8 @@ agilicus_api/test/test_http_rule_condition.py
2191
2195
  agilicus_api/test/test_http_rule_condition_type.py
2192
2196
  agilicus_api/test/test_http_security_settings.py
2193
2197
  agilicus_api/test/test_http_summary_stats.py
2198
+ agilicus_api/test/test_hypothetical_license_details.py
2199
+ agilicus_api/test/test_hypothetical_license_details_query.py
2194
2200
  agilicus_api/test/test_icon.py
2195
2201
  agilicus_api/test/test_icon_dimensions.py
2196
2202
  agilicus_api/test/test_icon_purpose.py
@@ -374,6 +374,8 @@ from agilicus_api.model.http_request_extractor_source import HttpRequestExtracto
374
374
  from agilicus_api.model.http_rule import HttpRule
375
375
  from agilicus_api.model.http_rule_condition import HttpRuleCondition
376
376
  from agilicus_api.model.http_rule_condition_type import HttpRuleConditionType
377
+ from agilicus_api.model.hypothetical_license_details import HypotheticalLicenseDetails
378
+ from agilicus_api.model.hypothetical_license_details_query import HypotheticalLicenseDetailsQuery
377
379
  from agilicus_api.model.icon import Icon
378
380
  from agilicus_api.model.icon_dimensions import IconDimensions
379
381
  from agilicus_api.model.icon_purpose import IconPurpose
@@ -23,6 +23,8 @@ from agilicus_api.model_utils import ( # noqa: F401
23
23
  validate_and_convert_types
24
24
  )
25
25
  from agilicus_api.model.error_message import ErrorMessage
26
+ from agilicus_api.model.hypothetical_license_details import HypotheticalLicenseDetails
27
+ from agilicus_api.model.hypothetical_license_details_query import HypotheticalLicenseDetailsQuery
26
28
  from agilicus_api.model.license import License
27
29
  from agilicus_api.model.list_license_details_response import ListLicenseDetailsResponse
28
30
  from agilicus_api.model.list_licenses_response import ListLicensesResponse
@@ -42,6 +44,127 @@ class LicensingApi(object):
42
44
  api_client = ApiClient()
43
45
  self.api_client = api_client
44
46
 
47
+ def __create_hypothetical_license_details_query(
48
+ self,
49
+ hypothetical_license_details_query,
50
+ **kwargs
51
+ ):
52
+ """Query a hypothetical set of license details # noqa: E501
53
+
54
+ Get all per-org license details matching the query. This will return the actual constraints available to an organisation, taking into account their product, the hypothetical version of the product table, and any overrides applied to their organisation. Multiple organisations' constraints may be returned at a time. # noqa: E501
55
+ This method makes a synchronous HTTP request by default. To make an
56
+ asynchronous HTTP request, please pass async_req=True
57
+
58
+ >>> thread = api.create_hypothetical_license_details_query(hypothetical_license_details_query, async_req=True)
59
+ >>> result = thread.get()
60
+
61
+ Args:
62
+ hypothetical_license_details_query (HypotheticalLicenseDetailsQuery):
63
+
64
+ Keyword Args:
65
+ _return_http_data_only (bool): response data without head status
66
+ code and headers. Default is True.
67
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
68
+ will be returned without reading/decoding response data.
69
+ Default is True.
70
+ _request_timeout (float/tuple): timeout setting for this request. If one
71
+ number provided, it will be total request timeout. It can also
72
+ be a pair (tuple) of (connection, read) timeouts.
73
+ Default is None.
74
+ _check_input_type (bool): specifies if type checking
75
+ should be done one the data sent to the server.
76
+ Default is True.
77
+ _check_return_type (bool): specifies if type checking
78
+ should be done one the data received from the server.
79
+ Default is True.
80
+ _host_index (int/None): specifies the index of the server
81
+ that we want to use.
82
+ Default is read from the configuration.
83
+ async_req (bool): execute request asynchronously
84
+
85
+ Returns:
86
+ HypotheticalLicenseDetails
87
+ If the method is called asynchronously, returns the request
88
+ thread.
89
+ """
90
+ kwargs['async_req'] = kwargs.get(
91
+ 'async_req', False
92
+ )
93
+ kwargs['_return_http_data_only'] = kwargs.get(
94
+ '_return_http_data_only', True
95
+ )
96
+ kwargs['_preload_content'] = kwargs.get(
97
+ '_preload_content', True
98
+ )
99
+ kwargs['_request_timeout'] = kwargs.get(
100
+ '_request_timeout', None
101
+ )
102
+ kwargs['_check_input_type'] = kwargs.get(
103
+ '_check_input_type', True
104
+ )
105
+ kwargs['_check_return_type'] = kwargs.get(
106
+ '_check_return_type', True
107
+ )
108
+ kwargs['_host_index'] = kwargs.get('_host_index')
109
+ kwargs['hypothetical_license_details_query'] = \
110
+ hypothetical_license_details_query
111
+ return self.call_with_http_info(**kwargs)
112
+
113
+ if self.create_hypothetical_license_details_query is None:
114
+ self.create_hypothetical_license_details_query = _Endpoint(
115
+ settings={
116
+ 'response_type': (HypotheticalLicenseDetails,),
117
+ 'auth': [
118
+ 'token-valid'
119
+ ],
120
+ 'endpoint_path': '/v1/license_details/hypothetical',
121
+ 'operation_id': 'create_hypothetical_license_details_query',
122
+ 'http_method': 'POST',
123
+ 'servers': None,
124
+ },
125
+ params_map={
126
+ 'all': [
127
+ 'hypothetical_license_details_query',
128
+ ],
129
+ 'required': [
130
+ 'hypothetical_license_details_query',
131
+ ],
132
+ 'nullable': [
133
+ ],
134
+ 'enum': [
135
+ ],
136
+ 'validation': [
137
+ ]
138
+ },
139
+ root_map={
140
+ 'validations': {
141
+ },
142
+ 'allowed_values': {
143
+ },
144
+ 'openapi_types': {
145
+ 'hypothetical_license_details_query':
146
+ (HypotheticalLicenseDetailsQuery,),
147
+ },
148
+ 'attribute_map': {
149
+ },
150
+ 'location_map': {
151
+ 'hypothetical_license_details_query': 'body',
152
+ },
153
+ 'collection_format_map': {
154
+ }
155
+ },
156
+ headers_map={
157
+ 'accept': [
158
+ 'application/json'
159
+ ],
160
+ 'content_type': [
161
+ 'application/json'
162
+ ]
163
+ },
164
+ api_client=api_client,
165
+ callable=__create_hypothetical_license_details_query
166
+ )
167
+
45
168
  def __create_license(
46
169
  self,
47
170
  license,
@@ -1427,6 +1550,7 @@ class LicensingApi(object):
1427
1550
  callable=__replace_product_table_version
1428
1551
  )
1429
1552
 
1553
+ create_hypothetical_license_details_query = None
1430
1554
  create_license = None
1431
1555
  create_product_table_version = None
1432
1556
  delete_license = None
@@ -3,6 +3,7 @@ from unittest.mock import MagicMock
3
3
  class LicensingApiMock:
4
4
 
5
5
  def __init__(self):
6
+ self.mock_create_hypothetical_license_details_query = MagicMock()
6
7
  self.mock_create_license = MagicMock()
7
8
  self.mock_create_product_table_version = MagicMock()
8
9
  self.mock_delete_license = MagicMock()
@@ -15,6 +16,12 @@ class LicensingApiMock:
15
16
  self.mock_replace_license = MagicMock()
16
17
  self.mock_replace_product_table_version = MagicMock()
17
18
 
19
+ def create_hypothetical_license_details_query(self, *args, **kwargs):
20
+ """
21
+ This method mocks the original api LicensingApi.create_hypothetical_license_details_query with MagicMock.
22
+ """
23
+ return self.mock_create_hypothetical_license_details_query(self, *args, **kwargs)
24
+
18
25
  def create_license(self, *args, **kwargs):
19
26
  """
20
27
  This method mocks the original api LicensingApi.create_license with MagicMock.
@@ -77,7 +77,7 @@ class ApiClient(object):
77
77
  self.default_headers[header_name] = header_value
78
78
  self.cookie = cookie
79
79
  # Set default User-Agent.
80
- self.user_agent = 'OpenAPI-Generator/1.295.1/python'
80
+ self.user_agent = 'OpenAPI-Generator/1.295.2/python'
81
81
 
82
82
  def __enter__(self):
83
83
  return self
@@ -387,7 +387,7 @@ class Configuration(object):
387
387
  "OS: {env}\n"\
388
388
  "Python Version: {pyversion}\n"\
389
389
  "Version of the API: 2025.07.18\n"\
390
- "SDK Package Version: 1.295.1".\
390
+ "SDK Package Version: 1.295.2".\
391
391
  format(env=sys.platform, pyversion=sys.version)
392
392
 
393
393
  def get_host_settings(self):
@@ -0,0 +1,13 @@
1
+ # HypotheticalLicenseDetails
2
+
3
+ The license details matching the HypotheticalLicenseDetailsQuery
4
+
5
+ ## Properties
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **license_details** | [**[LicenseDetails]**](LicenseDetails.md) | List of per-org license details |
9
+ **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10
+
11
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12
+
13
+
@@ -0,0 +1,15 @@
1
+ # HypotheticalLicenseDetailsQuery
2
+
3
+ Defines a query which allows for returning the LicenseDetails under a hypothetical product table. The results can be controlled in a few ways: - constrain_to_version: can be used to test what would happen if all orgs using the provided version were swapped to the provided hypothetical version. This enables a few use-cases: 1. When modifying an existing table, only show the results for customers who would actually be affected by applying it. 2. See what would happen when migrating customers with other versions of the table to this version. 3. As a special case of number 2, see what would happen when making an entirely new version then migrating a set of customers to it.
4
+
5
+ ## Properties
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **product_table_version** | [**ProductTableVersion**](ProductTableVersion.md) | |
9
+ **license_ids** | **[str]** | List of licenses for which to get details |
10
+ **constrain_to_version** | [**ProductTableVersionString**](ProductTableVersionString.md) | | [optional]
11
+ **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
12
+
13
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14
+
15
+
@@ -4,6 +4,7 @@ All URIs are relative to *https://api.agilicus.com*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
+ [**create_hypothetical_license_details_query**](LicensingApi.md#create_hypothetical_license_details_query) | **POST** /v1/license_details/hypothetical | Query a hypothetical set of license details
7
8
  [**create_license**](LicensingApi.md#create_license) | **POST** /v1/licenses | Create a license
8
9
  [**create_product_table_version**](LicensingApi.md#create_product_table_version) | **POST** /v1/product_table_versions | Create a product table version
9
10
  [**delete_license**](LicensingApi.md#delete_license) | **DELETE** /v1/licenses/{license_id} | Delete a license
@@ -17,6 +18,136 @@ Method | HTTP request | Description
17
18
  [**replace_product_table_version**](LicensingApi.md#replace_product_table_version) | **PUT** /v1/product_table_versions/{product_table_version_id} | Create or update a product table version
18
19
 
19
20
 
21
+ # **create_hypothetical_license_details_query**
22
+ > HypotheticalLicenseDetails create_hypothetical_license_details_query(hypothetical_license_details_query)
23
+
24
+ Query a hypothetical set of license details
25
+
26
+ Get all per-org license details matching the query. This will return the actual constraints available to an organisation, taking into account their product, the hypothetical version of the product table, and any overrides applied to their organisation. Multiple organisations' constraints may be returned at a time.
27
+
28
+ ### Example
29
+
30
+ * Bearer (JWT) Authentication (token-valid):
31
+ ```python
32
+ import time
33
+ import agilicus_api
34
+ from agilicus_api.api import licensing_api
35
+ from agilicus_api.model.hypothetical_license_details import HypotheticalLicenseDetails
36
+ from agilicus_api.model.hypothetical_license_details_query import HypotheticalLicenseDetailsQuery
37
+ from pprint import pprint
38
+ # Defining the host is optional and defaults to https://api.agilicus.com
39
+ # See configuration.py for a list of all supported configuration parameters.
40
+ configuration = agilicus_api.Configuration(
41
+ host = "https://api.agilicus.com"
42
+ )
43
+
44
+ # The client must configure the authentication and authorization parameters
45
+ # in accordance with the API server security policy.
46
+ # Examples for each auth method are provided below, use the example that
47
+ # satisfies your auth use case.
48
+
49
+ # Configure Bearer authorization (JWT): token-valid
50
+ configuration = agilicus_api.Configuration(
51
+ access_token = 'YOUR_BEARER_TOKEN'
52
+ )
53
+
54
+ # Enter a context with an instance of the API client
55
+ with agilicus_api.ApiClient(configuration) as api_client:
56
+ # Create an instance of the API class
57
+ api_instance = licensing_api.LicensingApi(api_client)
58
+ hypothetical_license_details_query = HypotheticalLicenseDetailsQuery(
59
+ product_table_version=ProductTableVersion(
60
+ metadata=MetadataWithId(),
61
+ spec=ProductTableVersionSpec(
62
+ version=ProductTableVersionString("2025-06-13.0"),
63
+ product_table=ProductTable(
64
+ products=[
65
+ LicensedProduct(
66
+ name=LicensedProductName("Standard"),
67
+ included_features=[
68
+ LicensedFeatureName("Desktops"),
69
+ ],
70
+ license_constraints=[
71
+ LicenseConstraint(
72
+ name=LicenseConstraintName("desktops_below_max"),
73
+ expression=LicenseConstraintExpression("subscription.usage.num_desktops < 10"),
74
+ priority=0,
75
+ comment="Uses the max_desktops from the product to enforce a limit on desktops",
76
+ ),
77
+ ],
78
+ constraint_variables=LicenseConstraintVariables(),
79
+ ),
80
+ ],
81
+ features=[
82
+ LicensedFeature(
83
+ name=LicensedFeatureName("Desktops"),
84
+ license_constraints=[
85
+ LicenseConstraint(
86
+ name=LicenseConstraintName("desktops_below_max"),
87
+ expression=LicenseConstraintExpression("subscription.usage.num_desktops < 10"),
88
+ priority=0,
89
+ comment="Uses the max_desktops from the product to enforce a limit on desktops",
90
+ ),
91
+ ],
92
+ constraint_variables=LicenseConstraintVariables(),
93
+ ),
94
+ ],
95
+ constraint_variables=LicenseConstraintVariables(),
96
+ global_constraints=[
97
+ LicenseConstraint(
98
+ name=LicenseConstraintName("desktops_below_max"),
99
+ expression=LicenseConstraintExpression("subscription.usage.num_desktops < 10"),
100
+ priority=0,
101
+ comment="Uses the max_desktops from the product to enforce a limit on desktops",
102
+ ),
103
+ ],
104
+ ),
105
+ published=True,
106
+ ),
107
+ ),
108
+ license_ids=[
109
+ "123",
110
+ ],
111
+ constrain_to_version=ProductTableVersionString("2025-06-13.0"),
112
+ ) # HypotheticalLicenseDetailsQuery |
113
+
114
+ # example passing only required values which don't have defaults set
115
+ try:
116
+ # Query a hypothetical set of license details
117
+ api_response = api_instance.create_hypothetical_license_details_query(hypothetical_license_details_query)
118
+ pprint(api_response)
119
+ except agilicus_api.ApiException as e:
120
+ print("Exception when calling LicensingApi->create_hypothetical_license_details_query: %s\n" % e)
121
+ ```
122
+
123
+
124
+ ### Parameters
125
+
126
+ Name | Type | Description | Notes
127
+ ------------- | ------------- | ------------- | -------------
128
+ **hypothetical_license_details_query** | [**HypotheticalLicenseDetailsQuery**](HypotheticalLicenseDetailsQuery.md)| |
129
+
130
+ ### Return type
131
+
132
+ [**HypotheticalLicenseDetails**](HypotheticalLicenseDetails.md)
133
+
134
+ ### Authorization
135
+
136
+ [token-valid](../README.md#token-valid)
137
+
138
+ ### HTTP request headers
139
+
140
+ - **Content-Type**: application/json
141
+ - **Accept**: application/json
142
+
143
+
144
+ ### HTTP response details
145
+ | Status code | Description | Response headers |
146
+ |-------------|-------------|------------------|
147
+ **200** | Matching license details returned | - |
148
+
149
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
150
+
20
151
  # **create_license**
21
152
  > License create_license(license)
22
153