
"""
    Highway Workflow Engine API

     ## Highway Workflow Engine  A production-grade durable workflow engine with: - **Workflow Orchestration**: Execute complex multi-step workflows with fault tolerance - **Durable Execution**: Automatic checkpointing and replay for disaster recovery - **Time-Travel Debugging**: Replay and simulate past workflow executions - **Multi-Tenancy**: Full tenant isolation with RBAC - **Distributed Locks**: PostgreSQL advisory locks for coordination - **Saga Patterns**: Compensation support for rollback scenarios  ### Authentication All endpoints require a valid JWT token in the `Authorization` header: ``` Authorization: Bearer <token> ```  ### Rate Limiting API requests are rate-limited per tenant. Check response headers for limits: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests - `X-RateLimit-Reset`: Window reset timestamp     

    The version of the OpenAPI document: 1.0.0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""

from typing import Annotated, Any

from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call

from highway_sdk.api_client import ApiClient, RequestSerialized
from highway_sdk.api_response import ApiResponse
from highway_sdk.rest import RESTResponseType


class LogsApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client


    @validate_call
    def get_api_v1_logs_activities(
        self,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> None:
        """List recent activity logs across all workflows for the tenant.

        Query Parameters:     limit (int, optional): Max results (default: 100, max: 500)  Returns:     200: List of recent activity logs     500: Failed to query logs  Response:     {         \"success\": true,         \"data\": {             \"activities\": [...],             \"total\": 100,             \"limit\": 100         }     }

        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_activities_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_api_v1_logs_activities_with_http_info(
        self,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[None]:
        """List recent activity logs across all workflows for the tenant.

        Query Parameters:     limit (int, optional): Max results (default: 100, max: 500)  Returns:     200: List of recent activity logs     500: Failed to query logs  Response:     {         \"success\": true,         \"data\": {             \"activities\": [...],             \"total\": 100,             \"limit\": 100         }     }

        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_activities_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_api_v1_logs_activities_without_preload_content(
        self,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """List recent activity logs across all workflows for the tenant.

        Query Parameters:     limit (int, optional): Max results (default: 100, max: 500)  Returns:     200: List of recent activity logs     500: Failed to query logs  Response:     {         \"success\": true,         \"data\": {             \"activities\": [...],             \"total\": 100,             \"limit\": 100         }     }

        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_activities_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_api_v1_logs_activities_serialize(
        self,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: dict[str, str] = {
        }

        _path_params: dict[str, str] = {}
        _query_params: list[tuple[str, str]] = []
        _header_params: dict[str, str | None] = _headers or {}
        _form_params: list[tuple[str, str]] = []
        _files: dict[
            str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
        ] = {}
        _body_params: bytes | None = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter




        # authentication setting
        _auth_settings: list[str] = [
            "BearerAuth"
        ]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/api/v1/logs/activities",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_api_v1_logs_stats(
        self,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> None:
        """Get aggregated workflow statistics.

        Query Parameters:     workflow_name (optional): Get stats for specific workflow     since (optional): ISO datetime - stats for logs after this time     until (optional): ISO datetime - stats for logs before this time  Returns:     200: Statistics     404: No logs found     500: Failed to compute stats  Response:     {         \"success\": true,         \"data\": {             \"total_workflows\": 1543,             \"status_breakdown\": {                 \"success\": 1501,                 \"failure\": 42             },             \"success_rate\": 0.973,             \"avg_duration_ms\": 45230,             \"p50_duration_ms\": 30100,             \"p95_duration_ms\": 120500,             \"p99_duration_ms\": 180000,             \"total_duration_ms\": 69779890,             \"avg_event_count\": 23.5         }     }

        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_stats_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_api_v1_logs_stats_with_http_info(
        self,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[None]:
        """Get aggregated workflow statistics.

        Query Parameters:     workflow_name (optional): Get stats for specific workflow     since (optional): ISO datetime - stats for logs after this time     until (optional): ISO datetime - stats for logs before this time  Returns:     200: Statistics     404: No logs found     500: Failed to compute stats  Response:     {         \"success\": true,         \"data\": {             \"total_workflows\": 1543,             \"status_breakdown\": {                 \"success\": 1501,                 \"failure\": 42             },             \"success_rate\": 0.973,             \"avg_duration_ms\": 45230,             \"p50_duration_ms\": 30100,             \"p95_duration_ms\": 120500,             \"p99_duration_ms\": 180000,             \"total_duration_ms\": 69779890,             \"avg_event_count\": 23.5         }     }

        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_stats_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_api_v1_logs_stats_without_preload_content(
        self,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get aggregated workflow statistics.

        Query Parameters:     workflow_name (optional): Get stats for specific workflow     since (optional): ISO datetime - stats for logs after this time     until (optional): ISO datetime - stats for logs before this time  Returns:     200: Statistics     404: No logs found     500: Failed to compute stats  Response:     {         \"success\": true,         \"data\": {             \"total_workflows\": 1543,             \"status_breakdown\": {                 \"success\": 1501,                 \"failure\": 42             },             \"success_rate\": 0.973,             \"avg_duration_ms\": 45230,             \"p50_duration_ms\": 30100,             \"p95_duration_ms\": 120500,             \"p99_duration_ms\": 180000,             \"total_duration_ms\": 69779890,             \"avg_event_count\": 23.5         }     }

        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_stats_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_api_v1_logs_stats_serialize(
        self,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: dict[str, str] = {
        }

        _path_params: dict[str, str] = {}
        _query_params: list[tuple[str, str]] = []
        _header_params: dict[str, str | None] = _headers or {}
        _form_params: list[tuple[str, str]] = []
        _files: dict[
            str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
        ] = {}
        _body_params: bytes | None = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter




        # authentication setting
        _auth_settings: list[str] = [
            "BearerAuth"
        ]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/api/v1/logs/stats",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_api_v1_logs_workflows(
        self,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> None:
        """List workflow logs with filtering and pagination.

        Query Parameters:     workflow_name (optional): Filter by workflow name     status (optional): Filter by status (success, failure)     since (optional): ISO datetime - filter logs after this time     until (optional): ISO datetime - filter logs before this time     limit (int, optional): Max results (default: 100, max: 1000)     offset (int, optional): Pagination offset (default: 0)  Returns:     200: List of workflow logs     400: Invalid parameters     404: No logs found     500: Failed to query logs  Response:     {         \"success\": true,         \"data\": {             \"workflows\": [{                 \"workflow_run_id\": \"abc123\",                 \"absurd_run_id\": \"def456\",                 \"workflow_name\": \"video_processing\",                 \"status\": \"success\",                 \"started_at\": \"2025-11-17T10:00:00Z\",                 \"completed_at\": \"2025-11-17T10:05:00Z\",                 \"duration_ms\": 300000,                 \"worker_id\": \"worker-1-1234\",                 \"error_message\": null,                 \"event_count\": 45,                 \"logged_at\": \"2025-11-17T10:05:01Z\"             }],             \"total\": 1,             \"limit\": 100,             \"offset\": 0         }     }

        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflows_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_api_v1_logs_workflows_with_http_info(
        self,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[None]:
        """List workflow logs with filtering and pagination.

        Query Parameters:     workflow_name (optional): Filter by workflow name     status (optional): Filter by status (success, failure)     since (optional): ISO datetime - filter logs after this time     until (optional): ISO datetime - filter logs before this time     limit (int, optional): Max results (default: 100, max: 1000)     offset (int, optional): Pagination offset (default: 0)  Returns:     200: List of workflow logs     400: Invalid parameters     404: No logs found     500: Failed to query logs  Response:     {         \"success\": true,         \"data\": {             \"workflows\": [{                 \"workflow_run_id\": \"abc123\",                 \"absurd_run_id\": \"def456\",                 \"workflow_name\": \"video_processing\",                 \"status\": \"success\",                 \"started_at\": \"2025-11-17T10:00:00Z\",                 \"completed_at\": \"2025-11-17T10:05:00Z\",                 \"duration_ms\": 300000,                 \"worker_id\": \"worker-1-1234\",                 \"error_message\": null,                 \"event_count\": 45,                 \"logged_at\": \"2025-11-17T10:05:01Z\"             }],             \"total\": 1,             \"limit\": 100,             \"offset\": 0         }     }

        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflows_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_api_v1_logs_workflows_without_preload_content(
        self,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """List workflow logs with filtering and pagination.

        Query Parameters:     workflow_name (optional): Filter by workflow name     status (optional): Filter by status (success, failure)     since (optional): ISO datetime - filter logs after this time     until (optional): ISO datetime - filter logs before this time     limit (int, optional): Max results (default: 100, max: 1000)     offset (int, optional): Pagination offset (default: 0)  Returns:     200: List of workflow logs     400: Invalid parameters     404: No logs found     500: Failed to query logs  Response:     {         \"success\": true,         \"data\": {             \"workflows\": [{                 \"workflow_run_id\": \"abc123\",                 \"absurd_run_id\": \"def456\",                 \"workflow_name\": \"video_processing\",                 \"status\": \"success\",                 \"started_at\": \"2025-11-17T10:00:00Z\",                 \"completed_at\": \"2025-11-17T10:05:00Z\",                 \"duration_ms\": 300000,                 \"worker_id\": \"worker-1-1234\",                 \"error_message\": null,                 \"event_count\": 45,                 \"logged_at\": \"2025-11-17T10:05:01Z\"             }],             \"total\": 1,             \"limit\": 100,             \"offset\": 0         }     }

        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflows_serialize(
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_api_v1_logs_workflows_serialize(
        self,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: dict[str, str] = {
        }

        _path_params: dict[str, str] = {}
        _query_params: list[tuple[str, str]] = []
        _header_params: dict[str, str | None] = _headers or {}
        _form_params: list[tuple[str, str]] = []
        _files: dict[
            str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
        ] = {}
        _body_params: bytes | None = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter




        # authentication setting
        _auth_settings: list[str] = [
            "BearerAuth"
        ]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/api/v1/logs/workflows",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id(
        self,
        workflow_run_id: StrictStr | None,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> None:
        """Get workflow log by workflow_run_id.

        Path Parameters:     workflow_run_id: Workflow run ID  Returns:     200: Workflow log     404: Workflow log not found     500: Failed to query log

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_serialize(
            workflow_run_id=workflow_run_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id_with_http_info(
        self,
        workflow_run_id: StrictStr | None,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[None]:
        """Get workflow log by workflow_run_id.

        Path Parameters:     workflow_run_id: Workflow run ID  Returns:     200: Workflow log     404: Workflow log not found     500: Failed to query log

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_serialize(
            workflow_run_id=workflow_run_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id_without_preload_content(
        self,
        workflow_run_id: StrictStr | None,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get workflow log by workflow_run_id.

        Path Parameters:     workflow_run_id: Workflow run ID  Returns:     200: Workflow log     404: Workflow log not found     500: Failed to query log

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_serialize(
            workflow_run_id=workflow_run_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_api_v1_logs_workflowsworkflow_run_id_serialize(
        self,
        workflow_run_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: dict[str, str] = {
        }

        _path_params: dict[str, str] = {}
        _query_params: list[tuple[str, str]] = []
        _header_params: dict[str, str | None] = _headers or {}
        _form_params: list[tuple[str, str]] = []
        _files: dict[
            str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
        ] = {}
        _body_params: bytes | None = None

        # process the path parameters
        if workflow_run_id is not None:
            _path_params["workflow_run_id"] = workflow_run_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter




        # authentication setting
        _auth_settings: list[str] = [
            "BearerAuth"
        ]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/api/v1/logs/workflows/{workflow_run_id}",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id_activities(
        self,
        workflow_run_id: StrictStr,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> None:
        """List activity logs for a workflow.

        Path Parameters:     workflow_run_id: Workflow run ID  Query Parameters:     include_logs (bool, optional): Include captured Python logs in response (default: false)  Returns:     200: List of activity logs for the workflow     404: No activity logs found     500: Failed to query logs  Response:     {         \"success\": true,         \"data\": {             \"workflow_run_id\": \"abc123\",             \"activities\": [{                 \"activity_id\": \"def456\",                 \"activity_name\": \"kafka_consumer\",                 \"function_name\": \"examples.etl.kafka_pipeline.consumer.run_consumer\",                 \"status\": \"completed\",                 \"started_at\": \"2025-11-29T10:00:00Z\",                 \"completed_at\": \"2025-11-29T10:05:00Z\",                 \"duration_ms\": 300000,                 \"worker_id\": \"activity-worker-1234\",                 \"attempt\": 1,                 \"max_attempts\": 3,                 \"captured_logs_count\": 150,                 \"log_level_counts\": {\"INFO\": 120, \"DEBUG\": 25, \"ERROR\": 5}             }],             \"summary\": {                 \"total_activities\": 2,                 \"completed\": 1,                 \"failed\": 1             }         }     }

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_activities_serialize(
            workflow_run_id=workflow_run_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id_activities_with_http_info(
        self,
        workflow_run_id: StrictStr,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[None]:
        """List activity logs for a workflow.

        Path Parameters:     workflow_run_id: Workflow run ID  Query Parameters:     include_logs (bool, optional): Include captured Python logs in response (default: false)  Returns:     200: List of activity logs for the workflow     404: No activity logs found     500: Failed to query logs  Response:     {         \"success\": true,         \"data\": {             \"workflow_run_id\": \"abc123\",             \"activities\": [{                 \"activity_id\": \"def456\",                 \"activity_name\": \"kafka_consumer\",                 \"function_name\": \"examples.etl.kafka_pipeline.consumer.run_consumer\",                 \"status\": \"completed\",                 \"started_at\": \"2025-11-29T10:00:00Z\",                 \"completed_at\": \"2025-11-29T10:05:00Z\",                 \"duration_ms\": 300000,                 \"worker_id\": \"activity-worker-1234\",                 \"attempt\": 1,                 \"max_attempts\": 3,                 \"captured_logs_count\": 150,                 \"log_level_counts\": {\"INFO\": 120, \"DEBUG\": 25, \"ERROR\": 5}             }],             \"summary\": {                 \"total_activities\": 2,                 \"completed\": 1,                 \"failed\": 1             }         }     }

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_activities_serialize(
            workflow_run_id=workflow_run_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id_activities_without_preload_content(
        self,
        workflow_run_id: StrictStr,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """List activity logs for a workflow.

        Path Parameters:     workflow_run_id: Workflow run ID  Query Parameters:     include_logs (bool, optional): Include captured Python logs in response (default: false)  Returns:     200: List of activity logs for the workflow     404: No activity logs found     500: Failed to query logs  Response:     {         \"success\": true,         \"data\": {             \"workflow_run_id\": \"abc123\",             \"activities\": [{                 \"activity_id\": \"def456\",                 \"activity_name\": \"kafka_consumer\",                 \"function_name\": \"examples.etl.kafka_pipeline.consumer.run_consumer\",                 \"status\": \"completed\",                 \"started_at\": \"2025-11-29T10:00:00Z\",                 \"completed_at\": \"2025-11-29T10:05:00Z\",                 \"duration_ms\": 300000,                 \"worker_id\": \"activity-worker-1234\",                 \"attempt\": 1,                 \"max_attempts\": 3,                 \"captured_logs_count\": 150,                 \"log_level_counts\": {\"INFO\": 120, \"DEBUG\": 25, \"ERROR\": 5}             }],             \"summary\": {                 \"total_activities\": 2,                 \"completed\": 1,                 \"failed\": 1             }         }     }

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_activities_serialize(
            workflow_run_id=workflow_run_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_api_v1_logs_workflowsworkflow_run_id_activities_serialize(
        self,
        workflow_run_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: dict[str, str] = {
        }

        _path_params: dict[str, str] = {}
        _query_params: list[tuple[str, str]] = []
        _header_params: dict[str, str | None] = _headers or {}
        _form_params: list[tuple[str, str]] = []
        _files: dict[
            str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
        ] = {}
        _body_params: bytes | None = None

        # process the path parameters
        if workflow_run_id is not None:
            _path_params["workflow_run_id"] = workflow_run_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter




        # authentication setting
        _auth_settings: list[str] = [
            "BearerAuth"
        ]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/api/v1/logs/workflows/{workflow_run_id}/activities",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id_activitiesactivity_id(
        self,
        workflow_run_id: StrictStr,
        activity_id: StrictStr,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> None:
        """Get activity log with captured Python logging output.

        This endpoint returns the full audit trail for an activity, including: - All captured Python logging output (INFO, DEBUG, WARNING, ERROR) - Execution timing and result - Error details if failed  Path Parameters:     workflow_run_id: Workflow run ID     activity_id: Activity ID  Returns:     200: Activity log with captured logs     404: Activity log not found     500: Failed to query log  Response:     {         \"success\": true,         \"data\": {             \"activity_id\": \"def456\",             \"workflow_run_id\": \"abc123\",             \"activity_name\": \"kafka_consumer\",             \"function_name\": \"examples.etl.kafka_pipeline.consumer.run_consumer\",             \"status\": \"completed\",             \"started_at\": \"2025-11-29T10:00:00Z\",             \"completed_at\": \"2025-11-29T10:05:00Z\",             \"duration_ms\": 300000,             \"worker_id\": \"activity-worker-1234\",             \"attempt\": 1,             \"max_attempts\": 3,             \"result_summary\": {\"messages_consumed\": 50},             \"captured_logs\": [                 {\"ts\": 1732878000.123, \"level\": \"INFO\", \"logger\": \"consumer\", \"msg\": \"Connected to Kafka\"},                 {\"ts\": 1732878001.456, \"level\": \"INFO\", \"logger\": \"consumer\", \"msg\": \"Consuming from topic\"}             ],             \"log_level_counts\": {\"INFO\": 120, \"DEBUG\": 25, \"ERROR\": 0}         }     }

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param activity_id:  (required)
        :type activity_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_activitiesactivity_id_serialize(
            workflow_run_id=workflow_run_id,
            activity_id=activity_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id_activitiesactivity_id_with_http_info(
        self,
        workflow_run_id: StrictStr,
        activity_id: StrictStr,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[None]:
        """Get activity log with captured Python logging output.

        This endpoint returns the full audit trail for an activity, including: - All captured Python logging output (INFO, DEBUG, WARNING, ERROR) - Execution timing and result - Error details if failed  Path Parameters:     workflow_run_id: Workflow run ID     activity_id: Activity ID  Returns:     200: Activity log with captured logs     404: Activity log not found     500: Failed to query log  Response:     {         \"success\": true,         \"data\": {             \"activity_id\": \"def456\",             \"workflow_run_id\": \"abc123\",             \"activity_name\": \"kafka_consumer\",             \"function_name\": \"examples.etl.kafka_pipeline.consumer.run_consumer\",             \"status\": \"completed\",             \"started_at\": \"2025-11-29T10:00:00Z\",             \"completed_at\": \"2025-11-29T10:05:00Z\",             \"duration_ms\": 300000,             \"worker_id\": \"activity-worker-1234\",             \"attempt\": 1,             \"max_attempts\": 3,             \"result_summary\": {\"messages_consumed\": 50},             \"captured_logs\": [                 {\"ts\": 1732878000.123, \"level\": \"INFO\", \"logger\": \"consumer\", \"msg\": \"Connected to Kafka\"},                 {\"ts\": 1732878001.456, \"level\": \"INFO\", \"logger\": \"consumer\", \"msg\": \"Consuming from topic\"}             ],             \"log_level_counts\": {\"INFO\": 120, \"DEBUG\": 25, \"ERROR\": 0}         }     }

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param activity_id:  (required)
        :type activity_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_activitiesactivity_id_serialize(
            workflow_run_id=workflow_run_id,
            activity_id=activity_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id_activitiesactivity_id_without_preload_content(
        self,
        workflow_run_id: StrictStr,
        activity_id: StrictStr,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get activity log with captured Python logging output.

        This endpoint returns the full audit trail for an activity, including: - All captured Python logging output (INFO, DEBUG, WARNING, ERROR) - Execution timing and result - Error details if failed  Path Parameters:     workflow_run_id: Workflow run ID     activity_id: Activity ID  Returns:     200: Activity log with captured logs     404: Activity log not found     500: Failed to query log  Response:     {         \"success\": true,         \"data\": {             \"activity_id\": \"def456\",             \"workflow_run_id\": \"abc123\",             \"activity_name\": \"kafka_consumer\",             \"function_name\": \"examples.etl.kafka_pipeline.consumer.run_consumer\",             \"status\": \"completed\",             \"started_at\": \"2025-11-29T10:00:00Z\",             \"completed_at\": \"2025-11-29T10:05:00Z\",             \"duration_ms\": 300000,             \"worker_id\": \"activity-worker-1234\",             \"attempt\": 1,             \"max_attempts\": 3,             \"result_summary\": {\"messages_consumed\": 50},             \"captured_logs\": [                 {\"ts\": 1732878000.123, \"level\": \"INFO\", \"logger\": \"consumer\", \"msg\": \"Connected to Kafka\"},                 {\"ts\": 1732878001.456, \"level\": \"INFO\", \"logger\": \"consumer\", \"msg\": \"Consuming from topic\"}             ],             \"log_level_counts\": {\"INFO\": 120, \"DEBUG\": 25, \"ERROR\": 0}         }     }

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param activity_id:  (required)
        :type activity_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_activitiesactivity_id_serialize(
            workflow_run_id=workflow_run_id,
            activity_id=activity_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_api_v1_logs_workflowsworkflow_run_id_activitiesactivity_id_serialize(
        self,
        workflow_run_id,
        activity_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: dict[str, str] = {
        }

        _path_params: dict[str, str] = {}
        _query_params: list[tuple[str, str]] = []
        _header_params: dict[str, str | None] = _headers or {}
        _form_params: list[tuple[str, str]] = []
        _files: dict[
            str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
        ] = {}
        _body_params: bytes | None = None

        # process the path parameters
        if workflow_run_id is not None:
            _path_params["workflow_run_id"] = workflow_run_id
        if activity_id is not None:
            _path_params["activity_id"] = activity_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter




        # authentication setting
        _auth_settings: list[str] = [
            "BearerAuth"
        ]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/api/v1/logs/workflows/{workflow_run_id}/activities/{activity_id}",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id_taskstask_id(
        self,
        workflow_run_id: StrictStr,
        task_id: StrictStr | None,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> None:
        """Get task log with stdout/stderr.

            Path Parameters:         workflow_run_id: Workflow run ID         task_id: Task ID      Returns:         200: Task log with stdout/stderr         404: Task log not found         500: Failed to query log      Response:         {             \"success\": true,             \"data\": {                 \"workflow_run_id\": \"abc123\",                 \"task_id\": \"task_1\",                 \"task_name\": \"run_script\",                 \"task_function\": \"tools.shell.run\",                 \"status\": \"success\",                 \"started_at\": \"2025-11-17T10:00:00Z\",                 \"completed_at\": \"2025-11-17T10:00:05Z\",                 \"duration_ms\": 5000,                 \"worker_id\": \"worker-1-1234\",                 \"retry_count\": 0,                 \"error_message\": null,                 \"output_stdout\": \"Hello World \",                 \"output_stderr\": \"\",                 \"output_return_code\": 0,                 \"logged_at\": \"2025-11-17T10:00:05Z\"             }         }

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param task_id:  (required)
        :type task_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_taskstask_id_serialize(
            workflow_run_id=workflow_run_id,
            task_id=task_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id_taskstask_id_with_http_info(
        self,
        workflow_run_id: StrictStr,
        task_id: StrictStr | None,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[None]:
        """Get task log with stdout/stderr.

            Path Parameters:         workflow_run_id: Workflow run ID         task_id: Task ID      Returns:         200: Task log with stdout/stderr         404: Task log not found         500: Failed to query log      Response:         {             \"success\": true,             \"data\": {                 \"workflow_run_id\": \"abc123\",                 \"task_id\": \"task_1\",                 \"task_name\": \"run_script\",                 \"task_function\": \"tools.shell.run\",                 \"status\": \"success\",                 \"started_at\": \"2025-11-17T10:00:00Z\",                 \"completed_at\": \"2025-11-17T10:00:05Z\",                 \"duration_ms\": 5000,                 \"worker_id\": \"worker-1-1234\",                 \"retry_count\": 0,                 \"error_message\": null,                 \"output_stdout\": \"Hello World \",                 \"output_stderr\": \"\",                 \"output_return_code\": 0,                 \"logged_at\": \"2025-11-17T10:00:05Z\"             }         }

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param task_id:  (required)
        :type task_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_taskstask_id_serialize(
            workflow_run_id=workflow_run_id,
            task_id=task_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def get_api_v1_logs_workflowsworkflow_run_id_taskstask_id_without_preload_content(
        self,
        workflow_run_id: StrictStr,
        task_id: StrictStr | None,
        _request_timeout: None | Annotated[StrictFloat, Field(gt=0)] | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None,
        _request_auth: dict[StrictStr, Any] | None = None,
        _content_type: StrictStr | None = None,
        _headers: dict[StrictStr, Any] | None = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get task log with stdout/stderr.

            Path Parameters:         workflow_run_id: Workflow run ID         task_id: Task ID      Returns:         200: Task log with stdout/stderr         404: Task log not found         500: Failed to query log      Response:         {             \"success\": true,             \"data\": {                 \"workflow_run_id\": \"abc123\",                 \"task_id\": \"task_1\",                 \"task_name\": \"run_script\",                 \"task_function\": \"tools.shell.run\",                 \"status\": \"success\",                 \"started_at\": \"2025-11-17T10:00:00Z\",                 \"completed_at\": \"2025-11-17T10:00:05Z\",                 \"duration_ms\": 5000,                 \"worker_id\": \"worker-1-1234\",                 \"retry_count\": 0,                 \"error_message\": null,                 \"output_stdout\": \"Hello World \",                 \"output_stderr\": \"\",                 \"output_return_code\": 0,                 \"logged_at\": \"2025-11-17T10:00:05Z\"             }         }

        :param workflow_run_id:  (required)
        :type workflow_run_id: str
        :param task_id:  (required)
        :type task_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """

        _param = self._get_api_v1_logs_workflowsworkflow_run_id_taskstask_id_serialize(
            workflow_run_id=workflow_run_id,
            task_id=task_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: dict[str, str | None] = {
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_api_v1_logs_workflowsworkflow_run_id_taskstask_id_serialize(
        self,
        workflow_run_id,
        task_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: dict[str, str] = {
        }

        _path_params: dict[str, str] = {}
        _query_params: list[tuple[str, str]] = []
        _header_params: dict[str, str | None] = _headers or {}
        _form_params: list[tuple[str, str]] = []
        _files: dict[
            str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
        ] = {}
        _body_params: bytes | None = None

        # process the path parameters
        if workflow_run_id is not None:
            _path_params["workflow_run_id"] = workflow_run_id
        if task_id is not None:
            _path_params["task_id"] = task_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter




        # authentication setting
        _auth_settings: list[str] = [
            "BearerAuth"
        ]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/api/v1/logs/workflows/{workflow_run_id}/tasks/{task_id}",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


