gamsapi 52.2.0__cp313-cp313-win_amd64.whl → 52.4.0__cp313-cp313-win_amd64.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.
Files changed (294) hide show
  1. gams/__init__.py +2 -2
  2. gams/_version.py +1 -1
  3. gams/connect/__init__.py +2 -2
  4. gams/connect/agents/__init__.py +2 -2
  5. gams/connect/agents/_excel/__init__.py +2 -2
  6. gams/connect/agents/_excel/excelagent.py +2 -2
  7. gams/connect/agents/_excel/workbook.py +2 -2
  8. gams/connect/agents/_sqlconnectors/__init__.py +2 -2
  9. gams/connect/agents/_sqlconnectors/_accesshandler.py +2 -2
  10. gams/connect/agents/_sqlconnectors/_databasehandler.py +2 -2
  11. gams/connect/agents/_sqlconnectors/_mysqlhandler.py +2 -2
  12. gams/connect/agents/_sqlconnectors/_postgreshandler.py +2 -2
  13. gams/connect/agents/_sqlconnectors/_pyodbchandler.py +2 -2
  14. gams/connect/agents/_sqlconnectors/_sqlalchemyhandler.py +2 -2
  15. gams/connect/agents/_sqlconnectors/_sqlitehandler.py +2 -2
  16. gams/connect/agents/_sqlconnectors/_sqlserverhandler.py +2 -2
  17. gams/connect/agents/concatenate.py +2 -2
  18. gams/connect/agents/connectagent.py +2 -2
  19. gams/connect/agents/csvreader.py +2 -2
  20. gams/connect/agents/csvwriter.py +2 -2
  21. gams/connect/agents/domainwriter.py +2 -2
  22. gams/connect/agents/excelreader.py +2 -2
  23. gams/connect/agents/excelwriter.py +2 -2
  24. gams/connect/agents/filter.py +2 -2
  25. gams/connect/agents/gamsreader.py +2 -2
  26. gams/connect/agents/gamswriter.py +2 -2
  27. gams/connect/agents/gdxreader.py +2 -2
  28. gams/connect/agents/gdxwriter.py +2 -2
  29. gams/connect/agents/labelmanipulator.py +2 -2
  30. gams/connect/agents/projection.py +2 -2
  31. gams/connect/agents/pythoncode.py +2 -2
  32. gams/connect/agents/rawcsvreader.py +2 -2
  33. gams/connect/agents/rawexcelreader.py +2 -2
  34. gams/connect/agents/sqlreader.py +2 -2
  35. gams/connect/agents/sqlwriter.py +2 -2
  36. gams/connect/connectdatabase.py +2 -2
  37. gams/connect/connectvalidator.py +2 -2
  38. gams/connect/errors.py +2 -2
  39. gams/control/__init__.py +2 -2
  40. gams/control/database.py +2 -2
  41. gams/control/execution.py +2 -2
  42. gams/control/options.py +2 -2
  43. gams/control/workspace.py +2 -2
  44. gams/core/__init__.py +2 -2
  45. gams/core/cfg/__init__.py +2 -2
  46. gams/core/cfg/_cfgmcc.cp313-win_amd64.pyd +0 -0
  47. gams/core/dct/__init__.py +2 -2
  48. gams/core/dct/_dctmcc.cp313-win_amd64.pyd +0 -0
  49. gams/core/embedded/__init__.py +2 -2
  50. gams/core/embedded/gamsemb.py +2 -2
  51. gams/core/emp/__init__.py +2 -2
  52. gams/core/emp/emplexer.py +2 -2
  53. gams/core/emp/empyacc.py +2 -2
  54. gams/core/gdx/__init__.py +2 -2
  55. gams/core/gdx/_gdxcc.cp313-win_amd64.pyd +0 -0
  56. gams/core/gev/__init__.py +2 -2
  57. gams/core/gev/_gevmcc.cp313-win_amd64.pyd +0 -0
  58. gams/core/gmd/__init__.py +2 -2
  59. gams/core/gmd/_gmdcc.cp313-win_amd64.pyd +0 -0
  60. gams/core/gmo/__init__.py +2 -2
  61. gams/core/gmo/_gmomcc.cp313-win_amd64.pyd +0 -0
  62. gams/core/idx/__init__.py +2 -2
  63. gams/core/idx/_idxcc.cp313-win_amd64.pyd +0 -0
  64. gams/core/numpy/__init__.py +2 -2
  65. gams/core/numpy/_gams2numpy.cp313-win_amd64.pyd +0 -0
  66. gams/core/numpy/gams2numpy.py +2 -2
  67. gams/core/opt/__init__.py +2 -2
  68. gams/core/opt/_optcc.cp313-win_amd64.pyd +0 -0
  69. gams/engine/__init__.py +193 -16
  70. gams/engine/api/__init__.py +13 -3
  71. gams/engine/api/auth_api.py +7545 -3618
  72. gams/engine/api/cleanup_api.py +712 -320
  73. gams/engine/api/default_api.py +838 -369
  74. gams/engine/api/hypercube_api.py +2576 -1198
  75. gams/engine/api/jobs_api.py +5170 -2458
  76. gams/engine/api/licenses_api.py +2170 -1014
  77. gams/engine/api/namespaces_api.py +7663 -3557
  78. gams/engine/api/usage_api.py +5575 -1867
  79. gams/engine/api/users_api.py +5880 -2382
  80. gams/engine/api_client.py +579 -641
  81. gams/engine/api_response.py +21 -0
  82. gams/engine/configuration.py +233 -102
  83. gams/engine/exceptions.py +86 -29
  84. gams/engine/models/__init__.py +83 -68
  85. gams/engine/models/bad_input.py +89 -0
  86. gams/engine/models/cleanable_job_result.py +104 -0
  87. gams/engine/models/cleanable_job_result_page.py +113 -0
  88. gams/engine/models/engine_license.py +107 -0
  89. gams/engine/models/files_not_found.py +93 -0
  90. gams/engine/models/forwarded_token_response.py +112 -0
  91. gams/engine/models/generic_key_value_pair.py +89 -0
  92. gams/engine/models/hypercube.py +160 -0
  93. gams/engine/models/hypercube_page.py +111 -0
  94. gams/engine/models/hypercube_summary.py +91 -0
  95. gams/engine/models/hypercube_token.py +97 -0
  96. gams/engine/models/identity_provider.py +107 -0
  97. gams/engine/models/identity_provider_ldap.py +121 -0
  98. gams/engine/models/identity_provider_oauth2.py +146 -0
  99. gams/engine/models/identity_provider_oauth2_scope.py +89 -0
  100. gams/engine/models/identity_provider_oauth2_with_secret.py +152 -0
  101. gams/engine/models/identity_provider_oidc.py +133 -0
  102. gams/engine/models/identity_provider_oidc_with_secret.py +143 -0
  103. gams/engine/models/inex.py +91 -0
  104. gams/engine/models/invitation.py +136 -0
  105. gams/engine/models/invitation_quota.py +106 -0
  106. gams/engine/models/invitation_token.py +87 -0
  107. gams/engine/models/job.py +165 -0
  108. gams/engine/models/job_no_text_entry.py +138 -0
  109. gams/engine/models/job_no_text_entry_page.py +111 -0
  110. gams/engine/models/license.py +91 -0
  111. gams/engine/models/log_piece.py +96 -0
  112. gams/engine/models/message.py +87 -0
  113. gams/engine/models/message_and_token.py +99 -0
  114. gams/engine/models/message_with_webhook_id.py +89 -0
  115. gams/engine/models/model_auth_token.py +87 -0
  116. gams/engine/models/model_configuration.py +125 -0
  117. gams/engine/models/model_default_instance.py +99 -0
  118. gams/engine/models/model_default_user_instance.py +98 -0
  119. gams/engine/models/model_hypercube_job.py +106 -0
  120. gams/engine/models/model_hypercube_usage.py +130 -0
  121. gams/engine/models/model_instance_info.py +116 -0
  122. gams/engine/models/model_instance_info_full.py +123 -0
  123. gams/engine/models/model_instance_pool_info.py +112 -0
  124. gams/engine/models/model_job_labels.py +179 -0
  125. gams/engine/models/model_job_usage.py +133 -0
  126. gams/engine/models/model_pool_usage.py +124 -0
  127. gams/engine/models/model_usage.py +115 -0
  128. gams/engine/models/model_user.py +96 -0
  129. gams/engine/models/model_userinstance_info.py +119 -0
  130. gams/engine/models/model_userinstancepool_info.py +95 -0
  131. gams/engine/models/model_version.py +91 -0
  132. gams/engine/models/models.py +120 -0
  133. gams/engine/models/namespace.py +104 -0
  134. gams/engine/models/namespace_quota.py +96 -0
  135. gams/engine/models/namespace_with_permission.py +96 -0
  136. gams/engine/models/not_found.py +91 -0
  137. gams/engine/models/password_policy.py +97 -0
  138. gams/engine/models/perm_and_username.py +89 -0
  139. gams/engine/models/quota.py +117 -0
  140. gams/engine/models/quota_exceeded.py +97 -0
  141. gams/engine/models/status_code_meaning.py +89 -0
  142. gams/engine/models/stream_entry.py +89 -0
  143. gams/engine/models/system_wide_license.py +92 -0
  144. gams/engine/models/text_entries.py +87 -0
  145. gams/engine/models/text_entry.py +101 -0
  146. gams/engine/models/time_span.py +95 -0
  147. gams/engine/models/time_span_pool_worker.py +99 -0
  148. gams/engine/models/token_forward_error.py +87 -0
  149. gams/engine/models/user.py +127 -0
  150. gams/engine/models/user_group_member.py +96 -0
  151. gams/engine/models/user_groups.py +108 -0
  152. gams/engine/models/vapid_info.py +87 -0
  153. gams/engine/models/webhook.py +138 -0
  154. gams/engine/models/webhook_parameterized_event.py +99 -0
  155. gams/engine/py.typed +0 -0
  156. gams/engine/rest.py +141 -229
  157. gams/magic/__init__.py +2 -2
  158. gams/magic/gams_magic.py +2 -2
  159. gams/magic/interactive.py +2 -2
  160. gams/tools/__init__.py +2 -2
  161. gams/tools/errors.py +2 -2
  162. gams/tools/toolcollection/__init__.py +2 -2
  163. gams/tools/toolcollection/alg/__init__.py +2 -2
  164. gams/tools/toolcollection/alg/rank.py +2 -2
  165. gams/tools/toolcollection/data/__init__.py +2 -2
  166. gams/tools/toolcollection/data/csvread.py +2 -2
  167. gams/tools/toolcollection/data/exceldump.py +2 -2
  168. gams/tools/toolcollection/data/sqlitewrite.py +2 -2
  169. gams/tools/toolcollection/gdxservice/__init__.py +2 -2
  170. gams/tools/toolcollection/gdxservice/gdxencoding.py +2 -2
  171. gams/tools/toolcollection/gdxservice/gdxrename.py +2 -2
  172. gams/tools/toolcollection/linalg/__init__.py +2 -2
  173. gams/tools/toolcollection/linalg/cholesky.py +2 -2
  174. gams/tools/toolcollection/linalg/eigenvalue.py +2 -2
  175. gams/tools/toolcollection/linalg/eigenvector.py +2 -2
  176. gams/tools/toolcollection/linalg/invert.py +2 -2
  177. gams/tools/toolcollection/linalg/ols.py +2 -2
  178. gams/tools/toolcollection/tooltemplate.py +2 -2
  179. gams/tools/toolcollection/win32/__init__.py +2 -2
  180. gams/tools/toolcollection/win32/excelmerge.py +2 -2
  181. gams/tools/toolcollection/win32/exceltalk.py +2 -2
  182. gams/tools/toolcollection/win32/msappavail.py +2 -2
  183. gams/tools/toolcollection/win32/shellexecute.py +2 -2
  184. gams/tools/tools.py +2 -2
  185. gams/transfer/__init__.py +2 -2
  186. gams/transfer/_abcs/__init__.py +2 -2
  187. gams/transfer/_abcs/container_abcs.py +2 -2
  188. gams/transfer/_internals/__init__.py +2 -2
  189. gams/transfer/_internals/algorithms.py +2 -2
  190. gams/transfer/_internals/casepreservingdict.py +2 -2
  191. gams/transfer/_internals/constants.py +2 -2
  192. gams/transfer/_internals/domainviolation.py +2 -2
  193. gams/transfer/_internals/specialvalues.py +2 -2
  194. gams/transfer/containers/__init__.py +2 -2
  195. gams/transfer/containers/_container.py +2 -2
  196. gams/transfer/containers/_io/__init__.py +2 -2
  197. gams/transfer/containers/_io/containers.py +2 -2
  198. gams/transfer/containers/_io/gdx.py +2 -2
  199. gams/transfer/containers/_io/gmd.py +2 -2
  200. gams/transfer/containers/_mixins/__init__.py +2 -2
  201. gams/transfer/containers/_mixins/ccc.py +2 -2
  202. gams/transfer/syms/__init__.py +2 -2
  203. gams/transfer/syms/_methods/__init__.py +2 -2
  204. gams/transfer/syms/_methods/tables.py +2 -2
  205. gams/transfer/syms/_methods/toDict.py +2 -2
  206. gams/transfer/syms/_methods/toList.py +2 -2
  207. gams/transfer/syms/_methods/toValue.py +2 -2
  208. gams/transfer/syms/_mixins/__init__.py +2 -2
  209. gams/transfer/syms/_mixins/equals.py +2 -2
  210. gams/transfer/syms/_mixins/generateRecords.py +2 -2
  211. gams/transfer/syms/_mixins/pivot.py +2 -2
  212. gams/transfer/syms/_mixins/pve.py +2 -2
  213. gams/transfer/syms/_mixins/sa.py +2 -2
  214. gams/transfer/syms/_mixins/sapve.py +2 -2
  215. gams/transfer/syms/_mixins/saua.py +2 -2
  216. gams/transfer/syms/_mixins/sauapve.py +2 -2
  217. gams/transfer/syms/_mixins/spve.py +2 -2
  218. gams/transfer/syms/_mixins/ve.py +2 -2
  219. gams/transfer/syms/container_syms/__init__.py +2 -2
  220. gams/transfer/syms/container_syms/_alias.py +2 -2
  221. gams/transfer/syms/container_syms/_equation.py +2 -2
  222. gams/transfer/syms/container_syms/_parameter.py +2 -2
  223. gams/transfer/syms/container_syms/_set.py +2 -2
  224. gams/transfer/syms/container_syms/_universe_alias.py +2 -2
  225. gams/transfer/syms/container_syms/_variable.py +2 -2
  226. {gamsapi-52.2.0.dist-info → gamsapi-52.4.0.dist-info}/METADATA +12 -10
  227. gamsapi-52.4.0.dist-info/RECORD +257 -0
  228. {gamsapi-52.2.0.dist-info → gamsapi-52.4.0.dist-info}/licenses/LICENSE +2 -2
  229. gams/engine/apis/__init__.py +0 -25
  230. gams/engine/model/__init__.py +0 -5
  231. gams/engine/model/bad_input.py +0 -259
  232. gams/engine/model/cleanable_job_result.py +0 -285
  233. gams/engine/model/cleanable_job_result_page.py +0 -277
  234. gams/engine/model/engine_license.py +0 -263
  235. gams/engine/model/files_not_found.py +0 -267
  236. gams/engine/model/forwarded_token_response.py +0 -275
  237. gams/engine/model/generic_key_value_pair.py +0 -259
  238. gams/engine/model/hypercube.py +0 -331
  239. gams/engine/model/hypercube_page.py +0 -273
  240. gams/engine/model/hypercube_summary.py +0 -263
  241. gams/engine/model/hypercube_token.py +0 -265
  242. gams/engine/model/identity_provider.py +0 -287
  243. gams/engine/model/identity_provider_ldap.py +0 -303
  244. gams/engine/model/identity_provider_oauth2.py +0 -309
  245. gams/engine/model/identity_provider_oauth2_scope.py +0 -259
  246. gams/engine/model/identity_provider_oauth2_with_secret.py +0 -321
  247. gams/engine/model/identity_provider_oidc.py +0 -299
  248. gams/engine/model/identity_provider_oidc_with_secret.py +0 -319
  249. gams/engine/model/inex.py +0 -259
  250. gams/engine/model/invitation.py +0 -309
  251. gams/engine/model/invitation_quota.py +0 -263
  252. gams/engine/model/invitation_token.py +0 -255
  253. gams/engine/model/job.py +0 -337
  254. gams/engine/model/job_no_text_entry.py +0 -313
  255. gams/engine/model/job_no_text_entry_page.py +0 -273
  256. gams/engine/model/license.py +0 -263
  257. gams/engine/model/log_piece.py +0 -263
  258. gams/engine/model/message.py +0 -255
  259. gams/engine/model/message_and_token.py +0 -269
  260. gams/engine/model/model_auth_token.py +0 -255
  261. gams/engine/model/model_configuration.py +0 -268
  262. gams/engine/model/model_hypercube_job.py +0 -273
  263. gams/engine/model/model_hypercube_usage.py +0 -303
  264. gams/engine/model/model_instance_info.py +0 -285
  265. gams/engine/model/model_instance_info_full.py +0 -289
  266. gams/engine/model/model_job_labels.py +0 -295
  267. gams/engine/model/model_job_usage.py +0 -299
  268. gams/engine/model/model_usage.py +0 -267
  269. gams/engine/model/model_userinstance_info.py +0 -273
  270. gams/engine/model/model_version.py +0 -263
  271. gams/engine/model/models.py +0 -297
  272. gams/engine/model/namespace.py +0 -269
  273. gams/engine/model/namespace_quota.py +0 -263
  274. gams/engine/model/namespace_with_permission.py +0 -263
  275. gams/engine/model/not_found.py +0 -263
  276. gams/engine/model/perm_and_username.py +0 -259
  277. gams/engine/model/quota.py +0 -275
  278. gams/engine/model/quota_exceeded.py +0 -265
  279. gams/engine/model/result_user.py +0 -263
  280. gams/engine/model/status_code_meaning.py +0 -259
  281. gams/engine/model/stream_entry.py +0 -259
  282. gams/engine/model/system_wide_license.py +0 -255
  283. gams/engine/model/text_entries.py +0 -255
  284. gams/engine/model/text_entry.py +0 -263
  285. gams/engine/model/time_span.py +0 -259
  286. gams/engine/model/token_forward_error.py +0 -255
  287. gams/engine/model/user.py +0 -283
  288. gams/engine/model/user_group_member.py +0 -269
  289. gams/engine/model/user_groups.py +0 -279
  290. gams/engine/model/webhook.py +0 -292
  291. gams/engine/model_utils.py +0 -2037
  292. gamsapi-52.2.0.dist-info/RECORD +0 -248
  293. {gamsapi-52.2.0.dist-info → gamsapi-52.4.0.dist-info}/WHEEL +0 -0
  294. {gamsapi-52.2.0.dist-info → gamsapi-52.4.0.dist-info}/top_level.txt +0 -0
