qi-compute-api-client 0.7.0__py3-none-any.whl → 0.17.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of qi-compute-api-client might be problematic. Click here for more details.
- compute_api_client/__init__.py +22 -19
- compute_api_client/api/__init__.py +5 -6
- compute_api_client/api/algorithms_api.py +1333 -553
- compute_api_client/api/backend_api.py +1501 -0
- compute_api_client/api/backend_types_api.py +684 -0
- compute_api_client/api/batch_jobs_api.py +1937 -0
- compute_api_client/api/commits_api.py +1068 -435
- compute_api_client/api/files_api.py +1075 -435
- compute_api_client/api/final_results_api.py +736 -338
- compute_api_client/api/jobs_api.py +1653 -0
- compute_api_client/api/languages_api.py +556 -217
- compute_api_client/api/members_api.py +1057 -435
- compute_api_client/api/metadata_api.py +736 -337
- compute_api_client/api/permissions_api.py +1055 -421
- compute_api_client/api/projects_api.py +1604 -676
- compute_api_client/api/reservations_api.py +1124 -427
- compute_api_client/api/results_api.py +738 -337
- compute_api_client/api/teams_api.py +567 -220
- compute_api_client/api/transactions_api.py +679 -218
- compute_api_client/api/users_api.py +1090 -435
- compute_api_client/api_client.py +346 -304
- compute_api_client/api_response.py +21 -0
- compute_api_client/configuration.py +54 -67
- compute_api_client/docs/Algorithm.md +20 -3
- compute_api_client/docs/AlgorithmIn.md +20 -3
- compute_api_client/docs/AlgorithmType.md +0 -1
- compute_api_client/docs/AlgorithmsApi.md +78 -77
- compute_api_client/docs/Backend.md +33 -0
- compute_api_client/docs/BackendApi.md +419 -0
- compute_api_client/docs/BackendPatch.md +29 -0
- compute_api_client/docs/{RunStatus.md → BackendStatus.md} +1 -2
- compute_api_client/docs/BackendType.md +36 -0
- compute_api_client/docs/{RuntimeTypesApi.md → BackendTypesApi.md} +58 -31
- compute_api_client/docs/BackendWithAuthentication.md +34 -0
- compute_api_client/docs/BatchJob.md +38 -0
- compute_api_client/docs/BatchJobIn.md +29 -0
- compute_api_client/docs/{RuntimeStatus.md → BatchJobStatus.md} +1 -2
- compute_api_client/docs/{BatchRunsApi.md → BatchJobsApi.md} +170 -147
- compute_api_client/docs/Commit.md +18 -1
- compute_api_client/docs/CommitIn.md +17 -0
- compute_api_client/docs/CommitsApi.md +62 -71
- compute_api_client/docs/CompileStage.md +0 -1
- compute_api_client/docs/Domain.md +0 -1
- compute_api_client/docs/File.md +21 -4
- compute_api_client/docs/FileIn.md +21 -4
- compute_api_client/docs/FilesApi.md +65 -71
- compute_api_client/docs/FinalResult.md +20 -3
- compute_api_client/docs/FinalResultIn.md +19 -2
- compute_api_client/docs/FinalResultsApi.md +44 -71
- compute_api_client/docs/HTTPNotFoundError.md +17 -0
- compute_api_client/docs/HTTPValidationError.md +18 -1
- compute_api_client/docs/Job.md +36 -0
- compute_api_client/docs/JobIn.md +31 -0
- compute_api_client/docs/JobPatch.md +28 -0
- compute_api_client/docs/{BatchRunStatus.md → JobStatus.md} +1 -2
- compute_api_client/docs/{RunsApi.md → JobsApi.md} +137 -122
- compute_api_client/docs/Language.md +17 -0
- compute_api_client/docs/LanguagesApi.md +30 -12
- compute_api_client/docs/LocationInner.md +17 -0
- compute_api_client/docs/Member.md +19 -2
- compute_api_client/docs/MemberIn.md +19 -2
- compute_api_client/docs/MembersApi.md +59 -24
- compute_api_client/docs/Metadata.md +20 -3
- compute_api_client/docs/MetadataApi.md +49 -33
- compute_api_client/docs/MetadataIn.md +19 -2
- compute_api_client/docs/Permission.md +17 -0
- compute_api_client/docs/PermissionGroup.md +17 -0
- compute_api_client/docs/PermissionsApi.md +68 -28
- compute_api_client/docs/Project.md +20 -3
- compute_api_client/docs/ProjectIn.md +18 -1
- compute_api_client/docs/ProjectPatch.md +19 -2
- compute_api_client/docs/ProjectsApi.md +84 -36
- compute_api_client/docs/Reservation.md +21 -4
- compute_api_client/docs/ReservationIn.md +19 -2
- compute_api_client/docs/ReservationsApi.md +66 -24
- compute_api_client/docs/Result.md +23 -6
- compute_api_client/docs/ResultIn.md +19 -2
- compute_api_client/docs/ResultsApi.md +42 -26
- compute_api_client/docs/Role.md +0 -1
- compute_api_client/docs/ShareType.md +0 -1
- compute_api_client/docs/Team.md +18 -1
- compute_api_client/docs/TeamsApi.md +37 -14
- compute_api_client/docs/Transaction.md +21 -4
- compute_api_client/docs/TransactionsApi.md +50 -14
- compute_api_client/docs/User.md +21 -4
- compute_api_client/docs/UserIn.md +17 -0
- compute_api_client/docs/UsersApi.md +62 -24
- compute_api_client/docs/ValidationError.md +18 -1
- compute_api_client/exceptions.py +19 -16
- compute_api_client/models/__init__.py +16 -14
- compute_api_client/models/algorithm.py +78 -237
- compute_api_client/models/algorithm_in.py +76 -204
- compute_api_client/models/algorithm_type.py +21 -87
- compute_api_client/models/backend.py +100 -0
- compute_api_client/models/backend_patch.py +90 -0
- compute_api_client/models/backend_status.py +47 -0
- compute_api_client/models/backend_type.py +105 -0
- compute_api_client/models/backend_with_authentication.py +102 -0
- compute_api_client/models/batch_job.py +129 -0
- compute_api_client/models/batch_job_in.py +89 -0
- compute_api_client/models/batch_job_status.py +48 -0
- compute_api_client/models/commit.py +72 -230
- compute_api_client/models/commit_in.py +67 -169
- compute_api_client/models/compile_stage.py +23 -89
- compute_api_client/models/domain.py +22 -88
- compute_api_client/models/file.py +74 -288
- compute_api_client/models/file_in.py +72 -254
- compute_api_client/models/final_result.py +68 -198
- compute_api_client/models/final_result_in.py +63 -137
- compute_api_client/models/http_not_found_error.py +60 -105
- compute_api_client/models/http_validation_error.py +69 -105
- compute_api_client/models/job.py +120 -0
- compute_api_client/models/job_in.py +99 -0
- compute_api_client/models/job_patch.py +88 -0
- compute_api_client/models/job_status.py +48 -0
- compute_api_client/models/language.py +67 -172
- compute_api_client/models/location_inner.py +125 -84
- compute_api_client/models/member.py +70 -236
- compute_api_client/models/member_in.py +68 -203
- compute_api_client/models/metadata.py +68 -198
- compute_api_client/models/metadata_in.py +68 -137
- compute_api_client/models/permission.py +67 -172
- compute_api_client/models/permission_group.py +65 -142
- compute_api_client/models/project.py +74 -256
- compute_api_client/models/project_in.py +69 -195
- compute_api_client/models/project_patch.py +89 -192
- compute_api_client/models/reservation.py +79 -290
- compute_api_client/models/reservation_in.py +68 -200
- compute_api_client/models/result.py +101 -359
- compute_api_client/models/result_in.py +95 -291
- compute_api_client/models/role.py +21 -87
- compute_api_client/models/share_type.py +22 -88
- compute_api_client/models/team.py +69 -198
- compute_api_client/models/transaction.py +93 -299
- compute_api_client/models/user.py +75 -276
- compute_api_client/models/user_in.py +73 -243
- compute_api_client/models/validation_error.py +73 -160
- compute_api_client/rest.py +55 -114
- {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/METADATA +47 -40
- qi_compute_api_client-0.17.0.dist-info/RECORD +142 -0
- compute_api_client/api/batch_runs_api.py +0 -862
- compute_api_client/api/runs_api.py +0 -723
- compute_api_client/api/runtime_api.py +0 -449
- compute_api_client/api/runtime_types_api.py +0 -303
- compute_api_client/docs/BatchRun.md +0 -21
- compute_api_client/docs/BatchRunIn.md +0 -12
- compute_api_client/docs/Run.md +0 -19
- compute_api_client/docs/RunIn.md +0 -14
- compute_api_client/docs/Runtime.md +0 -16
- compute_api_client/docs/RuntimeApi.md +0 -229
- compute_api_client/docs/RuntimeType.md +0 -19
- compute_api_client/docs/RuntimeWithAuthentication.md +0 -17
- compute_api_client/models/batch_run.py +0 -423
- compute_api_client/models/batch_run_in.py +0 -171
- compute_api_client/models/batch_run_status.py +0 -114
- compute_api_client/models/run.py +0 -376
- compute_api_client/models/run_in.py +0 -233
- compute_api_client/models/run_status.py +0 -114
- compute_api_client/models/runtime.py +0 -290
- compute_api_client/models/runtime_status.py +0 -113
- compute_api_client/models/runtime_type.py +0 -357
- compute_api_client/models/runtime_with_authentication.py +0 -320
- qi_compute_api_client-0.7.0.dist-info/RECORD +0 -137
- {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/LICENSE.md +0 -0
- {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/WHEEL +0 -0
|
@@ -3,313 +3,102 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Quantum Inspire 2
|
|
5
5
|
|
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 0.1.0
|
|
9
|
-
Generated by
|
|
10
|
-
"""
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
10
|
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
except ImportError:
|
|
16
|
-
from inspect import getargspec as getfullargspec
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
17
16
|
import pprint
|
|
18
17
|
import re # noqa: F401
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
from compute_api_client.configuration import Configuration
|
|
18
|
+
import json
|
|
22
19
|
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from pydantic import BaseModel, StrictBool, StrictInt
|
|
23
|
+
try:
|
|
24
|
+
from typing import Self
|
|
25
|
+
except ImportError:
|
|
26
|
+
from typing_extensions import Self
|
|
23
27
|
|
|
24
|
-
class Reservation(
|
|
25
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
26
|
-
Ref: https://openapi-generator.tech
|
|
27
|
-
|
|
28
|
-
Do not edit the class manually.
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
"""
|
|
32
|
-
Attributes:
|
|
33
|
-
openapi_types (dict): The key is attribute name
|
|
34
|
-
and the value is attribute type.
|
|
35
|
-
attribute_map (dict): The key is attribute name
|
|
36
|
-
and the value is json key in definition.
|
|
28
|
+
class Reservation(BaseModel):
|
|
37
29
|
"""
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
Reservation
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
id: StrictInt
|
|
33
|
+
member_id: StrictInt
|
|
34
|
+
start_time: datetime
|
|
35
|
+
end_time: datetime
|
|
36
|
+
backend_type_id: StrictInt
|
|
37
|
+
backend_id: Optional[StrictInt]
|
|
38
|
+
is_terminated: StrictBool
|
|
39
|
+
__properties: ClassVar[List[str]] = ["id", "member_id", "start_time", "end_time", "backend_type_id", "backend_id", "is_terminated"]
|
|
40
|
+
|
|
41
|
+
model_config = {
|
|
42
|
+
"populate_by_name": True,
|
|
43
|
+
"validate_assignment": True
|
|
46
44
|
}
|
|
47
45
|
|
|
48
|
-
attribute_map = {
|
|
49
|
-
'id': 'id',
|
|
50
|
-
'start_time': 'start_time',
|
|
51
|
-
'end_time': 'end_time',
|
|
52
|
-
'is_terminated': 'is_terminated',
|
|
53
|
-
'member_id': 'member_id',
|
|
54
|
-
'runtime_id': 'runtime_id',
|
|
55
|
-
'runtime_type_id': 'runtime_type_id'
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
def __init__(self, id=None, start_time=None, end_time=None, is_terminated=False, member_id=None, runtime_id=None, runtime_type_id=None, local_vars_configuration=None): # noqa: E501
|
|
59
|
-
"""Reservation - a model defined in OpenAPI""" # noqa: E501
|
|
60
|
-
if local_vars_configuration is None:
|
|
61
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
62
|
-
self.local_vars_configuration = local_vars_configuration
|
|
63
|
-
|
|
64
|
-
self._id = None
|
|
65
|
-
self._start_time = None
|
|
66
|
-
self._end_time = None
|
|
67
|
-
self._is_terminated = None
|
|
68
|
-
self._member_id = None
|
|
69
|
-
self._runtime_id = None
|
|
70
|
-
self._runtime_type_id = None
|
|
71
|
-
self.discriminator = None
|
|
72
|
-
|
|
73
|
-
self.id = id
|
|
74
|
-
self.start_time = start_time
|
|
75
|
-
self.end_time = end_time
|
|
76
|
-
if is_terminated is not None:
|
|
77
|
-
self.is_terminated = is_terminated
|
|
78
|
-
self.member_id = member_id
|
|
79
|
-
self.runtime_id = runtime_id
|
|
80
|
-
self.runtime_type_id = runtime_type_id
|
|
81
|
-
|
|
82
|
-
@property
|
|
83
|
-
def id(self):
|
|
84
|
-
"""Gets the id of this Reservation. # noqa: E501
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
:return: The id of this Reservation. # noqa: E501
|
|
88
|
-
:rtype: int
|
|
89
|
-
"""
|
|
90
|
-
return self._id
|
|
91
46
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
95
50
|
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
96
55
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"""
|
|
100
|
-
|
|
101
|
-
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
|
|
102
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
103
|
-
id is not None and id > 2147483647): # noqa: E501
|
|
104
|
-
raise ValueError("Invalid value for `id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
105
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
106
|
-
id is not None and id < 1): # noqa: E501
|
|
107
|
-
raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
108
|
-
|
|
109
|
-
self._id = id
|
|
110
|
-
|
|
111
|
-
@property
|
|
112
|
-
def start_time(self):
|
|
113
|
-
"""Gets the start_time of this Reservation. # noqa: E501
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
:return: The start_time of this Reservation. # noqa: E501
|
|
117
|
-
:rtype: datetime
|
|
118
|
-
"""
|
|
119
|
-
return self._start_time
|
|
120
|
-
|
|
121
|
-
@start_time.setter
|
|
122
|
-
def start_time(self, start_time):
|
|
123
|
-
"""Sets the start_time of this Reservation.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
:param start_time: The start_time of this Reservation. # noqa: E501
|
|
127
|
-
:type start_time: datetime
|
|
128
|
-
"""
|
|
129
|
-
if self.local_vars_configuration.client_side_validation and start_time is None: # noqa: E501
|
|
130
|
-
raise ValueError("Invalid value for `start_time`, must not be `None`") # noqa: E501
|
|
131
|
-
|
|
132
|
-
self._start_time = start_time
|
|
133
|
-
|
|
134
|
-
@property
|
|
135
|
-
def end_time(self):
|
|
136
|
-
"""Gets the end_time of this Reservation. # noqa: E501
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
:return: The end_time of this Reservation. # noqa: E501
|
|
140
|
-
:rtype: datetime
|
|
141
|
-
"""
|
|
142
|
-
return self._end_time
|
|
143
|
-
|
|
144
|
-
@end_time.setter
|
|
145
|
-
def end_time(self, end_time):
|
|
146
|
-
"""Sets the end_time of this Reservation.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
:param end_time: The end_time of this Reservation. # noqa: E501
|
|
150
|
-
:type end_time: datetime
|
|
151
|
-
"""
|
|
152
|
-
if self.local_vars_configuration.client_side_validation and end_time is None: # noqa: E501
|
|
153
|
-
raise ValueError("Invalid value for `end_time`, must not be `None`") # noqa: E501
|
|
154
|
-
|
|
155
|
-
self._end_time = end_time
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Self:
|
|
58
|
+
"""Create an instance of Reservation from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
156
60
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
"""Gets the is_terminated of this Reservation. # noqa: E501
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
160
63
|
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
161
66
|
|
|
162
|
-
|
|
163
|
-
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
164
70
|
"""
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
@
|
|
179
|
-
def
|
|
180
|
-
"""
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
raise ValueError("Invalid value for `member_id`, must not be `None`") # noqa: E501
|
|
198
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
199
|
-
member_id is not None and member_id > 2147483647): # noqa: E501
|
|
200
|
-
raise ValueError("Invalid value for `member_id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
201
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
202
|
-
member_id is not None and member_id < 1): # noqa: E501
|
|
203
|
-
raise ValueError("Invalid value for `member_id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
204
|
-
|
|
205
|
-
self._member_id = member_id
|
|
206
|
-
|
|
207
|
-
@property
|
|
208
|
-
def runtime_id(self):
|
|
209
|
-
"""Gets the runtime_id of this Reservation. # noqa: E501
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
:return: The runtime_id of this Reservation. # noqa: E501
|
|
213
|
-
:rtype: int
|
|
214
|
-
"""
|
|
215
|
-
return self._runtime_id
|
|
216
|
-
|
|
217
|
-
@runtime_id.setter
|
|
218
|
-
def runtime_id(self, runtime_id):
|
|
219
|
-
"""Sets the runtime_id of this Reservation.
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
:param runtime_id: The runtime_id of this Reservation. # noqa: E501
|
|
223
|
-
:type runtime_id: int
|
|
224
|
-
"""
|
|
225
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
226
|
-
runtime_id is not None and runtime_id > 2147483647): # noqa: E501
|
|
227
|
-
raise ValueError("Invalid value for `runtime_id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
228
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
229
|
-
runtime_id is not None and runtime_id < 1): # noqa: E501
|
|
230
|
-
raise ValueError("Invalid value for `runtime_id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
231
|
-
|
|
232
|
-
self._runtime_id = runtime_id
|
|
233
|
-
|
|
234
|
-
@property
|
|
235
|
-
def runtime_type_id(self):
|
|
236
|
-
"""Gets the runtime_type_id of this Reservation. # noqa: E501
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
:return: The runtime_type_id of this Reservation. # noqa: E501
|
|
240
|
-
:rtype: int
|
|
241
|
-
"""
|
|
242
|
-
return self._runtime_type_id
|
|
243
|
-
|
|
244
|
-
@runtime_type_id.setter
|
|
245
|
-
def runtime_type_id(self, runtime_type_id):
|
|
246
|
-
"""Sets the runtime_type_id of this Reservation.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
:param runtime_type_id: The runtime_type_id of this Reservation. # noqa: E501
|
|
250
|
-
:type runtime_type_id: int
|
|
251
|
-
"""
|
|
252
|
-
if self.local_vars_configuration.client_side_validation and runtime_type_id is None: # noqa: E501
|
|
253
|
-
raise ValueError("Invalid value for `runtime_type_id`, must not be `None`") # noqa: E501
|
|
254
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
255
|
-
runtime_type_id is not None and runtime_type_id > 2147483647): # noqa: E501
|
|
256
|
-
raise ValueError("Invalid value for `runtime_type_id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
257
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
258
|
-
runtime_type_id is not None and runtime_type_id < 1): # noqa: E501
|
|
259
|
-
raise ValueError("Invalid value for `runtime_type_id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
260
|
-
|
|
261
|
-
self._runtime_type_id = runtime_type_id
|
|
262
|
-
|
|
263
|
-
def to_dict(self, serialize=False):
|
|
264
|
-
"""Returns the model properties as a dict"""
|
|
265
|
-
result = {}
|
|
266
|
-
|
|
267
|
-
def convert(x):
|
|
268
|
-
if hasattr(x, "to_dict"):
|
|
269
|
-
args = getfullargspec(x.to_dict).args
|
|
270
|
-
if len(args) == 1:
|
|
271
|
-
return x.to_dict()
|
|
272
|
-
else:
|
|
273
|
-
return x.to_dict(serialize)
|
|
274
|
-
else:
|
|
275
|
-
return x
|
|
276
|
-
|
|
277
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
278
|
-
value = getattr(self, attr)
|
|
279
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
280
|
-
if isinstance(value, list):
|
|
281
|
-
result[attr] = list(map(
|
|
282
|
-
lambda x: convert(x),
|
|
283
|
-
value
|
|
284
|
-
))
|
|
285
|
-
elif isinstance(value, dict):
|
|
286
|
-
result[attr] = dict(map(
|
|
287
|
-
lambda item: (item[0], convert(item[1])),
|
|
288
|
-
value.items()
|
|
289
|
-
))
|
|
290
|
-
else:
|
|
291
|
-
result[attr] = convert(value)
|
|
292
|
-
|
|
293
|
-
return result
|
|
294
|
-
|
|
295
|
-
def to_str(self):
|
|
296
|
-
"""Returns the string representation of the model"""
|
|
297
|
-
return pprint.pformat(self.to_dict())
|
|
298
|
-
|
|
299
|
-
def __repr__(self):
|
|
300
|
-
"""For `print` and `pprint`"""
|
|
301
|
-
return self.to_str()
|
|
302
|
-
|
|
303
|
-
def __eq__(self, other):
|
|
304
|
-
"""Returns true if both objects are equal"""
|
|
305
|
-
if not isinstance(other, Reservation):
|
|
306
|
-
return False
|
|
307
|
-
|
|
308
|
-
return self.to_dict() == other.to_dict()
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude={
|
|
74
|
+
},
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# set to None if backend_id (nullable) is None
|
|
78
|
+
# and model_fields_set contains the field
|
|
79
|
+
if self.backend_id is None and "backend_id" in self.model_fields_set:
|
|
80
|
+
_dict['backend_id'] = None
|
|
81
|
+
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
86
|
+
"""Create an instance of Reservation from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"id": obj.get("id"),
|
|
95
|
+
"member_id": obj.get("member_id"),
|
|
96
|
+
"start_time": obj.get("start_time"),
|
|
97
|
+
"end_time": obj.get("end_time"),
|
|
98
|
+
"backend_type_id": obj.get("backend_type_id"),
|
|
99
|
+
"backend_id": obj.get("backend_id"),
|
|
100
|
+
"is_terminated": obj.get("is_terminated")
|
|
101
|
+
})
|
|
102
|
+
return _obj
|
|
309
103
|
|
|
310
|
-
def __ne__(self, other):
|
|
311
|
-
"""Returns true if both objects are not equal"""
|
|
312
|
-
if not isinstance(other, Reservation):
|
|
313
|
-
return True
|
|
314
104
|
|
|
315
|
-
return self.to_dict() != other.to_dict()
|
|
@@ -3,223 +3,91 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Quantum Inspire 2
|
|
5
5
|
|
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 0.1.0
|
|
9
|
-
Generated by
|
|
10
|
-
"""
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
10
|
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
except ImportError:
|
|
16
|
-
from inspect import getargspec as getfullargspec
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
17
16
|
import pprint
|
|
18
17
|
import re # noqa: F401
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
from compute_api_client.configuration import Configuration
|
|
18
|
+
import json
|
|
22
19
|
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from pydantic import BaseModel, StrictInt
|
|
23
|
+
try:
|
|
24
|
+
from typing import Self
|
|
25
|
+
except ImportError:
|
|
26
|
+
from typing_extensions import Self
|
|
23
27
|
|
|
24
|
-
class ReservationIn(
|
|
25
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
26
|
-
Ref: https://openapi-generator.tech
|
|
27
|
-
|
|
28
|
-
Do not edit the class manually.
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
"""
|
|
32
|
-
Attributes:
|
|
33
|
-
openapi_types (dict): The key is attribute name
|
|
34
|
-
and the value is attribute type.
|
|
35
|
-
attribute_map (dict): The key is attribute name
|
|
36
|
-
and the value is json key in definition.
|
|
28
|
+
class ReservationIn(BaseModel):
|
|
37
29
|
"""
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
ReservationIn
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
member_id: StrictInt
|
|
33
|
+
start_time: datetime
|
|
34
|
+
end_time: datetime
|
|
35
|
+
backend_type_id: StrictInt
|
|
36
|
+
__properties: ClassVar[List[str]] = ["member_id", "start_time", "end_time", "backend_type_id"]
|
|
37
|
+
|
|
38
|
+
model_config = {
|
|
39
|
+
"populate_by_name": True,
|
|
40
|
+
"validate_assignment": True
|
|
43
41
|
}
|
|
44
42
|
|
|
45
|
-
attribute_map = {
|
|
46
|
-
'start_time': 'start_time',
|
|
47
|
-
'end_time': 'end_time',
|
|
48
|
-
'member_id': 'member_id',
|
|
49
|
-
'runtime_type_id': 'runtime_type_id'
|
|
50
|
-
}
|
|
51
43
|
|
|
52
|
-
def
|
|
53
|
-
"""
|
|
54
|
-
|
|
55
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
56
|
-
self.local_vars_configuration = local_vars_configuration
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
57
47
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
self.
|
|
62
|
-
self.discriminator = None
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
63
52
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Self:
|
|
55
|
+
"""Create an instance of ReservationIn from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
68
57
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"""Gets the start_time of this ReservationIn. # noqa: E501
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
72
60
|
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
73
63
|
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
76
67
|
"""
|
|
77
|
-
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude={
|
|
71
|
+
},
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
78
|
+
"""Create an instance of ReservationIn from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"member_id": obj.get("member_id"),
|
|
87
|
+
"start_time": obj.get("start_time"),
|
|
88
|
+
"end_time": obj.get("end_time"),
|
|
89
|
+
"backend_type_id": obj.get("backend_type_id")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
78
92
|
|
|
79
|
-
@start_time.setter
|
|
80
|
-
def start_time(self, start_time):
|
|
81
|
-
"""Sets the start_time of this ReservationIn.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
:param start_time: The start_time of this ReservationIn. # noqa: E501
|
|
85
|
-
:type start_time: datetime
|
|
86
|
-
"""
|
|
87
|
-
if self.local_vars_configuration.client_side_validation and start_time is None: # noqa: E501
|
|
88
|
-
raise ValueError("Invalid value for `start_time`, must not be `None`") # noqa: E501
|
|
89
|
-
|
|
90
|
-
self._start_time = start_time
|
|
91
|
-
|
|
92
|
-
@property
|
|
93
|
-
def end_time(self):
|
|
94
|
-
"""Gets the end_time of this ReservationIn. # noqa: E501
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
:return: The end_time of this ReservationIn. # noqa: E501
|
|
98
|
-
:rtype: datetime
|
|
99
|
-
"""
|
|
100
|
-
return self._end_time
|
|
101
93
|
|
|
102
|
-
@end_time.setter
|
|
103
|
-
def end_time(self, end_time):
|
|
104
|
-
"""Sets the end_time of this ReservationIn.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
:param end_time: The end_time of this ReservationIn. # noqa: E501
|
|
108
|
-
:type end_time: datetime
|
|
109
|
-
"""
|
|
110
|
-
if self.local_vars_configuration.client_side_validation and end_time is None: # noqa: E501
|
|
111
|
-
raise ValueError("Invalid value for `end_time`, must not be `None`") # noqa: E501
|
|
112
|
-
|
|
113
|
-
self._end_time = end_time
|
|
114
|
-
|
|
115
|
-
@property
|
|
116
|
-
def member_id(self):
|
|
117
|
-
"""Gets the member_id of this ReservationIn. # noqa: E501
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
:return: The member_id of this ReservationIn. # noqa: E501
|
|
121
|
-
:rtype: int
|
|
122
|
-
"""
|
|
123
|
-
return self._member_id
|
|
124
|
-
|
|
125
|
-
@member_id.setter
|
|
126
|
-
def member_id(self, member_id):
|
|
127
|
-
"""Sets the member_id of this ReservationIn.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
:param member_id: The member_id of this ReservationIn. # noqa: E501
|
|
131
|
-
:type member_id: int
|
|
132
|
-
"""
|
|
133
|
-
if self.local_vars_configuration.client_side_validation and member_id is None: # noqa: E501
|
|
134
|
-
raise ValueError("Invalid value for `member_id`, must not be `None`") # noqa: E501
|
|
135
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
136
|
-
member_id is not None and member_id > 2147483647): # noqa: E501
|
|
137
|
-
raise ValueError("Invalid value for `member_id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
138
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
139
|
-
member_id is not None and member_id < 1): # noqa: E501
|
|
140
|
-
raise ValueError("Invalid value for `member_id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
141
|
-
|
|
142
|
-
self._member_id = member_id
|
|
143
|
-
|
|
144
|
-
@property
|
|
145
|
-
def runtime_type_id(self):
|
|
146
|
-
"""Gets the runtime_type_id of this ReservationIn. # noqa: E501
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
:return: The runtime_type_id of this ReservationIn. # noqa: E501
|
|
150
|
-
:rtype: int
|
|
151
|
-
"""
|
|
152
|
-
return self._runtime_type_id
|
|
153
|
-
|
|
154
|
-
@runtime_type_id.setter
|
|
155
|
-
def runtime_type_id(self, runtime_type_id):
|
|
156
|
-
"""Sets the runtime_type_id of this ReservationIn.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
:param runtime_type_id: The runtime_type_id of this ReservationIn. # noqa: E501
|
|
160
|
-
:type runtime_type_id: int
|
|
161
|
-
"""
|
|
162
|
-
if self.local_vars_configuration.client_side_validation and runtime_type_id is None: # noqa: E501
|
|
163
|
-
raise ValueError("Invalid value for `runtime_type_id`, must not be `None`") # noqa: E501
|
|
164
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
165
|
-
runtime_type_id is not None and runtime_type_id > 2147483647): # noqa: E501
|
|
166
|
-
raise ValueError("Invalid value for `runtime_type_id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
167
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
168
|
-
runtime_type_id is not None and runtime_type_id < 1): # noqa: E501
|
|
169
|
-
raise ValueError("Invalid value for `runtime_type_id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
170
|
-
|
|
171
|
-
self._runtime_type_id = runtime_type_id
|
|
172
|
-
|
|
173
|
-
def to_dict(self, serialize=False):
|
|
174
|
-
"""Returns the model properties as a dict"""
|
|
175
|
-
result = {}
|
|
176
|
-
|
|
177
|
-
def convert(x):
|
|
178
|
-
if hasattr(x, "to_dict"):
|
|
179
|
-
args = getfullargspec(x.to_dict).args
|
|
180
|
-
if len(args) == 1:
|
|
181
|
-
return x.to_dict()
|
|
182
|
-
else:
|
|
183
|
-
return x.to_dict(serialize)
|
|
184
|
-
else:
|
|
185
|
-
return x
|
|
186
|
-
|
|
187
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
188
|
-
value = getattr(self, attr)
|
|
189
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
190
|
-
if isinstance(value, list):
|
|
191
|
-
result[attr] = list(map(
|
|
192
|
-
lambda x: convert(x),
|
|
193
|
-
value
|
|
194
|
-
))
|
|
195
|
-
elif isinstance(value, dict):
|
|
196
|
-
result[attr] = dict(map(
|
|
197
|
-
lambda item: (item[0], convert(item[1])),
|
|
198
|
-
value.items()
|
|
199
|
-
))
|
|
200
|
-
else:
|
|
201
|
-
result[attr] = convert(value)
|
|
202
|
-
|
|
203
|
-
return result
|
|
204
|
-
|
|
205
|
-
def to_str(self):
|
|
206
|
-
"""Returns the string representation of the model"""
|
|
207
|
-
return pprint.pformat(self.to_dict())
|
|
208
|
-
|
|
209
|
-
def __repr__(self):
|
|
210
|
-
"""For `print` and `pprint`"""
|
|
211
|
-
return self.to_str()
|
|
212
|
-
|
|
213
|
-
def __eq__(self, other):
|
|
214
|
-
"""Returns true if both objects are equal"""
|
|
215
|
-
if not isinstance(other, ReservationIn):
|
|
216
|
-
return False
|
|
217
|
-
|
|
218
|
-
return self.to_dict() == other.to_dict()
|
|
219
|
-
|
|
220
|
-
def __ne__(self, other):
|
|
221
|
-
"""Returns true if both objects are not equal"""
|
|
222
|
-
if not isinstance(other, ReservationIn):
|
|
223
|
-
return True
|
|
224
|
-
|
|
225
|
-
return self.to_dict() != other.to_dict()
|