qi-compute-api-client 0.7.0__py3-none-any.whl → 0.17.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of qi-compute-api-client might be problematic. Click here for more details.
- compute_api_client/__init__.py +22 -19
- compute_api_client/api/__init__.py +5 -6
- compute_api_client/api/algorithms_api.py +1333 -553
- compute_api_client/api/backend_api.py +1501 -0
- compute_api_client/api/backend_types_api.py +684 -0
- compute_api_client/api/batch_jobs_api.py +1937 -0
- compute_api_client/api/commits_api.py +1068 -435
- compute_api_client/api/files_api.py +1075 -435
- compute_api_client/api/final_results_api.py +736 -338
- compute_api_client/api/jobs_api.py +1653 -0
- compute_api_client/api/languages_api.py +556 -217
- compute_api_client/api/members_api.py +1057 -435
- compute_api_client/api/metadata_api.py +736 -337
- compute_api_client/api/permissions_api.py +1055 -421
- compute_api_client/api/projects_api.py +1604 -676
- compute_api_client/api/reservations_api.py +1124 -427
- compute_api_client/api/results_api.py +738 -337
- compute_api_client/api/teams_api.py +567 -220
- compute_api_client/api/transactions_api.py +679 -218
- compute_api_client/api/users_api.py +1090 -435
- compute_api_client/api_client.py +346 -304
- compute_api_client/api_response.py +21 -0
- compute_api_client/configuration.py +54 -67
- compute_api_client/docs/Algorithm.md +20 -3
- compute_api_client/docs/AlgorithmIn.md +20 -3
- compute_api_client/docs/AlgorithmType.md +0 -1
- compute_api_client/docs/AlgorithmsApi.md +78 -77
- compute_api_client/docs/Backend.md +33 -0
- compute_api_client/docs/BackendApi.md +419 -0
- compute_api_client/docs/BackendPatch.md +29 -0
- compute_api_client/docs/{RunStatus.md → BackendStatus.md} +1 -2
- compute_api_client/docs/BackendType.md +36 -0
- compute_api_client/docs/{RuntimeTypesApi.md → BackendTypesApi.md} +58 -31
- compute_api_client/docs/BackendWithAuthentication.md +34 -0
- compute_api_client/docs/BatchJob.md +38 -0
- compute_api_client/docs/BatchJobIn.md +29 -0
- compute_api_client/docs/{RuntimeStatus.md → BatchJobStatus.md} +1 -2
- compute_api_client/docs/{BatchRunsApi.md → BatchJobsApi.md} +170 -147
- compute_api_client/docs/Commit.md +18 -1
- compute_api_client/docs/CommitIn.md +17 -0
- compute_api_client/docs/CommitsApi.md +62 -71
- compute_api_client/docs/CompileStage.md +0 -1
- compute_api_client/docs/Domain.md +0 -1
- compute_api_client/docs/File.md +21 -4
- compute_api_client/docs/FileIn.md +21 -4
- compute_api_client/docs/FilesApi.md +65 -71
- compute_api_client/docs/FinalResult.md +20 -3
- compute_api_client/docs/FinalResultIn.md +19 -2
- compute_api_client/docs/FinalResultsApi.md +44 -71
- compute_api_client/docs/HTTPNotFoundError.md +17 -0
- compute_api_client/docs/HTTPValidationError.md +18 -1
- compute_api_client/docs/Job.md +36 -0
- compute_api_client/docs/JobIn.md +31 -0
- compute_api_client/docs/JobPatch.md +28 -0
- compute_api_client/docs/{BatchRunStatus.md → JobStatus.md} +1 -2
- compute_api_client/docs/{RunsApi.md → JobsApi.md} +137 -122
- compute_api_client/docs/Language.md +17 -0
- compute_api_client/docs/LanguagesApi.md +30 -12
- compute_api_client/docs/LocationInner.md +17 -0
- compute_api_client/docs/Member.md +19 -2
- compute_api_client/docs/MemberIn.md +19 -2
- compute_api_client/docs/MembersApi.md +59 -24
- compute_api_client/docs/Metadata.md +20 -3
- compute_api_client/docs/MetadataApi.md +49 -33
- compute_api_client/docs/MetadataIn.md +19 -2
- compute_api_client/docs/Permission.md +17 -0
- compute_api_client/docs/PermissionGroup.md +17 -0
- compute_api_client/docs/PermissionsApi.md +68 -28
- compute_api_client/docs/Project.md +20 -3
- compute_api_client/docs/ProjectIn.md +18 -1
- compute_api_client/docs/ProjectPatch.md +19 -2
- compute_api_client/docs/ProjectsApi.md +84 -36
- compute_api_client/docs/Reservation.md +21 -4
- compute_api_client/docs/ReservationIn.md +19 -2
- compute_api_client/docs/ReservationsApi.md +66 -24
- compute_api_client/docs/Result.md +23 -6
- compute_api_client/docs/ResultIn.md +19 -2
- compute_api_client/docs/ResultsApi.md +42 -26
- compute_api_client/docs/Role.md +0 -1
- compute_api_client/docs/ShareType.md +0 -1
- compute_api_client/docs/Team.md +18 -1
- compute_api_client/docs/TeamsApi.md +37 -14
- compute_api_client/docs/Transaction.md +21 -4
- compute_api_client/docs/TransactionsApi.md +50 -14
- compute_api_client/docs/User.md +21 -4
- compute_api_client/docs/UserIn.md +17 -0
- compute_api_client/docs/UsersApi.md +62 -24
- compute_api_client/docs/ValidationError.md +18 -1
- compute_api_client/exceptions.py +19 -16
- compute_api_client/models/__init__.py +16 -14
- compute_api_client/models/algorithm.py +78 -237
- compute_api_client/models/algorithm_in.py +76 -204
- compute_api_client/models/algorithm_type.py +21 -87
- compute_api_client/models/backend.py +100 -0
- compute_api_client/models/backend_patch.py +90 -0
- compute_api_client/models/backend_status.py +47 -0
- compute_api_client/models/backend_type.py +105 -0
- compute_api_client/models/backend_with_authentication.py +102 -0
- compute_api_client/models/batch_job.py +129 -0
- compute_api_client/models/batch_job_in.py +89 -0
- compute_api_client/models/batch_job_status.py +48 -0
- compute_api_client/models/commit.py +72 -230
- compute_api_client/models/commit_in.py +67 -169
- compute_api_client/models/compile_stage.py +23 -89
- compute_api_client/models/domain.py +22 -88
- compute_api_client/models/file.py +74 -288
- compute_api_client/models/file_in.py +72 -254
- compute_api_client/models/final_result.py +68 -198
- compute_api_client/models/final_result_in.py +63 -137
- compute_api_client/models/http_not_found_error.py +60 -105
- compute_api_client/models/http_validation_error.py +69 -105
- compute_api_client/models/job.py +120 -0
- compute_api_client/models/job_in.py +99 -0
- compute_api_client/models/job_patch.py +88 -0
- compute_api_client/models/job_status.py +48 -0
- compute_api_client/models/language.py +67 -172
- compute_api_client/models/location_inner.py +125 -84
- compute_api_client/models/member.py +70 -236
- compute_api_client/models/member_in.py +68 -203
- compute_api_client/models/metadata.py +68 -198
- compute_api_client/models/metadata_in.py +68 -137
- compute_api_client/models/permission.py +67 -172
- compute_api_client/models/permission_group.py +65 -142
- compute_api_client/models/project.py +74 -256
- compute_api_client/models/project_in.py +69 -195
- compute_api_client/models/project_patch.py +89 -192
- compute_api_client/models/reservation.py +79 -290
- compute_api_client/models/reservation_in.py +68 -200
- compute_api_client/models/result.py +101 -359
- compute_api_client/models/result_in.py +95 -291
- compute_api_client/models/role.py +21 -87
- compute_api_client/models/share_type.py +22 -88
- compute_api_client/models/team.py +69 -198
- compute_api_client/models/transaction.py +93 -299
- compute_api_client/models/user.py +75 -276
- compute_api_client/models/user_in.py +73 -243
- compute_api_client/models/validation_error.py +73 -160
- compute_api_client/rest.py +55 -114
- {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/METADATA +47 -40
- qi_compute_api_client-0.17.0.dist-info/RECORD +142 -0
- compute_api_client/api/batch_runs_api.py +0 -862
- compute_api_client/api/runs_api.py +0 -723
- compute_api_client/api/runtime_api.py +0 -449
- compute_api_client/api/runtime_types_api.py +0 -303
- compute_api_client/docs/BatchRun.md +0 -21
- compute_api_client/docs/BatchRunIn.md +0 -12
- compute_api_client/docs/Run.md +0 -19
- compute_api_client/docs/RunIn.md +0 -14
- compute_api_client/docs/Runtime.md +0 -16
- compute_api_client/docs/RuntimeApi.md +0 -229
- compute_api_client/docs/RuntimeType.md +0 -19
- compute_api_client/docs/RuntimeWithAuthentication.md +0 -17
- compute_api_client/models/batch_run.py +0 -423
- compute_api_client/models/batch_run_in.py +0 -171
- compute_api_client/models/batch_run_status.py +0 -114
- compute_api_client/models/run.py +0 -376
- compute_api_client/models/run_in.py +0 -233
- compute_api_client/models/run_status.py +0 -114
- compute_api_client/models/runtime.py +0 -290
- compute_api_client/models/runtime_status.py +0 -113
- compute_api_client/models/runtime_type.py +0 -357
- compute_api_client/models/runtime_with_authentication.py +0 -320
- qi_compute_api_client-0.7.0.dist-info/RECORD +0 -137
- {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/LICENSE.md +0 -0
- {qi_compute_api_client-0.7.0.dist-info → qi_compute_api_client-0.17.0.dist-info}/WHEEL +0 -0
compute_api_client/exceptions.py
CHANGED
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Quantum Inspire 2
|
|
5
5
|
|
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 0.1.0
|
|
9
|
-
Generated by
|
|
10
|
-
"""
|
|
11
|
-
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
class OpenApiException(Exception):
|
|
@@ -19,7 +18,7 @@ class OpenApiException(Exception):
|
|
|
19
18
|
|
|
20
19
|
class ApiTypeError(OpenApiException, TypeError):
|
|
21
20
|
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
|
22
|
-
key_type=None):
|
|
21
|
+
key_type=None) -> None:
|
|
23
22
|
""" Raises an exception for TypeErrors
|
|
24
23
|
|
|
25
24
|
Args:
|
|
@@ -47,7 +46,7 @@ class ApiTypeError(OpenApiException, TypeError):
|
|
|
47
46
|
|
|
48
47
|
|
|
49
48
|
class ApiValueError(OpenApiException, ValueError):
|
|
50
|
-
def __init__(self, msg, path_to_item=None):
|
|
49
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
51
50
|
"""
|
|
52
51
|
Args:
|
|
53
52
|
msg (str): the exception message
|
|
@@ -65,7 +64,7 @@ class ApiValueError(OpenApiException, ValueError):
|
|
|
65
64
|
|
|
66
65
|
|
|
67
66
|
class ApiAttributeError(OpenApiException, AttributeError):
|
|
68
|
-
def __init__(self, msg, path_to_item=None):
|
|
67
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
69
68
|
"""
|
|
70
69
|
Raised when an attribute reference or assignment fails.
|
|
71
70
|
|
|
@@ -84,7 +83,7 @@ class ApiAttributeError(OpenApiException, AttributeError):
|
|
|
84
83
|
|
|
85
84
|
|
|
86
85
|
class ApiKeyError(OpenApiException, KeyError):
|
|
87
|
-
def __init__(self, msg, path_to_item=None):
|
|
86
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
88
87
|
"""
|
|
89
88
|
Args:
|
|
90
89
|
msg (str): the exception message
|
|
@@ -102,11 +101,11 @@ class ApiKeyError(OpenApiException, KeyError):
|
|
|
102
101
|
|
|
103
102
|
class ApiException(OpenApiException):
|
|
104
103
|
|
|
105
|
-
def __init__(self, status=None, reason=None, http_resp=None):
|
|
104
|
+
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
|
106
105
|
if http_resp:
|
|
107
106
|
self.status = http_resp.status
|
|
108
107
|
self.reason = http_resp.reason
|
|
109
|
-
self.body = http_resp.data
|
|
108
|
+
self.body = http_resp.data.decode('utf-8')
|
|
110
109
|
self.headers = http_resp.getheaders()
|
|
111
110
|
else:
|
|
112
111
|
self.status = status
|
|
@@ -127,28 +126,32 @@ class ApiException(OpenApiException):
|
|
|
127
126
|
|
|
128
127
|
return error_message
|
|
129
128
|
|
|
129
|
+
class BadRequestException(ApiException):
|
|
130
|
+
|
|
131
|
+
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
|
132
|
+
super(BadRequestException, self).__init__(status, reason, http_resp)
|
|
130
133
|
|
|
131
134
|
class NotFoundException(ApiException):
|
|
132
135
|
|
|
133
|
-
def __init__(self, status=None, reason=None, http_resp=None):
|
|
136
|
+
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
|
134
137
|
super(NotFoundException, self).__init__(status, reason, http_resp)
|
|
135
138
|
|
|
136
139
|
|
|
137
140
|
class UnauthorizedException(ApiException):
|
|
138
141
|
|
|
139
|
-
def __init__(self, status=None, reason=None, http_resp=None):
|
|
142
|
+
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
|
140
143
|
super(UnauthorizedException, self).__init__(status, reason, http_resp)
|
|
141
144
|
|
|
142
145
|
|
|
143
146
|
class ForbiddenException(ApiException):
|
|
144
147
|
|
|
145
|
-
def __init__(self, status=None, reason=None, http_resp=None):
|
|
148
|
+
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
|
146
149
|
super(ForbiddenException, self).__init__(status, reason, http_resp)
|
|
147
150
|
|
|
148
151
|
|
|
149
152
|
class ServiceException(ApiException):
|
|
150
153
|
|
|
151
|
-
def __init__(self, status=None, reason=None, http_resp=None):
|
|
154
|
+
def __init__(self, status=None, reason=None, http_resp=None) -> None:
|
|
152
155
|
super(ServiceException, self).__init__(status, reason, http_resp)
|
|
153
156
|
|
|
154
157
|
|
|
@@ -156,7 +159,7 @@ def render_path(path_to_item):
|
|
|
156
159
|
"""Returns a string representation of a path"""
|
|
157
160
|
result = ""
|
|
158
161
|
for pth in path_to_item:
|
|
159
|
-
if isinstance(pth,
|
|
162
|
+
if isinstance(pth, int):
|
|
160
163
|
result += "[{0}]".format(pth)
|
|
161
164
|
else:
|
|
162
165
|
result += "['{0}']".format(pth)
|
|
@@ -4,22 +4,27 @@
|
|
|
4
4
|
"""
|
|
5
5
|
Quantum Inspire 2
|
|
6
6
|
|
|
7
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
8
8
|
|
|
9
9
|
The version of the OpenAPI document: 0.1.0
|
|
10
|
-
Generated by
|
|
11
|
-
"""
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
11
|
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
13
14
|
|
|
14
|
-
from __future__ import absolute_import
|
|
15
15
|
|
|
16
16
|
# import models into model package
|
|
17
17
|
from compute_api_client.models.algorithm import Algorithm
|
|
18
18
|
from compute_api_client.models.algorithm_in import AlgorithmIn
|
|
19
19
|
from compute_api_client.models.algorithm_type import AlgorithmType
|
|
20
|
-
from compute_api_client.models.
|
|
21
|
-
from compute_api_client.models.
|
|
22
|
-
from compute_api_client.models.
|
|
20
|
+
from compute_api_client.models.backend import Backend
|
|
21
|
+
from compute_api_client.models.backend_patch import BackendPatch
|
|
22
|
+
from compute_api_client.models.backend_status import BackendStatus
|
|
23
|
+
from compute_api_client.models.backend_type import BackendType
|
|
24
|
+
from compute_api_client.models.backend_with_authentication import BackendWithAuthentication
|
|
25
|
+
from compute_api_client.models.batch_job import BatchJob
|
|
26
|
+
from compute_api_client.models.batch_job_in import BatchJobIn
|
|
27
|
+
from compute_api_client.models.batch_job_status import BatchJobStatus
|
|
23
28
|
from compute_api_client.models.commit import Commit
|
|
24
29
|
from compute_api_client.models.commit_in import CommitIn
|
|
25
30
|
from compute_api_client.models.compile_stage import CompileStage
|
|
@@ -30,6 +35,10 @@ from compute_api_client.models.final_result import FinalResult
|
|
|
30
35
|
from compute_api_client.models.final_result_in import FinalResultIn
|
|
31
36
|
from compute_api_client.models.http_not_found_error import HTTPNotFoundError
|
|
32
37
|
from compute_api_client.models.http_validation_error import HTTPValidationError
|
|
38
|
+
from compute_api_client.models.job import Job
|
|
39
|
+
from compute_api_client.models.job_in import JobIn
|
|
40
|
+
from compute_api_client.models.job_patch import JobPatch
|
|
41
|
+
from compute_api_client.models.job_status import JobStatus
|
|
33
42
|
from compute_api_client.models.language import Language
|
|
34
43
|
from compute_api_client.models.location_inner import LocationInner
|
|
35
44
|
from compute_api_client.models.member import Member
|
|
@@ -46,13 +55,6 @@ from compute_api_client.models.reservation_in import ReservationIn
|
|
|
46
55
|
from compute_api_client.models.result import Result
|
|
47
56
|
from compute_api_client.models.result_in import ResultIn
|
|
48
57
|
from compute_api_client.models.role import Role
|
|
49
|
-
from compute_api_client.models.run import Run
|
|
50
|
-
from compute_api_client.models.run_in import RunIn
|
|
51
|
-
from compute_api_client.models.run_status import RunStatus
|
|
52
|
-
from compute_api_client.models.runtime import Runtime
|
|
53
|
-
from compute_api_client.models.runtime_status import RuntimeStatus
|
|
54
|
-
from compute_api_client.models.runtime_type import RuntimeType
|
|
55
|
-
from compute_api_client.models.runtime_with_authentication import RuntimeWithAuthentication
|
|
56
58
|
from compute_api_client.models.share_type import ShareType
|
|
57
59
|
from compute_api_client.models.team import Team
|
|
58
60
|
from compute_api_client.models.transaction import Transaction
|
|
@@ -3,261 +3,102 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Quantum Inspire 2
|
|
5
5
|
|
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 0.1.0
|
|
9
|
-
Generated by
|
|
10
|
-
"""
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
10
|
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
except ImportError:
|
|
16
|
-
from inspect import getargspec as getfullargspec
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
17
16
|
import pprint
|
|
18
17
|
import re # noqa: F401
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
from compute_api_client.configuration import Configuration
|
|
18
|
+
import json
|
|
22
19
|
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from pydantic import BaseModel, StrictInt
|
|
23
|
+
from pydantic import Field
|
|
24
|
+
from typing_extensions import Annotated
|
|
25
|
+
from compute_api_client.models.algorithm_type import AlgorithmType
|
|
26
|
+
from compute_api_client.models.share_type import ShareType
|
|
27
|
+
try:
|
|
28
|
+
from typing import Self
|
|
29
|
+
except ImportError:
|
|
30
|
+
from typing_extensions import Self
|
|
30
31
|
|
|
32
|
+
class Algorithm(BaseModel):
|
|
31
33
|
"""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
Algorithm
|
|
35
|
+
""" # noqa: E501
|
|
36
|
+
id: StrictInt
|
|
37
|
+
project_id: StrictInt
|
|
38
|
+
type: AlgorithmType
|
|
39
|
+
shared: ShareType
|
|
40
|
+
link: Optional[Annotated[str, Field(strict=True, max_length=255)]]
|
|
41
|
+
__properties: ClassVar[List[str]] = ["id", "project_id", "type", "shared", "link"]
|
|
42
|
+
|
|
43
|
+
model_config = {
|
|
44
|
+
"populate_by_name": True,
|
|
45
|
+
"validate_assignment": True
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
attribute_map = {
|
|
47
|
-
'id': 'id',
|
|
48
|
-
'type': 'type',
|
|
49
|
-
'shared': 'shared',
|
|
50
|
-
'link': 'link',
|
|
51
|
-
'project_id': 'project_id'
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
def __init__(self, id=None, type=None, shared=None, link=None, project_id=None, local_vars_configuration=None): # noqa: E501
|
|
55
|
-
"""Algorithm - a model defined in OpenAPI""" # noqa: E501
|
|
56
|
-
if local_vars_configuration is None:
|
|
57
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
58
|
-
self.local_vars_configuration = local_vars_configuration
|
|
59
|
-
|
|
60
|
-
self._id = None
|
|
61
|
-
self._type = None
|
|
62
|
-
self._shared = None
|
|
63
|
-
self._link = None
|
|
64
|
-
self._project_id = None
|
|
65
|
-
self.discriminator = None
|
|
66
|
-
|
|
67
|
-
self.id = id
|
|
68
|
-
self.type = type
|
|
69
|
-
self.shared = shared
|
|
70
|
-
self.link = link
|
|
71
|
-
self.project_id = project_id
|
|
72
|
-
|
|
73
|
-
@property
|
|
74
|
-
def id(self):
|
|
75
|
-
"""Gets the id of this Algorithm. # noqa: E501
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
:return: The id of this Algorithm. # noqa: E501
|
|
79
|
-
:rtype: int
|
|
80
|
-
"""
|
|
81
|
-
return self._id
|
|
82
|
-
|
|
83
|
-
@id.setter
|
|
84
|
-
def id(self, id):
|
|
85
|
-
"""Sets the id of this Algorithm.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
:param id: The id of this Algorithm. # noqa: E501
|
|
89
|
-
:type id: int
|
|
90
|
-
"""
|
|
91
|
-
if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
|
|
92
|
-
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
|
|
93
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
94
|
-
id is not None and id > 2147483647): # noqa: E501
|
|
95
|
-
raise ValueError("Invalid value for `id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
96
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
97
|
-
id is not None and id < 1): # noqa: E501
|
|
98
|
-
raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
99
|
-
|
|
100
|
-
self._id = id
|
|
101
|
-
|
|
102
|
-
@property
|
|
103
|
-
def type(self):
|
|
104
|
-
"""Gets the type of this Algorithm. # noqa: E501
|
|
105
|
-
|
|
106
|
-
HYBRID: hybrid<br/>QUANTUM: quantum # noqa: E501
|
|
107
|
-
|
|
108
|
-
:return: The type of this Algorithm. # noqa: E501
|
|
109
|
-
:rtype: AlgorithmType
|
|
110
|
-
"""
|
|
111
|
-
return self._type
|
|
112
|
-
|
|
113
|
-
@type.setter
|
|
114
|
-
def type(self, type):
|
|
115
|
-
"""Sets the type of this Algorithm.
|
|
116
|
-
|
|
117
|
-
HYBRID: hybrid<br/>QUANTUM: quantum # noqa: E501
|
|
118
48
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
|
|
123
|
-
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
|
124
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
125
|
-
type is not None and len(type) > 7):
|
|
126
|
-
raise ValueError("Invalid value for `type`, length must be less than or equal to `7`") # noqa: E501
|
|
127
|
-
|
|
128
|
-
self._type = type
|
|
129
|
-
|
|
130
|
-
@property
|
|
131
|
-
def shared(self):
|
|
132
|
-
"""Gets the shared of this Algorithm. # noqa: E501
|
|
133
|
-
|
|
134
|
-
PRIVATE: private<br/>LINK_ONLY: link_only<br/>TEAM: team # noqa: E501
|
|
135
|
-
|
|
136
|
-
:return: The shared of this Algorithm. # noqa: E501
|
|
137
|
-
:rtype: ShareType
|
|
138
|
-
"""
|
|
139
|
-
return self._shared
|
|
140
|
-
|
|
141
|
-
@shared.setter
|
|
142
|
-
def shared(self, shared):
|
|
143
|
-
"""Sets the shared of this Algorithm.
|
|
144
|
-
|
|
145
|
-
PRIVATE: private<br/>LINK_ONLY: link_only<br/>TEAM: team # noqa: E501
|
|
146
|
-
|
|
147
|
-
:param shared: The shared of this Algorithm. # noqa: E501
|
|
148
|
-
:type shared: ShareType
|
|
149
|
-
"""
|
|
150
|
-
if self.local_vars_configuration.client_side_validation and shared is None: # noqa: E501
|
|
151
|
-
raise ValueError("Invalid value for `shared`, must not be `None`") # noqa: E501
|
|
152
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
153
|
-
shared is not None and len(shared) > 9):
|
|
154
|
-
raise ValueError("Invalid value for `shared`, length must be less than or equal to `9`") # noqa: E501
|
|
155
|
-
|
|
156
|
-
self._shared = shared
|
|
157
|
-
|
|
158
|
-
@property
|
|
159
|
-
def link(self):
|
|
160
|
-
"""Gets the link of this Algorithm. # noqa: E501
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
161
52
|
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
162
57
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"""
|
|
166
|
-
return
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Self:
|
|
60
|
+
"""Create an instance of Algorithm from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
167
62
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
"""Sets the link of this Algorithm.
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
171
65
|
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
172
68
|
|
|
173
|
-
|
|
174
|
-
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
175
72
|
"""
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
project_id is not None and project_id < 1): # noqa: E501
|
|
207
|
-
raise ValueError("Invalid value for `project_id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
208
|
-
|
|
209
|
-
self._project_id = project_id
|
|
210
|
-
|
|
211
|
-
def to_dict(self, serialize=False):
|
|
212
|
-
"""Returns the model properties as a dict"""
|
|
213
|
-
result = {}
|
|
214
|
-
|
|
215
|
-
def convert(x):
|
|
216
|
-
if hasattr(x, "to_dict"):
|
|
217
|
-
args = getfullargspec(x.to_dict).args
|
|
218
|
-
if len(args) == 1:
|
|
219
|
-
return x.to_dict()
|
|
220
|
-
else:
|
|
221
|
-
return x.to_dict(serialize)
|
|
222
|
-
else:
|
|
223
|
-
return x
|
|
224
|
-
|
|
225
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
226
|
-
value = getattr(self, attr)
|
|
227
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
228
|
-
if isinstance(value, list):
|
|
229
|
-
result[attr] = list(map(
|
|
230
|
-
lambda x: convert(x),
|
|
231
|
-
value
|
|
232
|
-
))
|
|
233
|
-
elif isinstance(value, dict):
|
|
234
|
-
result[attr] = dict(map(
|
|
235
|
-
lambda item: (item[0], convert(item[1])),
|
|
236
|
-
value.items()
|
|
237
|
-
))
|
|
238
|
-
else:
|
|
239
|
-
result[attr] = convert(value)
|
|
240
|
-
|
|
241
|
-
return result
|
|
242
|
-
|
|
243
|
-
def to_str(self):
|
|
244
|
-
"""Returns the string representation of the model"""
|
|
245
|
-
return pprint.pformat(self.to_dict())
|
|
246
|
-
|
|
247
|
-
def __repr__(self):
|
|
248
|
-
"""For `print` and `pprint`"""
|
|
249
|
-
return self.to_str()
|
|
250
|
-
|
|
251
|
-
def __eq__(self, other):
|
|
252
|
-
"""Returns true if both objects are equal"""
|
|
253
|
-
if not isinstance(other, Algorithm):
|
|
254
|
-
return False
|
|
255
|
-
|
|
256
|
-
return self.to_dict() == other.to_dict()
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude={
|
|
76
|
+
},
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# set to None if link (nullable) is None
|
|
80
|
+
# and model_fields_set contains the field
|
|
81
|
+
if self.link is None and "link" in self.model_fields_set:
|
|
82
|
+
_dict['link'] = None
|
|
83
|
+
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
88
|
+
"""Create an instance of Algorithm from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"id": obj.get("id"),
|
|
97
|
+
"project_id": obj.get("project_id"),
|
|
98
|
+
"type": obj.get("type"),
|
|
99
|
+
"shared": obj.get("shared"),
|
|
100
|
+
"link": obj.get("link")
|
|
101
|
+
})
|
|
102
|
+
return _obj
|
|
257
103
|
|
|
258
|
-
def __ne__(self, other):
|
|
259
|
-
"""Returns true if both objects are not equal"""
|
|
260
|
-
if not isinstance(other, Algorithm):
|
|
261
|
-
return True
|
|
262
104
|
|
|
263
|
-
return self.to_dict() != other.to_dict()
|