qi-compute-api-client 0.32.0__py3-none-any.whl → 0.35.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.

Files changed (134) hide show
  1. compute_api_client/__init__.py +20 -1
  2. compute_api_client/api/__init__.py +1 -0
  3. compute_api_client/api/algorithms_api.py +76 -75
  4. compute_api_client/api/backend_api.py +78 -75
  5. compute_api_client/api/backend_types_api.py +95 -75
  6. compute_api_client/api/batch_jobs_api.py +77 -74
  7. compute_api_client/api/commits_api.py +78 -75
  8. compute_api_client/api/files_api.py +78 -75
  9. compute_api_client/api/final_results_api.py +1 -1
  10. compute_api_client/api/health_api.py +290 -0
  11. compute_api_client/api/jobs_api.py +78 -75
  12. compute_api_client/api/languages_api.py +76 -73
  13. compute_api_client/api/members_api.py +78 -75
  14. compute_api_client/api/metadata_api.py +79 -8
  15. compute_api_client/api/permissions_api.py +146 -142
  16. compute_api_client/api/projects_api.py +76 -75
  17. compute_api_client/api/reservations_api.py +78 -75
  18. compute_api_client/api/results_api.py +151 -80
  19. compute_api_client/api/teams_api.py +78 -75
  20. compute_api_client/api/transactions_api.py +78 -75
  21. compute_api_client/api/users_api.py +78 -75
  22. compute_api_client/api_client.py +1 -1
  23. compute_api_client/configuration.py +1 -1
  24. compute_api_client/docs/AlgorithmsApi.md +12 -12
  25. compute_api_client/docs/BackendApi.md +12 -12
  26. compute_api_client/docs/BackendType.md +3 -1
  27. compute_api_client/docs/BackendTypesApi.md +14 -12
  28. compute_api_client/docs/BatchJobsApi.md +12 -12
  29. compute_api_client/docs/CommitsApi.md +12 -12
  30. compute_api_client/docs/FilesApi.md +12 -12
  31. compute_api_client/docs/HealthApi.md +71 -0
  32. compute_api_client/docs/JobsApi.md +12 -12
  33. compute_api_client/docs/LanguagesApi.md +12 -12
  34. compute_api_client/docs/MembersApi.md +12 -12
  35. compute_api_client/docs/MetadataApi.md +12 -4
  36. compute_api_client/docs/PageAlgorithm.md +32 -0
  37. compute_api_client/docs/PageBackend.md +32 -0
  38. compute_api_client/docs/PageBackendType.md +32 -0
  39. compute_api_client/docs/PageBatchJob.md +32 -0
  40. compute_api_client/docs/PageCommit.md +32 -0
  41. compute_api_client/docs/PageFile.md +32 -0
  42. compute_api_client/docs/PageJob.md +32 -0
  43. compute_api_client/docs/PageLanguage.md +32 -0
  44. compute_api_client/docs/PageMember.md +32 -0
  45. compute_api_client/docs/PageMetadata.md +32 -0
  46. compute_api_client/docs/PagePermission.md +32 -0
  47. compute_api_client/docs/PagePermissionGroup.md +32 -0
  48. compute_api_client/docs/PageProject.md +32 -0
  49. compute_api_client/docs/PageReservation.md +32 -0
  50. compute_api_client/docs/PageResult.md +32 -0
  51. compute_api_client/docs/PageTeam.md +32 -0
  52. compute_api_client/docs/PageTransaction.md +32 -0
  53. compute_api_client/docs/PageUser.md +32 -0
  54. compute_api_client/docs/PermissionsApi.md +24 -24
  55. compute_api_client/docs/ProjectsApi.md +12 -12
  56. compute_api_client/docs/ReservationsApi.md +12 -12
  57. compute_api_client/docs/ResultsApi.md +24 -16
  58. compute_api_client/docs/TeamsApi.md +12 -12
  59. compute_api_client/docs/TransactionsApi.md +12 -12
  60. compute_api_client/docs/UsersApi.md +12 -12
  61. compute_api_client/exceptions.py +1 -1
  62. compute_api_client/models/__init__.py +19 -1
  63. compute_api_client/models/algorithm.py +1 -1
  64. compute_api_client/models/algorithm_in.py +1 -1
  65. compute_api_client/models/algorithm_type.py +1 -1
  66. compute_api_client/models/backend.py +1 -1
  67. compute_api_client/models/backend_in.py +1 -1
  68. compute_api_client/models/backend_patch.py +1 -1
  69. compute_api_client/models/backend_status.py +1 -1
  70. compute_api_client/models/backend_type.py +8 -4
  71. compute_api_client/models/backend_with_authentication.py +1 -1
  72. compute_api_client/models/batch_job.py +1 -1
  73. compute_api_client/models/batch_job_in.py +1 -1
  74. compute_api_client/models/batch_job_status.py +1 -1
  75. compute_api_client/models/commit.py +1 -1
  76. compute_api_client/models/commit_in.py +1 -1
  77. compute_api_client/models/compile_stage.py +1 -1
  78. compute_api_client/models/domain.py +1 -1
  79. compute_api_client/models/file.py +1 -1
  80. compute_api_client/models/file_in.py +1 -1
  81. compute_api_client/models/final_result.py +1 -1
  82. compute_api_client/models/final_result_in.py +1 -1
  83. compute_api_client/models/http_not_found_error.py +1 -1
  84. compute_api_client/models/http_validation_error.py +1 -1
  85. compute_api_client/models/job.py +1 -1
  86. compute_api_client/models/job_in.py +1 -1
  87. compute_api_client/models/job_patch.py +1 -1
  88. compute_api_client/models/job_status.py +1 -1
  89. compute_api_client/models/language.py +1 -1
  90. compute_api_client/models/location_inner.py +1 -1
  91. compute_api_client/models/member.py +1 -1
  92. compute_api_client/models/member_in.py +1 -1
  93. compute_api_client/models/metadata.py +1 -1
  94. compute_api_client/models/metadata_in.py +1 -1
  95. compute_api_client/models/page_algorithm.py +125 -0
  96. compute_api_client/models/page_backend.py +125 -0
  97. compute_api_client/models/page_backend_type.py +125 -0
  98. compute_api_client/models/page_batch_job.py +125 -0
  99. compute_api_client/models/page_commit.py +125 -0
  100. compute_api_client/models/page_file.py +125 -0
  101. compute_api_client/models/page_job.py +125 -0
  102. compute_api_client/models/page_language.py +125 -0
  103. compute_api_client/models/page_member.py +125 -0
  104. compute_api_client/models/page_metadata.py +125 -0
  105. compute_api_client/models/page_permission.py +125 -0
  106. compute_api_client/models/page_permission_group.py +125 -0
  107. compute_api_client/models/page_project.py +125 -0
  108. compute_api_client/models/page_reservation.py +125 -0
  109. compute_api_client/models/page_result.py +125 -0
  110. compute_api_client/models/page_team.py +125 -0
  111. compute_api_client/models/page_transaction.py +125 -0
  112. compute_api_client/models/page_user.py +125 -0
  113. compute_api_client/models/permission.py +1 -1
  114. compute_api_client/models/permission_group.py +1 -1
  115. compute_api_client/models/project.py +1 -1
  116. compute_api_client/models/project_in.py +1 -1
  117. compute_api_client/models/project_patch.py +1 -1
  118. compute_api_client/models/reservation.py +1 -1
  119. compute_api_client/models/reservation_in.py +1 -1
  120. compute_api_client/models/result.py +1 -1
  121. compute_api_client/models/result_in.py +1 -1
  122. compute_api_client/models/role.py +1 -1
  123. compute_api_client/models/share_type.py +1 -1
  124. compute_api_client/models/team.py +1 -1
  125. compute_api_client/models/transaction.py +1 -1
  126. compute_api_client/models/user.py +1 -1
  127. compute_api_client/models/user_in.py +1 -1
  128. compute_api_client/models/validation_error.py +1 -1
  129. compute_api_client/rest.py +1 -1
  130. {qi_compute_api_client-0.32.0.dist-info → qi_compute_api_client-0.35.0.dist-info}/METADATA +22 -3
  131. qi_compute_api_client-0.35.0.dist-info/RECORD +182 -0
  132. qi_compute_api_client-0.32.0.dist-info/RECORD +0 -144
  133. {qi_compute_api_client-0.32.0.dist-info → qi_compute_api_client-0.35.0.dist-info}/LICENSE.md +0 -0
  134. {qi_compute_api_client-0.32.0.dist-info → qi_compute_api_client-0.35.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,125 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Quantum Inspire 2
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from pydantic import BaseModel
23
+ from pydantic import Field
24
+ from typing_extensions import Annotated
25
+ from compute_api_client.models.project import Project
26
+ try:
27
+ from typing import Self
28
+ except ImportError:
29
+ from typing_extensions import Self
30
+
31
+ class PageProject(BaseModel):
32
+ """
33
+ PageProject
34
+ """ # noqa: E501
35
+ items: List[Project]
36
+ total: Optional[Annotated[int, Field(strict=True, ge=0)]]
37
+ page: Optional[Annotated[int, Field(strict=True, ge=1)]]
38
+ size: Optional[Annotated[int, Field(strict=True, ge=1)]]
39
+ pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
40
+ __properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
41
+
42
+ model_config = {
43
+ "populate_by_name": True,
44
+ "validate_assignment": True
45
+ }
46
+
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))
51
+
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())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Self:
59
+ """Create an instance of PageProject from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self) -> Dict[str, Any]:
63
+ """Return the dictionary representation of the model using alias.
64
+
65
+ This has the following differences from calling pydantic's
66
+ `self.model_dump(by_alias=True)`:
67
+
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.
71
+ """
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude={
75
+ },
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
79
+ _items = []
80
+ if self.items:
81
+ for _item in self.items:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['items'] = _items
85
+ # set to None if total (nullable) is None
86
+ # and model_fields_set contains the field
87
+ if self.total is None and "total" in self.model_fields_set:
88
+ _dict['total'] = None
89
+
90
+ # set to None if page (nullable) is None
91
+ # and model_fields_set contains the field
92
+ if self.page is None and "page" in self.model_fields_set:
93
+ _dict['page'] = None
94
+
95
+ # set to None if size (nullable) is None
96
+ # and model_fields_set contains the field
97
+ if self.size is None and "size" in self.model_fields_set:
98
+ _dict['size'] = None
99
+
100
+ # set to None if pages (nullable) is None
101
+ # and model_fields_set contains the field
102
+ if self.pages is None and "pages" in self.model_fields_set:
103
+ _dict['pages'] = None
104
+
105
+ return _dict
106
+
107
+ @classmethod
108
+ def from_dict(cls, obj: Dict) -> Self:
109
+ """Create an instance of PageProject from a dict"""
110
+ if obj is None:
111
+ return None
112
+
113
+ if not isinstance(obj, dict):
114
+ return cls.model_validate(obj)
115
+
116
+ _obj = cls.model_validate({
117
+ "items": [Project.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
118
+ "total": obj.get("total"),
119
+ "page": obj.get("page"),
120
+ "size": obj.get("size"),
121
+ "pages": obj.get("pages")
122
+ })
123
+ return _obj
124
+
125
+
@@ -0,0 +1,125 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Quantum Inspire 2
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from pydantic import BaseModel
23
+ from pydantic import Field
24
+ from typing_extensions import Annotated
25
+ from compute_api_client.models.reservation import Reservation
26
+ try:
27
+ from typing import Self
28
+ except ImportError:
29
+ from typing_extensions import Self
30
+
31
+ class PageReservation(BaseModel):
32
+ """
33
+ PageReservation
34
+ """ # noqa: E501
35
+ items: List[Reservation]
36
+ total: Optional[Annotated[int, Field(strict=True, ge=0)]]
37
+ page: Optional[Annotated[int, Field(strict=True, ge=1)]]
38
+ size: Optional[Annotated[int, Field(strict=True, ge=1)]]
39
+ pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
40
+ __properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
41
+
42
+ model_config = {
43
+ "populate_by_name": True,
44
+ "validate_assignment": True
45
+ }
46
+
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))
51
+
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())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Self:
59
+ """Create an instance of PageReservation from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self) -> Dict[str, Any]:
63
+ """Return the dictionary representation of the model using alias.
64
+
65
+ This has the following differences from calling pydantic's
66
+ `self.model_dump(by_alias=True)`:
67
+
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.
71
+ """
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude={
75
+ },
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
79
+ _items = []
80
+ if self.items:
81
+ for _item in self.items:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['items'] = _items
85
+ # set to None if total (nullable) is None
86
+ # and model_fields_set contains the field
87
+ if self.total is None and "total" in self.model_fields_set:
88
+ _dict['total'] = None
89
+
90
+ # set to None if page (nullable) is None
91
+ # and model_fields_set contains the field
92
+ if self.page is None and "page" in self.model_fields_set:
93
+ _dict['page'] = None
94
+
95
+ # set to None if size (nullable) is None
96
+ # and model_fields_set contains the field
97
+ if self.size is None and "size" in self.model_fields_set:
98
+ _dict['size'] = None
99
+
100
+ # set to None if pages (nullable) is None
101
+ # and model_fields_set contains the field
102
+ if self.pages is None and "pages" in self.model_fields_set:
103
+ _dict['pages'] = None
104
+
105
+ return _dict
106
+
107
+ @classmethod
108
+ def from_dict(cls, obj: Dict) -> Self:
109
+ """Create an instance of PageReservation from a dict"""
110
+ if obj is None:
111
+ return None
112
+
113
+ if not isinstance(obj, dict):
114
+ return cls.model_validate(obj)
115
+
116
+ _obj = cls.model_validate({
117
+ "items": [Reservation.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
118
+ "total": obj.get("total"),
119
+ "page": obj.get("page"),
120
+ "size": obj.get("size"),
121
+ "pages": obj.get("pages")
122
+ })
123
+ return _obj
124
+
125
+
@@ -0,0 +1,125 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Quantum Inspire 2
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from pydantic import BaseModel
23
+ from pydantic import Field
24
+ from typing_extensions import Annotated
25
+ from compute_api_client.models.result import Result
26
+ try:
27
+ from typing import Self
28
+ except ImportError:
29
+ from typing_extensions import Self
30
+
31
+ class PageResult(BaseModel):
32
+ """
33
+ PageResult
34
+ """ # noqa: E501
35
+ items: List[Result]
36
+ total: Optional[Annotated[int, Field(strict=True, ge=0)]]
37
+ page: Optional[Annotated[int, Field(strict=True, ge=1)]]
38
+ size: Optional[Annotated[int, Field(strict=True, ge=1)]]
39
+ pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
40
+ __properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
41
+
42
+ model_config = {
43
+ "populate_by_name": True,
44
+ "validate_assignment": True
45
+ }
46
+
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))
51
+
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())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Self:
59
+ """Create an instance of PageResult from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self) -> Dict[str, Any]:
63
+ """Return the dictionary representation of the model using alias.
64
+
65
+ This has the following differences from calling pydantic's
66
+ `self.model_dump(by_alias=True)`:
67
+
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.
71
+ """
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude={
75
+ },
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
79
+ _items = []
80
+ if self.items:
81
+ for _item in self.items:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['items'] = _items
85
+ # set to None if total (nullable) is None
86
+ # and model_fields_set contains the field
87
+ if self.total is None and "total" in self.model_fields_set:
88
+ _dict['total'] = None
89
+
90
+ # set to None if page (nullable) is None
91
+ # and model_fields_set contains the field
92
+ if self.page is None and "page" in self.model_fields_set:
93
+ _dict['page'] = None
94
+
95
+ # set to None if size (nullable) is None
96
+ # and model_fields_set contains the field
97
+ if self.size is None and "size" in self.model_fields_set:
98
+ _dict['size'] = None
99
+
100
+ # set to None if pages (nullable) is None
101
+ # and model_fields_set contains the field
102
+ if self.pages is None and "pages" in self.model_fields_set:
103
+ _dict['pages'] = None
104
+
105
+ return _dict
106
+
107
+ @classmethod
108
+ def from_dict(cls, obj: Dict) -> Self:
109
+ """Create an instance of PageResult from a dict"""
110
+ if obj is None:
111
+ return None
112
+
113
+ if not isinstance(obj, dict):
114
+ return cls.model_validate(obj)
115
+
116
+ _obj = cls.model_validate({
117
+ "items": [Result.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
118
+ "total": obj.get("total"),
119
+ "page": obj.get("page"),
120
+ "size": obj.get("size"),
121
+ "pages": obj.get("pages")
122
+ })
123
+ return _obj
124
+
125
+
@@ -0,0 +1,125 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Quantum Inspire 2
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from pydantic import BaseModel
23
+ from pydantic import Field
24
+ from typing_extensions import Annotated
25
+ from compute_api_client.models.team import Team
26
+ try:
27
+ from typing import Self
28
+ except ImportError:
29
+ from typing_extensions import Self
30
+
31
+ class PageTeam(BaseModel):
32
+ """
33
+ PageTeam
34
+ """ # noqa: E501
35
+ items: List[Team]
36
+ total: Optional[Annotated[int, Field(strict=True, ge=0)]]
37
+ page: Optional[Annotated[int, Field(strict=True, ge=1)]]
38
+ size: Optional[Annotated[int, Field(strict=True, ge=1)]]
39
+ pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
40
+ __properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
41
+
42
+ model_config = {
43
+ "populate_by_name": True,
44
+ "validate_assignment": True
45
+ }
46
+
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))
51
+
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())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Self:
59
+ """Create an instance of PageTeam from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self) -> Dict[str, Any]:
63
+ """Return the dictionary representation of the model using alias.
64
+
65
+ This has the following differences from calling pydantic's
66
+ `self.model_dump(by_alias=True)`:
67
+
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.
71
+ """
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude={
75
+ },
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
79
+ _items = []
80
+ if self.items:
81
+ for _item in self.items:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['items'] = _items
85
+ # set to None if total (nullable) is None
86
+ # and model_fields_set contains the field
87
+ if self.total is None and "total" in self.model_fields_set:
88
+ _dict['total'] = None
89
+
90
+ # set to None if page (nullable) is None
91
+ # and model_fields_set contains the field
92
+ if self.page is None and "page" in self.model_fields_set:
93
+ _dict['page'] = None
94
+
95
+ # set to None if size (nullable) is None
96
+ # and model_fields_set contains the field
97
+ if self.size is None and "size" in self.model_fields_set:
98
+ _dict['size'] = None
99
+
100
+ # set to None if pages (nullable) is None
101
+ # and model_fields_set contains the field
102
+ if self.pages is None and "pages" in self.model_fields_set:
103
+ _dict['pages'] = None
104
+
105
+ return _dict
106
+
107
+ @classmethod
108
+ def from_dict(cls, obj: Dict) -> Self:
109
+ """Create an instance of PageTeam from a dict"""
110
+ if obj is None:
111
+ return None
112
+
113
+ if not isinstance(obj, dict):
114
+ return cls.model_validate(obj)
115
+
116
+ _obj = cls.model_validate({
117
+ "items": [Team.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
118
+ "total": obj.get("total"),
119
+ "page": obj.get("page"),
120
+ "size": obj.get("size"),
121
+ "pages": obj.get("pages")
122
+ })
123
+ return _obj
124
+
125
+
@@ -0,0 +1,125 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Quantum Inspire 2
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from pydantic import BaseModel
23
+ from pydantic import Field
24
+ from typing_extensions import Annotated
25
+ from compute_api_client.models.transaction import Transaction
26
+ try:
27
+ from typing import Self
28
+ except ImportError:
29
+ from typing_extensions import Self
30
+
31
+ class PageTransaction(BaseModel):
32
+ """
33
+ PageTransaction
34
+ """ # noqa: E501
35
+ items: List[Transaction]
36
+ total: Optional[Annotated[int, Field(strict=True, ge=0)]]
37
+ page: Optional[Annotated[int, Field(strict=True, ge=1)]]
38
+ size: Optional[Annotated[int, Field(strict=True, ge=1)]]
39
+ pages: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
40
+ __properties: ClassVar[List[str]] = ["items", "total", "page", "size", "pages"]
41
+
42
+ model_config = {
43
+ "populate_by_name": True,
44
+ "validate_assignment": True
45
+ }
46
+
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))
51
+
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())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Self:
59
+ """Create an instance of PageTransaction from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self) -> Dict[str, Any]:
63
+ """Return the dictionary representation of the model using alias.
64
+
65
+ This has the following differences from calling pydantic's
66
+ `self.model_dump(by_alias=True)`:
67
+
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.
71
+ """
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude={
75
+ },
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
79
+ _items = []
80
+ if self.items:
81
+ for _item in self.items:
82
+ if _item:
83
+ _items.append(_item.to_dict())
84
+ _dict['items'] = _items
85
+ # set to None if total (nullable) is None
86
+ # and model_fields_set contains the field
87
+ if self.total is None and "total" in self.model_fields_set:
88
+ _dict['total'] = None
89
+
90
+ # set to None if page (nullable) is None
91
+ # and model_fields_set contains the field
92
+ if self.page is None and "page" in self.model_fields_set:
93
+ _dict['page'] = None
94
+
95
+ # set to None if size (nullable) is None
96
+ # and model_fields_set contains the field
97
+ if self.size is None and "size" in self.model_fields_set:
98
+ _dict['size'] = None
99
+
100
+ # set to None if pages (nullable) is None
101
+ # and model_fields_set contains the field
102
+ if self.pages is None and "pages" in self.model_fields_set:
103
+ _dict['pages'] = None
104
+
105
+ return _dict
106
+
107
+ @classmethod
108
+ def from_dict(cls, obj: Dict) -> Self:
109
+ """Create an instance of PageTransaction from a dict"""
110
+ if obj is None:
111
+ return None
112
+
113
+ if not isinstance(obj, dict):
114
+ return cls.model_validate(obj)
115
+
116
+ _obj = cls.model_validate({
117
+ "items": [Transaction.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
118
+ "total": obj.get("total"),
119
+ "page": obj.get("page"),
120
+ "size": obj.get("size"),
121
+ "pages": obj.get("pages")
122
+ })
123
+ return _obj
124
+
125
+