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,228 +3,100 @@
|
|
|
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
|
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from pydantic import BaseModel, StrictInt
|
|
23
|
+
from pydantic import Field
|
|
24
|
+
from typing_extensions import Annotated
|
|
25
|
+
from compute_api_client.models.algorithm_type import AlgorithmType
|
|
26
|
+
from compute_api_client.models.share_type import ShareType
|
|
27
|
+
try:
|
|
28
|
+
from typing import Self
|
|
29
|
+
except ImportError:
|
|
30
|
+
from typing_extensions import Self
|
|
30
31
|
|
|
32
|
+
class AlgorithmIn(BaseModel):
|
|
31
33
|
"""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
attribute_map = {
|
|
46
|
-
'type': 'type',
|
|
47
|
-
'shared': 'shared',
|
|
48
|
-
'link': 'link',
|
|
49
|
-
'project_id': 'project_id'
|
|
34
|
+
AlgorithmIn
|
|
35
|
+
""" # noqa: E501
|
|
36
|
+
project_id: StrictInt
|
|
37
|
+
type: AlgorithmType
|
|
38
|
+
shared: ShareType
|
|
39
|
+
link: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None
|
|
40
|
+
__properties: ClassVar[List[str]] = ["project_id", "type", "shared", "link"]
|
|
41
|
+
|
|
42
|
+
model_config = {
|
|
43
|
+
"populate_by_name": True,
|
|
44
|
+
"validate_assignment": True
|
|
50
45
|
}
|
|
51
46
|
|
|
52
|
-
def __init__(self, type=None, shared=None, link=None, project_id=None, local_vars_configuration=None): # noqa: E501
|
|
53
|
-
"""AlgorithmIn - a model defined in OpenAPI""" # noqa: E501
|
|
54
|
-
if local_vars_configuration is None:
|
|
55
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
56
|
-
self.local_vars_configuration = local_vars_configuration
|
|
57
|
-
|
|
58
|
-
self._type = None
|
|
59
|
-
self._shared = None
|
|
60
|
-
self._link = None
|
|
61
|
-
self._project_id = None
|
|
62
|
-
self.discriminator = None
|
|
63
|
-
|
|
64
|
-
self.type = type
|
|
65
|
-
self.shared = shared
|
|
66
|
-
self.link = link
|
|
67
|
-
self.project_id = project_id
|
|
68
|
-
|
|
69
|
-
@property
|
|
70
|
-
def type(self):
|
|
71
|
-
"""Gets the type of this AlgorithmIn. # noqa: E501
|
|
72
|
-
|
|
73
|
-
HYBRID: hybrid<br/>QUANTUM: quantum # noqa: E501
|
|
74
|
-
|
|
75
|
-
:return: The type of this AlgorithmIn. # noqa: E501
|
|
76
|
-
:rtype: AlgorithmType
|
|
77
|
-
"""
|
|
78
|
-
return self._type
|
|
79
|
-
|
|
80
|
-
@type.setter
|
|
81
|
-
def type(self, type):
|
|
82
|
-
"""Sets the type of this AlgorithmIn.
|
|
83
47
|
|
|
84
|
-
|
|
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))
|
|
85
51
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
|
91
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
92
|
-
type is not None and len(type) > 7):
|
|
93
|
-
raise ValueError("Invalid value for `type`, length must be less than or equal to `7`") # noqa: E501
|
|
94
|
-
|
|
95
|
-
self._type = type
|
|
96
|
-
|
|
97
|
-
@property
|
|
98
|
-
def shared(self):
|
|
99
|
-
"""Gets the shared of this AlgorithmIn. # noqa: E501
|
|
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())
|
|
100
56
|
|
|
101
|
-
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Self:
|
|
59
|
+
"""Create an instance of AlgorithmIn from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
102
61
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"""
|
|
106
|
-
return self._shared
|
|
107
|
-
|
|
108
|
-
@shared.setter
|
|
109
|
-
def shared(self, shared):
|
|
110
|
-
"""Sets the shared of this AlgorithmIn.
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
111
64
|
|
|
112
|
-
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
113
67
|
|
|
114
|
-
|
|
115
|
-
|
|
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.
|
|
116
71
|
"""
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"""
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude={
|
|
75
|
+
},
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
# set to None if link (nullable) is None
|
|
79
|
+
# and model_fields_set contains the field
|
|
80
|
+
if self.link is None and "link" in self.model_fields_set:
|
|
81
|
+
_dict['link'] = None
|
|
82
|
+
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
87
|
+
"""Create an instance of AlgorithmIn from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"project_id": obj.get("project_id"),
|
|
96
|
+
"type": obj.get("type"),
|
|
97
|
+
"shared": obj.get("shared"),
|
|
98
|
+
"link": obj.get("link")
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
138
101
|
|
|
139
102
|
|
|
140
|
-
:param link: The link of this AlgorithmIn. # noqa: E501
|
|
141
|
-
:type link: str
|
|
142
|
-
"""
|
|
143
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
144
|
-
link is not None and len(link) > 255):
|
|
145
|
-
raise ValueError("Invalid value for `link`, length must be less than or equal to `255`") # noqa: E501
|
|
146
|
-
|
|
147
|
-
self._link = link
|
|
148
|
-
|
|
149
|
-
@property
|
|
150
|
-
def project_id(self):
|
|
151
|
-
"""Gets the project_id of this AlgorithmIn. # noqa: E501
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
:return: The project_id of this AlgorithmIn. # noqa: E501
|
|
155
|
-
:rtype: int
|
|
156
|
-
"""
|
|
157
|
-
return self._project_id
|
|
158
|
-
|
|
159
|
-
@project_id.setter
|
|
160
|
-
def project_id(self, project_id):
|
|
161
|
-
"""Sets the project_id of this AlgorithmIn.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
:param project_id: The project_id of this AlgorithmIn. # noqa: E501
|
|
165
|
-
:type project_id: int
|
|
166
|
-
"""
|
|
167
|
-
if self.local_vars_configuration.client_side_validation and project_id is None: # noqa: E501
|
|
168
|
-
raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501
|
|
169
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
170
|
-
project_id is not None and project_id > 2147483647): # noqa: E501
|
|
171
|
-
raise ValueError("Invalid value for `project_id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
172
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
173
|
-
project_id is not None and project_id < 1): # noqa: E501
|
|
174
|
-
raise ValueError("Invalid value for `project_id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
175
|
-
|
|
176
|
-
self._project_id = project_id
|
|
177
|
-
|
|
178
|
-
def to_dict(self, serialize=False):
|
|
179
|
-
"""Returns the model properties as a dict"""
|
|
180
|
-
result = {}
|
|
181
|
-
|
|
182
|
-
def convert(x):
|
|
183
|
-
if hasattr(x, "to_dict"):
|
|
184
|
-
args = getfullargspec(x.to_dict).args
|
|
185
|
-
if len(args) == 1:
|
|
186
|
-
return x.to_dict()
|
|
187
|
-
else:
|
|
188
|
-
return x.to_dict(serialize)
|
|
189
|
-
else:
|
|
190
|
-
return x
|
|
191
|
-
|
|
192
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
193
|
-
value = getattr(self, attr)
|
|
194
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
195
|
-
if isinstance(value, list):
|
|
196
|
-
result[attr] = list(map(
|
|
197
|
-
lambda x: convert(x),
|
|
198
|
-
value
|
|
199
|
-
))
|
|
200
|
-
elif isinstance(value, dict):
|
|
201
|
-
result[attr] = dict(map(
|
|
202
|
-
lambda item: (item[0], convert(item[1])),
|
|
203
|
-
value.items()
|
|
204
|
-
))
|
|
205
|
-
else:
|
|
206
|
-
result[attr] = convert(value)
|
|
207
|
-
|
|
208
|
-
return result
|
|
209
|
-
|
|
210
|
-
def to_str(self):
|
|
211
|
-
"""Returns the string representation of the model"""
|
|
212
|
-
return pprint.pformat(self.to_dict())
|
|
213
|
-
|
|
214
|
-
def __repr__(self):
|
|
215
|
-
"""For `print` and `pprint`"""
|
|
216
|
-
return self.to_str()
|
|
217
|
-
|
|
218
|
-
def __eq__(self, other):
|
|
219
|
-
"""Returns true if both objects are equal"""
|
|
220
|
-
if not isinstance(other, AlgorithmIn):
|
|
221
|
-
return False
|
|
222
|
-
|
|
223
|
-
return self.to_dict() == other.to_dict()
|
|
224
|
-
|
|
225
|
-
def __ne__(self, other):
|
|
226
|
-
"""Returns true if both objects are not equal"""
|
|
227
|
-
if not isinstance(other, AlgorithmIn):
|
|
228
|
-
return True
|
|
229
|
-
|
|
230
|
-
return self.to_dict() != other.to_dict()
|
|
@@ -3,109 +3,43 @@
|
|
|
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
|
-
|
|
16
|
-
from inspect import getargspec as getfullargspec
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
17
|
import pprint
|
|
18
18
|
import re # noqa: F401
|
|
19
|
-
import
|
|
19
|
+
from enum import Enum
|
|
20
20
|
|
|
21
|
-
from compute_api_client.configuration import Configuration
|
|
22
21
|
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
try:
|
|
24
|
+
from typing import Self
|
|
25
|
+
except ImportError:
|
|
26
|
+
from typing_extensions import Self
|
|
27
27
|
|
|
28
|
-
Do not edit the class manually.
|
|
29
|
-
"""
|
|
30
28
|
|
|
29
|
+
class AlgorithmType(str, Enum):
|
|
31
30
|
"""
|
|
32
|
-
|
|
31
|
+
AlgorithmType
|
|
33
32
|
"""
|
|
34
|
-
HYBRID = "hybrid"
|
|
35
|
-
QUANTUM = "quantum"
|
|
36
|
-
|
|
37
|
-
allowable_values = [HYBRID, QUANTUM] # noqa: E501
|
|
38
33
|
|
|
39
34
|
"""
|
|
40
|
-
|
|
41
|
-
openapi_types (dict): The key is attribute name
|
|
42
|
-
and the value is attribute type.
|
|
43
|
-
attribute_map (dict): The key is attribute name
|
|
44
|
-
and the value is json key in definition.
|
|
35
|
+
allowed enum values
|
|
45
36
|
"""
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
attribute_map = {
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
def __init__(self, local_vars_configuration=None): # noqa: E501
|
|
53
|
-
"""AlgorithmType - a model defined in OpenAPI""" # noqa: E501
|
|
54
|
-
if local_vars_configuration is None:
|
|
55
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
56
|
-
self.local_vars_configuration = local_vars_configuration
|
|
57
|
-
self.discriminator = None
|
|
58
|
-
|
|
59
|
-
def to_dict(self, serialize=False):
|
|
60
|
-
"""Returns the model properties as a dict"""
|
|
61
|
-
result = {}
|
|
62
|
-
|
|
63
|
-
def convert(x):
|
|
64
|
-
if hasattr(x, "to_dict"):
|
|
65
|
-
args = getfullargspec(x.to_dict).args
|
|
66
|
-
if len(args) == 1:
|
|
67
|
-
return x.to_dict()
|
|
68
|
-
else:
|
|
69
|
-
return x.to_dict(serialize)
|
|
70
|
-
else:
|
|
71
|
-
return x
|
|
72
|
-
|
|
73
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
74
|
-
value = getattr(self, attr)
|
|
75
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
76
|
-
if isinstance(value, list):
|
|
77
|
-
result[attr] = list(map(
|
|
78
|
-
lambda x: convert(x),
|
|
79
|
-
value
|
|
80
|
-
))
|
|
81
|
-
elif isinstance(value, dict):
|
|
82
|
-
result[attr] = dict(map(
|
|
83
|
-
lambda item: (item[0], convert(item[1])),
|
|
84
|
-
value.items()
|
|
85
|
-
))
|
|
86
|
-
else:
|
|
87
|
-
result[attr] = convert(value)
|
|
88
|
-
|
|
89
|
-
return result
|
|
90
|
-
|
|
91
|
-
def to_str(self):
|
|
92
|
-
"""Returns the string representation of the model"""
|
|
93
|
-
return pprint.pformat(self.to_dict())
|
|
94
|
-
|
|
95
|
-
def __repr__(self):
|
|
96
|
-
"""For `print` and `pprint`"""
|
|
97
|
-
return self.to_str()
|
|
98
|
-
|
|
99
|
-
def __eq__(self, other):
|
|
100
|
-
"""Returns true if both objects are equal"""
|
|
101
|
-
if not isinstance(other, AlgorithmType):
|
|
102
|
-
return False
|
|
37
|
+
HYBRID = 'hybrid'
|
|
38
|
+
QUANTUM = 'quantum'
|
|
103
39
|
|
|
104
|
-
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_json(cls, json_str: str) -> Self:
|
|
42
|
+
"""Create an instance of AlgorithmType from a JSON string"""
|
|
43
|
+
return cls(json.loads(json_str))
|
|
105
44
|
|
|
106
|
-
def __ne__(self, other):
|
|
107
|
-
"""Returns true if both objects are not equal"""
|
|
108
|
-
if not isinstance(other, AlgorithmType):
|
|
109
|
-
return True
|
|
110
45
|
|
|
111
|
-
return self.to_dict() != other.to_dict()
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Quantum Inspire 2
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from pydantic import BaseModel, StrictInt
|
|
23
|
+
from pydantic import Field
|
|
24
|
+
from typing_extensions import Annotated
|
|
25
|
+
from compute_api_client.models.backend_status import BackendStatus
|
|
26
|
+
try:
|
|
27
|
+
from typing import Self
|
|
28
|
+
except ImportError:
|
|
29
|
+
from typing_extensions import Self
|
|
30
|
+
|
|
31
|
+
class Backend(BaseModel):
|
|
32
|
+
"""
|
|
33
|
+
Backend
|
|
34
|
+
""" # noqa: E501
|
|
35
|
+
id: StrictInt
|
|
36
|
+
name: Annotated[str, Field(strict=True, max_length=32)]
|
|
37
|
+
location: Annotated[str, Field(strict=True, max_length=32)]
|
|
38
|
+
backend_type_id: StrictInt
|
|
39
|
+
status: BackendStatus
|
|
40
|
+
last_heartbeat: datetime
|
|
41
|
+
__properties: ClassVar[List[str]] = ["id", "name", "location", "backend_type_id", "status", "last_heartbeat"]
|
|
42
|
+
|
|
43
|
+
model_config = {
|
|
44
|
+
"populate_by_name": True,
|
|
45
|
+
"validate_assignment": True
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Self:
|
|
60
|
+
"""Create an instance of Backend from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude={
|
|
76
|
+
},
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
83
|
+
"""Create an instance of Backend from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"id": obj.get("id"),
|
|
92
|
+
"name": obj.get("name"),
|
|
93
|
+
"location": obj.get("location"),
|
|
94
|
+
"backend_type_id": obj.get("backend_type_id"),
|
|
95
|
+
"status": obj.get("status"),
|
|
96
|
+
"last_heartbeat": obj.get("last_heartbeat")
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Quantum Inspire 2
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from pydantic import BaseModel
|
|
23
|
+
from compute_api_client.models.backend_status import BackendStatus
|
|
24
|
+
try:
|
|
25
|
+
from typing import Self
|
|
26
|
+
except ImportError:
|
|
27
|
+
from typing_extensions import Self
|
|
28
|
+
|
|
29
|
+
class BackendPatch(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
BackendPatch
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
status: BackendStatus
|
|
34
|
+
last_heartbeat: datetime
|
|
35
|
+
__properties: ClassVar[List[str]] = ["status", "last_heartbeat"]
|
|
36
|
+
|
|
37
|
+
model_config = {
|
|
38
|
+
"populate_by_name": True,
|
|
39
|
+
"validate_assignment": True
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Self:
|
|
54
|
+
"""Create an instance of BackendPatch from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude={
|
|
70
|
+
},
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
77
|
+
"""Create an instance of BackendPatch from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"status": obj.get("status"),
|
|
86
|
+
"last_heartbeat": obj.get("last_heartbeat")
|
|
87
|
+
})
|
|
88
|
+
return _obj
|
|
89
|
+
|
|
90
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Quantum Inspire 2
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
from enum import Enum
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
try:
|
|
24
|
+
from typing import Self
|
|
25
|
+
except ImportError:
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class BackendStatus(str, Enum):
|
|
30
|
+
"""
|
|
31
|
+
BackendStatus
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
"""
|
|
35
|
+
allowed enum values
|
|
36
|
+
"""
|
|
37
|
+
OFFLINE = 'offline'
|
|
38
|
+
IDLE = 'idle'
|
|
39
|
+
EXECUTING = 'executing'
|
|
40
|
+
CALIBRATING = 'calibrating'
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_json(cls, json_str: str) -> Self:
|
|
44
|
+
"""Create an instance of BackendStatus from a JSON string"""
|
|
45
|
+
return cls(json.loads(json_str))
|
|
46
|
+
|
|
47
|
+
|