qi-compute-api-client 0.52.0__py3-none-any.whl → 0.54.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of qi-compute-api-client might be problematic. Click here for more details.
- compute_api_client/__init__.py +194 -95
- compute_api_client/api/algorithms_api.py +75 -81
- compute_api_client/api/auth_config_api.py +16 -24
- compute_api_client/api/backend_api.py +70 -86
- compute_api_client/api/backend_types_api.py +77 -56
- compute_api_client/api/batch_jobs_api.py +102 -120
- compute_api_client/api/commits_api.py +85 -80
- compute_api_client/api/files_api.py +62 -67
- compute_api_client/api/final_results_api.py +42 -53
- compute_api_client/api/health_api.py +16 -25
- compute_api_client/api/jobs_api.py +76 -83
- compute_api_client/api/languages_api.py +30 -42
- compute_api_client/api/members_api.py +62 -67
- compute_api_client/api/permissions_api.py +56 -70
- compute_api_client/api/projects_api.py +89 -97
- compute_api_client/api/reservations_api.py +57 -72
- compute_api_client/api/results_api.py +76 -83
- compute_api_client/api/teams_api.py +30 -42
- compute_api_client/api/transactions_api.py +31 -44
- compute_api_client/api/users_api.py +62 -67
- compute_api_client/api_client.py +135 -75
- compute_api_client/api_response.py +3 -3
- compute_api_client/configuration.py +176 -36
- compute_api_client/docs/Algorithm.md +8 -7
- compute_api_client/docs/AlgorithmIn.md +7 -6
- compute_api_client/docs/AlgorithmType.md +5 -3
- compute_api_client/docs/AlgorithmsApi.md +15 -10
- compute_api_client/docs/AuthConfig.md +3 -2
- compute_api_client/docs/AuthConfigApi.md +3 -2
- compute_api_client/docs/Backend.md +9 -8
- compute_api_client/docs/BackendApi.md +15 -10
- compute_api_client/docs/BackendIn.md +8 -7
- compute_api_client/docs/BackendPatch.md +5 -4
- compute_api_client/docs/BackendStatus.md +9 -3
- compute_api_client/docs/BackendType.md +21 -19
- compute_api_client/docs/BackendTypePatch.md +4 -2
- compute_api_client/docs/BackendTypesApi.md +21 -10
- compute_api_client/docs/BackendWithAuthentication.md +10 -9
- compute_api_client/docs/BatchJob.md +10 -9
- compute_api_client/docs/BatchJobIn.md +4 -3
- compute_api_client/docs/BatchJobStatus.md +11 -3
- compute_api_client/docs/BatchJobsApi.md +23 -16
- compute_api_client/docs/Commit.md +8 -7
- compute_api_client/docs/CommitIn.md +5 -4
- compute_api_client/docs/CommitsApi.md +15 -10
- compute_api_client/docs/CompilePayload.md +4 -3
- compute_api_client/docs/CompileStage.md +11 -3
- compute_api_client/docs/Domain.md +7 -3
- compute_api_client/docs/File.md +10 -9
- compute_api_client/docs/FileIn.md +9 -8
- compute_api_client/docs/FilesApi.md +12 -8
- compute_api_client/docs/FinalResult.md +7 -6
- compute_api_client/docs/FinalResultIn.md +5 -4
- compute_api_client/docs/FinalResultsApi.md +9 -6
- compute_api_client/docs/HTTPBadRequestError.md +3 -2
- compute_api_client/docs/HTTPNotFoundError.md +3 -2
- compute_api_client/docs/HTTPValidationError.md +3 -2
- compute_api_client/docs/HealthApi.md +3 -2
- compute_api_client/docs/Job.md +13 -12
- compute_api_client/docs/Job1.md +28 -0
- compute_api_client/docs/JobIn.md +6 -5
- compute_api_client/docs/JobPatch.md +8 -7
- compute_api_client/docs/JobStatus.md +11 -3
- compute_api_client/docs/JobsApi.md +15 -10
- compute_api_client/docs/Language.md +6 -5
- compute_api_client/docs/LanguagesApi.md +6 -4
- compute_api_client/docs/Member.md +8 -7
- compute_api_client/docs/MemberId.md +28 -0
- compute_api_client/docs/MemberIn.md +7 -6
- compute_api_client/docs/MembersApi.md +12 -8
- compute_api_client/docs/PageAlgorithm.md +3 -2
- compute_api_client/docs/PageBackend.md +3 -2
- compute_api_client/docs/PageBackendType.md +3 -2
- compute_api_client/docs/PageBatchJob.md +3 -2
- compute_api_client/docs/PageCommit.md +3 -2
- compute_api_client/docs/PageFile.md +3 -2
- compute_api_client/docs/PageJob.md +3 -2
- compute_api_client/docs/PageLanguage.md +3 -2
- compute_api_client/docs/PageMember.md +3 -2
- compute_api_client/docs/PagePermission.md +3 -2
- compute_api_client/docs/PagePermissionGroup.md +3 -2
- compute_api_client/docs/PageProject.md +3 -2
- compute_api_client/docs/PageReservation.md +3 -2
- compute_api_client/docs/PageResult.md +3 -2
- compute_api_client/docs/PageTeam.md +3 -2
- compute_api_client/docs/PageTransaction.md +3 -2
- compute_api_client/docs/PageUser.md +3 -2
- compute_api_client/docs/Permission.md +6 -5
- compute_api_client/docs/PermissionGroup.md +5 -4
- compute_api_client/docs/PermissionsApi.md +12 -8
- compute_api_client/docs/Project.md +9 -8
- compute_api_client/docs/ProjectIn.md +7 -6
- compute_api_client/docs/ProjectPatch.md +3 -2
- compute_api_client/docs/ProjectsApi.md +23 -13
- compute_api_client/docs/Reservation.md +9 -8
- compute_api_client/docs/ReservationIn.md +7 -6
- compute_api_client/docs/ReservationsApi.md +12 -8
- compute_api_client/docs/Result.md +7 -6
- compute_api_client/docs/ResultIn.md +5 -4
- compute_api_client/docs/ResultsApi.md +15 -10
- compute_api_client/docs/Role.md +5 -3
- compute_api_client/docs/ShareType.md +7 -3
- compute_api_client/docs/Team.md +7 -6
- compute_api_client/docs/TeamsApi.md +6 -4
- compute_api_client/docs/Transaction.md +6 -5
- compute_api_client/docs/TransactionDomain.md +28 -0
- compute_api_client/docs/TransactionsApi.md +6 -4
- compute_api_client/docs/User.md +11 -10
- compute_api_client/docs/UserIn.md +10 -9
- compute_api_client/docs/UsersApi.md +12 -8
- compute_api_client/docs/ValidationError.md +4 -3
- compute_api_client/docs/ValidationErrorLocInner.md +28 -0
- compute_api_client/exceptions.py +74 -24
- compute_api_client/models/__init__.py +1 -1
- compute_api_client/models/algorithm.py +19 -20
- compute_api_client/models/algorithm_in.py +18 -19
- compute_api_client/models/algorithm_type.py +1 -9
- compute_api_client/models/auth_config.py +14 -14
- compute_api_client/models/backend.py +20 -20
- compute_api_client/models/backend_in.py +19 -19
- compute_api_client/models/backend_patch.py +16 -15
- compute_api_client/models/backend_status.py +1 -9
- compute_api_client/models/backend_type.py +42 -36
- compute_api_client/models/backend_type_patch.py +23 -17
- compute_api_client/models/backend_with_authentication.py +21 -21
- compute_api_client/models/batch_job.py +21 -20
- compute_api_client/models/batch_job_in.py +15 -15
- compute_api_client/models/batch_job_status.py +1 -9
- compute_api_client/models/commit.py +19 -19
- compute_api_client/models/commit_in.py +16 -16
- compute_api_client/models/compile_payload.py +15 -15
- compute_api_client/models/compile_stage.py +1 -9
- compute_api_client/models/domain.py +1 -9
- compute_api_client/models/file.py +21 -22
- compute_api_client/models/file_in.py +20 -21
- compute_api_client/models/final_result.py +18 -17
- compute_api_client/models/final_result_in.py +16 -16
- compute_api_client/models/http_bad_request_error.py +14 -14
- compute_api_client/models/http_not_found_error.py +14 -14
- compute_api_client/models/http_validation_error.py +18 -18
- compute_api_client/models/job.py +24 -24
- compute_api_client/models/job1.py +144 -0
- compute_api_client/models/job_in.py +17 -17
- compute_api_client/models/job_patch.py +19 -20
- compute_api_client/models/job_status.py +1 -9
- compute_api_client/models/language.py +17 -18
- compute_api_client/models/member.py +19 -19
- compute_api_client/models/member_id.py +144 -0
- compute_api_client/models/member_in.py +18 -18
- compute_api_client/models/page_algorithm.py +18 -19
- compute_api_client/models/page_backend.py +18 -19
- compute_api_client/models/page_backend_type.py +18 -19
- compute_api_client/models/page_batch_job.py +18 -19
- compute_api_client/models/page_commit.py +18 -19
- compute_api_client/models/page_file.py +18 -19
- compute_api_client/models/page_job.py +18 -19
- compute_api_client/models/page_language.py +18 -19
- compute_api_client/models/page_member.py +18 -19
- compute_api_client/models/page_permission.py +18 -19
- compute_api_client/models/page_permission_group.py +18 -19
- compute_api_client/models/page_project.py +18 -19
- compute_api_client/models/page_reservation.py +18 -19
- compute_api_client/models/page_result.py +18 -19
- compute_api_client/models/page_team.py +18 -19
- compute_api_client/models/page_transaction.py +18 -19
- compute_api_client/models/page_user.py +18 -19
- compute_api_client/models/permission.py +17 -18
- compute_api_client/models/permission_group.py +16 -17
- compute_api_client/models/project.py +20 -20
- compute_api_client/models/project_in.py +18 -19
- compute_api_client/models/project_patch.py +14 -15
- compute_api_client/models/reservation.py +20 -19
- compute_api_client/models/reservation_in.py +18 -17
- compute_api_client/models/result.py +18 -17
- compute_api_client/models/result_in.py +16 -16
- compute_api_client/models/role.py +1 -9
- compute_api_client/models/share_type.py +1 -9
- compute_api_client/models/team.py +18 -19
- compute_api_client/models/transaction.py +17 -17
- compute_api_client/models/transaction_domain.py +142 -0
- compute_api_client/models/user.py +22 -23
- compute_api_client/models/user_in.py +21 -22
- compute_api_client/models/validation_error.py +20 -20
- compute_api_client/models/validation_error_loc_inner.py +138 -0
- compute_api_client/rest.py +51 -26
- {qi_compute_api_client-0.52.0.dist-info → qi_compute_api_client-0.54.0.dist-info}/METADATA +12 -9
- qi_compute_api_client-0.54.0.dist-info/RECORD +205 -0
- qi_compute_api_client-0.52.0.dist-info/RECORD +0 -197
- {qi_compute_api_client-0.52.0.dist-info → qi_compute_api_client-0.54.0.dist-info}/WHEEL +0 -0
- {qi_compute_api_client-0.52.0.dist-info → qi_compute_api_client-0.54.0.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -17,16 +17,12 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel
|
|
23
|
-
from pydantic import Field
|
|
24
22
|
from typing_extensions import Annotated
|
|
25
23
|
from compute_api_client.models.language import Language
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
except ImportError:
|
|
29
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
30
26
|
|
|
31
27
|
class PageLanguage(BaseModel):
|
|
32
28
|
"""
|
|
@@ -39,10 +35,11 @@ class PageLanguage(BaseModel):
|
|
|
39
35
|
pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
|
|
40
36
|
__properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
|
|
41
37
|
|
|
42
|
-
model_config =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
46
43
|
|
|
47
44
|
|
|
48
45
|
def to_str(self) -> str:
|
|
@@ -55,7 +52,7 @@ class PageLanguage(BaseModel):
|
|
|
55
52
|
return json.dumps(self.to_dict())
|
|
56
53
|
|
|
57
54
|
@classmethod
|
|
58
|
-
def from_json(cls, json_str: str) -> Self:
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
56
|
"""Create an instance of PageLanguage from a JSON string"""
|
|
60
57
|
return cls.from_dict(json.loads(json_str))
|
|
61
58
|
|
|
@@ -69,18 +66,20 @@ class PageLanguage(BaseModel):
|
|
|
69
66
|
were set at model initialization. Other fields with value `None`
|
|
70
67
|
are ignored.
|
|
71
68
|
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
72
|
_dict = self.model_dump(
|
|
73
73
|
by_alias=True,
|
|
74
|
-
exclude=
|
|
75
|
-
},
|
|
74
|
+
exclude=excluded_fields,
|
|
76
75
|
exclude_none=True,
|
|
77
76
|
)
|
|
78
77
|
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
79
78
|
_items = []
|
|
80
79
|
if self.items:
|
|
81
|
-
for
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
80
|
+
for _item_items in self.items:
|
|
81
|
+
if _item_items:
|
|
82
|
+
_items.append(_item_items.to_dict())
|
|
84
83
|
_dict['items'] = _items
|
|
85
84
|
# set to None if total (nullable) is None
|
|
86
85
|
# and model_fields_set contains the field
|
|
@@ -105,7 +104,7 @@ class PageLanguage(BaseModel):
|
|
|
105
104
|
return _dict
|
|
106
105
|
|
|
107
106
|
@classmethod
|
|
108
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
109
108
|
"""Create an instance of PageLanguage from a dict"""
|
|
110
109
|
if obj is None:
|
|
111
110
|
return None
|
|
@@ -114,7 +113,7 @@ class PageLanguage(BaseModel):
|
|
|
114
113
|
return cls.model_validate(obj)
|
|
115
114
|
|
|
116
115
|
_obj = cls.model_validate({
|
|
117
|
-
"items": [Language.from_dict(_item) for _item in obj
|
|
116
|
+
"items": [Language.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
|
118
117
|
"total": obj.get("total"),
|
|
119
118
|
"page": obj.get("page"),
|
|
120
119
|
"size": obj.get("size"),
|
|
@@ -17,16 +17,12 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel
|
|
23
|
-
from pydantic import Field
|
|
24
22
|
from typing_extensions import Annotated
|
|
25
23
|
from compute_api_client.models.member import Member
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
except ImportError:
|
|
29
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
30
26
|
|
|
31
27
|
class PageMember(BaseModel):
|
|
32
28
|
"""
|
|
@@ -39,10 +35,11 @@ class PageMember(BaseModel):
|
|
|
39
35
|
pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
|
|
40
36
|
__properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
|
|
41
37
|
|
|
42
|
-
model_config =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
46
43
|
|
|
47
44
|
|
|
48
45
|
def to_str(self) -> str:
|
|
@@ -55,7 +52,7 @@ class PageMember(BaseModel):
|
|
|
55
52
|
return json.dumps(self.to_dict())
|
|
56
53
|
|
|
57
54
|
@classmethod
|
|
58
|
-
def from_json(cls, json_str: str) -> Self:
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
56
|
"""Create an instance of PageMember from a JSON string"""
|
|
60
57
|
return cls.from_dict(json.loads(json_str))
|
|
61
58
|
|
|
@@ -69,18 +66,20 @@ class PageMember(BaseModel):
|
|
|
69
66
|
were set at model initialization. Other fields with value `None`
|
|
70
67
|
are ignored.
|
|
71
68
|
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
72
|
_dict = self.model_dump(
|
|
73
73
|
by_alias=True,
|
|
74
|
-
exclude=
|
|
75
|
-
},
|
|
74
|
+
exclude=excluded_fields,
|
|
76
75
|
exclude_none=True,
|
|
77
76
|
)
|
|
78
77
|
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
79
78
|
_items = []
|
|
80
79
|
if self.items:
|
|
81
|
-
for
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
80
|
+
for _item_items in self.items:
|
|
81
|
+
if _item_items:
|
|
82
|
+
_items.append(_item_items.to_dict())
|
|
84
83
|
_dict['items'] = _items
|
|
85
84
|
# set to None if total (nullable) is None
|
|
86
85
|
# and model_fields_set contains the field
|
|
@@ -105,7 +104,7 @@ class PageMember(BaseModel):
|
|
|
105
104
|
return _dict
|
|
106
105
|
|
|
107
106
|
@classmethod
|
|
108
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
109
108
|
"""Create an instance of PageMember from a dict"""
|
|
110
109
|
if obj is None:
|
|
111
110
|
return None
|
|
@@ -114,7 +113,7 @@ class PageMember(BaseModel):
|
|
|
114
113
|
return cls.model_validate(obj)
|
|
115
114
|
|
|
116
115
|
_obj = cls.model_validate({
|
|
117
|
-
"items": [Member.from_dict(_item) for _item in obj
|
|
116
|
+
"items": [Member.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
|
118
117
|
"total": obj.get("total"),
|
|
119
118
|
"page": obj.get("page"),
|
|
120
119
|
"size": obj.get("size"),
|
|
@@ -17,16 +17,12 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel
|
|
23
|
-
from pydantic import Field
|
|
24
22
|
from typing_extensions import Annotated
|
|
25
23
|
from compute_api_client.models.permission import Permission
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
except ImportError:
|
|
29
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
30
26
|
|
|
31
27
|
class PagePermission(BaseModel):
|
|
32
28
|
"""
|
|
@@ -39,10 +35,11 @@ class PagePermission(BaseModel):
|
|
|
39
35
|
pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
|
|
40
36
|
__properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
|
|
41
37
|
|
|
42
|
-
model_config =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
46
43
|
|
|
47
44
|
|
|
48
45
|
def to_str(self) -> str:
|
|
@@ -55,7 +52,7 @@ class PagePermission(BaseModel):
|
|
|
55
52
|
return json.dumps(self.to_dict())
|
|
56
53
|
|
|
57
54
|
@classmethod
|
|
58
|
-
def from_json(cls, json_str: str) -> Self:
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
56
|
"""Create an instance of PagePermission from a JSON string"""
|
|
60
57
|
return cls.from_dict(json.loads(json_str))
|
|
61
58
|
|
|
@@ -69,18 +66,20 @@ class PagePermission(BaseModel):
|
|
|
69
66
|
were set at model initialization. Other fields with value `None`
|
|
70
67
|
are ignored.
|
|
71
68
|
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
72
|
_dict = self.model_dump(
|
|
73
73
|
by_alias=True,
|
|
74
|
-
exclude=
|
|
75
|
-
},
|
|
74
|
+
exclude=excluded_fields,
|
|
76
75
|
exclude_none=True,
|
|
77
76
|
)
|
|
78
77
|
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
79
78
|
_items = []
|
|
80
79
|
if self.items:
|
|
81
|
-
for
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
80
|
+
for _item_items in self.items:
|
|
81
|
+
if _item_items:
|
|
82
|
+
_items.append(_item_items.to_dict())
|
|
84
83
|
_dict['items'] = _items
|
|
85
84
|
# set to None if total (nullable) is None
|
|
86
85
|
# and model_fields_set contains the field
|
|
@@ -105,7 +104,7 @@ class PagePermission(BaseModel):
|
|
|
105
104
|
return _dict
|
|
106
105
|
|
|
107
106
|
@classmethod
|
|
108
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
109
108
|
"""Create an instance of PagePermission from a dict"""
|
|
110
109
|
if obj is None:
|
|
111
110
|
return None
|
|
@@ -114,7 +113,7 @@ class PagePermission(BaseModel):
|
|
|
114
113
|
return cls.model_validate(obj)
|
|
115
114
|
|
|
116
115
|
_obj = cls.model_validate({
|
|
117
|
-
"items": [Permission.from_dict(_item) for _item in obj
|
|
116
|
+
"items": [Permission.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
|
118
117
|
"total": obj.get("total"),
|
|
119
118
|
"page": obj.get("page"),
|
|
120
119
|
"size": obj.get("size"),
|
|
@@ -17,16 +17,12 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel
|
|
23
|
-
from pydantic import Field
|
|
24
22
|
from typing_extensions import Annotated
|
|
25
23
|
from compute_api_client.models.permission_group import PermissionGroup
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
except ImportError:
|
|
29
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
30
26
|
|
|
31
27
|
class PagePermissionGroup(BaseModel):
|
|
32
28
|
"""
|
|
@@ -39,10 +35,11 @@ class PagePermissionGroup(BaseModel):
|
|
|
39
35
|
pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
|
|
40
36
|
__properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
|
|
41
37
|
|
|
42
|
-
model_config =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
46
43
|
|
|
47
44
|
|
|
48
45
|
def to_str(self) -> str:
|
|
@@ -55,7 +52,7 @@ class PagePermissionGroup(BaseModel):
|
|
|
55
52
|
return json.dumps(self.to_dict())
|
|
56
53
|
|
|
57
54
|
@classmethod
|
|
58
|
-
def from_json(cls, json_str: str) -> Self:
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
56
|
"""Create an instance of PagePermissionGroup from a JSON string"""
|
|
60
57
|
return cls.from_dict(json.loads(json_str))
|
|
61
58
|
|
|
@@ -69,18 +66,20 @@ class PagePermissionGroup(BaseModel):
|
|
|
69
66
|
were set at model initialization. Other fields with value `None`
|
|
70
67
|
are ignored.
|
|
71
68
|
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
72
|
_dict = self.model_dump(
|
|
73
73
|
by_alias=True,
|
|
74
|
-
exclude=
|
|
75
|
-
},
|
|
74
|
+
exclude=excluded_fields,
|
|
76
75
|
exclude_none=True,
|
|
77
76
|
)
|
|
78
77
|
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
79
78
|
_items = []
|
|
80
79
|
if self.items:
|
|
81
|
-
for
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
80
|
+
for _item_items in self.items:
|
|
81
|
+
if _item_items:
|
|
82
|
+
_items.append(_item_items.to_dict())
|
|
84
83
|
_dict['items'] = _items
|
|
85
84
|
# set to None if total (nullable) is None
|
|
86
85
|
# and model_fields_set contains the field
|
|
@@ -105,7 +104,7 @@ class PagePermissionGroup(BaseModel):
|
|
|
105
104
|
return _dict
|
|
106
105
|
|
|
107
106
|
@classmethod
|
|
108
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
109
108
|
"""Create an instance of PagePermissionGroup from a dict"""
|
|
110
109
|
if obj is None:
|
|
111
110
|
return None
|
|
@@ -114,7 +113,7 @@ class PagePermissionGroup(BaseModel):
|
|
|
114
113
|
return cls.model_validate(obj)
|
|
115
114
|
|
|
116
115
|
_obj = cls.model_validate({
|
|
117
|
-
"items": [PermissionGroup.from_dict(_item) for _item in obj
|
|
116
|
+
"items": [PermissionGroup.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
|
118
117
|
"total": obj.get("total"),
|
|
119
118
|
"page": obj.get("page"),
|
|
120
119
|
"size": obj.get("size"),
|
|
@@ -17,16 +17,12 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel
|
|
23
|
-
from pydantic import Field
|
|
24
22
|
from typing_extensions import Annotated
|
|
25
23
|
from compute_api_client.models.project import Project
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
except ImportError:
|
|
29
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
30
26
|
|
|
31
27
|
class PageProject(BaseModel):
|
|
32
28
|
"""
|
|
@@ -39,10 +35,11 @@ class PageProject(BaseModel):
|
|
|
39
35
|
pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
|
|
40
36
|
__properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
|
|
41
37
|
|
|
42
|
-
model_config =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
46
43
|
|
|
47
44
|
|
|
48
45
|
def to_str(self) -> str:
|
|
@@ -55,7 +52,7 @@ class PageProject(BaseModel):
|
|
|
55
52
|
return json.dumps(self.to_dict())
|
|
56
53
|
|
|
57
54
|
@classmethod
|
|
58
|
-
def from_json(cls, json_str: str) -> Self:
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
56
|
"""Create an instance of PageProject from a JSON string"""
|
|
60
57
|
return cls.from_dict(json.loads(json_str))
|
|
61
58
|
|
|
@@ -69,18 +66,20 @@ class PageProject(BaseModel):
|
|
|
69
66
|
were set at model initialization. Other fields with value `None`
|
|
70
67
|
are ignored.
|
|
71
68
|
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
72
|
_dict = self.model_dump(
|
|
73
73
|
by_alias=True,
|
|
74
|
-
exclude=
|
|
75
|
-
},
|
|
74
|
+
exclude=excluded_fields,
|
|
76
75
|
exclude_none=True,
|
|
77
76
|
)
|
|
78
77
|
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
79
78
|
_items = []
|
|
80
79
|
if self.items:
|
|
81
|
-
for
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
80
|
+
for _item_items in self.items:
|
|
81
|
+
if _item_items:
|
|
82
|
+
_items.append(_item_items.to_dict())
|
|
84
83
|
_dict['items'] = _items
|
|
85
84
|
# set to None if total (nullable) is None
|
|
86
85
|
# and model_fields_set contains the field
|
|
@@ -105,7 +104,7 @@ class PageProject(BaseModel):
|
|
|
105
104
|
return _dict
|
|
106
105
|
|
|
107
106
|
@classmethod
|
|
108
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
109
108
|
"""Create an instance of PageProject from a dict"""
|
|
110
109
|
if obj is None:
|
|
111
110
|
return None
|
|
@@ -114,7 +113,7 @@ class PageProject(BaseModel):
|
|
|
114
113
|
return cls.model_validate(obj)
|
|
115
114
|
|
|
116
115
|
_obj = cls.model_validate({
|
|
117
|
-
"items": [Project.from_dict(_item) for _item in obj
|
|
116
|
+
"items": [Project.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
|
118
117
|
"total": obj.get("total"),
|
|
119
118
|
"page": obj.get("page"),
|
|
120
119
|
"size": obj.get("size"),
|
|
@@ -17,16 +17,12 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel
|
|
23
|
-
from pydantic import Field
|
|
24
22
|
from typing_extensions import Annotated
|
|
25
23
|
from compute_api_client.models.reservation import Reservation
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
except ImportError:
|
|
29
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
30
26
|
|
|
31
27
|
class PageReservation(BaseModel):
|
|
32
28
|
"""
|
|
@@ -39,10 +35,11 @@ class PageReservation(BaseModel):
|
|
|
39
35
|
pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
|
|
40
36
|
__properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
|
|
41
37
|
|
|
42
|
-
model_config =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
46
43
|
|
|
47
44
|
|
|
48
45
|
def to_str(self) -> str:
|
|
@@ -55,7 +52,7 @@ class PageReservation(BaseModel):
|
|
|
55
52
|
return json.dumps(self.to_dict())
|
|
56
53
|
|
|
57
54
|
@classmethod
|
|
58
|
-
def from_json(cls, json_str: str) -> Self:
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
56
|
"""Create an instance of PageReservation from a JSON string"""
|
|
60
57
|
return cls.from_dict(json.loads(json_str))
|
|
61
58
|
|
|
@@ -69,18 +66,20 @@ class PageReservation(BaseModel):
|
|
|
69
66
|
were set at model initialization. Other fields with value `None`
|
|
70
67
|
are ignored.
|
|
71
68
|
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
72
|
_dict = self.model_dump(
|
|
73
73
|
by_alias=True,
|
|
74
|
-
exclude=
|
|
75
|
-
},
|
|
74
|
+
exclude=excluded_fields,
|
|
76
75
|
exclude_none=True,
|
|
77
76
|
)
|
|
78
77
|
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
79
78
|
_items = []
|
|
80
79
|
if self.items:
|
|
81
|
-
for
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
80
|
+
for _item_items in self.items:
|
|
81
|
+
if _item_items:
|
|
82
|
+
_items.append(_item_items.to_dict())
|
|
84
83
|
_dict['items'] = _items
|
|
85
84
|
# set to None if total (nullable) is None
|
|
86
85
|
# and model_fields_set contains the field
|
|
@@ -105,7 +104,7 @@ class PageReservation(BaseModel):
|
|
|
105
104
|
return _dict
|
|
106
105
|
|
|
107
106
|
@classmethod
|
|
108
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
109
108
|
"""Create an instance of PageReservation from a dict"""
|
|
110
109
|
if obj is None:
|
|
111
110
|
return None
|
|
@@ -114,7 +113,7 @@ class PageReservation(BaseModel):
|
|
|
114
113
|
return cls.model_validate(obj)
|
|
115
114
|
|
|
116
115
|
_obj = cls.model_validate({
|
|
117
|
-
"items": [Reservation.from_dict(_item) for _item in obj
|
|
116
|
+
"items": [Reservation.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
|
118
117
|
"total": obj.get("total"),
|
|
119
118
|
"page": obj.get("page"),
|
|
120
119
|
"size": obj.get("size"),
|
|
@@ -17,16 +17,12 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from pydantic import BaseModel
|
|
23
|
-
from pydantic import Field
|
|
24
22
|
from typing_extensions import Annotated
|
|
25
23
|
from compute_api_client.models.result import Result
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
except ImportError:
|
|
29
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
30
26
|
|
|
31
27
|
class PageResult(BaseModel):
|
|
32
28
|
"""
|
|
@@ -39,10 +35,11 @@ class PageResult(BaseModel):
|
|
|
39
35
|
pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
|
|
40
36
|
__properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
|
|
41
37
|
|
|
42
|
-
model_config =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
46
43
|
|
|
47
44
|
|
|
48
45
|
def to_str(self) -> str:
|
|
@@ -55,7 +52,7 @@ class PageResult(BaseModel):
|
|
|
55
52
|
return json.dumps(self.to_dict())
|
|
56
53
|
|
|
57
54
|
@classmethod
|
|
58
|
-
def from_json(cls, json_str: str) -> Self:
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
56
|
"""Create an instance of PageResult from a JSON string"""
|
|
60
57
|
return cls.from_dict(json.loads(json_str))
|
|
61
58
|
|
|
@@ -69,18 +66,20 @@ class PageResult(BaseModel):
|
|
|
69
66
|
were set at model initialization. Other fields with value `None`
|
|
70
67
|
are ignored.
|
|
71
68
|
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
72
|
_dict = self.model_dump(
|
|
73
73
|
by_alias=True,
|
|
74
|
-
exclude=
|
|
75
|
-
},
|
|
74
|
+
exclude=excluded_fields,
|
|
76
75
|
exclude_none=True,
|
|
77
76
|
)
|
|
78
77
|
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
79
78
|
_items = []
|
|
80
79
|
if self.items:
|
|
81
|
-
for
|
|
82
|
-
if
|
|
83
|
-
_items.append(
|
|
80
|
+
for _item_items in self.items:
|
|
81
|
+
if _item_items:
|
|
82
|
+
_items.append(_item_items.to_dict())
|
|
84
83
|
_dict['items'] = _items
|
|
85
84
|
# set to None if total (nullable) is None
|
|
86
85
|
# and model_fields_set contains the field
|
|
@@ -105,7 +104,7 @@ class PageResult(BaseModel):
|
|
|
105
104
|
return _dict
|
|
106
105
|
|
|
107
106
|
@classmethod
|
|
108
|
-
def from_dict(cls, obj: Dict) -> Self:
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
109
108
|
"""Create an instance of PageResult from a dict"""
|
|
110
109
|
if obj is None:
|
|
111
110
|
return None
|
|
@@ -114,7 +113,7 @@ class PageResult(BaseModel):
|
|
|
114
113
|
return cls.model_validate(obj)
|
|
115
114
|
|
|
116
115
|
_obj = cls.model_validate({
|
|
117
|
-
"items": [Result.from_dict(_item) for _item in obj
|
|
116
|
+
"items": [Result.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
|
118
117
|
"total": obj.get("total"),
|
|
119
118
|
"page": obj.get("page"),
|
|
120
119
|
"size": obj.get("size"),
|