qi-compute-api-client 0.4.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 +23 -20
- compute_api_client/api/__init__.py +5 -6
- compute_api_client/api/algorithms_api.py +1334 -554
- 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 +1069 -436
- compute_api_client/api/files_api.py +1076 -436
- compute_api_client/api/final_results_api.py +737 -339
- compute_api_client/api/jobs_api.py +1653 -0
- compute_api_client/api/languages_api.py +557 -218
- compute_api_client/api/members_api.py +1058 -436
- compute_api_client/api/metadata_api.py +737 -338
- compute_api_client/api/permissions_api.py +1056 -422
- compute_api_client/api/projects_api.py +1605 -677
- compute_api_client/api/reservations_api.py +1125 -428
- compute_api_client/api/results_api.py +739 -338
- compute_api_client/api/teams_api.py +568 -221
- compute_api_client/api/transactions_api.py +680 -219
- compute_api_client/api/users_api.py +1091 -436
- compute_api_client/api_client.py +347 -305
- compute_api_client/api_response.py +21 -0
- compute_api_client/configuration.py +55 -68
- 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/BatchJobsApi.md +524 -0
- 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 +40 -74
- 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 +20 -17
- compute_api_client/models/__init__.py +17 -15
- compute_api_client/models/algorithm.py +79 -238
- compute_api_client/models/algorithm_in.py +77 -205
- compute_api_client/models/algorithm_type.py +22 -88
- 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 +73 -231
- compute_api_client/models/commit_in.py +68 -170
- compute_api_client/models/compile_stage.py +24 -90
- compute_api_client/models/domain.py +23 -89
- compute_api_client/models/file.py +75 -289
- compute_api_client/models/file_in.py +73 -255
- compute_api_client/models/final_result.py +69 -199
- compute_api_client/models/final_result_in.py +64 -138
- compute_api_client/models/http_not_found_error.py +61 -106
- compute_api_client/models/http_validation_error.py +70 -106
- 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 +68 -173
- compute_api_client/models/location_inner.py +126 -85
- compute_api_client/models/member.py +71 -237
- compute_api_client/models/member_in.py +69 -204
- compute_api_client/models/metadata.py +69 -199
- compute_api_client/models/metadata_in.py +69 -138
- compute_api_client/models/permission.py +68 -173
- compute_api_client/models/permission_group.py +66 -143
- compute_api_client/models/project.py +75 -257
- compute_api_client/models/project_in.py +70 -196
- compute_api_client/models/project_patch.py +90 -193
- compute_api_client/models/reservation.py +80 -291
- compute_api_client/models/reservation_in.py +69 -201
- compute_api_client/models/result.py +102 -360
- compute_api_client/models/result_in.py +96 -293
- compute_api_client/models/role.py +22 -88
- compute_api_client/models/share_type.py +23 -89
- compute_api_client/models/team.py +70 -199
- compute_api_client/models/transaction.py +94 -300
- compute_api_client/models/user.py +76 -277
- compute_api_client/models/user_in.py +74 -244
- compute_api_client/models/validation_error.py +74 -161
- compute_api_client/rest.py +56 -115
- {qi_compute_api_client-0.4.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/BatchRunsApi.md +0 -600
- compute_api_client/docs/Run.md +0 -18
- compute_api_client/docs/RunIn.md +0 -13
- 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 -345
- compute_api_client/models/run_in.py +0 -202
- 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.4.0.dist-info/RECORD +0 -137
- {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/LICENSE.md +0 -0
- {qi_compute_api_client-0.4.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
22
|
+
from pydantic import BaseModel, StrictBool, StrictInt, StrictStr
|
|
23
|
+
from pydantic import Field
|
|
24
|
+
from typing_extensions import Annotated
|
|
25
|
+
try:
|
|
26
|
+
from typing import Self
|
|
27
|
+
except ImportError:
|
|
28
|
+
from typing_extensions import Self
|
|
29
|
+
|
|
30
|
+
class BackendType(BaseModel):
|
|
31
|
+
"""
|
|
32
|
+
BackendType
|
|
33
|
+
""" # noqa: E501
|
|
34
|
+
id: StrictInt
|
|
35
|
+
name: Annotated[str, Field(strict=True, max_length=32)]
|
|
36
|
+
infrastructure: Annotated[str, Field(strict=True, max_length=32)]
|
|
37
|
+
description: StrictStr
|
|
38
|
+
image_id: Annotated[str, Field(strict=True, max_length=16)]
|
|
39
|
+
is_hardware: StrictBool
|
|
40
|
+
features: List[StrictStr]
|
|
41
|
+
default_compiler_config: Union[str, Any]
|
|
42
|
+
native_gateset: Union[str, Any]
|
|
43
|
+
__properties: ClassVar[List[str]] = ["id", "name", "infrastructure", "description", "image_id", "is_hardware", "features", "default_compiler_config", "native_gateset"]
|
|
44
|
+
|
|
45
|
+
model_config = {
|
|
46
|
+
"populate_by_name": True,
|
|
47
|
+
"validate_assignment": True
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> Self:
|
|
62
|
+
"""Create an instance of BackendType from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
|
67
|
+
|
|
68
|
+
This has the following differences from calling pydantic's
|
|
69
|
+
`self.model_dump(by_alias=True)`:
|
|
70
|
+
|
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
|
72
|
+
were set at model initialization. Other fields with value `None`
|
|
73
|
+
are ignored.
|
|
74
|
+
"""
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude={
|
|
78
|
+
},
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
85
|
+
"""Create an instance of BackendType from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"id": obj.get("id"),
|
|
94
|
+
"name": obj.get("name"),
|
|
95
|
+
"infrastructure": obj.get("infrastructure"),
|
|
96
|
+
"description": obj.get("description"),
|
|
97
|
+
"image_id": obj.get("image_id"),
|
|
98
|
+
"is_hardware": obj.get("is_hardware"),
|
|
99
|
+
"features": obj.get("features"),
|
|
100
|
+
"default_compiler_config": obj.get("default_compiler_config"),
|
|
101
|
+
"native_gateset": obj.get("native_gateset")
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
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 BackendWithAuthentication(BaseModel):
|
|
32
|
+
"""
|
|
33
|
+
BackendWithAuthentication
|
|
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
|
+
authentication_hash: Annotated[str, Field(strict=True, max_length=32)]
|
|
42
|
+
__properties: ClassVar[List[str]] = ["id", "name", "location", "backend_type_id", "status", "last_heartbeat", "authentication_hash"]
|
|
43
|
+
|
|
44
|
+
model_config = {
|
|
45
|
+
"populate_by_name": True,
|
|
46
|
+
"validate_assignment": True
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> Self:
|
|
61
|
+
"""Create an instance of BackendWithAuthentication from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
|
66
|
+
|
|
67
|
+
This has the following differences from calling pydantic's
|
|
68
|
+
`self.model_dump(by_alias=True)`:
|
|
69
|
+
|
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
|
71
|
+
were set at model initialization. Other fields with value `None`
|
|
72
|
+
are ignored.
|
|
73
|
+
"""
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude={
|
|
77
|
+
},
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
84
|
+
"""Create an instance of BackendWithAuthentication from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"id": obj.get("id"),
|
|
93
|
+
"name": obj.get("name"),
|
|
94
|
+
"location": obj.get("location"),
|
|
95
|
+
"backend_type_id": obj.get("backend_type_id"),
|
|
96
|
+
"status": obj.get("status"),
|
|
97
|
+
"last_heartbeat": obj.get("last_heartbeat"),
|
|
98
|
+
"authentication_hash": obj.get("authentication_hash")
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|
|
@@ -0,0 +1,129 @@
|
|
|
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, Optional
|
|
22
|
+
from pydantic import BaseModel, StrictInt
|
|
23
|
+
from compute_api_client.models.algorithm_type import AlgorithmType
|
|
24
|
+
from compute_api_client.models.batch_job_status import BatchJobStatus
|
|
25
|
+
try:
|
|
26
|
+
from typing import Self
|
|
27
|
+
except ImportError:
|
|
28
|
+
from typing_extensions import Self
|
|
29
|
+
|
|
30
|
+
class BatchJob(BaseModel):
|
|
31
|
+
"""
|
|
32
|
+
BatchJob
|
|
33
|
+
""" # noqa: E501
|
|
34
|
+
id: StrictInt
|
|
35
|
+
created_on: datetime
|
|
36
|
+
status: BatchJobStatus
|
|
37
|
+
user_id: StrictInt
|
|
38
|
+
backend_type_id: StrictInt
|
|
39
|
+
backend_id: Optional[StrictInt]
|
|
40
|
+
queued_at: Optional[datetime]
|
|
41
|
+
reserved_at: Optional[datetime]
|
|
42
|
+
finished_at: Optional[datetime]
|
|
43
|
+
job_ids: List[StrictInt]
|
|
44
|
+
aggregated_algorithm_type: AlgorithmType
|
|
45
|
+
__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
|
+
|
|
47
|
+
model_config = {
|
|
48
|
+
"populate_by_name": True,
|
|
49
|
+
"validate_assignment": True
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
|
59
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
60
|
+
return json.dumps(self.to_dict())
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_json(cls, json_str: str) -> Self:
|
|
64
|
+
"""Create an instance of BatchJob from a JSON string"""
|
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
|
66
|
+
|
|
67
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
68
|
+
"""Return the dictionary representation of the model using alias.
|
|
69
|
+
|
|
70
|
+
This has the following differences from calling pydantic's
|
|
71
|
+
`self.model_dump(by_alias=True)`:
|
|
72
|
+
|
|
73
|
+
* `None` is only added to the output dict for nullable fields that
|
|
74
|
+
were set at model initialization. Other fields with value `None`
|
|
75
|
+
are ignored.
|
|
76
|
+
"""
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude={
|
|
80
|
+
},
|
|
81
|
+
exclude_none=True,
|
|
82
|
+
)
|
|
83
|
+
# set to None if backend_id (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.backend_id is None and "backend_id" in self.model_fields_set:
|
|
86
|
+
_dict['backend_id'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if queued_at (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.queued_at is None and "queued_at" in self.model_fields_set:
|
|
91
|
+
_dict['queued_at'] = None
|
|
92
|
+
|
|
93
|
+
# set to None if reserved_at (nullable) is None
|
|
94
|
+
# and model_fields_set contains the field
|
|
95
|
+
if self.reserved_at is None and "reserved_at" in self.model_fields_set:
|
|
96
|
+
_dict['reserved_at'] = None
|
|
97
|
+
|
|
98
|
+
# set to None if finished_at (nullable) is None
|
|
99
|
+
# and model_fields_set contains the field
|
|
100
|
+
if self.finished_at is None and "finished_at" in self.model_fields_set:
|
|
101
|
+
_dict['finished_at'] = None
|
|
102
|
+
|
|
103
|
+
return _dict
|
|
104
|
+
|
|
105
|
+
@classmethod
|
|
106
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
107
|
+
"""Create an instance of BatchJob from a dict"""
|
|
108
|
+
if obj is None:
|
|
109
|
+
return None
|
|
110
|
+
|
|
111
|
+
if not isinstance(obj, dict):
|
|
112
|
+
return cls.model_validate(obj)
|
|
113
|
+
|
|
114
|
+
_obj = cls.model_validate({
|
|
115
|
+
"id": obj.get("id"),
|
|
116
|
+
"created_on": obj.get("created_on"),
|
|
117
|
+
"status": obj.get("status"),
|
|
118
|
+
"user_id": obj.get("user_id"),
|
|
119
|
+
"backend_type_id": obj.get("backend_type_id"),
|
|
120
|
+
"backend_id": obj.get("backend_id"),
|
|
121
|
+
"queued_at": obj.get("queued_at"),
|
|
122
|
+
"reserved_at": obj.get("reserved_at"),
|
|
123
|
+
"finished_at": obj.get("finished_at"),
|
|
124
|
+
"job_ids": obj.get("job_ids"),
|
|
125
|
+
"aggregated_algorithm_type": obj.get("aggregated_algorithm_type")
|
|
126
|
+
})
|
|
127
|
+
return _obj
|
|
128
|
+
|
|
129
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from pydantic import BaseModel, StrictInt
|
|
23
|
+
try:
|
|
24
|
+
from typing import Self
|
|
25
|
+
except ImportError:
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class BatchJobIn(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
BatchJobIn
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
user_id: StrictInt
|
|
33
|
+
backend_type_id: StrictInt
|
|
34
|
+
__properties: ClassVar[List[str]] = ["user_id", "backend_type_id"]
|
|
35
|
+
|
|
36
|
+
model_config = {
|
|
37
|
+
"populate_by_name": True,
|
|
38
|
+
"validate_assignment": True
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Self:
|
|
53
|
+
"""Create an instance of BatchJobIn from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude={
|
|
69
|
+
},
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
76
|
+
"""Create an instance of BatchJobIn from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"user_id": obj.get("user_id"),
|
|
85
|
+
"backend_type_id": obj.get("backend_type_id")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
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 BatchJobStatus(str, Enum):
|
|
30
|
+
"""
|
|
31
|
+
BatchJobStatus
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
"""
|
|
35
|
+
allowed enum values
|
|
36
|
+
"""
|
|
37
|
+
PLANNED = 'planned'
|
|
38
|
+
QUEUED = 'queued'
|
|
39
|
+
RESERVED = 'reserved'
|
|
40
|
+
RUNNING = 'running'
|
|
41
|
+
FINISHED = 'finished'
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def from_json(cls, json_str: str) -> Self:
|
|
45
|
+
"""Create an instance of BatchJobStatus from a JSON string"""
|
|
46
|
+
return cls(json.loads(json_str))
|
|
47
|
+
|
|
48
|
+
|