qanswer_sdk 3.1212.0__py3-none-any.whl → 3.1244.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.
- qanswer_sdk/__init__.py +66 -43
- qanswer_sdk/api/__init__.py +7 -4
- qanswer_sdk/api/admin_api.py +590 -7695
- qanswer_sdk/api/ai_assistant_access_rights_api.py +72 -73
- qanswer_sdk/api/ai_assistant_api.py +567 -46
- qanswer_sdk/api/branding_api.py +4578 -0
- qanswer_sdk/api/chatbot_api.py +72 -87
- qanswer_sdk/api/{tag_api.py → connector_imap_connector_api.py} +415 -997
- qanswer_sdk/api/connector_rdf_api.py +30 -31
- qanswer_sdk/api/connectors_api.py +183 -166
- qanswer_sdk/api/connectors_data_api.py +345 -1
- qanswer_sdk/api/dataset_config_api.py +0 -245
- qanswer_sdk/api/llm_api.py +30 -30
- qanswer_sdk/api/payment_api.py +17 -16
- qanswer_sdk/api/speech_to_text_api.py +2 -2
- qanswer_sdk/api/task_chat_api.py +8 -7
- qanswer_sdk/api/task_rdf_linker_api.py +35 -36
- qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +16 -16
- qanswer_sdk/api/task_report_copilot_api.py +895 -281
- qanswer_sdk/api/task_search_api.py +8 -7
- qanswer_sdk/api/tool_embedder_api.py +4040 -0
- qanswer_sdk/api/{user_api.py → tool_llm_api.py} +735 -2749
- qanswer_sdk/api/unit_organizations_api.py +4547 -0
- qanswer_sdk/api/unit_teams_api.py +3906 -0
- qanswer_sdk/api/{organizations_teams_api.py → unit_user_api.py} +1345 -1394
- qanswer_sdk/api_client.py +1 -1
- qanswer_sdk/configuration.py +1 -1
- qanswer_sdk/models/__init__.py +58 -38
- qanswer_sdk/models/aggregation.py +2 -2
- qanswer_sdk/models/ai_assistant_filter_dto.py +105 -0
- qanswer_sdk/models/{user_profile_paginated.py → ai_assistant_list.py} +18 -18
- qanswer_sdk/models/{embedding_model.py → available_aggregation.py} +13 -11
- qanswer_sdk/models/available_connectors_response.py +2 -2
- qanswer_sdk/models/{branding_data.py → branding_app_title.py} +4 -4
- qanswer_sdk/models/{api_response.py → branding_system_message.py} +8 -8
- qanswer_sdk/models/chat_task_settings.py +12 -12
- qanswer_sdk/models/chat_task_update.py +13 -5
- qanswer_sdk/models/chatbot_chat_payload.py +19 -2
- qanswer_sdk/models/chatbot_conversation_model.py +10 -0
- qanswer_sdk/models/chatbot_response.py +22 -2
- qanswer_sdk/models/{user_chatbot_setting_payload.py → chatbot_setting_dto.py} +12 -13
- qanswer_sdk/models/chatbot_setting_request.py +96 -0
- qanswer_sdk/models/{question_completion.py → clip_connector_file_structure.py} +9 -9
- qanswer_sdk/models/clip_connector_structure.py +97 -0
- qanswer_sdk/models/connector_model.py +2 -2
- qanswer_sdk/models/conversation_message.py +4 -12
- qanswer_sdk/models/{cost_summary.py → cost_summary_dto.py} +4 -4
- qanswer_sdk/models/create_connector_request.py +4 -2
- qanswer_sdk/models/create_imap_connector_request.py +105 -0
- qanswer_sdk/models/create_pinecone_connector_request.py +3 -1
- qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +3 -1
- qanswer_sdk/models/create_sharepoint_connector_request.py +3 -1
- qanswer_sdk/models/dataset_detail_kg.py +27 -1
- qanswer_sdk/models/dataset_schema.py +4 -2
- qanswer_sdk/models/dataset_update_object.py +3 -1
- qanswer_sdk/models/delete_connector_model.py +2 -2
- qanswer_sdk/models/delete_connectors_response.py +2 -4
- qanswer_sdk/models/{json_nullable_source_metadata.py → duplicate_report_template_response.py} +11 -9
- qanswer_sdk/models/{json_nullable_file_failure_reason.py → email_folder.py} +12 -8
- qanswer_sdk/models/{embedding_endpoint.py → embedder_detailed_dto.py} +16 -8
- qanswer_sdk/models/{tag_payload.py → embedder_dto.py} +11 -7
- qanswer_sdk/models/{pageable_object.py → embedder_list_dto.py} +20 -20
- qanswer_sdk/models/embedding_endpoint_create.py +3 -1
- qanswer_sdk/models/embedding_endpoint_update.py +4 -2
- qanswer_sdk/models/{sort_object.py → entity_description.py} +16 -12
- qanswer_sdk/models/{dataset_description.py → entity_description_dto.py} +9 -7
- qanswer_sdk/models/file_model.py +2 -2
- qanswer_sdk/models/imap_add_payload.py +103 -0
- qanswer_sdk/models/imap_additional_fields.py +101 -0
- qanswer_sdk/models/imap_file_metadata.py +114 -0
- qanswer_sdk/models/imap_search_response.py +113 -0
- qanswer_sdk/models/llm.py +129 -0
- qanswer_sdk/models/llm_consumption.py +118 -0
- qanswer_sdk/models/{pageable.py → llm_context_ranges.py} +14 -13
- qanswer_sdk/models/{llm_cost.py → llm_cost_filter.py} +11 -7
- qanswer_sdk/models/llm_cost_list.py +101 -0
- qanswer_sdk/models/llm_detailed_dto.py +179 -0
- qanswer_sdk/models/{llm_details.py → llm_dto.py} +14 -18
- qanswer_sdk/models/llm_endpoint.py +8 -2
- qanswer_sdk/models/llm_endpoint_read_input.py +173 -0
- qanswer_sdk/models/llm_endpoint_read_output.py +173 -0
- qanswer_sdk/models/llm_filter_dto.py +99 -0
- qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
- qanswer_sdk/models/llm_list_dto.py +101 -0
- qanswer_sdk/models/modify_connector_request.py +5 -11
- qanswer_sdk/models/{o_auth_service.py → o_auth_service_dto.py} +4 -4
- qanswer_sdk/models/organization_admin.py +95 -0
- qanswer_sdk/models/organization_filter_dto.py +97 -0
- qanswer_sdk/models/organization_list_dto.py +101 -0
- qanswer_sdk/models/organization_llm.py +103 -0
- qanswer_sdk/models/{plan.py → plan_dto.py} +4 -4
- qanswer_sdk/models/prompt_token_count_details.py +3 -3
- qanswer_sdk/models/rag_payload.py +4 -4
- qanswer_sdk/models/rag_response.py +4 -2
- qanswer_sdk/models/relation_extraction_task_settings.py +12 -10
- qanswer_sdk/models/relation_extraction_task_update.py +14 -4
- qanswer_sdk/models/report_copilot_slot_task_settings.py +12 -10
- qanswer_sdk/models/report_copilot_slot_task_update.py +13 -3
- qanswer_sdk/models/report_copilot_task_settings.py +12 -10
- qanswer_sdk/models/report_copilot_task_update.py +14 -4
- qanswer_sdk/models/{report_copilot_template.py → report_template.py} +17 -7
- qanswer_sdk/models/{report_copilot_create_payload.py → report_template_create_payload.py} +4 -4
- qanswer_sdk/models/{report_copilot_template_simplified.py → report_template_simplified.py} +11 -7
- qanswer_sdk/models/{report_copilot_export_template_as_docx_payload_simplified.py → report_template_simplified_payload.py} +4 -4
- qanswer_sdk/models/{report_copilot_update_payload.py → report_template_update_payload.py} +15 -9
- qanswer_sdk/models/search_task_settings.py +12 -12
- qanswer_sdk/models/search_task_update.py +13 -3
- qanswer_sdk/models/{set_logo1_request.py → set_logo2_request.py} +4 -4
- qanswer_sdk/models/shared_organization_access.py +7 -3
- qanswer_sdk/models/shared_team_access.py +10 -4
- qanswer_sdk/models/slot.py +5 -1
- qanswer_sdk/models/slot_update.py +5 -1
- qanswer_sdk/models/socket_conversation_message.py +3 -11
- qanswer_sdk/models/socket_file_metadata.py +17 -11
- qanswer_sdk/models/source_metadata.py +109 -0
- qanswer_sdk/models/{tag_qa_list_payload.py → subscription_response.py} +22 -21
- qanswer_sdk/models/{team_with_count.py → team_admin.py} +8 -8
- qanswer_sdk/models/{team_filter.py → team_filter_dto.py} +16 -6
- qanswer_sdk/models/team_list_dto.py +101 -0
- qanswer_sdk/models/{available_endpoints_response.py → template_clip_structure_input.py} +14 -14
- qanswer_sdk/models/{available_embedding_models_response.py → template_clip_structure_output.py} +14 -14
- qanswer_sdk/models/test_imap_connection_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_payload.py +4 -4
- qanswer_sdk/models/text2_sparql_task_settings.py +12 -10
- qanswer_sdk/models/text2_sparql_task_update.py +14 -4
- qanswer_sdk/models/{user_chatbot_setting_response.py → user_chatbot_setting.py} +24 -24
- qanswer_sdk/models/user_dataset.py +38 -2
- qanswer_sdk/models/{qa_metadata_payload.py → user_dataset_shared.py} +27 -37
- qanswer_sdk/models/{user_filter.py → user_filter_dto.py} +4 -4
- qanswer_sdk/models/{user_profile.py → user_profile_dto.py} +10 -10
- qanswer_sdk/models/user_profile_list_dto.py +3 -3
- qanswer_sdk/models/widget_configs.py +4 -2
- {qanswer_sdk-3.1212.0.dist-info → qanswer_sdk-3.1244.0.dist-info}/METADATA +2 -2
- {qanswer_sdk-3.1212.0.dist-info → qanswer_sdk-3.1244.0.dist-info}/RECORD +135 -112
- qanswer_sdk/api/llm_consumption_controller_api.py +0 -310
- qanswer_sdk/models/organization_filter.py +0 -87
- qanswer_sdk/models/page_organization.py +0 -123
- qanswer_sdk/models/page_team_with_count.py +0 -123
- qanswer_sdk/models/tag_qa_payload.py +0 -91
- {qanswer_sdk-3.1212.0.dist-info → qanswer_sdk-3.1244.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,4547 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
import warnings
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
|
+
from typing_extensions import Annotated
|
18
|
+
|
19
|
+
from pydantic import StrictBytes, StrictInt, StrictStr
|
20
|
+
from typing import List, Tuple, Union
|
21
|
+
from qanswer_sdk.models.llm_detailed_dto import LlmDetailedDto
|
22
|
+
from qanswer_sdk.models.organization import Organization
|
23
|
+
from qanswer_sdk.models.organization_creation import OrganizationCreation
|
24
|
+
from qanswer_sdk.models.organization_filter_dto import OrganizationFilterDto
|
25
|
+
from qanswer_sdk.models.organization_list_dto import OrganizationListDto
|
26
|
+
from qanswer_sdk.models.user import User
|
27
|
+
|
28
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
29
|
+
from qanswer_sdk.api_response import ApiResponse
|
30
|
+
from qanswer_sdk.rest import RESTResponseType
|
31
|
+
|
32
|
+
|
33
|
+
class UnitOrganizationsApi:
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
35
|
+
Ref: https://openapi-generator.tech
|
36
|
+
|
37
|
+
Do not edit the class manually.
|
38
|
+
"""
|
39
|
+
|
40
|
+
def __init__(self, api_client=None) -> None:
|
41
|
+
if api_client is None:
|
42
|
+
api_client = ApiClient.get_default()
|
43
|
+
self.api_client = api_client
|
44
|
+
|
45
|
+
|
46
|
+
@validate_call
|
47
|
+
def add_admin_to_organization(
|
48
|
+
self,
|
49
|
+
organization_id: StrictInt,
|
50
|
+
user_id: StrictInt,
|
51
|
+
_request_timeout: Union[
|
52
|
+
None,
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
54
|
+
Tuple[
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
57
|
+
]
|
58
|
+
] = None,
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
63
|
+
) -> None:
|
64
|
+
"""Assign an admin to an organization
|
65
|
+
|
66
|
+
|
67
|
+
:param organization_id: (required)
|
68
|
+
:type organization_id: int
|
69
|
+
:param user_id: (required)
|
70
|
+
:type user_id: int
|
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._add_admin_to_organization_serialize(
|
94
|
+
organization_id=organization_id,
|
95
|
+
user_id=user_id,
|
96
|
+
_request_auth=_request_auth,
|
97
|
+
_content_type=_content_type,
|
98
|
+
_headers=_headers,
|
99
|
+
_host_index=_host_index
|
100
|
+
)
|
101
|
+
|
102
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
103
|
+
'200': None,
|
104
|
+
}
|
105
|
+
response_data = self.api_client.call_api(
|
106
|
+
*_param,
|
107
|
+
_request_timeout=_request_timeout
|
108
|
+
)
|
109
|
+
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
|
+
def add_admin_to_organization_with_http_info(
|
118
|
+
self,
|
119
|
+
organization_id: StrictInt,
|
120
|
+
user_id: StrictInt,
|
121
|
+
_request_timeout: Union[
|
122
|
+
None,
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
124
|
+
Tuple[
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
126
|
+
Annotated[StrictFloat, Field(gt=0)]
|
127
|
+
]
|
128
|
+
] = None,
|
129
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
130
|
+
_content_type: Optional[StrictStr] = None,
|
131
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
132
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
133
|
+
) -> ApiResponse[None]:
|
134
|
+
"""Assign an admin to an organization
|
135
|
+
|
136
|
+
|
137
|
+
:param organization_id: (required)
|
138
|
+
:type organization_id: int
|
139
|
+
:param user_id: (required)
|
140
|
+
:type user_id: int
|
141
|
+
:param _request_timeout: timeout setting for this request. If one
|
142
|
+
number provided, it will be total request
|
143
|
+
timeout. It can also be a pair (tuple) of
|
144
|
+
(connection, read) timeouts.
|
145
|
+
:type _request_timeout: int, tuple(int, int), optional
|
146
|
+
:param _request_auth: set to override the auth_settings for an a single
|
147
|
+
request; this effectively ignores the
|
148
|
+
authentication in the spec for a single request.
|
149
|
+
:type _request_auth: dict, optional
|
150
|
+
:param _content_type: force content-type for the request.
|
151
|
+
:type _content_type: str, Optional
|
152
|
+
:param _headers: set to override the headers for a single
|
153
|
+
request; this effectively ignores the headers
|
154
|
+
in the spec for a single request.
|
155
|
+
:type _headers: dict, optional
|
156
|
+
:param _host_index: set to override the host_index for a single
|
157
|
+
request; this effectively ignores the host_index
|
158
|
+
in the spec for a single request.
|
159
|
+
:type _host_index: int, optional
|
160
|
+
:return: Returns the result object.
|
161
|
+
""" # noqa: E501
|
162
|
+
|
163
|
+
_param = self._add_admin_to_organization_serialize(
|
164
|
+
organization_id=organization_id,
|
165
|
+
user_id=user_id,
|
166
|
+
_request_auth=_request_auth,
|
167
|
+
_content_type=_content_type,
|
168
|
+
_headers=_headers,
|
169
|
+
_host_index=_host_index
|
170
|
+
)
|
171
|
+
|
172
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
173
|
+
'200': None,
|
174
|
+
}
|
175
|
+
response_data = self.api_client.call_api(
|
176
|
+
*_param,
|
177
|
+
_request_timeout=_request_timeout
|
178
|
+
)
|
179
|
+
response_data.read()
|
180
|
+
return self.api_client.response_deserialize(
|
181
|
+
response_data=response_data,
|
182
|
+
response_types_map=_response_types_map,
|
183
|
+
)
|
184
|
+
|
185
|
+
|
186
|
+
@validate_call
|
187
|
+
def add_admin_to_organization_without_preload_content(
|
188
|
+
self,
|
189
|
+
organization_id: StrictInt,
|
190
|
+
user_id: StrictInt,
|
191
|
+
_request_timeout: Union[
|
192
|
+
None,
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
194
|
+
Tuple[
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
196
|
+
Annotated[StrictFloat, Field(gt=0)]
|
197
|
+
]
|
198
|
+
] = None,
|
199
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
200
|
+
_content_type: Optional[StrictStr] = None,
|
201
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
202
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
203
|
+
) -> RESTResponseType:
|
204
|
+
"""Assign an admin to an organization
|
205
|
+
|
206
|
+
|
207
|
+
:param organization_id: (required)
|
208
|
+
:type organization_id: int
|
209
|
+
:param user_id: (required)
|
210
|
+
:type user_id: int
|
211
|
+
:param _request_timeout: timeout setting for this request. If one
|
212
|
+
number provided, it will be total request
|
213
|
+
timeout. It can also be a pair (tuple) of
|
214
|
+
(connection, read) timeouts.
|
215
|
+
:type _request_timeout: int, tuple(int, int), optional
|
216
|
+
:param _request_auth: set to override the auth_settings for an a single
|
217
|
+
request; this effectively ignores the
|
218
|
+
authentication in the spec for a single request.
|
219
|
+
:type _request_auth: dict, optional
|
220
|
+
:param _content_type: force content-type for the request.
|
221
|
+
:type _content_type: str, Optional
|
222
|
+
:param _headers: set to override the headers for a single
|
223
|
+
request; this effectively ignores the headers
|
224
|
+
in the spec for a single request.
|
225
|
+
:type _headers: dict, optional
|
226
|
+
:param _host_index: set to override the host_index for a single
|
227
|
+
request; this effectively ignores the host_index
|
228
|
+
in the spec for a single request.
|
229
|
+
:type _host_index: int, optional
|
230
|
+
:return: Returns the result object.
|
231
|
+
""" # noqa: E501
|
232
|
+
|
233
|
+
_param = self._add_admin_to_organization_serialize(
|
234
|
+
organization_id=organization_id,
|
235
|
+
user_id=user_id,
|
236
|
+
_request_auth=_request_auth,
|
237
|
+
_content_type=_content_type,
|
238
|
+
_headers=_headers,
|
239
|
+
_host_index=_host_index
|
240
|
+
)
|
241
|
+
|
242
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
243
|
+
'200': None,
|
244
|
+
}
|
245
|
+
response_data = self.api_client.call_api(
|
246
|
+
*_param,
|
247
|
+
_request_timeout=_request_timeout
|
248
|
+
)
|
249
|
+
return response_data.response
|
250
|
+
|
251
|
+
|
252
|
+
def _add_admin_to_organization_serialize(
|
253
|
+
self,
|
254
|
+
organization_id,
|
255
|
+
user_id,
|
256
|
+
_request_auth,
|
257
|
+
_content_type,
|
258
|
+
_headers,
|
259
|
+
_host_index,
|
260
|
+
) -> RequestSerialized:
|
261
|
+
|
262
|
+
_host = None
|
263
|
+
|
264
|
+
_collection_formats: Dict[str, str] = {
|
265
|
+
}
|
266
|
+
|
267
|
+
_path_params: Dict[str, str] = {}
|
268
|
+
_query_params: List[Tuple[str, str]] = []
|
269
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
270
|
+
_form_params: List[Tuple[str, str]] = []
|
271
|
+
_files: Dict[
|
272
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
273
|
+
] = {}
|
274
|
+
_body_params: Optional[bytes] = None
|
275
|
+
|
276
|
+
# process the path parameters
|
277
|
+
if organization_id is not None:
|
278
|
+
_path_params['organization_id'] = organization_id
|
279
|
+
if user_id is not None:
|
280
|
+
_path_params['user_id'] = user_id
|
281
|
+
# process the query parameters
|
282
|
+
# process the header parameters
|
283
|
+
# process the form parameters
|
284
|
+
# process the body parameter
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
# authentication setting
|
290
|
+
_auth_settings: List[str] = [
|
291
|
+
'QAnswer-Api-Key',
|
292
|
+
'Bearer'
|
293
|
+
]
|
294
|
+
|
295
|
+
return self.api_client.param_serialize(
|
296
|
+
method='POST',
|
297
|
+
resource_path='/api/organization/{organization_id}/admin/{user_id}',
|
298
|
+
path_params=_path_params,
|
299
|
+
query_params=_query_params,
|
300
|
+
header_params=_header_params,
|
301
|
+
body=_body_params,
|
302
|
+
post_params=_form_params,
|
303
|
+
files=_files,
|
304
|
+
auth_settings=_auth_settings,
|
305
|
+
collection_formats=_collection_formats,
|
306
|
+
_host=_host,
|
307
|
+
_request_auth=_request_auth
|
308
|
+
)
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
@validate_call
|
314
|
+
def add_user_to_organization(
|
315
|
+
self,
|
316
|
+
organization_id: StrictInt,
|
317
|
+
user_id: StrictInt,
|
318
|
+
_request_timeout: Union[
|
319
|
+
None,
|
320
|
+
Annotated[StrictFloat, Field(gt=0)],
|
321
|
+
Tuple[
|
322
|
+
Annotated[StrictFloat, Field(gt=0)],
|
323
|
+
Annotated[StrictFloat, Field(gt=0)]
|
324
|
+
]
|
325
|
+
] = None,
|
326
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
327
|
+
_content_type: Optional[StrictStr] = None,
|
328
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
329
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
330
|
+
) -> None:
|
331
|
+
"""Add a user to an organization
|
332
|
+
|
333
|
+
|
334
|
+
:param organization_id: (required)
|
335
|
+
:type organization_id: int
|
336
|
+
:param user_id: (required)
|
337
|
+
:type user_id: int
|
338
|
+
:param _request_timeout: timeout setting for this request. If one
|
339
|
+
number provided, it will be total request
|
340
|
+
timeout. It can also be a pair (tuple) of
|
341
|
+
(connection, read) timeouts.
|
342
|
+
:type _request_timeout: int, tuple(int, int), optional
|
343
|
+
:param _request_auth: set to override the auth_settings for an a single
|
344
|
+
request; this effectively ignores the
|
345
|
+
authentication in the spec for a single request.
|
346
|
+
:type _request_auth: dict, optional
|
347
|
+
:param _content_type: force content-type for the request.
|
348
|
+
:type _content_type: str, Optional
|
349
|
+
:param _headers: set to override the headers for a single
|
350
|
+
request; this effectively ignores the headers
|
351
|
+
in the spec for a single request.
|
352
|
+
:type _headers: dict, optional
|
353
|
+
:param _host_index: set to override the host_index for a single
|
354
|
+
request; this effectively ignores the host_index
|
355
|
+
in the spec for a single request.
|
356
|
+
:type _host_index: int, optional
|
357
|
+
:return: Returns the result object.
|
358
|
+
""" # noqa: E501
|
359
|
+
|
360
|
+
_param = self._add_user_to_organization_serialize(
|
361
|
+
organization_id=organization_id,
|
362
|
+
user_id=user_id,
|
363
|
+
_request_auth=_request_auth,
|
364
|
+
_content_type=_content_type,
|
365
|
+
_headers=_headers,
|
366
|
+
_host_index=_host_index
|
367
|
+
)
|
368
|
+
|
369
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
370
|
+
'200': None,
|
371
|
+
}
|
372
|
+
response_data = self.api_client.call_api(
|
373
|
+
*_param,
|
374
|
+
_request_timeout=_request_timeout
|
375
|
+
)
|
376
|
+
response_data.read()
|
377
|
+
return self.api_client.response_deserialize(
|
378
|
+
response_data=response_data,
|
379
|
+
response_types_map=_response_types_map,
|
380
|
+
).data
|
381
|
+
|
382
|
+
|
383
|
+
@validate_call
|
384
|
+
def add_user_to_organization_with_http_info(
|
385
|
+
self,
|
386
|
+
organization_id: StrictInt,
|
387
|
+
user_id: StrictInt,
|
388
|
+
_request_timeout: Union[
|
389
|
+
None,
|
390
|
+
Annotated[StrictFloat, Field(gt=0)],
|
391
|
+
Tuple[
|
392
|
+
Annotated[StrictFloat, Field(gt=0)],
|
393
|
+
Annotated[StrictFloat, Field(gt=0)]
|
394
|
+
]
|
395
|
+
] = None,
|
396
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
397
|
+
_content_type: Optional[StrictStr] = None,
|
398
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
399
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
400
|
+
) -> ApiResponse[None]:
|
401
|
+
"""Add a user to an organization
|
402
|
+
|
403
|
+
|
404
|
+
:param organization_id: (required)
|
405
|
+
:type organization_id: int
|
406
|
+
:param user_id: (required)
|
407
|
+
:type user_id: int
|
408
|
+
:param _request_timeout: timeout setting for this request. If one
|
409
|
+
number provided, it will be total request
|
410
|
+
timeout. It can also be a pair (tuple) of
|
411
|
+
(connection, read) timeouts.
|
412
|
+
:type _request_timeout: int, tuple(int, int), optional
|
413
|
+
:param _request_auth: set to override the auth_settings for an a single
|
414
|
+
request; this effectively ignores the
|
415
|
+
authentication in the spec for a single request.
|
416
|
+
:type _request_auth: dict, optional
|
417
|
+
:param _content_type: force content-type for the request.
|
418
|
+
:type _content_type: str, Optional
|
419
|
+
:param _headers: set to override the headers for a single
|
420
|
+
request; this effectively ignores the headers
|
421
|
+
in the spec for a single request.
|
422
|
+
:type _headers: dict, optional
|
423
|
+
:param _host_index: set to override the host_index for a single
|
424
|
+
request; this effectively ignores the host_index
|
425
|
+
in the spec for a single request.
|
426
|
+
:type _host_index: int, optional
|
427
|
+
:return: Returns the result object.
|
428
|
+
""" # noqa: E501
|
429
|
+
|
430
|
+
_param = self._add_user_to_organization_serialize(
|
431
|
+
organization_id=organization_id,
|
432
|
+
user_id=user_id,
|
433
|
+
_request_auth=_request_auth,
|
434
|
+
_content_type=_content_type,
|
435
|
+
_headers=_headers,
|
436
|
+
_host_index=_host_index
|
437
|
+
)
|
438
|
+
|
439
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
440
|
+
'200': None,
|
441
|
+
}
|
442
|
+
response_data = self.api_client.call_api(
|
443
|
+
*_param,
|
444
|
+
_request_timeout=_request_timeout
|
445
|
+
)
|
446
|
+
response_data.read()
|
447
|
+
return self.api_client.response_deserialize(
|
448
|
+
response_data=response_data,
|
449
|
+
response_types_map=_response_types_map,
|
450
|
+
)
|
451
|
+
|
452
|
+
|
453
|
+
@validate_call
|
454
|
+
def add_user_to_organization_without_preload_content(
|
455
|
+
self,
|
456
|
+
organization_id: StrictInt,
|
457
|
+
user_id: StrictInt,
|
458
|
+
_request_timeout: Union[
|
459
|
+
None,
|
460
|
+
Annotated[StrictFloat, Field(gt=0)],
|
461
|
+
Tuple[
|
462
|
+
Annotated[StrictFloat, Field(gt=0)],
|
463
|
+
Annotated[StrictFloat, Field(gt=0)]
|
464
|
+
]
|
465
|
+
] = None,
|
466
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
467
|
+
_content_type: Optional[StrictStr] = None,
|
468
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
469
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
470
|
+
) -> RESTResponseType:
|
471
|
+
"""Add a user to an organization
|
472
|
+
|
473
|
+
|
474
|
+
:param organization_id: (required)
|
475
|
+
:type organization_id: int
|
476
|
+
:param user_id: (required)
|
477
|
+
:type user_id: int
|
478
|
+
:param _request_timeout: timeout setting for this request. If one
|
479
|
+
number provided, it will be total request
|
480
|
+
timeout. It can also be a pair (tuple) of
|
481
|
+
(connection, read) timeouts.
|
482
|
+
:type _request_timeout: int, tuple(int, int), optional
|
483
|
+
:param _request_auth: set to override the auth_settings for an a single
|
484
|
+
request; this effectively ignores the
|
485
|
+
authentication in the spec for a single request.
|
486
|
+
:type _request_auth: dict, optional
|
487
|
+
:param _content_type: force content-type for the request.
|
488
|
+
:type _content_type: str, Optional
|
489
|
+
:param _headers: set to override the headers for a single
|
490
|
+
request; this effectively ignores the headers
|
491
|
+
in the spec for a single request.
|
492
|
+
:type _headers: dict, optional
|
493
|
+
:param _host_index: set to override the host_index for a single
|
494
|
+
request; this effectively ignores the host_index
|
495
|
+
in the spec for a single request.
|
496
|
+
:type _host_index: int, optional
|
497
|
+
:return: Returns the result object.
|
498
|
+
""" # noqa: E501
|
499
|
+
|
500
|
+
_param = self._add_user_to_organization_serialize(
|
501
|
+
organization_id=organization_id,
|
502
|
+
user_id=user_id,
|
503
|
+
_request_auth=_request_auth,
|
504
|
+
_content_type=_content_type,
|
505
|
+
_headers=_headers,
|
506
|
+
_host_index=_host_index
|
507
|
+
)
|
508
|
+
|
509
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
510
|
+
'200': None,
|
511
|
+
}
|
512
|
+
response_data = self.api_client.call_api(
|
513
|
+
*_param,
|
514
|
+
_request_timeout=_request_timeout
|
515
|
+
)
|
516
|
+
return response_data.response
|
517
|
+
|
518
|
+
|
519
|
+
def _add_user_to_organization_serialize(
|
520
|
+
self,
|
521
|
+
organization_id,
|
522
|
+
user_id,
|
523
|
+
_request_auth,
|
524
|
+
_content_type,
|
525
|
+
_headers,
|
526
|
+
_host_index,
|
527
|
+
) -> RequestSerialized:
|
528
|
+
|
529
|
+
_host = None
|
530
|
+
|
531
|
+
_collection_formats: Dict[str, str] = {
|
532
|
+
}
|
533
|
+
|
534
|
+
_path_params: Dict[str, str] = {}
|
535
|
+
_query_params: List[Tuple[str, str]] = []
|
536
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
537
|
+
_form_params: List[Tuple[str, str]] = []
|
538
|
+
_files: Dict[
|
539
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
540
|
+
] = {}
|
541
|
+
_body_params: Optional[bytes] = None
|
542
|
+
|
543
|
+
# process the path parameters
|
544
|
+
if organization_id is not None:
|
545
|
+
_path_params['organization_id'] = organization_id
|
546
|
+
if user_id is not None:
|
547
|
+
_path_params['user_id'] = user_id
|
548
|
+
# process the query parameters
|
549
|
+
# process the header parameters
|
550
|
+
# process the form parameters
|
551
|
+
# process the body parameter
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
# authentication setting
|
557
|
+
_auth_settings: List[str] = [
|
558
|
+
'QAnswer-Api-Key',
|
559
|
+
'Bearer'
|
560
|
+
]
|
561
|
+
|
562
|
+
return self.api_client.param_serialize(
|
563
|
+
method='POST',
|
564
|
+
resource_path='/api/organization/{organization_id}/users/{user_id}',
|
565
|
+
path_params=_path_params,
|
566
|
+
query_params=_query_params,
|
567
|
+
header_params=_header_params,
|
568
|
+
body=_body_params,
|
569
|
+
post_params=_form_params,
|
570
|
+
files=_files,
|
571
|
+
auth_settings=_auth_settings,
|
572
|
+
collection_formats=_collection_formats,
|
573
|
+
_host=_host,
|
574
|
+
_request_auth=_request_auth
|
575
|
+
)
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
@validate_call
|
581
|
+
def create_organization(
|
582
|
+
self,
|
583
|
+
organization_creation: OrganizationCreation,
|
584
|
+
_request_timeout: Union[
|
585
|
+
None,
|
586
|
+
Annotated[StrictFloat, Field(gt=0)],
|
587
|
+
Tuple[
|
588
|
+
Annotated[StrictFloat, Field(gt=0)],
|
589
|
+
Annotated[StrictFloat, Field(gt=0)]
|
590
|
+
]
|
591
|
+
] = None,
|
592
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
593
|
+
_content_type: Optional[StrictStr] = None,
|
594
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
595
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
596
|
+
) -> Organization:
|
597
|
+
"""Creates a new organization
|
598
|
+
|
599
|
+
Accepts an organization and persists it to the database. This operation requires admin access.
|
600
|
+
|
601
|
+
:param organization_creation: (required)
|
602
|
+
:type organization_creation: OrganizationCreation
|
603
|
+
:param _request_timeout: timeout setting for this request. If one
|
604
|
+
number provided, it will be total request
|
605
|
+
timeout. It can also be a pair (tuple) of
|
606
|
+
(connection, read) timeouts.
|
607
|
+
:type _request_timeout: int, tuple(int, int), optional
|
608
|
+
:param _request_auth: set to override the auth_settings for an a single
|
609
|
+
request; this effectively ignores the
|
610
|
+
authentication in the spec for a single request.
|
611
|
+
:type _request_auth: dict, optional
|
612
|
+
:param _content_type: force content-type for the request.
|
613
|
+
:type _content_type: str, Optional
|
614
|
+
:param _headers: set to override the headers for a single
|
615
|
+
request; this effectively ignores the headers
|
616
|
+
in the spec for a single request.
|
617
|
+
:type _headers: dict, optional
|
618
|
+
:param _host_index: set to override the host_index for a single
|
619
|
+
request; this effectively ignores the host_index
|
620
|
+
in the spec for a single request.
|
621
|
+
:type _host_index: int, optional
|
622
|
+
:return: Returns the result object.
|
623
|
+
""" # noqa: E501
|
624
|
+
|
625
|
+
_param = self._create_organization_serialize(
|
626
|
+
organization_creation=organization_creation,
|
627
|
+
_request_auth=_request_auth,
|
628
|
+
_content_type=_content_type,
|
629
|
+
_headers=_headers,
|
630
|
+
_host_index=_host_index
|
631
|
+
)
|
632
|
+
|
633
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
634
|
+
'200': "Organization",
|
635
|
+
}
|
636
|
+
response_data = self.api_client.call_api(
|
637
|
+
*_param,
|
638
|
+
_request_timeout=_request_timeout
|
639
|
+
)
|
640
|
+
response_data.read()
|
641
|
+
return self.api_client.response_deserialize(
|
642
|
+
response_data=response_data,
|
643
|
+
response_types_map=_response_types_map,
|
644
|
+
).data
|
645
|
+
|
646
|
+
|
647
|
+
@validate_call
|
648
|
+
def create_organization_with_http_info(
|
649
|
+
self,
|
650
|
+
organization_creation: OrganizationCreation,
|
651
|
+
_request_timeout: Union[
|
652
|
+
None,
|
653
|
+
Annotated[StrictFloat, Field(gt=0)],
|
654
|
+
Tuple[
|
655
|
+
Annotated[StrictFloat, Field(gt=0)],
|
656
|
+
Annotated[StrictFloat, Field(gt=0)]
|
657
|
+
]
|
658
|
+
] = None,
|
659
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
660
|
+
_content_type: Optional[StrictStr] = None,
|
661
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
662
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
663
|
+
) -> ApiResponse[Organization]:
|
664
|
+
"""Creates a new organization
|
665
|
+
|
666
|
+
Accepts an organization and persists it to the database. This operation requires admin access.
|
667
|
+
|
668
|
+
:param organization_creation: (required)
|
669
|
+
:type organization_creation: OrganizationCreation
|
670
|
+
:param _request_timeout: timeout setting for this request. If one
|
671
|
+
number provided, it will be total request
|
672
|
+
timeout. It can also be a pair (tuple) of
|
673
|
+
(connection, read) timeouts.
|
674
|
+
:type _request_timeout: int, tuple(int, int), optional
|
675
|
+
:param _request_auth: set to override the auth_settings for an a single
|
676
|
+
request; this effectively ignores the
|
677
|
+
authentication in the spec for a single request.
|
678
|
+
:type _request_auth: dict, optional
|
679
|
+
:param _content_type: force content-type for the request.
|
680
|
+
:type _content_type: str, Optional
|
681
|
+
:param _headers: set to override the headers for a single
|
682
|
+
request; this effectively ignores the headers
|
683
|
+
in the spec for a single request.
|
684
|
+
:type _headers: dict, optional
|
685
|
+
:param _host_index: set to override the host_index for a single
|
686
|
+
request; this effectively ignores the host_index
|
687
|
+
in the spec for a single request.
|
688
|
+
:type _host_index: int, optional
|
689
|
+
:return: Returns the result object.
|
690
|
+
""" # noqa: E501
|
691
|
+
|
692
|
+
_param = self._create_organization_serialize(
|
693
|
+
organization_creation=organization_creation,
|
694
|
+
_request_auth=_request_auth,
|
695
|
+
_content_type=_content_type,
|
696
|
+
_headers=_headers,
|
697
|
+
_host_index=_host_index
|
698
|
+
)
|
699
|
+
|
700
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
701
|
+
'200': "Organization",
|
702
|
+
}
|
703
|
+
response_data = self.api_client.call_api(
|
704
|
+
*_param,
|
705
|
+
_request_timeout=_request_timeout
|
706
|
+
)
|
707
|
+
response_data.read()
|
708
|
+
return self.api_client.response_deserialize(
|
709
|
+
response_data=response_data,
|
710
|
+
response_types_map=_response_types_map,
|
711
|
+
)
|
712
|
+
|
713
|
+
|
714
|
+
@validate_call
|
715
|
+
def create_organization_without_preload_content(
|
716
|
+
self,
|
717
|
+
organization_creation: OrganizationCreation,
|
718
|
+
_request_timeout: Union[
|
719
|
+
None,
|
720
|
+
Annotated[StrictFloat, Field(gt=0)],
|
721
|
+
Tuple[
|
722
|
+
Annotated[StrictFloat, Field(gt=0)],
|
723
|
+
Annotated[StrictFloat, Field(gt=0)]
|
724
|
+
]
|
725
|
+
] = None,
|
726
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
727
|
+
_content_type: Optional[StrictStr] = None,
|
728
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
729
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
730
|
+
) -> RESTResponseType:
|
731
|
+
"""Creates a new organization
|
732
|
+
|
733
|
+
Accepts an organization and persists it to the database. This operation requires admin access.
|
734
|
+
|
735
|
+
:param organization_creation: (required)
|
736
|
+
:type organization_creation: OrganizationCreation
|
737
|
+
:param _request_timeout: timeout setting for this request. If one
|
738
|
+
number provided, it will be total request
|
739
|
+
timeout. It can also be a pair (tuple) of
|
740
|
+
(connection, read) timeouts.
|
741
|
+
:type _request_timeout: int, tuple(int, int), optional
|
742
|
+
:param _request_auth: set to override the auth_settings for an a single
|
743
|
+
request; this effectively ignores the
|
744
|
+
authentication in the spec for a single request.
|
745
|
+
:type _request_auth: dict, optional
|
746
|
+
:param _content_type: force content-type for the request.
|
747
|
+
:type _content_type: str, Optional
|
748
|
+
:param _headers: set to override the headers for a single
|
749
|
+
request; this effectively ignores the headers
|
750
|
+
in the spec for a single request.
|
751
|
+
:type _headers: dict, optional
|
752
|
+
:param _host_index: set to override the host_index for a single
|
753
|
+
request; this effectively ignores the host_index
|
754
|
+
in the spec for a single request.
|
755
|
+
:type _host_index: int, optional
|
756
|
+
:return: Returns the result object.
|
757
|
+
""" # noqa: E501
|
758
|
+
|
759
|
+
_param = self._create_organization_serialize(
|
760
|
+
organization_creation=organization_creation,
|
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': "Organization",
|
769
|
+
}
|
770
|
+
response_data = self.api_client.call_api(
|
771
|
+
*_param,
|
772
|
+
_request_timeout=_request_timeout
|
773
|
+
)
|
774
|
+
return response_data.response
|
775
|
+
|
776
|
+
|
777
|
+
def _create_organization_serialize(
|
778
|
+
self,
|
779
|
+
organization_creation,
|
780
|
+
_request_auth,
|
781
|
+
_content_type,
|
782
|
+
_headers,
|
783
|
+
_host_index,
|
784
|
+
) -> RequestSerialized:
|
785
|
+
|
786
|
+
_host = None
|
787
|
+
|
788
|
+
_collection_formats: Dict[str, str] = {
|
789
|
+
}
|
790
|
+
|
791
|
+
_path_params: Dict[str, str] = {}
|
792
|
+
_query_params: List[Tuple[str, str]] = []
|
793
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
794
|
+
_form_params: List[Tuple[str, str]] = []
|
795
|
+
_files: Dict[
|
796
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
797
|
+
] = {}
|
798
|
+
_body_params: Optional[bytes] = None
|
799
|
+
|
800
|
+
# process the path parameters
|
801
|
+
# process the query parameters
|
802
|
+
# process the header parameters
|
803
|
+
# process the form parameters
|
804
|
+
# process the body parameter
|
805
|
+
if organization_creation is not None:
|
806
|
+
_body_params = organization_creation
|
807
|
+
|
808
|
+
|
809
|
+
# set the HTTP header `Accept`
|
810
|
+
if 'Accept' not in _header_params:
|
811
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
812
|
+
[
|
813
|
+
'*/*'
|
814
|
+
]
|
815
|
+
)
|
816
|
+
|
817
|
+
# set the HTTP header `Content-Type`
|
818
|
+
if _content_type:
|
819
|
+
_header_params['Content-Type'] = _content_type
|
820
|
+
else:
|
821
|
+
_default_content_type = (
|
822
|
+
self.api_client.select_header_content_type(
|
823
|
+
[
|
824
|
+
'application/json'
|
825
|
+
]
|
826
|
+
)
|
827
|
+
)
|
828
|
+
if _default_content_type is not None:
|
829
|
+
_header_params['Content-Type'] = _default_content_type
|
830
|
+
|
831
|
+
# authentication setting
|
832
|
+
_auth_settings: List[str] = [
|
833
|
+
'QAnswer-Api-Key',
|
834
|
+
'Bearer'
|
835
|
+
]
|
836
|
+
|
837
|
+
return self.api_client.param_serialize(
|
838
|
+
method='POST',
|
839
|
+
resource_path='/api/organization/',
|
840
|
+
path_params=_path_params,
|
841
|
+
query_params=_query_params,
|
842
|
+
header_params=_header_params,
|
843
|
+
body=_body_params,
|
844
|
+
post_params=_form_params,
|
845
|
+
files=_files,
|
846
|
+
auth_settings=_auth_settings,
|
847
|
+
collection_formats=_collection_formats,
|
848
|
+
_host=_host,
|
849
|
+
_request_auth=_request_auth
|
850
|
+
)
|
851
|
+
|
852
|
+
|
853
|
+
|
854
|
+
|
855
|
+
@validate_call
|
856
|
+
def delete_admin_from_organization(
|
857
|
+
self,
|
858
|
+
organization_id: StrictInt,
|
859
|
+
user_id: StrictInt,
|
860
|
+
_request_timeout: Union[
|
861
|
+
None,
|
862
|
+
Annotated[StrictFloat, Field(gt=0)],
|
863
|
+
Tuple[
|
864
|
+
Annotated[StrictFloat, Field(gt=0)],
|
865
|
+
Annotated[StrictFloat, Field(gt=0)]
|
866
|
+
]
|
867
|
+
] = None,
|
868
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
869
|
+
_content_type: Optional[StrictStr] = None,
|
870
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
871
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
872
|
+
) -> None:
|
873
|
+
"""Unassigns a admin from an organization
|
874
|
+
|
875
|
+
|
876
|
+
:param organization_id: (required)
|
877
|
+
:type organization_id: int
|
878
|
+
:param user_id: (required)
|
879
|
+
:type user_id: int
|
880
|
+
:param _request_timeout: timeout setting for this request. If one
|
881
|
+
number provided, it will be total request
|
882
|
+
timeout. It can also be a pair (tuple) of
|
883
|
+
(connection, read) timeouts.
|
884
|
+
:type _request_timeout: int, tuple(int, int), optional
|
885
|
+
:param _request_auth: set to override the auth_settings for an a single
|
886
|
+
request; this effectively ignores the
|
887
|
+
authentication in the spec for a single request.
|
888
|
+
:type _request_auth: dict, optional
|
889
|
+
:param _content_type: force content-type for the request.
|
890
|
+
:type _content_type: str, Optional
|
891
|
+
:param _headers: set to override the headers for a single
|
892
|
+
request; this effectively ignores the headers
|
893
|
+
in the spec for a single request.
|
894
|
+
:type _headers: dict, optional
|
895
|
+
:param _host_index: set to override the host_index for a single
|
896
|
+
request; this effectively ignores the host_index
|
897
|
+
in the spec for a single request.
|
898
|
+
:type _host_index: int, optional
|
899
|
+
:return: Returns the result object.
|
900
|
+
""" # noqa: E501
|
901
|
+
|
902
|
+
_param = self._delete_admin_from_organization_serialize(
|
903
|
+
organization_id=organization_id,
|
904
|
+
user_id=user_id,
|
905
|
+
_request_auth=_request_auth,
|
906
|
+
_content_type=_content_type,
|
907
|
+
_headers=_headers,
|
908
|
+
_host_index=_host_index
|
909
|
+
)
|
910
|
+
|
911
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
912
|
+
'200': None,
|
913
|
+
}
|
914
|
+
response_data = self.api_client.call_api(
|
915
|
+
*_param,
|
916
|
+
_request_timeout=_request_timeout
|
917
|
+
)
|
918
|
+
response_data.read()
|
919
|
+
return self.api_client.response_deserialize(
|
920
|
+
response_data=response_data,
|
921
|
+
response_types_map=_response_types_map,
|
922
|
+
).data
|
923
|
+
|
924
|
+
|
925
|
+
@validate_call
|
926
|
+
def delete_admin_from_organization_with_http_info(
|
927
|
+
self,
|
928
|
+
organization_id: StrictInt,
|
929
|
+
user_id: StrictInt,
|
930
|
+
_request_timeout: Union[
|
931
|
+
None,
|
932
|
+
Annotated[StrictFloat, Field(gt=0)],
|
933
|
+
Tuple[
|
934
|
+
Annotated[StrictFloat, Field(gt=0)],
|
935
|
+
Annotated[StrictFloat, Field(gt=0)]
|
936
|
+
]
|
937
|
+
] = None,
|
938
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
939
|
+
_content_type: Optional[StrictStr] = None,
|
940
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
941
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
942
|
+
) -> ApiResponse[None]:
|
943
|
+
"""Unassigns a admin from an organization
|
944
|
+
|
945
|
+
|
946
|
+
:param organization_id: (required)
|
947
|
+
:type organization_id: int
|
948
|
+
:param user_id: (required)
|
949
|
+
:type user_id: int
|
950
|
+
:param _request_timeout: timeout setting for this request. If one
|
951
|
+
number provided, it will be total request
|
952
|
+
timeout. It can also be a pair (tuple) of
|
953
|
+
(connection, read) timeouts.
|
954
|
+
:type _request_timeout: int, tuple(int, int), optional
|
955
|
+
:param _request_auth: set to override the auth_settings for an a single
|
956
|
+
request; this effectively ignores the
|
957
|
+
authentication in the spec for a single request.
|
958
|
+
:type _request_auth: dict, optional
|
959
|
+
:param _content_type: force content-type for the request.
|
960
|
+
:type _content_type: str, Optional
|
961
|
+
:param _headers: set to override the headers for a single
|
962
|
+
request; this effectively ignores the headers
|
963
|
+
in the spec for a single request.
|
964
|
+
:type _headers: dict, optional
|
965
|
+
:param _host_index: set to override the host_index for a single
|
966
|
+
request; this effectively ignores the host_index
|
967
|
+
in the spec for a single request.
|
968
|
+
:type _host_index: int, optional
|
969
|
+
:return: Returns the result object.
|
970
|
+
""" # noqa: E501
|
971
|
+
|
972
|
+
_param = self._delete_admin_from_organization_serialize(
|
973
|
+
organization_id=organization_id,
|
974
|
+
user_id=user_id,
|
975
|
+
_request_auth=_request_auth,
|
976
|
+
_content_type=_content_type,
|
977
|
+
_headers=_headers,
|
978
|
+
_host_index=_host_index
|
979
|
+
)
|
980
|
+
|
981
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
982
|
+
'200': None,
|
983
|
+
}
|
984
|
+
response_data = self.api_client.call_api(
|
985
|
+
*_param,
|
986
|
+
_request_timeout=_request_timeout
|
987
|
+
)
|
988
|
+
response_data.read()
|
989
|
+
return self.api_client.response_deserialize(
|
990
|
+
response_data=response_data,
|
991
|
+
response_types_map=_response_types_map,
|
992
|
+
)
|
993
|
+
|
994
|
+
|
995
|
+
@validate_call
|
996
|
+
def delete_admin_from_organization_without_preload_content(
|
997
|
+
self,
|
998
|
+
organization_id: StrictInt,
|
999
|
+
user_id: StrictInt,
|
1000
|
+
_request_timeout: Union[
|
1001
|
+
None,
|
1002
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1003
|
+
Tuple[
|
1004
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1005
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1006
|
+
]
|
1007
|
+
] = None,
|
1008
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1009
|
+
_content_type: Optional[StrictStr] = None,
|
1010
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1011
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1012
|
+
) -> RESTResponseType:
|
1013
|
+
"""Unassigns a admin from an organization
|
1014
|
+
|
1015
|
+
|
1016
|
+
:param organization_id: (required)
|
1017
|
+
:type organization_id: int
|
1018
|
+
:param user_id: (required)
|
1019
|
+
:type user_id: int
|
1020
|
+
:param _request_timeout: timeout setting for this request. If one
|
1021
|
+
number provided, it will be total request
|
1022
|
+
timeout. It can also be a pair (tuple) of
|
1023
|
+
(connection, read) timeouts.
|
1024
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1025
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1026
|
+
request; this effectively ignores the
|
1027
|
+
authentication in the spec for a single request.
|
1028
|
+
:type _request_auth: dict, optional
|
1029
|
+
:param _content_type: force content-type for the request.
|
1030
|
+
:type _content_type: str, Optional
|
1031
|
+
:param _headers: set to override the headers for a single
|
1032
|
+
request; this effectively ignores the headers
|
1033
|
+
in the spec for a single request.
|
1034
|
+
:type _headers: dict, optional
|
1035
|
+
:param _host_index: set to override the host_index for a single
|
1036
|
+
request; this effectively ignores the host_index
|
1037
|
+
in the spec for a single request.
|
1038
|
+
:type _host_index: int, optional
|
1039
|
+
:return: Returns the result object.
|
1040
|
+
""" # noqa: E501
|
1041
|
+
|
1042
|
+
_param = self._delete_admin_from_organization_serialize(
|
1043
|
+
organization_id=organization_id,
|
1044
|
+
user_id=user_id,
|
1045
|
+
_request_auth=_request_auth,
|
1046
|
+
_content_type=_content_type,
|
1047
|
+
_headers=_headers,
|
1048
|
+
_host_index=_host_index
|
1049
|
+
)
|
1050
|
+
|
1051
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1052
|
+
'200': None,
|
1053
|
+
}
|
1054
|
+
response_data = self.api_client.call_api(
|
1055
|
+
*_param,
|
1056
|
+
_request_timeout=_request_timeout
|
1057
|
+
)
|
1058
|
+
return response_data.response
|
1059
|
+
|
1060
|
+
|
1061
|
+
def _delete_admin_from_organization_serialize(
|
1062
|
+
self,
|
1063
|
+
organization_id,
|
1064
|
+
user_id,
|
1065
|
+
_request_auth,
|
1066
|
+
_content_type,
|
1067
|
+
_headers,
|
1068
|
+
_host_index,
|
1069
|
+
) -> RequestSerialized:
|
1070
|
+
|
1071
|
+
_host = None
|
1072
|
+
|
1073
|
+
_collection_formats: Dict[str, str] = {
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
_path_params: Dict[str, str] = {}
|
1077
|
+
_query_params: List[Tuple[str, str]] = []
|
1078
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1079
|
+
_form_params: List[Tuple[str, str]] = []
|
1080
|
+
_files: Dict[
|
1081
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1082
|
+
] = {}
|
1083
|
+
_body_params: Optional[bytes] = None
|
1084
|
+
|
1085
|
+
# process the path parameters
|
1086
|
+
if organization_id is not None:
|
1087
|
+
_path_params['organization_id'] = organization_id
|
1088
|
+
if user_id is not None:
|
1089
|
+
_path_params['user_id'] = user_id
|
1090
|
+
# process the query parameters
|
1091
|
+
# process the header parameters
|
1092
|
+
# process the form parameters
|
1093
|
+
# process the body parameter
|
1094
|
+
|
1095
|
+
|
1096
|
+
|
1097
|
+
|
1098
|
+
# authentication setting
|
1099
|
+
_auth_settings: List[str] = [
|
1100
|
+
'QAnswer-Api-Key',
|
1101
|
+
'Bearer'
|
1102
|
+
]
|
1103
|
+
|
1104
|
+
return self.api_client.param_serialize(
|
1105
|
+
method='DELETE',
|
1106
|
+
resource_path='/api/organization/{organization_id}/admin/{user_id}',
|
1107
|
+
path_params=_path_params,
|
1108
|
+
query_params=_query_params,
|
1109
|
+
header_params=_header_params,
|
1110
|
+
body=_body_params,
|
1111
|
+
post_params=_form_params,
|
1112
|
+
files=_files,
|
1113
|
+
auth_settings=_auth_settings,
|
1114
|
+
collection_formats=_collection_formats,
|
1115
|
+
_host=_host,
|
1116
|
+
_request_auth=_request_auth
|
1117
|
+
)
|
1118
|
+
|
1119
|
+
|
1120
|
+
|
1121
|
+
|
1122
|
+
@validate_call
|
1123
|
+
def delete_organization(
|
1124
|
+
self,
|
1125
|
+
organization_id: StrictInt,
|
1126
|
+
_request_timeout: Union[
|
1127
|
+
None,
|
1128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1129
|
+
Tuple[
|
1130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1131
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1132
|
+
]
|
1133
|
+
] = None,
|
1134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1135
|
+
_content_type: Optional[StrictStr] = None,
|
1136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1138
|
+
) -> None:
|
1139
|
+
"""Deletes an organization
|
1140
|
+
|
1141
|
+
|
1142
|
+
:param organization_id: (required)
|
1143
|
+
:type organization_id: int
|
1144
|
+
:param _request_timeout: timeout setting for this request. If one
|
1145
|
+
number provided, it will be total request
|
1146
|
+
timeout. It can also be a pair (tuple) of
|
1147
|
+
(connection, read) timeouts.
|
1148
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1149
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1150
|
+
request; this effectively ignores the
|
1151
|
+
authentication in the spec for a single request.
|
1152
|
+
:type _request_auth: dict, optional
|
1153
|
+
:param _content_type: force content-type for the request.
|
1154
|
+
:type _content_type: str, Optional
|
1155
|
+
:param _headers: set to override the headers for a single
|
1156
|
+
request; this effectively ignores the headers
|
1157
|
+
in the spec for a single request.
|
1158
|
+
:type _headers: dict, optional
|
1159
|
+
:param _host_index: set to override the host_index for a single
|
1160
|
+
request; this effectively ignores the host_index
|
1161
|
+
in the spec for a single request.
|
1162
|
+
:type _host_index: int, optional
|
1163
|
+
:return: Returns the result object.
|
1164
|
+
""" # noqa: E501
|
1165
|
+
|
1166
|
+
_param = self._delete_organization_serialize(
|
1167
|
+
organization_id=organization_id,
|
1168
|
+
_request_auth=_request_auth,
|
1169
|
+
_content_type=_content_type,
|
1170
|
+
_headers=_headers,
|
1171
|
+
_host_index=_host_index
|
1172
|
+
)
|
1173
|
+
|
1174
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1175
|
+
'200': None,
|
1176
|
+
}
|
1177
|
+
response_data = self.api_client.call_api(
|
1178
|
+
*_param,
|
1179
|
+
_request_timeout=_request_timeout
|
1180
|
+
)
|
1181
|
+
response_data.read()
|
1182
|
+
return self.api_client.response_deserialize(
|
1183
|
+
response_data=response_data,
|
1184
|
+
response_types_map=_response_types_map,
|
1185
|
+
).data
|
1186
|
+
|
1187
|
+
|
1188
|
+
@validate_call
|
1189
|
+
def delete_organization_with_http_info(
|
1190
|
+
self,
|
1191
|
+
organization_id: StrictInt,
|
1192
|
+
_request_timeout: Union[
|
1193
|
+
None,
|
1194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1195
|
+
Tuple[
|
1196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1197
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1198
|
+
]
|
1199
|
+
] = None,
|
1200
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1201
|
+
_content_type: Optional[StrictStr] = None,
|
1202
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1203
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1204
|
+
) -> ApiResponse[None]:
|
1205
|
+
"""Deletes an organization
|
1206
|
+
|
1207
|
+
|
1208
|
+
:param organization_id: (required)
|
1209
|
+
:type organization_id: int
|
1210
|
+
:param _request_timeout: timeout setting for this request. If one
|
1211
|
+
number provided, it will be total request
|
1212
|
+
timeout. It can also be a pair (tuple) of
|
1213
|
+
(connection, read) timeouts.
|
1214
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1215
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1216
|
+
request; this effectively ignores the
|
1217
|
+
authentication in the spec for a single request.
|
1218
|
+
:type _request_auth: dict, optional
|
1219
|
+
:param _content_type: force content-type for the request.
|
1220
|
+
:type _content_type: str, Optional
|
1221
|
+
:param _headers: set to override the headers for a single
|
1222
|
+
request; this effectively ignores the headers
|
1223
|
+
in the spec for a single request.
|
1224
|
+
:type _headers: dict, optional
|
1225
|
+
:param _host_index: set to override the host_index for a single
|
1226
|
+
request; this effectively ignores the host_index
|
1227
|
+
in the spec for a single request.
|
1228
|
+
:type _host_index: int, optional
|
1229
|
+
:return: Returns the result object.
|
1230
|
+
""" # noqa: E501
|
1231
|
+
|
1232
|
+
_param = self._delete_organization_serialize(
|
1233
|
+
organization_id=organization_id,
|
1234
|
+
_request_auth=_request_auth,
|
1235
|
+
_content_type=_content_type,
|
1236
|
+
_headers=_headers,
|
1237
|
+
_host_index=_host_index
|
1238
|
+
)
|
1239
|
+
|
1240
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1241
|
+
'200': None,
|
1242
|
+
}
|
1243
|
+
response_data = self.api_client.call_api(
|
1244
|
+
*_param,
|
1245
|
+
_request_timeout=_request_timeout
|
1246
|
+
)
|
1247
|
+
response_data.read()
|
1248
|
+
return self.api_client.response_deserialize(
|
1249
|
+
response_data=response_data,
|
1250
|
+
response_types_map=_response_types_map,
|
1251
|
+
)
|
1252
|
+
|
1253
|
+
|
1254
|
+
@validate_call
|
1255
|
+
def delete_organization_without_preload_content(
|
1256
|
+
self,
|
1257
|
+
organization_id: StrictInt,
|
1258
|
+
_request_timeout: Union[
|
1259
|
+
None,
|
1260
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1261
|
+
Tuple[
|
1262
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1263
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1264
|
+
]
|
1265
|
+
] = None,
|
1266
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1267
|
+
_content_type: Optional[StrictStr] = None,
|
1268
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1269
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1270
|
+
) -> RESTResponseType:
|
1271
|
+
"""Deletes an organization
|
1272
|
+
|
1273
|
+
|
1274
|
+
:param organization_id: (required)
|
1275
|
+
:type organization_id: int
|
1276
|
+
:param _request_timeout: timeout setting for this request. If one
|
1277
|
+
number provided, it will be total request
|
1278
|
+
timeout. It can also be a pair (tuple) of
|
1279
|
+
(connection, read) timeouts.
|
1280
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1281
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1282
|
+
request; this effectively ignores the
|
1283
|
+
authentication in the spec for a single request.
|
1284
|
+
:type _request_auth: dict, optional
|
1285
|
+
:param _content_type: force content-type for the request.
|
1286
|
+
:type _content_type: str, Optional
|
1287
|
+
:param _headers: set to override the headers for a single
|
1288
|
+
request; this effectively ignores the headers
|
1289
|
+
in the spec for a single request.
|
1290
|
+
:type _headers: dict, optional
|
1291
|
+
:param _host_index: set to override the host_index for a single
|
1292
|
+
request; this effectively ignores the host_index
|
1293
|
+
in the spec for a single request.
|
1294
|
+
:type _host_index: int, optional
|
1295
|
+
:return: Returns the result object.
|
1296
|
+
""" # noqa: E501
|
1297
|
+
|
1298
|
+
_param = self._delete_organization_serialize(
|
1299
|
+
organization_id=organization_id,
|
1300
|
+
_request_auth=_request_auth,
|
1301
|
+
_content_type=_content_type,
|
1302
|
+
_headers=_headers,
|
1303
|
+
_host_index=_host_index
|
1304
|
+
)
|
1305
|
+
|
1306
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1307
|
+
'200': None,
|
1308
|
+
}
|
1309
|
+
response_data = self.api_client.call_api(
|
1310
|
+
*_param,
|
1311
|
+
_request_timeout=_request_timeout
|
1312
|
+
)
|
1313
|
+
return response_data.response
|
1314
|
+
|
1315
|
+
|
1316
|
+
def _delete_organization_serialize(
|
1317
|
+
self,
|
1318
|
+
organization_id,
|
1319
|
+
_request_auth,
|
1320
|
+
_content_type,
|
1321
|
+
_headers,
|
1322
|
+
_host_index,
|
1323
|
+
) -> RequestSerialized:
|
1324
|
+
|
1325
|
+
_host = None
|
1326
|
+
|
1327
|
+
_collection_formats: Dict[str, str] = {
|
1328
|
+
}
|
1329
|
+
|
1330
|
+
_path_params: Dict[str, str] = {}
|
1331
|
+
_query_params: List[Tuple[str, str]] = []
|
1332
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1333
|
+
_form_params: List[Tuple[str, str]] = []
|
1334
|
+
_files: Dict[
|
1335
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1336
|
+
] = {}
|
1337
|
+
_body_params: Optional[bytes] = None
|
1338
|
+
|
1339
|
+
# process the path parameters
|
1340
|
+
if organization_id is not None:
|
1341
|
+
_path_params['organization_id'] = organization_id
|
1342
|
+
# process the query parameters
|
1343
|
+
# process the header parameters
|
1344
|
+
# process the form parameters
|
1345
|
+
# process the body parameter
|
1346
|
+
|
1347
|
+
|
1348
|
+
|
1349
|
+
|
1350
|
+
# authentication setting
|
1351
|
+
_auth_settings: List[str] = [
|
1352
|
+
'QAnswer-Api-Key',
|
1353
|
+
'Bearer'
|
1354
|
+
]
|
1355
|
+
|
1356
|
+
return self.api_client.param_serialize(
|
1357
|
+
method='DELETE',
|
1358
|
+
resource_path='/api/organization/{organization_id}',
|
1359
|
+
path_params=_path_params,
|
1360
|
+
query_params=_query_params,
|
1361
|
+
header_params=_header_params,
|
1362
|
+
body=_body_params,
|
1363
|
+
post_params=_form_params,
|
1364
|
+
files=_files,
|
1365
|
+
auth_settings=_auth_settings,
|
1366
|
+
collection_formats=_collection_formats,
|
1367
|
+
_host=_host,
|
1368
|
+
_request_auth=_request_auth
|
1369
|
+
)
|
1370
|
+
|
1371
|
+
|
1372
|
+
|
1373
|
+
|
1374
|
+
@validate_call
|
1375
|
+
def delete_user_from_organization(
|
1376
|
+
self,
|
1377
|
+
organization_id: StrictInt,
|
1378
|
+
user_id: StrictInt,
|
1379
|
+
_request_timeout: Union[
|
1380
|
+
None,
|
1381
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1382
|
+
Tuple[
|
1383
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1384
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1385
|
+
]
|
1386
|
+
] = None,
|
1387
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1388
|
+
_content_type: Optional[StrictStr] = None,
|
1389
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1390
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1391
|
+
) -> None:
|
1392
|
+
"""Deletes the user from the organization, i.e. from all teams
|
1393
|
+
|
1394
|
+
|
1395
|
+
:param organization_id: (required)
|
1396
|
+
:type organization_id: int
|
1397
|
+
:param user_id: (required)
|
1398
|
+
:type user_id: int
|
1399
|
+
:param _request_timeout: timeout setting for this request. If one
|
1400
|
+
number provided, it will be total request
|
1401
|
+
timeout. It can also be a pair (tuple) of
|
1402
|
+
(connection, read) timeouts.
|
1403
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1404
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1405
|
+
request; this effectively ignores the
|
1406
|
+
authentication in the spec for a single request.
|
1407
|
+
:type _request_auth: dict, optional
|
1408
|
+
:param _content_type: force content-type for the request.
|
1409
|
+
:type _content_type: str, Optional
|
1410
|
+
:param _headers: set to override the headers for a single
|
1411
|
+
request; this effectively ignores the headers
|
1412
|
+
in the spec for a single request.
|
1413
|
+
:type _headers: dict, optional
|
1414
|
+
:param _host_index: set to override the host_index for a single
|
1415
|
+
request; this effectively ignores the host_index
|
1416
|
+
in the spec for a single request.
|
1417
|
+
:type _host_index: int, optional
|
1418
|
+
:return: Returns the result object.
|
1419
|
+
""" # noqa: E501
|
1420
|
+
|
1421
|
+
_param = self._delete_user_from_organization_serialize(
|
1422
|
+
organization_id=organization_id,
|
1423
|
+
user_id=user_id,
|
1424
|
+
_request_auth=_request_auth,
|
1425
|
+
_content_type=_content_type,
|
1426
|
+
_headers=_headers,
|
1427
|
+
_host_index=_host_index
|
1428
|
+
)
|
1429
|
+
|
1430
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1431
|
+
'200': None,
|
1432
|
+
}
|
1433
|
+
response_data = self.api_client.call_api(
|
1434
|
+
*_param,
|
1435
|
+
_request_timeout=_request_timeout
|
1436
|
+
)
|
1437
|
+
response_data.read()
|
1438
|
+
return self.api_client.response_deserialize(
|
1439
|
+
response_data=response_data,
|
1440
|
+
response_types_map=_response_types_map,
|
1441
|
+
).data
|
1442
|
+
|
1443
|
+
|
1444
|
+
@validate_call
|
1445
|
+
def delete_user_from_organization_with_http_info(
|
1446
|
+
self,
|
1447
|
+
organization_id: StrictInt,
|
1448
|
+
user_id: StrictInt,
|
1449
|
+
_request_timeout: Union[
|
1450
|
+
None,
|
1451
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1452
|
+
Tuple[
|
1453
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1454
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1455
|
+
]
|
1456
|
+
] = None,
|
1457
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1458
|
+
_content_type: Optional[StrictStr] = None,
|
1459
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1460
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1461
|
+
) -> ApiResponse[None]:
|
1462
|
+
"""Deletes the user from the organization, i.e. from all teams
|
1463
|
+
|
1464
|
+
|
1465
|
+
:param organization_id: (required)
|
1466
|
+
:type organization_id: int
|
1467
|
+
:param user_id: (required)
|
1468
|
+
:type user_id: int
|
1469
|
+
:param _request_timeout: timeout setting for this request. If one
|
1470
|
+
number provided, it will be total request
|
1471
|
+
timeout. It can also be a pair (tuple) of
|
1472
|
+
(connection, read) timeouts.
|
1473
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1474
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1475
|
+
request; this effectively ignores the
|
1476
|
+
authentication in the spec for a single request.
|
1477
|
+
:type _request_auth: dict, optional
|
1478
|
+
:param _content_type: force content-type for the request.
|
1479
|
+
:type _content_type: str, Optional
|
1480
|
+
:param _headers: set to override the headers for a single
|
1481
|
+
request; this effectively ignores the headers
|
1482
|
+
in the spec for a single request.
|
1483
|
+
:type _headers: dict, optional
|
1484
|
+
:param _host_index: set to override the host_index for a single
|
1485
|
+
request; this effectively ignores the host_index
|
1486
|
+
in the spec for a single request.
|
1487
|
+
:type _host_index: int, optional
|
1488
|
+
:return: Returns the result object.
|
1489
|
+
""" # noqa: E501
|
1490
|
+
|
1491
|
+
_param = self._delete_user_from_organization_serialize(
|
1492
|
+
organization_id=organization_id,
|
1493
|
+
user_id=user_id,
|
1494
|
+
_request_auth=_request_auth,
|
1495
|
+
_content_type=_content_type,
|
1496
|
+
_headers=_headers,
|
1497
|
+
_host_index=_host_index
|
1498
|
+
)
|
1499
|
+
|
1500
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1501
|
+
'200': None,
|
1502
|
+
}
|
1503
|
+
response_data = self.api_client.call_api(
|
1504
|
+
*_param,
|
1505
|
+
_request_timeout=_request_timeout
|
1506
|
+
)
|
1507
|
+
response_data.read()
|
1508
|
+
return self.api_client.response_deserialize(
|
1509
|
+
response_data=response_data,
|
1510
|
+
response_types_map=_response_types_map,
|
1511
|
+
)
|
1512
|
+
|
1513
|
+
|
1514
|
+
@validate_call
|
1515
|
+
def delete_user_from_organization_without_preload_content(
|
1516
|
+
self,
|
1517
|
+
organization_id: StrictInt,
|
1518
|
+
user_id: StrictInt,
|
1519
|
+
_request_timeout: Union[
|
1520
|
+
None,
|
1521
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1522
|
+
Tuple[
|
1523
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1524
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1525
|
+
]
|
1526
|
+
] = None,
|
1527
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1528
|
+
_content_type: Optional[StrictStr] = None,
|
1529
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1530
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1531
|
+
) -> RESTResponseType:
|
1532
|
+
"""Deletes the user from the organization, i.e. from all teams
|
1533
|
+
|
1534
|
+
|
1535
|
+
:param organization_id: (required)
|
1536
|
+
:type organization_id: int
|
1537
|
+
:param user_id: (required)
|
1538
|
+
:type user_id: int
|
1539
|
+
:param _request_timeout: timeout setting for this request. If one
|
1540
|
+
number provided, it will be total request
|
1541
|
+
timeout. It can also be a pair (tuple) of
|
1542
|
+
(connection, read) timeouts.
|
1543
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1544
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1545
|
+
request; this effectively ignores the
|
1546
|
+
authentication in the spec for a single request.
|
1547
|
+
:type _request_auth: dict, optional
|
1548
|
+
:param _content_type: force content-type for the request.
|
1549
|
+
:type _content_type: str, Optional
|
1550
|
+
:param _headers: set to override the headers for a single
|
1551
|
+
request; this effectively ignores the headers
|
1552
|
+
in the spec for a single request.
|
1553
|
+
:type _headers: dict, optional
|
1554
|
+
:param _host_index: set to override the host_index for a single
|
1555
|
+
request; this effectively ignores the host_index
|
1556
|
+
in the spec for a single request.
|
1557
|
+
:type _host_index: int, optional
|
1558
|
+
:return: Returns the result object.
|
1559
|
+
""" # noqa: E501
|
1560
|
+
|
1561
|
+
_param = self._delete_user_from_organization_serialize(
|
1562
|
+
organization_id=organization_id,
|
1563
|
+
user_id=user_id,
|
1564
|
+
_request_auth=_request_auth,
|
1565
|
+
_content_type=_content_type,
|
1566
|
+
_headers=_headers,
|
1567
|
+
_host_index=_host_index
|
1568
|
+
)
|
1569
|
+
|
1570
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1571
|
+
'200': None,
|
1572
|
+
}
|
1573
|
+
response_data = self.api_client.call_api(
|
1574
|
+
*_param,
|
1575
|
+
_request_timeout=_request_timeout
|
1576
|
+
)
|
1577
|
+
return response_data.response
|
1578
|
+
|
1579
|
+
|
1580
|
+
def _delete_user_from_organization_serialize(
|
1581
|
+
self,
|
1582
|
+
organization_id,
|
1583
|
+
user_id,
|
1584
|
+
_request_auth,
|
1585
|
+
_content_type,
|
1586
|
+
_headers,
|
1587
|
+
_host_index,
|
1588
|
+
) -> RequestSerialized:
|
1589
|
+
|
1590
|
+
_host = None
|
1591
|
+
|
1592
|
+
_collection_formats: Dict[str, str] = {
|
1593
|
+
}
|
1594
|
+
|
1595
|
+
_path_params: Dict[str, str] = {}
|
1596
|
+
_query_params: List[Tuple[str, str]] = []
|
1597
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1598
|
+
_form_params: List[Tuple[str, str]] = []
|
1599
|
+
_files: Dict[
|
1600
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1601
|
+
] = {}
|
1602
|
+
_body_params: Optional[bytes] = None
|
1603
|
+
|
1604
|
+
# process the path parameters
|
1605
|
+
if organization_id is not None:
|
1606
|
+
_path_params['organization_id'] = organization_id
|
1607
|
+
if user_id is not None:
|
1608
|
+
_path_params['user_id'] = user_id
|
1609
|
+
# process the query parameters
|
1610
|
+
# process the header parameters
|
1611
|
+
# process the form parameters
|
1612
|
+
# process the body parameter
|
1613
|
+
|
1614
|
+
|
1615
|
+
|
1616
|
+
|
1617
|
+
# authentication setting
|
1618
|
+
_auth_settings: List[str] = [
|
1619
|
+
'QAnswer-Api-Key',
|
1620
|
+
'Bearer'
|
1621
|
+
]
|
1622
|
+
|
1623
|
+
return self.api_client.param_serialize(
|
1624
|
+
method='DELETE',
|
1625
|
+
resource_path='/api/organization/{organization_id}/users/{user_id}',
|
1626
|
+
path_params=_path_params,
|
1627
|
+
query_params=_query_params,
|
1628
|
+
header_params=_header_params,
|
1629
|
+
body=_body_params,
|
1630
|
+
post_params=_form_params,
|
1631
|
+
files=_files,
|
1632
|
+
auth_settings=_auth_settings,
|
1633
|
+
collection_formats=_collection_formats,
|
1634
|
+
_host=_host,
|
1635
|
+
_request_auth=_request_auth
|
1636
|
+
)
|
1637
|
+
|
1638
|
+
|
1639
|
+
|
1640
|
+
|
1641
|
+
@validate_call
|
1642
|
+
def get_llm_endpoints(
|
1643
|
+
self,
|
1644
|
+
organization_id: StrictInt,
|
1645
|
+
_request_timeout: Union[
|
1646
|
+
None,
|
1647
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1648
|
+
Tuple[
|
1649
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1650
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1651
|
+
]
|
1652
|
+
] = None,
|
1653
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1654
|
+
_content_type: Optional[StrictStr] = None,
|
1655
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1656
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1657
|
+
) -> List[LlmDetailedDto]:
|
1658
|
+
"""Get all LLM endpoints associated with an organization
|
1659
|
+
|
1660
|
+
|
1661
|
+
:param organization_id: (required)
|
1662
|
+
:type organization_id: int
|
1663
|
+
:param _request_timeout: timeout setting for this request. If one
|
1664
|
+
number provided, it will be total request
|
1665
|
+
timeout. It can also be a pair (tuple) of
|
1666
|
+
(connection, read) timeouts.
|
1667
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1668
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1669
|
+
request; this effectively ignores the
|
1670
|
+
authentication in the spec for a single request.
|
1671
|
+
:type _request_auth: dict, optional
|
1672
|
+
:param _content_type: force content-type for the request.
|
1673
|
+
:type _content_type: str, Optional
|
1674
|
+
:param _headers: set to override the headers for a single
|
1675
|
+
request; this effectively ignores the headers
|
1676
|
+
in the spec for a single request.
|
1677
|
+
:type _headers: dict, optional
|
1678
|
+
:param _host_index: set to override the host_index for a single
|
1679
|
+
request; this effectively ignores the host_index
|
1680
|
+
in the spec for a single request.
|
1681
|
+
:type _host_index: int, optional
|
1682
|
+
:return: Returns the result object.
|
1683
|
+
""" # noqa: E501
|
1684
|
+
|
1685
|
+
_param = self._get_llm_endpoints_serialize(
|
1686
|
+
organization_id=organization_id,
|
1687
|
+
_request_auth=_request_auth,
|
1688
|
+
_content_type=_content_type,
|
1689
|
+
_headers=_headers,
|
1690
|
+
_host_index=_host_index
|
1691
|
+
)
|
1692
|
+
|
1693
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1694
|
+
'200': "List[LlmDetailedDto]",
|
1695
|
+
}
|
1696
|
+
response_data = self.api_client.call_api(
|
1697
|
+
*_param,
|
1698
|
+
_request_timeout=_request_timeout
|
1699
|
+
)
|
1700
|
+
response_data.read()
|
1701
|
+
return self.api_client.response_deserialize(
|
1702
|
+
response_data=response_data,
|
1703
|
+
response_types_map=_response_types_map,
|
1704
|
+
).data
|
1705
|
+
|
1706
|
+
|
1707
|
+
@validate_call
|
1708
|
+
def get_llm_endpoints_with_http_info(
|
1709
|
+
self,
|
1710
|
+
organization_id: StrictInt,
|
1711
|
+
_request_timeout: Union[
|
1712
|
+
None,
|
1713
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1714
|
+
Tuple[
|
1715
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1716
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1717
|
+
]
|
1718
|
+
] = None,
|
1719
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1720
|
+
_content_type: Optional[StrictStr] = None,
|
1721
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1722
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1723
|
+
) -> ApiResponse[List[LlmDetailedDto]]:
|
1724
|
+
"""Get all LLM endpoints associated with an organization
|
1725
|
+
|
1726
|
+
|
1727
|
+
:param organization_id: (required)
|
1728
|
+
:type organization_id: int
|
1729
|
+
:param _request_timeout: timeout setting for this request. If one
|
1730
|
+
number provided, it will be total request
|
1731
|
+
timeout. It can also be a pair (tuple) of
|
1732
|
+
(connection, read) timeouts.
|
1733
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1734
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1735
|
+
request; this effectively ignores the
|
1736
|
+
authentication in the spec for a single request.
|
1737
|
+
:type _request_auth: dict, optional
|
1738
|
+
:param _content_type: force content-type for the request.
|
1739
|
+
:type _content_type: str, Optional
|
1740
|
+
:param _headers: set to override the headers for a single
|
1741
|
+
request; this effectively ignores the headers
|
1742
|
+
in the spec for a single request.
|
1743
|
+
:type _headers: dict, optional
|
1744
|
+
:param _host_index: set to override the host_index for a single
|
1745
|
+
request; this effectively ignores the host_index
|
1746
|
+
in the spec for a single request.
|
1747
|
+
:type _host_index: int, optional
|
1748
|
+
:return: Returns the result object.
|
1749
|
+
""" # noqa: E501
|
1750
|
+
|
1751
|
+
_param = self._get_llm_endpoints_serialize(
|
1752
|
+
organization_id=organization_id,
|
1753
|
+
_request_auth=_request_auth,
|
1754
|
+
_content_type=_content_type,
|
1755
|
+
_headers=_headers,
|
1756
|
+
_host_index=_host_index
|
1757
|
+
)
|
1758
|
+
|
1759
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1760
|
+
'200': "List[LlmDetailedDto]",
|
1761
|
+
}
|
1762
|
+
response_data = self.api_client.call_api(
|
1763
|
+
*_param,
|
1764
|
+
_request_timeout=_request_timeout
|
1765
|
+
)
|
1766
|
+
response_data.read()
|
1767
|
+
return self.api_client.response_deserialize(
|
1768
|
+
response_data=response_data,
|
1769
|
+
response_types_map=_response_types_map,
|
1770
|
+
)
|
1771
|
+
|
1772
|
+
|
1773
|
+
@validate_call
|
1774
|
+
def get_llm_endpoints_without_preload_content(
|
1775
|
+
self,
|
1776
|
+
organization_id: StrictInt,
|
1777
|
+
_request_timeout: Union[
|
1778
|
+
None,
|
1779
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1780
|
+
Tuple[
|
1781
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1782
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1783
|
+
]
|
1784
|
+
] = None,
|
1785
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1786
|
+
_content_type: Optional[StrictStr] = None,
|
1787
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1788
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1789
|
+
) -> RESTResponseType:
|
1790
|
+
"""Get all LLM endpoints associated with an organization
|
1791
|
+
|
1792
|
+
|
1793
|
+
:param organization_id: (required)
|
1794
|
+
:type organization_id: int
|
1795
|
+
:param _request_timeout: timeout setting for this request. If one
|
1796
|
+
number provided, it will be total request
|
1797
|
+
timeout. It can also be a pair (tuple) of
|
1798
|
+
(connection, read) timeouts.
|
1799
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1800
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1801
|
+
request; this effectively ignores the
|
1802
|
+
authentication in the spec for a single request.
|
1803
|
+
:type _request_auth: dict, optional
|
1804
|
+
:param _content_type: force content-type for the request.
|
1805
|
+
:type _content_type: str, Optional
|
1806
|
+
:param _headers: set to override the headers for a single
|
1807
|
+
request; this effectively ignores the headers
|
1808
|
+
in the spec for a single request.
|
1809
|
+
:type _headers: dict, optional
|
1810
|
+
:param _host_index: set to override the host_index for a single
|
1811
|
+
request; this effectively ignores the host_index
|
1812
|
+
in the spec for a single request.
|
1813
|
+
:type _host_index: int, optional
|
1814
|
+
:return: Returns the result object.
|
1815
|
+
""" # noqa: E501
|
1816
|
+
|
1817
|
+
_param = self._get_llm_endpoints_serialize(
|
1818
|
+
organization_id=organization_id,
|
1819
|
+
_request_auth=_request_auth,
|
1820
|
+
_content_type=_content_type,
|
1821
|
+
_headers=_headers,
|
1822
|
+
_host_index=_host_index
|
1823
|
+
)
|
1824
|
+
|
1825
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1826
|
+
'200': "List[LlmDetailedDto]",
|
1827
|
+
}
|
1828
|
+
response_data = self.api_client.call_api(
|
1829
|
+
*_param,
|
1830
|
+
_request_timeout=_request_timeout
|
1831
|
+
)
|
1832
|
+
return response_data.response
|
1833
|
+
|
1834
|
+
|
1835
|
+
def _get_llm_endpoints_serialize(
|
1836
|
+
self,
|
1837
|
+
organization_id,
|
1838
|
+
_request_auth,
|
1839
|
+
_content_type,
|
1840
|
+
_headers,
|
1841
|
+
_host_index,
|
1842
|
+
) -> RequestSerialized:
|
1843
|
+
|
1844
|
+
_host = None
|
1845
|
+
|
1846
|
+
_collection_formats: Dict[str, str] = {
|
1847
|
+
}
|
1848
|
+
|
1849
|
+
_path_params: Dict[str, str] = {}
|
1850
|
+
_query_params: List[Tuple[str, str]] = []
|
1851
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1852
|
+
_form_params: List[Tuple[str, str]] = []
|
1853
|
+
_files: Dict[
|
1854
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1855
|
+
] = {}
|
1856
|
+
_body_params: Optional[bytes] = None
|
1857
|
+
|
1858
|
+
# process the path parameters
|
1859
|
+
if organization_id is not None:
|
1860
|
+
_path_params['organization_id'] = organization_id
|
1861
|
+
# process the query parameters
|
1862
|
+
# process the header parameters
|
1863
|
+
# process the form parameters
|
1864
|
+
# process the body parameter
|
1865
|
+
|
1866
|
+
|
1867
|
+
# set the HTTP header `Accept`
|
1868
|
+
if 'Accept' not in _header_params:
|
1869
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1870
|
+
[
|
1871
|
+
'*/*'
|
1872
|
+
]
|
1873
|
+
)
|
1874
|
+
|
1875
|
+
|
1876
|
+
# authentication setting
|
1877
|
+
_auth_settings: List[str] = [
|
1878
|
+
'QAnswer-Api-Key',
|
1879
|
+
'Bearer'
|
1880
|
+
]
|
1881
|
+
|
1882
|
+
return self.api_client.param_serialize(
|
1883
|
+
method='GET',
|
1884
|
+
resource_path='/api/organization/{organization_id}/llms',
|
1885
|
+
path_params=_path_params,
|
1886
|
+
query_params=_query_params,
|
1887
|
+
header_params=_header_params,
|
1888
|
+
body=_body_params,
|
1889
|
+
post_params=_form_params,
|
1890
|
+
files=_files,
|
1891
|
+
auth_settings=_auth_settings,
|
1892
|
+
collection_formats=_collection_formats,
|
1893
|
+
_host=_host,
|
1894
|
+
_request_auth=_request_auth
|
1895
|
+
)
|
1896
|
+
|
1897
|
+
|
1898
|
+
|
1899
|
+
|
1900
|
+
@validate_call
|
1901
|
+
def get_organization_by_id(
|
1902
|
+
self,
|
1903
|
+
organization_id: StrictInt,
|
1904
|
+
_request_timeout: Union[
|
1905
|
+
None,
|
1906
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1907
|
+
Tuple[
|
1908
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1909
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1910
|
+
]
|
1911
|
+
] = None,
|
1912
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1913
|
+
_content_type: Optional[StrictStr] = None,
|
1914
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1915
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1916
|
+
) -> Organization:
|
1917
|
+
"""Retrieves an organization by ID
|
1918
|
+
|
1919
|
+
Returns an organization if found, otherwise 404 Not Found
|
1920
|
+
|
1921
|
+
:param organization_id: (required)
|
1922
|
+
:type organization_id: int
|
1923
|
+
:param _request_timeout: timeout setting for this request. If one
|
1924
|
+
number provided, it will be total request
|
1925
|
+
timeout. It can also be a pair (tuple) of
|
1926
|
+
(connection, read) timeouts.
|
1927
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1928
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1929
|
+
request; this effectively ignores the
|
1930
|
+
authentication in the spec for a single request.
|
1931
|
+
:type _request_auth: dict, optional
|
1932
|
+
:param _content_type: force content-type for the request.
|
1933
|
+
:type _content_type: str, Optional
|
1934
|
+
:param _headers: set to override the headers for a single
|
1935
|
+
request; this effectively ignores the headers
|
1936
|
+
in the spec for a single request.
|
1937
|
+
:type _headers: dict, optional
|
1938
|
+
:param _host_index: set to override the host_index for a single
|
1939
|
+
request; this effectively ignores the host_index
|
1940
|
+
in the spec for a single request.
|
1941
|
+
:type _host_index: int, optional
|
1942
|
+
:return: Returns the result object.
|
1943
|
+
""" # noqa: E501
|
1944
|
+
|
1945
|
+
_param = self._get_organization_by_id_serialize(
|
1946
|
+
organization_id=organization_id,
|
1947
|
+
_request_auth=_request_auth,
|
1948
|
+
_content_type=_content_type,
|
1949
|
+
_headers=_headers,
|
1950
|
+
_host_index=_host_index
|
1951
|
+
)
|
1952
|
+
|
1953
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1954
|
+
'200': "Organization",
|
1955
|
+
}
|
1956
|
+
response_data = self.api_client.call_api(
|
1957
|
+
*_param,
|
1958
|
+
_request_timeout=_request_timeout
|
1959
|
+
)
|
1960
|
+
response_data.read()
|
1961
|
+
return self.api_client.response_deserialize(
|
1962
|
+
response_data=response_data,
|
1963
|
+
response_types_map=_response_types_map,
|
1964
|
+
).data
|
1965
|
+
|
1966
|
+
|
1967
|
+
@validate_call
|
1968
|
+
def get_organization_by_id_with_http_info(
|
1969
|
+
self,
|
1970
|
+
organization_id: StrictInt,
|
1971
|
+
_request_timeout: Union[
|
1972
|
+
None,
|
1973
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1974
|
+
Tuple[
|
1975
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1976
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1977
|
+
]
|
1978
|
+
] = None,
|
1979
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1980
|
+
_content_type: Optional[StrictStr] = None,
|
1981
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1982
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1983
|
+
) -> ApiResponse[Organization]:
|
1984
|
+
"""Retrieves an organization by ID
|
1985
|
+
|
1986
|
+
Returns an organization if found, otherwise 404 Not Found
|
1987
|
+
|
1988
|
+
:param organization_id: (required)
|
1989
|
+
:type organization_id: int
|
1990
|
+
:param _request_timeout: timeout setting for this request. If one
|
1991
|
+
number provided, it will be total request
|
1992
|
+
timeout. It can also be a pair (tuple) of
|
1993
|
+
(connection, read) timeouts.
|
1994
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1995
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1996
|
+
request; this effectively ignores the
|
1997
|
+
authentication in the spec for a single request.
|
1998
|
+
:type _request_auth: dict, optional
|
1999
|
+
:param _content_type: force content-type for the request.
|
2000
|
+
:type _content_type: str, Optional
|
2001
|
+
:param _headers: set to override the headers for a single
|
2002
|
+
request; this effectively ignores the headers
|
2003
|
+
in the spec for a single request.
|
2004
|
+
:type _headers: dict, optional
|
2005
|
+
:param _host_index: set to override the host_index for a single
|
2006
|
+
request; this effectively ignores the host_index
|
2007
|
+
in the spec for a single request.
|
2008
|
+
:type _host_index: int, optional
|
2009
|
+
:return: Returns the result object.
|
2010
|
+
""" # noqa: E501
|
2011
|
+
|
2012
|
+
_param = self._get_organization_by_id_serialize(
|
2013
|
+
organization_id=organization_id,
|
2014
|
+
_request_auth=_request_auth,
|
2015
|
+
_content_type=_content_type,
|
2016
|
+
_headers=_headers,
|
2017
|
+
_host_index=_host_index
|
2018
|
+
)
|
2019
|
+
|
2020
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2021
|
+
'200': "Organization",
|
2022
|
+
}
|
2023
|
+
response_data = self.api_client.call_api(
|
2024
|
+
*_param,
|
2025
|
+
_request_timeout=_request_timeout
|
2026
|
+
)
|
2027
|
+
response_data.read()
|
2028
|
+
return self.api_client.response_deserialize(
|
2029
|
+
response_data=response_data,
|
2030
|
+
response_types_map=_response_types_map,
|
2031
|
+
)
|
2032
|
+
|
2033
|
+
|
2034
|
+
@validate_call
|
2035
|
+
def get_organization_by_id_without_preload_content(
|
2036
|
+
self,
|
2037
|
+
organization_id: StrictInt,
|
2038
|
+
_request_timeout: Union[
|
2039
|
+
None,
|
2040
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2041
|
+
Tuple[
|
2042
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2043
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2044
|
+
]
|
2045
|
+
] = None,
|
2046
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2047
|
+
_content_type: Optional[StrictStr] = None,
|
2048
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2049
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2050
|
+
) -> RESTResponseType:
|
2051
|
+
"""Retrieves an organization by ID
|
2052
|
+
|
2053
|
+
Returns an organization if found, otherwise 404 Not Found
|
2054
|
+
|
2055
|
+
:param organization_id: (required)
|
2056
|
+
:type organization_id: int
|
2057
|
+
:param _request_timeout: timeout setting for this request. If one
|
2058
|
+
number provided, it will be total request
|
2059
|
+
timeout. It can also be a pair (tuple) of
|
2060
|
+
(connection, read) timeouts.
|
2061
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2062
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2063
|
+
request; this effectively ignores the
|
2064
|
+
authentication in the spec for a single request.
|
2065
|
+
:type _request_auth: dict, optional
|
2066
|
+
:param _content_type: force content-type for the request.
|
2067
|
+
:type _content_type: str, Optional
|
2068
|
+
:param _headers: set to override the headers for a single
|
2069
|
+
request; this effectively ignores the headers
|
2070
|
+
in the spec for a single request.
|
2071
|
+
:type _headers: dict, optional
|
2072
|
+
:param _host_index: set to override the host_index for a single
|
2073
|
+
request; this effectively ignores the host_index
|
2074
|
+
in the spec for a single request.
|
2075
|
+
:type _host_index: int, optional
|
2076
|
+
:return: Returns the result object.
|
2077
|
+
""" # noqa: E501
|
2078
|
+
|
2079
|
+
_param = self._get_organization_by_id_serialize(
|
2080
|
+
organization_id=organization_id,
|
2081
|
+
_request_auth=_request_auth,
|
2082
|
+
_content_type=_content_type,
|
2083
|
+
_headers=_headers,
|
2084
|
+
_host_index=_host_index
|
2085
|
+
)
|
2086
|
+
|
2087
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2088
|
+
'200': "Organization",
|
2089
|
+
}
|
2090
|
+
response_data = self.api_client.call_api(
|
2091
|
+
*_param,
|
2092
|
+
_request_timeout=_request_timeout
|
2093
|
+
)
|
2094
|
+
return response_data.response
|
2095
|
+
|
2096
|
+
|
2097
|
+
def _get_organization_by_id_serialize(
|
2098
|
+
self,
|
2099
|
+
organization_id,
|
2100
|
+
_request_auth,
|
2101
|
+
_content_type,
|
2102
|
+
_headers,
|
2103
|
+
_host_index,
|
2104
|
+
) -> RequestSerialized:
|
2105
|
+
|
2106
|
+
_host = None
|
2107
|
+
|
2108
|
+
_collection_formats: Dict[str, str] = {
|
2109
|
+
}
|
2110
|
+
|
2111
|
+
_path_params: Dict[str, str] = {}
|
2112
|
+
_query_params: List[Tuple[str, str]] = []
|
2113
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2114
|
+
_form_params: List[Tuple[str, str]] = []
|
2115
|
+
_files: Dict[
|
2116
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
2117
|
+
] = {}
|
2118
|
+
_body_params: Optional[bytes] = None
|
2119
|
+
|
2120
|
+
# process the path parameters
|
2121
|
+
if organization_id is not None:
|
2122
|
+
_path_params['organization_id'] = organization_id
|
2123
|
+
# process the query parameters
|
2124
|
+
# process the header parameters
|
2125
|
+
# process the form parameters
|
2126
|
+
# process the body parameter
|
2127
|
+
|
2128
|
+
|
2129
|
+
# set the HTTP header `Accept`
|
2130
|
+
if 'Accept' not in _header_params:
|
2131
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2132
|
+
[
|
2133
|
+
'*/*'
|
2134
|
+
]
|
2135
|
+
)
|
2136
|
+
|
2137
|
+
|
2138
|
+
# authentication setting
|
2139
|
+
_auth_settings: List[str] = [
|
2140
|
+
'QAnswer-Api-Key',
|
2141
|
+
'Bearer'
|
2142
|
+
]
|
2143
|
+
|
2144
|
+
return self.api_client.param_serialize(
|
2145
|
+
method='GET',
|
2146
|
+
resource_path='/api/organization/{organization_id}',
|
2147
|
+
path_params=_path_params,
|
2148
|
+
query_params=_query_params,
|
2149
|
+
header_params=_header_params,
|
2150
|
+
body=_body_params,
|
2151
|
+
post_params=_form_params,
|
2152
|
+
files=_files,
|
2153
|
+
auth_settings=_auth_settings,
|
2154
|
+
collection_formats=_collection_formats,
|
2155
|
+
_host=_host,
|
2156
|
+
_request_auth=_request_auth
|
2157
|
+
)
|
2158
|
+
|
2159
|
+
|
2160
|
+
|
2161
|
+
|
2162
|
+
@validate_call
|
2163
|
+
def get_organization_domain(
|
2164
|
+
self,
|
2165
|
+
organization_id: StrictInt,
|
2166
|
+
_request_timeout: Union[
|
2167
|
+
None,
|
2168
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2169
|
+
Tuple[
|
2170
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2171
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2172
|
+
]
|
2173
|
+
] = None,
|
2174
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2175
|
+
_content_type: Optional[StrictStr] = None,
|
2176
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2177
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2178
|
+
) -> str:
|
2179
|
+
"""Set the domain of an organization
|
2180
|
+
|
2181
|
+
|
2182
|
+
:param organization_id: (required)
|
2183
|
+
:type organization_id: int
|
2184
|
+
:param _request_timeout: timeout setting for this request. If one
|
2185
|
+
number provided, it will be total request
|
2186
|
+
timeout. It can also be a pair (tuple) of
|
2187
|
+
(connection, read) timeouts.
|
2188
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2189
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2190
|
+
request; this effectively ignores the
|
2191
|
+
authentication in the spec for a single request.
|
2192
|
+
:type _request_auth: dict, optional
|
2193
|
+
:param _content_type: force content-type for the request.
|
2194
|
+
:type _content_type: str, Optional
|
2195
|
+
:param _headers: set to override the headers for a single
|
2196
|
+
request; this effectively ignores the headers
|
2197
|
+
in the spec for a single request.
|
2198
|
+
:type _headers: dict, optional
|
2199
|
+
:param _host_index: set to override the host_index for a single
|
2200
|
+
request; this effectively ignores the host_index
|
2201
|
+
in the spec for a single request.
|
2202
|
+
:type _host_index: int, optional
|
2203
|
+
:return: Returns the result object.
|
2204
|
+
""" # noqa: E501
|
2205
|
+
|
2206
|
+
_param = self._get_organization_domain_serialize(
|
2207
|
+
organization_id=organization_id,
|
2208
|
+
_request_auth=_request_auth,
|
2209
|
+
_content_type=_content_type,
|
2210
|
+
_headers=_headers,
|
2211
|
+
_host_index=_host_index
|
2212
|
+
)
|
2213
|
+
|
2214
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2215
|
+
'200': "str",
|
2216
|
+
}
|
2217
|
+
response_data = self.api_client.call_api(
|
2218
|
+
*_param,
|
2219
|
+
_request_timeout=_request_timeout
|
2220
|
+
)
|
2221
|
+
response_data.read()
|
2222
|
+
return self.api_client.response_deserialize(
|
2223
|
+
response_data=response_data,
|
2224
|
+
response_types_map=_response_types_map,
|
2225
|
+
).data
|
2226
|
+
|
2227
|
+
|
2228
|
+
@validate_call
|
2229
|
+
def get_organization_domain_with_http_info(
|
2230
|
+
self,
|
2231
|
+
organization_id: StrictInt,
|
2232
|
+
_request_timeout: Union[
|
2233
|
+
None,
|
2234
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2235
|
+
Tuple[
|
2236
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2237
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2238
|
+
]
|
2239
|
+
] = None,
|
2240
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2241
|
+
_content_type: Optional[StrictStr] = None,
|
2242
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2243
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2244
|
+
) -> ApiResponse[str]:
|
2245
|
+
"""Set the domain of an organization
|
2246
|
+
|
2247
|
+
|
2248
|
+
:param organization_id: (required)
|
2249
|
+
:type organization_id: int
|
2250
|
+
:param _request_timeout: timeout setting for this request. If one
|
2251
|
+
number provided, it will be total request
|
2252
|
+
timeout. It can also be a pair (tuple) of
|
2253
|
+
(connection, read) timeouts.
|
2254
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2255
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2256
|
+
request; this effectively ignores the
|
2257
|
+
authentication in the spec for a single request.
|
2258
|
+
:type _request_auth: dict, optional
|
2259
|
+
:param _content_type: force content-type for the request.
|
2260
|
+
:type _content_type: str, Optional
|
2261
|
+
:param _headers: set to override the headers for a single
|
2262
|
+
request; this effectively ignores the headers
|
2263
|
+
in the spec for a single request.
|
2264
|
+
:type _headers: dict, optional
|
2265
|
+
:param _host_index: set to override the host_index for a single
|
2266
|
+
request; this effectively ignores the host_index
|
2267
|
+
in the spec for a single request.
|
2268
|
+
:type _host_index: int, optional
|
2269
|
+
:return: Returns the result object.
|
2270
|
+
""" # noqa: E501
|
2271
|
+
|
2272
|
+
_param = self._get_organization_domain_serialize(
|
2273
|
+
organization_id=organization_id,
|
2274
|
+
_request_auth=_request_auth,
|
2275
|
+
_content_type=_content_type,
|
2276
|
+
_headers=_headers,
|
2277
|
+
_host_index=_host_index
|
2278
|
+
)
|
2279
|
+
|
2280
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2281
|
+
'200': "str",
|
2282
|
+
}
|
2283
|
+
response_data = self.api_client.call_api(
|
2284
|
+
*_param,
|
2285
|
+
_request_timeout=_request_timeout
|
2286
|
+
)
|
2287
|
+
response_data.read()
|
2288
|
+
return self.api_client.response_deserialize(
|
2289
|
+
response_data=response_data,
|
2290
|
+
response_types_map=_response_types_map,
|
2291
|
+
)
|
2292
|
+
|
2293
|
+
|
2294
|
+
@validate_call
|
2295
|
+
def get_organization_domain_without_preload_content(
|
2296
|
+
self,
|
2297
|
+
organization_id: StrictInt,
|
2298
|
+
_request_timeout: Union[
|
2299
|
+
None,
|
2300
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2301
|
+
Tuple[
|
2302
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2303
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2304
|
+
]
|
2305
|
+
] = None,
|
2306
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2307
|
+
_content_type: Optional[StrictStr] = None,
|
2308
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2309
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2310
|
+
) -> RESTResponseType:
|
2311
|
+
"""Set the domain of an organization
|
2312
|
+
|
2313
|
+
|
2314
|
+
:param organization_id: (required)
|
2315
|
+
:type organization_id: int
|
2316
|
+
:param _request_timeout: timeout setting for this request. If one
|
2317
|
+
number provided, it will be total request
|
2318
|
+
timeout. It can also be a pair (tuple) of
|
2319
|
+
(connection, read) timeouts.
|
2320
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2321
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2322
|
+
request; this effectively ignores the
|
2323
|
+
authentication in the spec for a single request.
|
2324
|
+
:type _request_auth: dict, optional
|
2325
|
+
:param _content_type: force content-type for the request.
|
2326
|
+
:type _content_type: str, Optional
|
2327
|
+
:param _headers: set to override the headers for a single
|
2328
|
+
request; this effectively ignores the headers
|
2329
|
+
in the spec for a single request.
|
2330
|
+
:type _headers: dict, optional
|
2331
|
+
:param _host_index: set to override the host_index for a single
|
2332
|
+
request; this effectively ignores the host_index
|
2333
|
+
in the spec for a single request.
|
2334
|
+
:type _host_index: int, optional
|
2335
|
+
:return: Returns the result object.
|
2336
|
+
""" # noqa: E501
|
2337
|
+
|
2338
|
+
_param = self._get_organization_domain_serialize(
|
2339
|
+
organization_id=organization_id,
|
2340
|
+
_request_auth=_request_auth,
|
2341
|
+
_content_type=_content_type,
|
2342
|
+
_headers=_headers,
|
2343
|
+
_host_index=_host_index
|
2344
|
+
)
|
2345
|
+
|
2346
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2347
|
+
'200': "str",
|
2348
|
+
}
|
2349
|
+
response_data = self.api_client.call_api(
|
2350
|
+
*_param,
|
2351
|
+
_request_timeout=_request_timeout
|
2352
|
+
)
|
2353
|
+
return response_data.response
|
2354
|
+
|
2355
|
+
|
2356
|
+
def _get_organization_domain_serialize(
|
2357
|
+
self,
|
2358
|
+
organization_id,
|
2359
|
+
_request_auth,
|
2360
|
+
_content_type,
|
2361
|
+
_headers,
|
2362
|
+
_host_index,
|
2363
|
+
) -> RequestSerialized:
|
2364
|
+
|
2365
|
+
_host = None
|
2366
|
+
|
2367
|
+
_collection_formats: Dict[str, str] = {
|
2368
|
+
}
|
2369
|
+
|
2370
|
+
_path_params: Dict[str, str] = {}
|
2371
|
+
_query_params: List[Tuple[str, str]] = []
|
2372
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2373
|
+
_form_params: List[Tuple[str, str]] = []
|
2374
|
+
_files: Dict[
|
2375
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
2376
|
+
] = {}
|
2377
|
+
_body_params: Optional[bytes] = None
|
2378
|
+
|
2379
|
+
# process the path parameters
|
2380
|
+
if organization_id is not None:
|
2381
|
+
_path_params['organization_id'] = organization_id
|
2382
|
+
# process the query parameters
|
2383
|
+
# process the header parameters
|
2384
|
+
# process the form parameters
|
2385
|
+
# process the body parameter
|
2386
|
+
|
2387
|
+
|
2388
|
+
# set the HTTP header `Accept`
|
2389
|
+
if 'Accept' not in _header_params:
|
2390
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2391
|
+
[
|
2392
|
+
'*/*'
|
2393
|
+
]
|
2394
|
+
)
|
2395
|
+
|
2396
|
+
|
2397
|
+
# authentication setting
|
2398
|
+
_auth_settings: List[str] = [
|
2399
|
+
'QAnswer-Api-Key',
|
2400
|
+
'Bearer'
|
2401
|
+
]
|
2402
|
+
|
2403
|
+
return self.api_client.param_serialize(
|
2404
|
+
method='GET',
|
2405
|
+
resource_path='/api/organization/{organization_id}/domain',
|
2406
|
+
path_params=_path_params,
|
2407
|
+
query_params=_query_params,
|
2408
|
+
header_params=_header_params,
|
2409
|
+
body=_body_params,
|
2410
|
+
post_params=_form_params,
|
2411
|
+
files=_files,
|
2412
|
+
auth_settings=_auth_settings,
|
2413
|
+
collection_formats=_collection_formats,
|
2414
|
+
_host=_host,
|
2415
|
+
_request_auth=_request_auth
|
2416
|
+
)
|
2417
|
+
|
2418
|
+
|
2419
|
+
|
2420
|
+
|
2421
|
+
@validate_call
|
2422
|
+
def get_organization_logo(
|
2423
|
+
self,
|
2424
|
+
organization_id: StrictInt,
|
2425
|
+
_request_timeout: Union[
|
2426
|
+
None,
|
2427
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2428
|
+
Tuple[
|
2429
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2430
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2431
|
+
]
|
2432
|
+
] = None,
|
2433
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2434
|
+
_content_type: Optional[StrictStr] = None,
|
2435
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2436
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2437
|
+
) -> bytearray:
|
2438
|
+
"""Returns the logo of an organization
|
2439
|
+
|
2440
|
+
|
2441
|
+
:param organization_id: (required)
|
2442
|
+
:type organization_id: int
|
2443
|
+
:param _request_timeout: timeout setting for this request. If one
|
2444
|
+
number provided, it will be total request
|
2445
|
+
timeout. It can also be a pair (tuple) of
|
2446
|
+
(connection, read) timeouts.
|
2447
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2448
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2449
|
+
request; this effectively ignores the
|
2450
|
+
authentication in the spec for a single request.
|
2451
|
+
:type _request_auth: dict, optional
|
2452
|
+
:param _content_type: force content-type for the request.
|
2453
|
+
:type _content_type: str, Optional
|
2454
|
+
:param _headers: set to override the headers for a single
|
2455
|
+
request; this effectively ignores the headers
|
2456
|
+
in the spec for a single request.
|
2457
|
+
:type _headers: dict, optional
|
2458
|
+
:param _host_index: set to override the host_index for a single
|
2459
|
+
request; this effectively ignores the host_index
|
2460
|
+
in the spec for a single request.
|
2461
|
+
:type _host_index: int, optional
|
2462
|
+
:return: Returns the result object.
|
2463
|
+
""" # noqa: E501
|
2464
|
+
|
2465
|
+
_param = self._get_organization_logo_serialize(
|
2466
|
+
organization_id=organization_id,
|
2467
|
+
_request_auth=_request_auth,
|
2468
|
+
_content_type=_content_type,
|
2469
|
+
_headers=_headers,
|
2470
|
+
_host_index=_host_index
|
2471
|
+
)
|
2472
|
+
|
2473
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2474
|
+
'200': "bytearray",
|
2475
|
+
}
|
2476
|
+
response_data = self.api_client.call_api(
|
2477
|
+
*_param,
|
2478
|
+
_request_timeout=_request_timeout
|
2479
|
+
)
|
2480
|
+
response_data.read()
|
2481
|
+
return self.api_client.response_deserialize(
|
2482
|
+
response_data=response_data,
|
2483
|
+
response_types_map=_response_types_map,
|
2484
|
+
).data
|
2485
|
+
|
2486
|
+
|
2487
|
+
@validate_call
|
2488
|
+
def get_organization_logo_with_http_info(
|
2489
|
+
self,
|
2490
|
+
organization_id: StrictInt,
|
2491
|
+
_request_timeout: Union[
|
2492
|
+
None,
|
2493
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2494
|
+
Tuple[
|
2495
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2496
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2497
|
+
]
|
2498
|
+
] = None,
|
2499
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2500
|
+
_content_type: Optional[StrictStr] = None,
|
2501
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2502
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2503
|
+
) -> ApiResponse[bytearray]:
|
2504
|
+
"""Returns the logo of an organization
|
2505
|
+
|
2506
|
+
|
2507
|
+
:param organization_id: (required)
|
2508
|
+
:type organization_id: int
|
2509
|
+
:param _request_timeout: timeout setting for this request. If one
|
2510
|
+
number provided, it will be total request
|
2511
|
+
timeout. It can also be a pair (tuple) of
|
2512
|
+
(connection, read) timeouts.
|
2513
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2514
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2515
|
+
request; this effectively ignores the
|
2516
|
+
authentication in the spec for a single request.
|
2517
|
+
:type _request_auth: dict, optional
|
2518
|
+
:param _content_type: force content-type for the request.
|
2519
|
+
:type _content_type: str, Optional
|
2520
|
+
:param _headers: set to override the headers for a single
|
2521
|
+
request; this effectively ignores the headers
|
2522
|
+
in the spec for a single request.
|
2523
|
+
:type _headers: dict, optional
|
2524
|
+
:param _host_index: set to override the host_index for a single
|
2525
|
+
request; this effectively ignores the host_index
|
2526
|
+
in the spec for a single request.
|
2527
|
+
:type _host_index: int, optional
|
2528
|
+
:return: Returns the result object.
|
2529
|
+
""" # noqa: E501
|
2530
|
+
|
2531
|
+
_param = self._get_organization_logo_serialize(
|
2532
|
+
organization_id=organization_id,
|
2533
|
+
_request_auth=_request_auth,
|
2534
|
+
_content_type=_content_type,
|
2535
|
+
_headers=_headers,
|
2536
|
+
_host_index=_host_index
|
2537
|
+
)
|
2538
|
+
|
2539
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2540
|
+
'200': "bytearray",
|
2541
|
+
}
|
2542
|
+
response_data = self.api_client.call_api(
|
2543
|
+
*_param,
|
2544
|
+
_request_timeout=_request_timeout
|
2545
|
+
)
|
2546
|
+
response_data.read()
|
2547
|
+
return self.api_client.response_deserialize(
|
2548
|
+
response_data=response_data,
|
2549
|
+
response_types_map=_response_types_map,
|
2550
|
+
)
|
2551
|
+
|
2552
|
+
|
2553
|
+
@validate_call
|
2554
|
+
def get_organization_logo_without_preload_content(
|
2555
|
+
self,
|
2556
|
+
organization_id: StrictInt,
|
2557
|
+
_request_timeout: Union[
|
2558
|
+
None,
|
2559
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2560
|
+
Tuple[
|
2561
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2562
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2563
|
+
]
|
2564
|
+
] = None,
|
2565
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2566
|
+
_content_type: Optional[StrictStr] = None,
|
2567
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2568
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2569
|
+
) -> RESTResponseType:
|
2570
|
+
"""Returns the logo of an organization
|
2571
|
+
|
2572
|
+
|
2573
|
+
:param organization_id: (required)
|
2574
|
+
:type organization_id: int
|
2575
|
+
:param _request_timeout: timeout setting for this request. If one
|
2576
|
+
number provided, it will be total request
|
2577
|
+
timeout. It can also be a pair (tuple) of
|
2578
|
+
(connection, read) timeouts.
|
2579
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2580
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2581
|
+
request; this effectively ignores the
|
2582
|
+
authentication in the spec for a single request.
|
2583
|
+
:type _request_auth: dict, optional
|
2584
|
+
:param _content_type: force content-type for the request.
|
2585
|
+
:type _content_type: str, Optional
|
2586
|
+
:param _headers: set to override the headers for a single
|
2587
|
+
request; this effectively ignores the headers
|
2588
|
+
in the spec for a single request.
|
2589
|
+
:type _headers: dict, optional
|
2590
|
+
:param _host_index: set to override the host_index for a single
|
2591
|
+
request; this effectively ignores the host_index
|
2592
|
+
in the spec for a single request.
|
2593
|
+
:type _host_index: int, optional
|
2594
|
+
:return: Returns the result object.
|
2595
|
+
""" # noqa: E501
|
2596
|
+
|
2597
|
+
_param = self._get_organization_logo_serialize(
|
2598
|
+
organization_id=organization_id,
|
2599
|
+
_request_auth=_request_auth,
|
2600
|
+
_content_type=_content_type,
|
2601
|
+
_headers=_headers,
|
2602
|
+
_host_index=_host_index
|
2603
|
+
)
|
2604
|
+
|
2605
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2606
|
+
'200': "bytearray",
|
2607
|
+
}
|
2608
|
+
response_data = self.api_client.call_api(
|
2609
|
+
*_param,
|
2610
|
+
_request_timeout=_request_timeout
|
2611
|
+
)
|
2612
|
+
return response_data.response
|
2613
|
+
|
2614
|
+
|
2615
|
+
def _get_organization_logo_serialize(
|
2616
|
+
self,
|
2617
|
+
organization_id,
|
2618
|
+
_request_auth,
|
2619
|
+
_content_type,
|
2620
|
+
_headers,
|
2621
|
+
_host_index,
|
2622
|
+
) -> RequestSerialized:
|
2623
|
+
|
2624
|
+
_host = None
|
2625
|
+
|
2626
|
+
_collection_formats: Dict[str, str] = {
|
2627
|
+
}
|
2628
|
+
|
2629
|
+
_path_params: Dict[str, str] = {}
|
2630
|
+
_query_params: List[Tuple[str, str]] = []
|
2631
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2632
|
+
_form_params: List[Tuple[str, str]] = []
|
2633
|
+
_files: Dict[
|
2634
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
2635
|
+
] = {}
|
2636
|
+
_body_params: Optional[bytes] = None
|
2637
|
+
|
2638
|
+
# process the path parameters
|
2639
|
+
if organization_id is not None:
|
2640
|
+
_path_params['organization_id'] = organization_id
|
2641
|
+
# process the query parameters
|
2642
|
+
# process the header parameters
|
2643
|
+
# process the form parameters
|
2644
|
+
# process the body parameter
|
2645
|
+
|
2646
|
+
|
2647
|
+
# set the HTTP header `Accept`
|
2648
|
+
if 'Accept' not in _header_params:
|
2649
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2650
|
+
[
|
2651
|
+
'*/*'
|
2652
|
+
]
|
2653
|
+
)
|
2654
|
+
|
2655
|
+
|
2656
|
+
# authentication setting
|
2657
|
+
_auth_settings: List[str] = [
|
2658
|
+
'QAnswer-Api-Key',
|
2659
|
+
'Bearer'
|
2660
|
+
]
|
2661
|
+
|
2662
|
+
return self.api_client.param_serialize(
|
2663
|
+
method='GET',
|
2664
|
+
resource_path='/api/organization/{organization_id}/logo',
|
2665
|
+
path_params=_path_params,
|
2666
|
+
query_params=_query_params,
|
2667
|
+
header_params=_header_params,
|
2668
|
+
body=_body_params,
|
2669
|
+
post_params=_form_params,
|
2670
|
+
files=_files,
|
2671
|
+
auth_settings=_auth_settings,
|
2672
|
+
collection_formats=_collection_formats,
|
2673
|
+
_host=_host,
|
2674
|
+
_request_auth=_request_auth
|
2675
|
+
)
|
2676
|
+
|
2677
|
+
|
2678
|
+
|
2679
|
+
|
2680
|
+
@validate_call
|
2681
|
+
def get_users_from_organization(
|
2682
|
+
self,
|
2683
|
+
organization_id: StrictInt,
|
2684
|
+
_request_timeout: Union[
|
2685
|
+
None,
|
2686
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2687
|
+
Tuple[
|
2688
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2689
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2690
|
+
]
|
2691
|
+
] = None,
|
2692
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2693
|
+
_content_type: Optional[StrictStr] = None,
|
2694
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2695
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2696
|
+
) -> List[User]:
|
2697
|
+
"""Get all the users from an organization
|
2698
|
+
|
2699
|
+
|
2700
|
+
:param organization_id: (required)
|
2701
|
+
:type organization_id: int
|
2702
|
+
:param _request_timeout: timeout setting for this request. If one
|
2703
|
+
number provided, it will be total request
|
2704
|
+
timeout. It can also be a pair (tuple) of
|
2705
|
+
(connection, read) timeouts.
|
2706
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2707
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2708
|
+
request; this effectively ignores the
|
2709
|
+
authentication in the spec for a single request.
|
2710
|
+
:type _request_auth: dict, optional
|
2711
|
+
:param _content_type: force content-type for the request.
|
2712
|
+
:type _content_type: str, Optional
|
2713
|
+
:param _headers: set to override the headers for a single
|
2714
|
+
request; this effectively ignores the headers
|
2715
|
+
in the spec for a single request.
|
2716
|
+
:type _headers: dict, optional
|
2717
|
+
:param _host_index: set to override the host_index for a single
|
2718
|
+
request; this effectively ignores the host_index
|
2719
|
+
in the spec for a single request.
|
2720
|
+
:type _host_index: int, optional
|
2721
|
+
:return: Returns the result object.
|
2722
|
+
""" # noqa: E501
|
2723
|
+
|
2724
|
+
_param = self._get_users_from_organization_serialize(
|
2725
|
+
organization_id=organization_id,
|
2726
|
+
_request_auth=_request_auth,
|
2727
|
+
_content_type=_content_type,
|
2728
|
+
_headers=_headers,
|
2729
|
+
_host_index=_host_index
|
2730
|
+
)
|
2731
|
+
|
2732
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2733
|
+
'200': "List[User]",
|
2734
|
+
}
|
2735
|
+
response_data = self.api_client.call_api(
|
2736
|
+
*_param,
|
2737
|
+
_request_timeout=_request_timeout
|
2738
|
+
)
|
2739
|
+
response_data.read()
|
2740
|
+
return self.api_client.response_deserialize(
|
2741
|
+
response_data=response_data,
|
2742
|
+
response_types_map=_response_types_map,
|
2743
|
+
).data
|
2744
|
+
|
2745
|
+
|
2746
|
+
@validate_call
|
2747
|
+
def get_users_from_organization_with_http_info(
|
2748
|
+
self,
|
2749
|
+
organization_id: StrictInt,
|
2750
|
+
_request_timeout: Union[
|
2751
|
+
None,
|
2752
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2753
|
+
Tuple[
|
2754
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2755
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2756
|
+
]
|
2757
|
+
] = None,
|
2758
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2759
|
+
_content_type: Optional[StrictStr] = None,
|
2760
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2761
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2762
|
+
) -> ApiResponse[List[User]]:
|
2763
|
+
"""Get all the users from an organization
|
2764
|
+
|
2765
|
+
|
2766
|
+
:param organization_id: (required)
|
2767
|
+
:type organization_id: int
|
2768
|
+
:param _request_timeout: timeout setting for this request. If one
|
2769
|
+
number provided, it will be total request
|
2770
|
+
timeout. It can also be a pair (tuple) of
|
2771
|
+
(connection, read) timeouts.
|
2772
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2773
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2774
|
+
request; this effectively ignores the
|
2775
|
+
authentication in the spec for a single request.
|
2776
|
+
:type _request_auth: dict, optional
|
2777
|
+
:param _content_type: force content-type for the request.
|
2778
|
+
:type _content_type: str, Optional
|
2779
|
+
:param _headers: set to override the headers for a single
|
2780
|
+
request; this effectively ignores the headers
|
2781
|
+
in the spec for a single request.
|
2782
|
+
:type _headers: dict, optional
|
2783
|
+
:param _host_index: set to override the host_index for a single
|
2784
|
+
request; this effectively ignores the host_index
|
2785
|
+
in the spec for a single request.
|
2786
|
+
:type _host_index: int, optional
|
2787
|
+
:return: Returns the result object.
|
2788
|
+
""" # noqa: E501
|
2789
|
+
|
2790
|
+
_param = self._get_users_from_organization_serialize(
|
2791
|
+
organization_id=organization_id,
|
2792
|
+
_request_auth=_request_auth,
|
2793
|
+
_content_type=_content_type,
|
2794
|
+
_headers=_headers,
|
2795
|
+
_host_index=_host_index
|
2796
|
+
)
|
2797
|
+
|
2798
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2799
|
+
'200': "List[User]",
|
2800
|
+
}
|
2801
|
+
response_data = self.api_client.call_api(
|
2802
|
+
*_param,
|
2803
|
+
_request_timeout=_request_timeout
|
2804
|
+
)
|
2805
|
+
response_data.read()
|
2806
|
+
return self.api_client.response_deserialize(
|
2807
|
+
response_data=response_data,
|
2808
|
+
response_types_map=_response_types_map,
|
2809
|
+
)
|
2810
|
+
|
2811
|
+
|
2812
|
+
@validate_call
|
2813
|
+
def get_users_from_organization_without_preload_content(
|
2814
|
+
self,
|
2815
|
+
organization_id: StrictInt,
|
2816
|
+
_request_timeout: Union[
|
2817
|
+
None,
|
2818
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2819
|
+
Tuple[
|
2820
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2821
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2822
|
+
]
|
2823
|
+
] = None,
|
2824
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2825
|
+
_content_type: Optional[StrictStr] = None,
|
2826
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2827
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2828
|
+
) -> RESTResponseType:
|
2829
|
+
"""Get all the users from an organization
|
2830
|
+
|
2831
|
+
|
2832
|
+
:param organization_id: (required)
|
2833
|
+
:type organization_id: int
|
2834
|
+
:param _request_timeout: timeout setting for this request. If one
|
2835
|
+
number provided, it will be total request
|
2836
|
+
timeout. It can also be a pair (tuple) of
|
2837
|
+
(connection, read) timeouts.
|
2838
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2839
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2840
|
+
request; this effectively ignores the
|
2841
|
+
authentication in the spec for a single request.
|
2842
|
+
:type _request_auth: dict, optional
|
2843
|
+
:param _content_type: force content-type for the request.
|
2844
|
+
:type _content_type: str, Optional
|
2845
|
+
:param _headers: set to override the headers for a single
|
2846
|
+
request; this effectively ignores the headers
|
2847
|
+
in the spec for a single request.
|
2848
|
+
:type _headers: dict, optional
|
2849
|
+
:param _host_index: set to override the host_index for a single
|
2850
|
+
request; this effectively ignores the host_index
|
2851
|
+
in the spec for a single request.
|
2852
|
+
:type _host_index: int, optional
|
2853
|
+
:return: Returns the result object.
|
2854
|
+
""" # noqa: E501
|
2855
|
+
|
2856
|
+
_param = self._get_users_from_organization_serialize(
|
2857
|
+
organization_id=organization_id,
|
2858
|
+
_request_auth=_request_auth,
|
2859
|
+
_content_type=_content_type,
|
2860
|
+
_headers=_headers,
|
2861
|
+
_host_index=_host_index
|
2862
|
+
)
|
2863
|
+
|
2864
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2865
|
+
'200': "List[User]",
|
2866
|
+
}
|
2867
|
+
response_data = self.api_client.call_api(
|
2868
|
+
*_param,
|
2869
|
+
_request_timeout=_request_timeout
|
2870
|
+
)
|
2871
|
+
return response_data.response
|
2872
|
+
|
2873
|
+
|
2874
|
+
def _get_users_from_organization_serialize(
|
2875
|
+
self,
|
2876
|
+
organization_id,
|
2877
|
+
_request_auth,
|
2878
|
+
_content_type,
|
2879
|
+
_headers,
|
2880
|
+
_host_index,
|
2881
|
+
) -> RequestSerialized:
|
2882
|
+
|
2883
|
+
_host = None
|
2884
|
+
|
2885
|
+
_collection_formats: Dict[str, str] = {
|
2886
|
+
}
|
2887
|
+
|
2888
|
+
_path_params: Dict[str, str] = {}
|
2889
|
+
_query_params: List[Tuple[str, str]] = []
|
2890
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2891
|
+
_form_params: List[Tuple[str, str]] = []
|
2892
|
+
_files: Dict[
|
2893
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
2894
|
+
] = {}
|
2895
|
+
_body_params: Optional[bytes] = None
|
2896
|
+
|
2897
|
+
# process the path parameters
|
2898
|
+
if organization_id is not None:
|
2899
|
+
_path_params['organization_id'] = organization_id
|
2900
|
+
# process the query parameters
|
2901
|
+
# process the header parameters
|
2902
|
+
# process the form parameters
|
2903
|
+
# process the body parameter
|
2904
|
+
|
2905
|
+
|
2906
|
+
# set the HTTP header `Accept`
|
2907
|
+
if 'Accept' not in _header_params:
|
2908
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2909
|
+
[
|
2910
|
+
'*/*'
|
2911
|
+
]
|
2912
|
+
)
|
2913
|
+
|
2914
|
+
|
2915
|
+
# authentication setting
|
2916
|
+
_auth_settings: List[str] = [
|
2917
|
+
'QAnswer-Api-Key',
|
2918
|
+
'Bearer'
|
2919
|
+
]
|
2920
|
+
|
2921
|
+
return self.api_client.param_serialize(
|
2922
|
+
method='GET',
|
2923
|
+
resource_path='/api/organization/{organization_id}/users',
|
2924
|
+
path_params=_path_params,
|
2925
|
+
query_params=_query_params,
|
2926
|
+
header_params=_header_params,
|
2927
|
+
body=_body_params,
|
2928
|
+
post_params=_form_params,
|
2929
|
+
files=_files,
|
2930
|
+
auth_settings=_auth_settings,
|
2931
|
+
collection_formats=_collection_formats,
|
2932
|
+
_host=_host,
|
2933
|
+
_request_auth=_request_auth
|
2934
|
+
)
|
2935
|
+
|
2936
|
+
|
2937
|
+
|
2938
|
+
|
2939
|
+
@validate_call
|
2940
|
+
def list_admin_of_organization(
|
2941
|
+
self,
|
2942
|
+
organization_id: StrictInt,
|
2943
|
+
_request_timeout: Union[
|
2944
|
+
None,
|
2945
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2946
|
+
Tuple[
|
2947
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2948
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2949
|
+
]
|
2950
|
+
] = None,
|
2951
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2952
|
+
_content_type: Optional[StrictStr] = None,
|
2953
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2954
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2955
|
+
) -> List[User]:
|
2956
|
+
"""List the admins of an organization
|
2957
|
+
|
2958
|
+
|
2959
|
+
:param organization_id: (required)
|
2960
|
+
:type organization_id: int
|
2961
|
+
:param _request_timeout: timeout setting for this request. If one
|
2962
|
+
number provided, it will be total request
|
2963
|
+
timeout. It can also be a pair (tuple) of
|
2964
|
+
(connection, read) timeouts.
|
2965
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2966
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2967
|
+
request; this effectively ignores the
|
2968
|
+
authentication in the spec for a single request.
|
2969
|
+
:type _request_auth: dict, optional
|
2970
|
+
:param _content_type: force content-type for the request.
|
2971
|
+
:type _content_type: str, Optional
|
2972
|
+
:param _headers: set to override the headers for a single
|
2973
|
+
request; this effectively ignores the headers
|
2974
|
+
in the spec for a single request.
|
2975
|
+
:type _headers: dict, optional
|
2976
|
+
:param _host_index: set to override the host_index for a single
|
2977
|
+
request; this effectively ignores the host_index
|
2978
|
+
in the spec for a single request.
|
2979
|
+
:type _host_index: int, optional
|
2980
|
+
:return: Returns the result object.
|
2981
|
+
""" # noqa: E501
|
2982
|
+
|
2983
|
+
_param = self._list_admin_of_organization_serialize(
|
2984
|
+
organization_id=organization_id,
|
2985
|
+
_request_auth=_request_auth,
|
2986
|
+
_content_type=_content_type,
|
2987
|
+
_headers=_headers,
|
2988
|
+
_host_index=_host_index
|
2989
|
+
)
|
2990
|
+
|
2991
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2992
|
+
'200': "List[User]",
|
2993
|
+
}
|
2994
|
+
response_data = self.api_client.call_api(
|
2995
|
+
*_param,
|
2996
|
+
_request_timeout=_request_timeout
|
2997
|
+
)
|
2998
|
+
response_data.read()
|
2999
|
+
return self.api_client.response_deserialize(
|
3000
|
+
response_data=response_data,
|
3001
|
+
response_types_map=_response_types_map,
|
3002
|
+
).data
|
3003
|
+
|
3004
|
+
|
3005
|
+
@validate_call
|
3006
|
+
def list_admin_of_organization_with_http_info(
|
3007
|
+
self,
|
3008
|
+
organization_id: StrictInt,
|
3009
|
+
_request_timeout: Union[
|
3010
|
+
None,
|
3011
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3012
|
+
Tuple[
|
3013
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3014
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3015
|
+
]
|
3016
|
+
] = None,
|
3017
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3018
|
+
_content_type: Optional[StrictStr] = None,
|
3019
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3020
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3021
|
+
) -> ApiResponse[List[User]]:
|
3022
|
+
"""List the admins of an organization
|
3023
|
+
|
3024
|
+
|
3025
|
+
:param organization_id: (required)
|
3026
|
+
:type organization_id: int
|
3027
|
+
:param _request_timeout: timeout setting for this request. If one
|
3028
|
+
number provided, it will be total request
|
3029
|
+
timeout. It can also be a pair (tuple) of
|
3030
|
+
(connection, read) timeouts.
|
3031
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3032
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3033
|
+
request; this effectively ignores the
|
3034
|
+
authentication in the spec for a single request.
|
3035
|
+
:type _request_auth: dict, optional
|
3036
|
+
:param _content_type: force content-type for the request.
|
3037
|
+
:type _content_type: str, Optional
|
3038
|
+
:param _headers: set to override the headers for a single
|
3039
|
+
request; this effectively ignores the headers
|
3040
|
+
in the spec for a single request.
|
3041
|
+
:type _headers: dict, optional
|
3042
|
+
:param _host_index: set to override the host_index for a single
|
3043
|
+
request; this effectively ignores the host_index
|
3044
|
+
in the spec for a single request.
|
3045
|
+
:type _host_index: int, optional
|
3046
|
+
:return: Returns the result object.
|
3047
|
+
""" # noqa: E501
|
3048
|
+
|
3049
|
+
_param = self._list_admin_of_organization_serialize(
|
3050
|
+
organization_id=organization_id,
|
3051
|
+
_request_auth=_request_auth,
|
3052
|
+
_content_type=_content_type,
|
3053
|
+
_headers=_headers,
|
3054
|
+
_host_index=_host_index
|
3055
|
+
)
|
3056
|
+
|
3057
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3058
|
+
'200': "List[User]",
|
3059
|
+
}
|
3060
|
+
response_data = self.api_client.call_api(
|
3061
|
+
*_param,
|
3062
|
+
_request_timeout=_request_timeout
|
3063
|
+
)
|
3064
|
+
response_data.read()
|
3065
|
+
return self.api_client.response_deserialize(
|
3066
|
+
response_data=response_data,
|
3067
|
+
response_types_map=_response_types_map,
|
3068
|
+
)
|
3069
|
+
|
3070
|
+
|
3071
|
+
@validate_call
|
3072
|
+
def list_admin_of_organization_without_preload_content(
|
3073
|
+
self,
|
3074
|
+
organization_id: StrictInt,
|
3075
|
+
_request_timeout: Union[
|
3076
|
+
None,
|
3077
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3078
|
+
Tuple[
|
3079
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3080
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3081
|
+
]
|
3082
|
+
] = None,
|
3083
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3084
|
+
_content_type: Optional[StrictStr] = None,
|
3085
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3086
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3087
|
+
) -> RESTResponseType:
|
3088
|
+
"""List the admins of an organization
|
3089
|
+
|
3090
|
+
|
3091
|
+
:param organization_id: (required)
|
3092
|
+
:type organization_id: int
|
3093
|
+
:param _request_timeout: timeout setting for this request. If one
|
3094
|
+
number provided, it will be total request
|
3095
|
+
timeout. It can also be a pair (tuple) of
|
3096
|
+
(connection, read) timeouts.
|
3097
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3098
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3099
|
+
request; this effectively ignores the
|
3100
|
+
authentication in the spec for a single request.
|
3101
|
+
:type _request_auth: dict, optional
|
3102
|
+
:param _content_type: force content-type for the request.
|
3103
|
+
:type _content_type: str, Optional
|
3104
|
+
:param _headers: set to override the headers for a single
|
3105
|
+
request; this effectively ignores the headers
|
3106
|
+
in the spec for a single request.
|
3107
|
+
:type _headers: dict, optional
|
3108
|
+
:param _host_index: set to override the host_index for a single
|
3109
|
+
request; this effectively ignores the host_index
|
3110
|
+
in the spec for a single request.
|
3111
|
+
:type _host_index: int, optional
|
3112
|
+
:return: Returns the result object.
|
3113
|
+
""" # noqa: E501
|
3114
|
+
|
3115
|
+
_param = self._list_admin_of_organization_serialize(
|
3116
|
+
organization_id=organization_id,
|
3117
|
+
_request_auth=_request_auth,
|
3118
|
+
_content_type=_content_type,
|
3119
|
+
_headers=_headers,
|
3120
|
+
_host_index=_host_index
|
3121
|
+
)
|
3122
|
+
|
3123
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3124
|
+
'200': "List[User]",
|
3125
|
+
}
|
3126
|
+
response_data = self.api_client.call_api(
|
3127
|
+
*_param,
|
3128
|
+
_request_timeout=_request_timeout
|
3129
|
+
)
|
3130
|
+
return response_data.response
|
3131
|
+
|
3132
|
+
|
3133
|
+
def _list_admin_of_organization_serialize(
|
3134
|
+
self,
|
3135
|
+
organization_id,
|
3136
|
+
_request_auth,
|
3137
|
+
_content_type,
|
3138
|
+
_headers,
|
3139
|
+
_host_index,
|
3140
|
+
) -> RequestSerialized:
|
3141
|
+
|
3142
|
+
_host = None
|
3143
|
+
|
3144
|
+
_collection_formats: Dict[str, str] = {
|
3145
|
+
}
|
3146
|
+
|
3147
|
+
_path_params: Dict[str, str] = {}
|
3148
|
+
_query_params: List[Tuple[str, str]] = []
|
3149
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
3150
|
+
_form_params: List[Tuple[str, str]] = []
|
3151
|
+
_files: Dict[
|
3152
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
3153
|
+
] = {}
|
3154
|
+
_body_params: Optional[bytes] = None
|
3155
|
+
|
3156
|
+
# process the path parameters
|
3157
|
+
if organization_id is not None:
|
3158
|
+
_path_params['organization_id'] = organization_id
|
3159
|
+
# process the query parameters
|
3160
|
+
# process the header parameters
|
3161
|
+
# process the form parameters
|
3162
|
+
# process the body parameter
|
3163
|
+
|
3164
|
+
|
3165
|
+
# set the HTTP header `Accept`
|
3166
|
+
if 'Accept' not in _header_params:
|
3167
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
3168
|
+
[
|
3169
|
+
'*/*'
|
3170
|
+
]
|
3171
|
+
)
|
3172
|
+
|
3173
|
+
|
3174
|
+
# authentication setting
|
3175
|
+
_auth_settings: List[str] = [
|
3176
|
+
'QAnswer-Api-Key',
|
3177
|
+
'Bearer'
|
3178
|
+
]
|
3179
|
+
|
3180
|
+
return self.api_client.param_serialize(
|
3181
|
+
method='GET',
|
3182
|
+
resource_path='/api/organization/{organization_id}/admin',
|
3183
|
+
path_params=_path_params,
|
3184
|
+
query_params=_query_params,
|
3185
|
+
header_params=_header_params,
|
3186
|
+
body=_body_params,
|
3187
|
+
post_params=_form_params,
|
3188
|
+
files=_files,
|
3189
|
+
auth_settings=_auth_settings,
|
3190
|
+
collection_formats=_collection_formats,
|
3191
|
+
_host=_host,
|
3192
|
+
_request_auth=_request_auth
|
3193
|
+
)
|
3194
|
+
|
3195
|
+
|
3196
|
+
|
3197
|
+
|
3198
|
+
@validate_call
|
3199
|
+
def reset_organization_logo(
|
3200
|
+
self,
|
3201
|
+
organization_id: StrictInt,
|
3202
|
+
_request_timeout: Union[
|
3203
|
+
None,
|
3204
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3205
|
+
Tuple[
|
3206
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3207
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3208
|
+
]
|
3209
|
+
] = None,
|
3210
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3211
|
+
_content_type: Optional[StrictStr] = None,
|
3212
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3213
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3214
|
+
) -> None:
|
3215
|
+
"""Resets the logo of the organization
|
3216
|
+
|
3217
|
+
|
3218
|
+
:param organization_id: (required)
|
3219
|
+
:type organization_id: int
|
3220
|
+
:param _request_timeout: timeout setting for this request. If one
|
3221
|
+
number provided, it will be total request
|
3222
|
+
timeout. It can also be a pair (tuple) of
|
3223
|
+
(connection, read) timeouts.
|
3224
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3225
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3226
|
+
request; this effectively ignores the
|
3227
|
+
authentication in the spec for a single request.
|
3228
|
+
:type _request_auth: dict, optional
|
3229
|
+
:param _content_type: force content-type for the request.
|
3230
|
+
:type _content_type: str, Optional
|
3231
|
+
:param _headers: set to override the headers for a single
|
3232
|
+
request; this effectively ignores the headers
|
3233
|
+
in the spec for a single request.
|
3234
|
+
:type _headers: dict, optional
|
3235
|
+
:param _host_index: set to override the host_index for a single
|
3236
|
+
request; this effectively ignores the host_index
|
3237
|
+
in the spec for a single request.
|
3238
|
+
:type _host_index: int, optional
|
3239
|
+
:return: Returns the result object.
|
3240
|
+
""" # noqa: E501
|
3241
|
+
|
3242
|
+
_param = self._reset_organization_logo_serialize(
|
3243
|
+
organization_id=organization_id,
|
3244
|
+
_request_auth=_request_auth,
|
3245
|
+
_content_type=_content_type,
|
3246
|
+
_headers=_headers,
|
3247
|
+
_host_index=_host_index
|
3248
|
+
)
|
3249
|
+
|
3250
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3251
|
+
'200': None,
|
3252
|
+
}
|
3253
|
+
response_data = self.api_client.call_api(
|
3254
|
+
*_param,
|
3255
|
+
_request_timeout=_request_timeout
|
3256
|
+
)
|
3257
|
+
response_data.read()
|
3258
|
+
return self.api_client.response_deserialize(
|
3259
|
+
response_data=response_data,
|
3260
|
+
response_types_map=_response_types_map,
|
3261
|
+
).data
|
3262
|
+
|
3263
|
+
|
3264
|
+
@validate_call
|
3265
|
+
def reset_organization_logo_with_http_info(
|
3266
|
+
self,
|
3267
|
+
organization_id: StrictInt,
|
3268
|
+
_request_timeout: Union[
|
3269
|
+
None,
|
3270
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3271
|
+
Tuple[
|
3272
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3273
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3274
|
+
]
|
3275
|
+
] = None,
|
3276
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3277
|
+
_content_type: Optional[StrictStr] = None,
|
3278
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3279
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3280
|
+
) -> ApiResponse[None]:
|
3281
|
+
"""Resets the logo of the organization
|
3282
|
+
|
3283
|
+
|
3284
|
+
:param organization_id: (required)
|
3285
|
+
:type organization_id: int
|
3286
|
+
:param _request_timeout: timeout setting for this request. If one
|
3287
|
+
number provided, it will be total request
|
3288
|
+
timeout. It can also be a pair (tuple) of
|
3289
|
+
(connection, read) timeouts.
|
3290
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3291
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3292
|
+
request; this effectively ignores the
|
3293
|
+
authentication in the spec for a single request.
|
3294
|
+
:type _request_auth: dict, optional
|
3295
|
+
:param _content_type: force content-type for the request.
|
3296
|
+
:type _content_type: str, Optional
|
3297
|
+
:param _headers: set to override the headers for a single
|
3298
|
+
request; this effectively ignores the headers
|
3299
|
+
in the spec for a single request.
|
3300
|
+
:type _headers: dict, optional
|
3301
|
+
:param _host_index: set to override the host_index for a single
|
3302
|
+
request; this effectively ignores the host_index
|
3303
|
+
in the spec for a single request.
|
3304
|
+
:type _host_index: int, optional
|
3305
|
+
:return: Returns the result object.
|
3306
|
+
""" # noqa: E501
|
3307
|
+
|
3308
|
+
_param = self._reset_organization_logo_serialize(
|
3309
|
+
organization_id=organization_id,
|
3310
|
+
_request_auth=_request_auth,
|
3311
|
+
_content_type=_content_type,
|
3312
|
+
_headers=_headers,
|
3313
|
+
_host_index=_host_index
|
3314
|
+
)
|
3315
|
+
|
3316
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3317
|
+
'200': None,
|
3318
|
+
}
|
3319
|
+
response_data = self.api_client.call_api(
|
3320
|
+
*_param,
|
3321
|
+
_request_timeout=_request_timeout
|
3322
|
+
)
|
3323
|
+
response_data.read()
|
3324
|
+
return self.api_client.response_deserialize(
|
3325
|
+
response_data=response_data,
|
3326
|
+
response_types_map=_response_types_map,
|
3327
|
+
)
|
3328
|
+
|
3329
|
+
|
3330
|
+
@validate_call
|
3331
|
+
def reset_organization_logo_without_preload_content(
|
3332
|
+
self,
|
3333
|
+
organization_id: StrictInt,
|
3334
|
+
_request_timeout: Union[
|
3335
|
+
None,
|
3336
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3337
|
+
Tuple[
|
3338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3339
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3340
|
+
]
|
3341
|
+
] = None,
|
3342
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3343
|
+
_content_type: Optional[StrictStr] = None,
|
3344
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3345
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3346
|
+
) -> RESTResponseType:
|
3347
|
+
"""Resets the logo of the organization
|
3348
|
+
|
3349
|
+
|
3350
|
+
:param organization_id: (required)
|
3351
|
+
:type organization_id: int
|
3352
|
+
:param _request_timeout: timeout setting for this request. If one
|
3353
|
+
number provided, it will be total request
|
3354
|
+
timeout. It can also be a pair (tuple) of
|
3355
|
+
(connection, read) timeouts.
|
3356
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3357
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3358
|
+
request; this effectively ignores the
|
3359
|
+
authentication in the spec for a single request.
|
3360
|
+
:type _request_auth: dict, optional
|
3361
|
+
:param _content_type: force content-type for the request.
|
3362
|
+
:type _content_type: str, Optional
|
3363
|
+
:param _headers: set to override the headers for a single
|
3364
|
+
request; this effectively ignores the headers
|
3365
|
+
in the spec for a single request.
|
3366
|
+
:type _headers: dict, optional
|
3367
|
+
:param _host_index: set to override the host_index for a single
|
3368
|
+
request; this effectively ignores the host_index
|
3369
|
+
in the spec for a single request.
|
3370
|
+
:type _host_index: int, optional
|
3371
|
+
:return: Returns the result object.
|
3372
|
+
""" # noqa: E501
|
3373
|
+
|
3374
|
+
_param = self._reset_organization_logo_serialize(
|
3375
|
+
organization_id=organization_id,
|
3376
|
+
_request_auth=_request_auth,
|
3377
|
+
_content_type=_content_type,
|
3378
|
+
_headers=_headers,
|
3379
|
+
_host_index=_host_index
|
3380
|
+
)
|
3381
|
+
|
3382
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3383
|
+
'200': None,
|
3384
|
+
}
|
3385
|
+
response_data = self.api_client.call_api(
|
3386
|
+
*_param,
|
3387
|
+
_request_timeout=_request_timeout
|
3388
|
+
)
|
3389
|
+
return response_data.response
|
3390
|
+
|
3391
|
+
|
3392
|
+
def _reset_organization_logo_serialize(
|
3393
|
+
self,
|
3394
|
+
organization_id,
|
3395
|
+
_request_auth,
|
3396
|
+
_content_type,
|
3397
|
+
_headers,
|
3398
|
+
_host_index,
|
3399
|
+
) -> RequestSerialized:
|
3400
|
+
|
3401
|
+
_host = None
|
3402
|
+
|
3403
|
+
_collection_formats: Dict[str, str] = {
|
3404
|
+
}
|
3405
|
+
|
3406
|
+
_path_params: Dict[str, str] = {}
|
3407
|
+
_query_params: List[Tuple[str, str]] = []
|
3408
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
3409
|
+
_form_params: List[Tuple[str, str]] = []
|
3410
|
+
_files: Dict[
|
3411
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
3412
|
+
] = {}
|
3413
|
+
_body_params: Optional[bytes] = None
|
3414
|
+
|
3415
|
+
# process the path parameters
|
3416
|
+
if organization_id is not None:
|
3417
|
+
_path_params['organization_id'] = organization_id
|
3418
|
+
# process the query parameters
|
3419
|
+
# process the header parameters
|
3420
|
+
# process the form parameters
|
3421
|
+
# process the body parameter
|
3422
|
+
|
3423
|
+
|
3424
|
+
|
3425
|
+
|
3426
|
+
# authentication setting
|
3427
|
+
_auth_settings: List[str] = [
|
3428
|
+
'QAnswer-Api-Key',
|
3429
|
+
'Bearer'
|
3430
|
+
]
|
3431
|
+
|
3432
|
+
return self.api_client.param_serialize(
|
3433
|
+
method='POST',
|
3434
|
+
resource_path='/api/organization/{organization_id}/logo/reset',
|
3435
|
+
path_params=_path_params,
|
3436
|
+
query_params=_query_params,
|
3437
|
+
header_params=_header_params,
|
3438
|
+
body=_body_params,
|
3439
|
+
post_params=_form_params,
|
3440
|
+
files=_files,
|
3441
|
+
auth_settings=_auth_settings,
|
3442
|
+
collection_formats=_collection_formats,
|
3443
|
+
_host=_host,
|
3444
|
+
_request_auth=_request_auth
|
3445
|
+
)
|
3446
|
+
|
3447
|
+
|
3448
|
+
|
3449
|
+
|
3450
|
+
@validate_call
|
3451
|
+
def search_organizations(
|
3452
|
+
self,
|
3453
|
+
filter: OrganizationFilterDto,
|
3454
|
+
_request_timeout: Union[
|
3455
|
+
None,
|
3456
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3457
|
+
Tuple[
|
3458
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3459
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3460
|
+
]
|
3461
|
+
] = None,
|
3462
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3463
|
+
_content_type: Optional[StrictStr] = None,
|
3464
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3465
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3466
|
+
) -> OrganizationListDto:
|
3467
|
+
"""Search over all organizations
|
3468
|
+
|
3469
|
+
|
3470
|
+
:param filter: (required)
|
3471
|
+
:type filter: OrganizationFilterDto
|
3472
|
+
:param _request_timeout: timeout setting for this request. If one
|
3473
|
+
number provided, it will be total request
|
3474
|
+
timeout. It can also be a pair (tuple) of
|
3475
|
+
(connection, read) timeouts.
|
3476
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3477
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3478
|
+
request; this effectively ignores the
|
3479
|
+
authentication in the spec for a single request.
|
3480
|
+
:type _request_auth: dict, optional
|
3481
|
+
:param _content_type: force content-type for the request.
|
3482
|
+
:type _content_type: str, Optional
|
3483
|
+
:param _headers: set to override the headers for a single
|
3484
|
+
request; this effectively ignores the headers
|
3485
|
+
in the spec for a single request.
|
3486
|
+
:type _headers: dict, optional
|
3487
|
+
:param _host_index: set to override the host_index for a single
|
3488
|
+
request; this effectively ignores the host_index
|
3489
|
+
in the spec for a single request.
|
3490
|
+
:type _host_index: int, optional
|
3491
|
+
:return: Returns the result object.
|
3492
|
+
""" # noqa: E501
|
3493
|
+
|
3494
|
+
_param = self._search_organizations_serialize(
|
3495
|
+
filter=filter,
|
3496
|
+
_request_auth=_request_auth,
|
3497
|
+
_content_type=_content_type,
|
3498
|
+
_headers=_headers,
|
3499
|
+
_host_index=_host_index
|
3500
|
+
)
|
3501
|
+
|
3502
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3503
|
+
'200': "OrganizationListDto",
|
3504
|
+
}
|
3505
|
+
response_data = self.api_client.call_api(
|
3506
|
+
*_param,
|
3507
|
+
_request_timeout=_request_timeout
|
3508
|
+
)
|
3509
|
+
response_data.read()
|
3510
|
+
return self.api_client.response_deserialize(
|
3511
|
+
response_data=response_data,
|
3512
|
+
response_types_map=_response_types_map,
|
3513
|
+
).data
|
3514
|
+
|
3515
|
+
|
3516
|
+
@validate_call
|
3517
|
+
def search_organizations_with_http_info(
|
3518
|
+
self,
|
3519
|
+
filter: OrganizationFilterDto,
|
3520
|
+
_request_timeout: Union[
|
3521
|
+
None,
|
3522
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3523
|
+
Tuple[
|
3524
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3525
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3526
|
+
]
|
3527
|
+
] = None,
|
3528
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3529
|
+
_content_type: Optional[StrictStr] = None,
|
3530
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3531
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3532
|
+
) -> ApiResponse[OrganizationListDto]:
|
3533
|
+
"""Search over all organizations
|
3534
|
+
|
3535
|
+
|
3536
|
+
:param filter: (required)
|
3537
|
+
:type filter: OrganizationFilterDto
|
3538
|
+
:param _request_timeout: timeout setting for this request. If one
|
3539
|
+
number provided, it will be total request
|
3540
|
+
timeout. It can also be a pair (tuple) of
|
3541
|
+
(connection, read) timeouts.
|
3542
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3543
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3544
|
+
request; this effectively ignores the
|
3545
|
+
authentication in the spec for a single request.
|
3546
|
+
:type _request_auth: dict, optional
|
3547
|
+
:param _content_type: force content-type for the request.
|
3548
|
+
:type _content_type: str, Optional
|
3549
|
+
:param _headers: set to override the headers for a single
|
3550
|
+
request; this effectively ignores the headers
|
3551
|
+
in the spec for a single request.
|
3552
|
+
:type _headers: dict, optional
|
3553
|
+
:param _host_index: set to override the host_index for a single
|
3554
|
+
request; this effectively ignores the host_index
|
3555
|
+
in the spec for a single request.
|
3556
|
+
:type _host_index: int, optional
|
3557
|
+
:return: Returns the result object.
|
3558
|
+
""" # noqa: E501
|
3559
|
+
|
3560
|
+
_param = self._search_organizations_serialize(
|
3561
|
+
filter=filter,
|
3562
|
+
_request_auth=_request_auth,
|
3563
|
+
_content_type=_content_type,
|
3564
|
+
_headers=_headers,
|
3565
|
+
_host_index=_host_index
|
3566
|
+
)
|
3567
|
+
|
3568
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3569
|
+
'200': "OrganizationListDto",
|
3570
|
+
}
|
3571
|
+
response_data = self.api_client.call_api(
|
3572
|
+
*_param,
|
3573
|
+
_request_timeout=_request_timeout
|
3574
|
+
)
|
3575
|
+
response_data.read()
|
3576
|
+
return self.api_client.response_deserialize(
|
3577
|
+
response_data=response_data,
|
3578
|
+
response_types_map=_response_types_map,
|
3579
|
+
)
|
3580
|
+
|
3581
|
+
|
3582
|
+
@validate_call
|
3583
|
+
def search_organizations_without_preload_content(
|
3584
|
+
self,
|
3585
|
+
filter: OrganizationFilterDto,
|
3586
|
+
_request_timeout: Union[
|
3587
|
+
None,
|
3588
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3589
|
+
Tuple[
|
3590
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3591
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3592
|
+
]
|
3593
|
+
] = None,
|
3594
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3595
|
+
_content_type: Optional[StrictStr] = None,
|
3596
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3597
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3598
|
+
) -> RESTResponseType:
|
3599
|
+
"""Search over all organizations
|
3600
|
+
|
3601
|
+
|
3602
|
+
:param filter: (required)
|
3603
|
+
:type filter: OrganizationFilterDto
|
3604
|
+
:param _request_timeout: timeout setting for this request. If one
|
3605
|
+
number provided, it will be total request
|
3606
|
+
timeout. It can also be a pair (tuple) of
|
3607
|
+
(connection, read) timeouts.
|
3608
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3609
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3610
|
+
request; this effectively ignores the
|
3611
|
+
authentication in the spec for a single request.
|
3612
|
+
:type _request_auth: dict, optional
|
3613
|
+
:param _content_type: force content-type for the request.
|
3614
|
+
:type _content_type: str, Optional
|
3615
|
+
:param _headers: set to override the headers for a single
|
3616
|
+
request; this effectively ignores the headers
|
3617
|
+
in the spec for a single request.
|
3618
|
+
:type _headers: dict, optional
|
3619
|
+
:param _host_index: set to override the host_index for a single
|
3620
|
+
request; this effectively ignores the host_index
|
3621
|
+
in the spec for a single request.
|
3622
|
+
:type _host_index: int, optional
|
3623
|
+
:return: Returns the result object.
|
3624
|
+
""" # noqa: E501
|
3625
|
+
|
3626
|
+
_param = self._search_organizations_serialize(
|
3627
|
+
filter=filter,
|
3628
|
+
_request_auth=_request_auth,
|
3629
|
+
_content_type=_content_type,
|
3630
|
+
_headers=_headers,
|
3631
|
+
_host_index=_host_index
|
3632
|
+
)
|
3633
|
+
|
3634
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3635
|
+
'200': "OrganizationListDto",
|
3636
|
+
}
|
3637
|
+
response_data = self.api_client.call_api(
|
3638
|
+
*_param,
|
3639
|
+
_request_timeout=_request_timeout
|
3640
|
+
)
|
3641
|
+
return response_data.response
|
3642
|
+
|
3643
|
+
|
3644
|
+
def _search_organizations_serialize(
|
3645
|
+
self,
|
3646
|
+
filter,
|
3647
|
+
_request_auth,
|
3648
|
+
_content_type,
|
3649
|
+
_headers,
|
3650
|
+
_host_index,
|
3651
|
+
) -> RequestSerialized:
|
3652
|
+
|
3653
|
+
_host = None
|
3654
|
+
|
3655
|
+
_collection_formats: Dict[str, str] = {
|
3656
|
+
}
|
3657
|
+
|
3658
|
+
_path_params: Dict[str, str] = {}
|
3659
|
+
_query_params: List[Tuple[str, str]] = []
|
3660
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
3661
|
+
_form_params: List[Tuple[str, str]] = []
|
3662
|
+
_files: Dict[
|
3663
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
3664
|
+
] = {}
|
3665
|
+
_body_params: Optional[bytes] = None
|
3666
|
+
|
3667
|
+
# process the path parameters
|
3668
|
+
# process the query parameters
|
3669
|
+
if filter is not None:
|
3670
|
+
|
3671
|
+
_query_params.append(('filter', filter))
|
3672
|
+
|
3673
|
+
# process the header parameters
|
3674
|
+
# process the form parameters
|
3675
|
+
# process the body parameter
|
3676
|
+
|
3677
|
+
|
3678
|
+
# set the HTTP header `Accept`
|
3679
|
+
if 'Accept' not in _header_params:
|
3680
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
3681
|
+
[
|
3682
|
+
'*/*'
|
3683
|
+
]
|
3684
|
+
)
|
3685
|
+
|
3686
|
+
|
3687
|
+
# authentication setting
|
3688
|
+
_auth_settings: List[str] = [
|
3689
|
+
'QAnswer-Api-Key',
|
3690
|
+
'Bearer'
|
3691
|
+
]
|
3692
|
+
|
3693
|
+
return self.api_client.param_serialize(
|
3694
|
+
method='GET',
|
3695
|
+
resource_path='/api/organization/search',
|
3696
|
+
path_params=_path_params,
|
3697
|
+
query_params=_query_params,
|
3698
|
+
header_params=_header_params,
|
3699
|
+
body=_body_params,
|
3700
|
+
post_params=_form_params,
|
3701
|
+
files=_files,
|
3702
|
+
auth_settings=_auth_settings,
|
3703
|
+
collection_formats=_collection_formats,
|
3704
|
+
_host=_host,
|
3705
|
+
_request_auth=_request_auth
|
3706
|
+
)
|
3707
|
+
|
3708
|
+
|
3709
|
+
|
3710
|
+
|
3711
|
+
@validate_call
|
3712
|
+
def set_organization_domain(
|
3713
|
+
self,
|
3714
|
+
organization_id: StrictInt,
|
3715
|
+
domain: StrictStr,
|
3716
|
+
_request_timeout: Union[
|
3717
|
+
None,
|
3718
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3719
|
+
Tuple[
|
3720
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3721
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3722
|
+
]
|
3723
|
+
] = None,
|
3724
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3725
|
+
_content_type: Optional[StrictStr] = None,
|
3726
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3727
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3728
|
+
) -> None:
|
3729
|
+
"""Resets the domain of the organization
|
3730
|
+
|
3731
|
+
|
3732
|
+
:param organization_id: (required)
|
3733
|
+
:type organization_id: int
|
3734
|
+
:param domain: (required)
|
3735
|
+
:type domain: str
|
3736
|
+
:param _request_timeout: timeout setting for this request. If one
|
3737
|
+
number provided, it will be total request
|
3738
|
+
timeout. It can also be a pair (tuple) of
|
3739
|
+
(connection, read) timeouts.
|
3740
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3741
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3742
|
+
request; this effectively ignores the
|
3743
|
+
authentication in the spec for a single request.
|
3744
|
+
:type _request_auth: dict, optional
|
3745
|
+
:param _content_type: force content-type for the request.
|
3746
|
+
:type _content_type: str, Optional
|
3747
|
+
:param _headers: set to override the headers for a single
|
3748
|
+
request; this effectively ignores the headers
|
3749
|
+
in the spec for a single request.
|
3750
|
+
:type _headers: dict, optional
|
3751
|
+
:param _host_index: set to override the host_index for a single
|
3752
|
+
request; this effectively ignores the host_index
|
3753
|
+
in the spec for a single request.
|
3754
|
+
:type _host_index: int, optional
|
3755
|
+
:return: Returns the result object.
|
3756
|
+
""" # noqa: E501
|
3757
|
+
|
3758
|
+
_param = self._set_organization_domain_serialize(
|
3759
|
+
organization_id=organization_id,
|
3760
|
+
domain=domain,
|
3761
|
+
_request_auth=_request_auth,
|
3762
|
+
_content_type=_content_type,
|
3763
|
+
_headers=_headers,
|
3764
|
+
_host_index=_host_index
|
3765
|
+
)
|
3766
|
+
|
3767
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3768
|
+
'200': None,
|
3769
|
+
}
|
3770
|
+
response_data = self.api_client.call_api(
|
3771
|
+
*_param,
|
3772
|
+
_request_timeout=_request_timeout
|
3773
|
+
)
|
3774
|
+
response_data.read()
|
3775
|
+
return self.api_client.response_deserialize(
|
3776
|
+
response_data=response_data,
|
3777
|
+
response_types_map=_response_types_map,
|
3778
|
+
).data
|
3779
|
+
|
3780
|
+
|
3781
|
+
@validate_call
|
3782
|
+
def set_organization_domain_with_http_info(
|
3783
|
+
self,
|
3784
|
+
organization_id: StrictInt,
|
3785
|
+
domain: StrictStr,
|
3786
|
+
_request_timeout: Union[
|
3787
|
+
None,
|
3788
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3789
|
+
Tuple[
|
3790
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3791
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3792
|
+
]
|
3793
|
+
] = None,
|
3794
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3795
|
+
_content_type: Optional[StrictStr] = None,
|
3796
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3797
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3798
|
+
) -> ApiResponse[None]:
|
3799
|
+
"""Resets the domain of the organization
|
3800
|
+
|
3801
|
+
|
3802
|
+
:param organization_id: (required)
|
3803
|
+
:type organization_id: int
|
3804
|
+
:param domain: (required)
|
3805
|
+
:type domain: str
|
3806
|
+
:param _request_timeout: timeout setting for this request. If one
|
3807
|
+
number provided, it will be total request
|
3808
|
+
timeout. It can also be a pair (tuple) of
|
3809
|
+
(connection, read) timeouts.
|
3810
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3811
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3812
|
+
request; this effectively ignores the
|
3813
|
+
authentication in the spec for a single request.
|
3814
|
+
:type _request_auth: dict, optional
|
3815
|
+
:param _content_type: force content-type for the request.
|
3816
|
+
:type _content_type: str, Optional
|
3817
|
+
:param _headers: set to override the headers for a single
|
3818
|
+
request; this effectively ignores the headers
|
3819
|
+
in the spec for a single request.
|
3820
|
+
:type _headers: dict, optional
|
3821
|
+
:param _host_index: set to override the host_index for a single
|
3822
|
+
request; this effectively ignores the host_index
|
3823
|
+
in the spec for a single request.
|
3824
|
+
:type _host_index: int, optional
|
3825
|
+
:return: Returns the result object.
|
3826
|
+
""" # noqa: E501
|
3827
|
+
|
3828
|
+
_param = self._set_organization_domain_serialize(
|
3829
|
+
organization_id=organization_id,
|
3830
|
+
domain=domain,
|
3831
|
+
_request_auth=_request_auth,
|
3832
|
+
_content_type=_content_type,
|
3833
|
+
_headers=_headers,
|
3834
|
+
_host_index=_host_index
|
3835
|
+
)
|
3836
|
+
|
3837
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3838
|
+
'200': None,
|
3839
|
+
}
|
3840
|
+
response_data = self.api_client.call_api(
|
3841
|
+
*_param,
|
3842
|
+
_request_timeout=_request_timeout
|
3843
|
+
)
|
3844
|
+
response_data.read()
|
3845
|
+
return self.api_client.response_deserialize(
|
3846
|
+
response_data=response_data,
|
3847
|
+
response_types_map=_response_types_map,
|
3848
|
+
)
|
3849
|
+
|
3850
|
+
|
3851
|
+
@validate_call
|
3852
|
+
def set_organization_domain_without_preload_content(
|
3853
|
+
self,
|
3854
|
+
organization_id: StrictInt,
|
3855
|
+
domain: StrictStr,
|
3856
|
+
_request_timeout: Union[
|
3857
|
+
None,
|
3858
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3859
|
+
Tuple[
|
3860
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3861
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3862
|
+
]
|
3863
|
+
] = None,
|
3864
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3865
|
+
_content_type: Optional[StrictStr] = None,
|
3866
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3867
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3868
|
+
) -> RESTResponseType:
|
3869
|
+
"""Resets the domain of the organization
|
3870
|
+
|
3871
|
+
|
3872
|
+
:param organization_id: (required)
|
3873
|
+
:type organization_id: int
|
3874
|
+
:param domain: (required)
|
3875
|
+
:type domain: str
|
3876
|
+
:param _request_timeout: timeout setting for this request. If one
|
3877
|
+
number provided, it will be total request
|
3878
|
+
timeout. It can also be a pair (tuple) of
|
3879
|
+
(connection, read) timeouts.
|
3880
|
+
:type _request_timeout: int, tuple(int, int), optional
|
3881
|
+
:param _request_auth: set to override the auth_settings for an a single
|
3882
|
+
request; this effectively ignores the
|
3883
|
+
authentication in the spec for a single request.
|
3884
|
+
:type _request_auth: dict, optional
|
3885
|
+
:param _content_type: force content-type for the request.
|
3886
|
+
:type _content_type: str, Optional
|
3887
|
+
:param _headers: set to override the headers for a single
|
3888
|
+
request; this effectively ignores the headers
|
3889
|
+
in the spec for a single request.
|
3890
|
+
:type _headers: dict, optional
|
3891
|
+
:param _host_index: set to override the host_index for a single
|
3892
|
+
request; this effectively ignores the host_index
|
3893
|
+
in the spec for a single request.
|
3894
|
+
:type _host_index: int, optional
|
3895
|
+
:return: Returns the result object.
|
3896
|
+
""" # noqa: E501
|
3897
|
+
|
3898
|
+
_param = self._set_organization_domain_serialize(
|
3899
|
+
organization_id=organization_id,
|
3900
|
+
domain=domain,
|
3901
|
+
_request_auth=_request_auth,
|
3902
|
+
_content_type=_content_type,
|
3903
|
+
_headers=_headers,
|
3904
|
+
_host_index=_host_index
|
3905
|
+
)
|
3906
|
+
|
3907
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
3908
|
+
'200': None,
|
3909
|
+
}
|
3910
|
+
response_data = self.api_client.call_api(
|
3911
|
+
*_param,
|
3912
|
+
_request_timeout=_request_timeout
|
3913
|
+
)
|
3914
|
+
return response_data.response
|
3915
|
+
|
3916
|
+
|
3917
|
+
def _set_organization_domain_serialize(
|
3918
|
+
self,
|
3919
|
+
organization_id,
|
3920
|
+
domain,
|
3921
|
+
_request_auth,
|
3922
|
+
_content_type,
|
3923
|
+
_headers,
|
3924
|
+
_host_index,
|
3925
|
+
) -> RequestSerialized:
|
3926
|
+
|
3927
|
+
_host = None
|
3928
|
+
|
3929
|
+
_collection_formats: Dict[str, str] = {
|
3930
|
+
}
|
3931
|
+
|
3932
|
+
_path_params: Dict[str, str] = {}
|
3933
|
+
_query_params: List[Tuple[str, str]] = []
|
3934
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
3935
|
+
_form_params: List[Tuple[str, str]] = []
|
3936
|
+
_files: Dict[
|
3937
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
3938
|
+
] = {}
|
3939
|
+
_body_params: Optional[bytes] = None
|
3940
|
+
|
3941
|
+
# process the path parameters
|
3942
|
+
if organization_id is not None:
|
3943
|
+
_path_params['organization_id'] = organization_id
|
3944
|
+
# process the query parameters
|
3945
|
+
if domain is not None:
|
3946
|
+
|
3947
|
+
_query_params.append(('domain', domain))
|
3948
|
+
|
3949
|
+
# process the header parameters
|
3950
|
+
# process the form parameters
|
3951
|
+
# process the body parameter
|
3952
|
+
|
3953
|
+
|
3954
|
+
|
3955
|
+
|
3956
|
+
# authentication setting
|
3957
|
+
_auth_settings: List[str] = [
|
3958
|
+
'QAnswer-Api-Key',
|
3959
|
+
'Bearer'
|
3960
|
+
]
|
3961
|
+
|
3962
|
+
return self.api_client.param_serialize(
|
3963
|
+
method='POST',
|
3964
|
+
resource_path='/api/organization/{organization_id}/domain',
|
3965
|
+
path_params=_path_params,
|
3966
|
+
query_params=_query_params,
|
3967
|
+
header_params=_header_params,
|
3968
|
+
body=_body_params,
|
3969
|
+
post_params=_form_params,
|
3970
|
+
files=_files,
|
3971
|
+
auth_settings=_auth_settings,
|
3972
|
+
collection_formats=_collection_formats,
|
3973
|
+
_host=_host,
|
3974
|
+
_request_auth=_request_auth
|
3975
|
+
)
|
3976
|
+
|
3977
|
+
|
3978
|
+
|
3979
|
+
|
3980
|
+
@validate_call
|
3981
|
+
def set_organization_logo(
|
3982
|
+
self,
|
3983
|
+
organization_id: StrictInt,
|
3984
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
3985
|
+
_request_timeout: Union[
|
3986
|
+
None,
|
3987
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3988
|
+
Tuple[
|
3989
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3990
|
+
Annotated[StrictFloat, Field(gt=0)]
|
3991
|
+
]
|
3992
|
+
] = None,
|
3993
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3994
|
+
_content_type: Optional[StrictStr] = None,
|
3995
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3996
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3997
|
+
) -> None:
|
3998
|
+
"""Set the logo of an organization
|
3999
|
+
|
4000
|
+
|
4001
|
+
:param organization_id: (required)
|
4002
|
+
:type organization_id: int
|
4003
|
+
:param file: (required)
|
4004
|
+
:type file: bytearray
|
4005
|
+
:param _request_timeout: timeout setting for this request. If one
|
4006
|
+
number provided, it will be total request
|
4007
|
+
timeout. It can also be a pair (tuple) of
|
4008
|
+
(connection, read) timeouts.
|
4009
|
+
:type _request_timeout: int, tuple(int, int), optional
|
4010
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4011
|
+
request; this effectively ignores the
|
4012
|
+
authentication in the spec for a single request.
|
4013
|
+
:type _request_auth: dict, optional
|
4014
|
+
:param _content_type: force content-type for the request.
|
4015
|
+
:type _content_type: str, Optional
|
4016
|
+
:param _headers: set to override the headers for a single
|
4017
|
+
request; this effectively ignores the headers
|
4018
|
+
in the spec for a single request.
|
4019
|
+
:type _headers: dict, optional
|
4020
|
+
:param _host_index: set to override the host_index for a single
|
4021
|
+
request; this effectively ignores the host_index
|
4022
|
+
in the spec for a single request.
|
4023
|
+
:type _host_index: int, optional
|
4024
|
+
:return: Returns the result object.
|
4025
|
+
""" # noqa: E501
|
4026
|
+
|
4027
|
+
_param = self._set_organization_logo_serialize(
|
4028
|
+
organization_id=organization_id,
|
4029
|
+
file=file,
|
4030
|
+
_request_auth=_request_auth,
|
4031
|
+
_content_type=_content_type,
|
4032
|
+
_headers=_headers,
|
4033
|
+
_host_index=_host_index
|
4034
|
+
)
|
4035
|
+
|
4036
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
4037
|
+
'200': None,
|
4038
|
+
}
|
4039
|
+
response_data = self.api_client.call_api(
|
4040
|
+
*_param,
|
4041
|
+
_request_timeout=_request_timeout
|
4042
|
+
)
|
4043
|
+
response_data.read()
|
4044
|
+
return self.api_client.response_deserialize(
|
4045
|
+
response_data=response_data,
|
4046
|
+
response_types_map=_response_types_map,
|
4047
|
+
).data
|
4048
|
+
|
4049
|
+
|
4050
|
+
@validate_call
|
4051
|
+
def set_organization_logo_with_http_info(
|
4052
|
+
self,
|
4053
|
+
organization_id: StrictInt,
|
4054
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
4055
|
+
_request_timeout: Union[
|
4056
|
+
None,
|
4057
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4058
|
+
Tuple[
|
4059
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4060
|
+
Annotated[StrictFloat, Field(gt=0)]
|
4061
|
+
]
|
4062
|
+
] = None,
|
4063
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4064
|
+
_content_type: Optional[StrictStr] = None,
|
4065
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4066
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4067
|
+
) -> ApiResponse[None]:
|
4068
|
+
"""Set the logo of an organization
|
4069
|
+
|
4070
|
+
|
4071
|
+
:param organization_id: (required)
|
4072
|
+
:type organization_id: int
|
4073
|
+
:param file: (required)
|
4074
|
+
:type file: bytearray
|
4075
|
+
:param _request_timeout: timeout setting for this request. If one
|
4076
|
+
number provided, it will be total request
|
4077
|
+
timeout. It can also be a pair (tuple) of
|
4078
|
+
(connection, read) timeouts.
|
4079
|
+
:type _request_timeout: int, tuple(int, int), optional
|
4080
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4081
|
+
request; this effectively ignores the
|
4082
|
+
authentication in the spec for a single request.
|
4083
|
+
:type _request_auth: dict, optional
|
4084
|
+
:param _content_type: force content-type for the request.
|
4085
|
+
:type _content_type: str, Optional
|
4086
|
+
:param _headers: set to override the headers for a single
|
4087
|
+
request; this effectively ignores the headers
|
4088
|
+
in the spec for a single request.
|
4089
|
+
:type _headers: dict, optional
|
4090
|
+
:param _host_index: set to override the host_index for a single
|
4091
|
+
request; this effectively ignores the host_index
|
4092
|
+
in the spec for a single request.
|
4093
|
+
:type _host_index: int, optional
|
4094
|
+
:return: Returns the result object.
|
4095
|
+
""" # noqa: E501
|
4096
|
+
|
4097
|
+
_param = self._set_organization_logo_serialize(
|
4098
|
+
organization_id=organization_id,
|
4099
|
+
file=file,
|
4100
|
+
_request_auth=_request_auth,
|
4101
|
+
_content_type=_content_type,
|
4102
|
+
_headers=_headers,
|
4103
|
+
_host_index=_host_index
|
4104
|
+
)
|
4105
|
+
|
4106
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
4107
|
+
'200': None,
|
4108
|
+
}
|
4109
|
+
response_data = self.api_client.call_api(
|
4110
|
+
*_param,
|
4111
|
+
_request_timeout=_request_timeout
|
4112
|
+
)
|
4113
|
+
response_data.read()
|
4114
|
+
return self.api_client.response_deserialize(
|
4115
|
+
response_data=response_data,
|
4116
|
+
response_types_map=_response_types_map,
|
4117
|
+
)
|
4118
|
+
|
4119
|
+
|
4120
|
+
@validate_call
|
4121
|
+
def set_organization_logo_without_preload_content(
|
4122
|
+
self,
|
4123
|
+
organization_id: StrictInt,
|
4124
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
4125
|
+
_request_timeout: Union[
|
4126
|
+
None,
|
4127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4128
|
+
Tuple[
|
4129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4130
|
+
Annotated[StrictFloat, Field(gt=0)]
|
4131
|
+
]
|
4132
|
+
] = None,
|
4133
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4134
|
+
_content_type: Optional[StrictStr] = None,
|
4135
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4136
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4137
|
+
) -> RESTResponseType:
|
4138
|
+
"""Set the logo of an organization
|
4139
|
+
|
4140
|
+
|
4141
|
+
:param organization_id: (required)
|
4142
|
+
:type organization_id: int
|
4143
|
+
:param file: (required)
|
4144
|
+
:type file: bytearray
|
4145
|
+
:param _request_timeout: timeout setting for this request. If one
|
4146
|
+
number provided, it will be total request
|
4147
|
+
timeout. It can also be a pair (tuple) of
|
4148
|
+
(connection, read) timeouts.
|
4149
|
+
:type _request_timeout: int, tuple(int, int), optional
|
4150
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4151
|
+
request; this effectively ignores the
|
4152
|
+
authentication in the spec for a single request.
|
4153
|
+
:type _request_auth: dict, optional
|
4154
|
+
:param _content_type: force content-type for the request.
|
4155
|
+
:type _content_type: str, Optional
|
4156
|
+
:param _headers: set to override the headers for a single
|
4157
|
+
request; this effectively ignores the headers
|
4158
|
+
in the spec for a single request.
|
4159
|
+
:type _headers: dict, optional
|
4160
|
+
:param _host_index: set to override the host_index for a single
|
4161
|
+
request; this effectively ignores the host_index
|
4162
|
+
in the spec for a single request.
|
4163
|
+
:type _host_index: int, optional
|
4164
|
+
:return: Returns the result object.
|
4165
|
+
""" # noqa: E501
|
4166
|
+
|
4167
|
+
_param = self._set_organization_logo_serialize(
|
4168
|
+
organization_id=organization_id,
|
4169
|
+
file=file,
|
4170
|
+
_request_auth=_request_auth,
|
4171
|
+
_content_type=_content_type,
|
4172
|
+
_headers=_headers,
|
4173
|
+
_host_index=_host_index
|
4174
|
+
)
|
4175
|
+
|
4176
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
4177
|
+
'200': None,
|
4178
|
+
}
|
4179
|
+
response_data = self.api_client.call_api(
|
4180
|
+
*_param,
|
4181
|
+
_request_timeout=_request_timeout
|
4182
|
+
)
|
4183
|
+
return response_data.response
|
4184
|
+
|
4185
|
+
|
4186
|
+
def _set_organization_logo_serialize(
|
4187
|
+
self,
|
4188
|
+
organization_id,
|
4189
|
+
file,
|
4190
|
+
_request_auth,
|
4191
|
+
_content_type,
|
4192
|
+
_headers,
|
4193
|
+
_host_index,
|
4194
|
+
) -> RequestSerialized:
|
4195
|
+
|
4196
|
+
_host = None
|
4197
|
+
|
4198
|
+
_collection_formats: Dict[str, str] = {
|
4199
|
+
}
|
4200
|
+
|
4201
|
+
_path_params: Dict[str, str] = {}
|
4202
|
+
_query_params: List[Tuple[str, str]] = []
|
4203
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
4204
|
+
_form_params: List[Tuple[str, str]] = []
|
4205
|
+
_files: Dict[
|
4206
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
4207
|
+
] = {}
|
4208
|
+
_body_params: Optional[bytes] = None
|
4209
|
+
|
4210
|
+
# process the path parameters
|
4211
|
+
if organization_id is not None:
|
4212
|
+
_path_params['organization_id'] = organization_id
|
4213
|
+
# process the query parameters
|
4214
|
+
# process the header parameters
|
4215
|
+
# process the form parameters
|
4216
|
+
if file is not None:
|
4217
|
+
_files['file'] = file
|
4218
|
+
# process the body parameter
|
4219
|
+
|
4220
|
+
|
4221
|
+
|
4222
|
+
# set the HTTP header `Content-Type`
|
4223
|
+
if _content_type:
|
4224
|
+
_header_params['Content-Type'] = _content_type
|
4225
|
+
else:
|
4226
|
+
_default_content_type = (
|
4227
|
+
self.api_client.select_header_content_type(
|
4228
|
+
[
|
4229
|
+
'multipart/form-data'
|
4230
|
+
]
|
4231
|
+
)
|
4232
|
+
)
|
4233
|
+
if _default_content_type is not None:
|
4234
|
+
_header_params['Content-Type'] = _default_content_type
|
4235
|
+
|
4236
|
+
# authentication setting
|
4237
|
+
_auth_settings: List[str] = [
|
4238
|
+
'QAnswer-Api-Key',
|
4239
|
+
'Bearer'
|
4240
|
+
]
|
4241
|
+
|
4242
|
+
return self.api_client.param_serialize(
|
4243
|
+
method='POST',
|
4244
|
+
resource_path='/api/organization/{organization_id}/logo',
|
4245
|
+
path_params=_path_params,
|
4246
|
+
query_params=_query_params,
|
4247
|
+
header_params=_header_params,
|
4248
|
+
body=_body_params,
|
4249
|
+
post_params=_form_params,
|
4250
|
+
files=_files,
|
4251
|
+
auth_settings=_auth_settings,
|
4252
|
+
collection_formats=_collection_formats,
|
4253
|
+
_host=_host,
|
4254
|
+
_request_auth=_request_auth
|
4255
|
+
)
|
4256
|
+
|
4257
|
+
|
4258
|
+
|
4259
|
+
|
4260
|
+
@validate_call
|
4261
|
+
def update_organization(
|
4262
|
+
self,
|
4263
|
+
organization_id: StrictInt,
|
4264
|
+
organization_creation: OrganizationCreation,
|
4265
|
+
_request_timeout: Union[
|
4266
|
+
None,
|
4267
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4268
|
+
Tuple[
|
4269
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4270
|
+
Annotated[StrictFloat, Field(gt=0)]
|
4271
|
+
]
|
4272
|
+
] = None,
|
4273
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4274
|
+
_content_type: Optional[StrictStr] = None,
|
4275
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4276
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4277
|
+
) -> Organization:
|
4278
|
+
"""Updates an existing organization
|
4279
|
+
|
4280
|
+
Modifies organization's details based on the provided information
|
4281
|
+
|
4282
|
+
:param organization_id: (required)
|
4283
|
+
:type organization_id: int
|
4284
|
+
:param organization_creation: (required)
|
4285
|
+
:type organization_creation: OrganizationCreation
|
4286
|
+
:param _request_timeout: timeout setting for this request. If one
|
4287
|
+
number provided, it will be total request
|
4288
|
+
timeout. It can also be a pair (tuple) of
|
4289
|
+
(connection, read) timeouts.
|
4290
|
+
:type _request_timeout: int, tuple(int, int), optional
|
4291
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4292
|
+
request; this effectively ignores the
|
4293
|
+
authentication in the spec for a single request.
|
4294
|
+
:type _request_auth: dict, optional
|
4295
|
+
:param _content_type: force content-type for the request.
|
4296
|
+
:type _content_type: str, Optional
|
4297
|
+
:param _headers: set to override the headers for a single
|
4298
|
+
request; this effectively ignores the headers
|
4299
|
+
in the spec for a single request.
|
4300
|
+
:type _headers: dict, optional
|
4301
|
+
:param _host_index: set to override the host_index for a single
|
4302
|
+
request; this effectively ignores the host_index
|
4303
|
+
in the spec for a single request.
|
4304
|
+
:type _host_index: int, optional
|
4305
|
+
:return: Returns the result object.
|
4306
|
+
""" # noqa: E501
|
4307
|
+
|
4308
|
+
_param = self._update_organization_serialize(
|
4309
|
+
organization_id=organization_id,
|
4310
|
+
organization_creation=organization_creation,
|
4311
|
+
_request_auth=_request_auth,
|
4312
|
+
_content_type=_content_type,
|
4313
|
+
_headers=_headers,
|
4314
|
+
_host_index=_host_index
|
4315
|
+
)
|
4316
|
+
|
4317
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
4318
|
+
'200': "Organization",
|
4319
|
+
}
|
4320
|
+
response_data = self.api_client.call_api(
|
4321
|
+
*_param,
|
4322
|
+
_request_timeout=_request_timeout
|
4323
|
+
)
|
4324
|
+
response_data.read()
|
4325
|
+
return self.api_client.response_deserialize(
|
4326
|
+
response_data=response_data,
|
4327
|
+
response_types_map=_response_types_map,
|
4328
|
+
).data
|
4329
|
+
|
4330
|
+
|
4331
|
+
@validate_call
|
4332
|
+
def update_organization_with_http_info(
|
4333
|
+
self,
|
4334
|
+
organization_id: StrictInt,
|
4335
|
+
organization_creation: OrganizationCreation,
|
4336
|
+
_request_timeout: Union[
|
4337
|
+
None,
|
4338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4339
|
+
Tuple[
|
4340
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4341
|
+
Annotated[StrictFloat, Field(gt=0)]
|
4342
|
+
]
|
4343
|
+
] = None,
|
4344
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4345
|
+
_content_type: Optional[StrictStr] = None,
|
4346
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4347
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4348
|
+
) -> ApiResponse[Organization]:
|
4349
|
+
"""Updates an existing organization
|
4350
|
+
|
4351
|
+
Modifies organization's details based on the provided information
|
4352
|
+
|
4353
|
+
:param organization_id: (required)
|
4354
|
+
:type organization_id: int
|
4355
|
+
:param organization_creation: (required)
|
4356
|
+
:type organization_creation: OrganizationCreation
|
4357
|
+
:param _request_timeout: timeout setting for this request. If one
|
4358
|
+
number provided, it will be total request
|
4359
|
+
timeout. It can also be a pair (tuple) of
|
4360
|
+
(connection, read) timeouts.
|
4361
|
+
:type _request_timeout: int, tuple(int, int), optional
|
4362
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4363
|
+
request; this effectively ignores the
|
4364
|
+
authentication in the spec for a single request.
|
4365
|
+
:type _request_auth: dict, optional
|
4366
|
+
:param _content_type: force content-type for the request.
|
4367
|
+
:type _content_type: str, Optional
|
4368
|
+
:param _headers: set to override the headers for a single
|
4369
|
+
request; this effectively ignores the headers
|
4370
|
+
in the spec for a single request.
|
4371
|
+
:type _headers: dict, optional
|
4372
|
+
:param _host_index: set to override the host_index for a single
|
4373
|
+
request; this effectively ignores the host_index
|
4374
|
+
in the spec for a single request.
|
4375
|
+
:type _host_index: int, optional
|
4376
|
+
:return: Returns the result object.
|
4377
|
+
""" # noqa: E501
|
4378
|
+
|
4379
|
+
_param = self._update_organization_serialize(
|
4380
|
+
organization_id=organization_id,
|
4381
|
+
organization_creation=organization_creation,
|
4382
|
+
_request_auth=_request_auth,
|
4383
|
+
_content_type=_content_type,
|
4384
|
+
_headers=_headers,
|
4385
|
+
_host_index=_host_index
|
4386
|
+
)
|
4387
|
+
|
4388
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
4389
|
+
'200': "Organization",
|
4390
|
+
}
|
4391
|
+
response_data = self.api_client.call_api(
|
4392
|
+
*_param,
|
4393
|
+
_request_timeout=_request_timeout
|
4394
|
+
)
|
4395
|
+
response_data.read()
|
4396
|
+
return self.api_client.response_deserialize(
|
4397
|
+
response_data=response_data,
|
4398
|
+
response_types_map=_response_types_map,
|
4399
|
+
)
|
4400
|
+
|
4401
|
+
|
4402
|
+
@validate_call
|
4403
|
+
def update_organization_without_preload_content(
|
4404
|
+
self,
|
4405
|
+
organization_id: StrictInt,
|
4406
|
+
organization_creation: OrganizationCreation,
|
4407
|
+
_request_timeout: Union[
|
4408
|
+
None,
|
4409
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4410
|
+
Tuple[
|
4411
|
+
Annotated[StrictFloat, Field(gt=0)],
|
4412
|
+
Annotated[StrictFloat, Field(gt=0)]
|
4413
|
+
]
|
4414
|
+
] = None,
|
4415
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
4416
|
+
_content_type: Optional[StrictStr] = None,
|
4417
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
4418
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
4419
|
+
) -> RESTResponseType:
|
4420
|
+
"""Updates an existing organization
|
4421
|
+
|
4422
|
+
Modifies organization's details based on the provided information
|
4423
|
+
|
4424
|
+
:param organization_id: (required)
|
4425
|
+
:type organization_id: int
|
4426
|
+
:param organization_creation: (required)
|
4427
|
+
:type organization_creation: OrganizationCreation
|
4428
|
+
:param _request_timeout: timeout setting for this request. If one
|
4429
|
+
number provided, it will be total request
|
4430
|
+
timeout. It can also be a pair (tuple) of
|
4431
|
+
(connection, read) timeouts.
|
4432
|
+
:type _request_timeout: int, tuple(int, int), optional
|
4433
|
+
:param _request_auth: set to override the auth_settings for an a single
|
4434
|
+
request; this effectively ignores the
|
4435
|
+
authentication in the spec for a single request.
|
4436
|
+
:type _request_auth: dict, optional
|
4437
|
+
:param _content_type: force content-type for the request.
|
4438
|
+
:type _content_type: str, Optional
|
4439
|
+
:param _headers: set to override the headers for a single
|
4440
|
+
request; this effectively ignores the headers
|
4441
|
+
in the spec for a single request.
|
4442
|
+
:type _headers: dict, optional
|
4443
|
+
:param _host_index: set to override the host_index for a single
|
4444
|
+
request; this effectively ignores the host_index
|
4445
|
+
in the spec for a single request.
|
4446
|
+
:type _host_index: int, optional
|
4447
|
+
:return: Returns the result object.
|
4448
|
+
""" # noqa: E501
|
4449
|
+
|
4450
|
+
_param = self._update_organization_serialize(
|
4451
|
+
organization_id=organization_id,
|
4452
|
+
organization_creation=organization_creation,
|
4453
|
+
_request_auth=_request_auth,
|
4454
|
+
_content_type=_content_type,
|
4455
|
+
_headers=_headers,
|
4456
|
+
_host_index=_host_index
|
4457
|
+
)
|
4458
|
+
|
4459
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
4460
|
+
'200': "Organization",
|
4461
|
+
}
|
4462
|
+
response_data = self.api_client.call_api(
|
4463
|
+
*_param,
|
4464
|
+
_request_timeout=_request_timeout
|
4465
|
+
)
|
4466
|
+
return response_data.response
|
4467
|
+
|
4468
|
+
|
4469
|
+
def _update_organization_serialize(
|
4470
|
+
self,
|
4471
|
+
organization_id,
|
4472
|
+
organization_creation,
|
4473
|
+
_request_auth,
|
4474
|
+
_content_type,
|
4475
|
+
_headers,
|
4476
|
+
_host_index,
|
4477
|
+
) -> RequestSerialized:
|
4478
|
+
|
4479
|
+
_host = None
|
4480
|
+
|
4481
|
+
_collection_formats: Dict[str, str] = {
|
4482
|
+
}
|
4483
|
+
|
4484
|
+
_path_params: Dict[str, str] = {}
|
4485
|
+
_query_params: List[Tuple[str, str]] = []
|
4486
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
4487
|
+
_form_params: List[Tuple[str, str]] = []
|
4488
|
+
_files: Dict[
|
4489
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
4490
|
+
] = {}
|
4491
|
+
_body_params: Optional[bytes] = None
|
4492
|
+
|
4493
|
+
# process the path parameters
|
4494
|
+
if organization_id is not None:
|
4495
|
+
_path_params['organization_id'] = organization_id
|
4496
|
+
# process the query parameters
|
4497
|
+
# process the header parameters
|
4498
|
+
# process the form parameters
|
4499
|
+
# process the body parameter
|
4500
|
+
if organization_creation is not None:
|
4501
|
+
_body_params = organization_creation
|
4502
|
+
|
4503
|
+
|
4504
|
+
# set the HTTP header `Accept`
|
4505
|
+
if 'Accept' not in _header_params:
|
4506
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
4507
|
+
[
|
4508
|
+
'*/*'
|
4509
|
+
]
|
4510
|
+
)
|
4511
|
+
|
4512
|
+
# set the HTTP header `Content-Type`
|
4513
|
+
if _content_type:
|
4514
|
+
_header_params['Content-Type'] = _content_type
|
4515
|
+
else:
|
4516
|
+
_default_content_type = (
|
4517
|
+
self.api_client.select_header_content_type(
|
4518
|
+
[
|
4519
|
+
'application/json'
|
4520
|
+
]
|
4521
|
+
)
|
4522
|
+
)
|
4523
|
+
if _default_content_type is not None:
|
4524
|
+
_header_params['Content-Type'] = _default_content_type
|
4525
|
+
|
4526
|
+
# authentication setting
|
4527
|
+
_auth_settings: List[str] = [
|
4528
|
+
'QAnswer-Api-Key',
|
4529
|
+
'Bearer'
|
4530
|
+
]
|
4531
|
+
|
4532
|
+
return self.api_client.param_serialize(
|
4533
|
+
method='PUT',
|
4534
|
+
resource_path='/api/organization/{organization_id}',
|
4535
|
+
path_params=_path_params,
|
4536
|
+
query_params=_query_params,
|
4537
|
+
header_params=_header_params,
|
4538
|
+
body=_body_params,
|
4539
|
+
post_params=_form_params,
|
4540
|
+
files=_files,
|
4541
|
+
auth_settings=_auth_settings,
|
4542
|
+
collection_formats=_collection_formats,
|
4543
|
+
_host=_host,
|
4544
|
+
_request_auth=_request_auth
|
4545
|
+
)
|
4546
|
+
|
4547
|
+
|