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
|
@@ -3,166 +3,89 @@
|
|
|
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
|
|
22
|
+
from pydantic import BaseModel, StrictInt
|
|
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
|
|
30
29
|
|
|
30
|
+
class PermissionGroup(BaseModel):
|
|
31
31
|
"""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
PermissionGroup
|
|
33
|
+
""" # noqa: E501
|
|
34
|
+
id: StrictInt
|
|
35
|
+
name: Annotated[str, Field(strict=True, max_length=64)]
|
|
36
|
+
__properties: ClassVar[List[str]] = ["id", "name"]
|
|
37
|
+
|
|
38
|
+
model_config = {
|
|
39
|
+
"populate_by_name": True,
|
|
40
|
+
"validate_assignment": True
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
attribute_map = {
|
|
44
|
-
'id': 'id',
|
|
45
|
-
'name': 'name'
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501
|
|
49
|
-
"""PermissionGroup - a model defined in OpenAPI""" # noqa: E501
|
|
50
|
-
if local_vars_configuration is None:
|
|
51
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
52
|
-
self.local_vars_configuration = local_vars_configuration
|
|
53
|
-
|
|
54
|
-
self._id = None
|
|
55
|
-
self._name = None
|
|
56
|
-
self.discriminator = None
|
|
57
|
-
|
|
58
|
-
self.id = id
|
|
59
|
-
self.name = name
|
|
60
|
-
|
|
61
|
-
@property
|
|
62
|
-
def id(self):
|
|
63
|
-
"""Gets the id of this PermissionGroup. # noqa: E501
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
:return: The id of this PermissionGroup. # noqa: E501
|
|
67
|
-
:rtype: int
|
|
68
|
-
"""
|
|
69
|
-
return self._id
|
|
70
|
-
|
|
71
|
-
@id.setter
|
|
72
|
-
def id(self, id):
|
|
73
|
-
"""Sets the id of this PermissionGroup.
|
|
74
43
|
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
75
47
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
|
|
81
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
82
|
-
id is not None and id > 2147483647): # noqa: E501
|
|
83
|
-
raise ValueError("Invalid value for `id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
84
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
85
|
-
id is not None and id < 1): # noqa: E501
|
|
86
|
-
raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
87
52
|
|
|
88
|
-
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Self:
|
|
55
|
+
"""Create an instance of PermissionGroup from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
89
57
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"""Gets the name of this PermissionGroup. # noqa: E501
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
93
60
|
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
94
63
|
|
|
95
|
-
|
|
96
|
-
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
97
67
|
"""
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude={
|
|
71
|
+
},
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
78
|
+
"""Create an instance of PermissionGroup from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"id": obj.get("id"),
|
|
87
|
+
"name": obj.get("name")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
103
90
|
|
|
104
91
|
|
|
105
|
-
:param name: The name of this PermissionGroup. # noqa: E501
|
|
106
|
-
:type name: str
|
|
107
|
-
"""
|
|
108
|
-
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
|
|
109
|
-
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
|
|
110
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
111
|
-
name is not None and len(name) > 64):
|
|
112
|
-
raise ValueError("Invalid value for `name`, length must be less than or equal to `64`") # noqa: E501
|
|
113
|
-
|
|
114
|
-
self._name = name
|
|
115
|
-
|
|
116
|
-
def to_dict(self, serialize=False):
|
|
117
|
-
"""Returns the model properties as a dict"""
|
|
118
|
-
result = {}
|
|
119
|
-
|
|
120
|
-
def convert(x):
|
|
121
|
-
if hasattr(x, "to_dict"):
|
|
122
|
-
args = getfullargspec(x.to_dict).args
|
|
123
|
-
if len(args) == 1:
|
|
124
|
-
return x.to_dict()
|
|
125
|
-
else:
|
|
126
|
-
return x.to_dict(serialize)
|
|
127
|
-
else:
|
|
128
|
-
return x
|
|
129
|
-
|
|
130
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
131
|
-
value = getattr(self, attr)
|
|
132
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
133
|
-
if isinstance(value, list):
|
|
134
|
-
result[attr] = list(map(
|
|
135
|
-
lambda x: convert(x),
|
|
136
|
-
value
|
|
137
|
-
))
|
|
138
|
-
elif isinstance(value, dict):
|
|
139
|
-
result[attr] = dict(map(
|
|
140
|
-
lambda item: (item[0], convert(item[1])),
|
|
141
|
-
value.items()
|
|
142
|
-
))
|
|
143
|
-
else:
|
|
144
|
-
result[attr] = convert(value)
|
|
145
|
-
|
|
146
|
-
return result
|
|
147
|
-
|
|
148
|
-
def to_str(self):
|
|
149
|
-
"""Returns the string representation of the model"""
|
|
150
|
-
return pprint.pformat(self.to_dict())
|
|
151
|
-
|
|
152
|
-
def __repr__(self):
|
|
153
|
-
"""For `print` and `pprint`"""
|
|
154
|
-
return self.to_str()
|
|
155
|
-
|
|
156
|
-
def __eq__(self, other):
|
|
157
|
-
"""Returns true if both objects are equal"""
|
|
158
|
-
if not isinstance(other, PermissionGroup):
|
|
159
|
-
return False
|
|
160
|
-
|
|
161
|
-
return self.to_dict() == other.to_dict()
|
|
162
|
-
|
|
163
|
-
def __ne__(self, other):
|
|
164
|
-
"""Returns true if both objects are not equal"""
|
|
165
|
-
if not isinstance(other, PermissionGroup):
|
|
166
|
-
return True
|
|
167
|
-
|
|
168
|
-
return self.to_dict() != other.to_dict()
|
|
@@ -3,279 +3,97 @@
|
|
|
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
|
|
18
|
+
import json
|
|
20
19
|
|
|
21
|
-
from
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
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
|
|
30
29
|
|
|
30
|
+
class Project(BaseModel):
|
|
31
31
|
"""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
Project
|
|
33
|
+
""" # noqa: E501
|
|
34
|
+
id: StrictInt
|
|
35
|
+
created_on: datetime
|
|
36
|
+
owner_id: StrictInt
|
|
37
|
+
name: Annotated[str, Field(strict=True, max_length=255)]
|
|
38
|
+
description: StrictStr
|
|
39
|
+
starred: StrictBool
|
|
40
|
+
__properties: ClassVar[List[str]] = ["id", "created_on", "owner_id", "name", "description", "starred"]
|
|
41
|
+
|
|
42
|
+
model_config = {
|
|
43
|
+
"populate_by_name": True,
|
|
44
|
+
"validate_assignment": True
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
attribute_map = {
|
|
48
|
-
'created_on': 'created_on',
|
|
49
|
-
'id': 'id',
|
|
50
|
-
'name': 'name',
|
|
51
|
-
'description': 'description',
|
|
52
|
-
'starred': 'starred',
|
|
53
|
-
'owner_id': 'owner_id'
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
def __init__(self, created_on=None, id=None, name=None, description=None, starred=False, owner_id=None, local_vars_configuration=None): # noqa: E501
|
|
57
|
-
"""Project - a model defined in OpenAPI""" # noqa: E501
|
|
58
|
-
if local_vars_configuration is None:
|
|
59
|
-
local_vars_configuration = Configuration.get_default_copy()
|
|
60
|
-
self.local_vars_configuration = local_vars_configuration
|
|
61
|
-
|
|
62
|
-
self._created_on = None
|
|
63
|
-
self._id = None
|
|
64
|
-
self._name = None
|
|
65
|
-
self._description = None
|
|
66
|
-
self._starred = None
|
|
67
|
-
self._owner_id = None
|
|
68
|
-
self.discriminator = None
|
|
69
|
-
|
|
70
|
-
self.created_on = created_on
|
|
71
|
-
self.id = id
|
|
72
|
-
self.name = name
|
|
73
|
-
self.description = description
|
|
74
|
-
if starred is not None:
|
|
75
|
-
self.starred = starred
|
|
76
|
-
self.owner_id = owner_id
|
|
77
|
-
|
|
78
|
-
@property
|
|
79
|
-
def created_on(self):
|
|
80
|
-
"""Gets the created_on of this Project. # noqa: E501
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
:return: The created_on of this Project. # noqa: E501
|
|
84
|
-
:rtype: datetime
|
|
85
|
-
"""
|
|
86
|
-
return self._created_on
|
|
87
|
-
|
|
88
|
-
@created_on.setter
|
|
89
|
-
def created_on(self, created_on):
|
|
90
|
-
"""Sets the created_on of this Project.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
:param created_on: The created_on of this Project. # noqa: E501
|
|
94
|
-
:type created_on: datetime
|
|
95
|
-
"""
|
|
96
|
-
if self.local_vars_configuration.client_side_validation and created_on is None: # noqa: E501
|
|
97
|
-
raise ValueError("Invalid value for `created_on`, must not be `None`") # noqa: E501
|
|
98
|
-
|
|
99
|
-
self._created_on = created_on
|
|
100
|
-
|
|
101
|
-
@property
|
|
102
|
-
def id(self):
|
|
103
|
-
"""Gets the id of this Project. # noqa: E501
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
:return: The id of this Project. # noqa: E501
|
|
107
|
-
:rtype: int
|
|
108
|
-
"""
|
|
109
|
-
return self._id
|
|
110
|
-
|
|
111
|
-
@id.setter
|
|
112
|
-
def id(self, id):
|
|
113
|
-
"""Sets the id of this Project.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
:param id: The id of this Project. # noqa: E501
|
|
117
|
-
:type id: int
|
|
118
|
-
"""
|
|
119
|
-
if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
|
|
120
|
-
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
|
|
121
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
122
|
-
id is not None and id > 2147483647): # noqa: E501
|
|
123
|
-
raise ValueError("Invalid value for `id`, must be a value less than or equal to `2147483647`") # noqa: E501
|
|
124
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
125
|
-
id is not None and id < 1): # noqa: E501
|
|
126
|
-
raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501
|
|
127
|
-
|
|
128
|
-
self._id = id
|
|
129
|
-
|
|
130
|
-
@property
|
|
131
|
-
def name(self):
|
|
132
|
-
"""Gets the name of this Project. # noqa: E501
|
|
133
47
|
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
134
51
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
return self.
|
|
139
|
-
|
|
140
|
-
@name.setter
|
|
141
|
-
def name(self, name):
|
|
142
|
-
"""Sets the name of this Project.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
:param name: The name of this Project. # noqa: E501
|
|
146
|
-
:type name: str
|
|
147
|
-
"""
|
|
148
|
-
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
|
|
149
|
-
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
|
|
150
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
151
|
-
name is not None and len(name) > 255):
|
|
152
|
-
raise ValueError("Invalid value for `name`, length must be less than or equal to `255`") # noqa: E501
|
|
153
|
-
|
|
154
|
-
self._name = name
|
|
155
|
-
|
|
156
|
-
@property
|
|
157
|
-
def description(self):
|
|
158
|
-
"""Gets the description of this Project. # noqa: E501
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
:return: The description of this Project. # noqa: E501
|
|
162
|
-
:rtype: str
|
|
163
|
-
"""
|
|
164
|
-
return self._description
|
|
165
|
-
|
|
166
|
-
@description.setter
|
|
167
|
-
def description(self, description):
|
|
168
|
-
"""Sets the description of this Project.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
:param description: The description of this Project. # noqa: E501
|
|
172
|
-
:type description: str
|
|
173
|
-
"""
|
|
174
|
-
if self.local_vars_configuration.client_side_validation and description is None: # noqa: E501
|
|
175
|
-
raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501
|
|
176
|
-
|
|
177
|
-
self._description = description
|
|
178
|
-
|
|
179
|
-
@property
|
|
180
|
-
def starred(self):
|
|
181
|
-
"""Gets the starred of this Project. # noqa: E501
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
:return: The starred of this Project. # noqa: E501
|
|
185
|
-
:rtype: bool
|
|
186
|
-
"""
|
|
187
|
-
return self._starred
|
|
188
|
-
|
|
189
|
-
@starred.setter
|
|
190
|
-
def starred(self, starred):
|
|
191
|
-
"""Sets the starred of this Project.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
:param starred: The starred of this Project. # noqa: E501
|
|
195
|
-
:type starred: bool
|
|
196
|
-
"""
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
197
56
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
"""Gets the owner_id of this Project. # noqa: E501
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
:return: The owner_id of this Project. # noqa: E501
|
|
206
|
-
:rtype: int
|
|
207
|
-
"""
|
|
208
|
-
return self._owner_id
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Self:
|
|
59
|
+
"""Create an instance of Project from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
209
61
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
"""Sets the owner_id of this Project.
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
213
64
|
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
214
67
|
|
|
215
|
-
|
|
216
|
-
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
217
71
|
"""
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
value = getattr(self, attr)
|
|
245
|
-
attr = self.attribute_map.get(attr, attr) if serialize else attr
|
|
246
|
-
if isinstance(value, list):
|
|
247
|
-
result[attr] = list(map(
|
|
248
|
-
lambda x: convert(x),
|
|
249
|
-
value
|
|
250
|
-
))
|
|
251
|
-
elif isinstance(value, dict):
|
|
252
|
-
result[attr] = dict(map(
|
|
253
|
-
lambda item: (item[0], convert(item[1])),
|
|
254
|
-
value.items()
|
|
255
|
-
))
|
|
256
|
-
else:
|
|
257
|
-
result[attr] = convert(value)
|
|
258
|
-
|
|
259
|
-
return result
|
|
260
|
-
|
|
261
|
-
def to_str(self):
|
|
262
|
-
"""Returns the string representation of the model"""
|
|
263
|
-
return pprint.pformat(self.to_dict())
|
|
264
|
-
|
|
265
|
-
def __repr__(self):
|
|
266
|
-
"""For `print` and `pprint`"""
|
|
267
|
-
return self.to_str()
|
|
268
|
-
|
|
269
|
-
def __eq__(self, other):
|
|
270
|
-
"""Returns true if both objects are equal"""
|
|
271
|
-
if not isinstance(other, Project):
|
|
272
|
-
return False
|
|
273
|
-
|
|
274
|
-
return self.to_dict() == other.to_dict()
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude={
|
|
75
|
+
},
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Dict) -> Self:
|
|
82
|
+
"""Create an instance of Project 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
|
+
"id": obj.get("id"),
|
|
91
|
+
"created_on": obj.get("created_on"),
|
|
92
|
+
"owner_id": obj.get("owner_id"),
|
|
93
|
+
"name": obj.get("name"),
|
|
94
|
+
"description": obj.get("description"),
|
|
95
|
+
"starred": obj.get("starred")
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
275
98
|
|
|
276
|
-
def __ne__(self, other):
|
|
277
|
-
"""Returns true if both objects are not equal"""
|
|
278
|
-
if not isinstance(other, Project):
|
|
279
|
-
return True
|
|
280
99
|
|
|
281
|
-
return self.to_dict() != other.to_dict()
|