qi-compute-api-client 0.52.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 +77 -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 +21 -19
- compute_api_client/docs/BackendTypePatch.md +4 -2
- compute_api_client/docs/BackendTypesApi.md +21 -10
- 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 +42 -36
- compute_api_client/models/backend_type_patch.py +23 -17
- 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.52.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.52.0.dist-info/RECORD +0 -197
- {qi_compute_api_client-0.52.0.dist-info → qi_compute_api_client-0.54.0.dist-info}/WHEEL +0 -0
- {qi_compute_api_client-0.52.0.dist-info → qi_compute_api_client-0.54.0.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -17,44 +17,42 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from pydantic import BaseModel, StrictBool, StrictInt, StrictStr
|
|
23
|
-
from pydantic import Field
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
22
|
from typing_extensions import Annotated
|
|
25
23
|
from compute_api_client.models.backend_status import BackendStatus
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
except ImportError:
|
|
29
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
30
26
|
|
|
31
27
|
class BackendType(BaseModel):
|
|
32
28
|
"""
|
|
33
29
|
BackendType
|
|
34
30
|
""" # noqa: E501
|
|
35
|
-
id: StrictInt
|
|
36
|
-
name: Annotated[str, Field(strict=True, max_length=32)]
|
|
37
|
-
infrastructure: Annotated[str, Field(strict=True, max_length=32)]
|
|
38
|
-
description: StrictStr
|
|
39
|
-
image_id: Annotated[str, Field(strict=True, max_length=16)]
|
|
40
|
-
is_hardware: StrictBool
|
|
41
|
-
supports_raw_data: StrictBool
|
|
42
|
-
features: List[StrictStr]
|
|
43
|
-
default_compiler_config: Dict[str, Any]
|
|
44
|
-
gateset: List[StrictStr]
|
|
45
|
-
topology: List[List[StrictInt]]
|
|
46
|
-
nqubits: StrictInt
|
|
47
|
-
status: BackendStatus
|
|
48
|
-
default_number_of_shots: StrictInt
|
|
49
|
-
max_number_of_shots: StrictInt
|
|
50
|
-
enabled: StrictBool
|
|
51
|
-
identifier: Annotated[str, Field(strict=True, max_length=32)]
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
31
|
+
id: StrictInt = Field(description="The id of the backend type")
|
|
32
|
+
name: Annotated[str, Field(strict=True, max_length=32)] = Field(description="Name of the backend type")
|
|
33
|
+
infrastructure: Annotated[str, Field(strict=True, max_length=32)] = Field(description="Name of the infrastructure")
|
|
34
|
+
description: StrictStr = Field(description="Description of the backendtype")
|
|
35
|
+
image_id: Annotated[str, Field(strict=True, max_length=16)] = Field(description="The id of the image")
|
|
36
|
+
is_hardware: StrictBool = Field(description="If it is hardware")
|
|
37
|
+
supports_raw_data: StrictBool = Field(description="If it supports raw data extraction")
|
|
38
|
+
features: List[Optional[StrictStr]] = Field(description="The features supported by backend type")
|
|
39
|
+
default_compiler_config: Dict[str, Any] = Field(description="The various passes for each stage")
|
|
40
|
+
gateset: List[Optional[StrictStr]] = Field(description="The primary gatesets supported by the backend")
|
|
41
|
+
topology: List[List[StrictInt]] = Field(description="The topology of the backend")
|
|
42
|
+
nqubits: StrictInt = Field(description="The number of qubits on the backend")
|
|
43
|
+
status: BackendStatus = Field(description="The status of the backend type")
|
|
44
|
+
default_number_of_shots: StrictInt = Field(description="The default shots")
|
|
45
|
+
max_number_of_shots: StrictInt = Field(description="The maximum number of shots")
|
|
46
|
+
enabled: StrictBool = Field(description="If it is enabled")
|
|
47
|
+
identifier: Annotated[str, Field(strict=True, max_length=32)] = Field(description="The identifier of the backend")
|
|
48
|
+
protocol_version: Optional[StrictInt] = None
|
|
49
|
+
__properties: ClassVar[List[str]] = ["id", "name", "infrastructure", "description", "image_id", "is_hardware", "supports_raw_data", "features", "default_compiler_config", "gateset", "topology", "nqubits", "status", "default_number_of_shots", "max_number_of_shots", "enabled", "identifier", "protocol_version"]
|
|
50
|
+
|
|
51
|
+
model_config = ConfigDict(
|
|
52
|
+
populate_by_name=True,
|
|
53
|
+
validate_assignment=True,
|
|
54
|
+
protected_namespaces=(),
|
|
55
|
+
)
|
|
58
56
|
|
|
59
57
|
|
|
60
58
|
def to_str(self) -> str:
|
|
@@ -67,7 +65,7 @@ class BackendType(BaseModel):
|
|
|
67
65
|
return json.dumps(self.to_dict())
|
|
68
66
|
|
|
69
67
|
@classmethod
|
|
70
|
-
def from_json(cls, json_str: str) -> Self:
|
|
68
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
71
69
|
"""Create an instance of BackendType from a JSON string"""
|
|
72
70
|
return cls.from_dict(json.loads(json_str))
|
|
73
71
|
|
|
@@ -81,16 +79,23 @@ class BackendType(BaseModel):
|
|
|
81
79
|
were set at model initialization. Other fields with value `None`
|
|
82
80
|
are ignored.
|
|
83
81
|
"""
|
|
82
|
+
excluded_fields: Set[str] = set([
|
|
83
|
+
])
|
|
84
|
+
|
|
84
85
|
_dict = self.model_dump(
|
|
85
86
|
by_alias=True,
|
|
86
|
-
exclude=
|
|
87
|
-
},
|
|
87
|
+
exclude=excluded_fields,
|
|
88
88
|
exclude_none=True,
|
|
89
89
|
)
|
|
90
|
+
# set to None if protocol_version (nullable) is None
|
|
91
|
+
# and model_fields_set contains the field
|
|
92
|
+
if self.protocol_version is None and "protocol_version" in self.model_fields_set:
|
|
93
|
+
_dict['protocol_version'] = None
|
|
94
|
+
|
|
90
95
|
return _dict
|
|
91
96
|
|
|
92
97
|
@classmethod
|
|
93
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
98
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
94
99
|
"""Create an instance of BackendType from a dict"""
|
|
95
100
|
if obj is None:
|
|
96
101
|
return None
|
|
@@ -115,7 +120,8 @@ class BackendType(BaseModel):
|
|
|
115
120
|
"default_number_of_shots": obj.get("default_number_of_shots"),
|
|
116
121
|
"max_number_of_shots": obj.get("max_number_of_shots"),
|
|
117
122
|
"enabled": obj.get("enabled"),
|
|
118
|
-
"identifier": obj.get("identifier")
|
|
123
|
+
"identifier": obj.get("identifier"),
|
|
124
|
+
"protocol_version": obj.get("protocol_version")
|
|
119
125
|
})
|
|
120
126
|
return _obj
|
|
121
127
|
|
|
@@ -17,15 +17,11 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel, StrictBool, StrictInt, StrictStr
|
|
23
|
-
from pydantic import Field
|
|
24
22
|
from typing_extensions import Annotated
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
except ImportError:
|
|
28
|
-
from typing_extensions import Self
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
29
25
|
|
|
30
26
|
class BackendTypePatch(BaseModel):
|
|
31
27
|
"""
|
|
@@ -46,12 +42,14 @@ class BackendTypePatch(BaseModel):
|
|
|
46
42
|
max_number_of_shots: Optional[StrictInt] = None
|
|
47
43
|
enabled: Optional[StrictBool] = None
|
|
48
44
|
identifier: Optional[Annotated[str, Field(strict=True, max_length=32)]] = None
|
|
49
|
-
|
|
45
|
+
protocol_version: Optional[StrictInt] = None
|
|
46
|
+
__properties: ClassVar[List[str]] = ["name", "infrastructure", "description", "image_id", "is_hardware", "supports_raw_data", "features", "default_compiler_config", "gateset", "topology", "nqubits", "default_number_of_shots", "max_number_of_shots", "enabled", "identifier", "protocol_version"]
|
|
50
47
|
|
|
51
|
-
model_config =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
model_config = ConfigDict(
|
|
49
|
+
populate_by_name=True,
|
|
50
|
+
validate_assignment=True,
|
|
51
|
+
protected_namespaces=(),
|
|
52
|
+
)
|
|
55
53
|
|
|
56
54
|
|
|
57
55
|
def to_str(self) -> str:
|
|
@@ -64,7 +62,7 @@ class BackendTypePatch(BaseModel):
|
|
|
64
62
|
return json.dumps(self.to_dict())
|
|
65
63
|
|
|
66
64
|
@classmethod
|
|
67
|
-
def from_json(cls, json_str: str) -> Self:
|
|
65
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
68
66
|
"""Create an instance of BackendTypePatch from a JSON string"""
|
|
69
67
|
return cls.from_dict(json.loads(json_str))
|
|
70
68
|
|
|
@@ -78,10 +76,12 @@ class BackendTypePatch(BaseModel):
|
|
|
78
76
|
were set at model initialization. Other fields with value `None`
|
|
79
77
|
are ignored.
|
|
80
78
|
"""
|
|
79
|
+
excluded_fields: Set[str] = set([
|
|
80
|
+
])
|
|
81
|
+
|
|
81
82
|
_dict = self.model_dump(
|
|
82
83
|
by_alias=True,
|
|
83
|
-
exclude=
|
|
84
|
-
},
|
|
84
|
+
exclude=excluded_fields,
|
|
85
85
|
exclude_none=True,
|
|
86
86
|
)
|
|
87
87
|
# set to None if name (nullable) is None
|
|
@@ -159,10 +159,15 @@ class BackendTypePatch(BaseModel):
|
|
|
159
159
|
if self.identifier is None and "identifier" in self.model_fields_set:
|
|
160
160
|
_dict['identifier'] = None
|
|
161
161
|
|
|
162
|
+
# set to None if protocol_version (nullable) is None
|
|
163
|
+
# and model_fields_set contains the field
|
|
164
|
+
if self.protocol_version is None and "protocol_version" in self.model_fields_set:
|
|
165
|
+
_dict['protocol_version'] = None
|
|
166
|
+
|
|
162
167
|
return _dict
|
|
163
168
|
|
|
164
169
|
@classmethod
|
|
165
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
170
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
166
171
|
"""Create an instance of BackendTypePatch from a dict"""
|
|
167
172
|
if obj is None:
|
|
168
173
|
return None
|
|
@@ -185,7 +190,8 @@ class BackendTypePatch(BaseModel):
|
|
|
185
190
|
"default_number_of_shots": obj.get("default_number_of_shots"),
|
|
186
191
|
"max_number_of_shots": obj.get("max_number_of_shots"),
|
|
187
192
|
"enabled": obj.get("enabled"),
|
|
188
|
-
"identifier": obj.get("identifier")
|
|
193
|
+
"identifier": obj.get("identifier"),
|
|
194
|
+
"protocol_version": obj.get("protocol_version")
|
|
189
195
|
})
|
|
190
196
|
return _obj
|
|
191
197
|
|
|
@@ -18,33 +18,31 @@ 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 BackendWithAuthentication(BaseModel):
|
|
32
29
|
"""
|
|
33
30
|
BackendWithAuthentication
|
|
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
|
|
41
|
-
authentication_hash: Annotated[str, Field(strict=True, max_length=32)]
|
|
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")
|
|
38
|
+
authentication_hash: Annotated[str, Field(strict=True, max_length=32)] = Field(description="The authentication hash of the backend")
|
|
42
39
|
__properties: ClassVar[List[str]] = ["id", "name", "location", "backend_type_id", "status", "last_heartbeat", "authentication_hash"]
|
|
43
40
|
|
|
44
|
-
model_config =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
48
46
|
|
|
49
47
|
|
|
50
48
|
def to_str(self) -> str:
|
|
@@ -57,7 +55,7 @@ class BackendWithAuthentication(BaseModel):
|
|
|
57
55
|
return json.dumps(self.to_dict())
|
|
58
56
|
|
|
59
57
|
@classmethod
|
|
60
|
-
def from_json(cls, json_str: str) -> Self:
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
59
|
"""Create an instance of BackendWithAuthentication from a JSON string"""
|
|
62
60
|
return cls.from_dict(json.loads(json_str))
|
|
63
61
|
|
|
@@ -71,16 +69,18 @@ class BackendWithAuthentication(BaseModel):
|
|
|
71
69
|
were set at model initialization. Other fields with value `None`
|
|
72
70
|
are ignored.
|
|
73
71
|
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
74
75
|
_dict = self.model_dump(
|
|
75
76
|
by_alias=True,
|
|
76
|
-
exclude=
|
|
77
|
-
},
|
|
77
|
+
exclude=excluded_fields,
|
|
78
78
|
exclude_none=True,
|
|
79
79
|
)
|
|
80
80
|
return _dict
|
|
81
81
|
|
|
82
82
|
@classmethod
|
|
83
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
84
|
"""Create an instance of BackendWithAuthentication from a dict"""
|
|
85
85
|
if obj is None:
|
|
86
86
|
return None
|
|
@@ -18,36 +18,35 @@ 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, Optional
|
|
22
|
-
from pydantic import BaseModel, StrictInt
|
|
23
23
|
from compute_api_client.models.algorithm_type import AlgorithmType
|
|
24
24
|
from compute_api_client.models.batch_job_status import BatchJobStatus
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
except ImportError:
|
|
28
|
-
from typing_extensions import Self
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
29
27
|
|
|
30
28
|
class BatchJob(BaseModel):
|
|
31
29
|
"""
|
|
32
30
|
BatchJob
|
|
33
31
|
""" # noqa: E501
|
|
34
|
-
id: StrictInt
|
|
35
|
-
created_on: datetime
|
|
36
|
-
status: BatchJobStatus
|
|
37
|
-
user_id: StrictInt
|
|
38
|
-
backend_type_id: StrictInt
|
|
32
|
+
id: StrictInt = Field(description="ID of the batch job")
|
|
33
|
+
created_on: datetime = Field(description="Time of batchjob creation")
|
|
34
|
+
status: BatchJobStatus = Field(description="Status of the batchjob")
|
|
35
|
+
user_id: StrictInt = Field(description="ID of the user to whom this job belongs")
|
|
36
|
+
backend_type_id: StrictInt = Field(description="ID of the backendtype")
|
|
39
37
|
backend_id: Optional[StrictInt]
|
|
40
38
|
queued_at: Optional[datetime]
|
|
41
39
|
reserved_at: Optional[datetime]
|
|
42
40
|
finished_at: Optional[datetime]
|
|
43
|
-
job_ids: List[StrictInt]
|
|
44
|
-
aggregated_algorithm_type: AlgorithmType
|
|
41
|
+
job_ids: List[StrictInt] = Field(description="Job ids in the batch job")
|
|
42
|
+
aggregated_algorithm_type: AlgorithmType = Field(description="Algorithm type submitted")
|
|
45
43
|
__properties: ClassVar[List[str]] = ["id", "created_on", "status", "user_id", "backend_type_id", "backend_id", "queued_at", "reserved_at", "finished_at", "job_ids", "aggregated_algorithm_type"]
|
|
46
44
|
|
|
47
|
-
model_config =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
populate_by_name=True,
|
|
47
|
+
validate_assignment=True,
|
|
48
|
+
protected_namespaces=(),
|
|
49
|
+
)
|
|
51
50
|
|
|
52
51
|
|
|
53
52
|
def to_str(self) -> str:
|
|
@@ -60,7 +59,7 @@ class BatchJob(BaseModel):
|
|
|
60
59
|
return json.dumps(self.to_dict())
|
|
61
60
|
|
|
62
61
|
@classmethod
|
|
63
|
-
def from_json(cls, json_str: str) -> Self:
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
64
63
|
"""Create an instance of BatchJob from a JSON string"""
|
|
65
64
|
return cls.from_dict(json.loads(json_str))
|
|
66
65
|
|
|
@@ -74,10 +73,12 @@ class BatchJob(BaseModel):
|
|
|
74
73
|
were set at model initialization. Other fields with value `None`
|
|
75
74
|
are ignored.
|
|
76
75
|
"""
|
|
76
|
+
excluded_fields: Set[str] = set([
|
|
77
|
+
])
|
|
78
|
+
|
|
77
79
|
_dict = self.model_dump(
|
|
78
80
|
by_alias=True,
|
|
79
|
-
exclude=
|
|
80
|
-
},
|
|
81
|
+
exclude=excluded_fields,
|
|
81
82
|
exclude_none=True,
|
|
82
83
|
)
|
|
83
84
|
# set to None if backend_id (nullable) is None
|
|
@@ -103,7 +104,7 @@ class BatchJob(BaseModel):
|
|
|
103
104
|
return _dict
|
|
104
105
|
|
|
105
106
|
@classmethod
|
|
106
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
107
108
|
"""Create an instance of BatchJob from a dict"""
|
|
108
109
|
if obj is None:
|
|
109
110
|
return None
|
|
@@ -17,25 +17,23 @@ 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
|
|
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 BatchJobIn(BaseModel):
|
|
29
26
|
"""
|
|
30
27
|
BatchJobIn
|
|
31
28
|
""" # noqa: E501
|
|
32
|
-
backend_type_id: StrictInt
|
|
29
|
+
backend_type_id: StrictInt = Field(description="ID of the batch job")
|
|
33
30
|
__properties: ClassVar[List[str]] = ["backend_type_id"]
|
|
34
31
|
|
|
35
|
-
model_config =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
39
37
|
|
|
40
38
|
|
|
41
39
|
def to_str(self) -> str:
|
|
@@ -48,7 +46,7 @@ class BatchJobIn(BaseModel):
|
|
|
48
46
|
return json.dumps(self.to_dict())
|
|
49
47
|
|
|
50
48
|
@classmethod
|
|
51
|
-
def from_json(cls, json_str: str) -> Self:
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
50
|
"""Create an instance of BatchJobIn from a JSON string"""
|
|
53
51
|
return cls.from_dict(json.loads(json_str))
|
|
54
52
|
|
|
@@ -62,16 +60,18 @@ class BatchJobIn(BaseModel):
|
|
|
62
60
|
were set at model initialization. Other fields with value `None`
|
|
63
61
|
are ignored.
|
|
64
62
|
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
65
66
|
_dict = self.model_dump(
|
|
66
67
|
by_alias=True,
|
|
67
|
-
exclude=
|
|
68
|
-
},
|
|
68
|
+
exclude=excluded_fields,
|
|
69
69
|
exclude_none=True,
|
|
70
70
|
)
|
|
71
71
|
return _dict
|
|
72
72
|
|
|
73
73
|
@classmethod
|
|
74
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
75
|
"""Create an instance of BatchJobIn from a dict"""
|
|
76
76
|
if obj is None:
|
|
77
77
|
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 BatchJobStatus(str, Enum):
|
|
@@ -18,30 +18,28 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
22
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
-
from pydantic import BaseModel, StrictInt, StrictStr
|
|
23
|
-
from pydantic import Field
|
|
24
23
|
from typing_extensions import Annotated
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
except ImportError:
|
|
28
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
29
26
|
|
|
30
27
|
class Commit(BaseModel):
|
|
31
28
|
"""
|
|
32
29
|
Commit
|
|
33
30
|
""" # noqa: E501
|
|
34
|
-
id: StrictInt
|
|
35
|
-
created_on: datetime
|
|
36
|
-
hash: Annotated[str, Field(strict=True, max_length=32)]
|
|
37
|
-
description: StrictStr
|
|
38
|
-
algorithm_id: StrictInt
|
|
31
|
+
id: StrictInt = Field(description="ID of the commit")
|
|
32
|
+
created_on: datetime = Field(description="Time of creation of the commit")
|
|
33
|
+
hash: Annotated[str, Field(strict=True, max_length=32)] = Field(description="Unique hash assigned to the commit")
|
|
34
|
+
description: StrictStr = Field(description="Desriptive message of the commit")
|
|
35
|
+
algorithm_id: StrictInt = Field(description="ID of the algorithm")
|
|
39
36
|
__properties: ClassVar[List[str]] = ["id", "created_on", "hash", "description", "algorithm_id"]
|
|
40
37
|
|
|
41
|
-
model_config =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
45
43
|
|
|
46
44
|
|
|
47
45
|
def to_str(self) -> str:
|
|
@@ -54,7 +52,7 @@ class Commit(BaseModel):
|
|
|
54
52
|
return json.dumps(self.to_dict())
|
|
55
53
|
|
|
56
54
|
@classmethod
|
|
57
|
-
def from_json(cls, json_str: str) -> Self:
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
56
|
"""Create an instance of Commit from a JSON string"""
|
|
59
57
|
return cls.from_dict(json.loads(json_str))
|
|
60
58
|
|
|
@@ -68,16 +66,18 @@ class Commit(BaseModel):
|
|
|
68
66
|
were set at model initialization. Other fields with value `None`
|
|
69
67
|
are ignored.
|
|
70
68
|
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
71
72
|
_dict = self.model_dump(
|
|
72
73
|
by_alias=True,
|
|
73
|
-
exclude=
|
|
74
|
-
},
|
|
74
|
+
exclude=excluded_fields,
|
|
75
75
|
exclude_none=True,
|
|
76
76
|
)
|
|
77
77
|
return _dict
|
|
78
78
|
|
|
79
79
|
@classmethod
|
|
80
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
81
|
"""Create an instance of Commit from a dict"""
|
|
82
82
|
if obj is None:
|
|
83
83
|
return None
|
|
@@ -17,26 +17,24 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, 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 CommitIn(BaseModel):
|
|
29
26
|
"""
|
|
30
27
|
CommitIn
|
|
31
28
|
""" # noqa: E501
|
|
32
|
-
description: StrictStr
|
|
33
|
-
algorithm_id: StrictInt
|
|
29
|
+
description: StrictStr = Field(description="Desriptive message of the commit")
|
|
30
|
+
algorithm_id: StrictInt = Field(description="ID of the algorithm")
|
|
34
31
|
__properties: ClassVar[List[str]] = ["description", "algorithm_id"]
|
|
35
32
|
|
|
36
|
-
model_config =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
40
38
|
|
|
41
39
|
|
|
42
40
|
def to_str(self) -> str:
|
|
@@ -49,7 +47,7 @@ class CommitIn(BaseModel):
|
|
|
49
47
|
return json.dumps(self.to_dict())
|
|
50
48
|
|
|
51
49
|
@classmethod
|
|
52
|
-
def from_json(cls, json_str: str) -> Self:
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
51
|
"""Create an instance of CommitIn from a JSON string"""
|
|
54
52
|
return cls.from_dict(json.loads(json_str))
|
|
55
53
|
|
|
@@ -63,16 +61,18 @@ class CommitIn(BaseModel):
|
|
|
63
61
|
were set at model initialization. Other fields with value `None`
|
|
64
62
|
are ignored.
|
|
65
63
|
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
66
67
|
_dict = self.model_dump(
|
|
67
68
|
by_alias=True,
|
|
68
|
-
exclude=
|
|
69
|
-
},
|
|
69
|
+
exclude=excluded_fields,
|
|
70
70
|
exclude_none=True,
|
|
71
71
|
)
|
|
72
72
|
return _dict
|
|
73
73
|
|
|
74
74
|
@classmethod
|
|
75
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
76
|
"""Create an instance of CommitIn from a dict"""
|
|
77
77
|
if obj is None:
|
|
78
78
|
return None
|
|
@@ -17,27 +17,25 @@ 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
22
|
from compute_api_client.models.compile_stage import CompileStage
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
except ImportError:
|
|
27
|
-
from typing_extensions import Self
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
28
25
|
|
|
29
26
|
class CompilePayload(BaseModel):
|
|
30
27
|
"""
|
|
31
28
|
CompilePayload
|
|
32
29
|
""" # noqa: E501
|
|
33
30
|
compile_stage: Optional[CompileStage] = None
|
|
34
|
-
backend_type_id: StrictInt
|
|
31
|
+
backend_type_id: StrictInt = Field(description="ID of the backendtype")
|
|
35
32
|
__properties: ClassVar[List[str]] = ["compile_stage", "backend_type_id"]
|
|
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 CompilePayload(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 CompilePayload from a JSON string"""
|
|
55
53
|
return cls.from_dict(json.loads(json_str))
|
|
56
54
|
|
|
@@ -64,10 +62,12 @@ class CompilePayload(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
|
# set to None if compile_stage (nullable) is None
|
|
@@ -78,7 +78,7 @@ class CompilePayload(BaseModel):
|
|
|
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 CompilePayload from a dict"""
|
|
83
83
|
if obj is None:
|
|
84
84
|
return None
|