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,267 +3,97 @@
|
|
|
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
|
|
18
|
+
import json
|
|
20
19
|
|
|
21
|
-
from compute_api_client.configuration import Configuration
|
|
22
20
|
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from pydantic import BaseModel, StrictBool
|
|
23
|
+
from pydantic import Field
|
|
24
|
+
from typing_extensions import Annotated
|
|
25
|
+
try:
|
|
26
|
+
from typing import Self
|
|
27
|
+
except ImportError:
|
|
28
|
+
from typing_extensions import Self
|
|
23
29
|
|
|
24
|
-
class UserIn(
|
|
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.
|
|
30
|
+
class UserIn(BaseModel):
|
|
37
31
|
"""
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
'is_staff': 'is_staff',
|
|
52
|
-
'is_active': 'is_active',
|
|
53
|
-
'is_confirmed': 'is_confirmed'
|
|
32
|
+
UserIn
|
|
33
|
+
""" # noqa: E501
|
|
34
|
+
full_name: Annotated[str, Field(strict=True, max_length=64)]
|
|
35
|
+
email: Annotated[str, Field(strict=True, max_length=256)]
|
|
36
|
+
is_superuser: Optional[StrictBool] = False
|
|
37
|
+
is_staff: Optional[StrictBool] = False
|
|
38
|
+
is_active: Optional[StrictBool] = False
|
|
39
|
+
is_confirmed: Optional[StrictBool] = False
|
|
40
|
+
__properties: ClassVar[List[str]] = ["full_name", "email", "is_superuser", "is_staff", "is_active", "is_confirmed"]
|
|
41
|
+
|
|
42
|
+
model_config = {
|
|
43
|
+
"populate_by_name": True,
|
|
44
|
+
"validate_assignment": True
|
|
54
45
|
}
|
|
55
46
|
|
|
56
|
-
def __init__(self, full_name=None, email=None, is_superuser=False, is_staff=False, is_active=False, is_confirmed=False, local_vars_configuration=None): # noqa: E501
|
|
57
|
-
"""UserIn - a model defined in OpenAPI""" # noqa: E501
|
|
58
|
-
if local_vars_configuration is None:
|
|
59
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
60
|
-
self.local_vars_configuration = local_vars_configuration
|
|
61
|
-
|
|
62
|
-
self._full_name = None
|
|
63
|
-
self._email = None
|
|
64
|
-
self._is_superuser = None
|
|
65
|
-
self._is_staff = None
|
|
66
|
-
self._is_active = None
|
|
67
|
-
self._is_confirmed = None
|
|
68
|
-
self.discriminator = None
|
|
69
|
-
|
|
70
|
-
self.full_name = full_name
|
|
71
|
-
self.email = email
|
|
72
|
-
if is_superuser is not None:
|
|
73
|
-
self.is_superuser = is_superuser
|
|
74
|
-
if is_staff is not None:
|
|
75
|
-
self.is_staff = is_staff
|
|
76
|
-
if is_active is not None:
|
|
77
|
-
self.is_active = is_active
|
|
78
|
-
if is_confirmed is not None:
|
|
79
|
-
self.is_confirmed = is_confirmed
|
|
80
|
-
|
|
81
|
-
@property
|
|
82
|
-
def full_name(self):
|
|
83
|
-
"""Gets the full_name of this UserIn. # noqa: E501
|
|
84
|
-
|
|
85
47
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return self._full_name
|
|
90
|
-
|
|
91
|
-
@full_name.setter
|
|
92
|
-
def full_name(self, full_name):
|
|
93
|
-
"""Sets the full_name of this UserIn.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
:param full_name: The full_name of this UserIn. # noqa: E501
|
|
97
|
-
:type full_name: str
|
|
98
|
-
"""
|
|
99
|
-
if self.local_vars_configuration.client_side_validation and full_name is None: # noqa: E501
|
|
100
|
-
raise ValueError("Invalid value for `full_name`, must not be `None`") # noqa: E501
|
|
101
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
102
|
-
full_name is not None and len(full_name) > 64):
|
|
103
|
-
raise ValueError("Invalid value for `full_name`, length must be less than or equal to `64`") # noqa: E501
|
|
104
|
-
|
|
105
|
-
self._full_name = full_name
|
|
106
|
-
|
|
107
|
-
@property
|
|
108
|
-
def email(self):
|
|
109
|
-
"""Gets the email of this UserIn. # noqa: E501
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
:return: The email of this UserIn. # noqa: E501
|
|
113
|
-
:rtype: str
|
|
114
|
-
"""
|
|
115
|
-
return self._email
|
|
116
|
-
|
|
117
|
-
@email.setter
|
|
118
|
-
def email(self, email):
|
|
119
|
-
"""Sets the email of this UserIn.
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
120
51
|
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
121
56
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"""
|
|
125
|
-
|
|
126
|
-
raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501
|
|
127
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
128
|
-
email is not None and len(email) > 256):
|
|
129
|
-
raise ValueError("Invalid value for `email`, length must be less than or equal to `256`") # noqa: E501
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Self:
|
|
59
|
+
"""Create an instance of UserIn from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
130
61
|
|
|
131
|
-
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
132
64
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"""Gets the is_superuser of this UserIn. # noqa: E501
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
136
67
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
140
71
|
"""
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
:param is_staff: The is_staff of this UserIn. # noqa: E501
|
|
170
|
-
:type is_staff: bool
|
|
171
|
-
"""
|
|
172
|
-
|
|
173
|
-
self._is_staff = is_staff
|
|
174
|
-
|
|
175
|
-
@property
|
|
176
|
-
def is_active(self):
|
|
177
|
-
"""Gets the is_active of this UserIn. # noqa: E501
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
:return: The is_active of this UserIn. # noqa: E501
|
|
181
|
-
:rtype: bool
|
|
182
|
-
"""
|
|
183
|
-
return self._is_active
|
|
184
|
-
|
|
185
|
-
@is_active.setter
|
|
186
|
-
def is_active(self, is_active):
|
|
187
|
-
"""Sets the is_active of this UserIn.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
:param is_active: The is_active of this UserIn. # noqa: E501
|
|
191
|
-
:type is_active: bool
|
|
192
|
-
"""
|
|
193
|
-
|
|
194
|
-
self._is_active = is_active
|
|
195
|
-
|
|
196
|
-
@property
|
|
197
|
-
def is_confirmed(self):
|
|
198
|
-
"""Gets the is_confirmed of this UserIn. # noqa: E501
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
:return: The is_confirmed of this UserIn. # noqa: E501
|
|
202
|
-
:rtype: bool
|
|
203
|
-
"""
|
|
204
|
-
return self._is_confirmed
|
|
205
|
-
|
|
206
|
-
@is_confirmed.setter
|
|
207
|
-
def is_confirmed(self, is_confirmed):
|
|
208
|
-
"""Sets the is_confirmed of this UserIn.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
:param is_confirmed: The is_confirmed of this UserIn. # noqa: E501
|
|
212
|
-
:type is_confirmed: bool
|
|
213
|
-
"""
|
|
214
|
-
|
|
215
|
-
self._is_confirmed = is_confirmed
|
|
216
|
-
|
|
217
|
-
def to_dict(self, serialize=False):
|
|
218
|
-
"""Returns the model properties as a dict"""
|
|
219
|
-
result = {}
|
|
220
|
-
|
|
221
|
-
def convert(x):
|
|
222
|
-
if hasattr(x, "to_dict"):
|
|
223
|
-
args = getfullargspec(x.to_dict).args
|
|
224
|
-
if len(args) == 1:
|
|
225
|
-
return x.to_dict()
|
|
226
|
-
else:
|
|
227
|
-
return x.to_dict(serialize)
|
|
228
|
-
else:
|
|
229
|
-
return x
|
|
230
|
-
|
|
231
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
232
|
-
value = getattr(self, attr)
|
|
233
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
234
|
-
if isinstance(value, list):
|
|
235
|
-
result[attr] = list(map(
|
|
236
|
-
lambda x: convert(x),
|
|
237
|
-
value
|
|
238
|
-
))
|
|
239
|
-
elif isinstance(value, dict):
|
|
240
|
-
result[attr] = dict(map(
|
|
241
|
-
lambda item: (item[0], convert(item[1])),
|
|
242
|
-
value.items()
|
|
243
|
-
))
|
|
244
|
-
else:
|
|
245
|
-
result[attr] = convert(value)
|
|
246
|
-
|
|
247
|
-
return result
|
|
248
|
-
|
|
249
|
-
def to_str(self):
|
|
250
|
-
"""Returns the string representation of the model"""
|
|
251
|
-
return pprint.pformat(self.to_dict())
|
|
252
|
-
|
|
253
|
-
def __repr__(self):
|
|
254
|
-
"""For `print` and `pprint`"""
|
|
255
|
-
return self.to_str()
|
|
256
|
-
|
|
257
|
-
def __eq__(self, other):
|
|
258
|
-
"""Returns true if both objects are equal"""
|
|
259
|
-
if not isinstance(other, UserIn):
|
|
260
|
-
return False
|
|
261
|
-
|
|
262
|
-
return self.to_dict() == other.to_dict()
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude={
|
|
75
|
+
},
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
82
|
+
"""Create an instance of UserIn from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return cls.model_validate(obj)
|
|
88
|
+
|
|
89
|
+
_obj = cls.model_validate({
|
|
90
|
+
"full_name": obj.get("full_name"),
|
|
91
|
+
"email": obj.get("email"),
|
|
92
|
+
"is_superuser": obj.get("is_superuser") if obj.get("is_superuser") is not None else False,
|
|
93
|
+
"is_staff": obj.get("is_staff") if obj.get("is_staff") is not None else False,
|
|
94
|
+
"is_active": obj.get("is_active") if obj.get("is_active") is not None else False,
|
|
95
|
+
"is_confirmed": obj.get("is_confirmed") if obj.get("is_confirmed") is not None else False
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
263
98
|
|
|
264
|
-
def __ne__(self, other):
|
|
265
|
-
"""Returns true if both objects are not equal"""
|
|
266
|
-
if not isinstance(other, UserIn):
|
|
267
|
-
return True
|
|
268
99
|
|
|
269
|
-
return self.to_dict() != other.to_dict()
|
|
@@ -3,184 +3,97 @@
|
|
|
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
|
|
18
|
+
import json
|
|
20
19
|
|
|
21
|
-
from compute_api_client.configuration import Configuration
|
|
22
20
|
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from pydantic import BaseModel, StrictStr
|
|
23
|
+
from compute_api_client.models.location_inner import LocationInner
|
|
24
|
+
try:
|
|
25
|
+
from typing import Self
|
|
26
|
+
except ImportError:
|
|
27
|
+
from typing_extensions import Self
|
|
23
28
|
|
|
24
|
-
class ValidationError(
|
|
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
|
-
|
|
29
|
+
class ValidationError(BaseModel):
|
|
31
30
|
"""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"""
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
attribute_map = {
|
|
45
|
-
'loc': 'loc',
|
|
46
|
-
'msg': 'msg',
|
|
47
|
-
'type': 'type'
|
|
31
|
+
ValidationError
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
loc: List[LocationInner]
|
|
34
|
+
msg: StrictStr
|
|
35
|
+
type: StrictStr
|
|
36
|
+
__properties: ClassVar[List[str]] = ["loc", "msg", "type"]
|
|
37
|
+
|
|
38
|
+
model_config = {
|
|
39
|
+
"populate_by_name": True,
|
|
40
|
+
"validate_assignment": True
|
|
48
41
|
}
|
|
49
42
|
|
|
50
|
-
def __init__(self, loc=None, msg=None, type=None, local_vars_configuration=None): # noqa: E501
|
|
51
|
-
"""ValidationError - a model defined in OpenAPI""" # noqa: E501
|
|
52
|
-
if local_vars_configuration is None:
|
|
53
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
54
|
-
self.local_vars_configuration = local_vars_configuration
|
|
55
|
-
|
|
56
|
-
self._loc = None
|
|
57
|
-
self._msg = None
|
|
58
|
-
self._type = None
|
|
59
|
-
self.discriminator = None
|
|
60
43
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
self.
|
|
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))
|
|
64
47
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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())
|
|
68
52
|
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Self:
|
|
55
|
+
"""Create an instance of ValidationError from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
69
57
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"""
|
|
73
|
-
return self._loc
|
|
74
|
-
|
|
75
|
-
@loc.setter
|
|
76
|
-
def loc(self, loc):
|
|
77
|
-
"""Sets the loc of this ValidationError.
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
78
60
|
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
79
63
|
|
|
80
|
-
|
|
81
|
-
|
|
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.
|
|
82
67
|
"""
|
|
83
|
-
|
|
84
|
-
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude={
|
|
71
|
+
},
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in loc (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.loc:
|
|
77
|
+
for _item in self.loc:
|
|
78
|
+
if _item:
|
|
79
|
+
_items.append(_item.to_dict())
|
|
80
|
+
_dict['loc'] = _items
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
85
|
+
"""Create an instance of ValidationError from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"loc": [LocationInner.from_dict(_item) for _item in obj.get("loc")] if obj.get("loc") is not None else None,
|
|
94
|
+
"msg": obj.get("msg"),
|
|
95
|
+
"type": obj.get("type")
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
85
98
|
|
|
86
|
-
self._loc = loc
|
|
87
99
|
|
|
88
|
-
@property
|
|
89
|
-
def msg(self):
|
|
90
|
-
"""Gets the msg of this ValidationError. # noqa: E501
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
:return: The msg of this ValidationError. # noqa: E501
|
|
94
|
-
:rtype: str
|
|
95
|
-
"""
|
|
96
|
-
return self._msg
|
|
97
|
-
|
|
98
|
-
@msg.setter
|
|
99
|
-
def msg(self, msg):
|
|
100
|
-
"""Sets the msg of this ValidationError.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
:param msg: The msg of this ValidationError. # noqa: E501
|
|
104
|
-
:type msg: str
|
|
105
|
-
"""
|
|
106
|
-
if self.local_vars_configuration.client_side_validation and msg is None: # noqa: E501
|
|
107
|
-
raise ValueError("Invalid value for `msg`, must not be `None`") # noqa: E501
|
|
108
|
-
|
|
109
|
-
self._msg = msg
|
|
110
|
-
|
|
111
|
-
@property
|
|
112
|
-
def type(self):
|
|
113
|
-
"""Gets the type of this ValidationError. # noqa: E501
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
:return: The type of this ValidationError. # noqa: E501
|
|
117
|
-
:rtype: str
|
|
118
|
-
"""
|
|
119
|
-
return self._type
|
|
120
|
-
|
|
121
|
-
@type.setter
|
|
122
|
-
def type(self, type):
|
|
123
|
-
"""Sets the type of this ValidationError.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
:param type: The type of this ValidationError. # noqa: E501
|
|
127
|
-
:type type: str
|
|
128
|
-
"""
|
|
129
|
-
if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
|
|
130
|
-
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
|
131
|
-
|
|
132
|
-
self._type = type
|
|
133
|
-
|
|
134
|
-
def to_dict(self, serialize=False):
|
|
135
|
-
"""Returns the model properties as a dict"""
|
|
136
|
-
result = {}
|
|
137
|
-
|
|
138
|
-
def convert(x):
|
|
139
|
-
if hasattr(x, "to_dict"):
|
|
140
|
-
args = getfullargspec(x.to_dict).args
|
|
141
|
-
if len(args) == 1:
|
|
142
|
-
return x.to_dict()
|
|
143
|
-
else:
|
|
144
|
-
return x.to_dict(serialize)
|
|
145
|
-
else:
|
|
146
|
-
return x
|
|
147
|
-
|
|
148
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
149
|
-
value = getattr(self, attr)
|
|
150
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
151
|
-
if isinstance(value, list):
|
|
152
|
-
result[attr] = list(map(
|
|
153
|
-
lambda x: convert(x),
|
|
154
|
-
value
|
|
155
|
-
))
|
|
156
|
-
elif isinstance(value, dict):
|
|
157
|
-
result[attr] = dict(map(
|
|
158
|
-
lambda item: (item[0], convert(item[1])),
|
|
159
|
-
value.items()
|
|
160
|
-
))
|
|
161
|
-
else:
|
|
162
|
-
result[attr] = convert(value)
|
|
163
|
-
|
|
164
|
-
return result
|
|
165
|
-
|
|
166
|
-
def to_str(self):
|
|
167
|
-
"""Returns the string representation of the model"""
|
|
168
|
-
return pprint.pformat(self.to_dict())
|
|
169
|
-
|
|
170
|
-
def __repr__(self):
|
|
171
|
-
"""For `print` and `pprint`"""
|
|
172
|
-
return self.to_str()
|
|
173
|
-
|
|
174
|
-
def __eq__(self, other):
|
|
175
|
-
"""Returns true if both objects are equal"""
|
|
176
|
-
if not isinstance(other, ValidationError):
|
|
177
|
-
return False
|
|
178
|
-
|
|
179
|
-
return self.to_dict() == other.to_dict()
|
|
180
|
-
|
|
181
|
-
def __ne__(self, other):
|
|
182
|
-
"""Returns true if both objects are not equal"""
|
|
183
|
-
if not isinstance(other, ValidationError):
|
|
184
|
-
return True
|
|
185
|
-
|
|
186
|
-
return self.to_dict() != other.to_dict()
|