@@ -1,1064 +1,2220 @@
1
+ # coding: utf-8
2
+
1
3
  """
2
4
  GAMS Engine
3
5
 
4
- With GAMS Engine you can register and solve GAMS models. It has a namespace management system, so you can restrict your users to certain models. # noqa: E501
6
+ With GAMS Engine you can register and solve GAMS models. It has a namespace management system, so you can restrict your users to certain models.
5
7
 
6
8
  The version of the OpenAPI document: latest
7
- Generated by: https://openapi-generator.tech
8
- """
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
9
13
 
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
10
18
 
11
- import re # noqa: F401
12
- import sys # noqa: F401
19
+ from pydantic import Field, StrictBool, StrictStr
20
+ from typing import List, Optional
21
+ from typing_extensions import Annotated
22
+ from gams.engine.models.engine_license import EngineLicense
23
+ from gams.engine.models.license import License
24
+ from gams.engine.models.message import Message
25
+ from gams.engine.models.system_wide_license import SystemWideLicense
13
26
 
14
- from gams.engine.api_client import ApiClient, Endpoint as _Endpoint
15
- from gams.engine.model_utils import ( # noqa: F401
16
- check_allowed_values,
17
- check_validations,
18
- date,
19
- datetime,
20
- file_type,
21
- none_type,
22
- validate_and_convert_types
23
- )
24
- from gams.engine.model.engine_license import EngineLicense
25
- from gams.engine.model.license import License
26
- from gams.engine.model.message import Message
27
- from gams.engine.model.system_wide_license import SystemWideLicense
27
+ from gams.engine.api_client import ApiClient, RequestSerialized
28
+ from gams.engine.api_response import ApiResponse
29
+ from gams.engine.rest import RESTResponseType
28
30
 
29
31
 
30
- class LicensesApi(object):
32
+ class LicensesApi:
31
33
  """NOTE: This class is auto generated by OpenAPI Generator
32
34
  Ref: https://openapi-generator.tech
33
35
 
34
36
  Do not edit the class manually.
35
37
  """
36
38
 
37
- def __init__(self, api_client=None):
39
+ def __init__(self, api_client=None) -> None:
38
40
  if api_client is None:
39
- api_client = ApiClient()
41
+ api_client = ApiClient.get_default()
40
42
  self.api_client = api_client
