qi-compute-api-client 0.56.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- compute_api_client/__init__.py +219 -0
- compute_api_client/api/__init__.py +23 -0
- compute_api_client/api/algorithms_api.py +1603 -0
- compute_api_client/api/auth_config_api.py +278 -0
- compute_api_client/api/backend_api.py +1540 -0
- compute_api_client/api/backend_types_api.py +1178 -0
- compute_api_client/api/batch_jobs_api.py +2224 -0
- compute_api_client/api/commits_api.py +1565 -0
- compute_api_client/api/files_api.py +1307 -0
- compute_api_client/api/final_results_api.py +847 -0
- compute_api_client/api/health_api.py +281 -0
- compute_api_client/api/jobs_api.py +1787 -0
- compute_api_client/api/languages_api.py +692 -0
- compute_api_client/api/members_api.py +1238 -0
- compute_api_client/api/metadata_api.py +930 -0
- compute_api_client/api/permissions_api.py +1295 -0
- compute_api_client/api/projects_api.py +1889 -0
- compute_api_client/api/reservations_api.py +1324 -0
- compute_api_client/api/results_api.py +1702 -0
- compute_api_client/api/teams_api.py +692 -0
- compute_api_client/api/transactions_api.py +805 -0
- compute_api_client/api/users_api.py +1305 -0
- compute_api_client/api_client.py +804 -0
- compute_api_client/api_response.py +21 -0
- compute_api_client/configuration.py +606 -0
- compute_api_client/docs/Algorithm.md +34 -0
- compute_api_client/docs/AlgorithmIn.md +33 -0
- compute_api_client/docs/AlgorithmType.md +12 -0
- compute_api_client/docs/AlgorithmsApi.md +428 -0
- compute_api_client/docs/AuthConfig.md +31 -0
- compute_api_client/docs/AuthConfigApi.md +71 -0
- compute_api_client/docs/Backend.md +35 -0
- compute_api_client/docs/BackendApi.md +418 -0
- compute_api_client/docs/BackendIn.md +34 -0
- compute_api_client/docs/BackendMessage.md +29 -0
- compute_api_client/docs/BackendPatch.md +31 -0
- compute_api_client/docs/BackendStatus.md +16 -0
- compute_api_client/docs/BackendType.md +48 -0
- compute_api_client/docs/BackendTypePatch.md +45 -0
- compute_api_client/docs/BackendTypesApi.md +289 -0
- compute_api_client/docs/BackendWithAuthentication.md +36 -0
- compute_api_client/docs/BatchJob.md +39 -0
- compute_api_client/docs/BatchJobIn.md +29 -0
- compute_api_client/docs/BatchJobStatus.md +18 -0
- compute_api_client/docs/BatchJobsApi.md +600 -0
- compute_api_client/docs/Commit.md +33 -0
- compute_api_client/docs/CommitIn.md +30 -0
- compute_api_client/docs/CommitsApi.md +425 -0
- compute_api_client/docs/CompilePayload.md +30 -0
- compute_api_client/docs/CompileStage.md +18 -0
- compute_api_client/docs/Domain.md +14 -0
- compute_api_client/docs/File.md +36 -0
- compute_api_client/docs/FileIn.md +35 -0
- compute_api_client/docs/FilesApi.md +346 -0
- compute_api_client/docs/FinalResult.md +32 -0
- compute_api_client/docs/FinalResultIn.md +30 -0
- compute_api_client/docs/FinalResultsApi.md +248 -0
- compute_api_client/docs/HTTPBadRequestError.md +29 -0
- compute_api_client/docs/HTTPNotFoundError.md +29 -0
- compute_api_client/docs/HTTPValidationError.md +29 -0
- compute_api_client/docs/HealthApi.md +72 -0
- compute_api_client/docs/Job.md +42 -0
- compute_api_client/docs/JobIn.md +32 -0
- compute_api_client/docs/JobPatch.md +34 -0
- compute_api_client/docs/JobStatus.md +18 -0
- compute_api_client/docs/JobsApi.md +460 -0
- compute_api_client/docs/Language.md +31 -0
- compute_api_client/docs/LanguagesApi.md +177 -0
- compute_api_client/docs/LocationInner.md +27 -0
- compute_api_client/docs/Member.md +33 -0
- compute_api_client/docs/MemberId.md +28 -0
- compute_api_client/docs/MemberIn.md +32 -0
- compute_api_client/docs/MembersApi.md +331 -0
- compute_api_client/docs/PageAlgorithm.md +33 -0
- compute_api_client/docs/PageBackend.md +33 -0
- compute_api_client/docs/PageBackendType.md +33 -0
- compute_api_client/docs/PageBatchJob.md +33 -0
- compute_api_client/docs/PageCommit.md +33 -0
- compute_api_client/docs/PageFile.md +33 -0
- compute_api_client/docs/PageJob.md +33 -0
- compute_api_client/docs/PageLanguage.md +33 -0
- compute_api_client/docs/PageMember.md +33 -0
- compute_api_client/docs/PageMetadata.md +32 -0
- compute_api_client/docs/PagePermission.md +33 -0
- compute_api_client/docs/PagePermissionGroup.md +33 -0
- compute_api_client/docs/PageProject.md +33 -0
- compute_api_client/docs/PageReservation.md +33 -0
- compute_api_client/docs/PageResult.md +33 -0
- compute_api_client/docs/PageTeam.md +33 -0
- compute_api_client/docs/PageTransaction.md +33 -0
- compute_api_client/docs/PageUser.md +33 -0
- compute_api_client/docs/Permission.md +31 -0
- compute_api_client/docs/PermissionGroup.md +30 -0
- compute_api_client/docs/PermissionsApi.md +340 -0
- compute_api_client/docs/Project.md +34 -0
- compute_api_client/docs/ProjectIn.md +32 -0
- compute_api_client/docs/ProjectPatch.md +32 -0
- compute_api_client/docs/ProjectsApi.md +502 -0
- compute_api_client/docs/Reservation.md +35 -0
- compute_api_client/docs/ReservationIn.md +32 -0
- compute_api_client/docs/ReservationsApi.md +341 -0
- compute_api_client/docs/Result.md +36 -0
- compute_api_client/docs/ResultIn.md +34 -0
- compute_api_client/docs/ResultsApi.md +439 -0
- compute_api_client/docs/Role.md +12 -0
- compute_api_client/docs/ShareType.md +14 -0
- compute_api_client/docs/Team.md +32 -0
- compute_api_client/docs/TeamsApi.md +177 -0
- compute_api_client/docs/Transaction.md +35 -0
- compute_api_client/docs/TransactionDomain.md +28 -0
- compute_api_client/docs/TransactionsApi.md +190 -0
- compute_api_client/docs/User.md +36 -0
- compute_api_client/docs/UserIn.md +35 -0
- compute_api_client/docs/UsersApi.md +338 -0
- compute_api_client/docs/ValidationError.md +31 -0
- compute_api_client/docs/ValidationErrorLocInner.md +28 -0
- compute_api_client/exceptions.py +216 -0
- compute_api_client/models/__init__.py +84 -0
- compute_api_client/models/algorithm.py +105 -0
- compute_api_client/models/algorithm_in.py +103 -0
- compute_api_client/models/algorithm_type.py +37 -0
- compute_api_client/models/auth_config.py +91 -0
- compute_api_client/models/backend.py +106 -0
- compute_api_client/models/backend_in.py +104 -0
- compute_api_client/models/backend_message.py +87 -0
- compute_api_client/models/backend_patch.py +112 -0
- compute_api_client/models/backend_status.py +39 -0
- compute_api_client/models/backend_type.py +145 -0
- compute_api_client/models/backend_type_patch.py +205 -0
- compute_api_client/models/backend_with_authentication.py +108 -0
- compute_api_client/models/batch_job.py +130 -0
- compute_api_client/models/batch_job_in.py +87 -0
- compute_api_client/models/batch_job_status.py +40 -0
- compute_api_client/models/commit.py +97 -0
- compute_api_client/models/commit_in.py +89 -0
- compute_api_client/models/compile_payload.py +95 -0
- compute_api_client/models/compile_stage.py +40 -0
- compute_api_client/models/domain.py +38 -0
- compute_api_client/models/file.py +108 -0
- compute_api_client/models/file_in.py +106 -0
- compute_api_client/models/final_result.py +94 -0
- compute_api_client/models/final_result_in.py +89 -0
- compute_api_client/models/http_bad_request_error.py +87 -0
- compute_api_client/models/http_not_found_error.py +87 -0
- compute_api_client/models/http_validation_error.py +95 -0
- compute_api_client/models/job.py +131 -0
- compute_api_client/models/job_in.py +98 -0
- compute_api_client/models/job_patch.py +99 -0
- compute_api_client/models/job_status.py +40 -0
- compute_api_client/models/language.py +92 -0
- compute_api_client/models/location_inner.py +144 -0
- compute_api_client/models/member.py +96 -0
- compute_api_client/models/member_id.py +144 -0
- compute_api_client/models/member_in.py +94 -0
- compute_api_client/models/metadata.py +93 -0
- compute_api_client/models/metadata_in.py +94 -0
- compute_api_client/models/page_algorithm.py +104 -0
- compute_api_client/models/page_backend.py +104 -0
- compute_api_client/models/page_backend_type.py +104 -0
- compute_api_client/models/page_batch_job.py +104 -0
- compute_api_client/models/page_commit.py +104 -0
- compute_api_client/models/page_file.py +104 -0
- compute_api_client/models/page_job.py +104 -0
- compute_api_client/models/page_language.py +104 -0
- compute_api_client/models/page_member.py +104 -0
- compute_api_client/models/page_metadata.py +125 -0
- compute_api_client/models/page_permission.py +104 -0
- compute_api_client/models/page_permission_group.py +104 -0
- compute_api_client/models/page_project.py +104 -0
- compute_api_client/models/page_reservation.py +104 -0
- compute_api_client/models/page_result.py +104 -0
- compute_api_client/models/page_team.py +104 -0
- compute_api_client/models/page_transaction.py +104 -0
- compute_api_client/models/page_user.py +104 -0
- compute_api_client/models/permission.py +92 -0
- compute_api_client/models/permission_group.py +90 -0
- compute_api_client/models/project.py +99 -0
- compute_api_client/models/project_in.py +94 -0
- compute_api_client/models/project_patch.py +114 -0
- compute_api_client/models/reservation.py +105 -0
- compute_api_client/models/reservation_in.py +94 -0
- compute_api_client/models/result.py +122 -0
- compute_api_client/models/result_in.py +117 -0
- compute_api_client/models/role.py +37 -0
- compute_api_client/models/share_type.py +38 -0
- compute_api_client/models/team.py +94 -0
- compute_api_client/models/transaction.py +117 -0
- compute_api_client/models/transaction_domain.py +142 -0
- compute_api_client/models/user.py +102 -0
- compute_api_client/models/user_in.py +100 -0
- compute_api_client/models/validation_error.py +99 -0
- compute_api_client/models/validation_error_loc_inner.py +138 -0
- compute_api_client/rest.py +213 -0
- qi2_shared/__init__.py +0 -0
- qi2_shared/authentication.py +66 -0
- qi2_shared/client.py +52 -0
- qi2_shared/hybrid/__init__.py +0 -0
- qi2_shared/hybrid/quantum_interface.py +45 -0
- qi2_shared/pagination.py +44 -0
- qi2_shared/settings.py +68 -0
- qi2_shared/utils.py +13 -0
- qi_compute_api_client-0.56.0.dist-info/METADATA +266 -0
- qi_compute_api_client-0.56.0.dist-info/RECORD +205 -0
- qi_compute_api_client-0.56.0.dist-info/WHEEL +4 -0
- qi_compute_api_client-0.56.0.dist-info/licenses/LICENSE.md +142 -0
|
@@ -0,0 +1,1565 @@
|
|
|
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
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from datetime import datetime
|
|
20
|
+
from pydantic import Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from compute_api_client.models.commit import Commit
|
|
24
|
+
from compute_api_client.models.commit_in import CommitIn
|
|
25
|
+
from compute_api_client.models.compile_payload import CompilePayload
|
|
26
|
+
from compute_api_client.models.page_commit import PageCommit
|
|
27
|
+
|
|
28
|
+
from compute_api_client.api_client import ApiClient, RequestSerialized
|
|
29
|
+
from compute_api_client.api_response import ApiResponse
|
|
30
|
+
from compute_api_client.rest import RESTResponseType
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class CommitsApi:
|
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
35
|
+
Ref: https://openapi-generator.tech
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, api_client=None) -> None:
|
|
41
|
+
if api_client is None:
|
|
42
|
+
api_client = ApiClient.get_default()
|
|
43
|
+
self.api_client = api_client
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@validate_call
|
|
47
|
+
async def compile_commit_commits_id_compile_post(
|
|
48
|
+
self,
|
|
49
|
+
id: StrictInt,
|
|
50
|
+
compile_payload: CompilePayload,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> None:
|
|
64
|
+
"""Compile file in a commit
|
|
65
|
+
|
|
66
|
+
Compile file in a commit.
|
|
67
|
+
|
|
68
|
+
:param id: (required)
|
|
69
|
+
:type id: int
|
|
70
|
+
:param compile_payload: (required)
|
|
71
|
+
:type compile_payload: CompilePayload
|
|
72
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
73
|
+
number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
77
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
78
|
+
request; this effectively ignores the
|
|
79
|
+
authentication in the spec for a single request.
|
|
80
|
+
:type _request_auth: dict, optional
|
|
81
|
+
:param _content_type: force content-type for the request.
|
|
82
|
+
:type _content_type: str, Optional
|
|
83
|
+
:param _headers: set to override the headers for a single
|
|
84
|
+
request; this effectively ignores the headers
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _headers: dict, optional
|
|
87
|
+
:param _host_index: set to override the host_index for a single
|
|
88
|
+
request; this effectively ignores the host_index
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _host_index: int, optional
|
|
91
|
+
:return: Returns the result object.
|
|
92
|
+
""" # noqa: E501
|
|
93
|
+
|
|
94
|
+
_param = self._compile_commit_commits_id_compile_post_serialize(
|
|
95
|
+
id=id,
|
|
96
|
+
compile_payload=compile_payload,
|
|
97
|
+
_request_auth=_request_auth,
|
|
98
|
+
_content_type=_content_type,
|
|
99
|
+
_headers=_headers,
|
|
100
|
+
_host_index=_host_index
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
104
|
+
'204': None,
|
|
105
|
+
'404': "HTTPNotFoundError",
|
|
106
|
+
'400': "HTTPBadRequestError",
|
|
107
|
+
'422': "HTTPValidationError",
|
|
108
|
+
}
|
|
109
|
+
response_data = await self.api_client.call_api(
|
|
110
|
+
*_param,
|
|
111
|
+
_request_timeout=_request_timeout
|
|
112
|
+
)
|
|
113
|
+
await response_data.read()
|
|
114
|
+
return self.api_client.response_deserialize(
|
|
115
|
+
response_data=response_data,
|
|
116
|
+
response_types_map=_response_types_map,
|
|
117
|
+
).data
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
async def compile_commit_commits_id_compile_post_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
id: StrictInt,
|
|
124
|
+
compile_payload: CompilePayload,
|
|
125
|
+
_request_timeout: Union[
|
|
126
|
+
None,
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
128
|
+
Tuple[
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
131
|
+
]
|
|
132
|
+
] = None,
|
|
133
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
134
|
+
_content_type: Optional[StrictStr] = None,
|
|
135
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
136
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
137
|
+
) -> ApiResponse[None]:
|
|
138
|
+
"""Compile file in a commit
|
|
139
|
+
|
|
140
|
+
Compile file in a commit.
|
|
141
|
+
|
|
142
|
+
:param id: (required)
|
|
143
|
+
:type id: int
|
|
144
|
+
:param compile_payload: (required)
|
|
145
|
+
:type compile_payload: CompilePayload
|
|
146
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
147
|
+
number provided, it will be total request
|
|
148
|
+
timeout. It can also be a pair (tuple) of
|
|
149
|
+
(connection, read) timeouts.
|
|
150
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
151
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
152
|
+
request; this effectively ignores the
|
|
153
|
+
authentication in the spec for a single request.
|
|
154
|
+
:type _request_auth: dict, optional
|
|
155
|
+
:param _content_type: force content-type for the request.
|
|
156
|
+
:type _content_type: str, Optional
|
|
157
|
+
:param _headers: set to override the headers for a single
|
|
158
|
+
request; this effectively ignores the headers
|
|
159
|
+
in the spec for a single request.
|
|
160
|
+
:type _headers: dict, optional
|
|
161
|
+
:param _host_index: set to override the host_index for a single
|
|
162
|
+
request; this effectively ignores the host_index
|
|
163
|
+
in the spec for a single request.
|
|
164
|
+
:type _host_index: int, optional
|
|
165
|
+
:return: Returns the result object.
|
|
166
|
+
""" # noqa: E501
|
|
167
|
+
|
|
168
|
+
_param = self._compile_commit_commits_id_compile_post_serialize(
|
|
169
|
+
id=id,
|
|
170
|
+
compile_payload=compile_payload,
|
|
171
|
+
_request_auth=_request_auth,
|
|
172
|
+
_content_type=_content_type,
|
|
173
|
+
_headers=_headers,
|
|
174
|
+
_host_index=_host_index
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
178
|
+
'204': None,
|
|
179
|
+
'404': "HTTPNotFoundError",
|
|
180
|
+
'400': "HTTPBadRequestError",
|
|
181
|
+
'422': "HTTPValidationError",
|
|
182
|
+
}
|
|
183
|
+
response_data = await self.api_client.call_api(
|
|
184
|
+
*_param,
|
|
185
|
+
_request_timeout=_request_timeout
|
|
186
|
+
)
|
|
187
|
+
await response_data.read()
|
|
188
|
+
return self.api_client.response_deserialize(
|
|
189
|
+
response_data=response_data,
|
|
190
|
+
response_types_map=_response_types_map,
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
@validate_call
|
|
195
|
+
async def compile_commit_commits_id_compile_post_without_preload_content(
|
|
196
|
+
self,
|
|
197
|
+
id: StrictInt,
|
|
198
|
+
compile_payload: CompilePayload,
|
|
199
|
+
_request_timeout: Union[
|
|
200
|
+
None,
|
|
201
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
202
|
+
Tuple[
|
|
203
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
204
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
205
|
+
]
|
|
206
|
+
] = None,
|
|
207
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
208
|
+
_content_type: Optional[StrictStr] = None,
|
|
209
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
210
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
211
|
+
) -> RESTResponseType:
|
|
212
|
+
"""Compile file in a commit
|
|
213
|
+
|
|
214
|
+
Compile file in a commit.
|
|
215
|
+
|
|
216
|
+
:param id: (required)
|
|
217
|
+
:type id: int
|
|
218
|
+
:param compile_payload: (required)
|
|
219
|
+
:type compile_payload: CompilePayload
|
|
220
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
221
|
+
number provided, it will be total request
|
|
222
|
+
timeout. It can also be a pair (tuple) of
|
|
223
|
+
(connection, read) timeouts.
|
|
224
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
225
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
226
|
+
request; this effectively ignores the
|
|
227
|
+
authentication in the spec for a single request.
|
|
228
|
+
:type _request_auth: dict, optional
|
|
229
|
+
:param _content_type: force content-type for the request.
|
|
230
|
+
:type _content_type: str, Optional
|
|
231
|
+
:param _headers: set to override the headers for a single
|
|
232
|
+
request; this effectively ignores the headers
|
|
233
|
+
in the spec for a single request.
|
|
234
|
+
:type _headers: dict, optional
|
|
235
|
+
:param _host_index: set to override the host_index for a single
|
|
236
|
+
request; this effectively ignores the host_index
|
|
237
|
+
in the spec for a single request.
|
|
238
|
+
:type _host_index: int, optional
|
|
239
|
+
:return: Returns the result object.
|
|
240
|
+
""" # noqa: E501
|
|
241
|
+
|
|
242
|
+
_param = self._compile_commit_commits_id_compile_post_serialize(
|
|
243
|
+
id=id,
|
|
244
|
+
compile_payload=compile_payload,
|
|
245
|
+
_request_auth=_request_auth,
|
|
246
|
+
_content_type=_content_type,
|
|
247
|
+
_headers=_headers,
|
|
248
|
+
_host_index=_host_index
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
252
|
+
'204': None,
|
|
253
|
+
'404': "HTTPNotFoundError",
|
|
254
|
+
'400': "HTTPBadRequestError",
|
|
255
|
+
'422': "HTTPValidationError",
|
|
256
|
+
}
|
|
257
|
+
response_data = await self.api_client.call_api(
|
|
258
|
+
*_param,
|
|
259
|
+
_request_timeout=_request_timeout
|
|
260
|
+
)
|
|
261
|
+
return response_data.response
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
def _compile_commit_commits_id_compile_post_serialize(
|
|
265
|
+
self,
|
|
266
|
+
id,
|
|
267
|
+
compile_payload,
|
|
268
|
+
_request_auth,
|
|
269
|
+
_content_type,
|
|
270
|
+
_headers,
|
|
271
|
+
_host_index,
|
|
272
|
+
) -> RequestSerialized:
|
|
273
|
+
|
|
274
|
+
_host = None
|
|
275
|
+
|
|
276
|
+
_collection_formats: Dict[str, str] = {
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
_path_params: Dict[str, str] = {}
|
|
280
|
+
_query_params: List[Tuple[str, str]] = []
|
|
281
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
282
|
+
_form_params: List[Tuple[str, str]] = []
|
|
283
|
+
_files: Dict[
|
|
284
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
285
|
+
] = {}
|
|
286
|
+
_body_params: Optional[bytes] = None
|
|
287
|
+
|
|
288
|
+
# process the path parameters
|
|
289
|
+
if id is not None:
|
|
290
|
+
_path_params['id'] = id
|
|
291
|
+
# process the query parameters
|
|
292
|
+
# process the header parameters
|
|
293
|
+
# process the form parameters
|
|
294
|
+
# process the body parameter
|
|
295
|
+
if compile_payload is not None:
|
|
296
|
+
_body_params = compile_payload
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
# set the HTTP header `Accept`
|
|
300
|
+
if 'Accept' not in _header_params:
|
|
301
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
302
|
+
[
|
|
303
|
+
'application/json'
|
|
304
|
+
]
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
# set the HTTP header `Content-Type`
|
|
308
|
+
if _content_type:
|
|
309
|
+
_header_params['Content-Type'] = _content_type
|
|
310
|
+
else:
|
|
311
|
+
_default_content_type = (
|
|
312
|
+
self.api_client.select_header_content_type(
|
|
313
|
+
[
|
|
314
|
+
'application/json'
|
|
315
|
+
]
|
|
316
|
+
)
|
|
317
|
+
)
|
|
318
|
+
if _default_content_type is not None:
|
|
319
|
+
_header_params['Content-Type'] = _default_content_type
|
|
320
|
+
|
|
321
|
+
# authentication setting
|
|
322
|
+
_auth_settings: List[str] = [
|
|
323
|
+
'user_bearer',
|
|
324
|
+
'backend'
|
|
325
|
+
]
|
|
326
|
+
|
|
327
|
+
return self.api_client.param_serialize(
|
|
328
|
+
method='POST',
|
|
329
|
+
resource_path='/commits/{id}/compile',
|
|
330
|
+
path_params=_path_params,
|
|
331
|
+
query_params=_query_params,
|
|
332
|
+
header_params=_header_params,
|
|
333
|
+
body=_body_params,
|
|
334
|
+
post_params=_form_params,
|
|
335
|
+
files=_files,
|
|
336
|
+
auth_settings=_auth_settings,
|
|
337
|
+
collection_formats=_collection_formats,
|
|
338
|
+
_host=_host,
|
|
339
|
+
_request_auth=_request_auth
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
@validate_call
|
|
346
|
+
async def create_commit_commits_post(
|
|
347
|
+
self,
|
|
348
|
+
commit_in: CommitIn,
|
|
349
|
+
_request_timeout: Union[
|
|
350
|
+
None,
|
|
351
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
352
|
+
Tuple[
|
|
353
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
354
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
355
|
+
]
|
|
356
|
+
] = None,
|
|
357
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
358
|
+
_content_type: Optional[StrictStr] = None,
|
|
359
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
360
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
361
|
+
) -> Commit:
|
|
362
|
+
"""Create commit
|
|
363
|
+
|
|
364
|
+
Create new commit.
|
|
365
|
+
|
|
366
|
+
:param commit_in: (required)
|
|
367
|
+
:type commit_in: CommitIn
|
|
368
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
369
|
+
number provided, it will be total request
|
|
370
|
+
timeout. It can also be a pair (tuple) of
|
|
371
|
+
(connection, read) timeouts.
|
|
372
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
373
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
374
|
+
request; this effectively ignores the
|
|
375
|
+
authentication in the spec for a single request.
|
|
376
|
+
:type _request_auth: dict, optional
|
|
377
|
+
:param _content_type: force content-type for the request.
|
|
378
|
+
:type _content_type: str, Optional
|
|
379
|
+
:param _headers: set to override the headers for a single
|
|
380
|
+
request; this effectively ignores the headers
|
|
381
|
+
in the spec for a single request.
|
|
382
|
+
:type _headers: dict, optional
|
|
383
|
+
:param _host_index: set to override the host_index for a single
|
|
384
|
+
request; this effectively ignores the host_index
|
|
385
|
+
in the spec for a single request.
|
|
386
|
+
:type _host_index: int, optional
|
|
387
|
+
:return: Returns the result object.
|
|
388
|
+
""" # noqa: E501
|
|
389
|
+
|
|
390
|
+
_param = self._create_commit_commits_post_serialize(
|
|
391
|
+
commit_in=commit_in,
|
|
392
|
+
_request_auth=_request_auth,
|
|
393
|
+
_content_type=_content_type,
|
|
394
|
+
_headers=_headers,
|
|
395
|
+
_host_index=_host_index
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
399
|
+
'201': "Commit",
|
|
400
|
+
'422': "HTTPValidationError",
|
|
401
|
+
}
|
|
402
|
+
response_data = await self.api_client.call_api(
|
|
403
|
+
*_param,
|
|
404
|
+
_request_timeout=_request_timeout
|
|
405
|
+
)
|
|
406
|
+
await response_data.read()
|
|
407
|
+
return self.api_client.response_deserialize(
|
|
408
|
+
response_data=response_data,
|
|
409
|
+
response_types_map=_response_types_map,
|
|
410
|
+
).data
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
@validate_call
|
|
414
|
+
async def create_commit_commits_post_with_http_info(
|
|
415
|
+
self,
|
|
416
|
+
commit_in: CommitIn,
|
|
417
|
+
_request_timeout: Union[
|
|
418
|
+
None,
|
|
419
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
420
|
+
Tuple[
|
|
421
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
422
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
423
|
+
]
|
|
424
|
+
] = None,
|
|
425
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
426
|
+
_content_type: Optional[StrictStr] = None,
|
|
427
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
428
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
429
|
+
) -> ApiResponse[Commit]:
|
|
430
|
+
"""Create commit
|
|
431
|
+
|
|
432
|
+
Create new commit.
|
|
433
|
+
|
|
434
|
+
:param commit_in: (required)
|
|
435
|
+
:type commit_in: CommitIn
|
|
436
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
437
|
+
number provided, it will be total request
|
|
438
|
+
timeout. It can also be a pair (tuple) of
|
|
439
|
+
(connection, read) timeouts.
|
|
440
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
441
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
442
|
+
request; this effectively ignores the
|
|
443
|
+
authentication in the spec for a single request.
|
|
444
|
+
:type _request_auth: dict, optional
|
|
445
|
+
:param _content_type: force content-type for the request.
|
|
446
|
+
:type _content_type: str, Optional
|
|
447
|
+
:param _headers: set to override the headers for a single
|
|
448
|
+
request; this effectively ignores the headers
|
|
449
|
+
in the spec for a single request.
|
|
450
|
+
:type _headers: dict, optional
|
|
451
|
+
:param _host_index: set to override the host_index for a single
|
|
452
|
+
request; this effectively ignores the host_index
|
|
453
|
+
in the spec for a single request.
|
|
454
|
+
:type _host_index: int, optional
|
|
455
|
+
:return: Returns the result object.
|
|
456
|
+
""" # noqa: E501
|
|
457
|
+
|
|
458
|
+
_param = self._create_commit_commits_post_serialize(
|
|
459
|
+
commit_in=commit_in,
|
|
460
|
+
_request_auth=_request_auth,
|
|
461
|
+
_content_type=_content_type,
|
|
462
|
+
_headers=_headers,
|
|
463
|
+
_host_index=_host_index
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
467
|
+
'201': "Commit",
|
|
468
|
+
'422': "HTTPValidationError",
|
|
469
|
+
}
|
|
470
|
+
response_data = await self.api_client.call_api(
|
|
471
|
+
*_param,
|
|
472
|
+
_request_timeout=_request_timeout
|
|
473
|
+
)
|
|
474
|
+
await response_data.read()
|
|
475
|
+
return self.api_client.response_deserialize(
|
|
476
|
+
response_data=response_data,
|
|
477
|
+
response_types_map=_response_types_map,
|
|
478
|
+
)
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
@validate_call
|
|
482
|
+
async def create_commit_commits_post_without_preload_content(
|
|
483
|
+
self,
|
|
484
|
+
commit_in: CommitIn,
|
|
485
|
+
_request_timeout: Union[
|
|
486
|
+
None,
|
|
487
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
488
|
+
Tuple[
|
|
489
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
490
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
491
|
+
]
|
|
492
|
+
] = None,
|
|
493
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
494
|
+
_content_type: Optional[StrictStr] = None,
|
|
495
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
496
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
497
|
+
) -> RESTResponseType:
|
|
498
|
+
"""Create commit
|
|
499
|
+
|
|
500
|
+
Create new commit.
|
|
501
|
+
|
|
502
|
+
:param commit_in: (required)
|
|
503
|
+
:type commit_in: CommitIn
|
|
504
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
505
|
+
number provided, it will be total request
|
|
506
|
+
timeout. It can also be a pair (tuple) of
|
|
507
|
+
(connection, read) timeouts.
|
|
508
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
509
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
510
|
+
request; this effectively ignores the
|
|
511
|
+
authentication in the spec for a single request.
|
|
512
|
+
:type _request_auth: dict, optional
|
|
513
|
+
:param _content_type: force content-type for the request.
|
|
514
|
+
:type _content_type: str, Optional
|
|
515
|
+
:param _headers: set to override the headers for a single
|
|
516
|
+
request; this effectively ignores the headers
|
|
517
|
+
in the spec for a single request.
|
|
518
|
+
:type _headers: dict, optional
|
|
519
|
+
:param _host_index: set to override the host_index for a single
|
|
520
|
+
request; this effectively ignores the host_index
|
|
521
|
+
in the spec for a single request.
|
|
522
|
+
:type _host_index: int, optional
|
|
523
|
+
:return: Returns the result object.
|
|
524
|
+
""" # noqa: E501
|
|
525
|
+
|
|
526
|
+
_param = self._create_commit_commits_post_serialize(
|
|
527
|
+
commit_in=commit_in,
|
|
528
|
+
_request_auth=_request_auth,
|
|
529
|
+
_content_type=_content_type,
|
|
530
|
+
_headers=_headers,
|
|
531
|
+
_host_index=_host_index
|
|
532
|
+
)
|
|
533
|
+
|
|
534
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
535
|
+
'201': "Commit",
|
|
536
|
+
'422': "HTTPValidationError",
|
|
537
|
+
}
|
|
538
|
+
response_data = await self.api_client.call_api(
|
|
539
|
+
*_param,
|
|
540
|
+
_request_timeout=_request_timeout
|
|
541
|
+
)
|
|
542
|
+
return response_data.response
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
def _create_commit_commits_post_serialize(
|
|
546
|
+
self,
|
|
547
|
+
commit_in,
|
|
548
|
+
_request_auth,
|
|
549
|
+
_content_type,
|
|
550
|
+
_headers,
|
|
551
|
+
_host_index,
|
|
552
|
+
) -> RequestSerialized:
|
|
553
|
+
|
|
554
|
+
_host = None
|
|
555
|
+
|
|
556
|
+
_collection_formats: Dict[str, str] = {
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
_path_params: Dict[str, str] = {}
|
|
560
|
+
_query_params: List[Tuple[str, str]] = []
|
|
561
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
562
|
+
_form_params: List[Tuple[str, str]] = []
|
|
563
|
+
_files: Dict[
|
|
564
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
565
|
+
] = {}
|
|
566
|
+
_body_params: Optional[bytes] = None
|
|
567
|
+
|
|
568
|
+
# process the path parameters
|
|
569
|
+
# process the query parameters
|
|
570
|
+
# process the header parameters
|
|
571
|
+
# process the form parameters
|
|
572
|
+
# process the body parameter
|
|
573
|
+
if commit_in is not None:
|
|
574
|
+
_body_params = commit_in
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
# set the HTTP header `Accept`
|
|
578
|
+
if 'Accept' not in _header_params:
|
|
579
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
580
|
+
[
|
|
581
|
+
'application/json'
|
|
582
|
+
]
|
|
583
|
+
)
|
|
584
|
+
|
|
585
|
+
# set the HTTP header `Content-Type`
|
|
586
|
+
if _content_type:
|
|
587
|
+
_header_params['Content-Type'] = _content_type
|
|
588
|
+
else:
|
|
589
|
+
_default_content_type = (
|
|
590
|
+
self.api_client.select_header_content_type(
|
|
591
|
+
[
|
|
592
|
+
'application/json'
|
|
593
|
+
]
|
|
594
|
+
)
|
|
595
|
+
)
|
|
596
|
+
if _default_content_type is not None:
|
|
597
|
+
_header_params['Content-Type'] = _default_content_type
|
|
598
|
+
|
|
599
|
+
# authentication setting
|
|
600
|
+
_auth_settings: List[str] = [
|
|
601
|
+
'user_bearer'
|
|
602
|
+
]
|
|
603
|
+
|
|
604
|
+
return self.api_client.param_serialize(
|
|
605
|
+
method='POST',
|
|
606
|
+
resource_path='/commits',
|
|
607
|
+
path_params=_path_params,
|
|
608
|
+
query_params=_query_params,
|
|
609
|
+
header_params=_header_params,
|
|
610
|
+
body=_body_params,
|
|
611
|
+
post_params=_form_params,
|
|
612
|
+
files=_files,
|
|
613
|
+
auth_settings=_auth_settings,
|
|
614
|
+
collection_formats=_collection_formats,
|
|
615
|
+
_host=_host,
|
|
616
|
+
_request_auth=_request_auth
|
|
617
|
+
)
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
@validate_call
|
|
623
|
+
async def delete_commit_commits_id_delete(
|
|
624
|
+
self,
|
|
625
|
+
id: StrictInt,
|
|
626
|
+
_request_timeout: Union[
|
|
627
|
+
None,
|
|
628
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
629
|
+
Tuple[
|
|
630
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
631
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
632
|
+
]
|
|
633
|
+
] = None,
|
|
634
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
635
|
+
_content_type: Optional[StrictStr] = None,
|
|
636
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
637
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
638
|
+
) -> None:
|
|
639
|
+
"""Destroy commit
|
|
640
|
+
|
|
641
|
+
Delete a commit.
|
|
642
|
+
|
|
643
|
+
:param id: (required)
|
|
644
|
+
:type id: int
|
|
645
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
646
|
+
number provided, it will be total request
|
|
647
|
+
timeout. It can also be a pair (tuple) of
|
|
648
|
+
(connection, read) timeouts.
|
|
649
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
650
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
651
|
+
request; this effectively ignores the
|
|
652
|
+
authentication in the spec for a single request.
|
|
653
|
+
:type _request_auth: dict, optional
|
|
654
|
+
:param _content_type: force content-type for the request.
|
|
655
|
+
:type _content_type: str, Optional
|
|
656
|
+
:param _headers: set to override the headers for a single
|
|
657
|
+
request; this effectively ignores the headers
|
|
658
|
+
in the spec for a single request.
|
|
659
|
+
:type _headers: dict, optional
|
|
660
|
+
:param _host_index: set to override the host_index for a single
|
|
661
|
+
request; this effectively ignores the host_index
|
|
662
|
+
in the spec for a single request.
|
|
663
|
+
:type _host_index: int, optional
|
|
664
|
+
:return: Returns the result object.
|
|
665
|
+
""" # noqa: E501
|
|
666
|
+
|
|
667
|
+
_param = self._delete_commit_commits_id_delete_serialize(
|
|
668
|
+
id=id,
|
|
669
|
+
_request_auth=_request_auth,
|
|
670
|
+
_content_type=_content_type,
|
|
671
|
+
_headers=_headers,
|
|
672
|
+
_host_index=_host_index
|
|
673
|
+
)
|
|
674
|
+
|
|
675
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
676
|
+
'204': None,
|
|
677
|
+
'404': "HTTPNotFoundError",
|
|
678
|
+
'422': "HTTPValidationError",
|
|
679
|
+
}
|
|
680
|
+
response_data = await self.api_client.call_api(
|
|
681
|
+
*_param,
|
|
682
|
+
_request_timeout=_request_timeout
|
|
683
|
+
)
|
|
684
|
+
await response_data.read()
|
|
685
|
+
return self.api_client.response_deserialize(
|
|
686
|
+
response_data=response_data,
|
|
687
|
+
response_types_map=_response_types_map,
|
|
688
|
+
).data
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
@validate_call
|
|
692
|
+
async def delete_commit_commits_id_delete_with_http_info(
|
|
693
|
+
self,
|
|
694
|
+
id: StrictInt,
|
|
695
|
+
_request_timeout: Union[
|
|
696
|
+
None,
|
|
697
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
698
|
+
Tuple[
|
|
699
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
700
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
701
|
+
]
|
|
702
|
+
] = None,
|
|
703
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
704
|
+
_content_type: Optional[StrictStr] = None,
|
|
705
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
706
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
707
|
+
) -> ApiResponse[None]:
|
|
708
|
+
"""Destroy commit
|
|
709
|
+
|
|
710
|
+
Delete a commit.
|
|
711
|
+
|
|
712
|
+
:param id: (required)
|
|
713
|
+
:type id: int
|
|
714
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
715
|
+
number provided, it will be total request
|
|
716
|
+
timeout. It can also be a pair (tuple) of
|
|
717
|
+
(connection, read) timeouts.
|
|
718
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
719
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
720
|
+
request; this effectively ignores the
|
|
721
|
+
authentication in the spec for a single request.
|
|
722
|
+
:type _request_auth: dict, optional
|
|
723
|
+
:param _content_type: force content-type for the request.
|
|
724
|
+
:type _content_type: str, Optional
|
|
725
|
+
:param _headers: set to override the headers for a single
|
|
726
|
+
request; this effectively ignores the headers
|
|
727
|
+
in the spec for a single request.
|
|
728
|
+
:type _headers: dict, optional
|
|
729
|
+
:param _host_index: set to override the host_index for a single
|
|
730
|
+
request; this effectively ignores the host_index
|
|
731
|
+
in the spec for a single request.
|
|
732
|
+
:type _host_index: int, optional
|
|
733
|
+
:return: Returns the result object.
|
|
734
|
+
""" # noqa: E501
|
|
735
|
+
|
|
736
|
+
_param = self._delete_commit_commits_id_delete_serialize(
|
|
737
|
+
id=id,
|
|
738
|
+
_request_auth=_request_auth,
|
|
739
|
+
_content_type=_content_type,
|
|
740
|
+
_headers=_headers,
|
|
741
|
+
_host_index=_host_index
|
|
742
|
+
)
|
|
743
|
+
|
|
744
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
745
|
+
'204': None,
|
|
746
|
+
'404': "HTTPNotFoundError",
|
|
747
|
+
'422': "HTTPValidationError",
|
|
748
|
+
}
|
|
749
|
+
response_data = await self.api_client.call_api(
|
|
750
|
+
*_param,
|
|
751
|
+
_request_timeout=_request_timeout
|
|
752
|
+
)
|
|
753
|
+
await response_data.read()
|
|
754
|
+
return self.api_client.response_deserialize(
|
|
755
|
+
response_data=response_data,
|
|
756
|
+
response_types_map=_response_types_map,
|
|
757
|
+
)
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
@validate_call
|
|
761
|
+
async def delete_commit_commits_id_delete_without_preload_content(
|
|
762
|
+
self,
|
|
763
|
+
id: StrictInt,
|
|
764
|
+
_request_timeout: Union[
|
|
765
|
+
None,
|
|
766
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
767
|
+
Tuple[
|
|
768
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
769
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
770
|
+
]
|
|
771
|
+
] = None,
|
|
772
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
773
|
+
_content_type: Optional[StrictStr] = None,
|
|
774
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
775
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
776
|
+
) -> RESTResponseType:
|
|
777
|
+
"""Destroy commit
|
|
778
|
+
|
|
779
|
+
Delete a commit.
|
|
780
|
+
|
|
781
|
+
:param id: (required)
|
|
782
|
+
:type id: int
|
|
783
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
784
|
+
number provided, it will be total request
|
|
785
|
+
timeout. It can also be a pair (tuple) of
|
|
786
|
+
(connection, read) timeouts.
|
|
787
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
788
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
789
|
+
request; this effectively ignores the
|
|
790
|
+
authentication in the spec for a single request.
|
|
791
|
+
:type _request_auth: dict, optional
|
|
792
|
+
:param _content_type: force content-type for the request.
|
|
793
|
+
:type _content_type: str, Optional
|
|
794
|
+
:param _headers: set to override the headers for a single
|
|
795
|
+
request; this effectively ignores the headers
|
|
796
|
+
in the spec for a single request.
|
|
797
|
+
:type _headers: dict, optional
|
|
798
|
+
:param _host_index: set to override the host_index for a single
|
|
799
|
+
request; this effectively ignores the host_index
|
|
800
|
+
in the spec for a single request.
|
|
801
|
+
:type _host_index: int, optional
|
|
802
|
+
:return: Returns the result object.
|
|
803
|
+
""" # noqa: E501
|
|
804
|
+
|
|
805
|
+
_param = self._delete_commit_commits_id_delete_serialize(
|
|
806
|
+
id=id,
|
|
807
|
+
_request_auth=_request_auth,
|
|
808
|
+
_content_type=_content_type,
|
|
809
|
+
_headers=_headers,
|
|
810
|
+
_host_index=_host_index
|
|
811
|
+
)
|
|
812
|
+
|
|
813
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
814
|
+
'204': None,
|
|
815
|
+
'404': "HTTPNotFoundError",
|
|
816
|
+
'422': "HTTPValidationError",
|
|
817
|
+
}
|
|
818
|
+
response_data = await self.api_client.call_api(
|
|
819
|
+
*_param,
|
|
820
|
+
_request_timeout=_request_timeout
|
|
821
|
+
)
|
|
822
|
+
return response_data.response
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
def _delete_commit_commits_id_delete_serialize(
|
|
826
|
+
self,
|
|
827
|
+
id,
|
|
828
|
+
_request_auth,
|
|
829
|
+
_content_type,
|
|
830
|
+
_headers,
|
|
831
|
+
_host_index,
|
|
832
|
+
) -> RequestSerialized:
|
|
833
|
+
|
|
834
|
+
_host = None
|
|
835
|
+
|
|
836
|
+
_collection_formats: Dict[str, str] = {
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
_path_params: Dict[str, str] = {}
|
|
840
|
+
_query_params: List[Tuple[str, str]] = []
|
|
841
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
842
|
+
_form_params: List[Tuple[str, str]] = []
|
|
843
|
+
_files: Dict[
|
|
844
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
845
|
+
] = {}
|
|
846
|
+
_body_params: Optional[bytes] = None
|
|
847
|
+
|
|
848
|
+
# process the path parameters
|
|
849
|
+
if id is not None:
|
|
850
|
+
_path_params['id'] = id
|
|
851
|
+
# process the query parameters
|
|
852
|
+
# process the header parameters
|
|
853
|
+
# process the form parameters
|
|
854
|
+
# process the body parameter
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
# set the HTTP header `Accept`
|
|
858
|
+
if 'Accept' not in _header_params:
|
|
859
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
860
|
+
[
|
|
861
|
+
'application/json'
|
|
862
|
+
]
|
|
863
|
+
)
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
# authentication setting
|
|
867
|
+
_auth_settings: List[str] = [
|
|
868
|
+
'user_bearer'
|
|
869
|
+
]
|
|
870
|
+
|
|
871
|
+
return self.api_client.param_serialize(
|
|
872
|
+
method='DELETE',
|
|
873
|
+
resource_path='/commits/{id}',
|
|
874
|
+
path_params=_path_params,
|
|
875
|
+
query_params=_query_params,
|
|
876
|
+
header_params=_header_params,
|
|
877
|
+
body=_body_params,
|
|
878
|
+
post_params=_form_params,
|
|
879
|
+
files=_files,
|
|
880
|
+
auth_settings=_auth_settings,
|
|
881
|
+
collection_formats=_collection_formats,
|
|
882
|
+
_host=_host,
|
|
883
|
+
_request_auth=_request_auth
|
|
884
|
+
)
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
@validate_call
|
|
890
|
+
async def read_commit_commits_id_get(
|
|
891
|
+
self,
|
|
892
|
+
id: StrictInt,
|
|
893
|
+
_request_timeout: Union[
|
|
894
|
+
None,
|
|
895
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
896
|
+
Tuple[
|
|
897
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
898
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
899
|
+
]
|
|
900
|
+
] = None,
|
|
901
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
902
|
+
_content_type: Optional[StrictStr] = None,
|
|
903
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
904
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
905
|
+
) -> Commit:
|
|
906
|
+
"""Get commit by ID
|
|
907
|
+
|
|
908
|
+
Get commit by ID.
|
|
909
|
+
|
|
910
|
+
:param id: (required)
|
|
911
|
+
:type id: int
|
|
912
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
913
|
+
number provided, it will be total request
|
|
914
|
+
timeout. It can also be a pair (tuple) of
|
|
915
|
+
(connection, read) timeouts.
|
|
916
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
917
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
918
|
+
request; this effectively ignores the
|
|
919
|
+
authentication in the spec for a single request.
|
|
920
|
+
:type _request_auth: dict, optional
|
|
921
|
+
:param _content_type: force content-type for the request.
|
|
922
|
+
:type _content_type: str, Optional
|
|
923
|
+
:param _headers: set to override the headers for a single
|
|
924
|
+
request; this effectively ignores the headers
|
|
925
|
+
in the spec for a single request.
|
|
926
|
+
:type _headers: dict, optional
|
|
927
|
+
:param _host_index: set to override the host_index for a single
|
|
928
|
+
request; this effectively ignores the host_index
|
|
929
|
+
in the spec for a single request.
|
|
930
|
+
:type _host_index: int, optional
|
|
931
|
+
:return: Returns the result object.
|
|
932
|
+
""" # noqa: E501
|
|
933
|
+
|
|
934
|
+
_param = self._read_commit_commits_id_get_serialize(
|
|
935
|
+
id=id,
|
|
936
|
+
_request_auth=_request_auth,
|
|
937
|
+
_content_type=_content_type,
|
|
938
|
+
_headers=_headers,
|
|
939
|
+
_host_index=_host_index
|
|
940
|
+
)
|
|
941
|
+
|
|
942
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
943
|
+
'200': "Commit",
|
|
944
|
+
'404': "HTTPNotFoundError",
|
|
945
|
+
'422': "HTTPValidationError",
|
|
946
|
+
}
|
|
947
|
+
response_data = await self.api_client.call_api(
|
|
948
|
+
*_param,
|
|
949
|
+
_request_timeout=_request_timeout
|
|
950
|
+
)
|
|
951
|
+
await response_data.read()
|
|
952
|
+
return self.api_client.response_deserialize(
|
|
953
|
+
response_data=response_data,
|
|
954
|
+
response_types_map=_response_types_map,
|
|
955
|
+
).data
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
@validate_call
|
|
959
|
+
async def read_commit_commits_id_get_with_http_info(
|
|
960
|
+
self,
|
|
961
|
+
id: StrictInt,
|
|
962
|
+
_request_timeout: Union[
|
|
963
|
+
None,
|
|
964
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
965
|
+
Tuple[
|
|
966
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
967
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
968
|
+
]
|
|
969
|
+
] = None,
|
|
970
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
971
|
+
_content_type: Optional[StrictStr] = None,
|
|
972
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
973
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
974
|
+
) -> ApiResponse[Commit]:
|
|
975
|
+
"""Get commit by ID
|
|
976
|
+
|
|
977
|
+
Get commit by ID.
|
|
978
|
+
|
|
979
|
+
:param id: (required)
|
|
980
|
+
:type id: int
|
|
981
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
982
|
+
number provided, it will be total request
|
|
983
|
+
timeout. It can also be a pair (tuple) of
|
|
984
|
+
(connection, read) timeouts.
|
|
985
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
986
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
987
|
+
request; this effectively ignores the
|
|
988
|
+
authentication in the spec for a single request.
|
|
989
|
+
:type _request_auth: dict, optional
|
|
990
|
+
:param _content_type: force content-type for the request.
|
|
991
|
+
:type _content_type: str, Optional
|
|
992
|
+
:param _headers: set to override the headers for a single
|
|
993
|
+
request; this effectively ignores the headers
|
|
994
|
+
in the spec for a single request.
|
|
995
|
+
:type _headers: dict, optional
|
|
996
|
+
:param _host_index: set to override the host_index for a single
|
|
997
|
+
request; this effectively ignores the host_index
|
|
998
|
+
in the spec for a single request.
|
|
999
|
+
:type _host_index: int, optional
|
|
1000
|
+
:return: Returns the result object.
|
|
1001
|
+
""" # noqa: E501
|
|
1002
|
+
|
|
1003
|
+
_param = self._read_commit_commits_id_get_serialize(
|
|
1004
|
+
id=id,
|
|
1005
|
+
_request_auth=_request_auth,
|
|
1006
|
+
_content_type=_content_type,
|
|
1007
|
+
_headers=_headers,
|
|
1008
|
+
_host_index=_host_index
|
|
1009
|
+
)
|
|
1010
|
+
|
|
1011
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1012
|
+
'200': "Commit",
|
|
1013
|
+
'404': "HTTPNotFoundError",
|
|
1014
|
+
'422': "HTTPValidationError",
|
|
1015
|
+
}
|
|
1016
|
+
response_data = await self.api_client.call_api(
|
|
1017
|
+
*_param,
|
|
1018
|
+
_request_timeout=_request_timeout
|
|
1019
|
+
)
|
|
1020
|
+
await response_data.read()
|
|
1021
|
+
return self.api_client.response_deserialize(
|
|
1022
|
+
response_data=response_data,
|
|
1023
|
+
response_types_map=_response_types_map,
|
|
1024
|
+
)
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
@validate_call
|
|
1028
|
+
async def read_commit_commits_id_get_without_preload_content(
|
|
1029
|
+
self,
|
|
1030
|
+
id: StrictInt,
|
|
1031
|
+
_request_timeout: Union[
|
|
1032
|
+
None,
|
|
1033
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1034
|
+
Tuple[
|
|
1035
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1036
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1037
|
+
]
|
|
1038
|
+
] = None,
|
|
1039
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1040
|
+
_content_type: Optional[StrictStr] = None,
|
|
1041
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1042
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1043
|
+
) -> RESTResponseType:
|
|
1044
|
+
"""Get commit by ID
|
|
1045
|
+
|
|
1046
|
+
Get commit by ID.
|
|
1047
|
+
|
|
1048
|
+
:param id: (required)
|
|
1049
|
+
:type id: int
|
|
1050
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1051
|
+
number provided, it will be total request
|
|
1052
|
+
timeout. It can also be a pair (tuple) of
|
|
1053
|
+
(connection, read) timeouts.
|
|
1054
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1055
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1056
|
+
request; this effectively ignores the
|
|
1057
|
+
authentication in the spec for a single request.
|
|
1058
|
+
:type _request_auth: dict, optional
|
|
1059
|
+
:param _content_type: force content-type for the request.
|
|
1060
|
+
:type _content_type: str, Optional
|
|
1061
|
+
:param _headers: set to override the headers for a single
|
|
1062
|
+
request; this effectively ignores the headers
|
|
1063
|
+
in the spec for a single request.
|
|
1064
|
+
:type _headers: dict, optional
|
|
1065
|
+
:param _host_index: set to override the host_index for a single
|
|
1066
|
+
request; this effectively ignores the host_index
|
|
1067
|
+
in the spec for a single request.
|
|
1068
|
+
:type _host_index: int, optional
|
|
1069
|
+
:return: Returns the result object.
|
|
1070
|
+
""" # noqa: E501
|
|
1071
|
+
|
|
1072
|
+
_param = self._read_commit_commits_id_get_serialize(
|
|
1073
|
+
id=id,
|
|
1074
|
+
_request_auth=_request_auth,
|
|
1075
|
+
_content_type=_content_type,
|
|
1076
|
+
_headers=_headers,
|
|
1077
|
+
_host_index=_host_index
|
|
1078
|
+
)
|
|
1079
|
+
|
|
1080
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1081
|
+
'200': "Commit",
|
|
1082
|
+
'404': "HTTPNotFoundError",
|
|
1083
|
+
'422': "HTTPValidationError",
|
|
1084
|
+
}
|
|
1085
|
+
response_data = await self.api_client.call_api(
|
|
1086
|
+
*_param,
|
|
1087
|
+
_request_timeout=_request_timeout
|
|
1088
|
+
)
|
|
1089
|
+
return response_data.response
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
def _read_commit_commits_id_get_serialize(
|
|
1093
|
+
self,
|
|
1094
|
+
id,
|
|
1095
|
+
_request_auth,
|
|
1096
|
+
_content_type,
|
|
1097
|
+
_headers,
|
|
1098
|
+
_host_index,
|
|
1099
|
+
) -> RequestSerialized:
|
|
1100
|
+
|
|
1101
|
+
_host = None
|
|
1102
|
+
|
|
1103
|
+
_collection_formats: Dict[str, str] = {
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
_path_params: Dict[str, str] = {}
|
|
1107
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1108
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1109
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1110
|
+
_files: Dict[
|
|
1111
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1112
|
+
] = {}
|
|
1113
|
+
_body_params: Optional[bytes] = None
|
|
1114
|
+
|
|
1115
|
+
# process the path parameters
|
|
1116
|
+
if id is not None:
|
|
1117
|
+
_path_params['id'] = id
|
|
1118
|
+
# process the query parameters
|
|
1119
|
+
# process the header parameters
|
|
1120
|
+
# process the form parameters
|
|
1121
|
+
# process the body parameter
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
# set the HTTP header `Accept`
|
|
1125
|
+
if 'Accept' not in _header_params:
|
|
1126
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1127
|
+
[
|
|
1128
|
+
'application/json'
|
|
1129
|
+
]
|
|
1130
|
+
)
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
# authentication setting
|
|
1134
|
+
_auth_settings: List[str] = [
|
|
1135
|
+
'user_bearer',
|
|
1136
|
+
'backend'
|
|
1137
|
+
]
|
|
1138
|
+
|
|
1139
|
+
return self.api_client.param_serialize(
|
|
1140
|
+
method='GET',
|
|
1141
|
+
resource_path='/commits/{id}',
|
|
1142
|
+
path_params=_path_params,
|
|
1143
|
+
query_params=_query_params,
|
|
1144
|
+
header_params=_header_params,
|
|
1145
|
+
body=_body_params,
|
|
1146
|
+
post_params=_form_params,
|
|
1147
|
+
files=_files,
|
|
1148
|
+
auth_settings=_auth_settings,
|
|
1149
|
+
collection_formats=_collection_formats,
|
|
1150
|
+
_host=_host,
|
|
1151
|
+
_request_auth=_request_auth
|
|
1152
|
+
)
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
@validate_call
|
|
1158
|
+
async def read_commits_commits_get(
|
|
1159
|
+
self,
|
|
1160
|
+
id: Optional[StrictInt] = None,
|
|
1161
|
+
created_on: Optional[datetime] = None,
|
|
1162
|
+
hash: Optional[StrictStr] = None,
|
|
1163
|
+
description: Optional[StrictStr] = None,
|
|
1164
|
+
algorithm_id: Optional[StrictInt] = None,
|
|
1165
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
1166
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
1167
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
1168
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
1169
|
+
_request_timeout: Union[
|
|
1170
|
+
None,
|
|
1171
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1172
|
+
Tuple[
|
|
1173
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1174
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1175
|
+
]
|
|
1176
|
+
] = None,
|
|
1177
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1178
|
+
_content_type: Optional[StrictStr] = None,
|
|
1179
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1180
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1181
|
+
) -> PageCommit:
|
|
1182
|
+
"""List commits
|
|
1183
|
+
|
|
1184
|
+
List commits.
|
|
1185
|
+
|
|
1186
|
+
:param id:
|
|
1187
|
+
:type id: int
|
|
1188
|
+
:param created_on:
|
|
1189
|
+
:type created_on: datetime
|
|
1190
|
+
:param hash:
|
|
1191
|
+
:type hash: str
|
|
1192
|
+
:param description:
|
|
1193
|
+
:type description: str
|
|
1194
|
+
:param algorithm_id:
|
|
1195
|
+
:type algorithm_id: int
|
|
1196
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
1197
|
+
:type sort_by: str
|
|
1198
|
+
:param latest: If True gets the most recently created object.
|
|
1199
|
+
:type latest: bool
|
|
1200
|
+
:param page: Page number
|
|
1201
|
+
:type page: int
|
|
1202
|
+
:param size: Page size
|
|
1203
|
+
:type size: int
|
|
1204
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1205
|
+
number provided, it will be total request
|
|
1206
|
+
timeout. It can also be a pair (tuple) of
|
|
1207
|
+
(connection, read) timeouts.
|
|
1208
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1209
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1210
|
+
request; this effectively ignores the
|
|
1211
|
+
authentication in the spec for a single request.
|
|
1212
|
+
:type _request_auth: dict, optional
|
|
1213
|
+
:param _content_type: force content-type for the request.
|
|
1214
|
+
:type _content_type: str, Optional
|
|
1215
|
+
:param _headers: set to override the headers for a single
|
|
1216
|
+
request; this effectively ignores the headers
|
|
1217
|
+
in the spec for a single request.
|
|
1218
|
+
:type _headers: dict, optional
|
|
1219
|
+
:param _host_index: set to override the host_index for a single
|
|
1220
|
+
request; this effectively ignores the host_index
|
|
1221
|
+
in the spec for a single request.
|
|
1222
|
+
:type _host_index: int, optional
|
|
1223
|
+
:return: Returns the result object.
|
|
1224
|
+
""" # noqa: E501
|
|
1225
|
+
|
|
1226
|
+
_param = self._read_commits_commits_get_serialize(
|
|
1227
|
+
id=id,
|
|
1228
|
+
created_on=created_on,
|
|
1229
|
+
hash=hash,
|
|
1230
|
+
description=description,
|
|
1231
|
+
algorithm_id=algorithm_id,
|
|
1232
|
+
sort_by=sort_by,
|
|
1233
|
+
latest=latest,
|
|
1234
|
+
page=page,
|
|
1235
|
+
size=size,
|
|
1236
|
+
_request_auth=_request_auth,
|
|
1237
|
+
_content_type=_content_type,
|
|
1238
|
+
_headers=_headers,
|
|
1239
|
+
_host_index=_host_index
|
|
1240
|
+
)
|
|
1241
|
+
|
|
1242
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1243
|
+
'200': "PageCommit",
|
|
1244
|
+
'422': "HTTPValidationError",
|
|
1245
|
+
}
|
|
1246
|
+
response_data = await self.api_client.call_api(
|
|
1247
|
+
*_param,
|
|
1248
|
+
_request_timeout=_request_timeout
|
|
1249
|
+
)
|
|
1250
|
+
await response_data.read()
|
|
1251
|
+
return self.api_client.response_deserialize(
|
|
1252
|
+
response_data=response_data,
|
|
1253
|
+
response_types_map=_response_types_map,
|
|
1254
|
+
).data
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
@validate_call
|
|
1258
|
+
async def read_commits_commits_get_with_http_info(
|
|
1259
|
+
self,
|
|
1260
|
+
id: Optional[StrictInt] = None,
|
|
1261
|
+
created_on: Optional[datetime] = None,
|
|
1262
|
+
hash: Optional[StrictStr] = None,
|
|
1263
|
+
description: Optional[StrictStr] = None,
|
|
1264
|
+
algorithm_id: Optional[StrictInt] = None,
|
|
1265
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
1266
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
1267
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
1268
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
1269
|
+
_request_timeout: Union[
|
|
1270
|
+
None,
|
|
1271
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1272
|
+
Tuple[
|
|
1273
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1274
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1275
|
+
]
|
|
1276
|
+
] = None,
|
|
1277
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1278
|
+
_content_type: Optional[StrictStr] = None,
|
|
1279
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1280
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1281
|
+
) -> ApiResponse[PageCommit]:
|
|
1282
|
+
"""List commits
|
|
1283
|
+
|
|
1284
|
+
List commits.
|
|
1285
|
+
|
|
1286
|
+
:param id:
|
|
1287
|
+
:type id: int
|
|
1288
|
+
:param created_on:
|
|
1289
|
+
:type created_on: datetime
|
|
1290
|
+
:param hash:
|
|
1291
|
+
:type hash: str
|
|
1292
|
+
:param description:
|
|
1293
|
+
:type description: str
|
|
1294
|
+
:param algorithm_id:
|
|
1295
|
+
:type algorithm_id: int
|
|
1296
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
1297
|
+
:type sort_by: str
|
|
1298
|
+
:param latest: If True gets the most recently created object.
|
|
1299
|
+
:type latest: bool
|
|
1300
|
+
:param page: Page number
|
|
1301
|
+
:type page: int
|
|
1302
|
+
:param size: Page size
|
|
1303
|
+
:type size: int
|
|
1304
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1305
|
+
number provided, it will be total request
|
|
1306
|
+
timeout. It can also be a pair (tuple) of
|
|
1307
|
+
(connection, read) timeouts.
|
|
1308
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1309
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1310
|
+
request; this effectively ignores the
|
|
1311
|
+
authentication in the spec for a single request.
|
|
1312
|
+
:type _request_auth: dict, optional
|
|
1313
|
+
:param _content_type: force content-type for the request.
|
|
1314
|
+
:type _content_type: str, Optional
|
|
1315
|
+
:param _headers: set to override the headers for a single
|
|
1316
|
+
request; this effectively ignores the headers
|
|
1317
|
+
in the spec for a single request.
|
|
1318
|
+
:type _headers: dict, optional
|
|
1319
|
+
:param _host_index: set to override the host_index for a single
|
|
1320
|
+
request; this effectively ignores the host_index
|
|
1321
|
+
in the spec for a single request.
|
|
1322
|
+
:type _host_index: int, optional
|
|
1323
|
+
:return: Returns the result object.
|
|
1324
|
+
""" # noqa: E501
|
|
1325
|
+
|
|
1326
|
+
_param = self._read_commits_commits_get_serialize(
|
|
1327
|
+
id=id,
|
|
1328
|
+
created_on=created_on,
|
|
1329
|
+
hash=hash,
|
|
1330
|
+
description=description,
|
|
1331
|
+
algorithm_id=algorithm_id,
|
|
1332
|
+
sort_by=sort_by,
|
|
1333
|
+
latest=latest,
|
|
1334
|
+
page=page,
|
|
1335
|
+
size=size,
|
|
1336
|
+
_request_auth=_request_auth,
|
|
1337
|
+
_content_type=_content_type,
|
|
1338
|
+
_headers=_headers,
|
|
1339
|
+
_host_index=_host_index
|
|
1340
|
+
)
|
|
1341
|
+
|
|
1342
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1343
|
+
'200': "PageCommit",
|
|
1344
|
+
'422': "HTTPValidationError",
|
|
1345
|
+
}
|
|
1346
|
+
response_data = await self.api_client.call_api(
|
|
1347
|
+
*_param,
|
|
1348
|
+
_request_timeout=_request_timeout
|
|
1349
|
+
)
|
|
1350
|
+
await response_data.read()
|
|
1351
|
+
return self.api_client.response_deserialize(
|
|
1352
|
+
response_data=response_data,
|
|
1353
|
+
response_types_map=_response_types_map,
|
|
1354
|
+
)
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
@validate_call
|
|
1358
|
+
async def read_commits_commits_get_without_preload_content(
|
|
1359
|
+
self,
|
|
1360
|
+
id: Optional[StrictInt] = None,
|
|
1361
|
+
created_on: Optional[datetime] = None,
|
|
1362
|
+
hash: Optional[StrictStr] = None,
|
|
1363
|
+
description: Optional[StrictStr] = None,
|
|
1364
|
+
algorithm_id: Optional[StrictInt] = None,
|
|
1365
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
1366
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
1367
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
1368
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
1369
|
+
_request_timeout: Union[
|
|
1370
|
+
None,
|
|
1371
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1372
|
+
Tuple[
|
|
1373
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1374
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1375
|
+
]
|
|
1376
|
+
] = None,
|
|
1377
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1378
|
+
_content_type: Optional[StrictStr] = None,
|
|
1379
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1380
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1381
|
+
) -> RESTResponseType:
|
|
1382
|
+
"""List commits
|
|
1383
|
+
|
|
1384
|
+
List commits.
|
|
1385
|
+
|
|
1386
|
+
:param id:
|
|
1387
|
+
:type id: int
|
|
1388
|
+
:param created_on:
|
|
1389
|
+
:type created_on: datetime
|
|
1390
|
+
:param hash:
|
|
1391
|
+
:type hash: str
|
|
1392
|
+
:param description:
|
|
1393
|
+
:type description: str
|
|
1394
|
+
:param algorithm_id:
|
|
1395
|
+
:type algorithm_id: int
|
|
1396
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
1397
|
+
:type sort_by: str
|
|
1398
|
+
:param latest: If True gets the most recently created object.
|
|
1399
|
+
:type latest: bool
|
|
1400
|
+
:param page: Page number
|
|
1401
|
+
:type page: int
|
|
1402
|
+
:param size: Page size
|
|
1403
|
+
:type size: int
|
|
1404
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1405
|
+
number provided, it will be total request
|
|
1406
|
+
timeout. It can also be a pair (tuple) of
|
|
1407
|
+
(connection, read) timeouts.
|
|
1408
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1409
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1410
|
+
request; this effectively ignores the
|
|
1411
|
+
authentication in the spec for a single request.
|
|
1412
|
+
:type _request_auth: dict, optional
|
|
1413
|
+
:param _content_type: force content-type for the request.
|
|
1414
|
+
:type _content_type: str, Optional
|
|
1415
|
+
:param _headers: set to override the headers for a single
|
|
1416
|
+
request; this effectively ignores the headers
|
|
1417
|
+
in the spec for a single request.
|
|
1418
|
+
:type _headers: dict, optional
|
|
1419
|
+
:param _host_index: set to override the host_index for a single
|
|
1420
|
+
request; this effectively ignores the host_index
|
|
1421
|
+
in the spec for a single request.
|
|
1422
|
+
:type _host_index: int, optional
|
|
1423
|
+
:return: Returns the result object.
|
|
1424
|
+
""" # noqa: E501
|
|
1425
|
+
|
|
1426
|
+
_param = self._read_commits_commits_get_serialize(
|
|
1427
|
+
id=id,
|
|
1428
|
+
created_on=created_on,
|
|
1429
|
+
hash=hash,
|
|
1430
|
+
description=description,
|
|
1431
|
+
algorithm_id=algorithm_id,
|
|
1432
|
+
sort_by=sort_by,
|
|
1433
|
+
latest=latest,
|
|
1434
|
+
page=page,
|
|
1435
|
+
size=size,
|
|
1436
|
+
_request_auth=_request_auth,
|
|
1437
|
+
_content_type=_content_type,
|
|
1438
|
+
_headers=_headers,
|
|
1439
|
+
_host_index=_host_index
|
|
1440
|
+
)
|
|
1441
|
+
|
|
1442
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1443
|
+
'200': "PageCommit",
|
|
1444
|
+
'422': "HTTPValidationError",
|
|
1445
|
+
}
|
|
1446
|
+
response_data = await self.api_client.call_api(
|
|
1447
|
+
*_param,
|
|
1448
|
+
_request_timeout=_request_timeout
|
|
1449
|
+
)
|
|
1450
|
+
return response_data.response
|
|
1451
|
+
|
|
1452
|
+
|
|
1453
|
+
def _read_commits_commits_get_serialize(
|
|
1454
|
+
self,
|
|
1455
|
+
id,
|
|
1456
|
+
created_on,
|
|
1457
|
+
hash,
|
|
1458
|
+
description,
|
|
1459
|
+
algorithm_id,
|
|
1460
|
+
sort_by,
|
|
1461
|
+
latest,
|
|
1462
|
+
page,
|
|
1463
|
+
size,
|
|
1464
|
+
_request_auth,
|
|
1465
|
+
_content_type,
|
|
1466
|
+
_headers,
|
|
1467
|
+
_host_index,
|
|
1468
|
+
) -> RequestSerialized:
|
|
1469
|
+
|
|
1470
|
+
_host = None
|
|
1471
|
+
|
|
1472
|
+
_collection_formats: Dict[str, str] = {
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
_path_params: Dict[str, str] = {}
|
|
1476
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1477
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1478
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1479
|
+
_files: Dict[
|
|
1480
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1481
|
+
] = {}
|
|
1482
|
+
_body_params: Optional[bytes] = None
|
|
1483
|
+
|
|
1484
|
+
# process the path parameters
|
|
1485
|
+
# process the query parameters
|
|
1486
|
+
if id is not None:
|
|
1487
|
+
|
|
1488
|
+
_query_params.append(('id', id))
|
|
1489
|
+
|
|
1490
|
+
if created_on is not None:
|
|
1491
|
+
if isinstance(created_on, datetime):
|
|
1492
|
+
_query_params.append(
|
|
1493
|
+
(
|
|
1494
|
+
'created_on',
|
|
1495
|
+
created_on.strftime(
|
|
1496
|
+
self.api_client.configuration.datetime_format
|
|
1497
|
+
)
|
|
1498
|
+
)
|
|
1499
|
+
)
|
|
1500
|
+
else:
|
|
1501
|
+
_query_params.append(('created_on', created_on))
|
|
1502
|
+
|
|
1503
|
+
if hash is not None:
|
|
1504
|
+
|
|
1505
|
+
_query_params.append(('hash', hash))
|
|
1506
|
+
|
|
1507
|
+
if description is not None:
|
|
1508
|
+
|
|
1509
|
+
_query_params.append(('description', description))
|
|
1510
|
+
|
|
1511
|
+
if algorithm_id is not None:
|
|
1512
|
+
|
|
1513
|
+
_query_params.append(('algorithm_id', algorithm_id))
|
|
1514
|
+
|
|
1515
|
+
if sort_by is not None:
|
|
1516
|
+
|
|
1517
|
+
_query_params.append(('sort_by', sort_by))
|
|
1518
|
+
|
|
1519
|
+
if latest is not None:
|
|
1520
|
+
|
|
1521
|
+
_query_params.append(('latest', latest))
|
|
1522
|
+
|
|
1523
|
+
if page is not None:
|
|
1524
|
+
|
|
1525
|
+
_query_params.append(('page', page))
|
|
1526
|
+
|
|
1527
|
+
if size is not None:
|
|
1528
|
+
|
|
1529
|
+
_query_params.append(('size', size))
|
|
1530
|
+
|
|
1531
|
+
# process the header parameters
|
|
1532
|
+
# process the form parameters
|
|
1533
|
+
# process the body parameter
|
|
1534
|
+
|
|
1535
|
+
|
|
1536
|
+
# set the HTTP header `Accept`
|
|
1537
|
+
if 'Accept' not in _header_params:
|
|
1538
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1539
|
+
[
|
|
1540
|
+
'application/json'
|
|
1541
|
+
]
|
|
1542
|
+
)
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
# authentication setting
|
|
1546
|
+
_auth_settings: List[str] = [
|
|
1547
|
+
'user_bearer'
|
|
1548
|
+
]
|
|
1549
|
+
|
|
1550
|
+
return self.api_client.param_serialize(
|
|
1551
|
+
method='GET',
|
|
1552
|
+
resource_path='/commits',
|
|
1553
|
+
path_params=_path_params,
|
|
1554
|
+
query_params=_query_params,
|
|
1555
|
+
header_params=_header_params,
|
|
1556
|
+
body=_body_params,
|
|
1557
|
+
post_params=_form_params,
|
|
1558
|
+
files=_files,
|
|
1559
|
+
auth_settings=_auth_settings,
|
|
1560
|
+
collection_formats=_collection_formats,
|
|
1561
|
+
_host=_host,
|
|
1562
|
+
_request_auth=_request_auth
|
|
1563
|
+
)
|
|
1564
|
+
|
|
1565
|
+
|