| 1 | # coding: utf-8 |
| 2 | |
| 3 | """ |
| 4 | Continue Hub IDE API |
| 5 | |
| 6 | API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. |
| 7 | |
| 8 | The version of the OpenAPI document: 1.0.0 |
| 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) |
| 10 | |
| 11 | Do not edit the class manually. |
| 12 | """ # noqa: E501 |
| 13 | |
| 14 | import warnings |
| 15 | from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt |
| 16 | from typing import Any, Dict, List, Optional, Tuple, Union |
| 17 | from typing_extensions import Annotated |
| 18 | |
| 19 | from pydantic import Field, StrictStr, field_validator |
| 20 | from typing import Any, Dict, List, Optional |
| 21 | from typing_extensions import Annotated |
| 22 | from openapi_client.models.get_assistant200_response import GetAssistant200Response |
| 23 | from openapi_client.models.get_free_trial_status200_response import GetFreeTrialStatus200Response |
| 24 | from openapi_client.models.get_models_add_on_checkout_url200_response import GetModelsAddOnCheckoutUrl200Response |
| 25 | from openapi_client.models.get_policy200_response import GetPolicy200Response |
| 26 | from openapi_client.models.list_assistants200_response_inner import ListAssistants200ResponseInner |
| 27 | from openapi_client.models.list_organizations200_response import ListOrganizations200Response |
| 28 | from openapi_client.models.sync_secrets_request import SyncSecretsRequest |
| 29 | |
| 30 | from openapi_client.api_client import ApiClient, RequestSerialized |
| 31 | from openapi_client.api_response import ApiResponse |
| 32 | from openapi_client.rest import RESTResponseType |
| 33 | |
| 34 | |
| 35 | class DefaultApi: |
| 36 | """NOTE: This class is auto generated by OpenAPI Generator |
| 37 | Ref: https://openapi-generator.tech |
| 38 | |
| 39 | Do not edit the class manually. |
| 40 | """ |
| 41 | |
| 42 | def __init__(self, api_client=None) -> None: |
| 43 | if api_client is None: |
| 44 | api_client = ApiClient.get_default() |
| 45 | self.api_client = api_client |
| 46 | |
| 47 | |
| 48 | @validate_call |
| 49 | def get_assistant( |
| 50 | self, |
| 51 | owner_slug: Annotated[StrictStr, Field(description="Slug of the user or organization that owns the assistant")], |
| 52 | package_slug: Annotated[StrictStr, Field(description="Slug of the assistant package")], |
| 53 | always_use_proxy: Annotated[Optional[StrictStr], Field(description="Whether to always use the Continue-managed proxy for model requests")] = None, |
| 54 | organization_id: Annotated[Optional[StrictStr], Field(description="ID of the organization to scope assistants to. If not provided, personal assistants are returned.")] = None, |
| 55 | _request_timeout: Union[ |
| 56 | None, |
| 57 | Annotated[StrictFloat, Field(gt=0)], |
| 58 | Tuple[ |
| 59 | Annotated[StrictFloat, Field(gt=0)], |
| 60 | Annotated[StrictFloat, Field(gt=0)] |
| 61 | ] |
| 62 | ] = None, |
| 63 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 64 | _content_type: Optional[StrictStr] = None, |
| 65 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 66 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 67 | ) -> GetAssistant200Response: |
| 68 | """Get a specific assistant by slug |
| 69 | |
| 70 | Returns a single assistant configuration by its owner and package slug. This endpoint is useful when you need to retrieve or refresh a specific assistant without fetching the entire list. |
| 71 | |
| 72 | :param owner_slug: Slug of the user or organization that owns the assistant (required) |
| 73 | :type owner_slug: str |
| 74 | :param package_slug: Slug of the assistant package (required) |
| 75 | :type package_slug: str |
| 76 | :param always_use_proxy: Whether to always use the Continue-managed proxy for model requests |
| 77 | :type always_use_proxy: str |
| 78 | :param organization_id: ID of the organization to scope assistants to. If not provided, personal assistants are returned. |
| 79 | :type organization_id: str |
| 80 | :param _request_timeout: timeout setting for this request. If one |
| 81 | number provided, it will be total request |
| 82 | timeout. It can also be a pair (tuple) of |
| 83 | (connection, read) timeouts. |
| 84 | :type _request_timeout: int, tuple(int, int), optional |
| 85 | :param _request_auth: set to override the auth_settings for an a single |
| 86 | request; this effectively ignores the |
| 87 | authentication in the spec for a single request. |
| 88 | :type _request_auth: dict, optional |
| 89 | :param _content_type: force content-type for the request. |
| 90 | :type _content_type: str, Optional |
| 91 | :param _headers: set to override the headers for a single |
| 92 | request; this effectively ignores the headers |
| 93 | in the spec for a single request. |
| 94 | :type _headers: dict, optional |
| 95 | :param _host_index: set to override the host_index for a single |
| 96 | request; this effectively ignores the host_index |
| 97 | in the spec for a single request. |
| 98 | :type _host_index: int, optional |
| 99 | :return: Returns the result object. |
| 100 | """ # noqa: E501 |
| 101 | |
| 102 | _param = self._get_assistant_serialize( |
| 103 | owner_slug=owner_slug, |
| 104 | package_slug=package_slug, |
| 105 | always_use_proxy=always_use_proxy, |
| 106 | organization_id=organization_id, |
| 107 | _request_auth=_request_auth, |
| 108 | _content_type=_content_type, |
| 109 | _headers=_headers, |
| 110 | _host_index=_host_index |
| 111 | ) |
| 112 | |
| 113 | _response_types_map: Dict[str, Optional[str]] = { |
| 114 | '200': "GetAssistant200Response", |
| 115 | '401': "ListAssistants401Response", |
| 116 | '403': "GetAssistant403Response", |
| 117 | '404': "GetAssistant404Response", |
| 118 | } |
| 119 | response_data = self.api_client.call_api( |
| 120 | *_param, |
| 121 | _request_timeout=_request_timeout |
| 122 | ) |
| 123 | response_data.read() |
| 124 | return self.api_client.response_deserialize( |
| 125 | response_data=response_data, |
| 126 | response_types_map=_response_types_map, |
| 127 | ).data |
| 128 | |
| 129 | |
| 130 | @validate_call |
| 131 | def get_assistant_with_http_info( |
| 132 | self, |
| 133 | owner_slug: Annotated[StrictStr, Field(description="Slug of the user or organization that owns the assistant")], |
| 134 | package_slug: Annotated[StrictStr, Field(description="Slug of the assistant package")], |
| 135 | always_use_proxy: Annotated[Optional[StrictStr], Field(description="Whether to always use the Continue-managed proxy for model requests")] = None, |
| 136 | organization_id: Annotated[Optional[StrictStr], Field(description="ID of the organization to scope assistants to. If not provided, personal assistants are returned.")] = None, |
| 137 | _request_timeout: Union[ |
| 138 | None, |
| 139 | Annotated[StrictFloat, Field(gt=0)], |
| 140 | Tuple[ |
| 141 | Annotated[StrictFloat, Field(gt=0)], |
| 142 | Annotated[StrictFloat, Field(gt=0)] |
| 143 | ] |
| 144 | ] = None, |
| 145 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 146 | _content_type: Optional[StrictStr] = None, |
| 147 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 148 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 149 | ) -> ApiResponse[GetAssistant200Response]: |
| 150 | """Get a specific assistant by slug |
| 151 | |
| 152 | Returns a single assistant configuration by its owner and package slug. This endpoint is useful when you need to retrieve or refresh a specific assistant without fetching the entire list. |
| 153 | |
| 154 | :param owner_slug: Slug of the user or organization that owns the assistant (required) |
| 155 | :type owner_slug: str |
| 156 | :param package_slug: Slug of the assistant package (required) |
| 157 | :type package_slug: str |
| 158 | :param always_use_proxy: Whether to always use the Continue-managed proxy for model requests |
| 159 | :type always_use_proxy: str |
| 160 | :param organization_id: ID of the organization to scope assistants to. If not provided, personal assistants are returned. |
| 161 | :type organization_id: str |
| 162 | :param _request_timeout: timeout setting for this request. If one |
| 163 | number provided, it will be total request |
| 164 | timeout. It can also be a pair (tuple) of |
| 165 | (connection, read) timeouts. |
| 166 | :type _request_timeout: int, tuple(int, int), optional |
| 167 | :param _request_auth: set to override the auth_settings for an a single |
| 168 | request; this effectively ignores the |
| 169 | authentication in the spec for a single request. |
| 170 | :type _request_auth: dict, optional |
| 171 | :param _content_type: force content-type for the request. |
| 172 | :type _content_type: str, Optional |
| 173 | :param _headers: set to override the headers for a single |
| 174 | request; this effectively ignores the headers |
| 175 | in the spec for a single request. |
| 176 | :type _headers: dict, optional |
| 177 | :param _host_index: set to override the host_index for a single |
| 178 | request; this effectively ignores the host_index |
| 179 | in the spec for a single request. |
| 180 | :type _host_index: int, optional |
| 181 | :return: Returns the result object. |
| 182 | """ # noqa: E501 |
| 183 | |
| 184 | _param = self._get_assistant_serialize( |
| 185 | owner_slug=owner_slug, |
| 186 | package_slug=package_slug, |
| 187 | always_use_proxy=always_use_proxy, |
| 188 | organization_id=organization_id, |
| 189 | _request_auth=_request_auth, |
| 190 | _content_type=_content_type, |
| 191 | _headers=_headers, |
| 192 | _host_index=_host_index |
| 193 | ) |
| 194 | |
| 195 | _response_types_map: Dict[str, Optional[str]] = { |
| 196 | '200': "GetAssistant200Response", |
| 197 | '401': "ListAssistants401Response", |
| 198 | '403': "GetAssistant403Response", |
| 199 | '404': "GetAssistant404Response", |
| 200 | } |
| 201 | response_data = self.api_client.call_api( |
| 202 | *_param, |
| 203 | _request_timeout=_request_timeout |
| 204 | ) |
| 205 | response_data.read() |
| 206 | return self.api_client.response_deserialize( |
| 207 | response_data=response_data, |
| 208 | response_types_map=_response_types_map, |
| 209 | ) |
| 210 | |
| 211 | |
| 212 | @validate_call |
| 213 | def get_assistant_without_preload_content( |
| 214 | self, |
| 215 | owner_slug: Annotated[StrictStr, Field(description="Slug of the user or organization that owns the assistant")], |
| 216 | package_slug: Annotated[StrictStr, Field(description="Slug of the assistant package")], |
| 217 | always_use_proxy: Annotated[Optional[StrictStr], Field(description="Whether to always use the Continue-managed proxy for model requests")] = None, |
| 218 | organization_id: Annotated[Optional[StrictStr], Field(description="ID of the organization to scope assistants to. If not provided, personal assistants are returned.")] = None, |
| 219 | _request_timeout: Union[ |
| 220 | None, |
| 221 | Annotated[StrictFloat, Field(gt=0)], |
| 222 | Tuple[ |
| 223 | Annotated[StrictFloat, Field(gt=0)], |
| 224 | Annotated[StrictFloat, Field(gt=0)] |
| 225 | ] |
| 226 | ] = None, |
| 227 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 228 | _content_type: Optional[StrictStr] = None, |
| 229 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 230 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 231 | ) -> RESTResponseType: |
| 232 | """Get a specific assistant by slug |
| 233 | |
| 234 | Returns a single assistant configuration by its owner and package slug. This endpoint is useful when you need to retrieve or refresh a specific assistant without fetching the entire list. |
| 235 | |
| 236 | :param owner_slug: Slug of the user or organization that owns the assistant (required) |
| 237 | :type owner_slug: str |
| 238 | :param package_slug: Slug of the assistant package (required) |
| 239 | :type package_slug: str |
| 240 | :param always_use_proxy: Whether to always use the Continue-managed proxy for model requests |
| 241 | :type always_use_proxy: str |
| 242 | :param organization_id: ID of the organization to scope assistants to. If not provided, personal assistants are returned. |
| 243 | :type organization_id: str |
| 244 | :param _request_timeout: timeout setting for this request. If one |
| 245 | number provided, it will be total request |
| 246 | timeout. It can also be a pair (tuple) of |
| 247 | (connection, read) timeouts. |
| 248 | :type _request_timeout: int, tuple(int, int), optional |
| 249 | :param _request_auth: set to override the auth_settings for an a single |
| 250 | request; this effectively ignores the |
| 251 | authentication in the spec for a single request. |
| 252 | :type _request_auth: dict, optional |
| 253 | :param _content_type: force content-type for the request. |
| 254 | :type _content_type: str, Optional |
| 255 | :param _headers: set to override the headers for a single |
| 256 | request; this effectively ignores the headers |
| 257 | in the spec for a single request. |
| 258 | :type _headers: dict, optional |
| 259 | :param _host_index: set to override the host_index for a single |
| 260 | request; this effectively ignores the host_index |
| 261 | in the spec for a single request. |
| 262 | :type _host_index: int, optional |
| 263 | :return: Returns the result object. |
| 264 | """ # noqa: E501 |
| 265 | |
| 266 | _param = self._get_assistant_serialize( |
| 267 | owner_slug=owner_slug, |
| 268 | package_slug=package_slug, |
| 269 | always_use_proxy=always_use_proxy, |
| 270 | organization_id=organization_id, |
| 271 | _request_auth=_request_auth, |
| 272 | _content_type=_content_type, |
| 273 | _headers=_headers, |
| 274 | _host_index=_host_index |
| 275 | ) |
| 276 | |
| 277 | _response_types_map: Dict[str, Optional[str]] = { |
| 278 | '200': "GetAssistant200Response", |
| 279 | '401': "ListAssistants401Response", |
| 280 | '403': "GetAssistant403Response", |
| 281 | '404': "GetAssistant404Response", |
| 282 | } |
| 283 | response_data = self.api_client.call_api( |
| 284 | *_param, |
| 285 | _request_timeout=_request_timeout |
| 286 | ) |
| 287 | return response_data.response |
| 288 | |
| 289 | |
| 290 | def _get_assistant_serialize( |
| 291 | self, |
| 292 | owner_slug, |
| 293 | package_slug, |
| 294 | always_use_proxy, |
| 295 | organization_id, |
| 296 | _request_auth, |
| 297 | _content_type, |
| 298 | _headers, |
| 299 | _host_index, |
| 300 | ) -> RequestSerialized: |
| 301 | |
| 302 | _host = None |
| 303 | |
| 304 | _collection_formats: Dict[str, str] = { |
| 305 | } |
| 306 | |
| 307 | _path_params: Dict[str, str] = {} |
| 308 | _query_params: List[Tuple[str, str]] = [] |
| 309 | _header_params: Dict[str, Optional[str]] = _headers or {} |
| 310 | _form_params: List[Tuple[str, str]] = [] |
| 311 | _files: Dict[ |
| 312 | str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] |
| 313 | ] = {} |
| 314 | _body_params: Optional[bytes] = None |
| 315 | |
| 316 | # process the path parameters |
| 317 | if owner_slug is not None: |
| 318 | _path_params['ownerSlug'] = owner_slug |
| 319 | if package_slug is not None: |
| 320 | _path_params['packageSlug'] = package_slug |
| 321 | # process the query parameters |
| 322 | if always_use_proxy is not None: |
| 323 | |
| 324 | _query_params.append(('alwaysUseProxy', always_use_proxy)) |
| 325 | |
| 326 | if organization_id is not None: |
| 327 | |
| 328 | _query_params.append(('organizationId', organization_id)) |
| 329 | |
| 330 | # process the header parameters |
| 331 | # process the form parameters |
| 332 | # process the body parameter |
| 333 | |
| 334 | |
| 335 | # set the HTTP header `Accept` |
| 336 | if 'Accept' not in _header_params: |
| 337 | _header_params['Accept'] = self.api_client.select_header_accept( |
| 338 | [ |
| 339 | 'application/json' |
| 340 | ] |
| 341 | ) |
| 342 | |
| 343 | |
| 344 | # authentication setting |
| 345 | _auth_settings: List[str] = [ |
| 346 | 'apiKeyAuth' |
| 347 | ] |
| 348 | |
| 349 | return self.api_client.param_serialize( |
| 350 | method='GET', |
| 351 | resource_path='/ide/get-assistant/{ownerSlug}/{packageSlug}', |
| 352 | path_params=_path_params, |
| 353 | query_params=_query_params, |
| 354 | header_params=_header_params, |
| 355 | body=_body_params, |
| 356 | post_params=_form_params, |
| 357 | files=_files, |
| 358 | auth_settings=_auth_settings, |
| 359 | collection_formats=_collection_formats, |
| 360 | _host=_host, |
| 361 | _request_auth=_request_auth |
| 362 | ) |
| 363 | |
| 364 | |
| 365 | |
| 366 | |
| 367 | @validate_call |
| 368 | def get_free_trial_status( |
| 369 | self, |
| 370 | _request_timeout: Union[ |
| 371 | None, |
| 372 | Annotated[StrictFloat, Field(gt=0)], |
| 373 | Tuple[ |
| 374 | Annotated[StrictFloat, Field(gt=0)], |
| 375 | Annotated[StrictFloat, Field(gt=0)] |
| 376 | ] |
| 377 | ] = None, |
| 378 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 379 | _content_type: Optional[StrictStr] = None, |
| 380 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 381 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 382 | ) -> GetFreeTrialStatus200Response: |
| 383 | """Get free trial status for user |
| 384 | |
| 385 | Returns the current free trial status for the authenticated user, including usage counts and limits for chat and autocomplete features. |
| 386 | |
| 387 | :param _request_timeout: timeout setting for this request. If one |
| 388 | number provided, it will be total request |
| 389 | timeout. It can also be a pair (tuple) of |
| 390 | (connection, read) timeouts. |
| 391 | :type _request_timeout: int, tuple(int, int), optional |
| 392 | :param _request_auth: set to override the auth_settings for an a single |
| 393 | request; this effectively ignores the |
| 394 | authentication in the spec for a single request. |
| 395 | :type _request_auth: dict, optional |
| 396 | :param _content_type: force content-type for the request. |
| 397 | :type _content_type: str, Optional |
| 398 | :param _headers: set to override the headers for a single |
| 399 | request; this effectively ignores the headers |
| 400 | in the spec for a single request. |
| 401 | :type _headers: dict, optional |
| 402 | :param _host_index: set to override the host_index for a single |
| 403 | request; this effectively ignores the host_index |
| 404 | in the spec for a single request. |
| 405 | :type _host_index: int, optional |
| 406 | :return: Returns the result object. |
| 407 | """ # noqa: E501 |
| 408 | |
| 409 | _param = self._get_free_trial_status_serialize( |
| 410 | _request_auth=_request_auth, |
| 411 | _content_type=_content_type, |
| 412 | _headers=_headers, |
| 413 | _host_index=_host_index |
| 414 | ) |
| 415 | |
| 416 | _response_types_map: Dict[str, Optional[str]] = { |
| 417 | '200': "GetFreeTrialStatus200Response", |
| 418 | '404': "ListAssistants404Response", |
| 419 | } |
| 420 | response_data = self.api_client.call_api( |
| 421 | *_param, |
| 422 | _request_timeout=_request_timeout |
| 423 | ) |
| 424 | response_data.read() |
| 425 | return self.api_client.response_deserialize( |
| 426 | response_data=response_data, |
| 427 | response_types_map=_response_types_map, |
| 428 | ).data |
| 429 | |
| 430 | |
| 431 | @validate_call |
| 432 | def get_free_trial_status_with_http_info( |
| 433 | self, |
| 434 | _request_timeout: Union[ |
| 435 | None, |
| 436 | Annotated[StrictFloat, Field(gt=0)], |
| 437 | Tuple[ |
| 438 | Annotated[StrictFloat, Field(gt=0)], |
| 439 | Annotated[StrictFloat, Field(gt=0)] |
| 440 | ] |
| 441 | ] = None, |
| 442 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 443 | _content_type: Optional[StrictStr] = None, |
| 444 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 445 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 446 | ) -> ApiResponse[GetFreeTrialStatus200Response]: |
| 447 | """Get free trial status for user |
| 448 | |
| 449 | Returns the current free trial status for the authenticated user, including usage counts and limits for chat and autocomplete features. |
| 450 | |
| 451 | :param _request_timeout: timeout setting for this request. If one |
| 452 | number provided, it will be total request |
| 453 | timeout. It can also be a pair (tuple) of |
| 454 | (connection, read) timeouts. |
| 455 | :type _request_timeout: int, tuple(int, int), optional |
| 456 | :param _request_auth: set to override the auth_settings for an a single |
| 457 | request; this effectively ignores the |
| 458 | authentication in the spec for a single request. |
| 459 | :type _request_auth: dict, optional |
| 460 | :param _content_type: force content-type for the request. |
| 461 | :type _content_type: str, Optional |
| 462 | :param _headers: set to override the headers for a single |
| 463 | request; this effectively ignores the headers |
| 464 | in the spec for a single request. |
| 465 | :type _headers: dict, optional |
| 466 | :param _host_index: set to override the host_index for a single |
| 467 | request; this effectively ignores the host_index |
| 468 | in the spec for a single request. |
| 469 | :type _host_index: int, optional |
| 470 | :return: Returns the result object. |
| 471 | """ # noqa: E501 |
| 472 | |
| 473 | _param = self._get_free_trial_status_serialize( |
| 474 | _request_auth=_request_auth, |
| 475 | _content_type=_content_type, |
| 476 | _headers=_headers, |
| 477 | _host_index=_host_index |
| 478 | ) |
| 479 | |
| 480 | _response_types_map: Dict[str, Optional[str]] = { |
| 481 | '200': "GetFreeTrialStatus200Response", |
| 482 | '404': "ListAssistants404Response", |
| 483 | } |
| 484 | response_data = self.api_client.call_api( |
| 485 | *_param, |
| 486 | _request_timeout=_request_timeout |
| 487 | ) |
| 488 | response_data.read() |
| 489 | return self.api_client.response_deserialize( |
| 490 | response_data=response_data, |
| 491 | response_types_map=_response_types_map, |
| 492 | ) |
| 493 | |
| 494 | |
| 495 | @validate_call |
| 496 | def get_free_trial_status_without_preload_content( |
| 497 | self, |
| 498 | _request_timeout: Union[ |
| 499 | None, |
| 500 | Annotated[StrictFloat, Field(gt=0)], |
| 501 | Tuple[ |
| 502 | Annotated[StrictFloat, Field(gt=0)], |
| 503 | Annotated[StrictFloat, Field(gt=0)] |
| 504 | ] |
| 505 | ] = None, |
| 506 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 507 | _content_type: Optional[StrictStr] = None, |
| 508 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 509 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 510 | ) -> RESTResponseType: |
| 511 | """Get free trial status for user |
| 512 | |
| 513 | Returns the current free trial status for the authenticated user, including usage counts and limits for chat and autocomplete features. |
| 514 | |
| 515 | :param _request_timeout: timeout setting for this request. If one |
| 516 | number provided, it will be total request |
| 517 | timeout. It can also be a pair (tuple) of |
| 518 | (connection, read) timeouts. |
| 519 | :type _request_timeout: int, tuple(int, int), optional |
| 520 | :param _request_auth: set to override the auth_settings for an a single |
| 521 | request; this effectively ignores the |
| 522 | authentication in the spec for a single request. |
| 523 | :type _request_auth: dict, optional |
| 524 | :param _content_type: force content-type for the request. |
| 525 | :type _content_type: str, Optional |
| 526 | :param _headers: set to override the headers for a single |
| 527 | request; this effectively ignores the headers |
| 528 | in the spec for a single request. |
| 529 | :type _headers: dict, optional |
| 530 | :param _host_index: set to override the host_index for a single |
| 531 | request; this effectively ignores the host_index |
| 532 | in the spec for a single request. |
| 533 | :type _host_index: int, optional |
| 534 | :return: Returns the result object. |
| 535 | """ # noqa: E501 |
| 536 | |
| 537 | _param = self._get_free_trial_status_serialize( |
| 538 | _request_auth=_request_auth, |
| 539 | _content_type=_content_type, |
| 540 | _headers=_headers, |
| 541 | _host_index=_host_index |
| 542 | ) |
| 543 | |
| 544 | _response_types_map: Dict[str, Optional[str]] = { |
| 545 | '200': "GetFreeTrialStatus200Response", |
| 546 | '404': "ListAssistants404Response", |
| 547 | } |
| 548 | response_data = self.api_client.call_api( |
| 549 | *_param, |
| 550 | _request_timeout=_request_timeout |
| 551 | ) |
| 552 | return response_data.response |
| 553 | |
| 554 | |
| 555 | def _get_free_trial_status_serialize( |
| 556 | self, |
| 557 | _request_auth, |
| 558 | _content_type, |
| 559 | _headers, |
| 560 | _host_index, |
| 561 | ) -> RequestSerialized: |
| 562 | |
| 563 | _host = None |
| 564 | |
| 565 | _collection_formats: Dict[str, str] = { |
| 566 | } |
| 567 | |
| 568 | _path_params: Dict[str, str] = {} |
| 569 | _query_params: List[Tuple[str, str]] = [] |
| 570 | _header_params: Dict[str, Optional[str]] = _headers or {} |
| 571 | _form_params: List[Tuple[str, str]] = [] |
| 572 | _files: Dict[ |
| 573 | str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] |
| 574 | ] = {} |
| 575 | _body_params: Optional[bytes] = None |
| 576 | |
| 577 | # process the path parameters |
| 578 | # process the query parameters |
| 579 | # process the header parameters |
| 580 | # process the form parameters |
| 581 | # process the body parameter |
| 582 | |
| 583 | |
| 584 | # set the HTTP header `Accept` |
| 585 | if 'Accept' not in _header_params: |
| 586 | _header_params['Accept'] = self.api_client.select_header_accept( |
| 587 | [ |
| 588 | 'application/json' |
| 589 | ] |
| 590 | ) |
| 591 | |
| 592 | |
| 593 | # authentication setting |
| 594 | _auth_settings: List[str] = [ |
| 595 | 'apiKeyAuth' |
| 596 | ] |
| 597 | |
| 598 | return self.api_client.param_serialize( |
| 599 | method='GET', |
| 600 | resource_path='/ide/free-trial-status', |
| 601 | path_params=_path_params, |
| 602 | query_params=_query_params, |
| 603 | header_params=_header_params, |
| 604 | body=_body_params, |
| 605 | post_params=_form_params, |
| 606 | files=_files, |
| 607 | auth_settings=_auth_settings, |
| 608 | collection_formats=_collection_formats, |
| 609 | _host=_host, |
| 610 | _request_auth=_request_auth |
| 611 | ) |
| 612 | |
| 613 | |
| 614 | |
| 615 | |
| 616 | @validate_call |
| 617 | def get_models_add_on_checkout_url( |
| 618 | self, |
| 619 | profile_id: Annotated[Optional[StrictStr], Field(description="Profile ID to include in the callback URL")] = None, |
| 620 | vscode_uri_scheme: Annotated[Optional[StrictStr], Field(description="VS Code URI scheme to include in the callback URL")] = None, |
| 621 | _request_timeout: Union[ |
| 622 | None, |
| 623 | Annotated[StrictFloat, Field(gt=0)], |
| 624 | Tuple[ |
| 625 | Annotated[StrictFloat, Field(gt=0)], |
| 626 | Annotated[StrictFloat, Field(gt=0)] |
| 627 | ] |
| 628 | ] = None, |
| 629 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 630 | _content_type: Optional[StrictStr] = None, |
| 631 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 632 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 633 | ) -> GetModelsAddOnCheckoutUrl200Response: |
| 634 | """Get Stripe checkout URL for models add-on |
| 635 | |
| 636 | Creates a Stripe checkout session for the models add-on subscription and returns the checkout URL. |
| 637 | |
| 638 | :param profile_id: Profile ID to include in the callback URL |
| 639 | :type profile_id: str |
| 640 | :param vscode_uri_scheme: VS Code URI scheme to include in the callback URL |
| 641 | :type vscode_uri_scheme: str |
| 642 | :param _request_timeout: timeout setting for this request. If one |
| 643 | number provided, it will be total request |
| 644 | timeout. It can also be a pair (tuple) of |
| 645 | (connection, read) timeouts. |
| 646 | :type _request_timeout: int, tuple(int, int), optional |
| 647 | :param _request_auth: set to override the auth_settings for an a single |
| 648 | request; this effectively ignores the |
| 649 | authentication in the spec for a single request. |
| 650 | :type _request_auth: dict, optional |
| 651 | :param _content_type: force content-type for the request. |
| 652 | :type _content_type: str, Optional |
| 653 | :param _headers: set to override the headers for a single |
| 654 | request; this effectively ignores the headers |
| 655 | in the spec for a single request. |
| 656 | :type _headers: dict, optional |
| 657 | :param _host_index: set to override the host_index for a single |
| 658 | request; this effectively ignores the host_index |
| 659 | in the spec for a single request. |
| 660 | :type _host_index: int, optional |
| 661 | :return: Returns the result object. |
| 662 | """ # noqa: E501 |
| 663 | |
| 664 | _param = self._get_models_add_on_checkout_url_serialize( |
| 665 | profile_id=profile_id, |
| 666 | vscode_uri_scheme=vscode_uri_scheme, |
| 667 | _request_auth=_request_auth, |
| 668 | _content_type=_content_type, |
| 669 | _headers=_headers, |
| 670 | _host_index=_host_index |
| 671 | ) |
| 672 | |
| 673 | _response_types_map: Dict[str, Optional[str]] = { |
| 674 | '200': "GetModelsAddOnCheckoutUrl200Response", |
| 675 | '404': "ListAssistants404Response", |
| 676 | '500': "GetModelsAddOnCheckoutUrl500Response", |
| 677 | } |
| 678 | response_data = self.api_client.call_api( |
| 679 | *_param, |
| 680 | _request_timeout=_request_timeout |
| 681 | ) |
| 682 | response_data.read() |
| 683 | return self.api_client.response_deserialize( |
| 684 | response_data=response_data, |
| 685 | response_types_map=_response_types_map, |
| 686 | ).data |
| 687 | |
| 688 | |
| 689 | @validate_call |
| 690 | def get_models_add_on_checkout_url_with_http_info( |
| 691 | self, |
| 692 | profile_id: Annotated[Optional[StrictStr], Field(description="Profile ID to include in the callback URL")] = None, |
| 693 | vscode_uri_scheme: Annotated[Optional[StrictStr], Field(description="VS Code URI scheme to include in the callback URL")] = None, |
| 694 | _request_timeout: Union[ |
| 695 | None, |
| 696 | Annotated[StrictFloat, Field(gt=0)], |
| 697 | Tuple[ |
| 698 | Annotated[StrictFloat, Field(gt=0)], |
| 699 | Annotated[StrictFloat, Field(gt=0)] |
| 700 | ] |
| 701 | ] = None, |
| 702 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 703 | _content_type: Optional[StrictStr] = None, |
| 704 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 705 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 706 | ) -> ApiResponse[GetModelsAddOnCheckoutUrl200Response]: |
| 707 | """Get Stripe checkout URL for models add-on |
| 708 | |
| 709 | Creates a Stripe checkout session for the models add-on subscription and returns the checkout URL. |
| 710 | |
| 711 | :param profile_id: Profile ID to include in the callback URL |
| 712 | :type profile_id: str |
| 713 | :param vscode_uri_scheme: VS Code URI scheme to include in the callback URL |
| 714 | :type vscode_uri_scheme: str |
| 715 | :param _request_timeout: timeout setting for this request. If one |
| 716 | number provided, it will be total request |
| 717 | timeout. It can also be a pair (tuple) of |
| 718 | (connection, read) timeouts. |
| 719 | :type _request_timeout: int, tuple(int, int), optional |
| 720 | :param _request_auth: set to override the auth_settings for an a single |
| 721 | request; this effectively ignores the |
| 722 | authentication in the spec for a single request. |
| 723 | :type _request_auth: dict, optional |
| 724 | :param _content_type: force content-type for the request. |
| 725 | :type _content_type: str, Optional |
| 726 | :param _headers: set to override the headers for a single |
| 727 | request; this effectively ignores the headers |
| 728 | in the spec for a single request. |
| 729 | :type _headers: dict, optional |
| 730 | :param _host_index: set to override the host_index for a single |
| 731 | request; this effectively ignores the host_index |
| 732 | in the spec for a single request. |
| 733 | :type _host_index: int, optional |
| 734 | :return: Returns the result object. |
| 735 | """ # noqa: E501 |
| 736 | |
| 737 | _param = self._get_models_add_on_checkout_url_serialize( |
| 738 | profile_id=profile_id, |
| 739 | vscode_uri_scheme=vscode_uri_scheme, |
| 740 | _request_auth=_request_auth, |
| 741 | _content_type=_content_type, |
| 742 | _headers=_headers, |
| 743 | _host_index=_host_index |
| 744 | ) |
| 745 | |
| 746 | _response_types_map: Dict[str, Optional[str]] = { |
| 747 | '200': "GetModelsAddOnCheckoutUrl200Response", |
| 748 | '404': "ListAssistants404Response", |
| 749 | '500': "GetModelsAddOnCheckoutUrl500Response", |
| 750 | } |
| 751 | response_data = self.api_client.call_api( |
| 752 | *_param, |
| 753 | _request_timeout=_request_timeout |
| 754 | ) |
| 755 | response_data.read() |
| 756 | return self.api_client.response_deserialize( |
| 757 | response_data=response_data, |
| 758 | response_types_map=_response_types_map, |
| 759 | ) |
| 760 | |
| 761 | |
| 762 | @validate_call |
| 763 | def get_models_add_on_checkout_url_without_preload_content( |
| 764 | self, |
| 765 | profile_id: Annotated[Optional[StrictStr], Field(description="Profile ID to include in the callback URL")] = None, |
| 766 | vscode_uri_scheme: Annotated[Optional[StrictStr], Field(description="VS Code URI scheme to include in the callback URL")] = None, |
| 767 | _request_timeout: Union[ |
| 768 | None, |
| 769 | Annotated[StrictFloat, Field(gt=0)], |
| 770 | Tuple[ |
| 771 | Annotated[StrictFloat, Field(gt=0)], |
| 772 | Annotated[StrictFloat, Field(gt=0)] |
| 773 | ] |
| 774 | ] = None, |
| 775 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 776 | _content_type: Optional[StrictStr] = None, |
| 777 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 778 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 779 | ) -> RESTResponseType: |
| 780 | """Get Stripe checkout URL for models add-on |
| 781 | |
| 782 | Creates a Stripe checkout session for the models add-on subscription and returns the checkout URL. |
| 783 | |
| 784 | :param profile_id: Profile ID to include in the callback URL |
| 785 | :type profile_id: str |
| 786 | :param vscode_uri_scheme: VS Code URI scheme to include in the callback URL |
| 787 | :type vscode_uri_scheme: str |
| 788 | :param _request_timeout: timeout setting for this request. If one |
| 789 | number provided, it will be total request |
| 790 | timeout. It can also be a pair (tuple) of |
| 791 | (connection, read) timeouts. |
| 792 | :type _request_timeout: int, tuple(int, int), optional |
| 793 | :param _request_auth: set to override the auth_settings for an a single |
| 794 | request; this effectively ignores the |
| 795 | authentication in the spec for a single request. |
| 796 | :type _request_auth: dict, optional |
| 797 | :param _content_type: force content-type for the request. |
| 798 | :type _content_type: str, Optional |
| 799 | :param _headers: set to override the headers for a single |
| 800 | request; this effectively ignores the headers |
| 801 | in the spec for a single request. |
| 802 | :type _headers: dict, optional |
| 803 | :param _host_index: set to override the host_index for a single |
| 804 | request; this effectively ignores the host_index |
| 805 | in the spec for a single request. |
| 806 | :type _host_index: int, optional |
| 807 | :return: Returns the result object. |
| 808 | """ # noqa: E501 |
| 809 | |
| 810 | _param = self._get_models_add_on_checkout_url_serialize( |
| 811 | profile_id=profile_id, |
| 812 | vscode_uri_scheme=vscode_uri_scheme, |
| 813 | _request_auth=_request_auth, |
| 814 | _content_type=_content_type, |
| 815 | _headers=_headers, |
| 816 | _host_index=_host_index |
| 817 | ) |
| 818 | |
| 819 | _response_types_map: Dict[str, Optional[str]] = { |
| 820 | '200': "GetModelsAddOnCheckoutUrl200Response", |
| 821 | '404': "ListAssistants404Response", |
| 822 | '500': "GetModelsAddOnCheckoutUrl500Response", |
| 823 | } |
| 824 | response_data = self.api_client.call_api( |
| 825 | *_param, |
| 826 | _request_timeout=_request_timeout |
| 827 | ) |
| 828 | return response_data.response |
| 829 | |
| 830 | |
| 831 | def _get_models_add_on_checkout_url_serialize( |
| 832 | self, |
| 833 | profile_id, |
| 834 | vscode_uri_scheme, |
| 835 | _request_auth, |
| 836 | _content_type, |
| 837 | _headers, |
| 838 | _host_index, |
| 839 | ) -> RequestSerialized: |
| 840 | |
| 841 | _host = None |
| 842 | |
| 843 | _collection_formats: Dict[str, str] = { |
| 844 | } |
| 845 | |
| 846 | _path_params: Dict[str, str] = {} |
| 847 | _query_params: List[Tuple[str, str]] = [] |
| 848 | _header_params: Dict[str, Optional[str]] = _headers or {} |
| 849 | _form_params: List[Tuple[str, str]] = [] |
| 850 | _files: Dict[ |
| 851 | str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] |
| 852 | ] = {} |
| 853 | _body_params: Optional[bytes] = None |
| 854 | |
| 855 | # process the path parameters |
| 856 | # process the query parameters |
| 857 | if profile_id is not None: |
| 858 | |
| 859 | _query_params.append(('profile_id', profile_id)) |
| 860 | |
| 861 | if vscode_uri_scheme is not None: |
| 862 | |
| 863 | _query_params.append(('vscode_uri_scheme', vscode_uri_scheme)) |
| 864 | |
| 865 | # process the header parameters |
| 866 | # process the form parameters |
| 867 | # process the body parameter |
| 868 | |
| 869 | |
| 870 | # set the HTTP header `Accept` |
| 871 | if 'Accept' not in _header_params: |
| 872 | _header_params['Accept'] = self.api_client.select_header_accept( |
| 873 | [ |
| 874 | 'application/json' |
| 875 | ] |
| 876 | ) |
| 877 | |
| 878 | |
| 879 | # authentication setting |
| 880 | _auth_settings: List[str] = [ |
| 881 | 'apiKeyAuth' |
| 882 | ] |
| 883 | |
| 884 | return self.api_client.param_serialize( |
| 885 | method='GET', |
| 886 | resource_path='/ide/get-models-add-on-checkout-url', |
| 887 | path_params=_path_params, |
| 888 | query_params=_query_params, |
| 889 | header_params=_header_params, |
| 890 | body=_body_params, |
| 891 | post_params=_form_params, |
| 892 | files=_files, |
| 893 | auth_settings=_auth_settings, |
| 894 | collection_formats=_collection_formats, |
| 895 | _host=_host, |
| 896 | _request_auth=_request_auth |
| 897 | ) |
| 898 | |
| 899 | |
| 900 | |
| 901 | |
| 902 | @validate_call |
| 903 | def get_policy( |
| 904 | self, |
| 905 | _request_timeout: Union[ |
| 906 | None, |
| 907 | Annotated[StrictFloat, Field(gt=0)], |
| 908 | Tuple[ |
| 909 | Annotated[StrictFloat, Field(gt=0)], |
| 910 | Annotated[StrictFloat, Field(gt=0)] |
| 911 | ] |
| 912 | ] = None, |
| 913 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 914 | _content_type: Optional[StrictStr] = None, |
| 915 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 916 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 917 | ) -> GetPolicy200Response: |
| 918 | """Get organization policy |
| 919 | |
| 920 | Returns the policy configuration for the first organization that the user belongs to which has a policy configured. |
| 921 | |
| 922 | :param _request_timeout: timeout setting for this request. If one |
| 923 | number provided, it will be total request |
| 924 | timeout. It can also be a pair (tuple) of |
| 925 | (connection, read) timeouts. |
| 926 | :type _request_timeout: int, tuple(int, int), optional |
| 927 | :param _request_auth: set to override the auth_settings for an a single |
| 928 | request; this effectively ignores the |
| 929 | authentication in the spec for a single request. |
| 930 | :type _request_auth: dict, optional |
| 931 | :param _content_type: force content-type for the request. |
| 932 | :type _content_type: str, Optional |
| 933 | :param _headers: set to override the headers for a single |
| 934 | request; this effectively ignores the headers |
| 935 | in the spec for a single request. |
| 936 | :type _headers: dict, optional |
| 937 | :param _host_index: set to override the host_index for a single |
| 938 | request; this effectively ignores the host_index |
| 939 | in the spec for a single request. |
| 940 | :type _host_index: int, optional |
| 941 | :return: Returns the result object. |
| 942 | """ # noqa: E501 |
| 943 | |
| 944 | _param = self._get_policy_serialize( |
| 945 | _request_auth=_request_auth, |
| 946 | _content_type=_content_type, |
| 947 | _headers=_headers, |
| 948 | _host_index=_host_index |
| 949 | ) |
| 950 | |
| 951 | _response_types_map: Dict[str, Optional[str]] = { |
| 952 | '200': "GetPolicy200Response", |
| 953 | '404': "ListAssistants404Response", |
| 954 | } |
| 955 | response_data = self.api_client.call_api( |
| 956 | *_param, |
| 957 | _request_timeout=_request_timeout |
| 958 | ) |
| 959 | response_data.read() |
| 960 | return self.api_client.response_deserialize( |
| 961 | response_data=response_data, |
| 962 | response_types_map=_response_types_map, |
| 963 | ).data |
| 964 | |
| 965 | |
| 966 | @validate_call |
| 967 | def get_policy_with_http_info( |
| 968 | self, |
| 969 | _request_timeout: Union[ |
| 970 | None, |
| 971 | Annotated[StrictFloat, Field(gt=0)], |
| 972 | Tuple[ |
| 973 | Annotated[StrictFloat, Field(gt=0)], |
| 974 | Annotated[StrictFloat, Field(gt=0)] |
| 975 | ] |
| 976 | ] = None, |
| 977 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 978 | _content_type: Optional[StrictStr] = None, |
| 979 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 980 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 981 | ) -> ApiResponse[GetPolicy200Response]: |
| 982 | """Get organization policy |
| 983 | |
| 984 | Returns the policy configuration for the first organization that the user belongs to which has a policy configured. |
| 985 | |
| 986 | :param _request_timeout: timeout setting for this request. If one |
| 987 | number provided, it will be total request |
| 988 | timeout. It can also be a pair (tuple) of |
| 989 | (connection, read) timeouts. |
| 990 | :type _request_timeout: int, tuple(int, int), optional |
| 991 | :param _request_auth: set to override the auth_settings for an a single |
| 992 | request; this effectively ignores the |
| 993 | authentication in the spec for a single request. |
| 994 | :type _request_auth: dict, optional |
| 995 | :param _content_type: force content-type for the request. |
| 996 | :type _content_type: str, Optional |
| 997 | :param _headers: set to override the headers for a single |
| 998 | request; this effectively ignores the headers |
| 999 | in the spec for a single request. |
| 1000 | :type _headers: dict, optional |
| 1001 | :param _host_index: set to override the host_index for a single |
| 1002 | request; this effectively ignores the host_index |
| 1003 | in the spec for a single request. |
| 1004 | :type _host_index: int, optional |
| 1005 | :return: Returns the result object. |
| 1006 | """ # noqa: E501 |
| 1007 | |
| 1008 | _param = self._get_policy_serialize( |
| 1009 | _request_auth=_request_auth, |
| 1010 | _content_type=_content_type, |
| 1011 | _headers=_headers, |
| 1012 | _host_index=_host_index |
| 1013 | ) |
| 1014 | |
| 1015 | _response_types_map: Dict[str, Optional[str]] = { |
| 1016 | '200': "GetPolicy200Response", |
| 1017 | '404': "ListAssistants404Response", |
| 1018 | } |
| 1019 | response_data = self.api_client.call_api( |
| 1020 | *_param, |
| 1021 | _request_timeout=_request_timeout |
| 1022 | ) |
| 1023 | response_data.read() |
| 1024 | return self.api_client.response_deserialize( |
| 1025 | response_data=response_data, |
| 1026 | response_types_map=_response_types_map, |
| 1027 | ) |
| 1028 | |
| 1029 | |
| 1030 | @validate_call |
| 1031 | def get_policy_without_preload_content( |
| 1032 | self, |
| 1033 | _request_timeout: Union[ |
| 1034 | None, |
| 1035 | Annotated[StrictFloat, Field(gt=0)], |
| 1036 | Tuple[ |
| 1037 | Annotated[StrictFloat, Field(gt=0)], |
| 1038 | Annotated[StrictFloat, Field(gt=0)] |
| 1039 | ] |
| 1040 | ] = None, |
| 1041 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1042 | _content_type: Optional[StrictStr] = None, |
| 1043 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1044 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1045 | ) -> RESTResponseType: |
| 1046 | """Get organization policy |
| 1047 | |
| 1048 | Returns the policy configuration for the first organization that the user belongs to which has a policy configured. |
| 1049 | |
| 1050 | :param _request_timeout: timeout setting for this request. If one |
| 1051 | number provided, it will be total request |
| 1052 | timeout. It can also be a pair (tuple) of |
| 1053 | (connection, read) timeouts. |
| 1054 | :type _request_timeout: int, tuple(int, int), optional |
| 1055 | :param _request_auth: set to override the auth_settings for an a single |
| 1056 | request; this effectively ignores the |
| 1057 | authentication in the spec for a single request. |
| 1058 | :type _request_auth: dict, optional |
| 1059 | :param _content_type: force content-type for the request. |
| 1060 | :type _content_type: str, Optional |
| 1061 | :param _headers: set to override the headers for a single |
| 1062 | request; this effectively ignores the headers |
| 1063 | in the spec for a single request. |
| 1064 | :type _headers: dict, optional |
| 1065 | :param _host_index: set to override the host_index for a single |
| 1066 | request; this effectively ignores the host_index |
| 1067 | in the spec for a single request. |
| 1068 | :type _host_index: int, optional |
| 1069 | :return: Returns the result object. |
| 1070 | """ # noqa: E501 |
| 1071 | |
| 1072 | _param = self._get_policy_serialize( |
| 1073 | _request_auth=_request_auth, |
| 1074 | _content_type=_content_type, |
| 1075 | _headers=_headers, |
| 1076 | _host_index=_host_index |
| 1077 | ) |
| 1078 | |
| 1079 | _response_types_map: Dict[str, Optional[str]] = { |
| 1080 | '200': "GetPolicy200Response", |
| 1081 | '404': "ListAssistants404Response", |
| 1082 | } |
| 1083 | response_data = self.api_client.call_api( |
| 1084 | *_param, |
| 1085 | _request_timeout=_request_timeout |
| 1086 | ) |
| 1087 | return response_data.response |
| 1088 | |
| 1089 | |
| 1090 | def _get_policy_serialize( |
| 1091 | self, |
| 1092 | _request_auth, |
| 1093 | _content_type, |
| 1094 | _headers, |
| 1095 | _host_index, |
| 1096 | ) -> RequestSerialized: |
| 1097 | |
| 1098 | _host = None |
| 1099 | |
| 1100 | _collection_formats: Dict[str, str] = { |
| 1101 | } |
| 1102 | |
| 1103 | _path_params: Dict[str, str] = {} |
| 1104 | _query_params: List[Tuple[str, str]] = [] |
| 1105 | _header_params: Dict[str, Optional[str]] = _headers or {} |
| 1106 | _form_params: List[Tuple[str, str]] = [] |
| 1107 | _files: Dict[ |
| 1108 | str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] |
| 1109 | ] = {} |
| 1110 | _body_params: Optional[bytes] = None |
| 1111 | |
| 1112 | # process the path parameters |
| 1113 | # process the query parameters |
| 1114 | # process the header parameters |
| 1115 | # process the form parameters |
| 1116 | # process the body parameter |
| 1117 | |
| 1118 | |
| 1119 | # set the HTTP header `Accept` |
| 1120 | if 'Accept' not in _header_params: |
| 1121 | _header_params['Accept'] = self.api_client.select_header_accept( |
| 1122 | [ |
| 1123 | 'application/json' |
| 1124 | ] |
| 1125 | ) |
| 1126 | |
| 1127 | |
| 1128 | # authentication setting |
| 1129 | _auth_settings: List[str] = [ |
| 1130 | 'apiKeyAuth' |
| 1131 | ] |
| 1132 | |
| 1133 | return self.api_client.param_serialize( |
| 1134 | method='GET', |
| 1135 | resource_path='/ide/policy', |
| 1136 | path_params=_path_params, |
| 1137 | query_params=_query_params, |
| 1138 | header_params=_header_params, |
| 1139 | body=_body_params, |
| 1140 | post_params=_form_params, |
| 1141 | files=_files, |
| 1142 | auth_settings=_auth_settings, |
| 1143 | collection_formats=_collection_formats, |
| 1144 | _host=_host, |
| 1145 | _request_auth=_request_auth |
| 1146 | ) |
| 1147 | |
| 1148 | |
| 1149 | |
| 1150 | |
| 1151 | @validate_call |
| 1152 | def list_assistant_full_slugs( |
| 1153 | self, |
| 1154 | _request_timeout: Union[ |
| 1155 | None, |
| 1156 | Annotated[StrictFloat, Field(gt=0)], |
| 1157 | Tuple[ |
| 1158 | Annotated[StrictFloat, Field(gt=0)], |
| 1159 | Annotated[StrictFloat, Field(gt=0)] |
| 1160 | ] |
| 1161 | ] = None, |
| 1162 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1163 | _content_type: Optional[StrictStr] = None, |
| 1164 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1165 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1166 | ) -> None: |
| 1167 | """List assistant full slugs (currently returns 429) |
| 1168 | |
| 1169 | This endpoint is temporarily disabled and returns a 429 status code to prevent constant refreshes of the full assistant list until a fixed client version can be deployed. |
| 1170 | |
| 1171 | :param _request_timeout: timeout setting for this request. If one |
| 1172 | number provided, it will be total request |
| 1173 | timeout. It can also be a pair (tuple) of |
| 1174 | (connection, read) timeouts. |
| 1175 | :type _request_timeout: int, tuple(int, int), optional |
| 1176 | :param _request_auth: set to override the auth_settings for an a single |
| 1177 | request; this effectively ignores the |
| 1178 | authentication in the spec for a single request. |
| 1179 | :type _request_auth: dict, optional |
| 1180 | :param _content_type: force content-type for the request. |
| 1181 | :type _content_type: str, Optional |
| 1182 | :param _headers: set to override the headers for a single |
| 1183 | request; this effectively ignores the headers |
| 1184 | in the spec for a single request. |
| 1185 | :type _headers: dict, optional |
| 1186 | :param _host_index: set to override the host_index for a single |
| 1187 | request; this effectively ignores the host_index |
| 1188 | in the spec for a single request. |
| 1189 | :type _host_index: int, optional |
| 1190 | :return: Returns the result object. |
| 1191 | """ # noqa: E501 |
| 1192 | |
| 1193 | _param = self._list_assistant_full_slugs_serialize( |
| 1194 | _request_auth=_request_auth, |
| 1195 | _content_type=_content_type, |
| 1196 | _headers=_headers, |
| 1197 | _host_index=_host_index |
| 1198 | ) |
| 1199 | |
| 1200 | _response_types_map: Dict[str, Optional[str]] = { |
| 1201 | '429': "ListAssistantFullSlugs429Response", |
| 1202 | } |
| 1203 | response_data = self.api_client.call_api( |
| 1204 | *_param, |
| 1205 | _request_timeout=_request_timeout |
| 1206 | ) |
| 1207 | response_data.read() |
| 1208 | return self.api_client.response_deserialize( |
| 1209 | response_data=response_data, |
| 1210 | response_types_map=_response_types_map, |
| 1211 | ).data |
| 1212 | |
| 1213 | |
| 1214 | @validate_call |
| 1215 | def list_assistant_full_slugs_with_http_info( |
| 1216 | self, |
| 1217 | _request_timeout: Union[ |
| 1218 | None, |
| 1219 | Annotated[StrictFloat, Field(gt=0)], |
| 1220 | Tuple[ |
| 1221 | Annotated[StrictFloat, Field(gt=0)], |
| 1222 | Annotated[StrictFloat, Field(gt=0)] |
| 1223 | ] |
| 1224 | ] = None, |
| 1225 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1226 | _content_type: Optional[StrictStr] = None, |
| 1227 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1228 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1229 | ) -> ApiResponse[None]: |
| 1230 | """List assistant full slugs (currently returns 429) |
| 1231 | |
| 1232 | This endpoint is temporarily disabled and returns a 429 status code to prevent constant refreshes of the full assistant list until a fixed client version can be deployed. |
| 1233 | |
| 1234 | :param _request_timeout: timeout setting for this request. If one |
| 1235 | number provided, it will be total request |
| 1236 | timeout. It can also be a pair (tuple) of |
| 1237 | (connection, read) timeouts. |
| 1238 | :type _request_timeout: int, tuple(int, int), optional |
| 1239 | :param _request_auth: set to override the auth_settings for an a single |
| 1240 | request; this effectively ignores the |
| 1241 | authentication in the spec for a single request. |
| 1242 | :type _request_auth: dict, optional |
| 1243 | :param _content_type: force content-type for the request. |
| 1244 | :type _content_type: str, Optional |
| 1245 | :param _headers: set to override the headers for a single |
| 1246 | request; this effectively ignores the headers |
| 1247 | in the spec for a single request. |
| 1248 | :type _headers: dict, optional |
| 1249 | :param _host_index: set to override the host_index for a single |
| 1250 | request; this effectively ignores the host_index |
| 1251 | in the spec for a single request. |
| 1252 | :type _host_index: int, optional |
| 1253 | :return: Returns the result object. |
| 1254 | """ # noqa: E501 |
| 1255 | |
| 1256 | _param = self._list_assistant_full_slugs_serialize( |
| 1257 | _request_auth=_request_auth, |
| 1258 | _content_type=_content_type, |
| 1259 | _headers=_headers, |
| 1260 | _host_index=_host_index |
| 1261 | ) |
| 1262 | |
| 1263 | _response_types_map: Dict[str, Optional[str]] = { |
| 1264 | '429': "ListAssistantFullSlugs429Response", |
| 1265 | } |
| 1266 | response_data = self.api_client.call_api( |
| 1267 | *_param, |
| 1268 | _request_timeout=_request_timeout |
| 1269 | ) |
| 1270 | response_data.read() |
| 1271 | return self.api_client.response_deserialize( |
| 1272 | response_data=response_data, |
| 1273 | response_types_map=_response_types_map, |
| 1274 | ) |
| 1275 | |
| 1276 | |
| 1277 | @validate_call |
| 1278 | def list_assistant_full_slugs_without_preload_content( |
| 1279 | self, |
| 1280 | _request_timeout: Union[ |
| 1281 | None, |
| 1282 | Annotated[StrictFloat, Field(gt=0)], |
| 1283 | Tuple[ |
| 1284 | Annotated[StrictFloat, Field(gt=0)], |
| 1285 | Annotated[StrictFloat, Field(gt=0)] |
| 1286 | ] |
| 1287 | ] = None, |
| 1288 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1289 | _content_type: Optional[StrictStr] = None, |
| 1290 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1291 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1292 | ) -> RESTResponseType: |
| 1293 | """List assistant full slugs (currently returns 429) |
| 1294 | |
| 1295 | This endpoint is temporarily disabled and returns a 429 status code to prevent constant refreshes of the full assistant list until a fixed client version can be deployed. |
| 1296 | |
| 1297 | :param _request_timeout: timeout setting for this request. If one |
| 1298 | number provided, it will be total request |
| 1299 | timeout. It can also be a pair (tuple) of |
| 1300 | (connection, read) timeouts. |
| 1301 | :type _request_timeout: int, tuple(int, int), optional |
| 1302 | :param _request_auth: set to override the auth_settings for an a single |
| 1303 | request; this effectively ignores the |
| 1304 | authentication in the spec for a single request. |
| 1305 | :type _request_auth: dict, optional |
| 1306 | :param _content_type: force content-type for the request. |
| 1307 | :type _content_type: str, Optional |
| 1308 | :param _headers: set to override the headers for a single |
| 1309 | request; this effectively ignores the headers |
| 1310 | in the spec for a single request. |
| 1311 | :type _headers: dict, optional |
| 1312 | :param _host_index: set to override the host_index for a single |
| 1313 | request; this effectively ignores the host_index |
| 1314 | in the spec for a single request. |
| 1315 | :type _host_index: int, optional |
| 1316 | :return: Returns the result object. |
| 1317 | """ # noqa: E501 |
| 1318 | |
| 1319 | _param = self._list_assistant_full_slugs_serialize( |
| 1320 | _request_auth=_request_auth, |
| 1321 | _content_type=_content_type, |
| 1322 | _headers=_headers, |
| 1323 | _host_index=_host_index |
| 1324 | ) |
| 1325 | |
| 1326 | _response_types_map: Dict[str, Optional[str]] = { |
| 1327 | '429': "ListAssistantFullSlugs429Response", |
| 1328 | } |
| 1329 | response_data = self.api_client.call_api( |
| 1330 | *_param, |
| 1331 | _request_timeout=_request_timeout |
| 1332 | ) |
| 1333 | return response_data.response |
| 1334 | |
| 1335 | |
| 1336 | def _list_assistant_full_slugs_serialize( |
| 1337 | self, |
| 1338 | _request_auth, |
| 1339 | _content_type, |
| 1340 | _headers, |
| 1341 | _host_index, |
| 1342 | ) -> RequestSerialized: |
| 1343 | |
| 1344 | _host = None |
| 1345 | |
| 1346 | _collection_formats: Dict[str, str] = { |
| 1347 | } |
| 1348 | |
| 1349 | _path_params: Dict[str, str] = {} |
| 1350 | _query_params: List[Tuple[str, str]] = [] |
| 1351 | _header_params: Dict[str, Optional[str]] = _headers or {} |
| 1352 | _form_params: List[Tuple[str, str]] = [] |
| 1353 | _files: Dict[ |
| 1354 | str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] |
| 1355 | ] = {} |
| 1356 | _body_params: Optional[bytes] = None |
| 1357 | |
| 1358 | # process the path parameters |
| 1359 | # process the query parameters |
| 1360 | # process the header parameters |
| 1361 | # process the form parameters |
| 1362 | # process the body parameter |
| 1363 | |
| 1364 | |
| 1365 | # set the HTTP header `Accept` |
| 1366 | if 'Accept' not in _header_params: |
| 1367 | _header_params['Accept'] = self.api_client.select_header_accept( |
| 1368 | [ |
| 1369 | 'application/json' |
| 1370 | ] |
| 1371 | ) |
| 1372 | |
| 1373 | |
| 1374 | # authentication setting |
| 1375 | _auth_settings: List[str] = [ |
| 1376 | 'apiKeyAuth' |
| 1377 | ] |
| 1378 | |
| 1379 | return self.api_client.param_serialize( |
| 1380 | method='GET', |
| 1381 | resource_path='/ide/list-assistant-full-slugs', |
| 1382 | path_params=_path_params, |
| 1383 | query_params=_query_params, |
| 1384 | header_params=_header_params, |
| 1385 | body=_body_params, |
| 1386 | post_params=_form_params, |
| 1387 | files=_files, |
| 1388 | auth_settings=_auth_settings, |
| 1389 | collection_formats=_collection_formats, |
| 1390 | _host=_host, |
| 1391 | _request_auth=_request_auth |
| 1392 | ) |
| 1393 | |
| 1394 | |
| 1395 | |
| 1396 | |
| 1397 | @validate_call |
| 1398 | def list_assistants( |
| 1399 | self, |
| 1400 | always_use_proxy: Annotated[Optional[StrictStr], Field(description="Whether to always use the Continue-managed proxy for model requests")] = None, |
| 1401 | organization_id: Annotated[Optional[StrictStr], Field(description="ID of the organization to scope assistants to. If not provided, personal assistants are returned.")] = None, |
| 1402 | _request_timeout: Union[ |
| 1403 | None, |
| 1404 | Annotated[StrictFloat, Field(gt=0)], |
| 1405 | Tuple[ |
| 1406 | Annotated[StrictFloat, Field(gt=0)], |
| 1407 | Annotated[StrictFloat, Field(gt=0)] |
| 1408 | ] |
| 1409 | ] = None, |
| 1410 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1411 | _content_type: Optional[StrictStr] = None, |
| 1412 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1413 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1414 | ) -> List[ListAssistants200ResponseInner]: |
| 1415 | """List assistants for IDE |
| 1416 | |
| 1417 | Returns a complete list of assistants available to the user, with their full configurations, icons, and other metadata needed by the IDE to display and use them. This endpoint performs a full refresh of the list of assistants, including unrolling configurations and resolving secrets. |
| 1418 | |
| 1419 | :param always_use_proxy: Whether to always use the Continue-managed proxy for model requests |
| 1420 | :type always_use_proxy: str |
| 1421 | :param organization_id: ID of the organization to scope assistants to. If not provided, personal assistants are returned. |
| 1422 | :type organization_id: str |
| 1423 | :param _request_timeout: timeout setting for this request. If one |
| 1424 | number provided, it will be total request |
| 1425 | timeout. It can also be a pair (tuple) of |
| 1426 | (connection, read) timeouts. |
| 1427 | :type _request_timeout: int, tuple(int, int), optional |
| 1428 | :param _request_auth: set to override the auth_settings for an a single |
| 1429 | request; this effectively ignores the |
| 1430 | authentication in the spec for a single request. |
| 1431 | :type _request_auth: dict, optional |
| 1432 | :param _content_type: force content-type for the request. |
| 1433 | :type _content_type: str, Optional |
| 1434 | :param _headers: set to override the headers for a single |
| 1435 | request; this effectively ignores the headers |
| 1436 | in the spec for a single request. |
| 1437 | :type _headers: dict, optional |
| 1438 | :param _host_index: set to override the host_index for a single |
| 1439 | request; this effectively ignores the host_index |
| 1440 | in the spec for a single request. |
| 1441 | :type _host_index: int, optional |
| 1442 | :return: Returns the result object. |
| 1443 | """ # noqa: E501 |
| 1444 | |
| 1445 | _param = self._list_assistants_serialize( |
| 1446 | always_use_proxy=always_use_proxy, |
| 1447 | organization_id=organization_id, |
| 1448 | _request_auth=_request_auth, |
| 1449 | _content_type=_content_type, |
| 1450 | _headers=_headers, |
| 1451 | _host_index=_host_index |
| 1452 | ) |
| 1453 | |
| 1454 | _response_types_map: Dict[str, Optional[str]] = { |
| 1455 | '200': "List[ListAssistants200ResponseInner]", |
| 1456 | '401': "ListAssistants401Response", |
| 1457 | '404': "ListAssistants404Response", |
| 1458 | } |
| 1459 | response_data = self.api_client.call_api( |
| 1460 | *_param, |
| 1461 | _request_timeout=_request_timeout |
| 1462 | ) |
| 1463 | response_data.read() |
| 1464 | return self.api_client.response_deserialize( |
| 1465 | response_data=response_data, |
| 1466 | response_types_map=_response_types_map, |
| 1467 | ).data |
| 1468 | |
| 1469 | |
| 1470 | @validate_call |
| 1471 | def list_assistants_with_http_info( |
| 1472 | self, |
| 1473 | always_use_proxy: Annotated[Optional[StrictStr], Field(description="Whether to always use the Continue-managed proxy for model requests")] = None, |
| 1474 | organization_id: Annotated[Optional[StrictStr], Field(description="ID of the organization to scope assistants to. If not provided, personal assistants are returned.")] = None, |
| 1475 | _request_timeout: Union[ |
| 1476 | None, |
| 1477 | Annotated[StrictFloat, Field(gt=0)], |
| 1478 | Tuple[ |
| 1479 | Annotated[StrictFloat, Field(gt=0)], |
| 1480 | Annotated[StrictFloat, Field(gt=0)] |
| 1481 | ] |
| 1482 | ] = None, |
| 1483 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1484 | _content_type: Optional[StrictStr] = None, |
| 1485 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1486 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1487 | ) -> ApiResponse[List[ListAssistants200ResponseInner]]: |
| 1488 | """List assistants for IDE |
| 1489 | |
| 1490 | Returns a complete list of assistants available to the user, with their full configurations, icons, and other metadata needed by the IDE to display and use them. This endpoint performs a full refresh of the list of assistants, including unrolling configurations and resolving secrets. |
| 1491 | |
| 1492 | :param always_use_proxy: Whether to always use the Continue-managed proxy for model requests |
| 1493 | :type always_use_proxy: str |
| 1494 | :param organization_id: ID of the organization to scope assistants to. If not provided, personal assistants are returned. |
| 1495 | :type organization_id: str |
| 1496 | :param _request_timeout: timeout setting for this request. If one |
| 1497 | number provided, it will be total request |
| 1498 | timeout. It can also be a pair (tuple) of |
| 1499 | (connection, read) timeouts. |
| 1500 | :type _request_timeout: int, tuple(int, int), optional |
| 1501 | :param _request_auth: set to override the auth_settings for an a single |
| 1502 | request; this effectively ignores the |
| 1503 | authentication in the spec for a single request. |
| 1504 | :type _request_auth: dict, optional |
| 1505 | :param _content_type: force content-type for the request. |
| 1506 | :type _content_type: str, Optional |
| 1507 | :param _headers: set to override the headers for a single |
| 1508 | request; this effectively ignores the headers |
| 1509 | in the spec for a single request. |
| 1510 | :type _headers: dict, optional |
| 1511 | :param _host_index: set to override the host_index for a single |
| 1512 | request; this effectively ignores the host_index |
| 1513 | in the spec for a single request. |
| 1514 | :type _host_index: int, optional |
| 1515 | :return: Returns the result object. |
| 1516 | """ # noqa: E501 |
| 1517 | |
| 1518 | _param = self._list_assistants_serialize( |
| 1519 | always_use_proxy=always_use_proxy, |
| 1520 | organization_id=organization_id, |
| 1521 | _request_auth=_request_auth, |
| 1522 | _content_type=_content_type, |
| 1523 | _headers=_headers, |
| 1524 | _host_index=_host_index |
| 1525 | ) |
| 1526 | |
| 1527 | _response_types_map: Dict[str, Optional[str]] = { |
| 1528 | '200': "List[ListAssistants200ResponseInner]", |
| 1529 | '401': "ListAssistants401Response", |
| 1530 | '404': "ListAssistants404Response", |
| 1531 | } |
| 1532 | response_data = self.api_client.call_api( |
| 1533 | *_param, |
| 1534 | _request_timeout=_request_timeout |
| 1535 | ) |
| 1536 | response_data.read() |
| 1537 | return self.api_client.response_deserialize( |
| 1538 | response_data=response_data, |
| 1539 | response_types_map=_response_types_map, |
| 1540 | ) |
| 1541 | |
| 1542 | |
| 1543 | @validate_call |
| 1544 | def list_assistants_without_preload_content( |
| 1545 | self, |
| 1546 | always_use_proxy: Annotated[Optional[StrictStr], Field(description="Whether to always use the Continue-managed proxy for model requests")] = None, |
| 1547 | organization_id: Annotated[Optional[StrictStr], Field(description="ID of the organization to scope assistants to. If not provided, personal assistants are returned.")] = None, |
| 1548 | _request_timeout: Union[ |
| 1549 | None, |
| 1550 | Annotated[StrictFloat, Field(gt=0)], |
| 1551 | Tuple[ |
| 1552 | Annotated[StrictFloat, Field(gt=0)], |
| 1553 | Annotated[StrictFloat, Field(gt=0)] |
| 1554 | ] |
| 1555 | ] = None, |
| 1556 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1557 | _content_type: Optional[StrictStr] = None, |
| 1558 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1559 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1560 | ) -> RESTResponseType: |
| 1561 | """List assistants for IDE |
| 1562 | |
| 1563 | Returns a complete list of assistants available to the user, with their full configurations, icons, and other metadata needed by the IDE to display and use them. This endpoint performs a full refresh of the list of assistants, including unrolling configurations and resolving secrets. |
| 1564 | |
| 1565 | :param always_use_proxy: Whether to always use the Continue-managed proxy for model requests |
| 1566 | :type always_use_proxy: str |
| 1567 | :param organization_id: ID of the organization to scope assistants to. If not provided, personal assistants are returned. |
| 1568 | :type organization_id: str |
| 1569 | :param _request_timeout: timeout setting for this request. If one |
| 1570 | number provided, it will be total request |
| 1571 | timeout. It can also be a pair (tuple) of |
| 1572 | (connection, read) timeouts. |
| 1573 | :type _request_timeout: int, tuple(int, int), optional |
| 1574 | :param _request_auth: set to override the auth_settings for an a single |
| 1575 | request; this effectively ignores the |
| 1576 | authentication in the spec for a single request. |
| 1577 | :type _request_auth: dict, optional |
| 1578 | :param _content_type: force content-type for the request. |
| 1579 | :type _content_type: str, Optional |
| 1580 | :param _headers: set to override the headers for a single |
| 1581 | request; this effectively ignores the headers |
| 1582 | in the spec for a single request. |
| 1583 | :type _headers: dict, optional |
| 1584 | :param _host_index: set to override the host_index for a single |
| 1585 | request; this effectively ignores the host_index |
| 1586 | in the spec for a single request. |
| 1587 | :type _host_index: int, optional |
| 1588 | :return: Returns the result object. |
| 1589 | """ # noqa: E501 |
| 1590 | |
| 1591 | _param = self._list_assistants_serialize( |
| 1592 | always_use_proxy=always_use_proxy, |
| 1593 | organization_id=organization_id, |
| 1594 | _request_auth=_request_auth, |
| 1595 | _content_type=_content_type, |
| 1596 | _headers=_headers, |
| 1597 | _host_index=_host_index |
| 1598 | ) |
| 1599 | |
| 1600 | _response_types_map: Dict[str, Optional[str]] = { |
| 1601 | '200': "List[ListAssistants200ResponseInner]", |
| 1602 | '401': "ListAssistants401Response", |
| 1603 | '404': "ListAssistants404Response", |
| 1604 | } |
| 1605 | response_data = self.api_client.call_api( |
| 1606 | *_param, |
| 1607 | _request_timeout=_request_timeout |
| 1608 | ) |
| 1609 | return response_data.response |
| 1610 | |
| 1611 | |
| 1612 | def _list_assistants_serialize( |
| 1613 | self, |
| 1614 | always_use_proxy, |
| 1615 | organization_id, |
| 1616 | _request_auth, |
| 1617 | _content_type, |
| 1618 | _headers, |
| 1619 | _host_index, |
| 1620 | ) -> RequestSerialized: |
| 1621 | |
| 1622 | _host = None |
| 1623 | |
| 1624 | _collection_formats: Dict[str, str] = { |
| 1625 | } |
| 1626 | |
| 1627 | _path_params: Dict[str, str] = {} |
| 1628 | _query_params: List[Tuple[str, str]] = [] |
| 1629 | _header_params: Dict[str, Optional[str]] = _headers or {} |
| 1630 | _form_params: List[Tuple[str, str]] = [] |
| 1631 | _files: Dict[ |
| 1632 | str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] |
| 1633 | ] = {} |
| 1634 | _body_params: Optional[bytes] = None |
| 1635 | |
| 1636 | # process the path parameters |
| 1637 | # process the query parameters |
| 1638 | if always_use_proxy is not None: |
| 1639 | |
| 1640 | _query_params.append(('alwaysUseProxy', always_use_proxy)) |
| 1641 | |
| 1642 | if organization_id is not None: |
| 1643 | |
| 1644 | _query_params.append(('organizationId', organization_id)) |
| 1645 | |
| 1646 | # process the header parameters |
| 1647 | # process the form parameters |
| 1648 | # process the body parameter |
| 1649 | |
| 1650 | |
| 1651 | # set the HTTP header `Accept` |
| 1652 | if 'Accept' not in _header_params: |
| 1653 | _header_params['Accept'] = self.api_client.select_header_accept( |
| 1654 | [ |
| 1655 | 'application/json' |
| 1656 | ] |
| 1657 | ) |
| 1658 | |
| 1659 | |
| 1660 | # authentication setting |
| 1661 | _auth_settings: List[str] = [ |
| 1662 | 'apiKeyAuth' |
| 1663 | ] |
| 1664 | |
| 1665 | return self.api_client.param_serialize( |
| 1666 | method='GET', |
| 1667 | resource_path='/ide/list-assistants', |
| 1668 | path_params=_path_params, |
| 1669 | query_params=_query_params, |
| 1670 | header_params=_header_params, |
| 1671 | body=_body_params, |
| 1672 | post_params=_form_params, |
| 1673 | files=_files, |
| 1674 | auth_settings=_auth_settings, |
| 1675 | collection_formats=_collection_formats, |
| 1676 | _host=_host, |
| 1677 | _request_auth=_request_auth |
| 1678 | ) |
| 1679 | |
| 1680 | |
| 1681 | |
| 1682 | |
| 1683 | @validate_call |
| 1684 | def list_organizations( |
| 1685 | self, |
| 1686 | _request_timeout: Union[ |
| 1687 | None, |
| 1688 | Annotated[StrictFloat, Field(gt=0)], |
| 1689 | Tuple[ |
| 1690 | Annotated[StrictFloat, Field(gt=0)], |
| 1691 | Annotated[StrictFloat, Field(gt=0)] |
| 1692 | ] |
| 1693 | ] = None, |
| 1694 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1695 | _content_type: Optional[StrictStr] = None, |
| 1696 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1697 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1698 | ) -> ListOrganizations200Response: |
| 1699 | """List organizations for user |
| 1700 | |
| 1701 | Returns a list of organizations that the authenticated user belongs to, including organization metadata and pre-signed icon URLs. |
| 1702 | |
| 1703 | :param _request_timeout: timeout setting for this request. If one |
| 1704 | number provided, it will be total request |
| 1705 | timeout. It can also be a pair (tuple) of |
| 1706 | (connection, read) timeouts. |
| 1707 | :type _request_timeout: int, tuple(int, int), optional |
| 1708 | :param _request_auth: set to override the auth_settings for an a single |
| 1709 | request; this effectively ignores the |
| 1710 | authentication in the spec for a single request. |
| 1711 | :type _request_auth: dict, optional |
| 1712 | :param _content_type: force content-type for the request. |
| 1713 | :type _content_type: str, Optional |
| 1714 | :param _headers: set to override the headers for a single |
| 1715 | request; this effectively ignores the headers |
| 1716 | in the spec for a single request. |
| 1717 | :type _headers: dict, optional |
| 1718 | :param _host_index: set to override the host_index for a single |
| 1719 | request; this effectively ignores the host_index |
| 1720 | in the spec for a single request. |
| 1721 | :type _host_index: int, optional |
| 1722 | :return: Returns the result object. |
| 1723 | """ # noqa: E501 |
| 1724 | |
| 1725 | _param = self._list_organizations_serialize( |
| 1726 | _request_auth=_request_auth, |
| 1727 | _content_type=_content_type, |
| 1728 | _headers=_headers, |
| 1729 | _host_index=_host_index |
| 1730 | ) |
| 1731 | |
| 1732 | _response_types_map: Dict[str, Optional[str]] = { |
| 1733 | '200': "ListOrganizations200Response", |
| 1734 | '404': "ListAssistants404Response", |
| 1735 | } |
| 1736 | response_data = self.api_client.call_api( |
| 1737 | *_param, |
| 1738 | _request_timeout=_request_timeout |
| 1739 | ) |
| 1740 | response_data.read() |
| 1741 | return self.api_client.response_deserialize( |
| 1742 | response_data=response_data, |
| 1743 | response_types_map=_response_types_map, |
| 1744 | ).data |
| 1745 | |
| 1746 | |
| 1747 | @validate_call |
| 1748 | def list_organizations_with_http_info( |
| 1749 | self, |
| 1750 | _request_timeout: Union[ |
| 1751 | None, |
| 1752 | Annotated[StrictFloat, Field(gt=0)], |
| 1753 | Tuple[ |
| 1754 | Annotated[StrictFloat, Field(gt=0)], |
| 1755 | Annotated[StrictFloat, Field(gt=0)] |
| 1756 | ] |
| 1757 | ] = None, |
| 1758 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1759 | _content_type: Optional[StrictStr] = None, |
| 1760 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1761 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1762 | ) -> ApiResponse[ListOrganizations200Response]: |
| 1763 | """List organizations for user |
| 1764 | |
| 1765 | Returns a list of organizations that the authenticated user belongs to, including organization metadata and pre-signed icon URLs. |
| 1766 | |
| 1767 | :param _request_timeout: timeout setting for this request. If one |
| 1768 | number provided, it will be total request |
| 1769 | timeout. It can also be a pair (tuple) of |
| 1770 | (connection, read) timeouts. |
| 1771 | :type _request_timeout: int, tuple(int, int), optional |
| 1772 | :param _request_auth: set to override the auth_settings for an a single |
| 1773 | request; this effectively ignores the |
| 1774 | authentication in the spec for a single request. |
| 1775 | :type _request_auth: dict, optional |
| 1776 | :param _content_type: force content-type for the request. |
| 1777 | :type _content_type: str, Optional |
| 1778 | :param _headers: set to override the headers for a single |
| 1779 | request; this effectively ignores the headers |
| 1780 | in the spec for a single request. |
| 1781 | :type _headers: dict, optional |
| 1782 | :param _host_index: set to override the host_index for a single |
| 1783 | request; this effectively ignores the host_index |
| 1784 | in the spec for a single request. |
| 1785 | :type _host_index: int, optional |
| 1786 | :return: Returns the result object. |
| 1787 | """ # noqa: E501 |
| 1788 | |
| 1789 | _param = self._list_organizations_serialize( |
| 1790 | _request_auth=_request_auth, |
| 1791 | _content_type=_content_type, |
| 1792 | _headers=_headers, |
| 1793 | _host_index=_host_index |
| 1794 | ) |
| 1795 | |
| 1796 | _response_types_map: Dict[str, Optional[str]] = { |
| 1797 | '200': "ListOrganizations200Response", |
| 1798 | '404': "ListAssistants404Response", |
| 1799 | } |
| 1800 | response_data = self.api_client.call_api( |
| 1801 | *_param, |
| 1802 | _request_timeout=_request_timeout |
| 1803 | ) |
| 1804 | response_data.read() |
| 1805 | return self.api_client.response_deserialize( |
| 1806 | response_data=response_data, |
| 1807 | response_types_map=_response_types_map, |
| 1808 | ) |
| 1809 | |
| 1810 | |
| 1811 | @validate_call |
| 1812 | def list_organizations_without_preload_content( |
| 1813 | self, |
| 1814 | _request_timeout: Union[ |
| 1815 | None, |
| 1816 | Annotated[StrictFloat, Field(gt=0)], |
| 1817 | Tuple[ |
| 1818 | Annotated[StrictFloat, Field(gt=0)], |
| 1819 | Annotated[StrictFloat, Field(gt=0)] |
| 1820 | ] |
| 1821 | ] = None, |
| 1822 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1823 | _content_type: Optional[StrictStr] = None, |
| 1824 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1825 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1826 | ) -> RESTResponseType: |
| 1827 | """List organizations for user |
| 1828 | |
| 1829 | Returns a list of organizations that the authenticated user belongs to, including organization metadata and pre-signed icon URLs. |
| 1830 | |
| 1831 | :param _request_timeout: timeout setting for this request. If one |
| 1832 | number provided, it will be total request |
| 1833 | timeout. It can also be a pair (tuple) of |
| 1834 | (connection, read) timeouts. |
| 1835 | :type _request_timeout: int, tuple(int, int), optional |
| 1836 | :param _request_auth: set to override the auth_settings for an a single |
| 1837 | request; this effectively ignores the |
| 1838 | authentication in the spec for a single request. |
| 1839 | :type _request_auth: dict, optional |
| 1840 | :param _content_type: force content-type for the request. |
| 1841 | :type _content_type: str, Optional |
| 1842 | :param _headers: set to override the headers for a single |
| 1843 | request; this effectively ignores the headers |
| 1844 | in the spec for a single request. |
| 1845 | :type _headers: dict, optional |
| 1846 | :param _host_index: set to override the host_index for a single |
| 1847 | request; this effectively ignores the host_index |
| 1848 | in the spec for a single request. |
| 1849 | :type _host_index: int, optional |
| 1850 | :return: Returns the result object. |
| 1851 | """ # noqa: E501 |
| 1852 | |
| 1853 | _param = self._list_organizations_serialize( |
| 1854 | _request_auth=_request_auth, |
| 1855 | _content_type=_content_type, |
| 1856 | _headers=_headers, |
| 1857 | _host_index=_host_index |
| 1858 | ) |
| 1859 | |
| 1860 | _response_types_map: Dict[str, Optional[str]] = { |
| 1861 | '200': "ListOrganizations200Response", |
| 1862 | '404': "ListAssistants404Response", |
| 1863 | } |
| 1864 | response_data = self.api_client.call_api( |
| 1865 | *_param, |
| 1866 | _request_timeout=_request_timeout |
| 1867 | ) |
| 1868 | return response_data.response |
| 1869 | |
| 1870 | |
| 1871 | def _list_organizations_serialize( |
| 1872 | self, |
| 1873 | _request_auth, |
| 1874 | _content_type, |
| 1875 | _headers, |
| 1876 | _host_index, |
| 1877 | ) -> RequestSerialized: |
| 1878 | |
| 1879 | _host = None |
| 1880 | |
| 1881 | _collection_formats: Dict[str, str] = { |
| 1882 | } |
| 1883 | |
| 1884 | _path_params: Dict[str, str] = {} |
| 1885 | _query_params: List[Tuple[str, str]] = [] |
| 1886 | _header_params: Dict[str, Optional[str]] = _headers or {} |
| 1887 | _form_params: List[Tuple[str, str]] = [] |
| 1888 | _files: Dict[ |
| 1889 | str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] |
| 1890 | ] = {} |
| 1891 | _body_params: Optional[bytes] = None |
| 1892 | |
| 1893 | # process the path parameters |
| 1894 | # process the query parameters |
| 1895 | # process the header parameters |
| 1896 | # process the form parameters |
| 1897 | # process the body parameter |
| 1898 | |
| 1899 | |
| 1900 | # set the HTTP header `Accept` |
| 1901 | if 'Accept' not in _header_params: |
| 1902 | _header_params['Accept'] = self.api_client.select_header_accept( |
| 1903 | [ |
| 1904 | 'application/json' |
| 1905 | ] |
| 1906 | ) |
| 1907 | |
| 1908 | |
| 1909 | # authentication setting |
| 1910 | _auth_settings: List[str] = [ |
| 1911 | 'apiKeyAuth' |
| 1912 | ] |
| 1913 | |
| 1914 | return self.api_client.param_serialize( |
| 1915 | method='GET', |
| 1916 | resource_path='/ide/list-organizations', |
| 1917 | path_params=_path_params, |
| 1918 | query_params=_query_params, |
| 1919 | header_params=_header_params, |
| 1920 | body=_body_params, |
| 1921 | post_params=_form_params, |
| 1922 | files=_files, |
| 1923 | auth_settings=_auth_settings, |
| 1924 | collection_formats=_collection_formats, |
| 1925 | _host=_host, |
| 1926 | _request_auth=_request_auth |
| 1927 | ) |
| 1928 | |
| 1929 | |
| 1930 | |
| 1931 | |
| 1932 | @validate_call |
| 1933 | def sync_secrets( |
| 1934 | self, |
| 1935 | sync_secrets_request: SyncSecretsRequest, |
| 1936 | _request_timeout: Union[ |
| 1937 | None, |
| 1938 | Annotated[StrictFloat, Field(gt=0)], |
| 1939 | Tuple[ |
| 1940 | Annotated[StrictFloat, Field(gt=0)], |
| 1941 | Annotated[StrictFloat, Field(gt=0)] |
| 1942 | ] |
| 1943 | ] = None, |
| 1944 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 1945 | _content_type: Optional[StrictStr] = None, |
| 1946 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 1947 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 1948 | ) -> List[Optional[object]]: |
| 1949 | """Synchronize secrets for user |
| 1950 | |
| 1951 | Resolves and synchronizes secrets for the authenticated user based on the provided Fully Qualified Secret Names (FQSNs). |
| 1952 | |
| 1953 | :param sync_secrets_request: (required) |
| 1954 | :type sync_secrets_request: SyncSecretsRequest |
| 1955 | :param _request_timeout: timeout setting for this request. If one |
| 1956 | number provided, it will be total request |
| 1957 | timeout. It can also be a pair (tuple) of |
| 1958 | (connection, read) timeouts. |
| 1959 | :type _request_timeout: int, tuple(int, int), optional |
| 1960 | :param _request_auth: set to override the auth_settings for an a single |
| 1961 | request; this effectively ignores the |
| 1962 | authentication in the spec for a single request. |
| 1963 | :type _request_auth: dict, optional |
| 1964 | :param _content_type: force content-type for the request. |
| 1965 | :type _content_type: str, Optional |
| 1966 | :param _headers: set to override the headers for a single |
| 1967 | request; this effectively ignores the headers |
| 1968 | in the spec for a single request. |
| 1969 | :type _headers: dict, optional |
| 1970 | :param _host_index: set to override the host_index for a single |
| 1971 | request; this effectively ignores the host_index |
| 1972 | in the spec for a single request. |
| 1973 | :type _host_index: int, optional |
| 1974 | :return: Returns the result object. |
| 1975 | """ # noqa: E501 |
| 1976 | |
| 1977 | _param = self._sync_secrets_serialize( |
| 1978 | sync_secrets_request=sync_secrets_request, |
| 1979 | _request_auth=_request_auth, |
| 1980 | _content_type=_content_type, |
| 1981 | _headers=_headers, |
| 1982 | _host_index=_host_index |
| 1983 | ) |
| 1984 | |
| 1985 | _response_types_map: Dict[str, Optional[str]] = { |
| 1986 | '200': "List[Optional[object]]", |
| 1987 | '404': "ListAssistants404Response", |
| 1988 | } |
| 1989 | response_data = self.api_client.call_api( |
| 1990 | *_param, |
| 1991 | _request_timeout=_request_timeout |
| 1992 | ) |
| 1993 | response_data.read() |
| 1994 | return self.api_client.response_deserialize( |
| 1995 | response_data=response_data, |
| 1996 | response_types_map=_response_types_map, |
| 1997 | ).data |
| 1998 | |
| 1999 | |
| 2000 | @validate_call |
| 2001 | def sync_secrets_with_http_info( |
| 2002 | self, |
| 2003 | sync_secrets_request: SyncSecretsRequest, |
| 2004 | _request_timeout: Union[ |
| 2005 | None, |
| 2006 | Annotated[StrictFloat, Field(gt=0)], |
| 2007 | Tuple[ |
| 2008 | Annotated[StrictFloat, Field(gt=0)], |
| 2009 | Annotated[StrictFloat, Field(gt=0)] |
| 2010 | ] |
| 2011 | ] = None, |
| 2012 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 2013 | _content_type: Optional[StrictStr] = None, |
| 2014 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 2015 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 2016 | ) -> ApiResponse[List[Optional[object]]]: |
| 2017 | """Synchronize secrets for user |
| 2018 | |
| 2019 | Resolves and synchronizes secrets for the authenticated user based on the provided Fully Qualified Secret Names (FQSNs). |
| 2020 | |
| 2021 | :param sync_secrets_request: (required) |
| 2022 | :type sync_secrets_request: SyncSecretsRequest |
| 2023 | :param _request_timeout: timeout setting for this request. If one |
| 2024 | number provided, it will be total request |
| 2025 | timeout. It can also be a pair (tuple) of |
| 2026 | (connection, read) timeouts. |
| 2027 | :type _request_timeout: int, tuple(int, int), optional |
| 2028 | :param _request_auth: set to override the auth_settings for an a single |
| 2029 | request; this effectively ignores the |
| 2030 | authentication in the spec for a single request. |
| 2031 | :type _request_auth: dict, optional |
| 2032 | :param _content_type: force content-type for the request. |
| 2033 | :type _content_type: str, Optional |
| 2034 | :param _headers: set to override the headers for a single |
| 2035 | request; this effectively ignores the headers |
| 2036 | in the spec for a single request. |
| 2037 | :type _headers: dict, optional |
| 2038 | :param _host_index: set to override the host_index for a single |
| 2039 | request; this effectively ignores the host_index |
| 2040 | in the spec for a single request. |
| 2041 | :type _host_index: int, optional |
| 2042 | :return: Returns the result object. |
| 2043 | """ # noqa: E501 |
| 2044 | |
| 2045 | _param = self._sync_secrets_serialize( |
| 2046 | sync_secrets_request=sync_secrets_request, |
| 2047 | _request_auth=_request_auth, |
| 2048 | _content_type=_content_type, |
| 2049 | _headers=_headers, |
| 2050 | _host_index=_host_index |
| 2051 | ) |
| 2052 | |
| 2053 | _response_types_map: Dict[str, Optional[str]] = { |
| 2054 | '200': "List[Optional[object]]", |
| 2055 | '404': "ListAssistants404Response", |
| 2056 | } |
| 2057 | response_data = self.api_client.call_api( |
| 2058 | *_param, |
| 2059 | _request_timeout=_request_timeout |
| 2060 | ) |
| 2061 | response_data.read() |
| 2062 | return self.api_client.response_deserialize( |
| 2063 | response_data=response_data, |
| 2064 | response_types_map=_response_types_map, |
| 2065 | ) |
| 2066 | |
| 2067 | |
| 2068 | @validate_call |
| 2069 | def sync_secrets_without_preload_content( |
| 2070 | self, |
| 2071 | sync_secrets_request: SyncSecretsRequest, |
| 2072 | _request_timeout: Union[ |
| 2073 | None, |
| 2074 | Annotated[StrictFloat, Field(gt=0)], |
| 2075 | Tuple[ |
| 2076 | Annotated[StrictFloat, Field(gt=0)], |
| 2077 | Annotated[StrictFloat, Field(gt=0)] |
| 2078 | ] |
| 2079 | ] = None, |
| 2080 | _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 2081 | _content_type: Optional[StrictStr] = None, |
| 2082 | _headers: Optional[Dict[StrictStr, Any]] = None, |
| 2083 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 2084 | ) -> RESTResponseType: |
| 2085 | """Synchronize secrets for user |
| 2086 | |
| 2087 | Resolves and synchronizes secrets for the authenticated user based on the provided Fully Qualified Secret Names (FQSNs). |
| 2088 | |
| 2089 | :param sync_secrets_request: (required) |
| 2090 | :type sync_secrets_request: SyncSecretsRequest |
| 2091 | :param _request_timeout: timeout setting for this request. If one |
| 2092 | number provided, it will be total request |
| 2093 | timeout. It can also be a pair (tuple) of |
| 2094 | (connection, read) timeouts. |
| 2095 | :type _request_timeout: int, tuple(int, int), optional |
| 2096 | :param _request_auth: set to override the auth_settings for an a single |
| 2097 | request; this effectively ignores the |
| 2098 | authentication in the spec for a single request. |
| 2099 | :type _request_auth: dict, optional |
| 2100 | :param _content_type: force content-type for the request. |
| 2101 | :type _content_type: str, Optional |
| 2102 | :param _headers: set to override the headers for a single |
| 2103 | request; this effectively ignores the headers |
| 2104 | in the spec for a single request. |
| 2105 | :type _headers: dict, optional |
| 2106 | :param _host_index: set to override the host_index for a single |
| 2107 | request; this effectively ignores the host_index |
| 2108 | in the spec for a single request. |
| 2109 | :type _host_index: int, optional |
| 2110 | :return: Returns the result object. |
| 2111 | """ # noqa: E501 |
| 2112 | |
| 2113 | _param = self._sync_secrets_serialize( |
| 2114 | sync_secrets_request=sync_secrets_request, |
| 2115 | _request_auth=_request_auth, |
| 2116 | _content_type=_content_type, |
| 2117 | _headers=_headers, |
| 2118 | _host_index=_host_index |
| 2119 | ) |
| 2120 | |
| 2121 | _response_types_map: Dict[str, Optional[str]] = { |
| 2122 | '200': "List[Optional[object]]", |
| 2123 | '404': "ListAssistants404Response", |
| 2124 | } |
| 2125 | response_data = self.api_client.call_api( |
| 2126 | *_param, |
| 2127 | _request_timeout=_request_timeout |
| 2128 | ) |
| 2129 | return response_data.response |
| 2130 | |
| 2131 | |
| 2132 | def _sync_secrets_serialize( |
| 2133 | self, |
| 2134 | sync_secrets_request, |
| 2135 | _request_auth, |
| 2136 | _content_type, |
| 2137 | _headers, |
| 2138 | _host_index, |
| 2139 | ) -> RequestSerialized: |
| 2140 | |
| 2141 | _host = None |
| 2142 | |
| 2143 | _collection_formats: Dict[str, str] = { |
| 2144 | } |
| 2145 | |
| 2146 | _path_params: Dict[str, str] = {} |
| 2147 | _query_params: List[Tuple[str, str]] = [] |
| 2148 | _header_params: Dict[str, Optional[str]] = _headers or {} |
| 2149 | _form_params: List[Tuple[str, str]] = [] |
| 2150 | _files: Dict[ |
| 2151 | str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] |
| 2152 | ] = {} |
| 2153 | _body_params: Optional[bytes] = None |
| 2154 | |
| 2155 | # process the path parameters |
| 2156 | # process the query parameters |
| 2157 | # process the header parameters |
| 2158 | # process the form parameters |
| 2159 | # process the body parameter |
| 2160 | if sync_secrets_request is not None: |
| 2161 | _body_params = sync_secrets_request |
| 2162 | |
| 2163 | |
| 2164 | # set the HTTP header `Accept` |
| 2165 | if 'Accept' not in _header_params: |
| 2166 | _header_params['Accept'] = self.api_client.select_header_accept( |
| 2167 | [ |
| 2168 | 'application/json' |
| 2169 | ] |
| 2170 | ) |
| 2171 | |
| 2172 | # set the HTTP header `Content-Type` |
| 2173 | if _content_type: |
| 2174 | _header_params['Content-Type'] = _content_type |
| 2175 | else: |
| 2176 | _default_content_type = ( |
| 2177 | self.api_client.select_header_content_type( |
| 2178 | [ |
| 2179 | 'application/json' |
| 2180 | ] |
| 2181 | ) |
| 2182 | ) |
| 2183 | if _default_content_type is not None: |
| 2184 | _header_params['Content-Type'] = _default_content_type |
| 2185 | |
| 2186 | # authentication setting |
| 2187 | _auth_settings: List[str] = [ |
| 2188 | 'apiKeyAuth' |
| 2189 | ] |
| 2190 | |
| 2191 | return self.api_client.param_serialize( |
| 2192 | method='POST', |
| 2193 | resource_path='/ide/sync-secrets', |
| 2194 | path_params=_path_params, |
| 2195 | query_params=_query_params, |
| 2196 | header_params=_header_params, |
| 2197 | body=_body_params, |
| 2198 | post_params=_form_params, |
| 2199 | files=_files, |
| 2200 | auth_settings=_auth_settings, |
| 2201 | collection_formats=_collection_formats, |
| 2202 | _host=_host, |
| 2203 | _request_auth=_request_auth |
| 2204 | ) |
| 2205 | |
| 2206 | |