gamsapi 52.5.0__cp312-cp312-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.
- gams/__init__.py +27 -0
- gams/_version.py +1 -0
- gams/connect/__init__.py +28 -0
- gams/connect/agents/__init__.py +24 -0
- gams/connect/agents/_excel/__init__.py +32 -0
- gams/connect/agents/_excel/excelagent.py +312 -0
- gams/connect/agents/_excel/workbook.py +155 -0
- gams/connect/agents/_sqlconnectors/__init__.py +42 -0
- gams/connect/agents/_sqlconnectors/_accesshandler.py +211 -0
- gams/connect/agents/_sqlconnectors/_databasehandler.py +250 -0
- gams/connect/agents/_sqlconnectors/_mysqlhandler.py +168 -0
- gams/connect/agents/_sqlconnectors/_postgreshandler.py +131 -0
- gams/connect/agents/_sqlconnectors/_pyodbchandler.py +112 -0
- gams/connect/agents/_sqlconnectors/_sqlalchemyhandler.py +74 -0
- gams/connect/agents/_sqlconnectors/_sqlitehandler.py +262 -0
- gams/connect/agents/_sqlconnectors/_sqlserverhandler.py +179 -0
- gams/connect/agents/concatenate.py +440 -0
- gams/connect/agents/connectagent.py +743 -0
- gams/connect/agents/csvreader.py +675 -0
- gams/connect/agents/csvwriter.py +151 -0
- gams/connect/agents/domainwriter.py +143 -0
- gams/connect/agents/excelreader.py +756 -0
- gams/connect/agents/excelwriter.py +467 -0
- gams/connect/agents/filter.py +223 -0
- gams/connect/agents/gamsreader.py +112 -0
- gams/connect/agents/gamswriter.py +239 -0
- gams/connect/agents/gdxreader.py +109 -0
- gams/connect/agents/gdxwriter.py +146 -0
- gams/connect/agents/labelmanipulator.py +303 -0
- gams/connect/agents/projection.py +539 -0
- gams/connect/agents/pythoncode.py +71 -0
- gams/connect/agents/rawcsvreader.py +248 -0
- gams/connect/agents/rawexcelreader.py +312 -0
- gams/connect/agents/schema/CSVReader.yaml +92 -0
- gams/connect/agents/schema/CSVWriter.yaml +44 -0
- gams/connect/agents/schema/Concatenate.yaml +52 -0
- gams/connect/agents/schema/DomainWriter.yaml +25 -0
- gams/connect/agents/schema/ExcelReader.yaml +121 -0
- gams/connect/agents/schema/ExcelWriter.yaml +78 -0
- gams/connect/agents/schema/Filter.yaml +74 -0
- gams/connect/agents/schema/GAMSReader.yaml +20 -0
- gams/connect/agents/schema/GAMSWriter.yaml +47 -0
- gams/connect/agents/schema/GDXReader.yaml +23 -0
- gams/connect/agents/schema/GDXWriter.yaml +32 -0
- gams/connect/agents/schema/LabelManipulator.yaml +99 -0
- gams/connect/agents/schema/Projection.yaml +24 -0
- gams/connect/agents/schema/PythonCode.yaml +6 -0
- gams/connect/agents/schema/RawCSVReader.yaml +34 -0
- gams/connect/agents/schema/RawExcelReader.yaml +42 -0
- gams/connect/agents/schema/SQLReader.yaml +75 -0
- gams/connect/agents/schema/SQLWriter.yaml +103 -0
- gams/connect/agents/sqlreader.py +301 -0
- gams/connect/agents/sqlwriter.py +276 -0
- gams/connect/connectdatabase.py +275 -0
- gams/connect/connectvalidator.py +93 -0
- gams/connect/errors.py +34 -0
- gams/control/__init__.py +136 -0
- gams/control/database.py +2231 -0
- gams/control/execution.py +1900 -0
- gams/control/options.py +2792 -0
- gams/control/workspace.py +1198 -0
- gams/core/__init__.py +24 -0
- gams/core/cfg/__init__.py +26 -0
- gams/core/cfg/_cfgmcc.cp312-win_amd64.pyd +0 -0
- gams/core/cfg/cfgmcc.py +519 -0
- gams/core/dct/__init__.py +26 -0
- gams/core/dct/_dctmcc.cp312-win_amd64.pyd +0 -0
- gams/core/dct/dctmcc.py +574 -0
- gams/core/embedded/__init__.py +26 -0
- gams/core/embedded/gamsemb.py +1024 -0
- gams/core/emp/__init__.py +24 -0
- gams/core/emp/emplexer.py +89 -0
- gams/core/emp/empyacc.py +281 -0
- gams/core/gdx/__init__.py +26 -0
- gams/core/gdx/_gdxcc.cp312-win_amd64.pyd +0 -0
- gams/core/gdx/gdxcc.py +866 -0
- gams/core/gev/__init__.py +26 -0
- gams/core/gev/_gevmcc.cp312-win_amd64.pyd +0 -0
- gams/core/gev/gevmcc.py +855 -0
- gams/core/gmd/__init__.py +26 -0
- gams/core/gmd/_gmdcc.cp312-win_amd64.pyd +0 -0
- gams/core/gmd/gmdcc.py +917 -0
- gams/core/gmo/__init__.py +26 -0
- gams/core/gmo/_gmomcc.cp312-win_amd64.pyd +0 -0
- gams/core/gmo/gmomcc.py +2046 -0
- gams/core/idx/__init__.py +26 -0
- gams/core/idx/_idxcc.cp312-win_amd64.pyd +0 -0
- gams/core/idx/idxcc.py +510 -0
- gams/core/numpy/__init__.py +29 -0
- gams/core/numpy/_gams2numpy.cp312-win_amd64.pyd +0 -0
- gams/core/numpy/gams2numpy.py +1048 -0
- gams/core/opt/__init__.py +26 -0
- gams/core/opt/_optcc.cp312-win_amd64.pyd +0 -0
- gams/core/opt/optcc.py +840 -0
- gams/engine/__init__.py +204 -0
- gams/engine/api/__init__.py +13 -0
- gams/engine/api/auth_api.py +7653 -0
- gams/engine/api/cleanup_api.py +751 -0
- gams/engine/api/default_api.py +887 -0
- gams/engine/api/hypercube_api.py +2629 -0
- gams/engine/api/jobs_api.py +5229 -0
- gams/engine/api/licenses_api.py +2220 -0
- gams/engine/api/namespaces_api.py +7783 -0
- gams/engine/api/usage_api.py +5627 -0
- gams/engine/api/users_api.py +5931 -0
- gams/engine/api_client.py +804 -0
- gams/engine/api_response.py +21 -0
- gams/engine/configuration.py +601 -0
- gams/engine/exceptions.py +216 -0
- gams/engine/models/__init__.py +86 -0
- gams/engine/models/bad_input.py +89 -0
- gams/engine/models/cleanable_job_result.py +104 -0
- gams/engine/models/cleanable_job_result_page.py +113 -0
- gams/engine/models/engine_license.py +107 -0
- gams/engine/models/files_not_found.py +93 -0
- gams/engine/models/forwarded_token_response.py +112 -0
- gams/engine/models/generic_key_value_pair.py +89 -0
- gams/engine/models/hypercube.py +160 -0
- gams/engine/models/hypercube_page.py +111 -0
- gams/engine/models/hypercube_summary.py +91 -0
- gams/engine/models/hypercube_token.py +97 -0
- gams/engine/models/identity_provider.py +107 -0
- gams/engine/models/identity_provider_ldap.py +121 -0
- gams/engine/models/identity_provider_oauth2.py +146 -0
- gams/engine/models/identity_provider_oauth2_scope.py +89 -0
- gams/engine/models/identity_provider_oauth2_with_secret.py +152 -0
- gams/engine/models/identity_provider_oidc.py +133 -0
- gams/engine/models/identity_provider_oidc_with_secret.py +143 -0
- gams/engine/models/inex.py +91 -0
- gams/engine/models/invitation.py +136 -0
- gams/engine/models/invitation_quota.py +106 -0
- gams/engine/models/invitation_token.py +87 -0
- gams/engine/models/job.py +165 -0
- gams/engine/models/job_no_text_entry.py +138 -0
- gams/engine/models/job_no_text_entry_page.py +111 -0
- gams/engine/models/license.py +91 -0
- gams/engine/models/log_piece.py +96 -0
- gams/engine/models/message.py +87 -0
- gams/engine/models/message_and_token.py +99 -0
- gams/engine/models/message_with_webhook_id.py +89 -0
- gams/engine/models/model_auth_token.py +87 -0
- gams/engine/models/model_configuration.py +125 -0
- gams/engine/models/model_default_instance.py +99 -0
- gams/engine/models/model_default_user_instance.py +98 -0
- gams/engine/models/model_hypercube_job.py +106 -0
- gams/engine/models/model_hypercube_usage.py +130 -0
- gams/engine/models/model_instance_info.py +116 -0
- gams/engine/models/model_instance_info_full.py +123 -0
- gams/engine/models/model_instance_pool_info.py +112 -0
- gams/engine/models/model_job_labels.py +179 -0
- gams/engine/models/model_job_usage.py +133 -0
- gams/engine/models/model_pool_usage.py +124 -0
- gams/engine/models/model_usage.py +115 -0
- gams/engine/models/model_user.py +96 -0
- gams/engine/models/model_userinstance_info.py +119 -0
- gams/engine/models/model_userinstancepool_info.py +95 -0
- gams/engine/models/model_version.py +91 -0
- gams/engine/models/models.py +120 -0
- gams/engine/models/namespace.py +104 -0
- gams/engine/models/namespace_quota.py +96 -0
- gams/engine/models/namespace_with_permission.py +96 -0
- gams/engine/models/not_found.py +91 -0
- gams/engine/models/password_policy.py +97 -0
- gams/engine/models/perm_and_username.py +89 -0
- gams/engine/models/quota.py +117 -0
- gams/engine/models/quota_exceeded.py +97 -0
- gams/engine/models/status_code_meaning.py +89 -0
- gams/engine/models/stream_entry.py +89 -0
- gams/engine/models/system_wide_license.py +92 -0
- gams/engine/models/text_entries.py +87 -0
- gams/engine/models/text_entry.py +101 -0
- gams/engine/models/time_span.py +95 -0
- gams/engine/models/time_span_pool_worker.py +99 -0
- gams/engine/models/token_forward_error.py +87 -0
- gams/engine/models/user.py +127 -0
- gams/engine/models/user_group_member.py +96 -0
- gams/engine/models/user_groups.py +108 -0
- gams/engine/models/vapid_info.py +87 -0
- gams/engine/models/webhook.py +138 -0
- gams/engine/models/webhook_parameterized_event.py +99 -0
- gams/engine/py.typed +0 -0
- gams/engine/rest.py +258 -0
- gams/magic/__init__.py +32 -0
- gams/magic/gams_magic.py +142 -0
- gams/magic/interactive.py +402 -0
- gams/tools/__init__.py +30 -0
- gams/tools/errors.py +34 -0
- gams/tools/toolcollection/__init__.py +24 -0
- gams/tools/toolcollection/alg/__init__.py +24 -0
- gams/tools/toolcollection/alg/rank.py +51 -0
- gams/tools/toolcollection/data/__init__.py +24 -0
- gams/tools/toolcollection/data/csvread.py +444 -0
- gams/tools/toolcollection/data/csvwrite.py +311 -0
- gams/tools/toolcollection/data/exceldump.py +47 -0
- gams/tools/toolcollection/data/sqlitewrite.py +276 -0
- gams/tools/toolcollection/gdxservice/__init__.py +24 -0
- gams/tools/toolcollection/gdxservice/gdxencoding.py +104 -0
- gams/tools/toolcollection/gdxservice/gdxrename.py +94 -0
- gams/tools/toolcollection/linalg/__init__.py +24 -0
- gams/tools/toolcollection/linalg/cholesky.py +57 -0
- gams/tools/toolcollection/linalg/eigenvalue.py +56 -0
- gams/tools/toolcollection/linalg/eigenvector.py +58 -0
- gams/tools/toolcollection/linalg/invert.py +55 -0
- gams/tools/toolcollection/linalg/ols.py +138 -0
- gams/tools/toolcollection/tooltemplate.py +321 -0
- gams/tools/toolcollection/win32/__init__.py +24 -0
- gams/tools/toolcollection/win32/excelmerge.py +93 -0
- gams/tools/toolcollection/win32/exceltalk.py +76 -0
- gams/tools/toolcollection/win32/msappavail.py +49 -0
- gams/tools/toolcollection/win32/shellexecute.py +54 -0
- gams/tools/tools.py +116 -0
- gams/transfer/__init__.py +35 -0
- gams/transfer/_abcs/__init__.py +37 -0
- gams/transfer/_abcs/container_abcs.py +433 -0
- gams/transfer/_internals/__init__.py +63 -0
- gams/transfer/_internals/algorithms.py +436 -0
- gams/transfer/_internals/casepreservingdict.py +124 -0
- gams/transfer/_internals/constants.py +270 -0
- gams/transfer/_internals/domainviolation.py +103 -0
- gams/transfer/_internals/specialvalues.py +172 -0
- gams/transfer/containers/__init__.py +26 -0
- gams/transfer/containers/_container.py +1794 -0
- gams/transfer/containers/_io/__init__.py +28 -0
- gams/transfer/containers/_io/containers.py +164 -0
- gams/transfer/containers/_io/gdx.py +1029 -0
- gams/transfer/containers/_io/gmd.py +872 -0
- gams/transfer/containers/_mixins/__init__.py +26 -0
- gams/transfer/containers/_mixins/ccc.py +1274 -0
- gams/transfer/syms/__init__.py +33 -0
- gams/transfer/syms/_methods/__init__.py +24 -0
- gams/transfer/syms/_methods/tables.py +120 -0
- gams/transfer/syms/_methods/toDict.py +115 -0
- gams/transfer/syms/_methods/toList.py +83 -0
- gams/transfer/syms/_methods/toValue.py +60 -0
- gams/transfer/syms/_mixins/__init__.py +32 -0
- gams/transfer/syms/_mixins/equals.py +626 -0
- gams/transfer/syms/_mixins/generateRecords.py +499 -0
- gams/transfer/syms/_mixins/pivot.py +313 -0
- gams/transfer/syms/_mixins/pve.py +627 -0
- gams/transfer/syms/_mixins/sa.py +27 -0
- gams/transfer/syms/_mixins/sapve.py +27 -0
- gams/transfer/syms/_mixins/saua.py +27 -0
- gams/transfer/syms/_mixins/sauapve.py +199 -0
- gams/transfer/syms/_mixins/spve.py +1528 -0
- gams/transfer/syms/_mixins/ve.py +936 -0
- gams/transfer/syms/container_syms/__init__.py +31 -0
- gams/transfer/syms/container_syms/_alias.py +984 -0
- gams/transfer/syms/container_syms/_equation.py +333 -0
- gams/transfer/syms/container_syms/_parameter.py +973 -0
- gams/transfer/syms/container_syms/_set.py +604 -0
- gams/transfer/syms/container_syms/_universe_alias.py +461 -0
- gams/transfer/syms/container_syms/_variable.py +321 -0
- gamsapi-52.5.0.dist-info/METADATA +150 -0
- gamsapi-52.5.0.dist-info/RECORD +257 -0
- gamsapi-52.5.0.dist-info/WHEEL +5 -0
- gamsapi-52.5.0.dist-info/licenses/LICENSE +22 -0
- gamsapi-52.5.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2220 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
GAMS Engine
|
|
5
|
+
|
|
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.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: latest
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
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
|
|
18
|
+
|
|
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
|
|
26
|
+
|
|
27
|
+
from gams.engine.api_client import ApiClient, RequestSerialized
|
|
28
|
+
from gams.engine.api_response import ApiResponse
|
|
29
|
+
from gams.engine.rest import RESTResponseType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class LicensesApi:
|
|
33
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
34
|
+
Ref: https://openapi-generator.tech
|
|
35
|
+
|
|
36
|
+
Do not edit the class manually.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, api_client=None) -> None:
|
|
40
|
+
if api_client is None:
|
|
41
|
+
api_client = ApiClient.get_default()
|
|
42
|
+
self.api_client = api_client
|
|
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
|
+
[
|
|
289
|
+
'application/json'
|
|
290
|
+
]
|
|
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
|
+
[
|
|
538
|
+
'application/json'
|
|
539
|
+
]
|
|
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
|
+
[
|
|
787
|
+
'application/json'
|
|
788
|
+
]
|
|
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
|
|
810
|
+
)
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
@validate_call
|
|
816
|
+
def get_license(
|
|
817
|
+
self,
|
|
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
|
|
835
|
+
|
|
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(
|
|
894
|
+
self,
|
|
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
|
|
912
|
+
|
|
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(
|
|
971
|
+
self,
|
|
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
|
|
989
|
+
|
|
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(
|
|
1043
|
+
self,
|
|
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
|
|
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
|
|
1117
|
+
def get_system_wide_gams_license(
|
|
1118
|
+
self,
|
|
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
|
|
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
|
|
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(
|
|
1569
|
+
self,
|
|
1570
|
+
license,
|
|
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
|
+
)
|
|
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
|
|
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(
|
|
1865
|
+
self,
|
|
1866
|
+
username,
|
|
1867
|
+
license,
|
|
1868
|
+
_request_auth,
|
|
1869
|
+
_content_type,
|
|
1870
|
+
_headers,
|
|
1871
|
+
_host_index,
|
|
1872
|
+
) -> RequestSerialized:
|
|
1873
|
+
|
|
1874
|
+
_host = None
|
|
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
|
|
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(
|
|
2146
|
+
self,
|
|
2147
|
+
license,
|
|
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
|
+
|
|
2220
|
+
|