qi-compute-api-client 0.56.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.
- compute_api_client/__init__.py +219 -0
- compute_api_client/api/__init__.py +23 -0
- compute_api_client/api/algorithms_api.py +1603 -0
- compute_api_client/api/auth_config_api.py +278 -0
- compute_api_client/api/backend_api.py +1540 -0
- compute_api_client/api/backend_types_api.py +1178 -0
- compute_api_client/api/batch_jobs_api.py +2224 -0
- compute_api_client/api/commits_api.py +1565 -0
- compute_api_client/api/files_api.py +1307 -0
- compute_api_client/api/final_results_api.py +847 -0
- compute_api_client/api/health_api.py +281 -0
- compute_api_client/api/jobs_api.py +1787 -0
- compute_api_client/api/languages_api.py +692 -0
- compute_api_client/api/members_api.py +1238 -0
- compute_api_client/api/metadata_api.py +930 -0
- compute_api_client/api/permissions_api.py +1295 -0
- compute_api_client/api/projects_api.py +1889 -0
- compute_api_client/api/reservations_api.py +1324 -0
- compute_api_client/api/results_api.py +1702 -0
- compute_api_client/api/teams_api.py +692 -0
- compute_api_client/api/transactions_api.py +805 -0
- compute_api_client/api/users_api.py +1305 -0
- compute_api_client/api_client.py +804 -0
- compute_api_client/api_response.py +21 -0
- compute_api_client/configuration.py +606 -0
- compute_api_client/docs/Algorithm.md +34 -0
- compute_api_client/docs/AlgorithmIn.md +33 -0
- compute_api_client/docs/AlgorithmType.md +12 -0
- compute_api_client/docs/AlgorithmsApi.md +428 -0
- compute_api_client/docs/AuthConfig.md +31 -0
- compute_api_client/docs/AuthConfigApi.md +71 -0
- compute_api_client/docs/Backend.md +35 -0
- compute_api_client/docs/BackendApi.md +418 -0
- compute_api_client/docs/BackendIn.md +34 -0
- compute_api_client/docs/BackendMessage.md +29 -0
- compute_api_client/docs/BackendPatch.md +31 -0
- compute_api_client/docs/BackendStatus.md +16 -0
- compute_api_client/docs/BackendType.md +48 -0
- compute_api_client/docs/BackendTypePatch.md +45 -0
- compute_api_client/docs/BackendTypesApi.md +289 -0
- compute_api_client/docs/BackendWithAuthentication.md +36 -0
- compute_api_client/docs/BatchJob.md +39 -0
- compute_api_client/docs/BatchJobIn.md +29 -0
- compute_api_client/docs/BatchJobStatus.md +18 -0
- compute_api_client/docs/BatchJobsApi.md +600 -0
- compute_api_client/docs/Commit.md +33 -0
- compute_api_client/docs/CommitIn.md +30 -0
- compute_api_client/docs/CommitsApi.md +425 -0
- compute_api_client/docs/CompilePayload.md +30 -0
- compute_api_client/docs/CompileStage.md +18 -0
- compute_api_client/docs/Domain.md +14 -0
- compute_api_client/docs/File.md +36 -0
- compute_api_client/docs/FileIn.md +35 -0
- compute_api_client/docs/FilesApi.md +346 -0
- compute_api_client/docs/FinalResult.md +32 -0
- compute_api_client/docs/FinalResultIn.md +30 -0
- compute_api_client/docs/FinalResultsApi.md +248 -0
- compute_api_client/docs/HTTPBadRequestError.md +29 -0
- compute_api_client/docs/HTTPNotFoundError.md +29 -0
- compute_api_client/docs/HTTPValidationError.md +29 -0
- compute_api_client/docs/HealthApi.md +72 -0
- compute_api_client/docs/Job.md +42 -0
- compute_api_client/docs/JobIn.md +32 -0
- compute_api_client/docs/JobPatch.md +34 -0
- compute_api_client/docs/JobStatus.md +18 -0
- compute_api_client/docs/JobsApi.md +460 -0
- compute_api_client/docs/Language.md +31 -0
- compute_api_client/docs/LanguagesApi.md +177 -0
- compute_api_client/docs/LocationInner.md +27 -0
- compute_api_client/docs/Member.md +33 -0
- compute_api_client/docs/MemberId.md +28 -0
- compute_api_client/docs/MemberIn.md +32 -0
- compute_api_client/docs/MembersApi.md +331 -0
- compute_api_client/docs/PageAlgorithm.md +33 -0
- compute_api_client/docs/PageBackend.md +33 -0
- compute_api_client/docs/PageBackendType.md +33 -0
- compute_api_client/docs/PageBatchJob.md +33 -0
- compute_api_client/docs/PageCommit.md +33 -0
- compute_api_client/docs/PageFile.md +33 -0
- compute_api_client/docs/PageJob.md +33 -0
- compute_api_client/docs/PageLanguage.md +33 -0
- compute_api_client/docs/PageMember.md +33 -0
- compute_api_client/docs/PageMetadata.md +32 -0
- compute_api_client/docs/PagePermission.md +33 -0
- compute_api_client/docs/PagePermissionGroup.md +33 -0
- compute_api_client/docs/PageProject.md +33 -0
- compute_api_client/docs/PageReservation.md +33 -0
- compute_api_client/docs/PageResult.md +33 -0
- compute_api_client/docs/PageTeam.md +33 -0
- compute_api_client/docs/PageTransaction.md +33 -0
- compute_api_client/docs/PageUser.md +33 -0
- compute_api_client/docs/Permission.md +31 -0
- compute_api_client/docs/PermissionGroup.md +30 -0
- compute_api_client/docs/PermissionsApi.md +340 -0
- compute_api_client/docs/Project.md +34 -0
- compute_api_client/docs/ProjectIn.md +32 -0
- compute_api_client/docs/ProjectPatch.md +32 -0
- compute_api_client/docs/ProjectsApi.md +502 -0
- compute_api_client/docs/Reservation.md +35 -0
- compute_api_client/docs/ReservationIn.md +32 -0
- compute_api_client/docs/ReservationsApi.md +341 -0
- compute_api_client/docs/Result.md +36 -0
- compute_api_client/docs/ResultIn.md +34 -0
- compute_api_client/docs/ResultsApi.md +439 -0
- compute_api_client/docs/Role.md +12 -0
- compute_api_client/docs/ShareType.md +14 -0
- compute_api_client/docs/Team.md +32 -0
- compute_api_client/docs/TeamsApi.md +177 -0
- compute_api_client/docs/Transaction.md +35 -0
- compute_api_client/docs/TransactionDomain.md +28 -0
- compute_api_client/docs/TransactionsApi.md +190 -0
- compute_api_client/docs/User.md +36 -0
- compute_api_client/docs/UserIn.md +35 -0
- compute_api_client/docs/UsersApi.md +338 -0
- compute_api_client/docs/ValidationError.md +31 -0
- compute_api_client/docs/ValidationErrorLocInner.md +28 -0
- compute_api_client/exceptions.py +216 -0
- compute_api_client/models/__init__.py +84 -0
- compute_api_client/models/algorithm.py +105 -0
- compute_api_client/models/algorithm_in.py +103 -0
- compute_api_client/models/algorithm_type.py +37 -0
- compute_api_client/models/auth_config.py +91 -0
- compute_api_client/models/backend.py +106 -0
- compute_api_client/models/backend_in.py +104 -0
- compute_api_client/models/backend_message.py +87 -0
- compute_api_client/models/backend_patch.py +112 -0
- compute_api_client/models/backend_status.py +39 -0
- compute_api_client/models/backend_type.py +145 -0
- compute_api_client/models/backend_type_patch.py +205 -0
- compute_api_client/models/backend_with_authentication.py +108 -0
- compute_api_client/models/batch_job.py +130 -0
- compute_api_client/models/batch_job_in.py +87 -0
- compute_api_client/models/batch_job_status.py +40 -0
- compute_api_client/models/commit.py +97 -0
- compute_api_client/models/commit_in.py +89 -0
- compute_api_client/models/compile_payload.py +95 -0
- compute_api_client/models/compile_stage.py +40 -0
- compute_api_client/models/domain.py +38 -0
- compute_api_client/models/file.py +108 -0
- compute_api_client/models/file_in.py +106 -0
- compute_api_client/models/final_result.py +94 -0
- compute_api_client/models/final_result_in.py +89 -0
- compute_api_client/models/http_bad_request_error.py +87 -0
- compute_api_client/models/http_not_found_error.py +87 -0
- compute_api_client/models/http_validation_error.py +95 -0
- compute_api_client/models/job.py +131 -0
- compute_api_client/models/job_in.py +98 -0
- compute_api_client/models/job_patch.py +99 -0
- compute_api_client/models/job_status.py +40 -0
- compute_api_client/models/language.py +92 -0
- compute_api_client/models/location_inner.py +144 -0
- compute_api_client/models/member.py +96 -0
- compute_api_client/models/member_id.py +144 -0
- compute_api_client/models/member_in.py +94 -0
- compute_api_client/models/metadata.py +93 -0
- compute_api_client/models/metadata_in.py +94 -0
- compute_api_client/models/page_algorithm.py +104 -0
- compute_api_client/models/page_backend.py +104 -0
- compute_api_client/models/page_backend_type.py +104 -0
- compute_api_client/models/page_batch_job.py +104 -0
- compute_api_client/models/page_commit.py +104 -0
- compute_api_client/models/page_file.py +104 -0
- compute_api_client/models/page_job.py +104 -0
- compute_api_client/models/page_language.py +104 -0
- compute_api_client/models/page_member.py +104 -0
- compute_api_client/models/page_metadata.py +125 -0
- compute_api_client/models/page_permission.py +104 -0
- compute_api_client/models/page_permission_group.py +104 -0
- compute_api_client/models/page_project.py +104 -0
- compute_api_client/models/page_reservation.py +104 -0
- compute_api_client/models/page_result.py +104 -0
- compute_api_client/models/page_team.py +104 -0
- compute_api_client/models/page_transaction.py +104 -0
- compute_api_client/models/page_user.py +104 -0
- compute_api_client/models/permission.py +92 -0
- compute_api_client/models/permission_group.py +90 -0
- compute_api_client/models/project.py +99 -0
- compute_api_client/models/project_in.py +94 -0
- compute_api_client/models/project_patch.py +114 -0
- compute_api_client/models/reservation.py +105 -0
- compute_api_client/models/reservation_in.py +94 -0
- compute_api_client/models/result.py +122 -0
- compute_api_client/models/result_in.py +117 -0
- compute_api_client/models/role.py +37 -0
- compute_api_client/models/share_type.py +38 -0
- compute_api_client/models/team.py +94 -0
- compute_api_client/models/transaction.py +117 -0
- compute_api_client/models/transaction_domain.py +142 -0
- compute_api_client/models/user.py +102 -0
- compute_api_client/models/user_in.py +100 -0
- compute_api_client/models/validation_error.py +99 -0
- compute_api_client/models/validation_error_loc_inner.py +138 -0
- compute_api_client/rest.py +213 -0
- qi2_shared/__init__.py +0 -0
- qi2_shared/authentication.py +66 -0
- qi2_shared/client.py +52 -0
- qi2_shared/hybrid/__init__.py +0 -0
- qi2_shared/hybrid/quantum_interface.py +45 -0
- qi2_shared/pagination.py +44 -0
- qi2_shared/settings.py +68 -0
- qi2_shared/utils.py +13 -0
- qi_compute_api_client-0.56.0.dist-info/METADATA +266 -0
- qi_compute_api_client-0.56.0.dist-info/RECORD +205 -0
- qi_compute_api_client-0.56.0.dist-info/WHEEL +4 -0
- qi_compute_api_client-0.56.0.dist-info/licenses/LICENSE.md +142 -0
|
@@ -0,0 +1,87 @@
|
|
|
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 pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class HTTPBadRequestError(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
HTTPBadRequestError
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
detail: StrictStr
|
|
30
|
+
__properties: ClassVar[List[str]] = ["detail"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of HTTPBadRequestError from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of HTTPBadRequestError from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"detail": obj.get("detail")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
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 pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class HTTPNotFoundError(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
HTTPNotFoundError
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
detail: StrictStr
|
|
30
|
+
__properties: ClassVar[List[str]] = ["detail"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of HTTPNotFoundError from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of HTTPNotFoundError from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"detail": obj.get("detail")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
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 pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from compute_api_client.models.validation_error import ValidationError
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class HTTPValidationError(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
HTTPValidationError
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
detail: Optional[List[ValidationError]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["detail"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of HTTPValidationError from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in detail (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.detail:
|
|
75
|
+
for _item_detail in self.detail:
|
|
76
|
+
if _item_detail:
|
|
77
|
+
_items.append(_item_detail.to_dict())
|
|
78
|
+
_dict['detail'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of HTTPValidationError from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"detail": [ValidationError.from_dict(_item) for _item in obj["detail"]] if obj.get("detail") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,131 @@
|
|
|
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 pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from compute_api_client.models.algorithm_type import AlgorithmType
|
|
24
|
+
from compute_api_client.models.job_status import JobStatus
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class Job(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
Job
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
id: StrictInt = Field(description="The ID of the job")
|
|
33
|
+
created_on: datetime = Field(description="Time of creation of the Job")
|
|
34
|
+
file_id: StrictInt = Field(description="The ID of the file")
|
|
35
|
+
algorithm_type: AlgorithmType = Field(description="The type of the algorithm")
|
|
36
|
+
status: JobStatus = Field(description="The status of the Job")
|
|
37
|
+
batch_job_id: StrictInt = Field(description="The ID of the batch job")
|
|
38
|
+
queued_at: Optional[datetime]
|
|
39
|
+
finished_at: Optional[datetime]
|
|
40
|
+
number_of_shots: Optional[StrictInt]
|
|
41
|
+
raw_data_enabled: StrictBool = Field(description="If raw data is to be attached to results")
|
|
42
|
+
session_id: StrictStr = Field(description="The uuid assigned to the job")
|
|
43
|
+
trace_id: StrictStr = Field(description="The uuid of the trace in case of job failure")
|
|
44
|
+
message: StrictStr = Field(description="The message associated with the executed job if it failed")
|
|
45
|
+
source: Optional[StrictStr] = Field(default='', description="The source application of an exception that caused a job to fail (if applicable).")
|
|
46
|
+
__properties: ClassVar[List[str]] = ["id", "created_on", "file_id", "algorithm_type", "status", "batch_job_id", "queued_at", "finished_at", "number_of_shots", "raw_data_enabled", "session_id", "trace_id", "message", "source"]
|
|
47
|
+
|
|
48
|
+
model_config = ConfigDict(
|
|
49
|
+
populate_by_name=True,
|
|
50
|
+
validate_assignment=True,
|
|
51
|
+
protected_namespaces=(),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def to_str(self) -> str:
|
|
56
|
+
"""Returns the string representation of the model using alias"""
|
|
57
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
58
|
+
|
|
59
|
+
def to_json(self) -> str:
|
|
60
|
+
"""Returns the JSON representation of the model using alias"""
|
|
61
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
62
|
+
return json.dumps(self.to_dict())
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
66
|
+
"""Create an instance of Job from a JSON string"""
|
|
67
|
+
return cls.from_dict(json.loads(json_str))
|
|
68
|
+
|
|
69
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
70
|
+
"""Return the dictionary representation of the model using alias.
|
|
71
|
+
|
|
72
|
+
This has the following differences from calling pydantic's
|
|
73
|
+
`self.model_dump(by_alias=True)`:
|
|
74
|
+
|
|
75
|
+
* `None` is only added to the output dict for nullable fields that
|
|
76
|
+
were set at model initialization. Other fields with value `None`
|
|
77
|
+
are ignored.
|
|
78
|
+
"""
|
|
79
|
+
excluded_fields: Set[str] = set([
|
|
80
|
+
])
|
|
81
|
+
|
|
82
|
+
_dict = self.model_dump(
|
|
83
|
+
by_alias=True,
|
|
84
|
+
exclude=excluded_fields,
|
|
85
|
+
exclude_none=True,
|
|
86
|
+
)
|
|
87
|
+
# set to None if queued_at (nullable) is None
|
|
88
|
+
# and model_fields_set contains the field
|
|
89
|
+
if self.queued_at is None and "queued_at" in self.model_fields_set:
|
|
90
|
+
_dict['queued_at'] = None
|
|
91
|
+
|
|
92
|
+
# set to None if finished_at (nullable) is None
|
|
93
|
+
# and model_fields_set contains the field
|
|
94
|
+
if self.finished_at is None and "finished_at" in self.model_fields_set:
|
|
95
|
+
_dict['finished_at'] = None
|
|
96
|
+
|
|
97
|
+
# set to None if number_of_shots (nullable) is None
|
|
98
|
+
# and model_fields_set contains the field
|
|
99
|
+
if self.number_of_shots is None and "number_of_shots" in self.model_fields_set:
|
|
100
|
+
_dict['number_of_shots'] = None
|
|
101
|
+
|
|
102
|
+
return _dict
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
106
|
+
"""Create an instance of Job from a dict"""
|
|
107
|
+
if obj is None:
|
|
108
|
+
return None
|
|
109
|
+
|
|
110
|
+
if not isinstance(obj, dict):
|
|
111
|
+
return cls.model_validate(obj)
|
|
112
|
+
|
|
113
|
+
_obj = cls.model_validate({
|
|
114
|
+
"id": obj.get("id"),
|
|
115
|
+
"created_on": obj.get("created_on"),
|
|
116
|
+
"file_id": obj.get("file_id"),
|
|
117
|
+
"algorithm_type": obj.get("algorithm_type"),
|
|
118
|
+
"status": obj.get("status"),
|
|
119
|
+
"batch_job_id": obj.get("batch_job_id"),
|
|
120
|
+
"queued_at": obj.get("queued_at"),
|
|
121
|
+
"finished_at": obj.get("finished_at"),
|
|
122
|
+
"number_of_shots": obj.get("number_of_shots"),
|
|
123
|
+
"raw_data_enabled": obj.get("raw_data_enabled"),
|
|
124
|
+
"session_id": obj.get("session_id"),
|
|
125
|
+
"trace_id": obj.get("trace_id"),
|
|
126
|
+
"message": obj.get("message"),
|
|
127
|
+
"source": obj.get("source") if obj.get("source") is not None else ''
|
|
128
|
+
})
|
|
129
|
+
return _obj
|
|
130
|
+
|
|
131
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
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 pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class JobIn(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
JobIn
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
file_id: StrictInt = Field(description="The ID of the file")
|
|
30
|
+
batch_job_id: StrictInt = Field(description="The ID of the batch job")
|
|
31
|
+
number_of_shots: Optional[StrictInt] = None
|
|
32
|
+
raw_data_enabled: Optional[StrictBool] = Field(default=False, description="If raw data is to be attached to results")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["file_id", "batch_job_id", "number_of_shots", "raw_data_enabled"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
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) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of JobIn 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
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# set to None if number_of_shots (nullable) is None
|
|
75
|
+
# and model_fields_set contains the field
|
|
76
|
+
if self.number_of_shots is None and "number_of_shots" in self.model_fields_set:
|
|
77
|
+
_dict['number_of_shots'] = None
|
|
78
|
+
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of JobIn from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"file_id": obj.get("file_id"),
|
|
92
|
+
"batch_job_id": obj.get("batch_job_id"),
|
|
93
|
+
"number_of_shots": obj.get("number_of_shots"),
|
|
94
|
+
"raw_data_enabled": obj.get("raw_data_enabled") if obj.get("raw_data_enabled") is not None else False
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
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 pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from compute_api_client.models.job_status import JobStatus
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class JobPatch(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
JobPatch
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
status: JobStatus = Field(description="The status of the Job")
|
|
32
|
+
session_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default='', description="The uuid assigned to the job")
|
|
33
|
+
trace_id: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default='', description="The uuid of the trace in case of job failure")
|
|
34
|
+
message: Optional[StrictStr] = Field(default='', description="The message associated with the executed job if it failed")
|
|
35
|
+
source: Optional[StrictStr] = Field(default='', description="The source application of an exception that caused a job to fail (if applicable).")
|
|
36
|
+
traceback: Optional[StrictStr] = Field(default='', description="The traceback of the exception")
|
|
37
|
+
__properties: ClassVar[List[str]] = ["status", "session_id", "trace_id", "message", "source", "traceback"]
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of JobPatch from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
|
+
"""Create an instance of JobPatch from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return cls.model_validate(obj)
|
|
88
|
+
|
|
89
|
+
_obj = cls.model_validate({
|
|
90
|
+
"status": obj.get("status"),
|
|
91
|
+
"session_id": obj.get("session_id") if obj.get("session_id") is not None else '',
|
|
92
|
+
"trace_id": obj.get("trace_id") if obj.get("trace_id") is not None else '',
|
|
93
|
+
"message": obj.get("message") if obj.get("message") is not None else '',
|
|
94
|
+
"source": obj.get("source") if obj.get("source") is not None else '',
|
|
95
|
+
"traceback": obj.get("traceback") if obj.get("traceback") is not None else ''
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class JobStatus(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
JobStatus
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
PLANNED = 'planned'
|
|
30
|
+
RUNNING = 'running'
|
|
31
|
+
COMPLETED = 'completed'
|
|
32
|
+
CANCELLED = 'cancelled'
|
|
33
|
+
FAILED = 'failed'
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_json(cls, json_str: str) -> Self:
|
|
37
|
+
"""Create an instance of JobStatus from a JSON string"""
|
|
38
|
+
return cls(json.loads(json_str))
|
|
39
|
+
|
|
40
|
+
|