qi-compute-api-client 0.53.0__py3-none-any.whl → 0.54.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 +194 -95
- compute_api_client/api/algorithms_api.py +75 -81
- compute_api_client/api/auth_config_api.py +16 -24
- compute_api_client/api/backend_api.py +70 -86
- compute_api_client/api/backend_types_api.py +43 -56
- compute_api_client/api/batch_jobs_api.py +102 -120
- compute_api_client/api/commits_api.py +85 -80
- compute_api_client/api/files_api.py +62 -67
- compute_api_client/api/final_results_api.py +42 -53
- compute_api_client/api/health_api.py +16 -25
- compute_api_client/api/jobs_api.py +76 -83
- compute_api_client/api/languages_api.py +30 -42
- compute_api_client/api/members_api.py +62 -67
- compute_api_client/api/permissions_api.py +56 -70
- compute_api_client/api/projects_api.py +89 -97
- compute_api_client/api/reservations_api.py +57 -72
- compute_api_client/api/results_api.py +76 -83
- compute_api_client/api/teams_api.py +30 -42
- compute_api_client/api/transactions_api.py +31 -44
- compute_api_client/api/users_api.py +62 -67
- compute_api_client/api_client.py +135 -75
- compute_api_client/api_response.py +3 -3
- compute_api_client/configuration.py +176 -36
- compute_api_client/docs/Algorithm.md +8 -7
- compute_api_client/docs/AlgorithmIn.md +7 -6
- compute_api_client/docs/AlgorithmType.md +5 -3
- compute_api_client/docs/AlgorithmsApi.md +15 -10
- compute_api_client/docs/AuthConfig.md +3 -2
- compute_api_client/docs/AuthConfigApi.md +3 -2
- compute_api_client/docs/Backend.md +9 -8
- compute_api_client/docs/BackendApi.md +15 -10
- compute_api_client/docs/BackendIn.md +8 -7
- compute_api_client/docs/BackendPatch.md +5 -4
- compute_api_client/docs/BackendStatus.md +9 -3
- compute_api_client/docs/BackendType.md +20 -19
- compute_api_client/docs/BackendTypePatch.md +3 -2
- compute_api_client/docs/BackendTypesApi.md +15 -8
- compute_api_client/docs/BackendWithAuthentication.md +10 -9
- compute_api_client/docs/BatchJob.md +10 -9
- compute_api_client/docs/BatchJobIn.md +4 -3
- compute_api_client/docs/BatchJobStatus.md +11 -3
- compute_api_client/docs/BatchJobsApi.md +23 -16
- compute_api_client/docs/Commit.md +8 -7
- compute_api_client/docs/CommitIn.md +5 -4
- compute_api_client/docs/CommitsApi.md +15 -10
- compute_api_client/docs/CompilePayload.md +4 -3
- compute_api_client/docs/CompileStage.md +11 -3
- compute_api_client/docs/Domain.md +7 -3
- compute_api_client/docs/File.md +10 -9
- compute_api_client/docs/FileIn.md +9 -8
- compute_api_client/docs/FilesApi.md +12 -8
- compute_api_client/docs/FinalResult.md +7 -6
- compute_api_client/docs/FinalResultIn.md +5 -4
- compute_api_client/docs/FinalResultsApi.md +9 -6
- compute_api_client/docs/HTTPBadRequestError.md +3 -2
- compute_api_client/docs/HTTPNotFoundError.md +3 -2
- compute_api_client/docs/HTTPValidationError.md +3 -2
- compute_api_client/docs/HealthApi.md +3 -2
- compute_api_client/docs/Job.md +13 -12
- compute_api_client/docs/Job1.md +28 -0
- compute_api_client/docs/JobIn.md +6 -5
- compute_api_client/docs/JobPatch.md +8 -7
- compute_api_client/docs/JobStatus.md +11 -3
- compute_api_client/docs/JobsApi.md +15 -10
- compute_api_client/docs/Language.md +6 -5
- compute_api_client/docs/LanguagesApi.md +6 -4
- compute_api_client/docs/Member.md +8 -7
- compute_api_client/docs/MemberId.md +28 -0
- compute_api_client/docs/MemberIn.md +7 -6
- compute_api_client/docs/MembersApi.md +12 -8
- compute_api_client/docs/PageAlgorithm.md +3 -2
- compute_api_client/docs/PageBackend.md +3 -2
- compute_api_client/docs/PageBackendType.md +3 -2
- compute_api_client/docs/PageBatchJob.md +3 -2
- compute_api_client/docs/PageCommit.md +3 -2
- compute_api_client/docs/PageFile.md +3 -2
- compute_api_client/docs/PageJob.md +3 -2
- compute_api_client/docs/PageLanguage.md +3 -2
- compute_api_client/docs/PageMember.md +3 -2
- compute_api_client/docs/PagePermission.md +3 -2
- compute_api_client/docs/PagePermissionGroup.md +3 -2
- compute_api_client/docs/PageProject.md +3 -2
- compute_api_client/docs/PageReservation.md +3 -2
- compute_api_client/docs/PageResult.md +3 -2
- compute_api_client/docs/PageTeam.md +3 -2
- compute_api_client/docs/PageTransaction.md +3 -2
- compute_api_client/docs/PageUser.md +3 -2
- compute_api_client/docs/Permission.md +6 -5
- compute_api_client/docs/PermissionGroup.md +5 -4
- compute_api_client/docs/PermissionsApi.md +12 -8
- compute_api_client/docs/Project.md +9 -8
- compute_api_client/docs/ProjectIn.md +7 -6
- compute_api_client/docs/ProjectPatch.md +3 -2
- compute_api_client/docs/ProjectsApi.md +23 -13
- compute_api_client/docs/Reservation.md +9 -8
- compute_api_client/docs/ReservationIn.md +7 -6
- compute_api_client/docs/ReservationsApi.md +12 -8
- compute_api_client/docs/Result.md +7 -6
- compute_api_client/docs/ResultIn.md +5 -4
- compute_api_client/docs/ResultsApi.md +15 -10
- compute_api_client/docs/Role.md +5 -3
- compute_api_client/docs/ShareType.md +7 -3
- compute_api_client/docs/Team.md +7 -6
- compute_api_client/docs/TeamsApi.md +6 -4
- compute_api_client/docs/Transaction.md +6 -5
- compute_api_client/docs/TransactionDomain.md +28 -0
- compute_api_client/docs/TransactionsApi.md +6 -4
- compute_api_client/docs/User.md +11 -10
- compute_api_client/docs/UserIn.md +10 -9
- compute_api_client/docs/UsersApi.md +12 -8
- compute_api_client/docs/ValidationError.md +4 -3
- compute_api_client/docs/ValidationErrorLocInner.md +28 -0
- compute_api_client/exceptions.py +74 -24
- compute_api_client/models/__init__.py +1 -1
- compute_api_client/models/algorithm.py +19 -20
- compute_api_client/models/algorithm_in.py +18 -19
- compute_api_client/models/algorithm_type.py +1 -9
- compute_api_client/models/auth_config.py +14 -14
- compute_api_client/models/backend.py +20 -20
- compute_api_client/models/backend_in.py +19 -19
- compute_api_client/models/backend_patch.py +16 -15
- compute_api_client/models/backend_status.py +1 -9
- compute_api_client/models/backend_type.py +31 -32
- compute_api_client/models/backend_type_patch.py +14 -15
- compute_api_client/models/backend_with_authentication.py +21 -21
- compute_api_client/models/batch_job.py +21 -20
- compute_api_client/models/batch_job_in.py +15 -15
- compute_api_client/models/batch_job_status.py +1 -9
- compute_api_client/models/commit.py +19 -19
- compute_api_client/models/commit_in.py +16 -16
- compute_api_client/models/compile_payload.py +15 -15
- compute_api_client/models/compile_stage.py +1 -9
- compute_api_client/models/domain.py +1 -9
- compute_api_client/models/file.py +21 -22
- compute_api_client/models/file_in.py +20 -21
- compute_api_client/models/final_result.py +18 -17
- compute_api_client/models/final_result_in.py +16 -16
- compute_api_client/models/http_bad_request_error.py +14 -14
- compute_api_client/models/http_not_found_error.py +14 -14
- compute_api_client/models/http_validation_error.py +18 -18
- compute_api_client/models/job.py +24 -24
- compute_api_client/models/job1.py +144 -0
- compute_api_client/models/job_in.py +17 -17
- compute_api_client/models/job_patch.py +19 -20
- compute_api_client/models/job_status.py +1 -9
- compute_api_client/models/language.py +17 -18
- compute_api_client/models/member.py +19 -19
- compute_api_client/models/member_id.py +144 -0
- compute_api_client/models/member_in.py +18 -18
- compute_api_client/models/page_algorithm.py +18 -19
- compute_api_client/models/page_backend.py +18 -19
- compute_api_client/models/page_backend_type.py +18 -19
- compute_api_client/models/page_batch_job.py +18 -19
- compute_api_client/models/page_commit.py +18 -19
- compute_api_client/models/page_file.py +18 -19
- compute_api_client/models/page_job.py +18 -19
- compute_api_client/models/page_language.py +18 -19
- compute_api_client/models/page_member.py +18 -19
- compute_api_client/models/page_permission.py +18 -19
- compute_api_client/models/page_permission_group.py +18 -19
- compute_api_client/models/page_project.py +18 -19
- compute_api_client/models/page_reservation.py +18 -19
- compute_api_client/models/page_result.py +18 -19
- compute_api_client/models/page_team.py +18 -19
- compute_api_client/models/page_transaction.py +18 -19
- compute_api_client/models/page_user.py +18 -19
- compute_api_client/models/permission.py +17 -18
- compute_api_client/models/permission_group.py +16 -17
- compute_api_client/models/project.py +20 -20
- compute_api_client/models/project_in.py +18 -19
- compute_api_client/models/project_patch.py +14 -15
- compute_api_client/models/reservation.py +20 -19
- compute_api_client/models/reservation_in.py +18 -17
- compute_api_client/models/result.py +18 -17
- compute_api_client/models/result_in.py +16 -16
- compute_api_client/models/role.py +1 -9
- compute_api_client/models/share_type.py +1 -9
- compute_api_client/models/team.py +18 -19
- compute_api_client/models/transaction.py +17 -17
- compute_api_client/models/transaction_domain.py +142 -0
- compute_api_client/models/user.py +22 -23
- compute_api_client/models/user_in.py +21 -22
- compute_api_client/models/validation_error.py +20 -20
- compute_api_client/models/validation_error_loc_inner.py +138 -0
- compute_api_client/rest.py +51 -26
- {qi_compute_api_client-0.53.0.dist-info → qi_compute_api_client-0.54.0.dist-info}/METADATA +12 -9
- qi_compute_api_client-0.54.0.dist-info/RECORD +205 -0
- qi_compute_api_client-0.53.0.dist-info/RECORD +0 -197
- {qi_compute_api_client-0.53.0.dist-info → qi_compute_api_client-0.54.0.dist-info}/WHEEL +0 -0
- {qi_compute_api_client-0.53.0.dist-info → qi_compute_api_client-0.54.0.dist-info}/licenses/LICENSE.md +0 -0
compute_api_client/exceptions.py
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
Do not edit the class manually.
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
|
+
from typing import Any, Optional
|
|
15
|
+
from typing_extensions import Self
|
|
14
16
|
|
|
15
17
|
class OpenApiException(Exception):
|
|
16
18
|
"""The base exception class for all OpenAPIExceptions"""
|
|
@@ -101,17 +103,63 @@ class ApiKeyError(OpenApiException, KeyError):
|
|
|
101
103
|
|
|
102
104
|
class ApiException(OpenApiException):
|
|
103
105
|
|
|
104
|
-
def __init__(
|
|
106
|
+
def __init__(
|
|
107
|
+
self,
|
|
108
|
+
status=None,
|
|
109
|
+
reason=None,
|
|
110
|
+
http_resp=None,
|
|
111
|
+
*,
|
|
112
|
+
body: Optional[str] = None,
|
|
113
|
+
data: Optional[Any] = None,
|
|
114
|
+
) -> None:
|
|
115
|
+
self.status = status
|
|
116
|
+
self.reason = reason
|
|
117
|
+
self.body = body
|
|
118
|
+
self.data = data
|
|
119
|
+
self.headers = None
|
|
120
|
+
|
|
105
121
|
if http_resp:
|
|
106
|
-
self.status
|
|
107
|
-
|
|
108
|
-
self.
|
|
122
|
+
if self.status is None:
|
|
123
|
+
self.status = http_resp.status
|
|
124
|
+
if self.reason is None:
|
|
125
|
+
self.reason = http_resp.reason
|
|
126
|
+
if self.body is None:
|
|
127
|
+
try:
|
|
128
|
+
self.body = http_resp.data.decode('utf-8')
|
|
129
|
+
except Exception:
|
|
130
|
+
pass
|
|
109
131
|
self.headers = http_resp.getheaders()
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
132
|
+
|
|
133
|
+
@classmethod
|
|
134
|
+
def from_response(
|
|
135
|
+
cls,
|
|
136
|
+
*,
|
|
137
|
+
http_resp,
|
|
138
|
+
body: Optional[str],
|
|
139
|
+
data: Optional[Any],
|
|
140
|
+
) -> Self:
|
|
141
|
+
if http_resp.status == 400:
|
|
142
|
+
raise BadRequestException(http_resp=http_resp, body=body, data=data)
|
|
143
|
+
|
|
144
|
+
if http_resp.status == 401:
|
|
145
|
+
raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
|
|
146
|
+
|
|
147
|
+
if http_resp.status == 403:
|
|
148
|
+
raise ForbiddenException(http_resp=http_resp, body=body, data=data)
|
|
149
|
+
|
|
150
|
+
if http_resp.status == 404:
|
|
151
|
+
raise NotFoundException(http_resp=http_resp, body=body, data=data)
|
|
152
|
+
|
|
153
|
+
# Added new conditions for 409 and 422
|
|
154
|
+
if http_resp.status == 409:
|
|
155
|
+
raise ConflictException(http_resp=http_resp, body=body, data=data)
|
|
156
|
+
|
|
157
|
+
if http_resp.status == 422:
|
|
158
|
+
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
|
|
159
|
+
|
|
160
|
+
if 500 <= http_resp.status <= 599:
|
|
161
|
+
raise ServiceException(http_resp=http_resp, body=body, data=data)
|
|
162
|
+
raise ApiException(http_resp=http_resp, body=body, data=data)
|
|
115
163
|
|
|
116
164
|
def __str__(self):
|
|
117
165
|
"""Custom error messages for exception"""
|
|
@@ -121,38 +169,40 @@ class ApiException(OpenApiException):
|
|
|
121
169
|
error_message += "HTTP response headers: {0}\n".format(
|
|
122
170
|
self.headers)
|
|
123
171
|
|
|
124
|
-
if self.body:
|
|
125
|
-
error_message += "HTTP response body: {0}\n".format(self.body)
|
|
172
|
+
if self.data or self.body:
|
|
173
|
+
error_message += "HTTP response body: {0}\n".format(self.data or self.body)
|
|
126
174
|
|
|
127
175
|
return error_message
|
|
128
176
|
|
|
177
|
+
|
|
129
178
|
class BadRequestException(ApiException):
|
|
179
|
+
pass
|
|
130
180
|
|
|
131
|
-
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
|
132
|
-
super(BadRequestException, self).__init__(status, reason, http_resp)
|
|
133
181
|
|
|
134
182
|
class NotFoundException(ApiException):
|
|
135
|
-
|
|
136
|
-
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
|
137
|
-
super(NotFoundException, self).__init__(status, reason, http_resp)
|
|
183
|
+
pass
|
|
138
184
|
|
|
139
185
|
|
|
140
186
|
class UnauthorizedException(ApiException):
|
|
141
|
-
|
|
142
|
-
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
|
143
|
-
super(UnauthorizedException, self).__init__(status, reason, http_resp)
|
|
187
|
+
pass
|
|
144
188
|
|
|
145
189
|
|
|
146
190
|
class ForbiddenException(ApiException):
|
|
147
|
-
|
|
148
|
-
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
|
149
|
-
super(ForbiddenException, self).__init__(status, reason, http_resp)
|
|
191
|
+
pass
|
|
150
192
|
|
|
151
193
|
|
|
152
194
|
class ServiceException(ApiException):
|
|
195
|
+
pass
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
class ConflictException(ApiException):
|
|
199
|
+
"""Exception for HTTP 409 Conflict."""
|
|
200
|
+
pass
|
|
201
|
+
|
|
153
202
|
|
|
154
|
-
|
|
155
|
-
|
|
203
|
+
class UnprocessableEntityException(ApiException):
|
|
204
|
+
"""Exception for HTTP 422 Unprocessable Entity."""
|
|
205
|
+
pass
|
|
156
206
|
|
|
157
207
|
|
|
158
208
|
def render_path(path_to_item):
|
|
@@ -45,7 +45,6 @@ from compute_api_client.models.job_in import JobIn
|
|
|
45
45
|
from compute_api_client.models.job_patch import JobPatch
|
|
46
46
|
from compute_api_client.models.job_status import JobStatus
|
|
47
47
|
from compute_api_client.models.language import Language
|
|
48
|
-
from compute_api_client.models.location_inner import LocationInner
|
|
49
48
|
from compute_api_client.models.member import Member
|
|
50
49
|
from compute_api_client.models.member_in import MemberIn
|
|
51
50
|
from compute_api_client.models.page_algorithm import PageAlgorithm
|
|
@@ -81,3 +80,4 @@ from compute_api_client.models.transaction import Transaction
|
|
|
81
80
|
from compute_api_client.models.user import User
|
|
82
81
|
from compute_api_client.models.user_in import UserIn
|
|
83
82
|
from compute_api_client.models.validation_error import ValidationError
|
|
83
|
+
from compute_api_client.models.validation_error_loc_inner import ValidationErrorLocInner
|
|
@@ -17,34 +17,31 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel, StrictInt
|
|
23
|
-
from pydantic import Field
|
|
24
22
|
from typing_extensions import Annotated
|
|
25
23
|
from compute_api_client.models.algorithm_type import AlgorithmType
|
|
26
24
|
from compute_api_client.models.share_type import ShareType
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
except ImportError:
|
|
30
|
-
from typing_extensions import Self
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
31
27
|
|
|
32
28
|
class Algorithm(BaseModel):
|
|
33
29
|
"""
|
|
34
30
|
Algorithm
|
|
35
31
|
""" # noqa: E501
|
|
36
|
-
id: StrictInt
|
|
37
|
-
project_id: StrictInt
|
|
38
|
-
type: AlgorithmType
|
|
39
|
-
shared: ShareType
|
|
32
|
+
id: StrictInt = Field(description="ID of the algorithm")
|
|
33
|
+
project_id: StrictInt = Field(description="ID of the project")
|
|
34
|
+
type: AlgorithmType = Field(description="The type of algorithm i.e. hybrid or quantum")
|
|
35
|
+
shared: ShareType = Field(description="The sharing scope of the algorithm")
|
|
40
36
|
link: Optional[Annotated[str, Field(strict=True, max_length=255)]]
|
|
41
|
-
name: Annotated[str, Field(strict=True, max_length=255)]
|
|
37
|
+
name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="Name of the algorithm")
|
|
42
38
|
__properties: ClassVar[List[str]] = ["id", "project_id", "type", "shared", "link", "name"]
|
|
43
39
|
|
|
44
|
-
model_config =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
48
45
|
|
|
49
46
|
|
|
50
47
|
def to_str(self) -> str:
|
|
@@ -57,7 +54,7 @@ class Algorithm(BaseModel):
|
|
|
57
54
|
return json.dumps(self.to_dict())
|
|
58
55
|
|
|
59
56
|
@classmethod
|
|
60
|
-
def from_json(cls, json_str: str) -> Self:
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
58
|
"""Create an instance of Algorithm from a JSON string"""
|
|
62
59
|
return cls.from_dict(json.loads(json_str))
|
|
63
60
|
|
|
@@ -71,10 +68,12 @@ class Algorithm(BaseModel):
|
|
|
71
68
|
were set at model initialization. Other fields with value `None`
|
|
72
69
|
are ignored.
|
|
73
70
|
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
74
|
_dict = self.model_dump(
|
|
75
75
|
by_alias=True,
|
|
76
|
-
exclude=
|
|
77
|
-
},
|
|
76
|
+
exclude=excluded_fields,
|
|
78
77
|
exclude_none=True,
|
|
79
78
|
)
|
|
80
79
|
# set to None if link (nullable) is None
|
|
@@ -85,7 +84,7 @@ class Algorithm(BaseModel):
|
|
|
85
84
|
return _dict
|
|
86
85
|
|
|
87
86
|
@classmethod
|
|
88
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
88
|
"""Create an instance of Algorithm from a dict"""
|
|
90
89
|
if obj is None:
|
|
91
90
|
return None
|
|
@@ -17,33 +17,30 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel, StrictInt
|
|
23
|
-
from pydantic import Field
|
|
24
22
|
from typing_extensions import Annotated
|
|
25
23
|
from compute_api_client.models.algorithm_type import AlgorithmType
|
|
26
24
|
from compute_api_client.models.share_type import ShareType
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
except ImportError:
|
|
30
|
-
from typing_extensions import Self
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
31
27
|
|
|
32
28
|
class AlgorithmIn(BaseModel):
|
|
33
29
|
"""
|
|
34
30
|
AlgorithmIn
|
|
35
31
|
""" # noqa: E501
|
|
36
|
-
project_id: StrictInt
|
|
37
|
-
type: AlgorithmType
|
|
38
|
-
shared: ShareType
|
|
32
|
+
project_id: StrictInt = Field(description="ID of the project")
|
|
33
|
+
type: AlgorithmType = Field(description="The type of algorithm i.e. hybrid or quantum")
|
|
34
|
+
shared: ShareType = Field(description="The sharing scope of the algorithm")
|
|
39
35
|
link: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None
|
|
40
|
-
name: Annotated[str, Field(strict=True, max_length=255)]
|
|
36
|
+
name: Annotated[str, Field(strict=True, max_length=255)] = Field(description="The name of the algorithm")
|
|
41
37
|
__properties: ClassVar[List[str]] = ["project_id", "type", "shared", "link", "name"]
|
|
42
38
|
|
|
43
|
-
model_config =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
47
44
|
|
|
48
45
|
|
|
49
46
|
def to_str(self) -> str:
|
|
@@ -56,7 +53,7 @@ class AlgorithmIn(BaseModel):
|
|
|
56
53
|
return json.dumps(self.to_dict())
|
|
57
54
|
|
|
58
55
|
@classmethod
|
|
59
|
-
def from_json(cls, json_str: str) -> Self:
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
57
|
"""Create an instance of AlgorithmIn from a JSON string"""
|
|
61
58
|
return cls.from_dict(json.loads(json_str))
|
|
62
59
|
|
|
@@ -70,10 +67,12 @@ class AlgorithmIn(BaseModel):
|
|
|
70
67
|
were set at model initialization. Other fields with value `None`
|
|
71
68
|
are ignored.
|
|
72
69
|
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
73
73
|
_dict = self.model_dump(
|
|
74
74
|
by_alias=True,
|
|
75
|
-
exclude=
|
|
76
|
-
},
|
|
75
|
+
exclude=excluded_fields,
|
|
77
76
|
exclude_none=True,
|
|
78
77
|
)
|
|
79
78
|
# set to None if link (nullable) is None
|
|
@@ -84,7 +83,7 @@ class AlgorithmIn(BaseModel):
|
|
|
84
83
|
return _dict
|
|
85
84
|
|
|
86
85
|
@classmethod
|
|
87
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
87
|
"""Create an instance of AlgorithmIn from a dict"""
|
|
89
88
|
if obj is None:
|
|
90
89
|
return None
|
|
@@ -14,16 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
import json
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
17
|
from enum import Enum
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
try:
|
|
24
|
-
from typing import Self
|
|
25
|
-
except ImportError:
|
|
26
|
-
from typing_extensions import Self
|
|
18
|
+
from typing_extensions import Self
|
|
27
19
|
|
|
28
20
|
|
|
29
21
|
class AlgorithmType(str, Enum):
|
|
@@ -17,13 +17,10 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from
|
|
23
|
-
|
|
24
|
-
from typing import Self
|
|
25
|
-
except ImportError:
|
|
26
|
-
from typing_extensions import Self
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
27
24
|
|
|
28
25
|
class AuthConfig(BaseModel):
|
|
29
26
|
"""
|
|
@@ -34,10 +31,11 @@ class AuthConfig(BaseModel):
|
|
|
34
31
|
well_known_endpoint: StrictStr
|
|
35
32
|
__properties: ClassVar[List[str]] = ["client_id", "audience", "well_known_endpoint"]
|
|
36
33
|
|
|
37
|
-
model_config =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
41
39
|
|
|
42
40
|
|
|
43
41
|
def to_str(self) -> str:
|
|
@@ -50,7 +48,7 @@ class AuthConfig(BaseModel):
|
|
|
50
48
|
return json.dumps(self.to_dict())
|
|
51
49
|
|
|
52
50
|
@classmethod
|
|
53
|
-
def from_json(cls, json_str: str) -> Self:
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
52
|
"""Create an instance of AuthConfig from a JSON string"""
|
|
55
53
|
return cls.from_dict(json.loads(json_str))
|
|
56
54
|
|
|
@@ -64,16 +62,18 @@ class AuthConfig(BaseModel):
|
|
|
64
62
|
were set at model initialization. Other fields with value `None`
|
|
65
63
|
are ignored.
|
|
66
64
|
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
67
68
|
_dict = self.model_dump(
|
|
68
69
|
by_alias=True,
|
|
69
|
-
exclude=
|
|
70
|
-
},
|
|
70
|
+
exclude=excluded_fields,
|
|
71
71
|
exclude_none=True,
|
|
72
72
|
)
|
|
73
73
|
return _dict
|
|
74
74
|
|
|
75
75
|
@classmethod
|
|
76
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
77
|
"""Create an instance of AuthConfig from a dict"""
|
|
78
78
|
if obj is None:
|
|
79
79
|
return None
|
|
@@ -18,32 +18,30 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
21
22
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from pydantic import BaseModel, StrictInt
|
|
23
|
-
from pydantic import Field
|
|
24
23
|
from typing_extensions import Annotated
|
|
25
24
|
from compute_api_client.models.backend_status import BackendStatus
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
except ImportError:
|
|
29
|
-
from typing_extensions import Self
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
30
27
|
|
|
31
28
|
class Backend(BaseModel):
|
|
32
29
|
"""
|
|
33
30
|
Backend
|
|
34
31
|
""" # 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
|
|
32
|
+
id: StrictInt = Field(description="The id of the backend")
|
|
33
|
+
name: Annotated[str, Field(strict=True, max_length=32)] = Field(description="The name of the backend")
|
|
34
|
+
location: Annotated[str, Field(strict=True, max_length=32)] = Field(description="The location of the backend")
|
|
35
|
+
backend_type_id: StrictInt = Field(description="The id of the backend type")
|
|
36
|
+
status: BackendStatus = Field(description="Status of the backend")
|
|
37
|
+
last_heartbeat: datetime = Field(description="Time of last heartbeat")
|
|
41
38
|
__properties: ClassVar[List[str]] = ["id", "name", "location", "backend_type_id", "status", "last_heartbeat"]
|
|
42
39
|
|
|
43
|
-
model_config =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
47
45
|
|
|
48
46
|
|
|
49
47
|
def to_str(self) -> str:
|
|
@@ -56,7 +54,7 @@ class Backend(BaseModel):
|
|
|
56
54
|
return json.dumps(self.to_dict())
|
|
57
55
|
|
|
58
56
|
@classmethod
|
|
59
|
-
def from_json(cls, json_str: str) -> Self:
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
58
|
"""Create an instance of Backend from a JSON string"""
|
|
61
59
|
return cls.from_dict(json.loads(json_str))
|
|
62
60
|
|
|
@@ -70,16 +68,18 @@ class Backend(BaseModel):
|
|
|
70
68
|
were set at model initialization. Other fields with value `None`
|
|
71
69
|
are ignored.
|
|
72
70
|
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
73
74
|
_dict = self.model_dump(
|
|
74
75
|
by_alias=True,
|
|
75
|
-
exclude=
|
|
76
|
-
},
|
|
76
|
+
exclude=excluded_fields,
|
|
77
77
|
exclude_none=True,
|
|
78
78
|
)
|
|
79
79
|
return _dict
|
|
80
80
|
|
|
81
81
|
@classmethod
|
|
82
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
83
|
"""Create an instance of Backend from a dict"""
|
|
84
84
|
if obj is None:
|
|
85
85
|
return None
|
|
@@ -18,31 +18,29 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
21
22
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from pydantic import BaseModel, StrictInt
|
|
23
|
-
from pydantic import Field
|
|
24
23
|
from typing_extensions import Annotated
|
|
25
24
|
from compute_api_client.models.backend_status import BackendStatus
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
except ImportError:
|
|
29
|
-
from typing_extensions import Self
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
30
27
|
|
|
31
28
|
class BackendIn(BaseModel):
|
|
32
29
|
"""
|
|
33
30
|
BackendIn
|
|
34
31
|
""" # noqa: E501
|
|
35
|
-
name: Annotated[str, Field(strict=True, max_length=32)]
|
|
36
|
-
location: Annotated[str, Field(strict=True, max_length=32)]
|
|
37
|
-
backend_type_id: StrictInt
|
|
38
|
-
status: BackendStatus
|
|
39
|
-
last_heartbeat: datetime
|
|
32
|
+
name: Annotated[str, Field(strict=True, max_length=32)] = Field(description="The name of the backend")
|
|
33
|
+
location: Annotated[str, Field(strict=True, max_length=32)] = Field(description="The location of the backend")
|
|
34
|
+
backend_type_id: StrictInt = Field(description="The id of the backend type")
|
|
35
|
+
status: BackendStatus = Field(description="Status of the backend")
|
|
36
|
+
last_heartbeat: datetime = Field(description="Time of last heartbeat")
|
|
40
37
|
__properties: ClassVar[List[str]] = ["name", "location", "backend_type_id", "status", "last_heartbeat"]
|
|
41
38
|
|
|
42
|
-
model_config =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
46
44
|
|
|
47
45
|
|
|
48
46
|
def to_str(self) -> str:
|
|
@@ -55,7 +53,7 @@ class BackendIn(BaseModel):
|
|
|
55
53
|
return json.dumps(self.to_dict())
|
|
56
54
|
|
|
57
55
|
@classmethod
|
|
58
|
-
def from_json(cls, json_str: str) -> Self:
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
57
|
"""Create an instance of BackendIn from a JSON string"""
|
|
60
58
|
return cls.from_dict(json.loads(json_str))
|
|
61
59
|
|
|
@@ -69,16 +67,18 @@ class BackendIn(BaseModel):
|
|
|
69
67
|
were set at model initialization. Other fields with value `None`
|
|
70
68
|
are ignored.
|
|
71
69
|
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
72
73
|
_dict = self.model_dump(
|
|
73
74
|
by_alias=True,
|
|
74
|
-
exclude=
|
|
75
|
-
},
|
|
75
|
+
exclude=excluded_fields,
|
|
76
76
|
exclude_none=True,
|
|
77
77
|
)
|
|
78
78
|
return _dict
|
|
79
79
|
|
|
80
80
|
@classmethod
|
|
81
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
82
|
"""Create an instance of BackendIn from a dict"""
|
|
83
83
|
if obj is None:
|
|
84
84
|
return None
|
|
@@ -18,26 +18,25 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
22
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from pydantic import BaseModel
|
|
23
23
|
from compute_api_client.models.backend_status import BackendStatus
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
except ImportError:
|
|
27
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
28
26
|
|
|
29
27
|
class BackendPatch(BaseModel):
|
|
30
28
|
"""
|
|
31
29
|
BackendPatch
|
|
32
30
|
""" # noqa: E501
|
|
33
|
-
status: BackendStatus
|
|
34
|
-
last_heartbeat: datetime
|
|
31
|
+
status: BackendStatus = Field(description="Status of the backend")
|
|
32
|
+
last_heartbeat: datetime = Field(description="Time of last heartbeat")
|
|
35
33
|
__properties: ClassVar[List[str]] = ["status", "last_heartbeat"]
|
|
36
34
|
|
|
37
|
-
model_config =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
41
40
|
|
|
42
41
|
|
|
43
42
|
def to_str(self) -> str:
|
|
@@ -50,7 +49,7 @@ class BackendPatch(BaseModel):
|
|
|
50
49
|
return json.dumps(self.to_dict())
|
|
51
50
|
|
|
52
51
|
@classmethod
|
|
53
|
-
def from_json(cls, json_str: str) -> Self:
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
53
|
"""Create an instance of BackendPatch from a JSON string"""
|
|
55
54
|
return cls.from_dict(json.loads(json_str))
|
|
56
55
|
|
|
@@ -64,16 +63,18 @@ class BackendPatch(BaseModel):
|
|
|
64
63
|
were set at model initialization. Other fields with value `None`
|
|
65
64
|
are ignored.
|
|
66
65
|
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
67
69
|
_dict = self.model_dump(
|
|
68
70
|
by_alias=True,
|
|
69
|
-
exclude=
|
|
70
|
-
},
|
|
71
|
+
exclude=excluded_fields,
|
|
71
72
|
exclude_none=True,
|
|
72
73
|
)
|
|
73
74
|
return _dict
|
|
74
75
|
|
|
75
76
|
@classmethod
|
|
76
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
78
|
"""Create an instance of BackendPatch from a dict"""
|
|
78
79
|
if obj is None:
|
|
79
80
|
return None
|
|
@@ -14,16 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
import json
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
17
|
from enum import Enum
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
try:
|
|
24
|
-
from typing import Self
|
|
25
|
-
except ImportError:
|
|
26
|
-
from typing_extensions import Self
|
|
18
|
+
from typing_extensions import Self
|
|
27
19
|
|
|
28
20
|
|
|
29
21
|
class BackendStatus(str, Enum):
|