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,1307 @@
|
|
|
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 pydantic import Field, StrictBool, StrictInt, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from compute_api_client.models.compile_stage import CompileStage
|
|
23
|
+
from compute_api_client.models.file import File
|
|
24
|
+
from compute_api_client.models.file_in import FileIn
|
|
25
|
+
from compute_api_client.models.page_file import PageFile
|
|
26
|
+
|
|
27
|
+
from compute_api_client.api_client import ApiClient, RequestSerialized
|
|
28
|
+
from compute_api_client.api_response import ApiResponse
|
|
29
|
+
from compute_api_client.rest import RESTResponseType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class FilesApi:
|
|
33
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
34
|
+
Ref: https://openapi-generator.tech
|
|
35
|
+
|
|
36
|
+
Do not edit the class manually.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, api_client=None) -> None:
|
|
40
|
+
if api_client is None:
|
|
41
|
+
api_client = ApiClient.get_default()
|
|
42
|
+
self.api_client = api_client
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@validate_call
|
|
46
|
+
async def create_file_files_post(
|
|
47
|
+
self,
|
|
48
|
+
file_in: FileIn,
|
|
49
|
+
_request_timeout: Union[
|
|
50
|
+
None,
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Tuple[
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_content_type: Optional[StrictStr] = None,
|
|
59
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
61
|
+
) -> File:
|
|
62
|
+
"""Create file
|
|
63
|
+
|
|
64
|
+
Create new file.
|
|
65
|
+
|
|
66
|
+
:param file_in: (required)
|
|
67
|
+
:type file_in: FileIn
|
|
68
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
69
|
+
number provided, it will be total request
|
|
70
|
+
timeout. It can also be a pair (tuple) of
|
|
71
|
+
(connection, read) timeouts.
|
|
72
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
73
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
74
|
+
request; this effectively ignores the
|
|
75
|
+
authentication in the spec for a single request.
|
|
76
|
+
:type _request_auth: dict, optional
|
|
77
|
+
:param _content_type: force content-type for the request.
|
|
78
|
+
:type _content_type: str, Optional
|
|
79
|
+
:param _headers: set to override the headers for a single
|
|
80
|
+
request; this effectively ignores the headers
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _headers: dict, optional
|
|
83
|
+
:param _host_index: set to override the host_index for a single
|
|
84
|
+
request; this effectively ignores the host_index
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _host_index: int, optional
|
|
87
|
+
:return: Returns the result object.
|
|
88
|
+
""" # noqa: E501
|
|
89
|
+
|
|
90
|
+
_param = self._create_file_files_post_serialize(
|
|
91
|
+
file_in=file_in,
|
|
92
|
+
_request_auth=_request_auth,
|
|
93
|
+
_content_type=_content_type,
|
|
94
|
+
_headers=_headers,
|
|
95
|
+
_host_index=_host_index
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
99
|
+
'201': "File",
|
|
100
|
+
'422': "HTTPValidationError",
|
|
101
|
+
}
|
|
102
|
+
response_data = await self.api_client.call_api(
|
|
103
|
+
*_param,
|
|
104
|
+
_request_timeout=_request_timeout
|
|
105
|
+
)
|
|
106
|
+
await response_data.read()
|
|
107
|
+
return self.api_client.response_deserialize(
|
|
108
|
+
response_data=response_data,
|
|
109
|
+
response_types_map=_response_types_map,
|
|
110
|
+
).data
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@validate_call
|
|
114
|
+
async def create_file_files_post_with_http_info(
|
|
115
|
+
self,
|
|
116
|
+
file_in: FileIn,
|
|
117
|
+
_request_timeout: Union[
|
|
118
|
+
None,
|
|
119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
120
|
+
Tuple[
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
123
|
+
]
|
|
124
|
+
] = None,
|
|
125
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
126
|
+
_content_type: Optional[StrictStr] = None,
|
|
127
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
128
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
129
|
+
) -> ApiResponse[File]:
|
|
130
|
+
"""Create file
|
|
131
|
+
|
|
132
|
+
Create new file.
|
|
133
|
+
|
|
134
|
+
:param file_in: (required)
|
|
135
|
+
:type file_in: FileIn
|
|
136
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
137
|
+
number provided, it will be total request
|
|
138
|
+
timeout. It can also be a pair (tuple) of
|
|
139
|
+
(connection, read) timeouts.
|
|
140
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
141
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
142
|
+
request; this effectively ignores the
|
|
143
|
+
authentication in the spec for a single request.
|
|
144
|
+
:type _request_auth: dict, optional
|
|
145
|
+
:param _content_type: force content-type for the request.
|
|
146
|
+
:type _content_type: str, Optional
|
|
147
|
+
:param _headers: set to override the headers for a single
|
|
148
|
+
request; this effectively ignores the headers
|
|
149
|
+
in the spec for a single request.
|
|
150
|
+
:type _headers: dict, optional
|
|
151
|
+
:param _host_index: set to override the host_index for a single
|
|
152
|
+
request; this effectively ignores the host_index
|
|
153
|
+
in the spec for a single request.
|
|
154
|
+
:type _host_index: int, optional
|
|
155
|
+
:return: Returns the result object.
|
|
156
|
+
""" # noqa: E501
|
|
157
|
+
|
|
158
|
+
_param = self._create_file_files_post_serialize(
|
|
159
|
+
file_in=file_in,
|
|
160
|
+
_request_auth=_request_auth,
|
|
161
|
+
_content_type=_content_type,
|
|
162
|
+
_headers=_headers,
|
|
163
|
+
_host_index=_host_index
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
167
|
+
'201': "File",
|
|
168
|
+
'422': "HTTPValidationError",
|
|
169
|
+
}
|
|
170
|
+
response_data = await self.api_client.call_api(
|
|
171
|
+
*_param,
|
|
172
|
+
_request_timeout=_request_timeout
|
|
173
|
+
)
|
|
174
|
+
await response_data.read()
|
|
175
|
+
return self.api_client.response_deserialize(
|
|
176
|
+
response_data=response_data,
|
|
177
|
+
response_types_map=_response_types_map,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
@validate_call
|
|
182
|
+
async def create_file_files_post_without_preload_content(
|
|
183
|
+
self,
|
|
184
|
+
file_in: FileIn,
|
|
185
|
+
_request_timeout: Union[
|
|
186
|
+
None,
|
|
187
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
188
|
+
Tuple[
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
191
|
+
]
|
|
192
|
+
] = None,
|
|
193
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
194
|
+
_content_type: Optional[StrictStr] = None,
|
|
195
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
196
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
197
|
+
) -> RESTResponseType:
|
|
198
|
+
"""Create file
|
|
199
|
+
|
|
200
|
+
Create new file.
|
|
201
|
+
|
|
202
|
+
:param file_in: (required)
|
|
203
|
+
:type file_in: FileIn
|
|
204
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
205
|
+
number provided, it will be total request
|
|
206
|
+
timeout. It can also be a pair (tuple) of
|
|
207
|
+
(connection, read) timeouts.
|
|
208
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
209
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
210
|
+
request; this effectively ignores the
|
|
211
|
+
authentication in the spec for a single request.
|
|
212
|
+
:type _request_auth: dict, optional
|
|
213
|
+
:param _content_type: force content-type for the request.
|
|
214
|
+
:type _content_type: str, Optional
|
|
215
|
+
:param _headers: set to override the headers for a single
|
|
216
|
+
request; this effectively ignores the headers
|
|
217
|
+
in the spec for a single request.
|
|
218
|
+
:type _headers: dict, optional
|
|
219
|
+
:param _host_index: set to override the host_index for a single
|
|
220
|
+
request; this effectively ignores the host_index
|
|
221
|
+
in the spec for a single request.
|
|
222
|
+
:type _host_index: int, optional
|
|
223
|
+
:return: Returns the result object.
|
|
224
|
+
""" # noqa: E501
|
|
225
|
+
|
|
226
|
+
_param = self._create_file_files_post_serialize(
|
|
227
|
+
file_in=file_in,
|
|
228
|
+
_request_auth=_request_auth,
|
|
229
|
+
_content_type=_content_type,
|
|
230
|
+
_headers=_headers,
|
|
231
|
+
_host_index=_host_index
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
235
|
+
'201': "File",
|
|
236
|
+
'422': "HTTPValidationError",
|
|
237
|
+
}
|
|
238
|
+
response_data = await self.api_client.call_api(
|
|
239
|
+
*_param,
|
|
240
|
+
_request_timeout=_request_timeout
|
|
241
|
+
)
|
|
242
|
+
return response_data.response
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
def _create_file_files_post_serialize(
|
|
246
|
+
self,
|
|
247
|
+
file_in,
|
|
248
|
+
_request_auth,
|
|
249
|
+
_content_type,
|
|
250
|
+
_headers,
|
|
251
|
+
_host_index,
|
|
252
|
+
) -> RequestSerialized:
|
|
253
|
+
|
|
254
|
+
_host = None
|
|
255
|
+
|
|
256
|
+
_collection_formats: Dict[str, str] = {
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
_path_params: Dict[str, str] = {}
|
|
260
|
+
_query_params: List[Tuple[str, str]] = []
|
|
261
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
262
|
+
_form_params: List[Tuple[str, str]] = []
|
|
263
|
+
_files: Dict[
|
|
264
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
265
|
+
] = {}
|
|
266
|
+
_body_params: Optional[bytes] = None
|
|
267
|
+
|
|
268
|
+
# process the path parameters
|
|
269
|
+
# process the query parameters
|
|
270
|
+
# process the header parameters
|
|
271
|
+
# process the form parameters
|
|
272
|
+
# process the body parameter
|
|
273
|
+
if file_in is not None:
|
|
274
|
+
_body_params = file_in
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
# set the HTTP header `Accept`
|
|
278
|
+
if 'Accept' not in _header_params:
|
|
279
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
280
|
+
[
|
|
281
|
+
'application/json'
|
|
282
|
+
]
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
# set the HTTP header `Content-Type`
|
|
286
|
+
if _content_type:
|
|
287
|
+
_header_params['Content-Type'] = _content_type
|
|
288
|
+
else:
|
|
289
|
+
_default_content_type = (
|
|
290
|
+
self.api_client.select_header_content_type(
|
|
291
|
+
[
|
|
292
|
+
'application/json'
|
|
293
|
+
]
|
|
294
|
+
)
|
|
295
|
+
)
|
|
296
|
+
if _default_content_type is not None:
|
|
297
|
+
_header_params['Content-Type'] = _default_content_type
|
|
298
|
+
|
|
299
|
+
# authentication setting
|
|
300
|
+
_auth_settings: List[str] = [
|
|
301
|
+
'user_bearer'
|
|
302
|
+
]
|
|
303
|
+
|
|
304
|
+
return self.api_client.param_serialize(
|
|
305
|
+
method='POST',
|
|
306
|
+
resource_path='/files',
|
|
307
|
+
path_params=_path_params,
|
|
308
|
+
query_params=_query_params,
|
|
309
|
+
header_params=_header_params,
|
|
310
|
+
body=_body_params,
|
|
311
|
+
post_params=_form_params,
|
|
312
|
+
files=_files,
|
|
313
|
+
auth_settings=_auth_settings,
|
|
314
|
+
collection_formats=_collection_formats,
|
|
315
|
+
_host=_host,
|
|
316
|
+
_request_auth=_request_auth
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
@validate_call
|
|
323
|
+
async def delete_file_files_id_delete(
|
|
324
|
+
self,
|
|
325
|
+
id: StrictInt,
|
|
326
|
+
_request_timeout: Union[
|
|
327
|
+
None,
|
|
328
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
329
|
+
Tuple[
|
|
330
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
331
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
332
|
+
]
|
|
333
|
+
] = None,
|
|
334
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
335
|
+
_content_type: Optional[StrictStr] = None,
|
|
336
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
337
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
338
|
+
) -> None:
|
|
339
|
+
"""Destroy file
|
|
340
|
+
|
|
341
|
+
Delete a file.
|
|
342
|
+
|
|
343
|
+
:param id: (required)
|
|
344
|
+
:type id: int
|
|
345
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
346
|
+
number provided, it will be total request
|
|
347
|
+
timeout. It can also be a pair (tuple) of
|
|
348
|
+
(connection, read) timeouts.
|
|
349
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
350
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
351
|
+
request; this effectively ignores the
|
|
352
|
+
authentication in the spec for a single request.
|
|
353
|
+
:type _request_auth: dict, optional
|
|
354
|
+
:param _content_type: force content-type for the request.
|
|
355
|
+
:type _content_type: str, Optional
|
|
356
|
+
:param _headers: set to override the headers for a single
|
|
357
|
+
request; this effectively ignores the headers
|
|
358
|
+
in the spec for a single request.
|
|
359
|
+
:type _headers: dict, optional
|
|
360
|
+
:param _host_index: set to override the host_index for a single
|
|
361
|
+
request; this effectively ignores the host_index
|
|
362
|
+
in the spec for a single request.
|
|
363
|
+
:type _host_index: int, optional
|
|
364
|
+
:return: Returns the result object.
|
|
365
|
+
""" # noqa: E501
|
|
366
|
+
|
|
367
|
+
_param = self._delete_file_files_id_delete_serialize(
|
|
368
|
+
id=id,
|
|
369
|
+
_request_auth=_request_auth,
|
|
370
|
+
_content_type=_content_type,
|
|
371
|
+
_headers=_headers,
|
|
372
|
+
_host_index=_host_index
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
376
|
+
'204': None,
|
|
377
|
+
'404': "HTTPNotFoundError",
|
|
378
|
+
'422': "HTTPValidationError",
|
|
379
|
+
}
|
|
380
|
+
response_data = await self.api_client.call_api(
|
|
381
|
+
*_param,
|
|
382
|
+
_request_timeout=_request_timeout
|
|
383
|
+
)
|
|
384
|
+
await response_data.read()
|
|
385
|
+
return self.api_client.response_deserialize(
|
|
386
|
+
response_data=response_data,
|
|
387
|
+
response_types_map=_response_types_map,
|
|
388
|
+
).data
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
@validate_call
|
|
392
|
+
async def delete_file_files_id_delete_with_http_info(
|
|
393
|
+
self,
|
|
394
|
+
id: StrictInt,
|
|
395
|
+
_request_timeout: Union[
|
|
396
|
+
None,
|
|
397
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
398
|
+
Tuple[
|
|
399
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
400
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
401
|
+
]
|
|
402
|
+
] = None,
|
|
403
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
404
|
+
_content_type: Optional[StrictStr] = None,
|
|
405
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
406
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
407
|
+
) -> ApiResponse[None]:
|
|
408
|
+
"""Destroy file
|
|
409
|
+
|
|
410
|
+
Delete a file.
|
|
411
|
+
|
|
412
|
+
:param id: (required)
|
|
413
|
+
:type id: int
|
|
414
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
415
|
+
number provided, it will be total request
|
|
416
|
+
timeout. It can also be a pair (tuple) of
|
|
417
|
+
(connection, read) timeouts.
|
|
418
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
419
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
420
|
+
request; this effectively ignores the
|
|
421
|
+
authentication in the spec for a single request.
|
|
422
|
+
:type _request_auth: dict, optional
|
|
423
|
+
:param _content_type: force content-type for the request.
|
|
424
|
+
:type _content_type: str, Optional
|
|
425
|
+
:param _headers: set to override the headers for a single
|
|
426
|
+
request; this effectively ignores the headers
|
|
427
|
+
in the spec for a single request.
|
|
428
|
+
:type _headers: dict, optional
|
|
429
|
+
:param _host_index: set to override the host_index for a single
|
|
430
|
+
request; this effectively ignores the host_index
|
|
431
|
+
in the spec for a single request.
|
|
432
|
+
:type _host_index: int, optional
|
|
433
|
+
:return: Returns the result object.
|
|
434
|
+
""" # noqa: E501
|
|
435
|
+
|
|
436
|
+
_param = self._delete_file_files_id_delete_serialize(
|
|
437
|
+
id=id,
|
|
438
|
+
_request_auth=_request_auth,
|
|
439
|
+
_content_type=_content_type,
|
|
440
|
+
_headers=_headers,
|
|
441
|
+
_host_index=_host_index
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
445
|
+
'204': None,
|
|
446
|
+
'404': "HTTPNotFoundError",
|
|
447
|
+
'422': "HTTPValidationError",
|
|
448
|
+
}
|
|
449
|
+
response_data = await self.api_client.call_api(
|
|
450
|
+
*_param,
|
|
451
|
+
_request_timeout=_request_timeout
|
|
452
|
+
)
|
|
453
|
+
await response_data.read()
|
|
454
|
+
return self.api_client.response_deserialize(
|
|
455
|
+
response_data=response_data,
|
|
456
|
+
response_types_map=_response_types_map,
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
@validate_call
|
|
461
|
+
async def delete_file_files_id_delete_without_preload_content(
|
|
462
|
+
self,
|
|
463
|
+
id: StrictInt,
|
|
464
|
+
_request_timeout: Union[
|
|
465
|
+
None,
|
|
466
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
467
|
+
Tuple[
|
|
468
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
469
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
470
|
+
]
|
|
471
|
+
] = None,
|
|
472
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
473
|
+
_content_type: Optional[StrictStr] = None,
|
|
474
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
475
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
476
|
+
) -> RESTResponseType:
|
|
477
|
+
"""Destroy file
|
|
478
|
+
|
|
479
|
+
Delete a file.
|
|
480
|
+
|
|
481
|
+
:param id: (required)
|
|
482
|
+
:type id: int
|
|
483
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
484
|
+
number provided, it will be total request
|
|
485
|
+
timeout. It can also be a pair (tuple) of
|
|
486
|
+
(connection, read) timeouts.
|
|
487
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
488
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
489
|
+
request; this effectively ignores the
|
|
490
|
+
authentication in the spec for a single request.
|
|
491
|
+
:type _request_auth: dict, optional
|
|
492
|
+
:param _content_type: force content-type for the request.
|
|
493
|
+
:type _content_type: str, Optional
|
|
494
|
+
:param _headers: set to override the headers for a single
|
|
495
|
+
request; this effectively ignores the headers
|
|
496
|
+
in the spec for a single request.
|
|
497
|
+
:type _headers: dict, optional
|
|
498
|
+
:param _host_index: set to override the host_index for a single
|
|
499
|
+
request; this effectively ignores the host_index
|
|
500
|
+
in the spec for a single request.
|
|
501
|
+
:type _host_index: int, optional
|
|
502
|
+
:return: Returns the result object.
|
|
503
|
+
""" # noqa: E501
|
|
504
|
+
|
|
505
|
+
_param = self._delete_file_files_id_delete_serialize(
|
|
506
|
+
id=id,
|
|
507
|
+
_request_auth=_request_auth,
|
|
508
|
+
_content_type=_content_type,
|
|
509
|
+
_headers=_headers,
|
|
510
|
+
_host_index=_host_index
|
|
511
|
+
)
|
|
512
|
+
|
|
513
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
514
|
+
'204': None,
|
|
515
|
+
'404': "HTTPNotFoundError",
|
|
516
|
+
'422': "HTTPValidationError",
|
|
517
|
+
}
|
|
518
|
+
response_data = await self.api_client.call_api(
|
|
519
|
+
*_param,
|
|
520
|
+
_request_timeout=_request_timeout
|
|
521
|
+
)
|
|
522
|
+
return response_data.response
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
def _delete_file_files_id_delete_serialize(
|
|
526
|
+
self,
|
|
527
|
+
id,
|
|
528
|
+
_request_auth,
|
|
529
|
+
_content_type,
|
|
530
|
+
_headers,
|
|
531
|
+
_host_index,
|
|
532
|
+
) -> RequestSerialized:
|
|
533
|
+
|
|
534
|
+
_host = None
|
|
535
|
+
|
|
536
|
+
_collection_formats: Dict[str, str] = {
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
_path_params: Dict[str, str] = {}
|
|
540
|
+
_query_params: List[Tuple[str, str]] = []
|
|
541
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
542
|
+
_form_params: List[Tuple[str, str]] = []
|
|
543
|
+
_files: Dict[
|
|
544
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
545
|
+
] = {}
|
|
546
|
+
_body_params: Optional[bytes] = None
|
|
547
|
+
|
|
548
|
+
# process the path parameters
|
|
549
|
+
if id is not None:
|
|
550
|
+
_path_params['id'] = id
|
|
551
|
+
# process the query parameters
|
|
552
|
+
# process the header parameters
|
|
553
|
+
# process the form parameters
|
|
554
|
+
# process the body parameter
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
# set the HTTP header `Accept`
|
|
558
|
+
if 'Accept' not in _header_params:
|
|
559
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
560
|
+
[
|
|
561
|
+
'application/json'
|
|
562
|
+
]
|
|
563
|
+
)
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
# authentication setting
|
|
567
|
+
_auth_settings: List[str] = [
|
|
568
|
+
'user_bearer'
|
|
569
|
+
]
|
|
570
|
+
|
|
571
|
+
return self.api_client.param_serialize(
|
|
572
|
+
method='DELETE',
|
|
573
|
+
resource_path='/files/{id}',
|
|
574
|
+
path_params=_path_params,
|
|
575
|
+
query_params=_query_params,
|
|
576
|
+
header_params=_header_params,
|
|
577
|
+
body=_body_params,
|
|
578
|
+
post_params=_form_params,
|
|
579
|
+
files=_files,
|
|
580
|
+
auth_settings=_auth_settings,
|
|
581
|
+
collection_formats=_collection_formats,
|
|
582
|
+
_host=_host,
|
|
583
|
+
_request_auth=_request_auth
|
|
584
|
+
)
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
@validate_call
|
|
590
|
+
async def read_file_files_id_get(
|
|
591
|
+
self,
|
|
592
|
+
id: StrictInt,
|
|
593
|
+
_request_timeout: Union[
|
|
594
|
+
None,
|
|
595
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
596
|
+
Tuple[
|
|
597
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
598
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
599
|
+
]
|
|
600
|
+
] = None,
|
|
601
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
602
|
+
_content_type: Optional[StrictStr] = None,
|
|
603
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
604
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
605
|
+
) -> File:
|
|
606
|
+
"""Retrieve file
|
|
607
|
+
|
|
608
|
+
Get file by ID.
|
|
609
|
+
|
|
610
|
+
:param id: (required)
|
|
611
|
+
:type id: int
|
|
612
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
613
|
+
number provided, it will be total request
|
|
614
|
+
timeout. It can also be a pair (tuple) of
|
|
615
|
+
(connection, read) timeouts.
|
|
616
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
617
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
618
|
+
request; this effectively ignores the
|
|
619
|
+
authentication in the spec for a single request.
|
|
620
|
+
:type _request_auth: dict, optional
|
|
621
|
+
:param _content_type: force content-type for the request.
|
|
622
|
+
:type _content_type: str, Optional
|
|
623
|
+
:param _headers: set to override the headers for a single
|
|
624
|
+
request; this effectively ignores the headers
|
|
625
|
+
in the spec for a single request.
|
|
626
|
+
:type _headers: dict, optional
|
|
627
|
+
:param _host_index: set to override the host_index for a single
|
|
628
|
+
request; this effectively ignores the host_index
|
|
629
|
+
in the spec for a single request.
|
|
630
|
+
:type _host_index: int, optional
|
|
631
|
+
:return: Returns the result object.
|
|
632
|
+
""" # noqa: E501
|
|
633
|
+
|
|
634
|
+
_param = self._read_file_files_id_get_serialize(
|
|
635
|
+
id=id,
|
|
636
|
+
_request_auth=_request_auth,
|
|
637
|
+
_content_type=_content_type,
|
|
638
|
+
_headers=_headers,
|
|
639
|
+
_host_index=_host_index
|
|
640
|
+
)
|
|
641
|
+
|
|
642
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
643
|
+
'200': "File",
|
|
644
|
+
'404': "HTTPNotFoundError",
|
|
645
|
+
'422': "HTTPValidationError",
|
|
646
|
+
}
|
|
647
|
+
response_data = await self.api_client.call_api(
|
|
648
|
+
*_param,
|
|
649
|
+
_request_timeout=_request_timeout
|
|
650
|
+
)
|
|
651
|
+
await response_data.read()
|
|
652
|
+
return self.api_client.response_deserialize(
|
|
653
|
+
response_data=response_data,
|
|
654
|
+
response_types_map=_response_types_map,
|
|
655
|
+
).data
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
@validate_call
|
|
659
|
+
async def read_file_files_id_get_with_http_info(
|
|
660
|
+
self,
|
|
661
|
+
id: StrictInt,
|
|
662
|
+
_request_timeout: Union[
|
|
663
|
+
None,
|
|
664
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
665
|
+
Tuple[
|
|
666
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
667
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
668
|
+
]
|
|
669
|
+
] = None,
|
|
670
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
671
|
+
_content_type: Optional[StrictStr] = None,
|
|
672
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
673
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
674
|
+
) -> ApiResponse[File]:
|
|
675
|
+
"""Retrieve file
|
|
676
|
+
|
|
677
|
+
Get file by ID.
|
|
678
|
+
|
|
679
|
+
:param id: (required)
|
|
680
|
+
:type id: int
|
|
681
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
682
|
+
number provided, it will be total request
|
|
683
|
+
timeout. It can also be a pair (tuple) of
|
|
684
|
+
(connection, read) timeouts.
|
|
685
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
686
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
687
|
+
request; this effectively ignores the
|
|
688
|
+
authentication in the spec for a single request.
|
|
689
|
+
:type _request_auth: dict, optional
|
|
690
|
+
:param _content_type: force content-type for the request.
|
|
691
|
+
:type _content_type: str, Optional
|
|
692
|
+
:param _headers: set to override the headers for a single
|
|
693
|
+
request; this effectively ignores the headers
|
|
694
|
+
in the spec for a single request.
|
|
695
|
+
:type _headers: dict, optional
|
|
696
|
+
:param _host_index: set to override the host_index for a single
|
|
697
|
+
request; this effectively ignores the host_index
|
|
698
|
+
in the spec for a single request.
|
|
699
|
+
:type _host_index: int, optional
|
|
700
|
+
:return: Returns the result object.
|
|
701
|
+
""" # noqa: E501
|
|
702
|
+
|
|
703
|
+
_param = self._read_file_files_id_get_serialize(
|
|
704
|
+
id=id,
|
|
705
|
+
_request_auth=_request_auth,
|
|
706
|
+
_content_type=_content_type,
|
|
707
|
+
_headers=_headers,
|
|
708
|
+
_host_index=_host_index
|
|
709
|
+
)
|
|
710
|
+
|
|
711
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
712
|
+
'200': "File",
|
|
713
|
+
'404': "HTTPNotFoundError",
|
|
714
|
+
'422': "HTTPValidationError",
|
|
715
|
+
}
|
|
716
|
+
response_data = await self.api_client.call_api(
|
|
717
|
+
*_param,
|
|
718
|
+
_request_timeout=_request_timeout
|
|
719
|
+
)
|
|
720
|
+
await response_data.read()
|
|
721
|
+
return self.api_client.response_deserialize(
|
|
722
|
+
response_data=response_data,
|
|
723
|
+
response_types_map=_response_types_map,
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
@validate_call
|
|
728
|
+
async def read_file_files_id_get_without_preload_content(
|
|
729
|
+
self,
|
|
730
|
+
id: StrictInt,
|
|
731
|
+
_request_timeout: Union[
|
|
732
|
+
None,
|
|
733
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
734
|
+
Tuple[
|
|
735
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
736
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
737
|
+
]
|
|
738
|
+
] = None,
|
|
739
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
740
|
+
_content_type: Optional[StrictStr] = None,
|
|
741
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
742
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
743
|
+
) -> RESTResponseType:
|
|
744
|
+
"""Retrieve file
|
|
745
|
+
|
|
746
|
+
Get file by ID.
|
|
747
|
+
|
|
748
|
+
:param id: (required)
|
|
749
|
+
:type id: int
|
|
750
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
751
|
+
number provided, it will be total request
|
|
752
|
+
timeout. It can also be a pair (tuple) of
|
|
753
|
+
(connection, read) timeouts.
|
|
754
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
755
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
756
|
+
request; this effectively ignores the
|
|
757
|
+
authentication in the spec for a single request.
|
|
758
|
+
:type _request_auth: dict, optional
|
|
759
|
+
:param _content_type: force content-type for the request.
|
|
760
|
+
:type _content_type: str, Optional
|
|
761
|
+
:param _headers: set to override the headers for a single
|
|
762
|
+
request; this effectively ignores the headers
|
|
763
|
+
in the spec for a single request.
|
|
764
|
+
:type _headers: dict, optional
|
|
765
|
+
:param _host_index: set to override the host_index for a single
|
|
766
|
+
request; this effectively ignores the host_index
|
|
767
|
+
in the spec for a single request.
|
|
768
|
+
:type _host_index: int, optional
|
|
769
|
+
:return: Returns the result object.
|
|
770
|
+
""" # noqa: E501
|
|
771
|
+
|
|
772
|
+
_param = self._read_file_files_id_get_serialize(
|
|
773
|
+
id=id,
|
|
774
|
+
_request_auth=_request_auth,
|
|
775
|
+
_content_type=_content_type,
|
|
776
|
+
_headers=_headers,
|
|
777
|
+
_host_index=_host_index
|
|
778
|
+
)
|
|
779
|
+
|
|
780
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
781
|
+
'200': "File",
|
|
782
|
+
'404': "HTTPNotFoundError",
|
|
783
|
+
'422': "HTTPValidationError",
|
|
784
|
+
}
|
|
785
|
+
response_data = await self.api_client.call_api(
|
|
786
|
+
*_param,
|
|
787
|
+
_request_timeout=_request_timeout
|
|
788
|
+
)
|
|
789
|
+
return response_data.response
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
def _read_file_files_id_get_serialize(
|
|
793
|
+
self,
|
|
794
|
+
id,
|
|
795
|
+
_request_auth,
|
|
796
|
+
_content_type,
|
|
797
|
+
_headers,
|
|
798
|
+
_host_index,
|
|
799
|
+
) -> RequestSerialized:
|
|
800
|
+
|
|
801
|
+
_host = None
|
|
802
|
+
|
|
803
|
+
_collection_formats: Dict[str, str] = {
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
_path_params: Dict[str, str] = {}
|
|
807
|
+
_query_params: List[Tuple[str, str]] = []
|
|
808
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
809
|
+
_form_params: List[Tuple[str, str]] = []
|
|
810
|
+
_files: Dict[
|
|
811
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
812
|
+
] = {}
|
|
813
|
+
_body_params: Optional[bytes] = None
|
|
814
|
+
|
|
815
|
+
# process the path parameters
|
|
816
|
+
if id is not None:
|
|
817
|
+
_path_params['id'] = id
|
|
818
|
+
# process the query parameters
|
|
819
|
+
# process the header parameters
|
|
820
|
+
# process the form parameters
|
|
821
|
+
# process the body parameter
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
# set the HTTP header `Accept`
|
|
825
|
+
if 'Accept' not in _header_params:
|
|
826
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
827
|
+
[
|
|
828
|
+
'application/json'
|
|
829
|
+
]
|
|
830
|
+
)
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
# authentication setting
|
|
834
|
+
_auth_settings: List[str] = [
|
|
835
|
+
'user_bearer',
|
|
836
|
+
'backend'
|
|
837
|
+
]
|
|
838
|
+
|
|
839
|
+
return self.api_client.param_serialize(
|
|
840
|
+
method='GET',
|
|
841
|
+
resource_path='/files/{id}',
|
|
842
|
+
path_params=_path_params,
|
|
843
|
+
query_params=_query_params,
|
|
844
|
+
header_params=_header_params,
|
|
845
|
+
body=_body_params,
|
|
846
|
+
post_params=_form_params,
|
|
847
|
+
files=_files,
|
|
848
|
+
auth_settings=_auth_settings,
|
|
849
|
+
collection_formats=_collection_formats,
|
|
850
|
+
_host=_host,
|
|
851
|
+
_request_auth=_request_auth
|
|
852
|
+
)
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
@validate_call
|
|
858
|
+
async def read_files_files_get(
|
|
859
|
+
self,
|
|
860
|
+
id: Optional[StrictInt] = None,
|
|
861
|
+
commit_id: Optional[StrictInt] = None,
|
|
862
|
+
content: Optional[StrictStr] = None,
|
|
863
|
+
language_id: Optional[StrictInt] = None,
|
|
864
|
+
compile_stage: Optional[CompileStage] = None,
|
|
865
|
+
generated: Optional[StrictBool] = None,
|
|
866
|
+
name__isnull: Optional[StrictBool] = None,
|
|
867
|
+
name: Optional[StrictStr] = None,
|
|
868
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
869
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
870
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
871
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
872
|
+
_request_timeout: Union[
|
|
873
|
+
None,
|
|
874
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
875
|
+
Tuple[
|
|
876
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
877
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
878
|
+
]
|
|
879
|
+
] = None,
|
|
880
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
881
|
+
_content_type: Optional[StrictStr] = None,
|
|
882
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
883
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
884
|
+
) -> PageFile:
|
|
885
|
+
"""List files
|
|
886
|
+
|
|
887
|
+
List files.
|
|
888
|
+
|
|
889
|
+
:param id:
|
|
890
|
+
:type id: int
|
|
891
|
+
:param commit_id:
|
|
892
|
+
:type commit_id: int
|
|
893
|
+
:param content:
|
|
894
|
+
:type content: str
|
|
895
|
+
:param language_id:
|
|
896
|
+
:type language_id: int
|
|
897
|
+
:param compile_stage:
|
|
898
|
+
:type compile_stage: CompileStage
|
|
899
|
+
:param generated:
|
|
900
|
+
:type generated: bool
|
|
901
|
+
:param name__isnull:
|
|
902
|
+
:type name__isnull: bool
|
|
903
|
+
:param name:
|
|
904
|
+
:type name: str
|
|
905
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
906
|
+
:type sort_by: str
|
|
907
|
+
:param latest: If True gets the most recently created object.
|
|
908
|
+
:type latest: bool
|
|
909
|
+
:param page: Page number
|
|
910
|
+
:type page: int
|
|
911
|
+
:param size: Page size
|
|
912
|
+
:type size: int
|
|
913
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
914
|
+
number provided, it will be total request
|
|
915
|
+
timeout. It can also be a pair (tuple) of
|
|
916
|
+
(connection, read) timeouts.
|
|
917
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
918
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
919
|
+
request; this effectively ignores the
|
|
920
|
+
authentication in the spec for a single request.
|
|
921
|
+
:type _request_auth: dict, optional
|
|
922
|
+
:param _content_type: force content-type for the request.
|
|
923
|
+
:type _content_type: str, Optional
|
|
924
|
+
:param _headers: set to override the headers for a single
|
|
925
|
+
request; this effectively ignores the headers
|
|
926
|
+
in the spec for a single request.
|
|
927
|
+
:type _headers: dict, optional
|
|
928
|
+
:param _host_index: set to override the host_index for a single
|
|
929
|
+
request; this effectively ignores the host_index
|
|
930
|
+
in the spec for a single request.
|
|
931
|
+
:type _host_index: int, optional
|
|
932
|
+
:return: Returns the result object.
|
|
933
|
+
""" # noqa: E501
|
|
934
|
+
|
|
935
|
+
_param = self._read_files_files_get_serialize(
|
|
936
|
+
id=id,
|
|
937
|
+
commit_id=commit_id,
|
|
938
|
+
content=content,
|
|
939
|
+
language_id=language_id,
|
|
940
|
+
compile_stage=compile_stage,
|
|
941
|
+
generated=generated,
|
|
942
|
+
name__isnull=name__isnull,
|
|
943
|
+
name=name,
|
|
944
|
+
sort_by=sort_by,
|
|
945
|
+
latest=latest,
|
|
946
|
+
page=page,
|
|
947
|
+
size=size,
|
|
948
|
+
_request_auth=_request_auth,
|
|
949
|
+
_content_type=_content_type,
|
|
950
|
+
_headers=_headers,
|
|
951
|
+
_host_index=_host_index
|
|
952
|
+
)
|
|
953
|
+
|
|
954
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
955
|
+
'200': "PageFile",
|
|
956
|
+
'422': "HTTPValidationError",
|
|
957
|
+
}
|
|
958
|
+
response_data = await self.api_client.call_api(
|
|
959
|
+
*_param,
|
|
960
|
+
_request_timeout=_request_timeout
|
|
961
|
+
)
|
|
962
|
+
await response_data.read()
|
|
963
|
+
return self.api_client.response_deserialize(
|
|
964
|
+
response_data=response_data,
|
|
965
|
+
response_types_map=_response_types_map,
|
|
966
|
+
).data
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
@validate_call
|
|
970
|
+
async def read_files_files_get_with_http_info(
|
|
971
|
+
self,
|
|
972
|
+
id: Optional[StrictInt] = None,
|
|
973
|
+
commit_id: Optional[StrictInt] = None,
|
|
974
|
+
content: Optional[StrictStr] = None,
|
|
975
|
+
language_id: Optional[StrictInt] = None,
|
|
976
|
+
compile_stage: Optional[CompileStage] = None,
|
|
977
|
+
generated: Optional[StrictBool] = None,
|
|
978
|
+
name__isnull: Optional[StrictBool] = None,
|
|
979
|
+
name: Optional[StrictStr] = None,
|
|
980
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
981
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
982
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
983
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
984
|
+
_request_timeout: Union[
|
|
985
|
+
None,
|
|
986
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
987
|
+
Tuple[
|
|
988
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
989
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
990
|
+
]
|
|
991
|
+
] = None,
|
|
992
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
993
|
+
_content_type: Optional[StrictStr] = None,
|
|
994
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
995
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
996
|
+
) -> ApiResponse[PageFile]:
|
|
997
|
+
"""List files
|
|
998
|
+
|
|
999
|
+
List files.
|
|
1000
|
+
|
|
1001
|
+
:param id:
|
|
1002
|
+
:type id: int
|
|
1003
|
+
:param commit_id:
|
|
1004
|
+
:type commit_id: int
|
|
1005
|
+
:param content:
|
|
1006
|
+
:type content: str
|
|
1007
|
+
:param language_id:
|
|
1008
|
+
:type language_id: int
|
|
1009
|
+
:param compile_stage:
|
|
1010
|
+
:type compile_stage: CompileStage
|
|
1011
|
+
:param generated:
|
|
1012
|
+
:type generated: bool
|
|
1013
|
+
:param name__isnull:
|
|
1014
|
+
:type name__isnull: bool
|
|
1015
|
+
:param name:
|
|
1016
|
+
:type name: str
|
|
1017
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
1018
|
+
:type sort_by: str
|
|
1019
|
+
:param latest: If True gets the most recently created object.
|
|
1020
|
+
:type latest: bool
|
|
1021
|
+
:param page: Page number
|
|
1022
|
+
:type page: int
|
|
1023
|
+
:param size: Page size
|
|
1024
|
+
:type size: int
|
|
1025
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1026
|
+
number provided, it will be total request
|
|
1027
|
+
timeout. It can also be a pair (tuple) of
|
|
1028
|
+
(connection, read) timeouts.
|
|
1029
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1030
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1031
|
+
request; this effectively ignores the
|
|
1032
|
+
authentication in the spec for a single request.
|
|
1033
|
+
:type _request_auth: dict, optional
|
|
1034
|
+
:param _content_type: force content-type for the request.
|
|
1035
|
+
:type _content_type: str, Optional
|
|
1036
|
+
:param _headers: set to override the headers for a single
|
|
1037
|
+
request; this effectively ignores the headers
|
|
1038
|
+
in the spec for a single request.
|
|
1039
|
+
:type _headers: dict, optional
|
|
1040
|
+
:param _host_index: set to override the host_index for a single
|
|
1041
|
+
request; this effectively ignores the host_index
|
|
1042
|
+
in the spec for a single request.
|
|
1043
|
+
:type _host_index: int, optional
|
|
1044
|
+
:return: Returns the result object.
|
|
1045
|
+
""" # noqa: E501
|
|
1046
|
+
|
|
1047
|
+
_param = self._read_files_files_get_serialize(
|
|
1048
|
+
id=id,
|
|
1049
|
+
commit_id=commit_id,
|
|
1050
|
+
content=content,
|
|
1051
|
+
language_id=language_id,
|
|
1052
|
+
compile_stage=compile_stage,
|
|
1053
|
+
generated=generated,
|
|
1054
|
+
name__isnull=name__isnull,
|
|
1055
|
+
name=name,
|
|
1056
|
+
sort_by=sort_by,
|
|
1057
|
+
latest=latest,
|
|
1058
|
+
page=page,
|
|
1059
|
+
size=size,
|
|
1060
|
+
_request_auth=_request_auth,
|
|
1061
|
+
_content_type=_content_type,
|
|
1062
|
+
_headers=_headers,
|
|
1063
|
+
_host_index=_host_index
|
|
1064
|
+
)
|
|
1065
|
+
|
|
1066
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1067
|
+
'200': "PageFile",
|
|
1068
|
+
'422': "HTTPValidationError",
|
|
1069
|
+
}
|
|
1070
|
+
response_data = await self.api_client.call_api(
|
|
1071
|
+
*_param,
|
|
1072
|
+
_request_timeout=_request_timeout
|
|
1073
|
+
)
|
|
1074
|
+
await response_data.read()
|
|
1075
|
+
return self.api_client.response_deserialize(
|
|
1076
|
+
response_data=response_data,
|
|
1077
|
+
response_types_map=_response_types_map,
|
|
1078
|
+
)
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
@validate_call
|
|
1082
|
+
async def read_files_files_get_without_preload_content(
|
|
1083
|
+
self,
|
|
1084
|
+
id: Optional[StrictInt] = None,
|
|
1085
|
+
commit_id: Optional[StrictInt] = None,
|
|
1086
|
+
content: Optional[StrictStr] = None,
|
|
1087
|
+
language_id: Optional[StrictInt] = None,
|
|
1088
|
+
compile_stage: Optional[CompileStage] = None,
|
|
1089
|
+
generated: Optional[StrictBool] = None,
|
|
1090
|
+
name__isnull: Optional[StrictBool] = None,
|
|
1091
|
+
name: Optional[StrictStr] = None,
|
|
1092
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.")] = None,
|
|
1093
|
+
latest: Annotated[Optional[StrictBool], Field(description="If True gets the most recently created object.")] = None,
|
|
1094
|
+
page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number")] = None,
|
|
1095
|
+
size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size")] = None,
|
|
1096
|
+
_request_timeout: Union[
|
|
1097
|
+
None,
|
|
1098
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1099
|
+
Tuple[
|
|
1100
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1101
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1102
|
+
]
|
|
1103
|
+
] = None,
|
|
1104
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1105
|
+
_content_type: Optional[StrictStr] = None,
|
|
1106
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1107
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1108
|
+
) -> RESTResponseType:
|
|
1109
|
+
"""List files
|
|
1110
|
+
|
|
1111
|
+
List files.
|
|
1112
|
+
|
|
1113
|
+
:param id:
|
|
1114
|
+
:type id: int
|
|
1115
|
+
:param commit_id:
|
|
1116
|
+
:type commit_id: int
|
|
1117
|
+
:param content:
|
|
1118
|
+
:type content: str
|
|
1119
|
+
:param language_id:
|
|
1120
|
+
:type language_id: int
|
|
1121
|
+
:param compile_stage:
|
|
1122
|
+
:type compile_stage: CompileStage
|
|
1123
|
+
:param generated:
|
|
1124
|
+
:type generated: bool
|
|
1125
|
+
:param name__isnull:
|
|
1126
|
+
:type name__isnull: bool
|
|
1127
|
+
:param name:
|
|
1128
|
+
:type name: str
|
|
1129
|
+
:param sort_by: The field name to sort on. Prefix with '-' for descending order. E.g., '-created_on'.
|
|
1130
|
+
:type sort_by: str
|
|
1131
|
+
:param latest: If True gets the most recently created object.
|
|
1132
|
+
:type latest: bool
|
|
1133
|
+
:param page: Page number
|
|
1134
|
+
:type page: int
|
|
1135
|
+
:param size: Page size
|
|
1136
|
+
:type size: int
|
|
1137
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1138
|
+
number provided, it will be total request
|
|
1139
|
+
timeout. It can also be a pair (tuple) of
|
|
1140
|
+
(connection, read) timeouts.
|
|
1141
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1142
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1143
|
+
request; this effectively ignores the
|
|
1144
|
+
authentication in the spec for a single request.
|
|
1145
|
+
:type _request_auth: dict, optional
|
|
1146
|
+
:param _content_type: force content-type for the request.
|
|
1147
|
+
:type _content_type: str, Optional
|
|
1148
|
+
:param _headers: set to override the headers for a single
|
|
1149
|
+
request; this effectively ignores the headers
|
|
1150
|
+
in the spec for a single request.
|
|
1151
|
+
:type _headers: dict, optional
|
|
1152
|
+
:param _host_index: set to override the host_index for a single
|
|
1153
|
+
request; this effectively ignores the host_index
|
|
1154
|
+
in the spec for a single request.
|
|
1155
|
+
:type _host_index: int, optional
|
|
1156
|
+
:return: Returns the result object.
|
|
1157
|
+
""" # noqa: E501
|
|
1158
|
+
|
|
1159
|
+
_param = self._read_files_files_get_serialize(
|
|
1160
|
+
id=id,
|
|
1161
|
+
commit_id=commit_id,
|
|
1162
|
+
content=content,
|
|
1163
|
+
language_id=language_id,
|
|
1164
|
+
compile_stage=compile_stage,
|
|
1165
|
+
generated=generated,
|
|
1166
|
+
name__isnull=name__isnull,
|
|
1167
|
+
name=name,
|
|
1168
|
+
sort_by=sort_by,
|
|
1169
|
+
latest=latest,
|
|
1170
|
+
page=page,
|
|
1171
|
+
size=size,
|
|
1172
|
+
_request_auth=_request_auth,
|
|
1173
|
+
_content_type=_content_type,
|
|
1174
|
+
_headers=_headers,
|
|
1175
|
+
_host_index=_host_index
|
|
1176
|
+
)
|
|
1177
|
+
|
|
1178
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1179
|
+
'200': "PageFile",
|
|
1180
|
+
'422': "HTTPValidationError",
|
|
1181
|
+
}
|
|
1182
|
+
response_data = await self.api_client.call_api(
|
|
1183
|
+
*_param,
|
|
1184
|
+
_request_timeout=_request_timeout
|
|
1185
|
+
)
|
|
1186
|
+
return response_data.response
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
def _read_files_files_get_serialize(
|
|
1190
|
+
self,
|
|
1191
|
+
id,
|
|
1192
|
+
commit_id,
|
|
1193
|
+
content,
|
|
1194
|
+
language_id,
|
|
1195
|
+
compile_stage,
|
|
1196
|
+
generated,
|
|
1197
|
+
name__isnull,
|
|
1198
|
+
name,
|
|
1199
|
+
sort_by,
|
|
1200
|
+
latest,
|
|
1201
|
+
page,
|
|
1202
|
+
size,
|
|
1203
|
+
_request_auth,
|
|
1204
|
+
_content_type,
|
|
1205
|
+
_headers,
|
|
1206
|
+
_host_index,
|
|
1207
|
+
) -> RequestSerialized:
|
|
1208
|
+
|
|
1209
|
+
_host = None
|
|
1210
|
+
|
|
1211
|
+
_collection_formats: Dict[str, str] = {
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
_path_params: Dict[str, str] = {}
|
|
1215
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1216
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1217
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1218
|
+
_files: Dict[
|
|
1219
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1220
|
+
] = {}
|
|
1221
|
+
_body_params: Optional[bytes] = None
|
|
1222
|
+
|
|
1223
|
+
# process the path parameters
|
|
1224
|
+
# process the query parameters
|
|
1225
|
+
if id is not None:
|
|
1226
|
+
|
|
1227
|
+
_query_params.append(('id', id))
|
|
1228
|
+
|
|
1229
|
+
if commit_id is not None:
|
|
1230
|
+
|
|
1231
|
+
_query_params.append(('commit_id', commit_id))
|
|
1232
|
+
|
|
1233
|
+
if content is not None:
|
|
1234
|
+
|
|
1235
|
+
_query_params.append(('content', content))
|
|
1236
|
+
|
|
1237
|
+
if language_id is not None:
|
|
1238
|
+
|
|
1239
|
+
_query_params.append(('language_id', language_id))
|
|
1240
|
+
|
|
1241
|
+
if compile_stage is not None:
|
|
1242
|
+
|
|
1243
|
+
_query_params.append(('compile_stage', compile_stage.value))
|
|
1244
|
+
|
|
1245
|
+
if generated is not None:
|
|
1246
|
+
|
|
1247
|
+
_query_params.append(('generated', generated))
|
|
1248
|
+
|
|
1249
|
+
if name__isnull is not None:
|
|
1250
|
+
|
|
1251
|
+
_query_params.append(('name__isnull', name__isnull))
|
|
1252
|
+
|
|
1253
|
+
if name is not None:
|
|
1254
|
+
|
|
1255
|
+
_query_params.append(('name', name))
|
|
1256
|
+
|
|
1257
|
+
if sort_by is not None:
|
|
1258
|
+
|
|
1259
|
+
_query_params.append(('sort_by', sort_by))
|
|
1260
|
+
|
|
1261
|
+
if latest is not None:
|
|
1262
|
+
|
|
1263
|
+
_query_params.append(('latest', latest))
|
|
1264
|
+
|
|
1265
|
+
if page is not None:
|
|
1266
|
+
|
|
1267
|
+
_query_params.append(('page', page))
|
|
1268
|
+
|
|
1269
|
+
if size is not None:
|
|
1270
|
+
|
|
1271
|
+
_query_params.append(('size', size))
|
|
1272
|
+
|
|
1273
|
+
# process the header parameters
|
|
1274
|
+
# process the form parameters
|
|
1275
|
+
# process the body parameter
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
# set the HTTP header `Accept`
|
|
1279
|
+
if 'Accept' not in _header_params:
|
|
1280
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1281
|
+
[
|
|
1282
|
+
'application/json'
|
|
1283
|
+
]
|
|
1284
|
+
)
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
# authentication setting
|
|
1288
|
+
_auth_settings: List[str] = [
|
|
1289
|
+
'user_bearer'
|
|
1290
|
+
]
|
|
1291
|
+
|
|
1292
|
+
return self.api_client.param_serialize(
|
|
1293
|
+
method='GET',
|
|
1294
|
+
resource_path='/files',
|
|
1295
|
+
path_params=_path_params,
|
|
1296
|
+
query_params=_query_params,
|
|
1297
|
+
header_params=_header_params,
|
|
1298
|
+
body=_body_params,
|
|
1299
|
+
post_params=_form_params,
|
|
1300
|
+
files=_files,
|
|
1301
|
+
auth_settings=_auth_settings,
|
|
1302
|
+
collection_formats=_collection_formats,
|
|
1303
|
+
_host=_host,
|
|
1304
|
+
_request_auth=_request_auth
|
|
1305
|
+
)
|
|
1306
|
+
|
|
1307
|
+
|