adaline-api 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- adaline_api/__init__.py +193 -0
- adaline_api/api/__init__.py +5 -0
- adaline_api/api/default_api.py +1221 -0
- adaline_api/api_client.py +804 -0
- adaline_api/api_response.py +21 -0
- adaline_api/configuration.py +582 -0
- adaline_api/exceptions.py +216 -0
- adaline_api/models/__init__.py +89 -0
- adaline_api/models/api_message_content.py +113 -0
- adaline_api/models/api_message_content_type.py +113 -0
- adaline_api/models/base64_hosted_image_content_value.py +99 -0
- adaline_api/models/base64_hosted_image_content_value_type.py +99 -0
- adaline_api/models/base64_hosted_pdf_content_value.py +99 -0
- adaline_api/models/base64_hosted_pdf_content_value_type.py +99 -0
- adaline_api/models/base64_image_content_value.py +105 -0
- adaline_api/models/base64_image_content_value_type.py +105 -0
- adaline_api/models/base64_media.py +118 -0
- adaline_api/models/base64_media_type.py +118 -0
- adaline_api/models/base64_pdf_content_value.py +96 -0
- adaline_api/models/base64_pdf_content_value_type.py +96 -0
- adaline_api/models/base_entity.py +96 -0
- adaline_api/models/config_type.py +94 -0
- adaline_api/models/content.py +196 -0
- adaline_api/models/content_type.py +196 -0
- adaline_api/models/create_log_span_request.py +94 -0
- adaline_api/models/create_log_span_request_span.py +150 -0
- adaline_api/models/create_log_span_request_type.py +94 -0
- adaline_api/models/create_log_span_response.py +88 -0
- adaline_api/models/create_log_span_response_type.py +88 -0
- adaline_api/models/create_log_trace_request.py +104 -0
- adaline_api/models/create_log_trace_request_span.py +146 -0
- adaline_api/models/create_log_trace_request_trace.py +122 -0
- adaline_api/models/create_log_trace_request_type.py +104 -0
- adaline_api/models/create_log_trace_response.py +90 -0
- adaline_api/models/create_log_trace_response_type.py +90 -0
- adaline_api/models/deployment.py +107 -0
- adaline_api/models/deployment_prompt.py +121 -0
- adaline_api/models/deployment_prompt_config.py +94 -0
- adaline_api/models/deployment_prompt_config_type.py +94 -0
- adaline_api/models/deployment_prompt_type.py +121 -0
- adaline_api/models/deployment_prompt_variables.py +96 -0
- adaline_api/models/deployment_prompt_variables_type.py +96 -0
- adaline_api/models/deployment_type.py +107 -0
- adaline_api/models/deployment_type_prompt.py +121 -0
- adaline_api/models/enum_value.py +166 -0
- adaline_api/models/enum_value_type.py +166 -0
- adaline_api/models/error_response.py +91 -0
- adaline_api/models/error_response_type.py +91 -0
- adaline_api/models/function.py +101 -0
- adaline_api/models/function_parameter.py +139 -0
- adaline_api/models/function_parameter_type.py +139 -0
- adaline_api/models/function_parameters.py +115 -0
- adaline_api/models/function_parameters_type.py +115 -0
- adaline_api/models/function_request_http.py +121 -0
- adaline_api/models/function_request_http_type.py +121 -0
- adaline_api/models/function_request_retry.py +92 -0
- adaline_api/models/function_request_retry_type.py +92 -0
- adaline_api/models/function_tool.py +106 -0
- adaline_api/models/function_tool_definition.py +91 -0
- adaline_api/models/function_tool_definition_type.py +104 -0
- adaline_api/models/function_tool_type.py +106 -0
- adaline_api/models/function_tool_type_definition.py +91 -0
- adaline_api/models/function_type.py +106 -0
- adaline_api/models/image_content.py +109 -0
- adaline_api/models/image_content_type.py +109 -0
- adaline_api/models/image_content_value.py +140 -0
- adaline_api/models/image_content_value_type.py +140 -0
- adaline_api/models/image_message_content.py +111 -0
- adaline_api/models/image_message_content_type.py +111 -0
- adaline_api/models/image_message_content_type_value.py +154 -0
- adaline_api/models/image_message_content_value.py +154 -0
- adaline_api/models/image_source.py +140 -0
- adaline_api/models/image_source_type.py +140 -0
- adaline_api/models/log_attributes_value.py +160 -0
- adaline_api/models/log_feedback_comment.py +98 -0
- adaline_api/models/log_span.py +180 -0
- adaline_api/models/log_span_all_of_internal_feedback.py +98 -0
- adaline_api/models/log_span_content.py +224 -0
- adaline_api/models/log_span_embeddings_content.py +101 -0
- adaline_api/models/log_span_event.py +96 -0
- adaline_api/models/log_span_function_content.py +101 -0
- adaline_api/models/log_span_guardrail_content.py +101 -0
- adaline_api/models/log_span_model_content.py +109 -0
- adaline_api/models/log_span_model_stream_content.py +111 -0
- adaline_api/models/log_span_other_content.py +101 -0
- adaline_api/models/log_span_parsed_content.py +101 -0
- adaline_api/models/log_span_retrieval_content.py +101 -0
- adaline_api/models/log_span_tool_content.py +101 -0
- adaline_api/models/log_trace.py +132 -0
- adaline_api/models/log_trace_attributes_inner.py +102 -0
- adaline_api/models/log_trace_attributes_value.py +160 -0
- adaline_api/models/log_trace_attributes_value_type.py +160 -0
- adaline_api/models/log_trace_tags_inner.py +96 -0
- adaline_api/models/log_trace_type.py +132 -0
- adaline_api/models/log_trace_type_attributes_inner.py +102 -0
- adaline_api/models/log_trace_type_tags_inner.py +96 -0
- adaline_api/models/mcp_server.py +114 -0
- adaline_api/models/mcp_server_tool_configuration.py +90 -0
- adaline_api/models/mcp_server_tool_configuration_type.py +90 -0
- adaline_api/models/mcp_server_type.py +114 -0
- adaline_api/models/message.py +98 -0
- adaline_api/models/message_content_inner.py +182 -0
- adaline_api/models/message_content_type_inner.py +182 -0
- adaline_api/models/message_type.py +98 -0
- adaline_api/models/modality_enum.py +41 -0
- adaline_api/models/modality_enum_type.py +41 -0
- adaline_api/models/pdf_content.py +106 -0
- adaline_api/models/pdf_content_file.py +91 -0
- adaline_api/models/pdf_content_type.py +106 -0
- adaline_api/models/pdf_content_type_file.py +91 -0
- adaline_api/models/pdf_content_value.py +140 -0
- adaline_api/models/pdf_content_value_type.py +140 -0
- adaline_api/models/pdf_message_content.py +108 -0
- adaline_api/models/pdf_message_content_file.py +91 -0
- adaline_api/models/pdf_message_content_type.py +108 -0
- adaline_api/models/pdf_message_content_type_file.py +91 -0
- adaline_api/models/pdf_message_content_type_value.py +154 -0
- adaline_api/models/pdf_message_content_value.py +154 -0
- adaline_api/models/prompt_variable.py +96 -0
- adaline_api/models/prompt_variable_value.py +210 -0
- adaline_api/models/reasoning_content.py +100 -0
- adaline_api/models/reasoning_content_type.py +100 -0
- adaline_api/models/reasoning_content_value.py +98 -0
- adaline_api/models/reasoning_content_value_type.py +98 -0
- adaline_api/models/reasoning_content_value_union.py +140 -0
- adaline_api/models/reasoning_content_value_union_type.py +140 -0
- adaline_api/models/reasoning_message_content.py +102 -0
- adaline_api/models/reasoning_message_content_type.py +102 -0
- adaline_api/models/reasoning_message_content_type_value.py +140 -0
- adaline_api/models/reasoning_message_content_value.py +140 -0
- adaline_api/models/reasoning_redacted_value.py +109 -0
- adaline_api/models/reasoning_redacted_value_type.py +109 -0
- adaline_api/models/reasoning_thinking_value.py +111 -0
- adaline_api/models/reasoning_thinking_value_type.py +111 -0
- adaline_api/models/reasoning_value.py +140 -0
- adaline_api/models/reasoning_value_type.py +140 -0
- adaline_api/models/redacted_reasoning_content_value.py +96 -0
- adaline_api/models/redacted_reasoning_content_value_type.py +96 -0
- adaline_api/models/response_schema.py +105 -0
- adaline_api/models/response_schema_property.py +135 -0
- adaline_api/models/response_schema_property_enum_inner.py +166 -0
- adaline_api/models/response_schema_property_type.py +143 -0
- adaline_api/models/response_schema_property_type_enum_inner.py +166 -0
- adaline_api/models/response_schema_property_type_type.py +143 -0
- adaline_api/models/response_schema_structure.py +122 -0
- adaline_api/models/response_schema_structure_type.py +122 -0
- adaline_api/models/response_schema_type.py +105 -0
- adaline_api/models/role_enum.py +39 -0
- adaline_api/models/role_enum_type.py +39 -0
- adaline_api/models/span_content_detailed.py +112 -0
- adaline_api/models/span_content_detailed_type.py +112 -0
- adaline_api/models/span_content_detailed_type_variables_value.py +94 -0
- adaline_api/models/span_content_detailed_variables_value.py +94 -0
- adaline_api/models/span_content_minimal.py +91 -0
- adaline_api/models/span_content_minimal_type.py +91 -0
- adaline_api/models/span_log_req_attributes.py +160 -0
- adaline_api/models/span_log_req_attributes_type.py +160 -0
- adaline_api/models/span_log_req_content.py +137 -0
- adaline_api/models/span_log_req_content_type.py +137 -0
- adaline_api/models/span_log_request.py +93 -0
- adaline_api/models/span_log_request_span.py +139 -0
- adaline_api/models/span_log_request_type.py +93 -0
- adaline_api/models/span_log_request_type_span.py +139 -0
- adaline_api/models/span_log_response.py +87 -0
- adaline_api/models/span_log_response_type.py +87 -0
- adaline_api/models/spans_request_attribute_value.py +160 -0
- adaline_api/models/spans_request_attribute_value_type.py +160 -0
- adaline_api/models/spans_request_content_value.py +143 -0
- adaline_api/models/spans_request_content_value_type.py +143 -0
- adaline_api/models/text_content.py +96 -0
- adaline_api/models/text_content_type.py +96 -0
- adaline_api/models/text_message_content.py +98 -0
- adaline_api/models/text_message_content_type.py +98 -0
- adaline_api/models/tool_call_content.py +105 -0
- adaline_api/models/tool_call_content_type.py +105 -0
- adaline_api/models/tool_call_message_content.py +107 -0
- adaline_api/models/tool_call_message_content_type.py +107 -0
- adaline_api/models/tool_response_content.py +109 -0
- adaline_api/models/tool_response_content_api_response.py +88 -0
- adaline_api/models/tool_response_content_type.py +109 -0
- adaline_api/models/tool_response_content_type_api_response.py +88 -0
- adaline_api/models/tool_response_message_content.py +111 -0
- adaline_api/models/tool_response_message_content_api_response.py +87 -0
- adaline_api/models/tool_response_message_content_type.py +111 -0
- adaline_api/models/tool_response_message_content_type_api_response.py +87 -0
- adaline_api/models/tool_type.py +113 -0
- adaline_api/models/trace_log_patch_request.py +137 -0
- adaline_api/models/trace_log_patch_request_one_of.py +97 -0
- adaline_api/models/trace_log_patch_request_one_of1.py +97 -0
- adaline_api/models/trace_log_patch_request_type.py +137 -0
- adaline_api/models/trace_log_patch_request_type_one_of.py +97 -0
- adaline_api/models/trace_log_patch_request_type_one_of1.py +97 -0
- adaline_api/models/trace_log_patch_response.py +87 -0
- adaline_api/models/trace_log_patch_response_type.py +87 -0
- adaline_api/models/trace_log_request.py +103 -0
- adaline_api/models/trace_log_request_spans_inner.py +135 -0
- adaline_api/models/trace_log_request_trace.py +121 -0
- adaline_api/models/trace_log_request_type.py +103 -0
- adaline_api/models/trace_log_request_type_spans_inner.py +135 -0
- adaline_api/models/trace_log_request_type_trace.py +121 -0
- adaline_api/models/trace_log_response.py +89 -0
- adaline_api/models/trace_log_response_type.py +89 -0
- adaline_api/models/trace_request_attribute_value.py +160 -0
- adaline_api/models/trace_request_attribute_value_type.py +160 -0
- adaline_api/models/update_log_trace_request.py +98 -0
- adaline_api/models/update_log_trace_request_attribute_item.py +140 -0
- adaline_api/models/update_log_trace_request_attribute_item_one_of.py +102 -0
- adaline_api/models/update_log_trace_request_attribute_item_one_of1.py +96 -0
- adaline_api/models/update_log_trace_request_attribute_item_one_of_value.py +160 -0
- adaline_api/models/update_log_trace_request_tag_item.py +140 -0
- adaline_api/models/update_log_trace_request_tag_item_one_of.py +97 -0
- adaline_api/models/update_log_trace_request_tag_item_one_of1.py +97 -0
- adaline_api/models/update_log_trace_request_trace.py +120 -0
- adaline_api/models/update_log_trace_request_type.py +98 -0
- adaline_api/models/update_log_trace_response.py +87 -0
- adaline_api/models/update_log_trace_response_type.py +87 -0
- adaline_api/models/url_image_content_value.py +96 -0
- adaline_api/models/url_image_content_value_type.py +96 -0
- adaline_api/models/url_media.py +109 -0
- adaline_api/models/url_media_type.py +109 -0
- adaline_api/models/url_pdf_content_value.py +96 -0
- adaline_api/models/url_pdf_content_value_type.py +96 -0
- adaline_api/models/variable.py +96 -0
- adaline_api/models/variable_type.py +96 -0
- adaline_api/models/variable_type_value.py +196 -0
- adaline_api/models/variable_value.py +196 -0
- adaline_api/models/variables_type.py +96 -0
- adaline_api/py.typed +0 -0
- adaline_api/rest.py +213 -0
- adaline_api-1.0.0.dist-info/METADATA +227 -0
- adaline_api-1.0.0.dist-info/RECORD +233 -0
- adaline_api-1.0.0.dist-info/WHEEL +5 -0
- adaline_api-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1221 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Adaline API
|
|
5
|
+
|
|
6
|
+
API for managing Adaline deployments, logs, and core type definitions.
|
|
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
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from adaline_api.models.create_log_span_request import CreateLogSpanRequest
|
|
23
|
+
from adaline_api.models.create_log_span_response import CreateLogSpanResponse
|
|
24
|
+
from adaline_api.models.create_log_trace_request import CreateLogTraceRequest
|
|
25
|
+
from adaline_api.models.create_log_trace_response import CreateLogTraceResponse
|
|
26
|
+
from adaline_api.models.deployment import Deployment
|
|
27
|
+
from adaline_api.models.update_log_trace_request import UpdateLogTraceRequest
|
|
28
|
+
from adaline_api.models.update_log_trace_response import UpdateLogTraceResponse
|
|
29
|
+
|
|
30
|
+
from adaline_api.api_client import ApiClient, RequestSerialized
|
|
31
|
+
from adaline_api.api_response import ApiResponse
|
|
32
|
+
from adaline_api.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
|
+
async def deployments_get(
|
|
50
|
+
self,
|
|
51
|
+
prompt_id: Annotated[StrictStr, Field(description="The unique identifier of the prompt. Required for both specific and latest deployment retrieval.")],
|
|
52
|
+
deployment_id: Annotated[StrictStr, Field(description="The unique identifier of the deployment. Set to 'latest' to retrieve the latest deployment in the given environment.")],
|
|
53
|
+
deployment_environment_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the deployment environment. Required when retrieving the latest deployment (deploymentId=latest).")] = None,
|
|
54
|
+
_request_timeout: Union[
|
|
55
|
+
None,
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Tuple[
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
60
|
+
]
|
|
61
|
+
] = None,
|
|
62
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_content_type: Optional[StrictStr] = None,
|
|
64
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
65
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
66
|
+
) -> Deployment:
|
|
67
|
+
"""Retrieve a specific or latest deployment
|
|
68
|
+
|
|
69
|
+
Retrieve a specific deployed prompt by its promptId and deploymentId, or retrieve the latest deployment in a specific deployment environment.
|
|
70
|
+
|
|
71
|
+
:param prompt_id: The unique identifier of the prompt. Required for both specific and latest deployment retrieval. (required)
|
|
72
|
+
:type prompt_id: str
|
|
73
|
+
:param deployment_id: The unique identifier of the deployment. Set to 'latest' to retrieve the latest deployment in the given environment. (required)
|
|
74
|
+
:type deployment_id: str
|
|
75
|
+
:param deployment_environment_id: The unique identifier of the deployment environment. Required when retrieving the latest deployment (deploymentId=latest).
|
|
76
|
+
:type deployment_environment_id: str
|
|
77
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
78
|
+
number provided, it will be total request
|
|
79
|
+
timeout. It can also be a pair (tuple) of
|
|
80
|
+
(connection, read) timeouts.
|
|
81
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
82
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
83
|
+
request; this effectively ignores the
|
|
84
|
+
authentication in the spec for a single request.
|
|
85
|
+
:type _request_auth: dict, optional
|
|
86
|
+
:param _content_type: force content-type for the request.
|
|
87
|
+
:type _content_type: str, Optional
|
|
88
|
+
:param _headers: set to override the headers for a single
|
|
89
|
+
request; this effectively ignores the headers
|
|
90
|
+
in the spec for a single request.
|
|
91
|
+
:type _headers: dict, optional
|
|
92
|
+
:param _host_index: set to override the host_index for a single
|
|
93
|
+
request; this effectively ignores the host_index
|
|
94
|
+
in the spec for a single request.
|
|
95
|
+
:type _host_index: int, optional
|
|
96
|
+
:return: Returns the result object.
|
|
97
|
+
""" # noqa: E501
|
|
98
|
+
|
|
99
|
+
_param = self._deployments_get_serialize(
|
|
100
|
+
prompt_id=prompt_id,
|
|
101
|
+
deployment_id=deployment_id,
|
|
102
|
+
deployment_environment_id=deployment_environment_id,
|
|
103
|
+
_request_auth=_request_auth,
|
|
104
|
+
_content_type=_content_type,
|
|
105
|
+
_headers=_headers,
|
|
106
|
+
_host_index=_host_index
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
110
|
+
'200': "Deployment",
|
|
111
|
+
'400': "ErrorResponse",
|
|
112
|
+
'401': "ErrorResponse",
|
|
113
|
+
'403': "ErrorResponse",
|
|
114
|
+
'404': "ErrorResponse",
|
|
115
|
+
'500': "ErrorResponse",
|
|
116
|
+
}
|
|
117
|
+
response_data = await self.api_client.call_api(
|
|
118
|
+
*_param,
|
|
119
|
+
_request_timeout=_request_timeout
|
|
120
|
+
)
|
|
121
|
+
await response_data.read()
|
|
122
|
+
return self.api_client.response_deserialize(
|
|
123
|
+
response_data=response_data,
|
|
124
|
+
response_types_map=_response_types_map,
|
|
125
|
+
).data
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
@validate_call
|
|
129
|
+
async def deployments_get_with_http_info(
|
|
130
|
+
self,
|
|
131
|
+
prompt_id: Annotated[StrictStr, Field(description="The unique identifier of the prompt. Required for both specific and latest deployment retrieval.")],
|
|
132
|
+
deployment_id: Annotated[StrictStr, Field(description="The unique identifier of the deployment. Set to 'latest' to retrieve the latest deployment in the given environment.")],
|
|
133
|
+
deployment_environment_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the deployment environment. Required when retrieving the latest deployment (deploymentId=latest).")] = None,
|
|
134
|
+
_request_timeout: Union[
|
|
135
|
+
None,
|
|
136
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
137
|
+
Tuple[
|
|
138
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
139
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
140
|
+
]
|
|
141
|
+
] = None,
|
|
142
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
143
|
+
_content_type: Optional[StrictStr] = None,
|
|
144
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
145
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
146
|
+
) -> ApiResponse[Deployment]:
|
|
147
|
+
"""Retrieve a specific or latest deployment
|
|
148
|
+
|
|
149
|
+
Retrieve a specific deployed prompt by its promptId and deploymentId, or retrieve the latest deployment in a specific deployment environment.
|
|
150
|
+
|
|
151
|
+
:param prompt_id: The unique identifier of the prompt. Required for both specific and latest deployment retrieval. (required)
|
|
152
|
+
:type prompt_id: str
|
|
153
|
+
:param deployment_id: The unique identifier of the deployment. Set to 'latest' to retrieve the latest deployment in the given environment. (required)
|
|
154
|
+
:type deployment_id: str
|
|
155
|
+
:param deployment_environment_id: The unique identifier of the deployment environment. Required when retrieving the latest deployment (deploymentId=latest).
|
|
156
|
+
:type deployment_environment_id: str
|
|
157
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
158
|
+
number provided, it will be total request
|
|
159
|
+
timeout. It can also be a pair (tuple) of
|
|
160
|
+
(connection, read) timeouts.
|
|
161
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
162
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
163
|
+
request; this effectively ignores the
|
|
164
|
+
authentication in the spec for a single request.
|
|
165
|
+
:type _request_auth: dict, optional
|
|
166
|
+
:param _content_type: force content-type for the request.
|
|
167
|
+
:type _content_type: str, Optional
|
|
168
|
+
:param _headers: set to override the headers for a single
|
|
169
|
+
request; this effectively ignores the headers
|
|
170
|
+
in the spec for a single request.
|
|
171
|
+
:type _headers: dict, optional
|
|
172
|
+
:param _host_index: set to override the host_index for a single
|
|
173
|
+
request; this effectively ignores the host_index
|
|
174
|
+
in the spec for a single request.
|
|
175
|
+
:type _host_index: int, optional
|
|
176
|
+
:return: Returns the result object.
|
|
177
|
+
""" # noqa: E501
|
|
178
|
+
|
|
179
|
+
_param = self._deployments_get_serialize(
|
|
180
|
+
prompt_id=prompt_id,
|
|
181
|
+
deployment_id=deployment_id,
|
|
182
|
+
deployment_environment_id=deployment_environment_id,
|
|
183
|
+
_request_auth=_request_auth,
|
|
184
|
+
_content_type=_content_type,
|
|
185
|
+
_headers=_headers,
|
|
186
|
+
_host_index=_host_index
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
190
|
+
'200': "Deployment",
|
|
191
|
+
'400': "ErrorResponse",
|
|
192
|
+
'401': "ErrorResponse",
|
|
193
|
+
'403': "ErrorResponse",
|
|
194
|
+
'404': "ErrorResponse",
|
|
195
|
+
'500': "ErrorResponse",
|
|
196
|
+
}
|
|
197
|
+
response_data = await self.api_client.call_api(
|
|
198
|
+
*_param,
|
|
199
|
+
_request_timeout=_request_timeout
|
|
200
|
+
)
|
|
201
|
+
await response_data.read()
|
|
202
|
+
return self.api_client.response_deserialize(
|
|
203
|
+
response_data=response_data,
|
|
204
|
+
response_types_map=_response_types_map,
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
@validate_call
|
|
209
|
+
async def deployments_get_without_preload_content(
|
|
210
|
+
self,
|
|
211
|
+
prompt_id: Annotated[StrictStr, Field(description="The unique identifier of the prompt. Required for both specific and latest deployment retrieval.")],
|
|
212
|
+
deployment_id: Annotated[StrictStr, Field(description="The unique identifier of the deployment. Set to 'latest' to retrieve the latest deployment in the given environment.")],
|
|
213
|
+
deployment_environment_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the deployment environment. Required when retrieving the latest deployment (deploymentId=latest).")] = None,
|
|
214
|
+
_request_timeout: Union[
|
|
215
|
+
None,
|
|
216
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
217
|
+
Tuple[
|
|
218
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
219
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
220
|
+
]
|
|
221
|
+
] = None,
|
|
222
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
223
|
+
_content_type: Optional[StrictStr] = None,
|
|
224
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
225
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
226
|
+
) -> RESTResponseType:
|
|
227
|
+
"""Retrieve a specific or latest deployment
|
|
228
|
+
|
|
229
|
+
Retrieve a specific deployed prompt by its promptId and deploymentId, or retrieve the latest deployment in a specific deployment environment.
|
|
230
|
+
|
|
231
|
+
:param prompt_id: The unique identifier of the prompt. Required for both specific and latest deployment retrieval. (required)
|
|
232
|
+
:type prompt_id: str
|
|
233
|
+
:param deployment_id: The unique identifier of the deployment. Set to 'latest' to retrieve the latest deployment in the given environment. (required)
|
|
234
|
+
:type deployment_id: str
|
|
235
|
+
:param deployment_environment_id: The unique identifier of the deployment environment. Required when retrieving the latest deployment (deploymentId=latest).
|
|
236
|
+
:type deployment_environment_id: str
|
|
237
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
238
|
+
number provided, it will be total request
|
|
239
|
+
timeout. It can also be a pair (tuple) of
|
|
240
|
+
(connection, read) timeouts.
|
|
241
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
242
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
243
|
+
request; this effectively ignores the
|
|
244
|
+
authentication in the spec for a single request.
|
|
245
|
+
:type _request_auth: dict, optional
|
|
246
|
+
:param _content_type: force content-type for the request.
|
|
247
|
+
:type _content_type: str, Optional
|
|
248
|
+
:param _headers: set to override the headers for a single
|
|
249
|
+
request; this effectively ignores the headers
|
|
250
|
+
in the spec for a single request.
|
|
251
|
+
:type _headers: dict, optional
|
|
252
|
+
:param _host_index: set to override the host_index for a single
|
|
253
|
+
request; this effectively ignores the host_index
|
|
254
|
+
in the spec for a single request.
|
|
255
|
+
:type _host_index: int, optional
|
|
256
|
+
:return: Returns the result object.
|
|
257
|
+
""" # noqa: E501
|
|
258
|
+
|
|
259
|
+
_param = self._deployments_get_serialize(
|
|
260
|
+
prompt_id=prompt_id,
|
|
261
|
+
deployment_id=deployment_id,
|
|
262
|
+
deployment_environment_id=deployment_environment_id,
|
|
263
|
+
_request_auth=_request_auth,
|
|
264
|
+
_content_type=_content_type,
|
|
265
|
+
_headers=_headers,
|
|
266
|
+
_host_index=_host_index
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
270
|
+
'200': "Deployment",
|
|
271
|
+
'400': "ErrorResponse",
|
|
272
|
+
'401': "ErrorResponse",
|
|
273
|
+
'403': "ErrorResponse",
|
|
274
|
+
'404': "ErrorResponse",
|
|
275
|
+
'500': "ErrorResponse",
|
|
276
|
+
}
|
|
277
|
+
response_data = await self.api_client.call_api(
|
|
278
|
+
*_param,
|
|
279
|
+
_request_timeout=_request_timeout
|
|
280
|
+
)
|
|
281
|
+
return response_data.response
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
def _deployments_get_serialize(
|
|
285
|
+
self,
|
|
286
|
+
prompt_id,
|
|
287
|
+
deployment_id,
|
|
288
|
+
deployment_environment_id,
|
|
289
|
+
_request_auth,
|
|
290
|
+
_content_type,
|
|
291
|
+
_headers,
|
|
292
|
+
_host_index,
|
|
293
|
+
) -> RequestSerialized:
|
|
294
|
+
|
|
295
|
+
_host = None
|
|
296
|
+
|
|
297
|
+
_collection_formats: Dict[str, str] = {
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
_path_params: Dict[str, str] = {}
|
|
301
|
+
_query_params: List[Tuple[str, str]] = []
|
|
302
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
303
|
+
_form_params: List[Tuple[str, str]] = []
|
|
304
|
+
_files: Dict[
|
|
305
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
306
|
+
] = {}
|
|
307
|
+
_body_params: Optional[bytes] = None
|
|
308
|
+
|
|
309
|
+
# process the path parameters
|
|
310
|
+
# process the query parameters
|
|
311
|
+
if prompt_id is not None:
|
|
312
|
+
|
|
313
|
+
_query_params.append(('promptId', prompt_id))
|
|
314
|
+
|
|
315
|
+
if deployment_id is not None:
|
|
316
|
+
|
|
317
|
+
_query_params.append(('deploymentId', deployment_id))
|
|
318
|
+
|
|
319
|
+
if deployment_environment_id is not None:
|
|
320
|
+
|
|
321
|
+
_query_params.append(('deploymentEnvironmentId', deployment_environment_id))
|
|
322
|
+
|
|
323
|
+
# process the header parameters
|
|
324
|
+
# process the form parameters
|
|
325
|
+
# process the body parameter
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
# set the HTTP header `Accept`
|
|
329
|
+
if 'Accept' not in _header_params:
|
|
330
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
331
|
+
[
|
|
332
|
+
'application/json'
|
|
333
|
+
]
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
# authentication setting
|
|
338
|
+
_auth_settings: List[str] = [
|
|
339
|
+
'bearerAuth'
|
|
340
|
+
]
|
|
341
|
+
|
|
342
|
+
return self.api_client.param_serialize(
|
|
343
|
+
method='GET',
|
|
344
|
+
resource_path='/deployments',
|
|
345
|
+
path_params=_path_params,
|
|
346
|
+
query_params=_query_params,
|
|
347
|
+
header_params=_header_params,
|
|
348
|
+
body=_body_params,
|
|
349
|
+
post_params=_form_params,
|
|
350
|
+
files=_files,
|
|
351
|
+
auth_settings=_auth_settings,
|
|
352
|
+
collection_formats=_collection_formats,
|
|
353
|
+
_host=_host,
|
|
354
|
+
_request_auth=_request_auth
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
@validate_call
|
|
361
|
+
async def logs_span_post(
|
|
362
|
+
self,
|
|
363
|
+
create_log_span_request: CreateLogSpanRequest,
|
|
364
|
+
_request_timeout: Union[
|
|
365
|
+
None,
|
|
366
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
367
|
+
Tuple[
|
|
368
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
369
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
370
|
+
]
|
|
371
|
+
] = None,
|
|
372
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
373
|
+
_content_type: Optional[StrictStr] = None,
|
|
374
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
375
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
376
|
+
) -> CreateLogSpanResponse:
|
|
377
|
+
"""Create span log
|
|
378
|
+
|
|
379
|
+
Log individual spans within traces.
|
|
380
|
+
|
|
381
|
+
:param create_log_span_request: (required)
|
|
382
|
+
:type create_log_span_request: CreateLogSpanRequest
|
|
383
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
384
|
+
number provided, it will be total request
|
|
385
|
+
timeout. It can also be a pair (tuple) of
|
|
386
|
+
(connection, read) timeouts.
|
|
387
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
388
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
389
|
+
request; this effectively ignores the
|
|
390
|
+
authentication in the spec for a single request.
|
|
391
|
+
:type _request_auth: dict, optional
|
|
392
|
+
:param _content_type: force content-type for the request.
|
|
393
|
+
:type _content_type: str, Optional
|
|
394
|
+
:param _headers: set to override the headers for a single
|
|
395
|
+
request; this effectively ignores the headers
|
|
396
|
+
in the spec for a single request.
|
|
397
|
+
:type _headers: dict, optional
|
|
398
|
+
:param _host_index: set to override the host_index for a single
|
|
399
|
+
request; this effectively ignores the host_index
|
|
400
|
+
in the spec for a single request.
|
|
401
|
+
:type _host_index: int, optional
|
|
402
|
+
:return: Returns the result object.
|
|
403
|
+
""" # noqa: E501
|
|
404
|
+
|
|
405
|
+
_param = self._logs_span_post_serialize(
|
|
406
|
+
create_log_span_request=create_log_span_request,
|
|
407
|
+
_request_auth=_request_auth,
|
|
408
|
+
_content_type=_content_type,
|
|
409
|
+
_headers=_headers,
|
|
410
|
+
_host_index=_host_index
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
414
|
+
'200': "CreateLogSpanResponse",
|
|
415
|
+
'400': "ErrorResponse",
|
|
416
|
+
'401': "ErrorResponse",
|
|
417
|
+
'403': "ErrorResponse",
|
|
418
|
+
'413': "ErrorResponse",
|
|
419
|
+
'500': "ErrorResponse",
|
|
420
|
+
}
|
|
421
|
+
response_data = await self.api_client.call_api(
|
|
422
|
+
*_param,
|
|
423
|
+
_request_timeout=_request_timeout
|
|
424
|
+
)
|
|
425
|
+
await response_data.read()
|
|
426
|
+
return self.api_client.response_deserialize(
|
|
427
|
+
response_data=response_data,
|
|
428
|
+
response_types_map=_response_types_map,
|
|
429
|
+
).data
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
@validate_call
|
|
433
|
+
async def logs_span_post_with_http_info(
|
|
434
|
+
self,
|
|
435
|
+
create_log_span_request: CreateLogSpanRequest,
|
|
436
|
+
_request_timeout: Union[
|
|
437
|
+
None,
|
|
438
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
439
|
+
Tuple[
|
|
440
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
441
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
442
|
+
]
|
|
443
|
+
] = None,
|
|
444
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
445
|
+
_content_type: Optional[StrictStr] = None,
|
|
446
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
447
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
448
|
+
) -> ApiResponse[CreateLogSpanResponse]:
|
|
449
|
+
"""Create span log
|
|
450
|
+
|
|
451
|
+
Log individual spans within traces.
|
|
452
|
+
|
|
453
|
+
:param create_log_span_request: (required)
|
|
454
|
+
:type create_log_span_request: CreateLogSpanRequest
|
|
455
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
456
|
+
number provided, it will be total request
|
|
457
|
+
timeout. It can also be a pair (tuple) of
|
|
458
|
+
(connection, read) timeouts.
|
|
459
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
460
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
461
|
+
request; this effectively ignores the
|
|
462
|
+
authentication in the spec for a single request.
|
|
463
|
+
:type _request_auth: dict, optional
|
|
464
|
+
:param _content_type: force content-type for the request.
|
|
465
|
+
:type _content_type: str, Optional
|
|
466
|
+
:param _headers: set to override the headers for a single
|
|
467
|
+
request; this effectively ignores the headers
|
|
468
|
+
in the spec for a single request.
|
|
469
|
+
:type _headers: dict, optional
|
|
470
|
+
:param _host_index: set to override the host_index for a single
|
|
471
|
+
request; this effectively ignores the host_index
|
|
472
|
+
in the spec for a single request.
|
|
473
|
+
:type _host_index: int, optional
|
|
474
|
+
:return: Returns the result object.
|
|
475
|
+
""" # noqa: E501
|
|
476
|
+
|
|
477
|
+
_param = self._logs_span_post_serialize(
|
|
478
|
+
create_log_span_request=create_log_span_request,
|
|
479
|
+
_request_auth=_request_auth,
|
|
480
|
+
_content_type=_content_type,
|
|
481
|
+
_headers=_headers,
|
|
482
|
+
_host_index=_host_index
|
|
483
|
+
)
|
|
484
|
+
|
|
485
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
486
|
+
'200': "CreateLogSpanResponse",
|
|
487
|
+
'400': "ErrorResponse",
|
|
488
|
+
'401': "ErrorResponse",
|
|
489
|
+
'403': "ErrorResponse",
|
|
490
|
+
'413': "ErrorResponse",
|
|
491
|
+
'500': "ErrorResponse",
|
|
492
|
+
}
|
|
493
|
+
response_data = await self.api_client.call_api(
|
|
494
|
+
*_param,
|
|
495
|
+
_request_timeout=_request_timeout
|
|
496
|
+
)
|
|
497
|
+
await response_data.read()
|
|
498
|
+
return self.api_client.response_deserialize(
|
|
499
|
+
response_data=response_data,
|
|
500
|
+
response_types_map=_response_types_map,
|
|
501
|
+
)
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
@validate_call
|
|
505
|
+
async def logs_span_post_without_preload_content(
|
|
506
|
+
self,
|
|
507
|
+
create_log_span_request: CreateLogSpanRequest,
|
|
508
|
+
_request_timeout: Union[
|
|
509
|
+
None,
|
|
510
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
511
|
+
Tuple[
|
|
512
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
513
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
514
|
+
]
|
|
515
|
+
] = None,
|
|
516
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
517
|
+
_content_type: Optional[StrictStr] = None,
|
|
518
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
519
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
520
|
+
) -> RESTResponseType:
|
|
521
|
+
"""Create span log
|
|
522
|
+
|
|
523
|
+
Log individual spans within traces.
|
|
524
|
+
|
|
525
|
+
:param create_log_span_request: (required)
|
|
526
|
+
:type create_log_span_request: CreateLogSpanRequest
|
|
527
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
528
|
+
number provided, it will be total request
|
|
529
|
+
timeout. It can also be a pair (tuple) of
|
|
530
|
+
(connection, read) timeouts.
|
|
531
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
532
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
533
|
+
request; this effectively ignores the
|
|
534
|
+
authentication in the spec for a single request.
|
|
535
|
+
:type _request_auth: dict, optional
|
|
536
|
+
:param _content_type: force content-type for the request.
|
|
537
|
+
:type _content_type: str, Optional
|
|
538
|
+
:param _headers: set to override the headers for a single
|
|
539
|
+
request; this effectively ignores the headers
|
|
540
|
+
in the spec for a single request.
|
|
541
|
+
:type _headers: dict, optional
|
|
542
|
+
:param _host_index: set to override the host_index for a single
|
|
543
|
+
request; this effectively ignores the host_index
|
|
544
|
+
in the spec for a single request.
|
|
545
|
+
:type _host_index: int, optional
|
|
546
|
+
:return: Returns the result object.
|
|
547
|
+
""" # noqa: E501
|
|
548
|
+
|
|
549
|
+
_param = self._logs_span_post_serialize(
|
|
550
|
+
create_log_span_request=create_log_span_request,
|
|
551
|
+
_request_auth=_request_auth,
|
|
552
|
+
_content_type=_content_type,
|
|
553
|
+
_headers=_headers,
|
|
554
|
+
_host_index=_host_index
|
|
555
|
+
)
|
|
556
|
+
|
|
557
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
558
|
+
'200': "CreateLogSpanResponse",
|
|
559
|
+
'400': "ErrorResponse",
|
|
560
|
+
'401': "ErrorResponse",
|
|
561
|
+
'403': "ErrorResponse",
|
|
562
|
+
'413': "ErrorResponse",
|
|
563
|
+
'500': "ErrorResponse",
|
|
564
|
+
}
|
|
565
|
+
response_data = await self.api_client.call_api(
|
|
566
|
+
*_param,
|
|
567
|
+
_request_timeout=_request_timeout
|
|
568
|
+
)
|
|
569
|
+
return response_data.response
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
def _logs_span_post_serialize(
|
|
573
|
+
self,
|
|
574
|
+
create_log_span_request,
|
|
575
|
+
_request_auth,
|
|
576
|
+
_content_type,
|
|
577
|
+
_headers,
|
|
578
|
+
_host_index,
|
|
579
|
+
) -> RequestSerialized:
|
|
580
|
+
|
|
581
|
+
_host = None
|
|
582
|
+
|
|
583
|
+
_collection_formats: Dict[str, str] = {
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
_path_params: Dict[str, str] = {}
|
|
587
|
+
_query_params: List[Tuple[str, str]] = []
|
|
588
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
589
|
+
_form_params: List[Tuple[str, str]] = []
|
|
590
|
+
_files: Dict[
|
|
591
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
592
|
+
] = {}
|
|
593
|
+
_body_params: Optional[bytes] = None
|
|
594
|
+
|
|
595
|
+
# process the path parameters
|
|
596
|
+
# process the query parameters
|
|
597
|
+
# process the header parameters
|
|
598
|
+
# process the form parameters
|
|
599
|
+
# process the body parameter
|
|
600
|
+
if create_log_span_request is not None:
|
|
601
|
+
_body_params = create_log_span_request
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
# set the HTTP header `Accept`
|
|
605
|
+
if 'Accept' not in _header_params:
|
|
606
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
607
|
+
[
|
|
608
|
+
'application/json'
|
|
609
|
+
]
|
|
610
|
+
)
|
|
611
|
+
|
|
612
|
+
# set the HTTP header `Content-Type`
|
|
613
|
+
if _content_type:
|
|
614
|
+
_header_params['Content-Type'] = _content_type
|
|
615
|
+
else:
|
|
616
|
+
_default_content_type = (
|
|
617
|
+
self.api_client.select_header_content_type(
|
|
618
|
+
[
|
|
619
|
+
'application/json'
|
|
620
|
+
]
|
|
621
|
+
)
|
|
622
|
+
)
|
|
623
|
+
if _default_content_type is not None:
|
|
624
|
+
_header_params['Content-Type'] = _default_content_type
|
|
625
|
+
|
|
626
|
+
# authentication setting
|
|
627
|
+
_auth_settings: List[str] = [
|
|
628
|
+
'bearerAuth'
|
|
629
|
+
]
|
|
630
|
+
|
|
631
|
+
return self.api_client.param_serialize(
|
|
632
|
+
method='POST',
|
|
633
|
+
resource_path='/logs/span',
|
|
634
|
+
path_params=_path_params,
|
|
635
|
+
query_params=_query_params,
|
|
636
|
+
header_params=_header_params,
|
|
637
|
+
body=_body_params,
|
|
638
|
+
post_params=_form_params,
|
|
639
|
+
files=_files,
|
|
640
|
+
auth_settings=_auth_settings,
|
|
641
|
+
collection_formats=_collection_formats,
|
|
642
|
+
_host=_host,
|
|
643
|
+
_request_auth=_request_auth
|
|
644
|
+
)
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
@validate_call
|
|
650
|
+
async def logs_trace_patch(
|
|
651
|
+
self,
|
|
652
|
+
update_log_trace_request: UpdateLogTraceRequest,
|
|
653
|
+
_request_timeout: Union[
|
|
654
|
+
None,
|
|
655
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
656
|
+
Tuple[
|
|
657
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
658
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
659
|
+
]
|
|
660
|
+
] = None,
|
|
661
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
662
|
+
_content_type: Optional[StrictStr] = None,
|
|
663
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
664
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
665
|
+
) -> UpdateLogTraceResponse:
|
|
666
|
+
"""Update trace log
|
|
667
|
+
|
|
668
|
+
Update existing trace information.
|
|
669
|
+
|
|
670
|
+
:param update_log_trace_request: (required)
|
|
671
|
+
:type update_log_trace_request: UpdateLogTraceRequest
|
|
672
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
673
|
+
number provided, it will be total request
|
|
674
|
+
timeout. It can also be a pair (tuple) of
|
|
675
|
+
(connection, read) timeouts.
|
|
676
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
677
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
678
|
+
request; this effectively ignores the
|
|
679
|
+
authentication in the spec for a single request.
|
|
680
|
+
:type _request_auth: dict, optional
|
|
681
|
+
:param _content_type: force content-type for the request.
|
|
682
|
+
:type _content_type: str, Optional
|
|
683
|
+
:param _headers: set to override the headers for a single
|
|
684
|
+
request; this effectively ignores the headers
|
|
685
|
+
in the spec for a single request.
|
|
686
|
+
:type _headers: dict, optional
|
|
687
|
+
:param _host_index: set to override the host_index for a single
|
|
688
|
+
request; this effectively ignores the host_index
|
|
689
|
+
in the spec for a single request.
|
|
690
|
+
:type _host_index: int, optional
|
|
691
|
+
:return: Returns the result object.
|
|
692
|
+
""" # noqa: E501
|
|
693
|
+
|
|
694
|
+
_param = self._logs_trace_patch_serialize(
|
|
695
|
+
update_log_trace_request=update_log_trace_request,
|
|
696
|
+
_request_auth=_request_auth,
|
|
697
|
+
_content_type=_content_type,
|
|
698
|
+
_headers=_headers,
|
|
699
|
+
_host_index=_host_index
|
|
700
|
+
)
|
|
701
|
+
|
|
702
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
703
|
+
'200': "UpdateLogTraceResponse",
|
|
704
|
+
'400': "ErrorResponse",
|
|
705
|
+
'401': "ErrorResponse",
|
|
706
|
+
'403': "ErrorResponse",
|
|
707
|
+
'413': "ErrorResponse",
|
|
708
|
+
'500': "ErrorResponse",
|
|
709
|
+
}
|
|
710
|
+
response_data = await self.api_client.call_api(
|
|
711
|
+
*_param,
|
|
712
|
+
_request_timeout=_request_timeout
|
|
713
|
+
)
|
|
714
|
+
await response_data.read()
|
|
715
|
+
return self.api_client.response_deserialize(
|
|
716
|
+
response_data=response_data,
|
|
717
|
+
response_types_map=_response_types_map,
|
|
718
|
+
).data
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
@validate_call
|
|
722
|
+
async def logs_trace_patch_with_http_info(
|
|
723
|
+
self,
|
|
724
|
+
update_log_trace_request: UpdateLogTraceRequest,
|
|
725
|
+
_request_timeout: Union[
|
|
726
|
+
None,
|
|
727
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
728
|
+
Tuple[
|
|
729
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
730
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
731
|
+
]
|
|
732
|
+
] = None,
|
|
733
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
734
|
+
_content_type: Optional[StrictStr] = None,
|
|
735
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
736
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
737
|
+
) -> ApiResponse[UpdateLogTraceResponse]:
|
|
738
|
+
"""Update trace log
|
|
739
|
+
|
|
740
|
+
Update existing trace information.
|
|
741
|
+
|
|
742
|
+
:param update_log_trace_request: (required)
|
|
743
|
+
:type update_log_trace_request: UpdateLogTraceRequest
|
|
744
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
745
|
+
number provided, it will be total request
|
|
746
|
+
timeout. It can also be a pair (tuple) of
|
|
747
|
+
(connection, read) timeouts.
|
|
748
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
749
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
750
|
+
request; this effectively ignores the
|
|
751
|
+
authentication in the spec for a single request.
|
|
752
|
+
:type _request_auth: dict, optional
|
|
753
|
+
:param _content_type: force content-type for the request.
|
|
754
|
+
:type _content_type: str, Optional
|
|
755
|
+
:param _headers: set to override the headers for a single
|
|
756
|
+
request; this effectively ignores the headers
|
|
757
|
+
in the spec for a single request.
|
|
758
|
+
:type _headers: dict, optional
|
|
759
|
+
:param _host_index: set to override the host_index for a single
|
|
760
|
+
request; this effectively ignores the host_index
|
|
761
|
+
in the spec for a single request.
|
|
762
|
+
:type _host_index: int, optional
|
|
763
|
+
:return: Returns the result object.
|
|
764
|
+
""" # noqa: E501
|
|
765
|
+
|
|
766
|
+
_param = self._logs_trace_patch_serialize(
|
|
767
|
+
update_log_trace_request=update_log_trace_request,
|
|
768
|
+
_request_auth=_request_auth,
|
|
769
|
+
_content_type=_content_type,
|
|
770
|
+
_headers=_headers,
|
|
771
|
+
_host_index=_host_index
|
|
772
|
+
)
|
|
773
|
+
|
|
774
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
775
|
+
'200': "UpdateLogTraceResponse",
|
|
776
|
+
'400': "ErrorResponse",
|
|
777
|
+
'401': "ErrorResponse",
|
|
778
|
+
'403': "ErrorResponse",
|
|
779
|
+
'413': "ErrorResponse",
|
|
780
|
+
'500': "ErrorResponse",
|
|
781
|
+
}
|
|
782
|
+
response_data = await self.api_client.call_api(
|
|
783
|
+
*_param,
|
|
784
|
+
_request_timeout=_request_timeout
|
|
785
|
+
)
|
|
786
|
+
await response_data.read()
|
|
787
|
+
return self.api_client.response_deserialize(
|
|
788
|
+
response_data=response_data,
|
|
789
|
+
response_types_map=_response_types_map,
|
|
790
|
+
)
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
@validate_call
|
|
794
|
+
async def logs_trace_patch_without_preload_content(
|
|
795
|
+
self,
|
|
796
|
+
update_log_trace_request: UpdateLogTraceRequest,
|
|
797
|
+
_request_timeout: Union[
|
|
798
|
+
None,
|
|
799
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
800
|
+
Tuple[
|
|
801
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
802
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
803
|
+
]
|
|
804
|
+
] = None,
|
|
805
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
806
|
+
_content_type: Optional[StrictStr] = None,
|
|
807
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
808
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
809
|
+
) -> RESTResponseType:
|
|
810
|
+
"""Update trace log
|
|
811
|
+
|
|
812
|
+
Update existing trace information.
|
|
813
|
+
|
|
814
|
+
:param update_log_trace_request: (required)
|
|
815
|
+
:type update_log_trace_request: UpdateLogTraceRequest
|
|
816
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
817
|
+
number provided, it will be total request
|
|
818
|
+
timeout. It can also be a pair (tuple) of
|
|
819
|
+
(connection, read) timeouts.
|
|
820
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
821
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
822
|
+
request; this effectively ignores the
|
|
823
|
+
authentication in the spec for a single request.
|
|
824
|
+
:type _request_auth: dict, optional
|
|
825
|
+
:param _content_type: force content-type for the request.
|
|
826
|
+
:type _content_type: str, Optional
|
|
827
|
+
:param _headers: set to override the headers for a single
|
|
828
|
+
request; this effectively ignores the headers
|
|
829
|
+
in the spec for a single request.
|
|
830
|
+
:type _headers: dict, optional
|
|
831
|
+
:param _host_index: set to override the host_index for a single
|
|
832
|
+
request; this effectively ignores the host_index
|
|
833
|
+
in the spec for a single request.
|
|
834
|
+
:type _host_index: int, optional
|
|
835
|
+
:return: Returns the result object.
|
|
836
|
+
""" # noqa: E501
|
|
837
|
+
|
|
838
|
+
_param = self._logs_trace_patch_serialize(
|
|
839
|
+
update_log_trace_request=update_log_trace_request,
|
|
840
|
+
_request_auth=_request_auth,
|
|
841
|
+
_content_type=_content_type,
|
|
842
|
+
_headers=_headers,
|
|
843
|
+
_host_index=_host_index
|
|
844
|
+
)
|
|
845
|
+
|
|
846
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
847
|
+
'200': "UpdateLogTraceResponse",
|
|
848
|
+
'400': "ErrorResponse",
|
|
849
|
+
'401': "ErrorResponse",
|
|
850
|
+
'403': "ErrorResponse",
|
|
851
|
+
'413': "ErrorResponse",
|
|
852
|
+
'500': "ErrorResponse",
|
|
853
|
+
}
|
|
854
|
+
response_data = await self.api_client.call_api(
|
|
855
|
+
*_param,
|
|
856
|
+
_request_timeout=_request_timeout
|
|
857
|
+
)
|
|
858
|
+
return response_data.response
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
def _logs_trace_patch_serialize(
|
|
862
|
+
self,
|
|
863
|
+
update_log_trace_request,
|
|
864
|
+
_request_auth,
|
|
865
|
+
_content_type,
|
|
866
|
+
_headers,
|
|
867
|
+
_host_index,
|
|
868
|
+
) -> RequestSerialized:
|
|
869
|
+
|
|
870
|
+
_host = None
|
|
871
|
+
|
|
872
|
+
_collection_formats: Dict[str, str] = {
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
_path_params: Dict[str, str] = {}
|
|
876
|
+
_query_params: List[Tuple[str, str]] = []
|
|
877
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
878
|
+
_form_params: List[Tuple[str, str]] = []
|
|
879
|
+
_files: Dict[
|
|
880
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
881
|
+
] = {}
|
|
882
|
+
_body_params: Optional[bytes] = None
|
|
883
|
+
|
|
884
|
+
# process the path parameters
|
|
885
|
+
# process the query parameters
|
|
886
|
+
# process the header parameters
|
|
887
|
+
# process the form parameters
|
|
888
|
+
# process the body parameter
|
|
889
|
+
if update_log_trace_request is not None:
|
|
890
|
+
_body_params = update_log_trace_request
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
# set the HTTP header `Accept`
|
|
894
|
+
if 'Accept' not in _header_params:
|
|
895
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
896
|
+
[
|
|
897
|
+
'application/json'
|
|
898
|
+
]
|
|
899
|
+
)
|
|
900
|
+
|
|
901
|
+
# set the HTTP header `Content-Type`
|
|
902
|
+
if _content_type:
|
|
903
|
+
_header_params['Content-Type'] = _content_type
|
|
904
|
+
else:
|
|
905
|
+
_default_content_type = (
|
|
906
|
+
self.api_client.select_header_content_type(
|
|
907
|
+
[
|
|
908
|
+
'application/json'
|
|
909
|
+
]
|
|
910
|
+
)
|
|
911
|
+
)
|
|
912
|
+
if _default_content_type is not None:
|
|
913
|
+
_header_params['Content-Type'] = _default_content_type
|
|
914
|
+
|
|
915
|
+
# authentication setting
|
|
916
|
+
_auth_settings: List[str] = [
|
|
917
|
+
'bearerAuth'
|
|
918
|
+
]
|
|
919
|
+
|
|
920
|
+
return self.api_client.param_serialize(
|
|
921
|
+
method='PATCH',
|
|
922
|
+
resource_path='/logs/trace',
|
|
923
|
+
path_params=_path_params,
|
|
924
|
+
query_params=_query_params,
|
|
925
|
+
header_params=_header_params,
|
|
926
|
+
body=_body_params,
|
|
927
|
+
post_params=_form_params,
|
|
928
|
+
files=_files,
|
|
929
|
+
auth_settings=_auth_settings,
|
|
930
|
+
collection_formats=_collection_formats,
|
|
931
|
+
_host=_host,
|
|
932
|
+
_request_auth=_request_auth
|
|
933
|
+
)
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
@validate_call
|
|
939
|
+
async def logs_trace_post(
|
|
940
|
+
self,
|
|
941
|
+
create_log_trace_request: CreateLogTraceRequest,
|
|
942
|
+
_request_timeout: Union[
|
|
943
|
+
None,
|
|
944
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
945
|
+
Tuple[
|
|
946
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
947
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
948
|
+
]
|
|
949
|
+
] = None,
|
|
950
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
951
|
+
_content_type: Optional[StrictStr] = None,
|
|
952
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
953
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
954
|
+
) -> CreateLogTraceResponse:
|
|
955
|
+
"""Create trace log
|
|
956
|
+
|
|
957
|
+
Create detailed execution traces for monitoring.
|
|
958
|
+
|
|
959
|
+
:param create_log_trace_request: (required)
|
|
960
|
+
:type create_log_trace_request: CreateLogTraceRequest
|
|
961
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
962
|
+
number provided, it will be total request
|
|
963
|
+
timeout. It can also be a pair (tuple) of
|
|
964
|
+
(connection, read) timeouts.
|
|
965
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
966
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
967
|
+
request; this effectively ignores the
|
|
968
|
+
authentication in the spec for a single request.
|
|
969
|
+
:type _request_auth: dict, optional
|
|
970
|
+
:param _content_type: force content-type for the request.
|
|
971
|
+
:type _content_type: str, Optional
|
|
972
|
+
:param _headers: set to override the headers for a single
|
|
973
|
+
request; this effectively ignores the headers
|
|
974
|
+
in the spec for a single request.
|
|
975
|
+
:type _headers: dict, optional
|
|
976
|
+
:param _host_index: set to override the host_index for a single
|
|
977
|
+
request; this effectively ignores the host_index
|
|
978
|
+
in the spec for a single request.
|
|
979
|
+
:type _host_index: int, optional
|
|
980
|
+
:return: Returns the result object.
|
|
981
|
+
""" # noqa: E501
|
|
982
|
+
|
|
983
|
+
_param = self._logs_trace_post_serialize(
|
|
984
|
+
create_log_trace_request=create_log_trace_request,
|
|
985
|
+
_request_auth=_request_auth,
|
|
986
|
+
_content_type=_content_type,
|
|
987
|
+
_headers=_headers,
|
|
988
|
+
_host_index=_host_index
|
|
989
|
+
)
|
|
990
|
+
|
|
991
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
992
|
+
'200': "CreateLogTraceResponse",
|
|
993
|
+
'400': "ErrorResponse",
|
|
994
|
+
'403': "ErrorResponse",
|
|
995
|
+
'413': "ErrorResponse",
|
|
996
|
+
'500': "ErrorResponse",
|
|
997
|
+
}
|
|
998
|
+
response_data = await self.api_client.call_api(
|
|
999
|
+
*_param,
|
|
1000
|
+
_request_timeout=_request_timeout
|
|
1001
|
+
)
|
|
1002
|
+
await response_data.read()
|
|
1003
|
+
return self.api_client.response_deserialize(
|
|
1004
|
+
response_data=response_data,
|
|
1005
|
+
response_types_map=_response_types_map,
|
|
1006
|
+
).data
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
@validate_call
|
|
1010
|
+
async def logs_trace_post_with_http_info(
|
|
1011
|
+
self,
|
|
1012
|
+
create_log_trace_request: CreateLogTraceRequest,
|
|
1013
|
+
_request_timeout: Union[
|
|
1014
|
+
None,
|
|
1015
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1016
|
+
Tuple[
|
|
1017
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1018
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1019
|
+
]
|
|
1020
|
+
] = None,
|
|
1021
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1022
|
+
_content_type: Optional[StrictStr] = None,
|
|
1023
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1024
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1025
|
+
) -> ApiResponse[CreateLogTraceResponse]:
|
|
1026
|
+
"""Create trace log
|
|
1027
|
+
|
|
1028
|
+
Create detailed execution traces for monitoring.
|
|
1029
|
+
|
|
1030
|
+
:param create_log_trace_request: (required)
|
|
1031
|
+
:type create_log_trace_request: CreateLogTraceRequest
|
|
1032
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1033
|
+
number provided, it will be total request
|
|
1034
|
+
timeout. It can also be a pair (tuple) of
|
|
1035
|
+
(connection, read) timeouts.
|
|
1036
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1037
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1038
|
+
request; this effectively ignores the
|
|
1039
|
+
authentication in the spec for a single request.
|
|
1040
|
+
:type _request_auth: dict, optional
|
|
1041
|
+
:param _content_type: force content-type for the request.
|
|
1042
|
+
:type _content_type: str, Optional
|
|
1043
|
+
:param _headers: set to override the headers for a single
|
|
1044
|
+
request; this effectively ignores the headers
|
|
1045
|
+
in the spec for a single request.
|
|
1046
|
+
:type _headers: dict, optional
|
|
1047
|
+
:param _host_index: set to override the host_index for a single
|
|
1048
|
+
request; this effectively ignores the host_index
|
|
1049
|
+
in the spec for a single request.
|
|
1050
|
+
:type _host_index: int, optional
|
|
1051
|
+
:return: Returns the result object.
|
|
1052
|
+
""" # noqa: E501
|
|
1053
|
+
|
|
1054
|
+
_param = self._logs_trace_post_serialize(
|
|
1055
|
+
create_log_trace_request=create_log_trace_request,
|
|
1056
|
+
_request_auth=_request_auth,
|
|
1057
|
+
_content_type=_content_type,
|
|
1058
|
+
_headers=_headers,
|
|
1059
|
+
_host_index=_host_index
|
|
1060
|
+
)
|
|
1061
|
+
|
|
1062
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1063
|
+
'200': "CreateLogTraceResponse",
|
|
1064
|
+
'400': "ErrorResponse",
|
|
1065
|
+
'403': "ErrorResponse",
|
|
1066
|
+
'413': "ErrorResponse",
|
|
1067
|
+
'500': "ErrorResponse",
|
|
1068
|
+
}
|
|
1069
|
+
response_data = await self.api_client.call_api(
|
|
1070
|
+
*_param,
|
|
1071
|
+
_request_timeout=_request_timeout
|
|
1072
|
+
)
|
|
1073
|
+
await response_data.read()
|
|
1074
|
+
return self.api_client.response_deserialize(
|
|
1075
|
+
response_data=response_data,
|
|
1076
|
+
response_types_map=_response_types_map,
|
|
1077
|
+
)
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
@validate_call
|
|
1081
|
+
async def logs_trace_post_without_preload_content(
|
|
1082
|
+
self,
|
|
1083
|
+
create_log_trace_request: CreateLogTraceRequest,
|
|
1084
|
+
_request_timeout: Union[
|
|
1085
|
+
None,
|
|
1086
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1087
|
+
Tuple[
|
|
1088
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1089
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1090
|
+
]
|
|
1091
|
+
] = None,
|
|
1092
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1093
|
+
_content_type: Optional[StrictStr] = None,
|
|
1094
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1095
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1096
|
+
) -> RESTResponseType:
|
|
1097
|
+
"""Create trace log
|
|
1098
|
+
|
|
1099
|
+
Create detailed execution traces for monitoring.
|
|
1100
|
+
|
|
1101
|
+
:param create_log_trace_request: (required)
|
|
1102
|
+
:type create_log_trace_request: CreateLogTraceRequest
|
|
1103
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1104
|
+
number provided, it will be total request
|
|
1105
|
+
timeout. It can also be a pair (tuple) of
|
|
1106
|
+
(connection, read) timeouts.
|
|
1107
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1108
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1109
|
+
request; this effectively ignores the
|
|
1110
|
+
authentication in the spec for a single request.
|
|
1111
|
+
:type _request_auth: dict, optional
|
|
1112
|
+
:param _content_type: force content-type for the request.
|
|
1113
|
+
:type _content_type: str, Optional
|
|
1114
|
+
:param _headers: set to override the headers for a single
|
|
1115
|
+
request; this effectively ignores the headers
|
|
1116
|
+
in the spec for a single request.
|
|
1117
|
+
:type _headers: dict, optional
|
|
1118
|
+
:param _host_index: set to override the host_index for a single
|
|
1119
|
+
request; this effectively ignores the host_index
|
|
1120
|
+
in the spec for a single request.
|
|
1121
|
+
:type _host_index: int, optional
|
|
1122
|
+
:return: Returns the result object.
|
|
1123
|
+
""" # noqa: E501
|
|
1124
|
+
|
|
1125
|
+
_param = self._logs_trace_post_serialize(
|
|
1126
|
+
create_log_trace_request=create_log_trace_request,
|
|
1127
|
+
_request_auth=_request_auth,
|
|
1128
|
+
_content_type=_content_type,
|
|
1129
|
+
_headers=_headers,
|
|
1130
|
+
_host_index=_host_index
|
|
1131
|
+
)
|
|
1132
|
+
|
|
1133
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1134
|
+
'200': "CreateLogTraceResponse",
|
|
1135
|
+
'400': "ErrorResponse",
|
|
1136
|
+
'403': "ErrorResponse",
|
|
1137
|
+
'413': "ErrorResponse",
|
|
1138
|
+
'500': "ErrorResponse",
|
|
1139
|
+
}
|
|
1140
|
+
response_data = await self.api_client.call_api(
|
|
1141
|
+
*_param,
|
|
1142
|
+
_request_timeout=_request_timeout
|
|
1143
|
+
)
|
|
1144
|
+
return response_data.response
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
def _logs_trace_post_serialize(
|
|
1148
|
+
self,
|
|
1149
|
+
create_log_trace_request,
|
|
1150
|
+
_request_auth,
|
|
1151
|
+
_content_type,
|
|
1152
|
+
_headers,
|
|
1153
|
+
_host_index,
|
|
1154
|
+
) -> RequestSerialized:
|
|
1155
|
+
|
|
1156
|
+
_host = None
|
|
1157
|
+
|
|
1158
|
+
_collection_formats: Dict[str, str] = {
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
_path_params: Dict[str, str] = {}
|
|
1162
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1163
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1164
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1165
|
+
_files: Dict[
|
|
1166
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1167
|
+
] = {}
|
|
1168
|
+
_body_params: Optional[bytes] = None
|
|
1169
|
+
|
|
1170
|
+
# process the path parameters
|
|
1171
|
+
# process the query parameters
|
|
1172
|
+
# process the header parameters
|
|
1173
|
+
# process the form parameters
|
|
1174
|
+
# process the body parameter
|
|
1175
|
+
if create_log_trace_request is not None:
|
|
1176
|
+
_body_params = create_log_trace_request
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
# set the HTTP header `Accept`
|
|
1180
|
+
if 'Accept' not in _header_params:
|
|
1181
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1182
|
+
[
|
|
1183
|
+
'application/json'
|
|
1184
|
+
]
|
|
1185
|
+
)
|
|
1186
|
+
|
|
1187
|
+
# set the HTTP header `Content-Type`
|
|
1188
|
+
if _content_type:
|
|
1189
|
+
_header_params['Content-Type'] = _content_type
|
|
1190
|
+
else:
|
|
1191
|
+
_default_content_type = (
|
|
1192
|
+
self.api_client.select_header_content_type(
|
|
1193
|
+
[
|
|
1194
|
+
'application/json'
|
|
1195
|
+
]
|
|
1196
|
+
)
|
|
1197
|
+
)
|
|
1198
|
+
if _default_content_type is not None:
|
|
1199
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1200
|
+
|
|
1201
|
+
# authentication setting
|
|
1202
|
+
_auth_settings: List[str] = [
|
|
1203
|
+
'bearerAuth'
|
|
1204
|
+
]
|
|
1205
|
+
|
|
1206
|
+
return self.api_client.param_serialize(
|
|
1207
|
+
method='POST',
|
|
1208
|
+
resource_path='/logs/trace',
|
|
1209
|
+
path_params=_path_params,
|
|
1210
|
+
query_params=_query_params,
|
|
1211
|
+
header_params=_header_params,
|
|
1212
|
+
body=_body_params,
|
|
1213
|
+
post_params=_form_params,
|
|
1214
|
+
files=_files,
|
|
1215
|
+
auth_settings=_auth_settings,
|
|
1216
|
+
collection_formats=_collection_formats,
|
|
1217
|
+
_host=_host,
|
|
1218
|
+
_request_auth=_request_auth
|
|
1219
|
+
)
|
|
1220
|
+
|
|
1221
|
+
|