41
- self.delete_license_endpoint = _Endpoint(
42
- settings={
43
- 'response_type': (Message,),
44
- 'auth': [
45
- 'BasicAuth'
46
- ],
47
- 'endpoint_path': '/licenses/',
48
- 'operation_id': 'delete_license',
49
- 'http_method': 'DELETE',
50
- 'servers': None,
51
- },
52
- params_map={
53
- 'all': [
54
- 'username',
55
- ],
56
- 'required': [
57
- 'username',
58
- ],
59
- 'nullable': [
60
- ],
61
- 'enum': [
62
- ],
63
- 'validation': [
64
- ]
65
- },
66
- root_map={
67
- 'validations': {
68
- },
69
- 'allowed_values': {
70
- },
71
- 'openapi_types': {
72
- 'username':
73
- (str,),
74
- },
75
- 'attribute_map': {
76
- 'username': 'username',
77
- },
78
- 'location_map': {
79
- 'username': 'query',
80
- },
81
- 'collection_format_map': {
82
- }
83
- },
84
- headers_map={
85
- 'accept': [
86
- 'application/json'
87
- ],
88
- 'content_type': [],
89
- },
90
- api_client=api_client
91
- )
92
- self.delete_system_wide_gams_license_endpoint = _Endpoint(
93
- settings={
94
- 'response_type': (Message,),
95
- 'auth': [
96
- 'BasicAuth'
97
- ],
98
- 'endpoint_path': '/licenses/system-wide',
99
- 'operation_id': 'delete_system_wide_gams_license',
100
- 'http_method': 'DELETE',
101
- 'servers': None,
102
- },
103
- params_map={
104
- 'all': [
105
- ],
106
- 'required': [],
107
- 'nullable': [
108
- ],
109
- 'enum': [
110
- ],
111
- 'validation': [
112
- ]
113
- },
114
- root_map={
115
- 'validations': {
116
- },
117
- 'allowed_values': {
118
- },
119
- 'openapi_types': {
120
- },
121
- 'attribute_map': {
122
- },
123
- 'location_map': {
124
- },
125
- 'collection_format_map': {
126
- }
127
- },
128
- headers_map={
129
- 'accept': [
130
- 'application/json'
131
- ],
132
- 'content_type': [],
133
- },
134
- api_client=api_client
135
- )
136
- self.get_engine_license_endpoint = _Endpoint(
137
- settings={
138
- 'response_type': (EngineLicense,),
139
- 'auth': [
140
- 'BasicAuth'
141
- ],
142
- 'endpoint_path': '/licenses/engine',
143
- 'operation_id': 'get_engine_license',
144
- 'http_method': 'GET',
145
- 'servers': None,
146
- },
147
- params_map={
148
- 'all': [
149
- ],
150
- 'required': [],
151
- 'nullable': [
152
- ],
153
- 'enum': [
154
- ],
155
- 'validation': [
156
- ]
157
- },
158
- root_map={
159
- 'validations': {
160
- },
161
- 'allowed_values': {
162
- },
163
- 'openapi_types': {
164
- },
165
- 'attribute_map': {
166
- },
167
- 'location_map': {
168
- },
169
- 'collection_format_map': {
170
- }
171
- },
172
- headers_map={
173
- 'accept': [
174
- 'application/json'
175
- ],
176
- 'content_type': [],
177
- },
178
- api_client=api_client
179
- )
180
- self.get_license_endpoint = _Endpoint(
181
- settings={
182
- 'response_type': ([License],),
183
- 'auth': [
184
- 'BasicAuth'
185
- ],
186
- 'endpoint_path': '/licenses/',
187
- 'operation_id': 'get_license',
188
- 'http_method': 'GET',
189
- 'servers': None,
190
- },
191
- params_map={
192
- 'all': [
193
- 'username',
194
- 'x_fields',
195
- 'only_owners',
196
- ],
197
- 'required': [],
198
- 'nullable': [
199
- ],
200
- 'enum': [
201
- ],
202
- 'validation': [
203
- ]
204
- },
205
- root_map={
206
- 'validations': {
207
- },
208
- 'allowed_values': {
209
- },
210
- 'openapi_types': {
211
- 'username':
212
- (str,),
213
- 'x_fields':
214
- (str,),
215
- 'only_owners':
216
- (bool,),
217
- },
218
- 'attribute_map': {
219
- 'username': 'username',
220
- 'x_fields': 'X-Fields',
221
- 'only_owners': 'only-owners',
222
- },
223
- 'location_map': {
224
- 'username': 'query',
225
- 'x_fields': 'header',
226
- 'only_owners': 'query',
227
- },
228
- 'collection_format_map': {
229
- }
230
- },
231
- headers_map={
232
- 'accept': [
233
- 'application/json'
234
- ],
235
- 'content_type': [],
236
- },
237
- api_client=api_client
238
- )
239
- self.get_system_wide_gams_license_endpoint = _Endpoint(
240
- settings={
241
- 'response_type': (SystemWideLicense,),
242
- 'auth': [
243
- 'BasicAuth'
244
- ],
245
- 'endpoint_path': '/licenses/system-wide',
246
- 'operation_id': 'get_system_wide_gams_license',
247
- 'http_method': 'GET',
248
- 'servers': None,
249
- },
250
- params_map={
251
- 'all': [
252
- ],
253
- 'required': [],
254
- 'nullable': [
255
- ],
256
- 'enum': [
257
- ],
258
- 'validation': [
259
- ]
260
- },
261
- root_map={
262
- 'validations': {
263
- },
264
- 'allowed_values': {
265
- },
266
- 'openapi_types': {
267
- },
268
- 'attribute_map': {
269
- },
270
- 'location_map': {
271
- },
272
- 'collection_format_map': {
273
- }
274
- },
275
- headers_map={
276
- 'accept': [
277
- 'application/json'
278
- ],
279
- 'content_type': [],
280
- },
281
- api_client=api_client
282
- )
283
- self.update_engine_license_endpoint = _Endpoint(
284
- settings={
285
- 'response_type': (Message,),
286
- 'auth': [
287
- 'BasicAuth'
288
- ],
289
- 'endpoint_path': '/licenses/engine',
290
- 'operation_id': 'update_engine_license',
291
- 'http_method': 'PUT',
292
- 'servers': None,
293
- },
294
- params_map={
295
- 'all': [
296
- 'license',
297
- ],
298
- 'required': [
299
- 'license',
300
- ],
301
- 'nullable': [
302
- ],
303
- 'enum': [
304
- ],
305
- 'validation': [
306
- ]
307
- },
308
- root_map={
309
- 'validations': {
310
- },
311
- 'allowed_values': {
312
- },
313
- 'openapi_types': {
314
- 'license':
315
- (str,),
316
- },
317
- 'attribute_map': {
318
- 'license': 'license',
319
- },
320
- 'location_map': {
321
- 'license': 'form',
322
- },
323
- 'collection_format_map': {
324
- }
325
- },
326
- headers_map={
327
- 'accept': [
43
+
44
+
45
+ @validate_call
46
+ def delete_license(
47
+ self,
48
+ username: StrictStr,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> Message:
62
+ """Deletes the license associated with the given user
63
+
64
+ Deletes licenses from invited users if the affected user is an inviter. The user must be the owner of the license, not just an heir. Requires admin privileges.
65
+
66
+ :param username: (required)
67
+ :type username: str
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._delete_license_serialize(
91
+ username=username,
92
+ _request_auth=_request_auth,
93
+ _content_type=_content_type,
94
+ _headers=_headers,
95
+ _host_index=_host_index
96
+ )
97
+
98
+ _response_types_map: Dict[str, Optional[str]] = {
99
+ '200': "Message",
100
+ '400': "Message",
101
+ '403': "Message",
102
+ '404': "Message",
103
+ }
104
+ response_data = self.api_client.call_api(
105
+ *_param,
106
+ _request_timeout=_request_timeout
107
+ )
108
+ response_data.read()
109
+ return self.api_client.response_deserialize(
110
+ response_data=response_data,
111
+ response_types_map=_response_types_map,
112
+ ).data
113
+
114
+
115
+ @validate_call
116
+ def delete_license_with_http_info(
117
+ self,
118
+ username: StrictStr,
119
+ _request_timeout: Union[
120
+ None,
121
+ Annotated[StrictFloat, Field(gt=0)],
122
+ Tuple[
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Annotated[StrictFloat, Field(gt=0)]
125
+ ]
126
+ ] = None,
127
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
128
+ _content_type: Optional[StrictStr] = None,
129
+ _headers: Optional[Dict[StrictStr, Any]] = None,
130
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
131
+ ) -> ApiResponse[Message]:
132
+ """Deletes the license associated with the given user
133
+
134
+ Deletes licenses from invited users if the affected user is an inviter. The user must be the owner of the license, not just an heir. Requires admin privileges.
135
+
136
+ :param username: (required)
137
+ :type username: str
138
+ :param _request_timeout: timeout setting for this request. If one
139
+ number provided, it will be total request
140
+ timeout. It can also be a pair (tuple) of
141
+ (connection, read) timeouts.
142
+ :type _request_timeout: int, tuple(int, int), optional
143
+ :param _request_auth: set to override the auth_settings for an a single
144
+ request; this effectively ignores the
145
+ authentication in the spec for a single request.
146
+ :type _request_auth: dict, optional
147
+ :param _content_type: force content-type for the request.
148
+ :type _content_type: str, Optional
149
+ :param _headers: set to override the headers for a single
150
+ request; this effectively ignores the headers
151
+ in the spec for a single request.
152
+ :type _headers: dict, optional
153
+ :param _host_index: set to override the host_index for a single
154
+ request; this effectively ignores the host_index
155
+ in the spec for a single request.
156
+ :type _host_index: int, optional
157
+ :return: Returns the result object.
158
+ """ # noqa: E501
159
+
160
+ _param = self._delete_license_serialize(
161
+ username=username,
162
+ _request_auth=_request_auth,
163
+ _content_type=_content_type,
164
+ _headers=_headers,
165
+ _host_index=_host_index
166
+ )
167
+
168
+ _response_types_map: Dict[str, Optional[str]] = {
169
+ '200': "Message",
170
+ '400': "Message",
171
+ '403': "Message",
172
+ '404': "Message",
173
+ }
174
+ response_data = self.api_client.call_api(
175
+ *_param,
176
+ _request_timeout=_request_timeout
177
+ )
178
+ response_data.read()
179
+ return self.api_client.response_deserialize(
180
+ response_data=response_data,
181
+ response_types_map=_response_types_map,
182
+ )
183
+
184
+
185
+ @validate_call
186
+ def delete_license_without_preload_content(
187
+ self,
188
+ username: StrictStr,
189
+ _request_timeout: Union[
190
+ None,
191
+ Annotated[StrictFloat, Field(gt=0)],
192
+ Tuple[
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Annotated[StrictFloat, Field(gt=0)]
195
+ ]
196
+ ] = None,
197
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
198
+ _content_type: Optional[StrictStr] = None,
199
+ _headers: Optional[Dict[StrictStr, Any]] = None,
200
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
201
+ ) -> RESTResponseType:
202
+ """Deletes the license associated with the given user
203
+
204
+ Deletes licenses from invited users if the affected user is an inviter. The user must be the owner of the license, not just an heir. Requires admin privileges.
205
+
206
+ :param username: (required)
207
+ :type username: str
208
+ :param _request_timeout: timeout setting for this request. If one
209
+ number provided, it will be total request
210
+ timeout. It can also be a pair (tuple) of
211
+ (connection, read) timeouts.
212
+ :type _request_timeout: int, tuple(int, int), optional
213
+ :param _request_auth: set to override the auth_settings for an a single
214
+ request; this effectively ignores the
215
+ authentication in the spec for a single request.
216
+ :type _request_auth: dict, optional
217
+ :param _content_type: force content-type for the request.
218
+ :type _content_type: str, Optional
219
+ :param _headers: set to override the headers for a single
220
+ request; this effectively ignores the headers
221
+ in the spec for a single request.
222
+ :type _headers: dict, optional
223
+ :param _host_index: set to override the host_index for a single
224
+ request; this effectively ignores the host_index
225
+ in the spec for a single request.
226
+ :type _host_index: int, optional
227
+ :return: Returns the result object.
228
+ """ # noqa: E501
229
+
230
+ _param = self._delete_license_serialize(
231
+ username=username,
232
+ _request_auth=_request_auth,
233
+ _content_type=_content_type,
234
+ _headers=_headers,
235
+ _host_index=_host_index
236
+ )
237
+
238
+ _response_types_map: Dict[str, Optional[str]] = {
239
+ '200': "Message",
240
+ '400': "Message",
241
+ '403': "Message",
242
+ '404': "Message",
243
+ }
244
+ response_data = self.api_client.call_api(
245
+ *_param,
246
+ _request_timeout=_request_timeout
247
+ )
248
+ return response_data.response
249
+
250
+
251
+ def _delete_license_serialize(
252
+ self,
253
+ username,
254
+ _request_auth,
255
+ _content_type,
256
+ _headers,
257
+ _host_index,
258
+ ) -> RequestSerialized:
259
+
260
+ _host = None
261
+
262
+ _collection_formats: Dict[str, str] = {
263
+ }
264
+
265
+ _path_params: Dict[str, str] = {}
266
+ _query_params: List[Tuple[str, str]] = []
267
+ _header_params: Dict[str, Optional[str]] = _headers or {}
268
+ _form_params: List[Tuple[str, str]] = []
269
+ _files: Dict[
270
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
271
+ ] = {}
272
+ _body_params: Optional[bytes] = None
273
+
274
+ # process the path parameters
275
+ # process the query parameters
276
+ if username is not None:
277
+
278
+ _query_params.append(('username', username))
279
+
280
+ # process the header parameters
281
+ # process the form parameters
282
+ # process the body parameter
283
+
284
+
285
+ # set the HTTP header `Accept`
286
+ if 'Accept' not in _header_params:
287
+ _header_params['Accept'] = self.api_client.select_header_accept(
288
+ [
328
289
  'application/json'
329
- ],
330
- 'content_type': [
331
- 'application/x-www-form-urlencoded',
332
- 'multipart/form-data'
333
- ]
334
- },
335
- api_client=api_client
336
- )
337
- self.update_license_endpoint = _Endpoint(
338
- settings={
339
- 'response_type': (Message,),
340
- 'auth': [
341
- 'BasicAuth'
342
- ],
343
- 'endpoint_path': '/licenses/',
344
- 'operation_id': 'update_license',
345
- 'http_method': 'PUT',
346
- 'servers': None,
347
- },
348
- params_map={
349
- 'all': [
350
- 'username',
351
- 'license',
352
- ],
353
- 'required': [
354
- 'username',
355
- 'license',
356
- ],
357
- 'nullable': [
358
- ],
359
- 'enum': [
360
- ],
361
- 'validation': [
362
- 'license',
363
290
  ]
364
- },
365
- root_map={
366
- 'validations': {
367
- ('license',): {
368
- 'max_length': 1000,
369
- },
370
- },
371
- 'allowed_values': {
372
- },
373
- 'openapi_types': {
374
- 'username':
375
- (str,),
376
- 'license':
377
- (str,),
378
- },
379
- 'attribute_map': {
380
- 'username': 'username',
381
- 'license': 'license',
382
- },
383
- 'location_map': {
384
- 'username': 'form',
385
- 'license': 'form',
386
- },
387
- 'collection_format_map': {
388
- }
389
- },
390
- headers_map={
391
- 'accept': [
291
+ )
292
+
293
+
294
+ # authentication setting
295
+ _auth_settings: List[str] = [
296
+ 'BasicAuth'
297
+ ]
298
+
299
+ return self.api_client.param_serialize(
300
+ method='DELETE',
301
+ resource_path='/licenses/',
302
+ path_params=_path_params,
303
+ query_params=_query_params,
304
+ header_params=_header_params,
305
+ body=_body_params,
306
+ post_params=_form_params,
307
+ files=_files,
308
+ auth_settings=_auth_settings,
309
+ collection_formats=_collection_formats,
310
+ _host=_host,
311
+ _request_auth=_request_auth
312
+ )
313
+
314
+
315
+
316
+
317
+ @validate_call
318
+ def delete_system_wide_gams_license(
319
+ self,
320
+ _request_timeout: Union[
321
+ None,
322
+ Annotated[StrictFloat, Field(gt=0)],
323
+ Tuple[
324
+ Annotated[StrictFloat, Field(gt=0)],
325
+ Annotated[StrictFloat, Field(gt=0)]
326
+ ]
327
+ ] = None,
328
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
329
+ _content_type: Optional[StrictStr] = None,
330
+ _headers: Optional[Dict[StrictStr, Any]] = None,
331
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
332
+ ) -> Message:
333
+ """Deletes the system-wide GAMS license (only admins)
334
+
335
+
336
+ :param _request_timeout: timeout setting for this request. If one
337
+ number provided, it will be total request
338
+ timeout. It can also be a pair (tuple) of
339
+ (connection, read) timeouts.
340
+ :type _request_timeout: int, tuple(int, int), optional
341
+ :param _request_auth: set to override the auth_settings for an a single
342
+ request; this effectively ignores the
343
+ authentication in the spec for a single request.
344
+ :type _request_auth: dict, optional
345
+ :param _content_type: force content-type for the request.
346
+ :type _content_type: str, Optional
347
+ :param _headers: set to override the headers for a single
348
+ request; this effectively ignores the headers
349
+ in the spec for a single request.
350
+ :type _headers: dict, optional
351
+ :param _host_index: set to override the host_index for a single
352
+ request; this effectively ignores the host_index
353
+ in the spec for a single request.
354
+ :type _host_index: int, optional
355
+ :return: Returns the result object.
356
+ """ # noqa: E501
357
+
358
+ _param = self._delete_system_wide_gams_license_serialize(
359
+ _request_auth=_request_auth,
360
+ _content_type=_content_type,
361
+ _headers=_headers,
362
+ _host_index=_host_index
363
+ )
364
+
365
+ _response_types_map: Dict[str, Optional[str]] = {
366
+ '200': "Message",
367
+ '403': "Message",
368
+ '404': "Message",
369
+ }
370
+ response_data = self.api_client.call_api(
371
+ *_param,
372
+ _request_timeout=_request_timeout
373
+ )
374
+ response_data.read()
375
+ return self.api_client.response_deserialize(
376
+ response_data=response_data,
377
+ response_types_map=_response_types_map,
378
+ ).data
379
+
380
+
381
+ @validate_call
382
+ def delete_system_wide_gams_license_with_http_info(
383
+ self,
384
+ _request_timeout: Union[
385
+ None,
386
+ Annotated[StrictFloat, Field(gt=0)],
387
+ Tuple[
388
+ Annotated[StrictFloat, Field(gt=0)],
389
+ Annotated[StrictFloat, Field(gt=0)]
390
+ ]
391
+ ] = None,
392
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
393
+ _content_type: Optional[StrictStr] = None,
394
+ _headers: Optional[Dict[StrictStr, Any]] = None,
395
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
396
+ ) -> ApiResponse[Message]:
397
+ """Deletes the system-wide GAMS license (only admins)
398
+
399
+
400
+ :param _request_timeout: timeout setting for this request. If one
401
+ number provided, it will be total request
402
+ timeout. It can also be a pair (tuple) of
403
+ (connection, read) timeouts.
404
+ :type _request_timeout: int, tuple(int, int), optional
405
+ :param _request_auth: set to override the auth_settings for an a single
406
+ request; this effectively ignores the
407
+ authentication in the spec for a single request.
408
+ :type _request_auth: dict, optional
409
+ :param _content_type: force content-type for the request.
410
+ :type _content_type: str, Optional
411
+ :param _headers: set to override the headers for a single
412
+ request; this effectively ignores the headers
413
+ in the spec for a single request.
414
+ :type _headers: dict, optional
415
+ :param _host_index: set to override the host_index for a single
416
+ request; this effectively ignores the host_index
417
+ in the spec for a single request.
418
+ :type _host_index: int, optional
419
+ :return: Returns the result object.
420
+ """ # noqa: E501
421
+
422
+ _param = self._delete_system_wide_gams_license_serialize(
423
+ _request_auth=_request_auth,
424
+ _content_type=_content_type,
425
+ _headers=_headers,
426
+ _host_index=_host_index
427
+ )
428
+
429
+ _response_types_map: Dict[str, Optional[str]] = {
430
+ '200': "Message",
431
+ '403': "Message",
432
+ '404': "Message",
433
+ }
434
+ response_data = self.api_client.call_api(
435
+ *_param,
436
+ _request_timeout=_request_timeout
437
+ )
438
+ response_data.read()
439
+ return self.api_client.response_deserialize(
440
+ response_data=response_data,
441
+ response_types_map=_response_types_map,
442
+ )
443
+
444
+
445
+ @validate_call
446
+ def delete_system_wide_gams_license_without_preload_content(
447
+ self,
448
+ _request_timeout: Union[
449
+ None,
450
+ Annotated[StrictFloat, Field(gt=0)],
451
+ Tuple[
452
+ Annotated[StrictFloat, Field(gt=0)],
453
+ Annotated[StrictFloat, Field(gt=0)]
454
+ ]
455
+ ] = None,
456
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
457
+ _content_type: Optional[StrictStr] = None,
458
+ _headers: Optional[Dict[StrictStr, Any]] = None,
459
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
460
+ ) -> RESTResponseType:
461
+ """Deletes the system-wide GAMS license (only admins)
462
+
463
+
464
+ :param _request_timeout: timeout setting for this request. If one
465
+ number provided, it will be total request
466
+ timeout. It can also be a pair (tuple) of
467
+ (connection, read) timeouts.
468
+ :type _request_timeout: int, tuple(int, int), optional
469
+ :param _request_auth: set to override the auth_settings for an a single
470
+ request; this effectively ignores the
471
+ authentication in the spec for a single request.
472
+ :type _request_auth: dict, optional
473
+ :param _content_type: force content-type for the request.
474
+ :type _content_type: str, Optional
475
+ :param _headers: set to override the headers for a single
476
+ request; this effectively ignores the headers
477
+ in the spec for a single request.
478
+ :type _headers: dict, optional
479
+ :param _host_index: set to override the host_index for a single
480
+ request; this effectively ignores the host_index
481
+ in the spec for a single request.
482
+ :type _host_index: int, optional
483
+ :return: Returns the result object.
484
+ """ # noqa: E501
485
+
486
+ _param = self._delete_system_wide_gams_license_serialize(
487
+ _request_auth=_request_auth,
488
+ _content_type=_content_type,
489
+ _headers=_headers,
490
+ _host_index=_host_index
491
+ )
492
+
493
+ _response_types_map: Dict[str, Optional[str]] = {
494
+ '200': "Message",
495
+ '403': "Message",
496
+ '404': "Message",
497
+ }
498
+ response_data = self.api_client.call_api(
499
+ *_param,
500
+ _request_timeout=_request_timeout
501
+ )
502
+ return response_data.response
503
+
504
+
505
+ def _delete_system_wide_gams_license_serialize(
506
+ self,
507
+ _request_auth,
508
+ _content_type,
509
+ _headers,
510
+ _host_index,
511
+ ) -> RequestSerialized:
512
+
513
+ _host = None
514
+
515
+ _collection_formats: Dict[str, str] = {
516
+ }
517
+
518
+ _path_params: Dict[str, str] = {}
519
+ _query_params: List[Tuple[str, str]] = []
520
+ _header_params: Dict[str, Optional[str]] = _headers or {}
521
+ _form_params: List[Tuple[str, str]] = []
522
+ _files: Dict[
523
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
524
+ ] = {}
525
+ _body_params: Optional[bytes] = None
526
+
527
+ # process the path parameters
528
+ # process the query parameters
529
+ # process the header parameters
530
+ # process the form parameters
531
+ # process the body parameter
532
+
533
+
534
+ # set the HTTP header `Accept`
535
+ if 'Accept' not in _header_params:
536
+ _header_params['Accept'] = self.api_client.select_header_accept(
537
+ [
392
538
  'application/json'
393
- ],
394
- 'content_type': [
395
- 'application/x-www-form-urlencoded',
396
- 'multipart/form-data'
397
- ]
398
- },
399
- api_client=api_client
400
- )
401
- self.update_system_wide_gams_license_endpoint = _Endpoint(
402
- settings={
403
- 'response_type': (Message,),
404
- 'auth': [
405
- 'BasicAuth'
406
- ],
407
- 'endpoint_path': '/licenses/system-wide',
408
- 'operation_id': 'update_system_wide_gams_license',
409
- 'http_method': 'PUT',
410
- 'servers': None,
411
- },
412
- params_map={
413
- 'all': [
414
- 'license',
415
- ],
416
- 'required': [
417
- 'license',
418
- ],
419
- 'nullable': [
420
- ],
421
- 'enum': [
422
- ],
423
- 'validation': [
424
- 'license',
425
539
  ]
426
- },
427
- root_map={
428
- 'validations': {
429
- ('license',): {
430
- 'max_length': 1000,
431
- },
432
- },
433
- 'allowed_values': {
434
- },
435
- 'openapi_types': {
436
- 'license':
437
- (str,),
438
- },
439
- 'attribute_map': {
440
- 'license': 'license',
441
- },
442
- 'location_map': {
443
- 'license': 'form',
444
- },
445
- 'collection_format_map': {
446
- }
447
- },
448
- headers_map={
449
- 'accept': [
540
+ )
541
+
542
+
543
+ # authentication setting
544
+ _auth_settings: List[str] = [
545
+ 'BasicAuth'
546
+ ]
547
+
548
+ return self.api_client.param_serialize(
549
+ method='DELETE',
550
+ resource_path='/licenses/system-wide',
551
+ path_params=_path_params,
552
+ query_params=_query_params,
553
+ header_params=_header_params,
554
+ body=_body_params,
555
+ post_params=_form_params,
556
+ files=_files,
557
+ auth_settings=_auth_settings,
558
+ collection_formats=_collection_formats,
559
+ _host=_host,
560
+ _request_auth=_request_auth
561
+ )
562
+
563
+
564
+
565
+
566
+ @validate_call
567
+ def get_engine_license(
568
+ self,
569
+ _request_timeout: Union[
570
+ None,
571
+ Annotated[StrictFloat, Field(gt=0)],
572
+ Tuple[
573
+ Annotated[StrictFloat, Field(gt=0)],
574
+ Annotated[StrictFloat, Field(gt=0)]
575
+ ]
576
+ ] = None,
577
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
578
+ _content_type: Optional[StrictStr] = None,
579
+ _headers: Optional[Dict[StrictStr, Any]] = None,
580
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
581
+ ) -> EngineLicense:
582
+ """Returns Engine license
583
+
584
+
585
+ :param _request_timeout: timeout setting for this request. If one
586
+ number provided, it will be total request
587
+ timeout. It can also be a pair (tuple) of
588
+ (connection, read) timeouts.
589
+ :type _request_timeout: int, tuple(int, int), optional
590
+ :param _request_auth: set to override the auth_settings for an a single
591
+ request; this effectively ignores the
592
+ authentication in the spec for a single request.
593
+ :type _request_auth: dict, optional
594
+ :param _content_type: force content-type for the request.
595
+ :type _content_type: str, Optional
596
+ :param _headers: set to override the headers for a single
597
+ request; this effectively ignores the headers
598
+ in the spec for a single request.
599
+ :type _headers: dict, optional
600
+ :param _host_index: set to override the host_index for a single
601
+ request; this effectively ignores the host_index
602
+ in the spec for a single request.
603
+ :type _host_index: int, optional
604
+ :return: Returns the result object.
605
+ """ # noqa: E501
606
+
607
+ _param = self._get_engine_license_serialize(
608
+ _request_auth=_request_auth,
609
+ _content_type=_content_type,
610
+ _headers=_headers,
611
+ _host_index=_host_index
612
+ )
613
+
614
+ _response_types_map: Dict[str, Optional[str]] = {
615
+ '200': "EngineLicense",
616
+ '403': "Message",
617
+ '500': "Message",
618
+ }
619
+ response_data = self.api_client.call_api(
620
+ *_param,
621
+ _request_timeout=_request_timeout
622
+ )
623
+ response_data.read()
624
+ return self.api_client.response_deserialize(
625
+ response_data=response_data,
626
+ response_types_map=_response_types_map,
627
+ ).data
628
+
629
+
630
+ @validate_call
631
+ def get_engine_license_with_http_info(
632
+ self,
633
+ _request_timeout: Union[
634
+ None,
635
+ Annotated[StrictFloat, Field(gt=0)],
636
+ Tuple[
637
+ Annotated[StrictFloat, Field(gt=0)],
638
+ Annotated[StrictFloat, Field(gt=0)]
639
+ ]
640
+ ] = None,
641
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
642
+ _content_type: Optional[StrictStr] = None,
643
+ _headers: Optional[Dict[StrictStr, Any]] = None,
644
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
645
+ ) -> ApiResponse[EngineLicense]:
646
+ """Returns Engine license
647
+
648
+
649
+ :param _request_timeout: timeout setting for this request. If one
650
+ number provided, it will be total request
651
+ timeout. It can also be a pair (tuple) of
652
+ (connection, read) timeouts.
653
+ :type _request_timeout: int, tuple(int, int), optional
654
+ :param _request_auth: set to override the auth_settings for an a single
655
+ request; this effectively ignores the
656
+ authentication in the spec for a single request.
657
+ :type _request_auth: dict, optional
658
+ :param _content_type: force content-type for the request.
659
+ :type _content_type: str, Optional
660
+ :param _headers: set to override the headers for a single
661
+ request; this effectively ignores the headers
662
+ in the spec for a single request.
663
+ :type _headers: dict, optional
664
+ :param _host_index: set to override the host_index for a single
665
+ request; this effectively ignores the host_index
666
+ in the spec for a single request.
667
+ :type _host_index: int, optional
668
+ :return: Returns the result object.
669
+ """ # noqa: E501
670
+
671
+ _param = self._get_engine_license_serialize(
672
+ _request_auth=_request_auth,
673
+ _content_type=_content_type,
674
+ _headers=_headers,
675
+ _host_index=_host_index
676
+ )
677
+
678
+ _response_types_map: Dict[str, Optional[str]] = {
679
+ '200': "EngineLicense",
680
+ '403': "Message",
681
+ '500': "Message",
682
+ }
683
+ response_data = self.api_client.call_api(
684
+ *_param,
685
+ _request_timeout=_request_timeout
686
+ )
687
+ response_data.read()
688
+ return self.api_client.response_deserialize(
689
+ response_data=response_data,
690
+ response_types_map=_response_types_map,
691
+ )
692
+
693
+
694
+ @validate_call
695
+ def get_engine_license_without_preload_content(
696
+ self,
697
+ _request_timeout: Union[
698
+ None,
699
+ Annotated[StrictFloat, Field(gt=0)],
700
+ Tuple[
701
+ Annotated[StrictFloat, Field(gt=0)],
702
+ Annotated[StrictFloat, Field(gt=0)]
703
+ ]
704
+ ] = None,
705
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
706
+ _content_type: Optional[StrictStr] = None,
707
+ _headers: Optional[Dict[StrictStr, Any]] = None,
708
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
709
+ ) -> RESTResponseType:
710
+ """Returns Engine license
711
+
712
+
713
+ :param _request_timeout: timeout setting for this request. If one
714
+ number provided, it will be total request
715
+ timeout. It can also be a pair (tuple) of
716
+ (connection, read) timeouts.
717
+ :type _request_timeout: int, tuple(int, int), optional
718
+ :param _request_auth: set to override the auth_settings for an a single
719
+ request; this effectively ignores the
720
+ authentication in the spec for a single request.
721
+ :type _request_auth: dict, optional
722
+ :param _content_type: force content-type for the request.
723
+ :type _content_type: str, Optional
724
+ :param _headers: set to override the headers for a single
725
+ request; this effectively ignores the headers
726
+ in the spec for a single request.
727
+ :type _headers: dict, optional
728
+ :param _host_index: set to override the host_index for a single
729
+ request; this effectively ignores the host_index
730
+ in the spec for a single request.
731
+ :type _host_index: int, optional
732
+ :return: Returns the result object.
733
+ """ # noqa: E501
734
+
735
+ _param = self._get_engine_license_serialize(
736
+ _request_auth=_request_auth,
737
+ _content_type=_content_type,
738
+ _headers=_headers,
739
+ _host_index=_host_index
740
+ )
741
+
742
+ _response_types_map: Dict[str, Optional[str]] = {
743
+ '200': "EngineLicense",
744
+ '403': "Message",
745
+ '500': "Message",
746
+ }
747
+ response_data = self.api_client.call_api(
748
+ *_param,
749
+ _request_timeout=_request_timeout
750
+ )
751
+ return response_data.response
752
+
753
+
754
+ def _get_engine_license_serialize(
755
+ self,
756
+ _request_auth,
757
+ _content_type,
758
+ _headers,
759
+ _host_index,
760
+ ) -> RequestSerialized:
761
+
762
+ _host = None
763
+
764
+ _collection_formats: Dict[str, str] = {
765
+ }
766
+
767
+ _path_params: Dict[str, str] = {}
768
+ _query_params: List[Tuple[str, str]] = []
769
+ _header_params: Dict[str, Optional[str]] = _headers or {}
770
+ _form_params: List[Tuple[str, str]] = []
771
+ _files: Dict[
772
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
773
+ ] = {}
774
+ _body_params: Optional[bytes] = None
775
+
776
+ # process the path parameters
777
+ # process the query parameters
778
+ # process the header parameters
779
+ # process the form parameters
780
+ # process the body parameter
781
+
782
+
783
+ # set the HTTP header `Accept`
784
+ if 'Accept' not in _header_params:
785
+ _header_params['Accept'] = self.api_client.select_header_accept(
786
+ [
450
787
  'application/json'
451
- ],
452
- 'content_type': [
453
- 'application/x-www-form-urlencoded',
454
- 'multipart/form-data'
455
788
  ]
456
- },
457
- api_client=api_client
789
+ )
790
+
791
+
792
+ # authentication setting
793
+ _auth_settings: List[str] = [
794
+ 'BasicAuth'
795
+ ]
796
+
797
+ return self.api_client.param_serialize(
798
+ method='GET',
799
+ resource_path='/licenses/engine',
800
+ path_params=_path_params,
801
+ query_params=_query_params,
802
+ header_params=_header_params,
803
+ body=_body_params,
804
+ post_params=_form_params,
805
+ files=_files,
806
+ auth_settings=_auth_settings,
807
+ collection_formats=_collection_formats,
808
+ _host=_host,
809
+ _request_auth=_request_auth
458
810
  )
459
811
 
460
- def delete_license(
812
+
813
+
814
+
815
+ @validate_call
816
+ def get_license(
461
817
  self,
462
- username,
463
- **kwargs
464
- ):
465
- """Deletes the license associated with the given user # noqa: E501
466
-
467
- Deletes licenses from invited users if the affected user is an inviter. The user must be the owner of the license, not just an heir. Requires admin privileges. # noqa: E501
468
- This method makes a synchronous HTTP request by default. To make an
469
- asynchronous HTTP request, please pass async_req=True
470
-
471
- >>> thread = api.delete_license(username, async_req=True)
472
- >>> result = thread.get()
473
-
474
- Args:
475
- username (str):
476
-
477
- Keyword Args:
478
- _return_http_data_only (bool): response data without head status
479
- code and headers. Default is True.
480
- _preload_content (bool): if False, the urllib3.HTTPResponse object
481
- will be returned without reading/decoding response data.
482
- Default is True.
483
- _request_timeout (int/float/tuple): timeout setting for this request. If
484
- one number provided, it will be total request timeout. It can also
485
- be a pair (tuple) of (connection, read) timeouts.
486
- Default is None.
487
- _check_input_type (bool): specifies if type checking
488
- should be done one the data sent to the server.
489
- Default is True.
490
- _check_return_type (bool): specifies if type checking
491
- should be done one the data received from the server.
492
- Default is True.
493
- _spec_property_naming (bool): True if the variable names in the input data
494
- are serialized names, as specified in the OpenAPI document.
495
- False if the variable names in the input data
496
- are pythonic names, e.g. snake case (default)
497
- _content_type (str/None): force body content-type.
498
- Default is None and content-type will be predicted by allowed
499
- content-types and body.
500
- _host_index (int/None): specifies the index of the server
501
- that we want to use.
502
- Default is read from the configuration.
503
- async_req (bool): execute request asynchronously
504
-
505
- Returns:
506
- Message
507
- If the method is called asynchronously, returns the request
508
- thread.
509
- """
510
- kwargs['async_req'] = kwargs.get(
511
- 'async_req', False
512
- )
513
- kwargs['_return_http_data_only'] = kwargs.get(
514
- '_return_http_data_only', True
515
- )
516
- kwargs['_preload_content'] = kwargs.get(
517
- '_preload_content', True
518
- )
519
- kwargs['_request_timeout'] = kwargs.get(
520
- '_request_timeout', None
521
- )
522
- kwargs['_check_input_type'] = kwargs.get(
523
- '_check_input_type', True
524
- )
525
- kwargs['_check_return_type'] = kwargs.get(
526
- '_check_return_type', True
527
- )
528
- kwargs['_spec_property_naming'] = kwargs.get(
529
- '_spec_property_naming', False
530
- )
531
- kwargs['_content_type'] = kwargs.get(
532
- '_content_type')
533
- kwargs['_host_index'] = kwargs.get('_host_index')
534
- kwargs['username'] = \
535
- username
536
- return self.delete_license_endpoint.call_with_http_info(**kwargs)
818
+ username: Annotated[Optional[StrictStr], Field(description="Username of the user to filter")] = None,
819
+ x_fields: Optional[StrictStr] = None,
820
+ only_owners: Annotated[Optional[StrictBool], Field(description="Show only license owners, not the heirs")] = None,
821
+ _request_timeout: Union[
822
+ None,
823
+ Annotated[StrictFloat, Field(gt=0)],
824
+ Tuple[
825
+ Annotated[StrictFloat, Field(gt=0)],
826
+ Annotated[StrictFloat, Field(gt=0)]
827
+ ]
828
+ ] = None,
829
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
830
+ _content_type: Optional[StrictStr] = None,
831
+ _headers: Optional[Dict[StrictStr, Any]] = None,
832
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
833
+ ) -> List[License]:
834
+ """Lists the users' licenses
537
835
 
538
- def delete_system_wide_gams_license(
836
+
837
+ :param username: Username of the user to filter
838
+ :type username: str
839
+ :param x_fields:
840
+ :type x_fields: str
841
+ :param only_owners: Show only license owners, not the heirs
842
+ :type only_owners: bool
843
+ :param _request_timeout: timeout setting for this request. If one
844
+ number provided, it will be total request
845
+ timeout. It can also be a pair (tuple) of
846
+ (connection, read) timeouts.
847
+ :type _request_timeout: int, tuple(int, int), optional
848
+ :param _request_auth: set to override the auth_settings for an a single
849
+ request; this effectively ignores the
850
+ authentication in the spec for a single request.
851
+ :type _request_auth: dict, optional
852
+ :param _content_type: force content-type for the request.
853
+ :type _content_type: str, Optional
854
+ :param _headers: set to override the headers for a single
855
+ request; this effectively ignores the headers
856
+ in the spec for a single request.
857
+ :type _headers: dict, optional
858
+ :param _host_index: set to override the host_index for a single
859
+ request; this effectively ignores the host_index
860
+ in the spec for a single request.
861
+ :type _host_index: int, optional
862
+ :return: Returns the result object.
863
+ """ # noqa: E501
864
+
865
+ _param = self._get_license_serialize(
866
+ username=username,
867
+ x_fields=x_fields,
868
+ only_owners=only_owners,
869
+ _request_auth=_request_auth,
870
+ _content_type=_content_type,
871
+ _headers=_headers,
872
+ _host_index=_host_index
873
+ )
874
+
875
+ _response_types_map: Dict[str, Optional[str]] = {
876
+ '200': "List[License]",
877
+ '400': "Message",
878
+ '403': "Message",
879
+ '404': "Message",
880
+ }
881
+ response_data = self.api_client.call_api(
882
+ *_param,
883
+ _request_timeout=_request_timeout
884
+ )
885
+ response_data.read()
886
+ return self.api_client.response_deserialize(
887
+ response_data=response_data,
888
+ response_types_map=_response_types_map,
889
+ ).data
890
+
891
+
892
+ @validate_call
893
+ def get_license_with_http_info(
539
894
  self,
540
- **kwargs
541
- ):
542
- """Deletes the system-wide GAMS license (only admins) # noqa: E501
543
-
544
- This method makes a synchronous HTTP request by default. To make an
545
- asynchronous HTTP request, please pass async_req=True
546
-
547
- >>> thread = api.delete_system_wide_gams_license(async_req=True)
548
- >>> result = thread.get()
549
-
550
-
551
- Keyword Args:
552
- _return_http_data_only (bool): response data without head status
553
- code and headers. Default is True.
554
- _preload_content (bool): if False, the urllib3.HTTPResponse object
555
- will be returned without reading/decoding response data.
556
- Default is True.
557
- _request_timeout (int/float/tuple): timeout setting for this request. If
558
- one number provided, it will be total request timeout. It can also
559
- be a pair (tuple) of (connection, read) timeouts.
560
- Default is None.
561
- _check_input_type (bool): specifies if type checking
562
- should be done one the data sent to the server.
563
- Default is True.
564
- _check_return_type (bool): specifies if type checking
565
- should be done one the data received from the server.
566
- Default is True.
567
- _spec_property_naming (bool): True if the variable names in the input data
568
- are serialized names, as specified in the OpenAPI document.
569
- False if the variable names in the input data
570
- are pythonic names, e.g. snake case (default)
571
- _content_type (str/None): force body content-type.
572
- Default is None and content-type will be predicted by allowed
573
- content-types and body.
574
- _host_index (int/None): specifies the index of the server
575
- that we want to use.
576
- Default is read from the configuration.
577
- async_req (bool): execute request asynchronously
578
-
579
- Returns:
580
- Message
581
- If the method is called asynchronously, returns the request
582
- thread.
583
- """
584
- kwargs['async_req'] = kwargs.get(
585
- 'async_req', False
586
- )
587
- kwargs['_return_http_data_only'] = kwargs.get(
588
- '_return_http_data_only', True
589
- )
590
- kwargs['_preload_content'] = kwargs.get(
591
- '_preload_content', True
592
- )
593
- kwargs['_request_timeout'] = kwargs.get(
594
- '_request_timeout', None
595
- )
596
- kwargs['_check_input_type'] = kwargs.get(
597
- '_check_input_type', True
598
- )
599
- kwargs['_check_return_type'] = kwargs.get(
600
- '_check_return_type', True
601
- )
602
- kwargs['_spec_property_naming'] = kwargs.get(
603
- '_spec_property_naming', False
604
- )
605
- kwargs['_content_type'] = kwargs.get(
606
- '_content_type')
607
- kwargs['_host_index'] = kwargs.get('_host_index')
608
- return self.delete_system_wide_gams_license_endpoint.call_with_http_info(**kwargs)
895
+ username: Annotated[Optional[StrictStr], Field(description="Username of the user to filter")] = None,
896
+ x_fields: Optional[StrictStr] = None,
897
+ only_owners: Annotated[Optional[StrictBool], Field(description="Show only license owners, not the heirs")] = None,
898
+ _request_timeout: Union[
899
+ None,
900
+ Annotated[StrictFloat, Field(gt=0)],
901
+ Tuple[
902
+ Annotated[StrictFloat, Field(gt=0)],
903
+ Annotated[StrictFloat, Field(gt=0)]
904
+ ]
905
+ ] = None,
906
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
907
+ _content_type: Optional[StrictStr] = None,
908
+ _headers: Optional[Dict[StrictStr, Any]] = None,
909
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
910
+ ) -> ApiResponse[List[License]]:
911
+ """Lists the users' licenses
609
912
 
610
- def get_engine_license(
913
+
914
+ :param username: Username of the user to filter
915
+ :type username: str
916
+ :param x_fields:
917
+ :type x_fields: str
918
+ :param only_owners: Show only license owners, not the heirs
919
+ :type only_owners: bool
920
+ :param _request_timeout: timeout setting for this request. If one
921
+ number provided, it will be total request
922
+ timeout. It can also be a pair (tuple) of
923
+ (connection, read) timeouts.
924
+ :type _request_timeout: int, tuple(int, int), optional
925
+ :param _request_auth: set to override the auth_settings for an a single
926
+ request; this effectively ignores the
927
+ authentication in the spec for a single request.
928
+ :type _request_auth: dict, optional
929
+ :param _content_type: force content-type for the request.
930
+ :type _content_type: str, Optional
931
+ :param _headers: set to override the headers for a single
932
+ request; this effectively ignores the headers
933
+ in the spec for a single request.
934
+ :type _headers: dict, optional
935
+ :param _host_index: set to override the host_index for a single
936
+ request; this effectively ignores the host_index
937
+ in the spec for a single request.
938
+ :type _host_index: int, optional
939
+ :return: Returns the result object.
940
+ """ # noqa: E501
941
+
942
+ _param = self._get_license_serialize(
943
+ username=username,
944
+ x_fields=x_fields,
945
+ only_owners=only_owners,
946
+ _request_auth=_request_auth,
947
+ _content_type=_content_type,
948
+ _headers=_headers,
949
+ _host_index=_host_index
950
+ )
951
+
952
+ _response_types_map: Dict[str, Optional[str]] = {
953
+ '200': "List[License]",
954
+ '400': "Message",
955
+ '403': "Message",
956
+ '404': "Message",
957
+ }
958
+ response_data = self.api_client.call_api(
959
+ *_param,
960
+ _request_timeout=_request_timeout
961
+ )
962
+ response_data.read()
963
+ return self.api_client.response_deserialize(
964
+ response_data=response_data,
965
+ response_types_map=_response_types_map,
966
+ )
967
+
968
+
969
+ @validate_call
970
+ def get_license_without_preload_content(
611
971
  self,
612
- **kwargs
613
- ):
614
- """Returns Engine license # noqa: E501
615
-
616
- This method makes a synchronous HTTP request by default. To make an
617
- asynchronous HTTP request, please pass async_req=True
618
-
619
- >>> thread = api.get_engine_license(async_req=True)
620
- >>> result = thread.get()
621
-
622
-
623
- Keyword Args:
624
- _return_http_data_only (bool): response data without head status
625
- code and headers. Default is True.
626
- _preload_content (bool): if False, the urllib3.HTTPResponse object
627
- will be returned without reading/decoding response data.
628
- Default is True.
629
- _request_timeout (int/float/tuple): timeout setting for this request. If
630
- one number provided, it will be total request timeout. It can also
631
- be a pair (tuple) of (connection, read) timeouts.
632
- Default is None.
633
- _check_input_type (bool): specifies if type checking
634
- should be done one the data sent to the server.
635
- Default is True.
636
- _check_return_type (bool): specifies if type checking
637
- should be done one the data received from the server.
638
- Default is True.
639
- _spec_property_naming (bool): True if the variable names in the input data
640
- are serialized names, as specified in the OpenAPI document.
641
- False if the variable names in the input data
642
- are pythonic names, e.g. snake case (default)
643
- _content_type (str/None): force body content-type.
644
- Default is None and content-type will be predicted by allowed
645
- content-types and body.
646
- _host_index (int/None): specifies the index of the server
647
- that we want to use.
648
- Default is read from the configuration.
649
- async_req (bool): execute request asynchronously
650
-
651
- Returns:
652
- EngineLicense
653
- If the method is called asynchronously, returns the request
654
- thread.
655
- """
656
- kwargs['async_req'] = kwargs.get(
657
- 'async_req', False
658
- )
659
- kwargs['_return_http_data_only'] = kwargs.get(
660
- '_return_http_data_only', True
661
- )
662
- kwargs['_preload_content'] = kwargs.get(
663
- '_preload_content', True
664
- )
665
- kwargs['_request_timeout'] = kwargs.get(
666
- '_request_timeout', None
667
- )
668
- kwargs['_check_input_type'] = kwargs.get(
669
- '_check_input_type', True
670
- )
671
- kwargs['_check_return_type'] = kwargs.get(
672
- '_check_return_type', True
673
- )
674
- kwargs['_spec_property_naming'] = kwargs.get(
675
- '_spec_property_naming', False
676
- )
677
- kwargs['_content_type'] = kwargs.get(
678
- '_content_type')
679
- kwargs['_host_index'] = kwargs.get('_host_index')
680
- return self.get_engine_license_endpoint.call_with_http_info(**kwargs)
972
+ username: Annotated[Optional[StrictStr], Field(description="Username of the user to filter")] = None,
973
+ x_fields: Optional[StrictStr] = None,
974
+ only_owners: Annotated[Optional[StrictBool], Field(description="Show only license owners, not the heirs")] = None,
975
+ _request_timeout: Union[
976
+ None,
977
+ Annotated[StrictFloat, Field(gt=0)],
978
+ Tuple[
979
+ Annotated[StrictFloat, Field(gt=0)],
980
+ Annotated[StrictFloat, Field(gt=0)]
981
+ ]
982
+ ] = None,
983
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
984
+ _content_type: Optional[StrictStr] = None,
985
+ _headers: Optional[Dict[StrictStr, Any]] = None,
986
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
987
+ ) -> RESTResponseType:
988
+ """Lists the users' licenses
681
989
 
682
- def get_license(
990
+
991
+ :param username: Username of the user to filter
992
+ :type username: str
993
+ :param x_fields:
994
+ :type x_fields: str
995
+ :param only_owners: Show only license owners, not the heirs
996
+ :type only_owners: bool
997
+ :param _request_timeout: timeout setting for this request. If one
998
+ number provided, it will be total request
999
+ timeout. It can also be a pair (tuple) of
1000
+ (connection, read) timeouts.
1001
+ :type _request_timeout: int, tuple(int, int), optional
1002
+ :param _request_auth: set to override the auth_settings for an a single
1003
+ request; this effectively ignores the
1004
+ authentication in the spec for a single request.
1005
+ :type _request_auth: dict, optional
1006
+ :param _content_type: force content-type for the request.
1007
+ :type _content_type: str, Optional
1008
+ :param _headers: set to override the headers for a single
1009
+ request; this effectively ignores the headers
1010
+ in the spec for a single request.
1011
+ :type _headers: dict, optional
1012
+ :param _host_index: set to override the host_index for a single
1013
+ request; this effectively ignores the host_index
1014
+ in the spec for a single request.
1015
+ :type _host_index: int, optional
1016
+ :return: Returns the result object.
1017
+ """ # noqa: E501
1018
+
1019
+ _param = self._get_license_serialize(
1020
+ username=username,
1021
+ x_fields=x_fields,
1022
+ only_owners=only_owners,
1023
+ _request_auth=_request_auth,
1024
+ _content_type=_content_type,
1025
+ _headers=_headers,
1026
+ _host_index=_host_index
1027
+ )
1028
+
1029
+ _response_types_map: Dict[str, Optional[str]] = {
1030
+ '200': "List[License]",
1031
+ '400': "Message",
1032
+ '403': "Message",
1033
+ '404': "Message",
1034
+ }
1035
+ response_data = self.api_client.call_api(
1036
+ *_param,
1037
+ _request_timeout=_request_timeout
1038
+ )
1039
+ return response_data.response
1040
+
1041
+
1042
+ def _get_license_serialize(
683
1043
  self,
684
- **kwargs
685
- ):
686
- """Lists the users' licenses # noqa: E501
687
-
688
- This method makes a synchronous HTTP request by default. To make an
689
- asynchronous HTTP request, please pass async_req=True
690
-
691
- >>> thread = api.get_license(async_req=True)
692
- >>> result = thread.get()
693
-
694
-
695
- Keyword Args:
696
- username (str): Username of the user to filter. [optional]
697
- x_fields (str): [optional]
698
- only_owners (bool): Show only license owners, not the heirs. [optional] if omitted the server will use the default value of False
699
- _return_http_data_only (bool): response data without head status
700
- code and headers. Default is True.
701
- _preload_content (bool): if False, the urllib3.HTTPResponse object
702
- will be returned without reading/decoding response data.
703
- Default is True.
704
- _request_timeout (int/float/tuple): timeout setting for this request. If
705
- one number provided, it will be total request timeout. It can also
706
- be a pair (tuple) of (connection, read) timeouts.
707
- Default is None.
708
- _check_input_type (bool): specifies if type checking
709
- should be done one the data sent to the server.
710
- Default is True.
711
- _check_return_type (bool): specifies if type checking
712
- should be done one the data received from the server.
713
- Default is True.
714
- _spec_property_naming (bool): True if the variable names in the input data
715
- are serialized names, as specified in the OpenAPI document.
716
- False if the variable names in the input data
717
- are pythonic names, e.g. snake case (default)
718
- _content_type (str/None): force body content-type.
719
- Default is None and content-type will be predicted by allowed
720
- content-types and body.
721
- _host_index (int/None): specifies the index of the server
722
- that we want to use.
723
- Default is read from the configuration.
724
- async_req (bool): execute request asynchronously
725
-
726
- Returns:
727
- [License]
728
- If the method is called asynchronously, returns the request
729
- thread.
730
- """
731
- kwargs['async_req'] = kwargs.get(
732
- 'async_req', False
733
- )
734
- kwargs['_return_http_data_only'] = kwargs.get(
735
- '_return_http_data_only', True
736
- )
737
- kwargs['_preload_content'] = kwargs.get(
738
- '_preload_content', True
739
- )
740
- kwargs['_request_timeout'] = kwargs.get(
741
- '_request_timeout', None
742
- )
743
- kwargs['_check_input_type'] = kwargs.get(
744
- '_check_input_type', True
745
- )
746
- kwargs['_check_return_type'] = kwargs.get(
747
- '_check_return_type', True
748
- )
749
- kwargs['_spec_property_naming'] = kwargs.get(
750
- '_spec_property_naming', False
751
- )
752
- kwargs['_content_type'] = kwargs.get(
753
- '_content_type')
754
- kwargs['_host_index'] = kwargs.get('_host_index')
755
- return self.get_license_endpoint.call_with_http_info(**kwargs)
1044
+ username,
1045
+ x_fields,
1046
+ only_owners,
1047
+ _request_auth,
1048
+ _content_type,
1049
+ _headers,
1050
+ _host_index,
1051
+ ) -> RequestSerialized:
1052
+
1053
+ _host = None
1054
+
1055
+ _collection_formats: Dict[str, str] = {
1056
+ }
1057
+
1058
+ _path_params: Dict[str, str] = {}
1059
+ _query_params: List[Tuple[str, str]] = []
1060
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1061
+ _form_params: List[Tuple[str, str]] = []
1062
+ _files: Dict[
1063
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1064
+ ] = {}
1065
+ _body_params: Optional[bytes] = None
756
1066
 
1067
+ # process the path parameters
1068
+ # process the query parameters
1069
+ if username is not None:
1070
+
1071
+ _query_params.append(('username', username))
1072
+
1073
+ if only_owners is not None:
1074
+
1075
+ _query_params.append(('only-owners', only_owners))
1076
+
1077
+ # process the header parameters
1078
+ if x_fields is not None:
1079
+ _header_params['X-Fields'] = x_fields
1080
+ # process the form parameters
1081
+ # process the body parameter
1082
+
1083
+
1084
+ # set the HTTP header `Accept`
1085
+ if 'Accept' not in _header_params:
1086
+ _header_params['Accept'] = self.api_client.select_header_accept(
1087
+ [
1088
+ 'application/json'
1089
+ ]
1090
+ )
1091
+
1092
+
1093
+ # authentication setting
1094
+ _auth_settings: List[str] = [
1095
+ 'BasicAuth'
1096
+ ]
1097
+
1098
+ return self.api_client.param_serialize(
1099
+ method='GET',
1100
+ resource_path='/licenses/',
1101
+ path_params=_path_params,
1102
+ query_params=_query_params,
1103
+ header_params=_header_params,
1104
+ body=_body_params,
1105
+ post_params=_form_params,
1106
+ files=_files,
1107
+ auth_settings=_auth_settings,
1108
+ collection_formats=_collection_formats,
1109
+ _host=_host,
1110
+ _request_auth=_request_auth
1111
+ )
1112
+
1113
+
1114
+
1115
+
1116
+ @validate_call
757
1117
  def get_system_wide_gams_license(
758
1118
  self,
759
- **kwargs
760
- ):
761
- """Fetches the system-wide GAMS license (only admins) # noqa: E501
762
-
763
- This method makes a synchronous HTTP request by default. To make an
764
- asynchronous HTTP request, please pass async_req=True
765
-
766
- >>> thread = api.get_system_wide_gams_license(async_req=True)
767
- >>> result = thread.get()
768
-
769
-
770
- Keyword Args:
771
- _return_http_data_only (bool): response data without head status
772
- code and headers. Default is True.
773
- _preload_content (bool): if False, the urllib3.HTTPResponse object
774
- will be returned without reading/decoding response data.
775
- Default is True.
776
- _request_timeout (int/float/tuple): timeout setting for this request. If
777
- one number provided, it will be total request timeout. It can also
778
- be a pair (tuple) of (connection, read) timeouts.
779
- Default is None.
780
- _check_input_type (bool): specifies if type checking
781
- should be done one the data sent to the server.
782
- Default is True.
783
- _check_return_type (bool): specifies if type checking
784
- should be done one the data received from the server.
785
- Default is True.
786
- _spec_property_naming (bool): True if the variable names in the input data
787
- are serialized names, as specified in the OpenAPI document.
788
- False if the variable names in the input data
789
- are pythonic names, e.g. snake case (default)
790
- _content_type (str/None): force body content-type.
791
- Default is None and content-type will be predicted by allowed
792
- content-types and body.
793
- _host_index (int/None): specifies the index of the server
794
- that we want to use.
795
- Default is read from the configuration.
796
- async_req (bool): execute request asynchronously
797
-
798
- Returns:
799
- SystemWideLicense
800
- If the method is called asynchronously, returns the request
801
- thread.
802
- """
803
- kwargs['async_req'] = kwargs.get(
804
- 'async_req', False
805
- )
806
- kwargs['_return_http_data_only'] = kwargs.get(
807
- '_return_http_data_only', True
808
- )
809
- kwargs['_preload_content'] = kwargs.get(
810
- '_preload_content', True
811
- )
812
- kwargs['_request_timeout'] = kwargs.get(
813
- '_request_timeout', None
814
- )
815
- kwargs['_check_input_type'] = kwargs.get(
816
- '_check_input_type', True
817
- )
818
- kwargs['_check_return_type'] = kwargs.get(
819
- '_check_return_type', True
820
- )
821
- kwargs['_spec_property_naming'] = kwargs.get(
822
- '_spec_property_naming', False
823
- )
824
- kwargs['_content_type'] = kwargs.get(
825
- '_content_type')
826
- kwargs['_host_index'] = kwargs.get('_host_index')
827
- return self.get_system_wide_gams_license_endpoint.call_with_http_info(**kwargs)
1119
+ _request_timeout: Union[
1120
+ None,
1121
+ Annotated[StrictFloat, Field(gt=0)],
1122
+ Tuple[
1123
+ Annotated[StrictFloat, Field(gt=0)],
1124
+ Annotated[StrictFloat, Field(gt=0)]
1125
+ ]
1126
+ ] = None,
1127
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1128
+ _content_type: Optional[StrictStr] = None,
1129
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1130
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1131
+ ) -> SystemWideLicense:
1132
+ """Fetches the system-wide GAMS license (only admins)
1133
+
1134
+
1135
+ :param _request_timeout: timeout setting for this request. If one
1136
+ number provided, it will be total request
1137
+ timeout. It can also be a pair (tuple) of
1138
+ (connection, read) timeouts.
1139
+ :type _request_timeout: int, tuple(int, int), optional
1140
+ :param _request_auth: set to override the auth_settings for an a single
1141
+ request; this effectively ignores the
1142
+ authentication in the spec for a single request.
1143
+ :type _request_auth: dict, optional
1144
+ :param _content_type: force content-type for the request.
1145
+ :type _content_type: str, Optional
1146
+ :param _headers: set to override the headers for a single
1147
+ request; this effectively ignores the headers
1148
+ in the spec for a single request.
1149
+ :type _headers: dict, optional
1150
+ :param _host_index: set to override the host_index for a single
1151
+ request; this effectively ignores the host_index
1152
+ in the spec for a single request.
1153
+ :type _host_index: int, optional
1154
+ :return: Returns the result object.
1155
+ """ # noqa: E501
1156
+
1157
+ _param = self._get_system_wide_gams_license_serialize(
1158
+ _request_auth=_request_auth,
1159
+ _content_type=_content_type,
1160
+ _headers=_headers,
1161
+ _host_index=_host_index
1162
+ )
1163
+
1164
+ _response_types_map: Dict[str, Optional[str]] = {
1165
+ '200': "SystemWideLicense",
1166
+ '400': "Message",
1167
+ '403': "Message",
1168
+ }
1169
+ response_data = self.api_client.call_api(
1170
+ *_param,
1171
+ _request_timeout=_request_timeout
1172
+ )
1173
+ response_data.read()
1174
+ return self.api_client.response_deserialize(
1175
+ response_data=response_data,
1176
+ response_types_map=_response_types_map,
1177
+ ).data
1178
+
1179
+
1180
+ @validate_call
1181
+ def get_system_wide_gams_license_with_http_info(
1182
+ self,
1183
+ _request_timeout: Union[
1184
+ None,
1185
+ Annotated[StrictFloat, Field(gt=0)],
1186
+ Tuple[
1187
+ Annotated[StrictFloat, Field(gt=0)],
1188
+ Annotated[StrictFloat, Field(gt=0)]
1189
+ ]
1190
+ ] = None,
1191
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1192
+ _content_type: Optional[StrictStr] = None,
1193
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1194
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1195
+ ) -> ApiResponse[SystemWideLicense]:
1196
+ """Fetches the system-wide GAMS license (only admins)
1197
+
1198
+
1199
+ :param _request_timeout: timeout setting for this request. If one
1200
+ number provided, it will be total request
1201
+ timeout. It can also be a pair (tuple) of
1202
+ (connection, read) timeouts.
1203
+ :type _request_timeout: int, tuple(int, int), optional
1204
+ :param _request_auth: set to override the auth_settings for an a single
1205
+ request; this effectively ignores the
1206
+ authentication in the spec for a single request.
1207
+ :type _request_auth: dict, optional
1208
+ :param _content_type: force content-type for the request.
1209
+ :type _content_type: str, Optional
1210
+ :param _headers: set to override the headers for a single
1211
+ request; this effectively ignores the headers
1212
+ in the spec for a single request.
1213
+ :type _headers: dict, optional
1214
+ :param _host_index: set to override the host_index for a single
1215
+ request; this effectively ignores the host_index
1216
+ in the spec for a single request.
1217
+ :type _host_index: int, optional
1218
+ :return: Returns the result object.
1219
+ """ # noqa: E501
828
1220
 
1221
+ _param = self._get_system_wide_gams_license_serialize(
1222
+ _request_auth=_request_auth,
1223
+ _content_type=_content_type,
1224
+ _headers=_headers,
1225
+ _host_index=_host_index
1226
+ )
1227
+
1228
+ _response_types_map: Dict[str, Optional[str]] = {
1229
+ '200': "SystemWideLicense",
1230
+ '400': "Message",
1231
+ '403': "Message",
1232
+ }
1233
+ response_data = self.api_client.call_api(
1234
+ *_param,
1235
+ _request_timeout=_request_timeout
1236
+ )
1237
+ response_data.read()
1238
+ return self.api_client.response_deserialize(
1239
+ response_data=response_data,
1240
+ response_types_map=_response_types_map,
1241
+ )
1242
+
1243
+
1244
+ @validate_call
1245
+ def get_system_wide_gams_license_without_preload_content(
1246
+ self,
1247
+ _request_timeout: Union[
1248
+ None,
1249
+ Annotated[StrictFloat, Field(gt=0)],
1250
+ Tuple[
1251
+ Annotated[StrictFloat, Field(gt=0)],
1252
+ Annotated[StrictFloat, Field(gt=0)]
1253
+ ]
1254
+ ] = None,
1255
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1256
+ _content_type: Optional[StrictStr] = None,
1257
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1258
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1259
+ ) -> RESTResponseType:
1260
+ """Fetches the system-wide GAMS license (only admins)
1261
+
1262
+
1263
+ :param _request_timeout: timeout setting for this request. If one
1264
+ number provided, it will be total request
1265
+ timeout. It can also be a pair (tuple) of
1266
+ (connection, read) timeouts.
1267
+ :type _request_timeout: int, tuple(int, int), optional
1268
+ :param _request_auth: set to override the auth_settings for an a single
1269
+ request; this effectively ignores the
1270
+ authentication in the spec for a single request.
1271
+ :type _request_auth: dict, optional
1272
+ :param _content_type: force content-type for the request.
1273
+ :type _content_type: str, Optional
1274
+ :param _headers: set to override the headers for a single
1275
+ request; this effectively ignores the headers
1276
+ in the spec for a single request.
1277
+ :type _headers: dict, optional
1278
+ :param _host_index: set to override the host_index for a single
1279
+ request; this effectively ignores the host_index
1280
+ in the spec for a single request.
1281
+ :type _host_index: int, optional
1282
+ :return: Returns the result object.
1283
+ """ # noqa: E501
1284
+
1285
+ _param = self._get_system_wide_gams_license_serialize(
1286
+ _request_auth=_request_auth,
1287
+ _content_type=_content_type,
1288
+ _headers=_headers,
1289
+ _host_index=_host_index
1290
+ )
1291
+
1292
+ _response_types_map: Dict[str, Optional[str]] = {
1293
+ '200': "SystemWideLicense",
1294
+ '400': "Message",
1295
+ '403': "Message",
1296
+ }
1297
+ response_data = self.api_client.call_api(
1298
+ *_param,
1299
+ _request_timeout=_request_timeout
1300
+ )
1301
+ return response_data.response
1302
+
1303
+
1304
+ def _get_system_wide_gams_license_serialize(
1305
+ self,
1306
+ _request_auth,
1307
+ _content_type,
1308
+ _headers,
1309
+ _host_index,
1310
+ ) -> RequestSerialized:
1311
+
1312
+ _host = None
1313
+
1314
+ _collection_formats: Dict[str, str] = {
1315
+ }
1316
+
1317
+ _path_params: Dict[str, str] = {}
1318
+ _query_params: List[Tuple[str, str]] = []
1319
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1320
+ _form_params: List[Tuple[str, str]] = []
1321
+ _files: Dict[
1322
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1323
+ ] = {}
1324
+ _body_params: Optional[bytes] = None
1325
+
1326
+ # process the path parameters
1327
+ # process the query parameters
1328
+ # process the header parameters
1329
+ # process the form parameters
1330
+ # process the body parameter
1331
+
1332
+
1333
+ # set the HTTP header `Accept`
1334
+ if 'Accept' not in _header_params:
1335
+ _header_params['Accept'] = self.api_client.select_header_accept(
1336
+ [
1337
+ 'application/json'
1338
+ ]
1339
+ )
1340
+
1341
+
1342
+ # authentication setting
1343
+ _auth_settings: List[str] = [
1344
+ 'BasicAuth'
1345
+ ]
1346
+
1347
+ return self.api_client.param_serialize(
1348
+ method='GET',
1349
+ resource_path='/licenses/system-wide',
1350
+ path_params=_path_params,
1351
+ query_params=_query_params,
1352
+ header_params=_header_params,
1353
+ body=_body_params,
1354
+ post_params=_form_params,
1355
+ files=_files,
1356
+ auth_settings=_auth_settings,
1357
+ collection_formats=_collection_formats,
1358
+ _host=_host,
1359
+ _request_auth=_request_auth
1360
+ )
1361
+
1362
+
1363
+
1364
+
1365
+ @validate_call
829
1366
  def update_engine_license(
1367
+ self,
1368
+ license: Annotated[StrictStr, Field(description="Engine license")],
1369
+ _request_timeout: Union[
1370
+ None,
1371
+ Annotated[StrictFloat, Field(gt=0)],
1372
+ Tuple[
1373
+ Annotated[StrictFloat, Field(gt=0)],
1374
+ Annotated[StrictFloat, Field(gt=0)]
1375
+ ]
1376
+ ] = None,
1377
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1378
+ _content_type: Optional[StrictStr] = None,
1379
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1380
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1381
+ ) -> Message:
1382
+ """Updates Engine license
1383
+
1384
+
1385
+ :param license: Engine license (required)
1386
+ :type license: str
1387
+ :param _request_timeout: timeout setting for this request. If one
1388
+ number provided, it will be total request
1389
+ timeout. It can also be a pair (tuple) of
1390
+ (connection, read) timeouts.
1391
+ :type _request_timeout: int, tuple(int, int), optional
1392
+ :param _request_auth: set to override the auth_settings for an a single
1393
+ request; this effectively ignores the
1394
+ authentication in the spec for a single request.
1395
+ :type _request_auth: dict, optional
1396
+ :param _content_type: force content-type for the request.
1397
+ :type _content_type: str, Optional
1398
+ :param _headers: set to override the headers for a single
1399
+ request; this effectively ignores the headers
1400
+ in the spec for a single request.
1401
+ :type _headers: dict, optional
1402
+ :param _host_index: set to override the host_index for a single
1403
+ request; this effectively ignores the host_index
1404
+ in the spec for a single request.
1405
+ :type _host_index: int, optional
1406
+ :return: Returns the result object.
1407
+ """ # noqa: E501
1408
+
1409
+ _param = self._update_engine_license_serialize(
1410
+ license=license,
1411
+ _request_auth=_request_auth,
1412
+ _content_type=_content_type,
1413
+ _headers=_headers,
1414
+ _host_index=_host_index
1415
+ )
1416
+
1417
+ _response_types_map: Dict[str, Optional[str]] = {
1418
+ '200': "Message",
1419
+ '400': None,
1420
+ '403': "Message",
1421
+ '500': "Message",
1422
+ }
1423
+ response_data = self.api_client.call_api(
1424
+ *_param,
1425
+ _request_timeout=_request_timeout
1426
+ )
1427
+ response_data.read()
1428
+ return self.api_client.response_deserialize(
1429
+ response_data=response_data,
1430
+ response_types_map=_response_types_map,
1431
+ ).data
1432
+
1433
+
1434
+ @validate_call
1435
+ def update_engine_license_with_http_info(
1436
+ self,
1437
+ license: Annotated[StrictStr, Field(description="Engine license")],
1438
+ _request_timeout: Union[
1439
+ None,
1440
+ Annotated[StrictFloat, Field(gt=0)],
1441
+ Tuple[
1442
+ Annotated[StrictFloat, Field(gt=0)],
1443
+ Annotated[StrictFloat, Field(gt=0)]
1444
+ ]
1445
+ ] = None,
1446
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1447
+ _content_type: Optional[StrictStr] = None,
1448
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1449
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1450
+ ) -> ApiResponse[Message]:
1451
+ """Updates Engine license
1452
+
1453
+
1454
+ :param license: Engine license (required)
1455
+ :type license: str
1456
+ :param _request_timeout: timeout setting for this request. If one
1457
+ number provided, it will be total request
1458
+ timeout. It can also be a pair (tuple) of
1459
+ (connection, read) timeouts.
1460
+ :type _request_timeout: int, tuple(int, int), optional
1461
+ :param _request_auth: set to override the auth_settings for an a single
1462
+ request; this effectively ignores the
1463
+ authentication in the spec for a single request.
1464
+ :type _request_auth: dict, optional
1465
+ :param _content_type: force content-type for the request.
1466
+ :type _content_type: str, Optional
1467
+ :param _headers: set to override the headers for a single
1468
+ request; this effectively ignores the headers
1469
+ in the spec for a single request.
1470
+ :type _headers: dict, optional
1471
+ :param _host_index: set to override the host_index for a single
1472
+ request; this effectively ignores the host_index
1473
+ in the spec for a single request.
1474
+ :type _host_index: int, optional
1475
+ :return: Returns the result object.
1476
+ """ # noqa: E501
1477
+
1478
+ _param = self._update_engine_license_serialize(
1479
+ license=license,
1480
+ _request_auth=_request_auth,
1481
+ _content_type=_content_type,
1482
+ _headers=_headers,
1483
+ _host_index=_host_index
1484
+ )
1485
+
1486
+ _response_types_map: Dict[str, Optional[str]] = {
1487
+ '200': "Message",
1488
+ '400': None,
1489
+ '403': "Message",
1490
+ '500': "Message",
1491
+ }
1492
+ response_data = self.api_client.call_api(
1493
+ *_param,
1494
+ _request_timeout=_request_timeout
1495
+ )
1496
+ response_data.read()
1497
+ return self.api_client.response_deserialize(
1498
+ response_data=response_data,
1499
+ response_types_map=_response_types_map,
1500
+ )
1501
+
1502
+
1503
+ @validate_call
1504
+ def update_engine_license_without_preload_content(
1505
+ self,
1506
+ license: Annotated[StrictStr, Field(description="Engine license")],
1507
+ _request_timeout: Union[
1508
+ None,
1509
+ Annotated[StrictFloat, Field(gt=0)],
1510
+ Tuple[
1511
+ Annotated[StrictFloat, Field(gt=0)],
1512
+ Annotated[StrictFloat, Field(gt=0)]
1513
+ ]
1514
+ ] = None,
1515
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1516
+ _content_type: Optional[StrictStr] = None,
1517
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1518
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1519
+ ) -> RESTResponseType:
1520
+ """Updates Engine license
1521
+
1522
+
1523
+ :param license: Engine license (required)
1524
+ :type license: str
1525
+ :param _request_timeout: timeout setting for this request. If one
1526
+ number provided, it will be total request
1527
+ timeout. It can also be a pair (tuple) of
1528
+ (connection, read) timeouts.
1529
+ :type _request_timeout: int, tuple(int, int), optional
1530
+ :param _request_auth: set to override the auth_settings for an a single
1531
+ request; this effectively ignores the
1532
+ authentication in the spec for a single request.
1533
+ :type _request_auth: dict, optional
1534
+ :param _content_type: force content-type for the request.
1535
+ :type _content_type: str, Optional
1536
+ :param _headers: set to override the headers for a single
1537
+ request; this effectively ignores the headers
1538
+ in the spec for a single request.
1539
+ :type _headers: dict, optional
1540
+ :param _host_index: set to override the host_index for a single
1541
+ request; this effectively ignores the host_index
1542
+ in the spec for a single request.
1543
+ :type _host_index: int, optional
1544
+ :return: Returns the result object.
1545
+ """ # noqa: E501
1546
+
1547
+ _param = self._update_engine_license_serialize(
1548
+ license=license,
1549
+ _request_auth=_request_auth,
1550
+ _content_type=_content_type,
1551
+ _headers=_headers,
1552
+ _host_index=_host_index
1553
+ )
1554
+
1555
+ _response_types_map: Dict[str, Optional[str]] = {
1556
+ '200': "Message",
1557
+ '400': None,
1558
+ '403': "Message",
1559
+ '500': "Message",
1560
+ }
1561
+ response_data = self.api_client.call_api(
1562
+ *_param,
1563
+ _request_timeout=_request_timeout
1564
+ )
1565
+ return response_data.response
1566
+
1567
+
1568
+ def _update_engine_license_serialize(
830
1569
  self,
831
1570
  license,
832
- **kwargs
833
- ):
834
- """Updates Engine license # noqa: E501
835
-
836
- This method makes a synchronous HTTP request by default. To make an
837
- asynchronous HTTP request, please pass async_req=True
838
-
839
- >>> thread = api.update_engine_license(license, async_req=True)
840
- >>> result = thread.get()
841
-
842
- Args:
843
- license (str): Engine license
844
-
845
- Keyword Args:
846
- _return_http_data_only (bool): response data without head status
847
- code and headers. Default is True.
848
- _preload_content (bool): if False, the urllib3.HTTPResponse object
849
- will be returned without reading/decoding response data.
850
- Default is True.
851
- _request_timeout (int/float/tuple): timeout setting for this request. If
852
- one number provided, it will be total request timeout. It can also
853
- be a pair (tuple) of (connection, read) timeouts.
854
- Default is None.
855
- _check_input_type (bool): specifies if type checking
856
- should be done one the data sent to the server.
857
- Default is True.
858
- _check_return_type (bool): specifies if type checking
859
- should be done one the data received from the server.
860
- Default is True.
861
- _spec_property_naming (bool): True if the variable names in the input data
862
- are serialized names, as specified in the OpenAPI document.
863
- False if the variable names in the input data
864
- are pythonic names, e.g. snake case (default)
865
- _content_type (str/None): force body content-type.
866
- Default is None and content-type will be predicted by allowed
867
- content-types and body.
868
- _host_index (int/None): specifies the index of the server
869
- that we want to use.
870
- Default is read from the configuration.
871
- async_req (bool): execute request asynchronously
872
-
873
- Returns:
874
- Message
875
- If the method is called asynchronously, returns the request
876
- thread.
877
- """
878
- kwargs['async_req'] = kwargs.get(
879
- 'async_req', False
880
- )
881
- kwargs['_return_http_data_only'] = kwargs.get(
882
- '_return_http_data_only', True
883
- )
884
- kwargs['_preload_content'] = kwargs.get(
885
- '_preload_content', True
886
- )
887
- kwargs['_request_timeout'] = kwargs.get(
888
- '_request_timeout', None
889
- )
890
- kwargs['_check_input_type'] = kwargs.get(
891
- '_check_input_type', True
892
- )
893
- kwargs['_check_return_type'] = kwargs.get(
894
- '_check_return_type', True
895
- )
896
- kwargs['_spec_property_naming'] = kwargs.get(
897
- '_spec_property_naming', False
898
- )
899
- kwargs['_content_type'] = kwargs.get(
900
- '_content_type')
901
- kwargs['_host_index'] = kwargs.get('_host_index')
902
- kwargs['license'] = \
903
- license
904
- return self.update_engine_license_endpoint.call_with_http_info(**kwargs)
1571
+ _request_auth,
1572
+ _content_type,
1573
+ _headers,
1574
+ _host_index,
1575
+ ) -> RequestSerialized:
1576
+
1577
+ _host = None
1578
+
1579
+ _collection_formats: Dict[str, str] = {
1580
+ }
1581
+
1582
+ _path_params: Dict[str, str] = {}
1583
+ _query_params: List[Tuple[str, str]] = []
1584
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1585
+ _form_params: List[Tuple[str, str]] = []
1586
+ _files: Dict[
1587
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1588
+ ] = {}
1589
+ _body_params: Optional[bytes] = None
1590
+
1591
+ # process the path parameters
1592
+ # process the query parameters
1593
+ # process the header parameters
1594
+ # process the form parameters
1595
+ if license is not None:
1596
+ _form_params.append(('license', license))
1597
+ # process the body parameter
1598
+
1599
+
1600
+ # set the HTTP header `Accept`
1601
+ if 'Accept' not in _header_params:
1602
+ _header_params['Accept'] = self.api_client.select_header_accept(
1603
+ [
1604
+ 'application/json'
1605
+ ]
1606
+ )
905
1607
 
1608
+ # set the HTTP header `Content-Type`
1609
+ if _content_type:
1610
+ _header_params['Content-Type'] = _content_type
1611
+ else:
1612
+ _default_content_type = (
1613
+ self.api_client.select_header_content_type(
1614
+ [
1615
+ 'application/x-www-form-urlencoded',
1616
+ 'multipart/form-data'
1617
+ ]
1618
+ )
1619
+ )
1620
+ if _default_content_type is not None:
1621
+ _header_params['Content-Type'] = _default_content_type
1622
+
1623
+ # authentication setting
1624
+ _auth_settings: List[str] = [
1625
+ 'BasicAuth'
1626
+ ]
1627
+
1628
+ return self.api_client.param_serialize(
1629
+ method='PUT',
1630
+ resource_path='/licenses/engine',
1631
+ path_params=_path_params,
1632
+ query_params=_query_params,
1633
+ header_params=_header_params,
1634
+ body=_body_params,
1635
+ post_params=_form_params,
1636
+ files=_files,
1637
+ auth_settings=_auth_settings,
1638
+ collection_formats=_collection_formats,
1639
+ _host=_host,
1640
+ _request_auth=_request_auth
1641
+ )
1642
+
1643
+
1644
+
1645
+
1646
+ @validate_call
906
1647
  def update_license(
1648
+ self,
1649
+ username: StrictStr,
1650
+ license: Annotated[str, Field(strict=True, max_length=1000, description="Base64 encoded License")],
1651
+ _request_timeout: Union[
1652
+ None,
1653
+ Annotated[StrictFloat, Field(gt=0)],
1654
+ Tuple[
1655
+ Annotated[StrictFloat, Field(gt=0)],
1656
+ Annotated[StrictFloat, Field(gt=0)]
1657
+ ]
1658
+ ] = None,
1659
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1660
+ _content_type: Optional[StrictStr] = None,
1661
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1662
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1663
+ ) -> Message:
1664
+ """Associates a license with a user
1665
+
1666
+ Overwrites the user's current license, if any. When inviters receive a license, they pass the license on to the users they have invited. Requires admin role.
1667
+
1668
+ :param username: (required)
1669
+ :type username: str
1670
+ :param license: Base64 encoded License (required)
1671
+ :type license: str
1672
+ :param _request_timeout: timeout setting for this request. If one
1673
+ number provided, it will be total request
1674
+ timeout. It can also be a pair (tuple) of
1675
+ (connection, read) timeouts.
1676
+ :type _request_timeout: int, tuple(int, int), optional
1677
+ :param _request_auth: set to override the auth_settings for an a single
1678
+ request; this effectively ignores the
1679
+ authentication in the spec for a single request.
1680
+ :type _request_auth: dict, optional
1681
+ :param _content_type: force content-type for the request.
1682
+ :type _content_type: str, Optional
1683
+ :param _headers: set to override the headers for a single
1684
+ request; this effectively ignores the headers
1685
+ in the spec for a single request.
1686
+ :type _headers: dict, optional
1687
+ :param _host_index: set to override the host_index for a single
1688
+ request; this effectively ignores the host_index
1689
+ in the spec for a single request.
1690
+ :type _host_index: int, optional
1691
+ :return: Returns the result object.
1692
+ """ # noqa: E501
1693
+
1694
+ _param = self._update_license_serialize(
1695
+ username=username,
1696
+ license=license,
1697
+ _request_auth=_request_auth,
1698
+ _content_type=_content_type,
1699
+ _headers=_headers,
1700
+ _host_index=_host_index
1701
+ )
1702
+
1703
+ _response_types_map: Dict[str, Optional[str]] = {
1704
+ '200': "Message",
1705
+ '400': "Message",
1706
+ '403': "Message",
1707
+ '404': "Message",
1708
+ }
1709
+ response_data = self.api_client.call_api(
1710
+ *_param,
1711
+ _request_timeout=_request_timeout
1712
+ )
1713
+ response_data.read()
1714
+ return self.api_client.response_deserialize(
1715
+ response_data=response_data,
1716
+ response_types_map=_response_types_map,
1717
+ ).data
1718
+
1719
+
1720
+ @validate_call
1721
+ def update_license_with_http_info(
1722
+ self,
1723
+ username: StrictStr,
1724
+ license: Annotated[str, Field(strict=True, max_length=1000, description="Base64 encoded License")],
1725
+ _request_timeout: Union[
1726
+ None,
1727
+ Annotated[StrictFloat, Field(gt=0)],
1728
+ Tuple[
1729
+ Annotated[StrictFloat, Field(gt=0)],
1730
+ Annotated[StrictFloat, Field(gt=0)]
1731
+ ]
1732
+ ] = None,
1733
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1734
+ _content_type: Optional[StrictStr] = None,
1735
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1736
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1737
+ ) -> ApiResponse[Message]:
1738
+ """Associates a license with a user
1739
+
1740
+ Overwrites the user's current license, if any. When inviters receive a license, they pass the license on to the users they have invited. Requires admin role.
1741
+
1742
+ :param username: (required)
1743
+ :type username: str
1744
+ :param license: Base64 encoded License (required)
1745
+ :type license: str
1746
+ :param _request_timeout: timeout setting for this request. If one
1747
+ number provided, it will be total request
1748
+ timeout. It can also be a pair (tuple) of
1749
+ (connection, read) timeouts.
1750
+ :type _request_timeout: int, tuple(int, int), optional
1751
+ :param _request_auth: set to override the auth_settings for an a single
1752
+ request; this effectively ignores the
1753
+ authentication in the spec for a single request.
1754
+ :type _request_auth: dict, optional
1755
+ :param _content_type: force content-type for the request.
1756
+ :type _content_type: str, Optional
1757
+ :param _headers: set to override the headers for a single
1758
+ request; this effectively ignores the headers
1759
+ in the spec for a single request.
1760
+ :type _headers: dict, optional
1761
+ :param _host_index: set to override the host_index for a single
1762
+ request; this effectively ignores the host_index
1763
+ in the spec for a single request.
1764
+ :type _host_index: int, optional
1765
+ :return: Returns the result object.
1766
+ """ # noqa: E501
1767
+
1768
+ _param = self._update_license_serialize(
1769
+ username=username,
1770
+ license=license,
1771
+ _request_auth=_request_auth,
1772
+ _content_type=_content_type,
1773
+ _headers=_headers,
1774
+ _host_index=_host_index
1775
+ )
1776
+
1777
+ _response_types_map: Dict[str, Optional[str]] = {
1778
+ '200': "Message",
1779
+ '400': "Message",
1780
+ '403': "Message",
1781
+ '404': "Message",
1782
+ }
1783
+ response_data = self.api_client.call_api(
1784
+ *_param,
1785
+ _request_timeout=_request_timeout
1786
+ )
1787
+ response_data.read()
1788
+ return self.api_client.response_deserialize(
1789
+ response_data=response_data,
1790
+ response_types_map=_response_types_map,
1791
+ )
1792
+
1793
+
1794
+ @validate_call
1795
+ def update_license_without_preload_content(
1796
+ self,
1797
+ username: StrictStr,
1798
+ license: Annotated[str, Field(strict=True, max_length=1000, description="Base64 encoded License")],
1799
+ _request_timeout: Union[
1800
+ None,
1801
+ Annotated[StrictFloat, Field(gt=0)],
1802
+ Tuple[
1803
+ Annotated[StrictFloat, Field(gt=0)],
1804
+ Annotated[StrictFloat, Field(gt=0)]
1805
+ ]
1806
+ ] = None,
1807
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1808
+ _content_type: Optional[StrictStr] = None,
1809
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1810
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1811
+ ) -> RESTResponseType:
1812
+ """Associates a license with a user
1813
+
1814
+ Overwrites the user's current license, if any. When inviters receive a license, they pass the license on to the users they have invited. Requires admin role.
1815
+
1816
+ :param username: (required)
1817
+ :type username: str
1818
+ :param license: Base64 encoded License (required)
1819
+ :type license: str
1820
+ :param _request_timeout: timeout setting for this request. If one
1821
+ number provided, it will be total request
1822
+ timeout. It can also be a pair (tuple) of
1823
+ (connection, read) timeouts.
1824
+ :type _request_timeout: int, tuple(int, int), optional
1825
+ :param _request_auth: set to override the auth_settings for an a single
1826
+ request; this effectively ignores the
1827
+ authentication in the spec for a single request.
1828
+ :type _request_auth: dict, optional
1829
+ :param _content_type: force content-type for the request.
1830
+ :type _content_type: str, Optional
1831
+ :param _headers: set to override the headers for a single
1832
+ request; this effectively ignores the headers
1833
+ in the spec for a single request.
1834
+ :type _headers: dict, optional
1835
+ :param _host_index: set to override the host_index for a single
1836
+ request; this effectively ignores the host_index
1837
+ in the spec for a single request.
1838
+ :type _host_index: int, optional
1839
+ :return: Returns the result object.
1840
+ """ # noqa: E501
1841
+
1842
+ _param = self._update_license_serialize(
1843
+ username=username,
1844
+ license=license,
1845
+ _request_auth=_request_auth,
1846
+ _content_type=_content_type,
1847
+ _headers=_headers,
1848
+ _host_index=_host_index
1849
+ )
1850
+
1851
+ _response_types_map: Dict[str, Optional[str]] = {
1852
+ '200': "Message",
1853
+ '400': "Message",
1854
+ '403': "Message",
1855
+ '404': "Message",
1856
+ }
1857
+ response_data = self.api_client.call_api(
1858
+ *_param,
1859
+ _request_timeout=_request_timeout
1860
+ )
1861
+ return response_data.response
1862
+
1863
+
1864
+ def _update_license_serialize(
907
1865
  self,
908
1866
  username,
909
1867
  license,
910
- **kwargs
911
- ):
912
- """Associates a license with a user # noqa: E501
913
-
914
- Overwrites the user's current license, if any. When inviters receive a license, they pass the license on to the users they have invited. Requires admin role. # noqa: E501
915
- This method makes a synchronous HTTP request by default. To make an
916
- asynchronous HTTP request, please pass async_req=True
917
-
918
- >>> thread = api.update_license(username, license, async_req=True)
919
- >>> result = thread.get()
920
-
921
- Args:
922
- username (str):
923
- license (str): Base64 encoded License
924
-
925
- Keyword Args:
926
- _return_http_data_only (bool): response data without head status
927
- code and headers. Default is True.
928
- _preload_content (bool): if False, the urllib3.HTTPResponse object
929
- will be returned without reading/decoding response data.
930
- Default is True.
931
- _request_timeout (int/float/tuple): timeout setting for this request. If
932
- one number provided, it will be total request timeout. It can also
933
- be a pair (tuple) of (connection, read) timeouts.
934
- Default is None.
935
- _check_input_type (bool): specifies if type checking
936
- should be done one the data sent to the server.
937
- Default is True.
938
- _check_return_type (bool): specifies if type checking
939
- should be done one the data received from the server.
940
- Default is True.
941
- _spec_property_naming (bool): True if the variable names in the input data
942
- are serialized names, as specified in the OpenAPI document.
943
- False if the variable names in the input data
944
- are pythonic names, e.g. snake case (default)
945
- _content_type (str/None): force body content-type.
946
- Default is None and content-type will be predicted by allowed
947
- content-types and body.
948
- _host_index (int/None): specifies the index of the server
949
- that we want to use.
950
- Default is read from the configuration.
951
- async_req (bool): execute request asynchronously
952
-
953
- Returns:
954
- Message
955
- If the method is called asynchronously, returns the request
956
- thread.
957
- """
958
- kwargs['async_req'] = kwargs.get(
959
- 'async_req', False
960
- )
961
- kwargs['_return_http_data_only'] = kwargs.get(
962
- '_return_http_data_only', True
963
- )
964
- kwargs['_preload_content'] = kwargs.get(
965
- '_preload_content', True
966
- )
967
- kwargs['_request_timeout'] = kwargs.get(
968
- '_request_timeout', None
969
- )
970
- kwargs['_check_input_type'] = kwargs.get(
971
- '_check_input_type', True
972
- )
973
- kwargs['_check_return_type'] = kwargs.get(
974
- '_check_return_type', True
975
- )
976
- kwargs['_spec_property_naming'] = kwargs.get(
977
- '_spec_property_naming', False
978
- )
979
- kwargs['_content_type'] = kwargs.get(
980
- '_content_type')
981
- kwargs['_host_index'] = kwargs.get('_host_index')
982
- kwargs['username'] = \
983
- username
984
- kwargs['license'] = \
985
- license
986
- return self.update_license_endpoint.call_with_http_info(**kwargs)
1868
+ _request_auth,
1869
+ _content_type,
1870
+ _headers,
1871
+ _host_index,
1872
+ ) -> RequestSerialized:
1873
+
1874
+ _host = None
987
1875
 
1876
+ _collection_formats: Dict[str, str] = {
1877
+ }
1878
+
1879
+ _path_params: Dict[str, str] = {}
1880
+ _query_params: List[Tuple[str, str]] = []
1881
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1882
+ _form_params: List[Tuple[str, str]] = []
1883
+ _files: Dict[
1884
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1885
+ ] = {}
1886
+ _body_params: Optional[bytes] = None
1887
+
1888
+ # process the path parameters
1889
+ # process the query parameters
1890
+ # process the header parameters
1891
+ # process the form parameters
1892
+ if username is not None:
1893
+ _form_params.append(('username', username))
1894
+ if license is not None:
1895
+ _form_params.append(('license', license))
1896
+ # process the body parameter
1897
+
1898
+
1899
+ # set the HTTP header `Accept`
1900
+ if 'Accept' not in _header_params:
1901
+ _header_params['Accept'] = self.api_client.select_header_accept(
1902
+ [
1903
+ 'application/json'
1904
+ ]
1905
+ )
1906
+
1907
+ # set the HTTP header `Content-Type`
1908
+ if _content_type:
1909
+ _header_params['Content-Type'] = _content_type
1910
+ else:
1911
+ _default_content_type = (
1912
+ self.api_client.select_header_content_type(
1913
+ [
1914
+ 'application/x-www-form-urlencoded',
1915
+ 'multipart/form-data'
1916
+ ]
1917
+ )
1918
+ )
1919
+ if _default_content_type is not None:
1920
+ _header_params['Content-Type'] = _default_content_type
1921
+
1922
+ # authentication setting
1923
+ _auth_settings: List[str] = [
1924
+ 'BasicAuth'
1925
+ ]
1926
+
1927
+ return self.api_client.param_serialize(
1928
+ method='PUT',
1929
+ resource_path='/licenses/',
1930
+ path_params=_path_params,
1931
+ query_params=_query_params,
1932
+ header_params=_header_params,
1933
+ body=_body_params,
1934
+ post_params=_form_params,
1935
+ files=_files,
1936
+ auth_settings=_auth_settings,
1937
+ collection_formats=_collection_formats,
1938
+ _host=_host,
1939
+ _request_auth=_request_auth
1940
+ )
1941
+
1942
+
1943
+
1944
+
1945
+ @validate_call
988
1946
  def update_system_wide_gams_license(
1947
+ self,
1948
+ license: Annotated[str, Field(strict=True, max_length=1000, description="Base64 encoded system-wide GAMS License")],
1949
+ _request_timeout: Union[
1950
+ None,
1951
+ Annotated[StrictFloat, Field(gt=0)],
1952
+ Tuple[
1953
+ Annotated[StrictFloat, Field(gt=0)],
1954
+ Annotated[StrictFloat, Field(gt=0)]
1955
+ ]
1956
+ ] = None,
1957
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1958
+ _content_type: Optional[StrictStr] = None,
1959
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1960
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1961
+ ) -> Message:
1962
+ """Updates the system-wide GAMS license (only admins)
1963
+
1964
+
1965
+ :param license: Base64 encoded system-wide GAMS License (required)
1966
+ :type license: str
1967
+ :param _request_timeout: timeout setting for this request. If one
1968
+ number provided, it will be total request
1969
+ timeout. It can also be a pair (tuple) of
1970
+ (connection, read) timeouts.
1971
+ :type _request_timeout: int, tuple(int, int), optional
1972
+ :param _request_auth: set to override the auth_settings for an a single
1973
+ request; this effectively ignores the
1974
+ authentication in the spec for a single request.
1975
+ :type _request_auth: dict, optional
1976
+ :param _content_type: force content-type for the request.
1977
+ :type _content_type: str, Optional
1978
+ :param _headers: set to override the headers for a single
1979
+ request; this effectively ignores the headers
1980
+ in the spec for a single request.
1981
+ :type _headers: dict, optional
1982
+ :param _host_index: set to override the host_index for a single
1983
+ request; this effectively ignores the host_index
1984
+ in the spec for a single request.
1985
+ :type _host_index: int, optional
1986
+ :return: Returns the result object.
1987
+ """ # noqa: E501
1988
+
1989
+ _param = self._update_system_wide_gams_license_serialize(
1990
+ license=license,
1991
+ _request_auth=_request_auth,
1992
+ _content_type=_content_type,
1993
+ _headers=_headers,
1994
+ _host_index=_host_index
1995
+ )
1996
+
1997
+ _response_types_map: Dict[str, Optional[str]] = {
1998
+ '200': "Message",
1999
+ '400': "Message",
2000
+ '403': "Message",
2001
+ }
2002
+ response_data = self.api_client.call_api(
2003
+ *_param,
2004
+ _request_timeout=_request_timeout
2005
+ )
2006
+ response_data.read()
2007
+ return self.api_client.response_deserialize(
2008
+ response_data=response_data,
2009
+ response_types_map=_response_types_map,
2010
+ ).data
2011
+
2012
+
2013
+ @validate_call
2014
+ def update_system_wide_gams_license_with_http_info(
2015
+ self,
2016
+ license: Annotated[str, Field(strict=True, max_length=1000, description="Base64 encoded system-wide GAMS License")],
2017
+ _request_timeout: Union[
2018
+ None,
2019
+ Annotated[StrictFloat, Field(gt=0)],
2020
+ Tuple[
2021
+ Annotated[StrictFloat, Field(gt=0)],
2022
+ Annotated[StrictFloat, Field(gt=0)]
2023
+ ]
2024
+ ] = None,
2025
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2026
+ _content_type: Optional[StrictStr] = None,
2027
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2028
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2029
+ ) -> ApiResponse[Message]:
2030
+ """Updates the system-wide GAMS license (only admins)
2031
+
2032
+
2033
+ :param license: Base64 encoded system-wide GAMS License (required)
2034
+ :type license: str
2035
+ :param _request_timeout: timeout setting for this request. If one
2036
+ number provided, it will be total request
2037
+ timeout. It can also be a pair (tuple) of
2038
+ (connection, read) timeouts.
2039
+ :type _request_timeout: int, tuple(int, int), optional
2040
+ :param _request_auth: set to override the auth_settings for an a single
2041
+ request; this effectively ignores the
2042
+ authentication in the spec for a single request.
2043
+ :type _request_auth: dict, optional
2044
+ :param _content_type: force content-type for the request.
2045
+ :type _content_type: str, Optional
2046
+ :param _headers: set to override the headers for a single
2047
+ request; this effectively ignores the headers
2048
+ in the spec for a single request.
2049
+ :type _headers: dict, optional
2050
+ :param _host_index: set to override the host_index for a single
2051
+ request; this effectively ignores the host_index
2052
+ in the spec for a single request.
2053
+ :type _host_index: int, optional
2054
+ :return: Returns the result object.
2055
+ """ # noqa: E501
2056
+
2057
+ _param = self._update_system_wide_gams_license_serialize(
2058
+ license=license,
2059
+ _request_auth=_request_auth,
2060
+ _content_type=_content_type,
2061
+ _headers=_headers,
2062
+ _host_index=_host_index
2063
+ )
2064
+
2065
+ _response_types_map: Dict[str, Optional[str]] = {
2066
+ '200': "Message",
2067
+ '400': "Message",
2068
+ '403': "Message",
2069
+ }
2070
+ response_data = self.api_client.call_api(
2071
+ *_param,
2072
+ _request_timeout=_request_timeout
2073
+ )
2074
+ response_data.read()
2075
+ return self.api_client.response_deserialize(
2076
+ response_data=response_data,
2077
+ response_types_map=_response_types_map,
2078
+ )
2079
+
2080
+
2081
+ @validate_call
2082
+ def update_system_wide_gams_license_without_preload_content(
2083
+ self,
2084
+ license: Annotated[str, Field(strict=True, max_length=1000, description="Base64 encoded system-wide GAMS License")],
2085
+ _request_timeout: Union[
2086
+ None,
2087
+ Annotated[StrictFloat, Field(gt=0)],
2088
+ Tuple[
2089
+ Annotated[StrictFloat, Field(gt=0)],
2090
+ Annotated[StrictFloat, Field(gt=0)]
2091
+ ]
2092
+ ] = None,
2093
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2094
+ _content_type: Optional[StrictStr] = None,
2095
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2096
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2097
+ ) -> RESTResponseType:
2098
+ """Updates the system-wide GAMS license (only admins)
2099
+
2100
+
2101
+ :param license: Base64 encoded system-wide GAMS License (required)
2102
+ :type license: str
2103
+ :param _request_timeout: timeout setting for this request. If one
2104
+ number provided, it will be total request
2105
+ timeout. It can also be a pair (tuple) of
2106
+ (connection, read) timeouts.
2107
+ :type _request_timeout: int, tuple(int, int), optional
2108
+ :param _request_auth: set to override the auth_settings for an a single
2109
+ request; this effectively ignores the
2110
+ authentication in the spec for a single request.
2111
+ :type _request_auth: dict, optional
2112
+ :param _content_type: force content-type for the request.
2113
+ :type _content_type: str, Optional
2114
+ :param _headers: set to override the headers for a single
2115
+ request; this effectively ignores the headers
2116
+ in the spec for a single request.
2117
+ :type _headers: dict, optional
2118
+ :param _host_index: set to override the host_index for a single
2119
+ request; this effectively ignores the host_index
2120
+ in the spec for a single request.
2121
+ :type _host_index: int, optional
2122
+ :return: Returns the result object.
2123
+ """ # noqa: E501
2124
+
2125
+ _param = self._update_system_wide_gams_license_serialize(
2126
+ license=license,
2127
+ _request_auth=_request_auth,
2128
+ _content_type=_content_type,
2129
+ _headers=_headers,
2130
+ _host_index=_host_index
2131
+ )
2132
+
2133
+ _response_types_map: Dict[str, Optional[str]] = {
2134
+ '200': "Message",
2135
+ '400': "Message",
2136
+ '403': "Message",
2137
+ }
2138
+ response_data = self.api_client.call_api(
2139
+ *_param,
2140
+ _request_timeout=_request_timeout
2141
+ )
2142
+ return response_data.response
2143
+
2144
+
2145
+ def _update_system_wide_gams_license_serialize(
989
2146
  self,
990
2147
  license,
991
- **kwargs
992
- ):
993
- """Updates the system-wide GAMS license (only admins) # noqa: E501
994
-
995
- This method makes a synchronous HTTP request by default. To make an
996
- asynchronous HTTP request, please pass async_req=True
997
-
998
- >>> thread = api.update_system_wide_gams_license(license, async_req=True)
999
- >>> result = thread.get()
1000
-
1001
- Args:
1002
- license (str): Base64 encoded system-wide GAMS License
1003
-
1004
- Keyword Args:
1005
- _return_http_data_only (bool): response data without head status
1006
- code and headers. Default is True.
1007
- _preload_content (bool): if False, the urllib3.HTTPResponse object
1008
- will be returned without reading/decoding response data.
1009
- Default is True.
1010
- _request_timeout (int/float/tuple): timeout setting for this request. If
1011
- one number provided, it will be total request timeout. It can also
1012
- be a pair (tuple) of (connection, read) timeouts.
1013
- Default is None.
1014
- _check_input_type (bool): specifies if type checking
1015
- should be done one the data sent to the server.
1016
- Default is True.
1017
- _check_return_type (bool): specifies if type checking
1018
- should be done one the data received from the server.
1019
- Default is True.
1020
- _spec_property_naming (bool): True if the variable names in the input data
1021
- are serialized names, as specified in the OpenAPI document.
1022
- False if the variable names in the input data
1023
- are pythonic names, e.g. snake case (default)
1024
- _content_type (str/None): force body content-type.
1025
- Default is None and content-type will be predicted by allowed
1026
- content-types and body.
1027
- _host_index (int/None): specifies the index of the server
1028
- that we want to use.
1029
- Default is read from the configuration.
1030
- async_req (bool): execute request asynchronously
1031
-
1032
- Returns:
1033
- Message
1034
- If the method is called asynchronously, returns the request
1035
- thread.
1036
- """
1037
- kwargs['async_req'] = kwargs.get(
1038
- 'async_req', False
1039
- )
1040
- kwargs['_return_http_data_only'] = kwargs.get(
1041
- '_return_http_data_only', True
1042
- )
1043
- kwargs['_preload_content'] = kwargs.get(
1044
- '_preload_content', True
1045
- )
1046
- kwargs['_request_timeout'] = kwargs.get(
1047
- '_request_timeout', None
1048
- )
1049
- kwargs['_check_input_type'] = kwargs.get(
1050
- '_check_input_type', True
1051
- )
1052
- kwargs['_check_return_type'] = kwargs.get(
1053
- '_check_return_type', True
1054
- )
1055
- kwargs['_spec_property_naming'] = kwargs.get(
1056
- '_spec_property_naming', False
1057
- )
1058
- kwargs['_content_type'] = kwargs.get(
1059
- '_content_type')
1060
- kwargs['_host_index'] = kwargs.get('_host_index')
1061
- kwargs['license'] = \
1062
- license
1063
- return self.update_system_wide_gams_license_endpoint.call_with_http_info(**kwargs)
2148
+ _request_auth,
2149
+ _content_type,
2150
+ _headers,
2151
+ _host_index,
2152
+ ) -> RequestSerialized:
2153
+
2154
+ _host = None
2155
+
2156
+ _collection_formats: Dict[str, str] = {
2157
+ }
2158
+
2159
+ _path_params: Dict[str, str] = {}
2160
+ _query_params: List[Tuple[str, str]] = []
2161
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2162
+ _form_params: List[Tuple[str, str]] = []
2163
+ _files: Dict[
2164
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2165
+ ] = {}
2166
+ _body_params: Optional[bytes] = None
2167
+
2168
+ # process the path parameters
2169
+ # process the query parameters
2170
+ # process the header parameters
2171
+ # process the form parameters
2172
+ if license is not None:
2173
+ _form_params.append(('license', license))
2174
+ # process the body parameter
2175
+
2176
+
2177
+ # set the HTTP header `Accept`
2178
+ if 'Accept' not in _header_params:
2179
+ _header_params['Accept'] = self.api_client.select_header_accept(
2180
+ [
2181
+ 'application/json'
2182
+ ]
2183
+ )
2184
+
2185
+ # set the HTTP header `Content-Type`
2186
+ if _content_type:
2187
+ _header_params['Content-Type'] = _content_type
2188
+ else:
2189
+ _default_content_type = (
2190
+ self.api_client.select_header_content_type(
2191
+ [
2192
+ 'application/x-www-form-urlencoded',
2193
+ 'multipart/form-data'
2194
+ ]
2195
+ )
2196
+ )
2197
+ if _default_content_type is not None:
2198
+ _header_params['Content-Type'] = _default_content_type
2199
+
2200
+ # authentication setting
2201
+ _auth_settings: List[str] = [
2202
+ 'BasicAuth'
2203
+ ]
2204
+
2205
+ return self.api_client.param_serialize(
2206
+ method='PUT',
2207
+ resource_path='/licenses/system-wide',
2208
+ path_params=_path_params,
2209
+ query_params=_query_params,
2210
+ header_params=_header_params,
2211
+ body=_body_params,
2212
+ post_params=_form_params,
2213
+ files=_files,
2214
+ auth_settings=_auth_settings,
2215
+ collection_formats=_collection_formats,
2216
+ _host=_host,
2217
+ _request_auth=_request_auth
2218
+ )
2219
+
1064
2220