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