audithub-sdk 0.1.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.
- audithub_sdk/__init__.py +410 -0
- audithub_sdk/api/__init__.py +22 -0
- audithub_sdk/api/admin_api.py +6117 -0
- audithub_sdk/api/configuration_api.py +520 -0
- audithub_sdk/api/custom_detectors_org_lib_api.py +1461 -0
- audithub_sdk/api/custom_detectors_std_lib_api.py +546 -0
- audithub_sdk/api/editor_languages_api.py +1383 -0
- audithub_sdk/api/generic_api.py +1275 -0
- audithub_sdk/api/hints_org_lib_api.py +2049 -0
- audithub_sdk/api/hints_std_lib_api.py +546 -0
- audithub_sdk/api/issues_api.py +2742 -0
- audithub_sdk/api/organizations_api.py +12148 -0
- audithub_sdk/api/projects_api.py +7069 -0
- audithub_sdk/api/subscriptions_api.py +1490 -0
- audithub_sdk/api/tasks_api.py +4276 -0
- audithub_sdk/api/tools_api.py +2298 -0
- audithub_sdk/api/users_api.py +2657 -0
- audithub_sdk/api/v_specs_org_lib_api.py +1461 -0
- audithub_sdk/api/v_specs_std_lib_api.py +546 -0
- audithub_sdk/api/versions_api.py +5419 -0
- audithub_sdk/api_client.py +808 -0
- audithub_sdk/api_response.py +21 -0
- audithub_sdk/configuration.py +572 -0
- audithub_sdk/exceptions.py +218 -0
- audithub_sdk/models/__init__.py +180 -0
- audithub_sdk/models/accounting_data.py +138 -0
- audithub_sdk/models/active_organization_users.py +120 -0
- audithub_sdk/models/admin_resource_patch.py +94 -0
- audithub_sdk/models/api_blacklisted_hint.py +96 -0
- audithub_sdk/models/api_key.py +89 -0
- audithub_sdk/models/api_key_base.py +87 -0
- audithub_sdk/models/api_key_with_secret.py +91 -0
- audithub_sdk/models/application_function.py +97 -0
- audithub_sdk/models/archive_input.py +104 -0
- audithub_sdk/models/artifact.py +102 -0
- audithub_sdk/models/comment.py +121 -0
- audithub_sdk/models/comment_with_mutations.py +121 -0
- audithub_sdk/models/container_resources.py +93 -0
- audithub_sdk/models/contents_inner.py +136 -0
- audithub_sdk/models/custom_detector.py +101 -0
- audithub_sdk/models/custom_detector_from_organization_library.py +99 -0
- audithub_sdk/models/custom_detector_from_standard_library.py +108 -0
- audithub_sdk/models/custom_detector_from_version.py +99 -0
- audithub_sdk/models/custom_detector_with_id.py +103 -0
- audithub_sdk/models/data.py +134 -0
- audithub_sdk/models/defi_vanguard_v2_input.py +93 -0
- audithub_sdk/models/defi_vanguard_v2_parameters.py +132 -0
- audithub_sdk/models/directory.py +111 -0
- audithub_sdk/models/editor_language.py +99 -0
- audithub_sdk/models/editor_language_with_id.py +101 -0
- audithub_sdk/models/effective_user_access_restriction.py +94 -0
- audithub_sdk/models/env_var.py +89 -0
- audithub_sdk/models/extra_function_arguments.py +107 -0
- audithub_sdk/models/favorite_project_assignment.py +87 -0
- audithub_sdk/models/file.py +101 -0
- audithub_sdk/models/file_thread_subject.py +103 -0
- audithub_sdk/models/finding_action.py +101 -0
- audithub_sdk/models/finding_action_base.py +96 -0
- audithub_sdk/models/finding_reference.py +91 -0
- audithub_sdk/models/finding_thread_subject.py +103 -0
- audithub_sdk/models/fio_data.py +113 -0
- audithub_sdk/models/fork_network_public.py +89 -0
- audithub_sdk/models/fuzzing_blacklist_entry.py +89 -0
- audithub_sdk/models/git_input.py +113 -0
- audithub_sdk/models/hint.py +101 -0
- audithub_sdk/models/hint_ad_hoc.py +113 -0
- audithub_sdk/models/hint_from_organization_library.py +99 -0
- audithub_sdk/models/hint_from_standard_library.py +108 -0
- audithub_sdk/models/hint_from_version.py +99 -0
- audithub_sdk/models/hint_with_id.py +103 -0
- audithub_sdk/models/http_validation_error.py +95 -0
- audithub_sdk/models/id_and_message_response.py +89 -0
- audithub_sdk/models/included_user_info.py +87 -0
- audithub_sdk/models/input_info.py +134 -0
- audithub_sdk/models/invitation.py +128 -0
- audithub_sdk/models/invitation_patch.py +94 -0
- audithub_sdk/models/invited_user.py +101 -0
- audithub_sdk/models/issue.py +138 -0
- audithub_sdk/models/issue_action.py +93 -0
- audithub_sdk/models/issue_batch_announce.py +88 -0
- audithub_sdk/models/issue_complete.py +167 -0
- audithub_sdk/models/issue_configuration_options.py +125 -0
- audithub_sdk/models/issue_details.py +110 -0
- audithub_sdk/models/issue_for_list.py +118 -0
- audithub_sdk/models/issue_impact.py +89 -0
- audithub_sdk/models/issue_info_base_complete.py +126 -0
- audithub_sdk/models/issue_info_editable.py +142 -0
- audithub_sdk/models/issue_likelihood.py +89 -0
- audithub_sdk/models/issue_patch.py +103 -0
- audithub_sdk/models/issue_resolution.py +100 -0
- audithub_sdk/models/issue_severity.py +89 -0
- audithub_sdk/models/issue_state_transition_function.py +110 -0
- audithub_sdk/models/issue_status.py +91 -0
- audithub_sdk/models/issue_status_transition.py +104 -0
- audithub_sdk/models/issue_thread_subject.py +99 -0
- audithub_sdk/models/issue_type.py +91 -0
- audithub_sdk/models/issue_type_info.py +87 -0
- audithub_sdk/models/machine_info.py +109 -0
- audithub_sdk/models/model_tool_input.py +102 -0
- audithub_sdk/models/model_tool_phase_parameters.py +169 -0
- audithub_sdk/models/new_invitation.py +103 -0
- audithub_sdk/models/new_organization.py +101 -0
- audithub_sdk/models/new_organization_package.py +132 -0
- audithub_sdk/models/new_organization_subscription.py +125 -0
- audithub_sdk/models/npm_project_dependency.py +103 -0
- audithub_sdk/models/onboarding_request.py +113 -0
- audithub_sdk/models/or_ca_input.py +134 -0
- audithub_sdk/models/or_ca_parameters.py +149 -0
- audithub_sdk/models/orca_value.py +138 -0
- audithub_sdk/models/organization.py +108 -0
- audithub_sdk/models/organization_access_restriction.py +101 -0
- audithub_sdk/models/organization_active_quota.py +104 -0
- audithub_sdk/models/organization_admin.py +110 -0
- audithub_sdk/models/organization_consumption.py +104 -0
- audithub_sdk/models/organization_quota.py +96 -0
- audithub_sdk/models/organization_subscription.py +135 -0
- audithub_sdk/models/package_data.py +140 -0
- audithub_sdk/models/package_subscription.py +103 -0
- audithub_sdk/models/patch_user.py +108 -0
- audithub_sdk/models/pending_finding_actions.py +99 -0
- audithub_sdk/models/picus_input.py +93 -0
- audithub_sdk/models/picus_parameters.py +111 -0
- audithub_sdk/models/picus_v2_input.py +93 -0
- audithub_sdk/models/picus_v2_parameters.py +195 -0
- audithub_sdk/models/project.py +200 -0
- audithub_sdk/models/project_admin.py +206 -0
- audithub_sdk/models/project_data.py +97 -0
- audithub_sdk/models/project_dependency.py +103 -0
- audithub_sdk/models/project_git_hub_link.py +87 -0
- audithub_sdk/models/project_info_input.py +186 -0
- audithub_sdk/models/project_info_output.py +186 -0
- audithub_sdk/models/project_thread_subject.py +97 -0
- audithub_sdk/models/project_update_response.py +93 -0
- audithub_sdk/models/psa.py +96 -0
- audithub_sdk/models/psa_message.py +94 -0
- audithub_sdk/models/public_configuration.py +216 -0
- audithub_sdk/models/put_user.py +91 -0
- audithub_sdk/models/registered_user.py +94 -0
- audithub_sdk/models/resource_patch.py +94 -0
- audithub_sdk/models/resources.py +87 -0
- audithub_sdk/models/root_model_list_union_custom_detector_from_version_custom_detector_from_standard_library_custom_detector_from_organization_library_inner.py +149 -0
- audithub_sdk/models/root_model_list_union_hint_from_version_hint_from_standard_library_hint_from_organization_library_hint_ad_hoc_inner.py +164 -0
- audithub_sdk/models/root_model_list_union_v_spec_from_version_v_spec_from_standard_library_v_spec_from_organization_library_v_spec_ad_hoc_inner.py +164 -0
- audithub_sdk/models/security_tool.py +89 -0
- audithub_sdk/models/self_onboard_request.py +94 -0
- audithub_sdk/models/source_reference.py +103 -0
- audithub_sdk/models/step_definition.py +91 -0
- audithub_sdk/models/step_resources.py +103 -0
- audithub_sdk/models/subject.py +168 -0
- audithub_sdk/models/success_and_message_response.py +93 -0
- audithub_sdk/models/task.py +184 -0
- audithub_sdk/models/task_admin.py +144 -0
- audithub_sdk/models/task_creation.py +89 -0
- audithub_sdk/models/task_fio_data.py +97 -0
- audithub_sdk/models/task_patch.py +94 -0
- audithub_sdk/models/task_resources.py +103 -0
- audithub_sdk/models/task_status.py +94 -0
- audithub_sdk/models/task_step.py +145 -0
- audithub_sdk/models/temp_version.py +93 -0
- audithub_sdk/models/thread.py +146 -0
- audithub_sdk/models/thread_comment.py +87 -0
- audithub_sdk/models/thread_patch.py +101 -0
- audithub_sdk/models/user.py +106 -0
- audithub_sdk/models/user_access_restriction.py +108 -0
- audithub_sdk/models/user_for_admin.py +108 -0
- audithub_sdk/models/user_group.py +89 -0
- audithub_sdk/models/user_information.py +89 -0
- audithub_sdk/models/user_organization_setting.py +89 -0
- audithub_sdk/models/user_patch.py +103 -0
- audithub_sdk/models/user_project_setting.py +89 -0
- audithub_sdk/models/user_thread_setting.py +89 -0
- audithub_sdk/models/user_to_organization_assignment.py +87 -0
- audithub_sdk/models/v_spec.py +101 -0
- audithub_sdk/models/v_spec_ad_hoc.py +113 -0
- audithub_sdk/models/v_spec_from_organization_library.py +99 -0
- audithub_sdk/models/v_spec_from_standard_library.py +108 -0
- audithub_sdk/models/v_spec_from_version.py +99 -0
- audithub_sdk/models/v_spec_with_id.py +103 -0
- audithub_sdk/models/validation_error.py +108 -0
- audithub_sdk/models/vanguard_detector.py +91 -0
- audithub_sdk/models/version.py +134 -0
- audithub_sdk/models/version_admin.py +142 -0
- audithub_sdk/models/version_data.py +103 -0
- audithub_sdk/models/version_patch.py +120 -0
- audithub_sdk/models/version_resources.py +103 -0
- audithub_sdk/models/zk_vanguard_input.py +93 -0
- audithub_sdk/models/zk_vanguard_parameters.py +108 -0
- audithub_sdk/models/zk_vanguard_v2_input.py +93 -0
- audithub_sdk/models/zk_vanguard_v2_parameters.py +108 -0
- audithub_sdk/py.typed +0 -0
- audithub_sdk/rest.py +199 -0
- audithub_sdk-0.1.0.dist-info/METADATA +129 -0
- audithub_sdk-0.1.0.dist-info/RECORD +197 -0
- audithub_sdk-0.1.0.dist-info/WHEEL +5 -0
- audithub_sdk-0.1.0.dist-info/top_level.txt +2 -0
- audithub_sdk_ext/__init__.py +11 -0
- audithub_sdk_ext/auth.py +207 -0
|
@@ -0,0 +1,1383 @@
|
|
|
1
|
+
"""
|
|
2
|
+
FastAPI
|
|
3
|
+
|
|
4
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
8
|
+
|
|
9
|
+
Do not edit the class manually.
|
|
10
|
+
""" # noqa: E501
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from pydantic import StrictInt
|
|
19
|
+
from typing import List
|
|
20
|
+
from audithub_sdk.models.editor_language import EditorLanguage
|
|
21
|
+
from audithub_sdk.models.editor_language_with_id import EditorLanguageWithId
|
|
22
|
+
from audithub_sdk.models.id_and_message_response import IdAndMessageResponse
|
|
23
|
+
from audithub_sdk.models.success_and_message_response import SuccessAndMessageResponse
|
|
24
|
+
|
|
25
|
+
from audithub_sdk.api_client import ApiClient, RequestSerialized
|
|
26
|
+
from audithub_sdk.api_response import ApiResponse
|
|
27
|
+
from audithub_sdk.rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class EditorLanguagesApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@validate_call
|
|
44
|
+
async def delete_language_editor_languages_language_id_delete(
|
|
45
|
+
self,
|
|
46
|
+
language_id: StrictInt,
|
|
47
|
+
_request_timeout: Union[
|
|
48
|
+
None,
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Tuple[
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
|
+
) -> SuccessAndMessageResponse:
|
|
60
|
+
"""Delete Language
|
|
61
|
+
|
|
62
|
+
Permanently delete a language
|
|
63
|
+
|
|
64
|
+
:param language_id: (required)
|
|
65
|
+
:type language_id: int
|
|
66
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
67
|
+
number provided, it will be total request
|
|
68
|
+
timeout. It can also be a pair (tuple) of
|
|
69
|
+
(connection, read) timeouts.
|
|
70
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
71
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
72
|
+
request; this effectively ignores the
|
|
73
|
+
authentication in the spec for a single request.
|
|
74
|
+
:type _request_auth: dict, optional
|
|
75
|
+
:param _content_type: force content-type for the request.
|
|
76
|
+
:type _content_type: str, Optional
|
|
77
|
+
:param _headers: set to override the headers for a single
|
|
78
|
+
request; this effectively ignores the headers
|
|
79
|
+
in the spec for a single request.
|
|
80
|
+
:type _headers: dict, optional
|
|
81
|
+
:param _host_index: set to override the host_index for a single
|
|
82
|
+
request; this effectively ignores the host_index
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _host_index: int, optional
|
|
85
|
+
:return: Returns the result object.
|
|
86
|
+
""" # noqa: E501
|
|
87
|
+
|
|
88
|
+
_param = self._delete_language_editor_languages_language_id_delete_serialize(
|
|
89
|
+
language_id=language_id,
|
|
90
|
+
_request_auth=_request_auth,
|
|
91
|
+
_content_type=_content_type,
|
|
92
|
+
_headers=_headers,
|
|
93
|
+
_host_index=_host_index
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
97
|
+
'200': "SuccessAndMessageResponse",
|
|
98
|
+
'422': "HTTPValidationError",
|
|
99
|
+
}
|
|
100
|
+
response_data = await self.api_client.call_api(
|
|
101
|
+
*_param,
|
|
102
|
+
_request_timeout=_request_timeout
|
|
103
|
+
)
|
|
104
|
+
await response_data.read()
|
|
105
|
+
return self.api_client.response_deserialize(
|
|
106
|
+
response_data=response_data,
|
|
107
|
+
response_types_map=_response_types_map,
|
|
108
|
+
).data
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
@validate_call
|
|
112
|
+
async def delete_language_editor_languages_language_id_delete_with_http_info(
|
|
113
|
+
self,
|
|
114
|
+
language_id: StrictInt,
|
|
115
|
+
_request_timeout: Union[
|
|
116
|
+
None,
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
+
Tuple[
|
|
119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
121
|
+
]
|
|
122
|
+
] = None,
|
|
123
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
+
_content_type: Optional[StrictStr] = None,
|
|
125
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
126
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
127
|
+
) -> ApiResponse[SuccessAndMessageResponse]:
|
|
128
|
+
"""Delete Language
|
|
129
|
+
|
|
130
|
+
Permanently delete a language
|
|
131
|
+
|
|
132
|
+
:param language_id: (required)
|
|
133
|
+
:type language_id: int
|
|
134
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
135
|
+
number provided, it will be total request
|
|
136
|
+
timeout. It can also be a pair (tuple) of
|
|
137
|
+
(connection, read) timeouts.
|
|
138
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
139
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
140
|
+
request; this effectively ignores the
|
|
141
|
+
authentication in the spec for a single request.
|
|
142
|
+
:type _request_auth: dict, optional
|
|
143
|
+
:param _content_type: force content-type for the request.
|
|
144
|
+
:type _content_type: str, Optional
|
|
145
|
+
:param _headers: set to override the headers for a single
|
|
146
|
+
request; this effectively ignores the headers
|
|
147
|
+
in the spec for a single request.
|
|
148
|
+
:type _headers: dict, optional
|
|
149
|
+
:param _host_index: set to override the host_index for a single
|
|
150
|
+
request; this effectively ignores the host_index
|
|
151
|
+
in the spec for a single request.
|
|
152
|
+
:type _host_index: int, optional
|
|
153
|
+
:return: Returns the result object.
|
|
154
|
+
""" # noqa: E501
|
|
155
|
+
|
|
156
|
+
_param = self._delete_language_editor_languages_language_id_delete_serialize(
|
|
157
|
+
language_id=language_id,
|
|
158
|
+
_request_auth=_request_auth,
|
|
159
|
+
_content_type=_content_type,
|
|
160
|
+
_headers=_headers,
|
|
161
|
+
_host_index=_host_index
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
165
|
+
'200': "SuccessAndMessageResponse",
|
|
166
|
+
'422': "HTTPValidationError",
|
|
167
|
+
}
|
|
168
|
+
response_data = await self.api_client.call_api(
|
|
169
|
+
*_param,
|
|
170
|
+
_request_timeout=_request_timeout
|
|
171
|
+
)
|
|
172
|
+
await response_data.read()
|
|
173
|
+
return self.api_client.response_deserialize(
|
|
174
|
+
response_data=response_data,
|
|
175
|
+
response_types_map=_response_types_map,
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
@validate_call
|
|
180
|
+
async def delete_language_editor_languages_language_id_delete_without_preload_content(
|
|
181
|
+
self,
|
|
182
|
+
language_id: StrictInt,
|
|
183
|
+
_request_timeout: Union[
|
|
184
|
+
None,
|
|
185
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
186
|
+
Tuple[
|
|
187
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
188
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
189
|
+
]
|
|
190
|
+
] = None,
|
|
191
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
192
|
+
_content_type: Optional[StrictStr] = None,
|
|
193
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
194
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
195
|
+
) -> RESTResponseType:
|
|
196
|
+
"""Delete Language
|
|
197
|
+
|
|
198
|
+
Permanently delete a language
|
|
199
|
+
|
|
200
|
+
:param language_id: (required)
|
|
201
|
+
:type language_id: int
|
|
202
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
203
|
+
number provided, it will be total request
|
|
204
|
+
timeout. It can also be a pair (tuple) of
|
|
205
|
+
(connection, read) timeouts.
|
|
206
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
207
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
208
|
+
request; this effectively ignores the
|
|
209
|
+
authentication in the spec for a single request.
|
|
210
|
+
:type _request_auth: dict, optional
|
|
211
|
+
:param _content_type: force content-type for the request.
|
|
212
|
+
:type _content_type: str, Optional
|
|
213
|
+
:param _headers: set to override the headers for a single
|
|
214
|
+
request; this effectively ignores the headers
|
|
215
|
+
in the spec for a single request.
|
|
216
|
+
:type _headers: dict, optional
|
|
217
|
+
:param _host_index: set to override the host_index for a single
|
|
218
|
+
request; this effectively ignores the host_index
|
|
219
|
+
in the spec for a single request.
|
|
220
|
+
:type _host_index: int, optional
|
|
221
|
+
:return: Returns the result object.
|
|
222
|
+
""" # noqa: E501
|
|
223
|
+
|
|
224
|
+
_param = self._delete_language_editor_languages_language_id_delete_serialize(
|
|
225
|
+
language_id=language_id,
|
|
226
|
+
_request_auth=_request_auth,
|
|
227
|
+
_content_type=_content_type,
|
|
228
|
+
_headers=_headers,
|
|
229
|
+
_host_index=_host_index
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
233
|
+
'200': "SuccessAndMessageResponse",
|
|
234
|
+
'422': "HTTPValidationError",
|
|
235
|
+
}
|
|
236
|
+
response_data = await self.api_client.call_api(
|
|
237
|
+
*_param,
|
|
238
|
+
_request_timeout=_request_timeout
|
|
239
|
+
)
|
|
240
|
+
return response_data.response
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def _delete_language_editor_languages_language_id_delete_serialize(
|
|
244
|
+
self,
|
|
245
|
+
language_id,
|
|
246
|
+
_request_auth,
|
|
247
|
+
_content_type,
|
|
248
|
+
_headers,
|
|
249
|
+
_host_index,
|
|
250
|
+
) -> RequestSerialized:
|
|
251
|
+
|
|
252
|
+
_host = None
|
|
253
|
+
|
|
254
|
+
_collection_formats: Dict[str, str] = {
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
_path_params: Dict[str, str] = {}
|
|
258
|
+
_query_params: List[Tuple[str, str]] = []
|
|
259
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
260
|
+
_form_params: List[Tuple[str, str]] = []
|
|
261
|
+
_files: Dict[
|
|
262
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
263
|
+
] = {}
|
|
264
|
+
_body_params: Optional[bytes] = None
|
|
265
|
+
|
|
266
|
+
# process the path parameters
|
|
267
|
+
if language_id is not None:
|
|
268
|
+
_path_params['language_id'] = language_id
|
|
269
|
+
# process the query parameters
|
|
270
|
+
# process the header parameters
|
|
271
|
+
# process the form parameters
|
|
272
|
+
# process the body parameter
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
# set the HTTP header `Accept`
|
|
276
|
+
if 'Accept' not in _header_params:
|
|
277
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
278
|
+
[
|
|
279
|
+
'application/json'
|
|
280
|
+
]
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
# authentication setting
|
|
285
|
+
_auth_settings: List[str] = [
|
|
286
|
+
'OpenIdConnect'
|
|
287
|
+
]
|
|
288
|
+
|
|
289
|
+
return self.api_client.param_serialize(
|
|
290
|
+
method='DELETE',
|
|
291
|
+
resource_path='/editor-languages/{language_id}',
|
|
292
|
+
path_params=_path_params,
|
|
293
|
+
query_params=_query_params,
|
|
294
|
+
header_params=_header_params,
|
|
295
|
+
body=_body_params,
|
|
296
|
+
post_params=_form_params,
|
|
297
|
+
files=_files,
|
|
298
|
+
auth_settings=_auth_settings,
|
|
299
|
+
collection_formats=_collection_formats,
|
|
300
|
+
_host=_host,
|
|
301
|
+
_request_auth=_request_auth
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
@validate_call
|
|
308
|
+
async def get_language_editor_languages_language_id_get(
|
|
309
|
+
self,
|
|
310
|
+
language_id: StrictInt,
|
|
311
|
+
_request_timeout: Union[
|
|
312
|
+
None,
|
|
313
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
314
|
+
Tuple[
|
|
315
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
316
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
317
|
+
]
|
|
318
|
+
] = None,
|
|
319
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
320
|
+
_content_type: Optional[StrictStr] = None,
|
|
321
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
322
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
323
|
+
) -> EditorLanguageWithId:
|
|
324
|
+
"""Get Language
|
|
325
|
+
|
|
326
|
+
Returns language by id
|
|
327
|
+
|
|
328
|
+
:param language_id: (required)
|
|
329
|
+
:type language_id: int
|
|
330
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
331
|
+
number provided, it will be total request
|
|
332
|
+
timeout. It can also be a pair (tuple) of
|
|
333
|
+
(connection, read) timeouts.
|
|
334
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
335
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
336
|
+
request; this effectively ignores the
|
|
337
|
+
authentication in the spec for a single request.
|
|
338
|
+
:type _request_auth: dict, optional
|
|
339
|
+
:param _content_type: force content-type for the request.
|
|
340
|
+
:type _content_type: str, Optional
|
|
341
|
+
:param _headers: set to override the headers for a single
|
|
342
|
+
request; this effectively ignores the headers
|
|
343
|
+
in the spec for a single request.
|
|
344
|
+
:type _headers: dict, optional
|
|
345
|
+
:param _host_index: set to override the host_index for a single
|
|
346
|
+
request; this effectively ignores the host_index
|
|
347
|
+
in the spec for a single request.
|
|
348
|
+
:type _host_index: int, optional
|
|
349
|
+
:return: Returns the result object.
|
|
350
|
+
""" # noqa: E501
|
|
351
|
+
|
|
352
|
+
_param = self._get_language_editor_languages_language_id_get_serialize(
|
|
353
|
+
language_id=language_id,
|
|
354
|
+
_request_auth=_request_auth,
|
|
355
|
+
_content_type=_content_type,
|
|
356
|
+
_headers=_headers,
|
|
357
|
+
_host_index=_host_index
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
361
|
+
'200': "EditorLanguageWithId",
|
|
362
|
+
'422': "HTTPValidationError",
|
|
363
|
+
}
|
|
364
|
+
response_data = await self.api_client.call_api(
|
|
365
|
+
*_param,
|
|
366
|
+
_request_timeout=_request_timeout
|
|
367
|
+
)
|
|
368
|
+
await response_data.read()
|
|
369
|
+
return self.api_client.response_deserialize(
|
|
370
|
+
response_data=response_data,
|
|
371
|
+
response_types_map=_response_types_map,
|
|
372
|
+
).data
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
@validate_call
|
|
376
|
+
async def get_language_editor_languages_language_id_get_with_http_info(
|
|
377
|
+
self,
|
|
378
|
+
language_id: StrictInt,
|
|
379
|
+
_request_timeout: Union[
|
|
380
|
+
None,
|
|
381
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
382
|
+
Tuple[
|
|
383
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
384
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
385
|
+
]
|
|
386
|
+
] = None,
|
|
387
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
388
|
+
_content_type: Optional[StrictStr] = None,
|
|
389
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
390
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
391
|
+
) -> ApiResponse[EditorLanguageWithId]:
|
|
392
|
+
"""Get Language
|
|
393
|
+
|
|
394
|
+
Returns language by id
|
|
395
|
+
|
|
396
|
+
:param language_id: (required)
|
|
397
|
+
:type language_id: int
|
|
398
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
399
|
+
number provided, it will be total request
|
|
400
|
+
timeout. It can also be a pair (tuple) of
|
|
401
|
+
(connection, read) timeouts.
|
|
402
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
403
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
404
|
+
request; this effectively ignores the
|
|
405
|
+
authentication in the spec for a single request.
|
|
406
|
+
:type _request_auth: dict, optional
|
|
407
|
+
:param _content_type: force content-type for the request.
|
|
408
|
+
:type _content_type: str, Optional
|
|
409
|
+
:param _headers: set to override the headers for a single
|
|
410
|
+
request; this effectively ignores the headers
|
|
411
|
+
in the spec for a single request.
|
|
412
|
+
:type _headers: dict, optional
|
|
413
|
+
:param _host_index: set to override the host_index for a single
|
|
414
|
+
request; this effectively ignores the host_index
|
|
415
|
+
in the spec for a single request.
|
|
416
|
+
:type _host_index: int, optional
|
|
417
|
+
:return: Returns the result object.
|
|
418
|
+
""" # noqa: E501
|
|
419
|
+
|
|
420
|
+
_param = self._get_language_editor_languages_language_id_get_serialize(
|
|
421
|
+
language_id=language_id,
|
|
422
|
+
_request_auth=_request_auth,
|
|
423
|
+
_content_type=_content_type,
|
|
424
|
+
_headers=_headers,
|
|
425
|
+
_host_index=_host_index
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
429
|
+
'200': "EditorLanguageWithId",
|
|
430
|
+
'422': "HTTPValidationError",
|
|
431
|
+
}
|
|
432
|
+
response_data = await self.api_client.call_api(
|
|
433
|
+
*_param,
|
|
434
|
+
_request_timeout=_request_timeout
|
|
435
|
+
)
|
|
436
|
+
await response_data.read()
|
|
437
|
+
return self.api_client.response_deserialize(
|
|
438
|
+
response_data=response_data,
|
|
439
|
+
response_types_map=_response_types_map,
|
|
440
|
+
)
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
@validate_call
|
|
444
|
+
async def get_language_editor_languages_language_id_get_without_preload_content(
|
|
445
|
+
self,
|
|
446
|
+
language_id: StrictInt,
|
|
447
|
+
_request_timeout: Union[
|
|
448
|
+
None,
|
|
449
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
450
|
+
Tuple[
|
|
451
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
452
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
453
|
+
]
|
|
454
|
+
] = None,
|
|
455
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
456
|
+
_content_type: Optional[StrictStr] = None,
|
|
457
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
458
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
459
|
+
) -> RESTResponseType:
|
|
460
|
+
"""Get Language
|
|
461
|
+
|
|
462
|
+
Returns language by id
|
|
463
|
+
|
|
464
|
+
:param language_id: (required)
|
|
465
|
+
:type language_id: int
|
|
466
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
467
|
+
number provided, it will be total request
|
|
468
|
+
timeout. It can also be a pair (tuple) of
|
|
469
|
+
(connection, read) timeouts.
|
|
470
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
471
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
472
|
+
request; this effectively ignores the
|
|
473
|
+
authentication in the spec for a single request.
|
|
474
|
+
:type _request_auth: dict, optional
|
|
475
|
+
:param _content_type: force content-type for the request.
|
|
476
|
+
:type _content_type: str, Optional
|
|
477
|
+
:param _headers: set to override the headers for a single
|
|
478
|
+
request; this effectively ignores the headers
|
|
479
|
+
in the spec for a single request.
|
|
480
|
+
:type _headers: dict, optional
|
|
481
|
+
:param _host_index: set to override the host_index for a single
|
|
482
|
+
request; this effectively ignores the host_index
|
|
483
|
+
in the spec for a single request.
|
|
484
|
+
:type _host_index: int, optional
|
|
485
|
+
:return: Returns the result object.
|
|
486
|
+
""" # noqa: E501
|
|
487
|
+
|
|
488
|
+
_param = self._get_language_editor_languages_language_id_get_serialize(
|
|
489
|
+
language_id=language_id,
|
|
490
|
+
_request_auth=_request_auth,
|
|
491
|
+
_content_type=_content_type,
|
|
492
|
+
_headers=_headers,
|
|
493
|
+
_host_index=_host_index
|
|
494
|
+
)
|
|
495
|
+
|
|
496
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
497
|
+
'200': "EditorLanguageWithId",
|
|
498
|
+
'422': "HTTPValidationError",
|
|
499
|
+
}
|
|
500
|
+
response_data = await self.api_client.call_api(
|
|
501
|
+
*_param,
|
|
502
|
+
_request_timeout=_request_timeout
|
|
503
|
+
)
|
|
504
|
+
return response_data.response
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
def _get_language_editor_languages_language_id_get_serialize(
|
|
508
|
+
self,
|
|
509
|
+
language_id,
|
|
510
|
+
_request_auth,
|
|
511
|
+
_content_type,
|
|
512
|
+
_headers,
|
|
513
|
+
_host_index,
|
|
514
|
+
) -> RequestSerialized:
|
|
515
|
+
|
|
516
|
+
_host = None
|
|
517
|
+
|
|
518
|
+
_collection_formats: Dict[str, str] = {
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
_path_params: Dict[str, str] = {}
|
|
522
|
+
_query_params: List[Tuple[str, str]] = []
|
|
523
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
524
|
+
_form_params: List[Tuple[str, str]] = []
|
|
525
|
+
_files: Dict[
|
|
526
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
527
|
+
] = {}
|
|
528
|
+
_body_params: Optional[bytes] = None
|
|
529
|
+
|
|
530
|
+
# process the path parameters
|
|
531
|
+
if language_id is not None:
|
|
532
|
+
_path_params['language_id'] = language_id
|
|
533
|
+
# process the query parameters
|
|
534
|
+
# process the header parameters
|
|
535
|
+
# process the form parameters
|
|
536
|
+
# process the body parameter
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
# set the HTTP header `Accept`
|
|
540
|
+
if 'Accept' not in _header_params:
|
|
541
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
542
|
+
[
|
|
543
|
+
'application/json'
|
|
544
|
+
]
|
|
545
|
+
)
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
# authentication setting
|
|
549
|
+
_auth_settings: List[str] = [
|
|
550
|
+
'OpenIdConnect'
|
|
551
|
+
]
|
|
552
|
+
|
|
553
|
+
return self.api_client.param_serialize(
|
|
554
|
+
method='GET',
|
|
555
|
+
resource_path='/editor-languages/{language_id}',
|
|
556
|
+
path_params=_path_params,
|
|
557
|
+
query_params=_query_params,
|
|
558
|
+
header_params=_header_params,
|
|
559
|
+
body=_body_params,
|
|
560
|
+
post_params=_form_params,
|
|
561
|
+
files=_files,
|
|
562
|
+
auth_settings=_auth_settings,
|
|
563
|
+
collection_formats=_collection_formats,
|
|
564
|
+
_host=_host,
|
|
565
|
+
_request_auth=_request_auth
|
|
566
|
+
)
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
@validate_call
|
|
572
|
+
async def get_languages_editor_languages_get(
|
|
573
|
+
self,
|
|
574
|
+
_request_timeout: Union[
|
|
575
|
+
None,
|
|
576
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
577
|
+
Tuple[
|
|
578
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
579
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
580
|
+
]
|
|
581
|
+
] = None,
|
|
582
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
583
|
+
_content_type: Optional[StrictStr] = None,
|
|
584
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
585
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
586
|
+
) -> List[EditorLanguageWithId]:
|
|
587
|
+
"""Get Languages
|
|
588
|
+
|
|
589
|
+
Returns all languages
|
|
590
|
+
|
|
591
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
592
|
+
number provided, it will be total request
|
|
593
|
+
timeout. It can also be a pair (tuple) of
|
|
594
|
+
(connection, read) timeouts.
|
|
595
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
596
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
597
|
+
request; this effectively ignores the
|
|
598
|
+
authentication in the spec for a single request.
|
|
599
|
+
:type _request_auth: dict, optional
|
|
600
|
+
:param _content_type: force content-type for the request.
|
|
601
|
+
:type _content_type: str, Optional
|
|
602
|
+
:param _headers: set to override the headers for a single
|
|
603
|
+
request; this effectively ignores the headers
|
|
604
|
+
in the spec for a single request.
|
|
605
|
+
:type _headers: dict, optional
|
|
606
|
+
:param _host_index: set to override the host_index for a single
|
|
607
|
+
request; this effectively ignores the host_index
|
|
608
|
+
in the spec for a single request.
|
|
609
|
+
:type _host_index: int, optional
|
|
610
|
+
:return: Returns the result object.
|
|
611
|
+
""" # noqa: E501
|
|
612
|
+
|
|
613
|
+
_param = self._get_languages_editor_languages_get_serialize(
|
|
614
|
+
_request_auth=_request_auth,
|
|
615
|
+
_content_type=_content_type,
|
|
616
|
+
_headers=_headers,
|
|
617
|
+
_host_index=_host_index
|
|
618
|
+
)
|
|
619
|
+
|
|
620
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
621
|
+
'200': "List[EditorLanguageWithId]",
|
|
622
|
+
}
|
|
623
|
+
response_data = await self.api_client.call_api(
|
|
624
|
+
*_param,
|
|
625
|
+
_request_timeout=_request_timeout
|
|
626
|
+
)
|
|
627
|
+
await response_data.read()
|
|
628
|
+
return self.api_client.response_deserialize(
|
|
629
|
+
response_data=response_data,
|
|
630
|
+
response_types_map=_response_types_map,
|
|
631
|
+
).data
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
@validate_call
|
|
635
|
+
async def get_languages_editor_languages_get_with_http_info(
|
|
636
|
+
self,
|
|
637
|
+
_request_timeout: Union[
|
|
638
|
+
None,
|
|
639
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
640
|
+
Tuple[
|
|
641
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
642
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
643
|
+
]
|
|
644
|
+
] = None,
|
|
645
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
646
|
+
_content_type: Optional[StrictStr] = None,
|
|
647
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
648
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
649
|
+
) -> ApiResponse[List[EditorLanguageWithId]]:
|
|
650
|
+
"""Get Languages
|
|
651
|
+
|
|
652
|
+
Returns all languages
|
|
653
|
+
|
|
654
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
655
|
+
number provided, it will be total request
|
|
656
|
+
timeout. It can also be a pair (tuple) of
|
|
657
|
+
(connection, read) timeouts.
|
|
658
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
659
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
660
|
+
request; this effectively ignores the
|
|
661
|
+
authentication in the spec for a single request.
|
|
662
|
+
:type _request_auth: dict, optional
|
|
663
|
+
:param _content_type: force content-type for the request.
|
|
664
|
+
:type _content_type: str, Optional
|
|
665
|
+
:param _headers: set to override the headers for a single
|
|
666
|
+
request; this effectively ignores the headers
|
|
667
|
+
in the spec for a single request.
|
|
668
|
+
:type _headers: dict, optional
|
|
669
|
+
:param _host_index: set to override the host_index for a single
|
|
670
|
+
request; this effectively ignores the host_index
|
|
671
|
+
in the spec for a single request.
|
|
672
|
+
:type _host_index: int, optional
|
|
673
|
+
:return: Returns the result object.
|
|
674
|
+
""" # noqa: E501
|
|
675
|
+
|
|
676
|
+
_param = self._get_languages_editor_languages_get_serialize(
|
|
677
|
+
_request_auth=_request_auth,
|
|
678
|
+
_content_type=_content_type,
|
|
679
|
+
_headers=_headers,
|
|
680
|
+
_host_index=_host_index
|
|
681
|
+
)
|
|
682
|
+
|
|
683
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
684
|
+
'200': "List[EditorLanguageWithId]",
|
|
685
|
+
}
|
|
686
|
+
response_data = await self.api_client.call_api(
|
|
687
|
+
*_param,
|
|
688
|
+
_request_timeout=_request_timeout
|
|
689
|
+
)
|
|
690
|
+
await response_data.read()
|
|
691
|
+
return self.api_client.response_deserialize(
|
|
692
|
+
response_data=response_data,
|
|
693
|
+
response_types_map=_response_types_map,
|
|
694
|
+
)
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
@validate_call
|
|
698
|
+
async def get_languages_editor_languages_get_without_preload_content(
|
|
699
|
+
self,
|
|
700
|
+
_request_timeout: Union[
|
|
701
|
+
None,
|
|
702
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
703
|
+
Tuple[
|
|
704
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
705
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
706
|
+
]
|
|
707
|
+
] = None,
|
|
708
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
709
|
+
_content_type: Optional[StrictStr] = None,
|
|
710
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
711
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
712
|
+
) -> RESTResponseType:
|
|
713
|
+
"""Get Languages
|
|
714
|
+
|
|
715
|
+
Returns all languages
|
|
716
|
+
|
|
717
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
718
|
+
number provided, it will be total request
|
|
719
|
+
timeout. It can also be a pair (tuple) of
|
|
720
|
+
(connection, read) timeouts.
|
|
721
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
722
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
723
|
+
request; this effectively ignores the
|
|
724
|
+
authentication in the spec for a single request.
|
|
725
|
+
:type _request_auth: dict, optional
|
|
726
|
+
:param _content_type: force content-type for the request.
|
|
727
|
+
:type _content_type: str, Optional
|
|
728
|
+
:param _headers: set to override the headers for a single
|
|
729
|
+
request; this effectively ignores the headers
|
|
730
|
+
in the spec for a single request.
|
|
731
|
+
:type _headers: dict, optional
|
|
732
|
+
:param _host_index: set to override the host_index for a single
|
|
733
|
+
request; this effectively ignores the host_index
|
|
734
|
+
in the spec for a single request.
|
|
735
|
+
:type _host_index: int, optional
|
|
736
|
+
:return: Returns the result object.
|
|
737
|
+
""" # noqa: E501
|
|
738
|
+
|
|
739
|
+
_param = self._get_languages_editor_languages_get_serialize(
|
|
740
|
+
_request_auth=_request_auth,
|
|
741
|
+
_content_type=_content_type,
|
|
742
|
+
_headers=_headers,
|
|
743
|
+
_host_index=_host_index
|
|
744
|
+
)
|
|
745
|
+
|
|
746
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
747
|
+
'200': "List[EditorLanguageWithId]",
|
|
748
|
+
}
|
|
749
|
+
response_data = await self.api_client.call_api(
|
|
750
|
+
*_param,
|
|
751
|
+
_request_timeout=_request_timeout
|
|
752
|
+
)
|
|
753
|
+
return response_data.response
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
def _get_languages_editor_languages_get_serialize(
|
|
757
|
+
self,
|
|
758
|
+
_request_auth,
|
|
759
|
+
_content_type,
|
|
760
|
+
_headers,
|
|
761
|
+
_host_index,
|
|
762
|
+
) -> RequestSerialized:
|
|
763
|
+
|
|
764
|
+
_host = None
|
|
765
|
+
|
|
766
|
+
_collection_formats: Dict[str, str] = {
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
_path_params: Dict[str, str] = {}
|
|
770
|
+
_query_params: List[Tuple[str, str]] = []
|
|
771
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
772
|
+
_form_params: List[Tuple[str, str]] = []
|
|
773
|
+
_files: Dict[
|
|
774
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
775
|
+
] = {}
|
|
776
|
+
_body_params: Optional[bytes] = None
|
|
777
|
+
|
|
778
|
+
# process the path parameters
|
|
779
|
+
# process the query parameters
|
|
780
|
+
# process the header parameters
|
|
781
|
+
# process the form parameters
|
|
782
|
+
# process the body parameter
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
# set the HTTP header `Accept`
|
|
786
|
+
if 'Accept' not in _header_params:
|
|
787
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
788
|
+
[
|
|
789
|
+
'application/json'
|
|
790
|
+
]
|
|
791
|
+
)
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
# authentication setting
|
|
795
|
+
_auth_settings: List[str] = [
|
|
796
|
+
'OpenIdConnect'
|
|
797
|
+
]
|
|
798
|
+
|
|
799
|
+
return self.api_client.param_serialize(
|
|
800
|
+
method='GET',
|
|
801
|
+
resource_path='/editor-languages',
|
|
802
|
+
path_params=_path_params,
|
|
803
|
+
query_params=_query_params,
|
|
804
|
+
header_params=_header_params,
|
|
805
|
+
body=_body_params,
|
|
806
|
+
post_params=_form_params,
|
|
807
|
+
files=_files,
|
|
808
|
+
auth_settings=_auth_settings,
|
|
809
|
+
collection_formats=_collection_formats,
|
|
810
|
+
_host=_host,
|
|
811
|
+
_request_auth=_request_auth
|
|
812
|
+
)
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
@validate_call
|
|
818
|
+
async def post_language_editor_languages_post(
|
|
819
|
+
self,
|
|
820
|
+
editor_language: EditorLanguage,
|
|
821
|
+
_request_timeout: Union[
|
|
822
|
+
None,
|
|
823
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
824
|
+
Tuple[
|
|
825
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
826
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
827
|
+
]
|
|
828
|
+
] = None,
|
|
829
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
830
|
+
_content_type: Optional[StrictStr] = None,
|
|
831
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
832
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
833
|
+
) -> IdAndMessageResponse:
|
|
834
|
+
"""Post Language
|
|
835
|
+
|
|
836
|
+
Post language
|
|
837
|
+
|
|
838
|
+
:param editor_language: (required)
|
|
839
|
+
:type editor_language: EditorLanguage
|
|
840
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
841
|
+
number provided, it will be total request
|
|
842
|
+
timeout. It can also be a pair (tuple) of
|
|
843
|
+
(connection, read) timeouts.
|
|
844
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
845
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
846
|
+
request; this effectively ignores the
|
|
847
|
+
authentication in the spec for a single request.
|
|
848
|
+
:type _request_auth: dict, optional
|
|
849
|
+
:param _content_type: force content-type for the request.
|
|
850
|
+
:type _content_type: str, Optional
|
|
851
|
+
:param _headers: set to override the headers for a single
|
|
852
|
+
request; this effectively ignores the headers
|
|
853
|
+
in the spec for a single request.
|
|
854
|
+
:type _headers: dict, optional
|
|
855
|
+
:param _host_index: set to override the host_index for a single
|
|
856
|
+
request; this effectively ignores the host_index
|
|
857
|
+
in the spec for a single request.
|
|
858
|
+
:type _host_index: int, optional
|
|
859
|
+
:return: Returns the result object.
|
|
860
|
+
""" # noqa: E501
|
|
861
|
+
|
|
862
|
+
_param = self._post_language_editor_languages_post_serialize(
|
|
863
|
+
editor_language=editor_language,
|
|
864
|
+
_request_auth=_request_auth,
|
|
865
|
+
_content_type=_content_type,
|
|
866
|
+
_headers=_headers,
|
|
867
|
+
_host_index=_host_index
|
|
868
|
+
)
|
|
869
|
+
|
|
870
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
871
|
+
'200': "IdAndMessageResponse",
|
|
872
|
+
'422': "HTTPValidationError",
|
|
873
|
+
}
|
|
874
|
+
response_data = await self.api_client.call_api(
|
|
875
|
+
*_param,
|
|
876
|
+
_request_timeout=_request_timeout
|
|
877
|
+
)
|
|
878
|
+
await response_data.read()
|
|
879
|
+
return self.api_client.response_deserialize(
|
|
880
|
+
response_data=response_data,
|
|
881
|
+
response_types_map=_response_types_map,
|
|
882
|
+
).data
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
@validate_call
|
|
886
|
+
async def post_language_editor_languages_post_with_http_info(
|
|
887
|
+
self,
|
|
888
|
+
editor_language: EditorLanguage,
|
|
889
|
+
_request_timeout: Union[
|
|
890
|
+
None,
|
|
891
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
892
|
+
Tuple[
|
|
893
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
894
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
895
|
+
]
|
|
896
|
+
] = None,
|
|
897
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
898
|
+
_content_type: Optional[StrictStr] = None,
|
|
899
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
900
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
901
|
+
) -> ApiResponse[IdAndMessageResponse]:
|
|
902
|
+
"""Post Language
|
|
903
|
+
|
|
904
|
+
Post language
|
|
905
|
+
|
|
906
|
+
:param editor_language: (required)
|
|
907
|
+
:type editor_language: EditorLanguage
|
|
908
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
909
|
+
number provided, it will be total request
|
|
910
|
+
timeout. It can also be a pair (tuple) of
|
|
911
|
+
(connection, read) timeouts.
|
|
912
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
913
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
914
|
+
request; this effectively ignores the
|
|
915
|
+
authentication in the spec for a single request.
|
|
916
|
+
:type _request_auth: dict, optional
|
|
917
|
+
:param _content_type: force content-type for the request.
|
|
918
|
+
:type _content_type: str, Optional
|
|
919
|
+
:param _headers: set to override the headers for a single
|
|
920
|
+
request; this effectively ignores the headers
|
|
921
|
+
in the spec for a single request.
|
|
922
|
+
:type _headers: dict, optional
|
|
923
|
+
:param _host_index: set to override the host_index for a single
|
|
924
|
+
request; this effectively ignores the host_index
|
|
925
|
+
in the spec for a single request.
|
|
926
|
+
:type _host_index: int, optional
|
|
927
|
+
:return: Returns the result object.
|
|
928
|
+
""" # noqa: E501
|
|
929
|
+
|
|
930
|
+
_param = self._post_language_editor_languages_post_serialize(
|
|
931
|
+
editor_language=editor_language,
|
|
932
|
+
_request_auth=_request_auth,
|
|
933
|
+
_content_type=_content_type,
|
|
934
|
+
_headers=_headers,
|
|
935
|
+
_host_index=_host_index
|
|
936
|
+
)
|
|
937
|
+
|
|
938
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
939
|
+
'200': "IdAndMessageResponse",
|
|
940
|
+
'422': "HTTPValidationError",
|
|
941
|
+
}
|
|
942
|
+
response_data = await self.api_client.call_api(
|
|
943
|
+
*_param,
|
|
944
|
+
_request_timeout=_request_timeout
|
|
945
|
+
)
|
|
946
|
+
await response_data.read()
|
|
947
|
+
return self.api_client.response_deserialize(
|
|
948
|
+
response_data=response_data,
|
|
949
|
+
response_types_map=_response_types_map,
|
|
950
|
+
)
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
@validate_call
|
|
954
|
+
async def post_language_editor_languages_post_without_preload_content(
|
|
955
|
+
self,
|
|
956
|
+
editor_language: EditorLanguage,
|
|
957
|
+
_request_timeout: Union[
|
|
958
|
+
None,
|
|
959
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
960
|
+
Tuple[
|
|
961
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
962
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
963
|
+
]
|
|
964
|
+
] = None,
|
|
965
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
966
|
+
_content_type: Optional[StrictStr] = None,
|
|
967
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
968
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
969
|
+
) -> RESTResponseType:
|
|
970
|
+
"""Post Language
|
|
971
|
+
|
|
972
|
+
Post language
|
|
973
|
+
|
|
974
|
+
:param editor_language: (required)
|
|
975
|
+
:type editor_language: EditorLanguage
|
|
976
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
977
|
+
number provided, it will be total request
|
|
978
|
+
timeout. It can also be a pair (tuple) of
|
|
979
|
+
(connection, read) timeouts.
|
|
980
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
981
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
982
|
+
request; this effectively ignores the
|
|
983
|
+
authentication in the spec for a single request.
|
|
984
|
+
:type _request_auth: dict, optional
|
|
985
|
+
:param _content_type: force content-type for the request.
|
|
986
|
+
:type _content_type: str, Optional
|
|
987
|
+
:param _headers: set to override the headers for a single
|
|
988
|
+
request; this effectively ignores the headers
|
|
989
|
+
in the spec for a single request.
|
|
990
|
+
:type _headers: dict, optional
|
|
991
|
+
:param _host_index: set to override the host_index for a single
|
|
992
|
+
request; this effectively ignores the host_index
|
|
993
|
+
in the spec for a single request.
|
|
994
|
+
:type _host_index: int, optional
|
|
995
|
+
:return: Returns the result object.
|
|
996
|
+
""" # noqa: E501
|
|
997
|
+
|
|
998
|
+
_param = self._post_language_editor_languages_post_serialize(
|
|
999
|
+
editor_language=editor_language,
|
|
1000
|
+
_request_auth=_request_auth,
|
|
1001
|
+
_content_type=_content_type,
|
|
1002
|
+
_headers=_headers,
|
|
1003
|
+
_host_index=_host_index
|
|
1004
|
+
)
|
|
1005
|
+
|
|
1006
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1007
|
+
'200': "IdAndMessageResponse",
|
|
1008
|
+
'422': "HTTPValidationError",
|
|
1009
|
+
}
|
|
1010
|
+
response_data = await self.api_client.call_api(
|
|
1011
|
+
*_param,
|
|
1012
|
+
_request_timeout=_request_timeout
|
|
1013
|
+
)
|
|
1014
|
+
return response_data.response
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
def _post_language_editor_languages_post_serialize(
|
|
1018
|
+
self,
|
|
1019
|
+
editor_language,
|
|
1020
|
+
_request_auth,
|
|
1021
|
+
_content_type,
|
|
1022
|
+
_headers,
|
|
1023
|
+
_host_index,
|
|
1024
|
+
) -> RequestSerialized:
|
|
1025
|
+
|
|
1026
|
+
_host = None
|
|
1027
|
+
|
|
1028
|
+
_collection_formats: Dict[str, str] = {
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
_path_params: Dict[str, str] = {}
|
|
1032
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1033
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1034
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1035
|
+
_files: Dict[
|
|
1036
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1037
|
+
] = {}
|
|
1038
|
+
_body_params: Optional[bytes] = None
|
|
1039
|
+
|
|
1040
|
+
# process the path parameters
|
|
1041
|
+
# process the query parameters
|
|
1042
|
+
# process the header parameters
|
|
1043
|
+
# process the form parameters
|
|
1044
|
+
# process the body parameter
|
|
1045
|
+
if editor_language is not None:
|
|
1046
|
+
_body_params = editor_language
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
# set the HTTP header `Accept`
|
|
1050
|
+
if 'Accept' not in _header_params:
|
|
1051
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1052
|
+
[
|
|
1053
|
+
'application/json'
|
|
1054
|
+
]
|
|
1055
|
+
)
|
|
1056
|
+
|
|
1057
|
+
# set the HTTP header `Content-Type`
|
|
1058
|
+
if _content_type:
|
|
1059
|
+
_header_params['Content-Type'] = _content_type
|
|
1060
|
+
else:
|
|
1061
|
+
_default_content_type = (
|
|
1062
|
+
self.api_client.select_header_content_type(
|
|
1063
|
+
[
|
|
1064
|
+
'application/json'
|
|
1065
|
+
]
|
|
1066
|
+
)
|
|
1067
|
+
)
|
|
1068
|
+
if _default_content_type is not None:
|
|
1069
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1070
|
+
|
|
1071
|
+
# authentication setting
|
|
1072
|
+
_auth_settings: List[str] = [
|
|
1073
|
+
'OpenIdConnect'
|
|
1074
|
+
]
|
|
1075
|
+
|
|
1076
|
+
return self.api_client.param_serialize(
|
|
1077
|
+
method='POST',
|
|
1078
|
+
resource_path='/editor-languages',
|
|
1079
|
+
path_params=_path_params,
|
|
1080
|
+
query_params=_query_params,
|
|
1081
|
+
header_params=_header_params,
|
|
1082
|
+
body=_body_params,
|
|
1083
|
+
post_params=_form_params,
|
|
1084
|
+
files=_files,
|
|
1085
|
+
auth_settings=_auth_settings,
|
|
1086
|
+
collection_formats=_collection_formats,
|
|
1087
|
+
_host=_host,
|
|
1088
|
+
_request_auth=_request_auth
|
|
1089
|
+
)
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
@validate_call
|
|
1095
|
+
async def put_language_editor_languages_language_id_put(
|
|
1096
|
+
self,
|
|
1097
|
+
language_id: StrictInt,
|
|
1098
|
+
editor_language: EditorLanguage,
|
|
1099
|
+
_request_timeout: Union[
|
|
1100
|
+
None,
|
|
1101
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1102
|
+
Tuple[
|
|
1103
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1104
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1105
|
+
]
|
|
1106
|
+
] = None,
|
|
1107
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1108
|
+
_content_type: Optional[StrictStr] = None,
|
|
1109
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1110
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1111
|
+
) -> SuccessAndMessageResponse:
|
|
1112
|
+
"""Put Language
|
|
1113
|
+
|
|
1114
|
+
Update language attributes
|
|
1115
|
+
|
|
1116
|
+
:param language_id: (required)
|
|
1117
|
+
:type language_id: int
|
|
1118
|
+
:param editor_language: (required)
|
|
1119
|
+
:type editor_language: EditorLanguage
|
|
1120
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1121
|
+
number provided, it will be total request
|
|
1122
|
+
timeout. It can also be a pair (tuple) of
|
|
1123
|
+
(connection, read) timeouts.
|
|
1124
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1125
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1126
|
+
request; this effectively ignores the
|
|
1127
|
+
authentication in the spec for a single request.
|
|
1128
|
+
:type _request_auth: dict, optional
|
|
1129
|
+
:param _content_type: force content-type for the request.
|
|
1130
|
+
:type _content_type: str, Optional
|
|
1131
|
+
:param _headers: set to override the headers for a single
|
|
1132
|
+
request; this effectively ignores the headers
|
|
1133
|
+
in the spec for a single request.
|
|
1134
|
+
:type _headers: dict, optional
|
|
1135
|
+
:param _host_index: set to override the host_index for a single
|
|
1136
|
+
request; this effectively ignores the host_index
|
|
1137
|
+
in the spec for a single request.
|
|
1138
|
+
:type _host_index: int, optional
|
|
1139
|
+
:return: Returns the result object.
|
|
1140
|
+
""" # noqa: E501
|
|
1141
|
+
|
|
1142
|
+
_param = self._put_language_editor_languages_language_id_put_serialize(
|
|
1143
|
+
language_id=language_id,
|
|
1144
|
+
editor_language=editor_language,
|
|
1145
|
+
_request_auth=_request_auth,
|
|
1146
|
+
_content_type=_content_type,
|
|
1147
|
+
_headers=_headers,
|
|
1148
|
+
_host_index=_host_index
|
|
1149
|
+
)
|
|
1150
|
+
|
|
1151
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1152
|
+
'200': "SuccessAndMessageResponse",
|
|
1153
|
+
'422': "HTTPValidationError",
|
|
1154
|
+
}
|
|
1155
|
+
response_data = await self.api_client.call_api(
|
|
1156
|
+
*_param,
|
|
1157
|
+
_request_timeout=_request_timeout
|
|
1158
|
+
)
|
|
1159
|
+
await response_data.read()
|
|
1160
|
+
return self.api_client.response_deserialize(
|
|
1161
|
+
response_data=response_data,
|
|
1162
|
+
response_types_map=_response_types_map,
|
|
1163
|
+
).data
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
@validate_call
|
|
1167
|
+
async def put_language_editor_languages_language_id_put_with_http_info(
|
|
1168
|
+
self,
|
|
1169
|
+
language_id: StrictInt,
|
|
1170
|
+
editor_language: EditorLanguage,
|
|
1171
|
+
_request_timeout: Union[
|
|
1172
|
+
None,
|
|
1173
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1174
|
+
Tuple[
|
|
1175
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1176
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1177
|
+
]
|
|
1178
|
+
] = None,
|
|
1179
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1180
|
+
_content_type: Optional[StrictStr] = None,
|
|
1181
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1182
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1183
|
+
) -> ApiResponse[SuccessAndMessageResponse]:
|
|
1184
|
+
"""Put Language
|
|
1185
|
+
|
|
1186
|
+
Update language attributes
|
|
1187
|
+
|
|
1188
|
+
:param language_id: (required)
|
|
1189
|
+
:type language_id: int
|
|
1190
|
+
:param editor_language: (required)
|
|
1191
|
+
:type editor_language: EditorLanguage
|
|
1192
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1193
|
+
number provided, it will be total request
|
|
1194
|
+
timeout. It can also be a pair (tuple) of
|
|
1195
|
+
(connection, read) timeouts.
|
|
1196
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1197
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1198
|
+
request; this effectively ignores the
|
|
1199
|
+
authentication in the spec for a single request.
|
|
1200
|
+
:type _request_auth: dict, optional
|
|
1201
|
+
:param _content_type: force content-type for the request.
|
|
1202
|
+
:type _content_type: str, Optional
|
|
1203
|
+
:param _headers: set to override the headers for a single
|
|
1204
|
+
request; this effectively ignores the headers
|
|
1205
|
+
in the spec for a single request.
|
|
1206
|
+
:type _headers: dict, optional
|
|
1207
|
+
:param _host_index: set to override the host_index for a single
|
|
1208
|
+
request; this effectively ignores the host_index
|
|
1209
|
+
in the spec for a single request.
|
|
1210
|
+
:type _host_index: int, optional
|
|
1211
|
+
:return: Returns the result object.
|
|
1212
|
+
""" # noqa: E501
|
|
1213
|
+
|
|
1214
|
+
_param = self._put_language_editor_languages_language_id_put_serialize(
|
|
1215
|
+
language_id=language_id,
|
|
1216
|
+
editor_language=editor_language,
|
|
1217
|
+
_request_auth=_request_auth,
|
|
1218
|
+
_content_type=_content_type,
|
|
1219
|
+
_headers=_headers,
|
|
1220
|
+
_host_index=_host_index
|
|
1221
|
+
)
|
|
1222
|
+
|
|
1223
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1224
|
+
'200': "SuccessAndMessageResponse",
|
|
1225
|
+
'422': "HTTPValidationError",
|
|
1226
|
+
}
|
|
1227
|
+
response_data = await self.api_client.call_api(
|
|
1228
|
+
*_param,
|
|
1229
|
+
_request_timeout=_request_timeout
|
|
1230
|
+
)
|
|
1231
|
+
await response_data.read()
|
|
1232
|
+
return self.api_client.response_deserialize(
|
|
1233
|
+
response_data=response_data,
|
|
1234
|
+
response_types_map=_response_types_map,
|
|
1235
|
+
)
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
@validate_call
|
|
1239
|
+
async def put_language_editor_languages_language_id_put_without_preload_content(
|
|
1240
|
+
self,
|
|
1241
|
+
language_id: StrictInt,
|
|
1242
|
+
editor_language: EditorLanguage,
|
|
1243
|
+
_request_timeout: Union[
|
|
1244
|
+
None,
|
|
1245
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1246
|
+
Tuple[
|
|
1247
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1248
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1249
|
+
]
|
|
1250
|
+
] = None,
|
|
1251
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1252
|
+
_content_type: Optional[StrictStr] = None,
|
|
1253
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1254
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1255
|
+
) -> RESTResponseType:
|
|
1256
|
+
"""Put Language
|
|
1257
|
+
|
|
1258
|
+
Update language attributes
|
|
1259
|
+
|
|
1260
|
+
:param language_id: (required)
|
|
1261
|
+
:type language_id: int
|
|
1262
|
+
:param editor_language: (required)
|
|
1263
|
+
:type editor_language: EditorLanguage
|
|
1264
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1265
|
+
number provided, it will be total request
|
|
1266
|
+
timeout. It can also be a pair (tuple) of
|
|
1267
|
+
(connection, read) timeouts.
|
|
1268
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1269
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1270
|
+
request; this effectively ignores the
|
|
1271
|
+
authentication in the spec for a single request.
|
|
1272
|
+
:type _request_auth: dict, optional
|
|
1273
|
+
:param _content_type: force content-type for the request.
|
|
1274
|
+
:type _content_type: str, Optional
|
|
1275
|
+
:param _headers: set to override the headers for a single
|
|
1276
|
+
request; this effectively ignores the headers
|
|
1277
|
+
in the spec for a single request.
|
|
1278
|
+
:type _headers: dict, optional
|
|
1279
|
+
:param _host_index: set to override the host_index for a single
|
|
1280
|
+
request; this effectively ignores the host_index
|
|
1281
|
+
in the spec for a single request.
|
|
1282
|
+
:type _host_index: int, optional
|
|
1283
|
+
:return: Returns the result object.
|
|
1284
|
+
""" # noqa: E501
|
|
1285
|
+
|
|
1286
|
+
_param = self._put_language_editor_languages_language_id_put_serialize(
|
|
1287
|
+
language_id=language_id,
|
|
1288
|
+
editor_language=editor_language,
|
|
1289
|
+
_request_auth=_request_auth,
|
|
1290
|
+
_content_type=_content_type,
|
|
1291
|
+
_headers=_headers,
|
|
1292
|
+
_host_index=_host_index
|
|
1293
|
+
)
|
|
1294
|
+
|
|
1295
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1296
|
+
'200': "SuccessAndMessageResponse",
|
|
1297
|
+
'422': "HTTPValidationError",
|
|
1298
|
+
}
|
|
1299
|
+
response_data = await self.api_client.call_api(
|
|
1300
|
+
*_param,
|
|
1301
|
+
_request_timeout=_request_timeout
|
|
1302
|
+
)
|
|
1303
|
+
return response_data.response
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
def _put_language_editor_languages_language_id_put_serialize(
|
|
1307
|
+
self,
|
|
1308
|
+
language_id,
|
|
1309
|
+
editor_language,
|
|
1310
|
+
_request_auth,
|
|
1311
|
+
_content_type,
|
|
1312
|
+
_headers,
|
|
1313
|
+
_host_index,
|
|
1314
|
+
) -> RequestSerialized:
|
|
1315
|
+
|
|
1316
|
+
_host = None
|
|
1317
|
+
|
|
1318
|
+
_collection_formats: Dict[str, str] = {
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
_path_params: Dict[str, str] = {}
|
|
1322
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1323
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1324
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1325
|
+
_files: Dict[
|
|
1326
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1327
|
+
] = {}
|
|
1328
|
+
_body_params: Optional[bytes] = None
|
|
1329
|
+
|
|
1330
|
+
# process the path parameters
|
|
1331
|
+
if language_id is not None:
|
|
1332
|
+
_path_params['language_id'] = language_id
|
|
1333
|
+
# process the query parameters
|
|
1334
|
+
# process the header parameters
|
|
1335
|
+
# process the form parameters
|
|
1336
|
+
# process the body parameter
|
|
1337
|
+
if editor_language is not None:
|
|
1338
|
+
_body_params = editor_language
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
# set the HTTP header `Accept`
|
|
1342
|
+
if 'Accept' not in _header_params:
|
|
1343
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1344
|
+
[
|
|
1345
|
+
'application/json'
|
|
1346
|
+
]
|
|
1347
|
+
)
|
|
1348
|
+
|
|
1349
|
+
# set the HTTP header `Content-Type`
|
|
1350
|
+
if _content_type:
|
|
1351
|
+
_header_params['Content-Type'] = _content_type
|
|
1352
|
+
else:
|
|
1353
|
+
_default_content_type = (
|
|
1354
|
+
self.api_client.select_header_content_type(
|
|
1355
|
+
[
|
|
1356
|
+
'application/json'
|
|
1357
|
+
]
|
|
1358
|
+
)
|
|
1359
|
+
)
|
|
1360
|
+
if _default_content_type is not None:
|
|
1361
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1362
|
+
|
|
1363
|
+
# authentication setting
|
|
1364
|
+
_auth_settings: List[str] = [
|
|
1365
|
+
'OpenIdConnect'
|
|
1366
|
+
]
|
|
1367
|
+
|
|
1368
|
+
return self.api_client.param_serialize(
|
|
1369
|
+
method='PUT',
|
|
1370
|
+
resource_path='/editor-languages/{language_id}',
|
|
1371
|
+
path_params=_path_params,
|
|
1372
|
+
query_params=_query_params,
|
|
1373
|
+
header_params=_header_params,
|
|
1374
|
+
body=_body_params,
|
|
1375
|
+
post_params=_form_params,
|
|
1376
|
+
files=_files,
|
|
1377
|
+
auth_settings=_auth_settings,
|
|
1378
|
+
collection_formats=_collection_formats,
|
|
1379
|
+
_host=_host,
|
|
1380
|
+
_request_auth=_request_auth
|
|
1381
|
+
)
|
|
1382
|
+
|
|
1383
|
+
|