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,887 @@
|
|
|
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, StrictStr, field_validator
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from gams.engine.models.message import Message
|
|
23
|
+
from gams.engine.models.model_configuration import ModelConfiguration
|
|
24
|
+
from gams.engine.models.model_version import ModelVersion
|
|
25
|
+
|
|
26
|
+
from gams.engine.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from gams.engine.api_response import ApiResponse
|
|
28
|
+
from gams.engine.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class DefaultApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
def get_configuration(
|
|
46
|
+
self,
|
|
47
|
+
_request_timeout: Union[
|
|
48
|
+
None,
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Tuple[
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
|
+
) -> ModelConfiguration:
|
|
60
|
+
"""Returns current configuration
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
64
|
+
number provided, it will be total request
|
|
65
|
+
timeout. It can also be a pair (tuple) of
|
|
66
|
+
(connection, read) timeouts.
|
|
67
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
68
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
69
|
+
request; this effectively ignores the
|
|
70
|
+
authentication in the spec for a single request.
|
|
71
|
+
:type _request_auth: dict, optional
|
|
72
|
+
:param _content_type: force content-type for the request.
|
|
73
|
+
:type _content_type: str, Optional
|
|
74
|
+
:param _headers: set to override the headers for a single
|
|
75
|
+
request; this effectively ignores the headers
|
|
76
|
+
in the spec for a single request.
|
|
77
|
+
:type _headers: dict, optional
|
|
78
|
+
:param _host_index: set to override the host_index for a single
|
|
79
|
+
request; this effectively ignores the host_index
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _host_index: int, optional
|
|
82
|
+
:return: Returns the result object.
|
|
83
|
+
""" # noqa: E501
|
|
84
|
+
|
|
85
|
+
_param = self._get_configuration_serialize(
|
|
86
|
+
_request_auth=_request_auth,
|
|
87
|
+
_content_type=_content_type,
|
|
88
|
+
_headers=_headers,
|
|
89
|
+
_host_index=_host_index
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
93
|
+
'200': "ModelConfiguration",
|
|
94
|
+
}
|
|
95
|
+
response_data = self.api_client.call_api(
|
|
96
|
+
*_param,
|
|
97
|
+
_request_timeout=_request_timeout
|
|
98
|
+
)
|
|
99
|
+
response_data.read()
|
|
100
|
+
return self.api_client.response_deserialize(
|
|
101
|
+
response_data=response_data,
|
|
102
|
+
response_types_map=_response_types_map,
|
|
103
|
+
).data
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@validate_call
|
|
107
|
+
def get_configuration_with_http_info(
|
|
108
|
+
self,
|
|
109
|
+
_request_timeout: Union[
|
|
110
|
+
None,
|
|
111
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
112
|
+
Tuple[
|
|
113
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
114
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
115
|
+
]
|
|
116
|
+
] = None,
|
|
117
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
118
|
+
_content_type: Optional[StrictStr] = None,
|
|
119
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
120
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
121
|
+
) -> ApiResponse[ModelConfiguration]:
|
|
122
|
+
"""Returns current configuration
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
126
|
+
number provided, it will be total request
|
|
127
|
+
timeout. It can also be a pair (tuple) of
|
|
128
|
+
(connection, read) timeouts.
|
|
129
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
130
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
131
|
+
request; this effectively ignores the
|
|
132
|
+
authentication in the spec for a single request.
|
|
133
|
+
:type _request_auth: dict, optional
|
|
134
|
+
:param _content_type: force content-type for the request.
|
|
135
|
+
:type _content_type: str, Optional
|
|
136
|
+
:param _headers: set to override the headers for a single
|
|
137
|
+
request; this effectively ignores the headers
|
|
138
|
+
in the spec for a single request.
|
|
139
|
+
:type _headers: dict, optional
|
|
140
|
+
:param _host_index: set to override the host_index for a single
|
|
141
|
+
request; this effectively ignores the host_index
|
|
142
|
+
in the spec for a single request.
|
|
143
|
+
:type _host_index: int, optional
|
|
144
|
+
:return: Returns the result object.
|
|
145
|
+
""" # noqa: E501
|
|
146
|
+
|
|
147
|
+
_param = self._get_configuration_serialize(
|
|
148
|
+
_request_auth=_request_auth,
|
|
149
|
+
_content_type=_content_type,
|
|
150
|
+
_headers=_headers,
|
|
151
|
+
_host_index=_host_index
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
155
|
+
'200': "ModelConfiguration",
|
|
156
|
+
}
|
|
157
|
+
response_data = self.api_client.call_api(
|
|
158
|
+
*_param,
|
|
159
|
+
_request_timeout=_request_timeout
|
|
160
|
+
)
|
|
161
|
+
response_data.read()
|
|
162
|
+
return self.api_client.response_deserialize(
|
|
163
|
+
response_data=response_data,
|
|
164
|
+
response_types_map=_response_types_map,
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
@validate_call
|
|
169
|
+
def get_configuration_without_preload_content(
|
|
170
|
+
self,
|
|
171
|
+
_request_timeout: Union[
|
|
172
|
+
None,
|
|
173
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
174
|
+
Tuple[
|
|
175
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
176
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
177
|
+
]
|
|
178
|
+
] = None,
|
|
179
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
180
|
+
_content_type: Optional[StrictStr] = None,
|
|
181
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
182
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
183
|
+
) -> RESTResponseType:
|
|
184
|
+
"""Returns current configuration
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
188
|
+
number provided, it will be total request
|
|
189
|
+
timeout. It can also be a pair (tuple) of
|
|
190
|
+
(connection, read) timeouts.
|
|
191
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
192
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
193
|
+
request; this effectively ignores the
|
|
194
|
+
authentication in the spec for a single request.
|
|
195
|
+
:type _request_auth: dict, optional
|
|
196
|
+
:param _content_type: force content-type for the request.
|
|
197
|
+
:type _content_type: str, Optional
|
|
198
|
+
:param _headers: set to override the headers for a single
|
|
199
|
+
request; this effectively ignores the headers
|
|
200
|
+
in the spec for a single request.
|
|
201
|
+
:type _headers: dict, optional
|
|
202
|
+
:param _host_index: set to override the host_index for a single
|
|
203
|
+
request; this effectively ignores the host_index
|
|
204
|
+
in the spec for a single request.
|
|
205
|
+
:type _host_index: int, optional
|
|
206
|
+
:return: Returns the result object.
|
|
207
|
+
""" # noqa: E501
|
|
208
|
+
|
|
209
|
+
_param = self._get_configuration_serialize(
|
|
210
|
+
_request_auth=_request_auth,
|
|
211
|
+
_content_type=_content_type,
|
|
212
|
+
_headers=_headers,
|
|
213
|
+
_host_index=_host_index
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
217
|
+
'200': "ModelConfiguration",
|
|
218
|
+
}
|
|
219
|
+
response_data = self.api_client.call_api(
|
|
220
|
+
*_param,
|
|
221
|
+
_request_timeout=_request_timeout
|
|
222
|
+
)
|
|
223
|
+
return response_data.response
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
def _get_configuration_serialize(
|
|
227
|
+
self,
|
|
228
|
+
_request_auth,
|
|
229
|
+
_content_type,
|
|
230
|
+
_headers,
|
|
231
|
+
_host_index,
|
|
232
|
+
) -> RequestSerialized:
|
|
233
|
+
|
|
234
|
+
_host = None
|
|
235
|
+
|
|
236
|
+
_collection_formats: Dict[str, str] = {
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
_path_params: Dict[str, str] = {}
|
|
240
|
+
_query_params: List[Tuple[str, str]] = []
|
|
241
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
242
|
+
_form_params: List[Tuple[str, str]] = []
|
|
243
|
+
_files: Dict[
|
|
244
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
245
|
+
] = {}
|
|
246
|
+
_body_params: Optional[bytes] = None
|
|
247
|
+
|
|
248
|
+
# process the path parameters
|
|
249
|
+
# process the query parameters
|
|
250
|
+
# process the header parameters
|
|
251
|
+
# process the form parameters
|
|
252
|
+
# process the body parameter
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
# set the HTTP header `Accept`
|
|
256
|
+
if 'Accept' not in _header_params:
|
|
257
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
258
|
+
[
|
|
259
|
+
'application/json'
|
|
260
|
+
]
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
# authentication setting
|
|
265
|
+
_auth_settings: List[str] = [
|
|
266
|
+
]
|
|
267
|
+
|
|
268
|
+
return self.api_client.param_serialize(
|
|
269
|
+
method='GET',
|
|
270
|
+
resource_path='/configuration',
|
|
271
|
+
path_params=_path_params,
|
|
272
|
+
query_params=_query_params,
|
|
273
|
+
header_params=_header_params,
|
|
274
|
+
body=_body_params,
|
|
275
|
+
post_params=_form_params,
|
|
276
|
+
files=_files,
|
|
277
|
+
auth_settings=_auth_settings,
|
|
278
|
+
collection_formats=_collection_formats,
|
|
279
|
+
_host=_host,
|
|
280
|
+
_request_auth=_request_auth
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
@validate_call
|
|
287
|
+
def get_version(
|
|
288
|
+
self,
|
|
289
|
+
_request_timeout: Union[
|
|
290
|
+
None,
|
|
291
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
292
|
+
Tuple[
|
|
293
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
294
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
295
|
+
]
|
|
296
|
+
] = None,
|
|
297
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
298
|
+
_content_type: Optional[StrictStr] = None,
|
|
299
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
300
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
301
|
+
) -> ModelVersion:
|
|
302
|
+
"""Returns Engine and GAMS versions
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
306
|
+
number provided, it will be total request
|
|
307
|
+
timeout. It can also be a pair (tuple) of
|
|
308
|
+
(connection, read) timeouts.
|
|
309
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
310
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
311
|
+
request; this effectively ignores the
|
|
312
|
+
authentication in the spec for a single request.
|
|
313
|
+
:type _request_auth: dict, optional
|
|
314
|
+
:param _content_type: force content-type for the request.
|
|
315
|
+
:type _content_type: str, Optional
|
|
316
|
+
:param _headers: set to override the headers for a single
|
|
317
|
+
request; this effectively ignores the headers
|
|
318
|
+
in the spec for a single request.
|
|
319
|
+
:type _headers: dict, optional
|
|
320
|
+
:param _host_index: set to override the host_index for a single
|
|
321
|
+
request; this effectively ignores the host_index
|
|
322
|
+
in the spec for a single request.
|
|
323
|
+
:type _host_index: int, optional
|
|
324
|
+
:return: Returns the result object.
|
|
325
|
+
""" # noqa: E501
|
|
326
|
+
|
|
327
|
+
_param = self._get_version_serialize(
|
|
328
|
+
_request_auth=_request_auth,
|
|
329
|
+
_content_type=_content_type,
|
|
330
|
+
_headers=_headers,
|
|
331
|
+
_host_index=_host_index
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
335
|
+
'200': "ModelVersion",
|
|
336
|
+
}
|
|
337
|
+
response_data = self.api_client.call_api(
|
|
338
|
+
*_param,
|
|
339
|
+
_request_timeout=_request_timeout
|
|
340
|
+
)
|
|
341
|
+
response_data.read()
|
|
342
|
+
return self.api_client.response_deserialize(
|
|
343
|
+
response_data=response_data,
|
|
344
|
+
response_types_map=_response_types_map,
|
|
345
|
+
).data
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
@validate_call
|
|
349
|
+
def get_version_with_http_info(
|
|
350
|
+
self,
|
|
351
|
+
_request_timeout: Union[
|
|
352
|
+
None,
|
|
353
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
354
|
+
Tuple[
|
|
355
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
356
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
357
|
+
]
|
|
358
|
+
] = None,
|
|
359
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
360
|
+
_content_type: Optional[StrictStr] = None,
|
|
361
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
362
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
363
|
+
) -> ApiResponse[ModelVersion]:
|
|
364
|
+
"""Returns Engine and GAMS versions
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
368
|
+
number provided, it will be total request
|
|
369
|
+
timeout. It can also be a pair (tuple) of
|
|
370
|
+
(connection, read) timeouts.
|
|
371
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
372
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
373
|
+
request; this effectively ignores the
|
|
374
|
+
authentication in the spec for a single request.
|
|
375
|
+
:type _request_auth: dict, optional
|
|
376
|
+
:param _content_type: force content-type for the request.
|
|
377
|
+
:type _content_type: str, Optional
|
|
378
|
+
:param _headers: set to override the headers for a single
|
|
379
|
+
request; this effectively ignores the headers
|
|
380
|
+
in the spec for a single request.
|
|
381
|
+
:type _headers: dict, optional
|
|
382
|
+
:param _host_index: set to override the host_index for a single
|
|
383
|
+
request; this effectively ignores the host_index
|
|
384
|
+
in the spec for a single request.
|
|
385
|
+
:type _host_index: int, optional
|
|
386
|
+
:return: Returns the result object.
|
|
387
|
+
""" # noqa: E501
|
|
388
|
+
|
|
389
|
+
_param = self._get_version_serialize(
|
|
390
|
+
_request_auth=_request_auth,
|
|
391
|
+
_content_type=_content_type,
|
|
392
|
+
_headers=_headers,
|
|
393
|
+
_host_index=_host_index
|
|
394
|
+
)
|
|
395
|
+
|
|
396
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
397
|
+
'200': "ModelVersion",
|
|
398
|
+
}
|
|
399
|
+
response_data = self.api_client.call_api(
|
|
400
|
+
*_param,
|
|
401
|
+
_request_timeout=_request_timeout
|
|
402
|
+
)
|
|
403
|
+
response_data.read()
|
|
404
|
+
return self.api_client.response_deserialize(
|
|
405
|
+
response_data=response_data,
|
|
406
|
+
response_types_map=_response_types_map,
|
|
407
|
+
)
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
@validate_call
|
|
411
|
+
def get_version_without_preload_content(
|
|
412
|
+
self,
|
|
413
|
+
_request_timeout: Union[
|
|
414
|
+
None,
|
|
415
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
416
|
+
Tuple[
|
|
417
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
418
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
419
|
+
]
|
|
420
|
+
] = None,
|
|
421
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
422
|
+
_content_type: Optional[StrictStr] = None,
|
|
423
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
424
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
425
|
+
) -> RESTResponseType:
|
|
426
|
+
"""Returns Engine and GAMS versions
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
430
|
+
number provided, it will be total request
|
|
431
|
+
timeout. It can also be a pair (tuple) of
|
|
432
|
+
(connection, read) timeouts.
|
|
433
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
434
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
435
|
+
request; this effectively ignores the
|
|
436
|
+
authentication in the spec for a single request.
|
|
437
|
+
:type _request_auth: dict, optional
|
|
438
|
+
:param _content_type: force content-type for the request.
|
|
439
|
+
:type _content_type: str, Optional
|
|
440
|
+
:param _headers: set to override the headers for a single
|
|
441
|
+
request; this effectively ignores the headers
|
|
442
|
+
in the spec for a single request.
|
|
443
|
+
:type _headers: dict, optional
|
|
444
|
+
:param _host_index: set to override the host_index for a single
|
|
445
|
+
request; this effectively ignores the host_index
|
|
446
|
+
in the spec for a single request.
|
|
447
|
+
:type _host_index: int, optional
|
|
448
|
+
:return: Returns the result object.
|
|
449
|
+
""" # noqa: E501
|
|
450
|
+
|
|
451
|
+
_param = self._get_version_serialize(
|
|
452
|
+
_request_auth=_request_auth,
|
|
453
|
+
_content_type=_content_type,
|
|
454
|
+
_headers=_headers,
|
|
455
|
+
_host_index=_host_index
|
|
456
|
+
)
|
|
457
|
+
|
|
458
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
459
|
+
'200': "ModelVersion",
|
|
460
|
+
}
|
|
461
|
+
response_data = self.api_client.call_api(
|
|
462
|
+
*_param,
|
|
463
|
+
_request_timeout=_request_timeout
|
|
464
|
+
)
|
|
465
|
+
return response_data.response
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
def _get_version_serialize(
|
|
469
|
+
self,
|
|
470
|
+
_request_auth,
|
|
471
|
+
_content_type,
|
|
472
|
+
_headers,
|
|
473
|
+
_host_index,
|
|
474
|
+
) -> RequestSerialized:
|
|
475
|
+
|
|
476
|
+
_host = None
|
|
477
|
+
|
|
478
|
+
_collection_formats: Dict[str, str] = {
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
_path_params: Dict[str, str] = {}
|
|
482
|
+
_query_params: List[Tuple[str, str]] = []
|
|
483
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
484
|
+
_form_params: List[Tuple[str, str]] = []
|
|
485
|
+
_files: Dict[
|
|
486
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
487
|
+
] = {}
|
|
488
|
+
_body_params: Optional[bytes] = None
|
|
489
|
+
|
|
490
|
+
# process the path parameters
|
|
491
|
+
# process the query parameters
|
|
492
|
+
# process the header parameters
|
|
493
|
+
# process the form parameters
|
|
494
|
+
# process the body parameter
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
# set the HTTP header `Accept`
|
|
498
|
+
if 'Accept' not in _header_params:
|
|
499
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
500
|
+
[
|
|
501
|
+
'application/json'
|
|
502
|
+
]
|
|
503
|
+
)
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
# authentication setting
|
|
507
|
+
_auth_settings: List[str] = [
|
|
508
|
+
]
|
|
509
|
+
|
|
510
|
+
return self.api_client.param_serialize(
|
|
511
|
+
method='GET',
|
|
512
|
+
resource_path='/version',
|
|
513
|
+
path_params=_path_params,
|
|
514
|
+
query_params=_query_params,
|
|
515
|
+
header_params=_header_params,
|
|
516
|
+
body=_body_params,
|
|
517
|
+
post_params=_form_params,
|
|
518
|
+
files=_files,
|
|
519
|
+
auth_settings=_auth_settings,
|
|
520
|
+
collection_formats=_collection_formats,
|
|
521
|
+
_host=_host,
|
|
522
|
+
_request_auth=_request_auth
|
|
523
|
+
)
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
@validate_call
|
|
529
|
+
def update_configuration(
|
|
530
|
+
self,
|
|
531
|
+
webhook_access: Annotated[Optional[StrictStr], Field(description="Whether to enable webhook access or enable it for admins only. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'ENABLED']")] = None,
|
|
532
|
+
instance_pool_access: Annotated[Optional[StrictStr], Field(description="Whether to enable instance pool access, enable it for admins or inviters only. If access to instance pools is removed for specific user roles or for all, existing instance pools are not affected. Only new pools cannot be created by these users. Existing instance pools can still be deleted. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'INVITER_ONLY', 'ENABLED']")] = None,
|
|
533
|
+
job_priorities_access: Annotated[Optional[StrictStr], Field(description="Whether to enable job priorities. WARNING: Enable/disable job priorities when the system is not in use, as jobs submitted while the feature is enabled/disabled may end up in an inconsistent state. Possible values are: ['DISABLED', 'ENABLED']")] = None,
|
|
534
|
+
text_entries_max_size: Annotated[Optional[Annotated[int, Field(le=1000000000, strict=True, ge=0)]], Field(description="Maximum size (in bytes) for text entries. Text entries that exceed this size will be truncated.")] = None,
|
|
535
|
+
hostname: Annotated[Optional[StrictStr], Field(description="Hostname of the Engine API. It is used for authentication purposes. It must match value from the authorization server. For example, https://engine.gams.com/api")] = None,
|
|
536
|
+
custom_cas: Annotated[Optional[StrictStr], Field(description="Custom certificate authorities that are used when validating SSL certificates e.g. when sending webhooks, connecting to identity providers etc.The certificates must be provided in PEM format (RFC 1422). Set to empty string to remove custom CAs.")] = None,
|
|
537
|
+
_request_timeout: Union[
|
|
538
|
+
None,
|
|
539
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
540
|
+
Tuple[
|
|
541
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
542
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
543
|
+
]
|
|
544
|
+
] = None,
|
|
545
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
546
|
+
_content_type: Optional[StrictStr] = None,
|
|
547
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
548
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
549
|
+
) -> Message:
|
|
550
|
+
"""Updates configuration
|
|
551
|
+
|
|
552
|
+
Requires admin role.
|
|
553
|
+
|
|
554
|
+
:param webhook_access: Whether to enable webhook access or enable it for admins only. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'ENABLED']
|
|
555
|
+
:type webhook_access: str
|
|
556
|
+
:param instance_pool_access: Whether to enable instance pool access, enable it for admins or inviters only. If access to instance pools is removed for specific user roles or for all, existing instance pools are not affected. Only new pools cannot be created by these users. Existing instance pools can still be deleted. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'INVITER_ONLY', 'ENABLED']
|
|
557
|
+
:type instance_pool_access: str
|
|
558
|
+
:param job_priorities_access: Whether to enable job priorities. WARNING: Enable/disable job priorities when the system is not in use, as jobs submitted while the feature is enabled/disabled may end up in an inconsistent state. Possible values are: ['DISABLED', 'ENABLED']
|
|
559
|
+
:type job_priorities_access: str
|
|
560
|
+
:param text_entries_max_size: Maximum size (in bytes) for text entries. Text entries that exceed this size will be truncated.
|
|
561
|
+
:type text_entries_max_size: int
|
|
562
|
+
:param hostname: Hostname of the Engine API. It is used for authentication purposes. It must match value from the authorization server. For example, https://engine.gams.com/api
|
|
563
|
+
:type hostname: str
|
|
564
|
+
:param custom_cas: Custom certificate authorities that are used when validating SSL certificates e.g. when sending webhooks, connecting to identity providers etc.The certificates must be provided in PEM format (RFC 1422). Set to empty string to remove custom CAs.
|
|
565
|
+
:type custom_cas: str
|
|
566
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
567
|
+
number provided, it will be total request
|
|
568
|
+
timeout. It can also be a pair (tuple) of
|
|
569
|
+
(connection, read) timeouts.
|
|
570
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
571
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
572
|
+
request; this effectively ignores the
|
|
573
|
+
authentication in the spec for a single request.
|
|
574
|
+
:type _request_auth: dict, optional
|
|
575
|
+
:param _content_type: force content-type for the request.
|
|
576
|
+
:type _content_type: str, Optional
|
|
577
|
+
:param _headers: set to override the headers for a single
|
|
578
|
+
request; this effectively ignores the headers
|
|
579
|
+
in the spec for a single request.
|
|
580
|
+
:type _headers: dict, optional
|
|
581
|
+
:param _host_index: set to override the host_index for a single
|
|
582
|
+
request; this effectively ignores the host_index
|
|
583
|
+
in the spec for a single request.
|
|
584
|
+
:type _host_index: int, optional
|
|
585
|
+
:return: Returns the result object.
|
|
586
|
+
""" # noqa: E501
|
|
587
|
+
|
|
588
|
+
_param = self._update_configuration_serialize(
|
|
589
|
+
webhook_access=webhook_access,
|
|
590
|
+
instance_pool_access=instance_pool_access,
|
|
591
|
+
job_priorities_access=job_priorities_access,
|
|
592
|
+
text_entries_max_size=text_entries_max_size,
|
|
593
|
+
hostname=hostname,
|
|
594
|
+
custom_cas=custom_cas,
|
|
595
|
+
_request_auth=_request_auth,
|
|
596
|
+
_content_type=_content_type,
|
|
597
|
+
_headers=_headers,
|
|
598
|
+
_host_index=_host_index
|
|
599
|
+
)
|
|
600
|
+
|
|
601
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
602
|
+
'200': "Message",
|
|
603
|
+
'400': "Message",
|
|
604
|
+
'403': "Message",
|
|
605
|
+
'404': "Message",
|
|
606
|
+
'405': "Message",
|
|
607
|
+
}
|
|
608
|
+
response_data = self.api_client.call_api(
|
|
609
|
+
*_param,
|
|
610
|
+
_request_timeout=_request_timeout
|
|
611
|
+
)
|
|
612
|
+
response_data.read()
|
|
613
|
+
return self.api_client.response_deserialize(
|
|
614
|
+
response_data=response_data,
|
|
615
|
+
response_types_map=_response_types_map,
|
|
616
|
+
).data
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
@validate_call
|
|
620
|
+
def update_configuration_with_http_info(
|
|
621
|
+
self,
|
|
622
|
+
webhook_access: Annotated[Optional[StrictStr], Field(description="Whether to enable webhook access or enable it for admins only. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'ENABLED']")] = None,
|
|
623
|
+
instance_pool_access: Annotated[Optional[StrictStr], Field(description="Whether to enable instance pool access, enable it for admins or inviters only. If access to instance pools is removed for specific user roles or for all, existing instance pools are not affected. Only new pools cannot be created by these users. Existing instance pools can still be deleted. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'INVITER_ONLY', 'ENABLED']")] = None,
|
|
624
|
+
job_priorities_access: Annotated[Optional[StrictStr], Field(description="Whether to enable job priorities. WARNING: Enable/disable job priorities when the system is not in use, as jobs submitted while the feature is enabled/disabled may end up in an inconsistent state. Possible values are: ['DISABLED', 'ENABLED']")] = None,
|
|
625
|
+
text_entries_max_size: Annotated[Optional[Annotated[int, Field(le=1000000000, strict=True, ge=0)]], Field(description="Maximum size (in bytes) for text entries. Text entries that exceed this size will be truncated.")] = None,
|
|
626
|
+
hostname: Annotated[Optional[StrictStr], Field(description="Hostname of the Engine API. It is used for authentication purposes. It must match value from the authorization server. For example, https://engine.gams.com/api")] = None,
|
|
627
|
+
custom_cas: Annotated[Optional[StrictStr], Field(description="Custom certificate authorities that are used when validating SSL certificates e.g. when sending webhooks, connecting to identity providers etc.The certificates must be provided in PEM format (RFC 1422). Set to empty string to remove custom CAs.")] = None,
|
|
628
|
+
_request_timeout: Union[
|
|
629
|
+
None,
|
|
630
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
631
|
+
Tuple[
|
|
632
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
633
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
634
|
+
]
|
|
635
|
+
] = None,
|
|
636
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
637
|
+
_content_type: Optional[StrictStr] = None,
|
|
638
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
639
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
640
|
+
) -> ApiResponse[Message]:
|
|
641
|
+
"""Updates configuration
|
|
642
|
+
|
|
643
|
+
Requires admin role.
|
|
644
|
+
|
|
645
|
+
:param webhook_access: Whether to enable webhook access or enable it for admins only. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'ENABLED']
|
|
646
|
+
:type webhook_access: str
|
|
647
|
+
:param instance_pool_access: Whether to enable instance pool access, enable it for admins or inviters only. If access to instance pools is removed for specific user roles or for all, existing instance pools are not affected. Only new pools cannot be created by these users. Existing instance pools can still be deleted. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'INVITER_ONLY', 'ENABLED']
|
|
648
|
+
:type instance_pool_access: str
|
|
649
|
+
:param job_priorities_access: Whether to enable job priorities. WARNING: Enable/disable job priorities when the system is not in use, as jobs submitted while the feature is enabled/disabled may end up in an inconsistent state. Possible values are: ['DISABLED', 'ENABLED']
|
|
650
|
+
:type job_priorities_access: str
|
|
651
|
+
:param text_entries_max_size: Maximum size (in bytes) for text entries. Text entries that exceed this size will be truncated.
|
|
652
|
+
:type text_entries_max_size: int
|
|
653
|
+
:param hostname: Hostname of the Engine API. It is used for authentication purposes. It must match value from the authorization server. For example, https://engine.gams.com/api
|
|
654
|
+
:type hostname: str
|
|
655
|
+
:param custom_cas: Custom certificate authorities that are used when validating SSL certificates e.g. when sending webhooks, connecting to identity providers etc.The certificates must be provided in PEM format (RFC 1422). Set to empty string to remove custom CAs.
|
|
656
|
+
:type custom_cas: str
|
|
657
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
658
|
+
number provided, it will be total request
|
|
659
|
+
timeout. It can also be a pair (tuple) of
|
|
660
|
+
(connection, read) timeouts.
|
|
661
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
662
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
663
|
+
request; this effectively ignores the
|
|
664
|
+
authentication in the spec for a single request.
|
|
665
|
+
:type _request_auth: dict, optional
|
|
666
|
+
:param _content_type: force content-type for the request.
|
|
667
|
+
:type _content_type: str, Optional
|
|
668
|
+
:param _headers: set to override the headers for a single
|
|
669
|
+
request; this effectively ignores the headers
|
|
670
|
+
in the spec for a single request.
|
|
671
|
+
:type _headers: dict, optional
|
|
672
|
+
:param _host_index: set to override the host_index for a single
|
|
673
|
+
request; this effectively ignores the host_index
|
|
674
|
+
in the spec for a single request.
|
|
675
|
+
:type _host_index: int, optional
|
|
676
|
+
:return: Returns the result object.
|
|
677
|
+
""" # noqa: E501
|
|
678
|
+
|
|
679
|
+
_param = self._update_configuration_serialize(
|
|
680
|
+
webhook_access=webhook_access,
|
|
681
|
+
instance_pool_access=instance_pool_access,
|
|
682
|
+
job_priorities_access=job_priorities_access,
|
|
683
|
+
text_entries_max_size=text_entries_max_size,
|
|
684
|
+
hostname=hostname,
|
|
685
|
+
custom_cas=custom_cas,
|
|
686
|
+
_request_auth=_request_auth,
|
|
687
|
+
_content_type=_content_type,
|
|
688
|
+
_headers=_headers,
|
|
689
|
+
_host_index=_host_index
|
|
690
|
+
)
|
|
691
|
+
|
|
692
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
693
|
+
'200': "Message",
|
|
694
|
+
'400': "Message",
|
|
695
|
+
'403': "Message",
|
|
696
|
+
'404': "Message",
|
|
697
|
+
'405': "Message",
|
|
698
|
+
}
|
|
699
|
+
response_data = self.api_client.call_api(
|
|
700
|
+
*_param,
|
|
701
|
+
_request_timeout=_request_timeout
|
|
702
|
+
)
|
|
703
|
+
response_data.read()
|
|
704
|
+
return self.api_client.response_deserialize(
|
|
705
|
+
response_data=response_data,
|
|
706
|
+
response_types_map=_response_types_map,
|
|
707
|
+
)
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
@validate_call
|
|
711
|
+
def update_configuration_without_preload_content(
|
|
712
|
+
self,
|
|
713
|
+
webhook_access: Annotated[Optional[StrictStr], Field(description="Whether to enable webhook access or enable it for admins only. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'ENABLED']")] = None,
|
|
714
|
+
instance_pool_access: Annotated[Optional[StrictStr], Field(description="Whether to enable instance pool access, enable it for admins or inviters only. If access to instance pools is removed for specific user roles or for all, existing instance pools are not affected. Only new pools cannot be created by these users. Existing instance pools can still be deleted. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'INVITER_ONLY', 'ENABLED']")] = None,
|
|
715
|
+
job_priorities_access: Annotated[Optional[StrictStr], Field(description="Whether to enable job priorities. WARNING: Enable/disable job priorities when the system is not in use, as jobs submitted while the feature is enabled/disabled may end up in an inconsistent state. Possible values are: ['DISABLED', 'ENABLED']")] = None,
|
|
716
|
+
text_entries_max_size: Annotated[Optional[Annotated[int, Field(le=1000000000, strict=True, ge=0)]], Field(description="Maximum size (in bytes) for text entries. Text entries that exceed this size will be truncated.")] = None,
|
|
717
|
+
hostname: Annotated[Optional[StrictStr], Field(description="Hostname of the Engine API. It is used for authentication purposes. It must match value from the authorization server. For example, https://engine.gams.com/api")] = None,
|
|
718
|
+
custom_cas: Annotated[Optional[StrictStr], Field(description="Custom certificate authorities that are used when validating SSL certificates e.g. when sending webhooks, connecting to identity providers etc.The certificates must be provided in PEM format (RFC 1422). Set to empty string to remove custom CAs.")] = None,
|
|
719
|
+
_request_timeout: Union[
|
|
720
|
+
None,
|
|
721
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
722
|
+
Tuple[
|
|
723
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
724
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
725
|
+
]
|
|
726
|
+
] = None,
|
|
727
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
728
|
+
_content_type: Optional[StrictStr] = None,
|
|
729
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
730
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
731
|
+
) -> RESTResponseType:
|
|
732
|
+
"""Updates configuration
|
|
733
|
+
|
|
734
|
+
Requires admin role.
|
|
735
|
+
|
|
736
|
+
:param webhook_access: Whether to enable webhook access or enable it for admins only. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'ENABLED']
|
|
737
|
+
:type webhook_access: str
|
|
738
|
+
:param instance_pool_access: Whether to enable instance pool access, enable it for admins or inviters only. If access to instance pools is removed for specific user roles or for all, existing instance pools are not affected. Only new pools cannot be created by these users. Existing instance pools can still be deleted. Possible values are: ['DISABLED', 'ADMIN_ONLY', 'INVITER_ONLY', 'ENABLED']
|
|
739
|
+
:type instance_pool_access: str
|
|
740
|
+
:param job_priorities_access: Whether to enable job priorities. WARNING: Enable/disable job priorities when the system is not in use, as jobs submitted while the feature is enabled/disabled may end up in an inconsistent state. Possible values are: ['DISABLED', 'ENABLED']
|
|
741
|
+
:type job_priorities_access: str
|
|
742
|
+
:param text_entries_max_size: Maximum size (in bytes) for text entries. Text entries that exceed this size will be truncated.
|
|
743
|
+
:type text_entries_max_size: int
|
|
744
|
+
:param hostname: Hostname of the Engine API. It is used for authentication purposes. It must match value from the authorization server. For example, https://engine.gams.com/api
|
|
745
|
+
:type hostname: str
|
|
746
|
+
:param custom_cas: Custom certificate authorities that are used when validating SSL certificates e.g. when sending webhooks, connecting to identity providers etc.The certificates must be provided in PEM format (RFC 1422). Set to empty string to remove custom CAs.
|
|
747
|
+
:type custom_cas: str
|
|
748
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
749
|
+
number provided, it will be total request
|
|
750
|
+
timeout. It can also be a pair (tuple) of
|
|
751
|
+
(connection, read) timeouts.
|
|
752
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
753
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
754
|
+
request; this effectively ignores the
|
|
755
|
+
authentication in the spec for a single request.
|
|
756
|
+
:type _request_auth: dict, optional
|
|
757
|
+
:param _content_type: force content-type for the request.
|
|
758
|
+
:type _content_type: str, Optional
|
|
759
|
+
:param _headers: set to override the headers for a single
|
|
760
|
+
request; this effectively ignores the headers
|
|
761
|
+
in the spec for a single request.
|
|
762
|
+
:type _headers: dict, optional
|
|
763
|
+
:param _host_index: set to override the host_index for a single
|
|
764
|
+
request; this effectively ignores the host_index
|
|
765
|
+
in the spec for a single request.
|
|
766
|
+
:type _host_index: int, optional
|
|
767
|
+
:return: Returns the result object.
|
|
768
|
+
""" # noqa: E501
|
|
769
|
+
|
|
770
|
+
_param = self._update_configuration_serialize(
|
|
771
|
+
webhook_access=webhook_access,
|
|
772
|
+
instance_pool_access=instance_pool_access,
|
|
773
|
+
job_priorities_access=job_priorities_access,
|
|
774
|
+
text_entries_max_size=text_entries_max_size,
|
|
775
|
+
hostname=hostname,
|
|
776
|
+
custom_cas=custom_cas,
|
|
777
|
+
_request_auth=_request_auth,
|
|
778
|
+
_content_type=_content_type,
|
|
779
|
+
_headers=_headers,
|
|
780
|
+
_host_index=_host_index
|
|
781
|
+
)
|
|
782
|
+
|
|
783
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
784
|
+
'200': "Message",
|
|
785
|
+
'400': "Message",
|
|
786
|
+
'403': "Message",
|
|
787
|
+
'404': "Message",
|
|
788
|
+
'405': "Message",
|
|
789
|
+
}
|
|
790
|
+
response_data = self.api_client.call_api(
|
|
791
|
+
*_param,
|
|
792
|
+
_request_timeout=_request_timeout
|
|
793
|
+
)
|
|
794
|
+
return response_data.response
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
def _update_configuration_serialize(
|
|
798
|
+
self,
|
|
799
|
+
webhook_access,
|
|
800
|
+
instance_pool_access,
|
|
801
|
+
job_priorities_access,
|
|
802
|
+
text_entries_max_size,
|
|
803
|
+
hostname,
|
|
804
|
+
custom_cas,
|
|
805
|
+
_request_auth,
|
|
806
|
+
_content_type,
|
|
807
|
+
_headers,
|
|
808
|
+
_host_index,
|
|
809
|
+
) -> RequestSerialized:
|
|
810
|
+
|
|
811
|
+
_host = None
|
|
812
|
+
|
|
813
|
+
_collection_formats: Dict[str, str] = {
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
_path_params: Dict[str, str] = {}
|
|
817
|
+
_query_params: List[Tuple[str, str]] = []
|
|
818
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
819
|
+
_form_params: List[Tuple[str, str]] = []
|
|
820
|
+
_files: Dict[
|
|
821
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
822
|
+
] = {}
|
|
823
|
+
_body_params: Optional[bytes] = None
|
|
824
|
+
|
|
825
|
+
# process the path parameters
|
|
826
|
+
# process the query parameters
|
|
827
|
+
# process the header parameters
|
|
828
|
+
# process the form parameters
|
|
829
|
+
if webhook_access is not None:
|
|
830
|
+
_form_params.append(('webhook_access', webhook_access))
|
|
831
|
+
if instance_pool_access is not None:
|
|
832
|
+
_form_params.append(('instance_pool_access', instance_pool_access))
|
|
833
|
+
if job_priorities_access is not None:
|
|
834
|
+
_form_params.append(('job_priorities_access', job_priorities_access))
|
|
835
|
+
if text_entries_max_size is not None:
|
|
836
|
+
_form_params.append(('text_entries_max_size', text_entries_max_size))
|
|
837
|
+
if hostname is not None:
|
|
838
|
+
_form_params.append(('hostname', hostname))
|
|
839
|
+
if custom_cas is not None:
|
|
840
|
+
_form_params.append(('custom_cas', custom_cas))
|
|
841
|
+
# process the body parameter
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
# set the HTTP header `Accept`
|
|
845
|
+
if 'Accept' not in _header_params:
|
|
846
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
847
|
+
[
|
|
848
|
+
'application/json'
|
|
849
|
+
]
|
|
850
|
+
)
|
|
851
|
+
|
|
852
|
+
# set the HTTP header `Content-Type`
|
|
853
|
+
if _content_type:
|
|
854
|
+
_header_params['Content-Type'] = _content_type
|
|
855
|
+
else:
|
|
856
|
+
_default_content_type = (
|
|
857
|
+
self.api_client.select_header_content_type(
|
|
858
|
+
[
|
|
859
|
+
'application/x-www-form-urlencoded',
|
|
860
|
+
'multipart/form-data'
|
|
861
|
+
]
|
|
862
|
+
)
|
|
863
|
+
)
|
|
864
|
+
if _default_content_type is not None:
|
|
865
|
+
_header_params['Content-Type'] = _default_content_type
|
|
866
|
+
|
|
867
|
+
# authentication setting
|
|
868
|
+
_auth_settings: List[str] = [
|
|
869
|
+
'BasicAuth'
|
|
870
|
+
]
|
|
871
|
+
|
|
872
|
+
return self.api_client.param_serialize(
|
|
873
|
+
method='PATCH',
|
|
874
|
+
resource_path='/configuration',
|
|
875
|
+
path_params=_path_params,
|
|
876
|
+
query_params=_query_params,
|
|
877
|
+
header_params=_header_params,
|
|
878
|
+
body=_body_params,
|
|
879
|
+
post_params=_form_params,
|
|
880
|
+
files=_files,
|
|
881
|
+
auth_settings=_auth_settings,
|
|
882
|
+
collection_formats=_collection_formats,
|
|
883
|
+
_host=_host,
|
|
884
|
+
_request_auth=_request_auth
|
|
885
|
+
)
|
|
886
|
+
|
|
887
|
+
|