# This file was auto-generated by Fern from our API Definition.

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.reference import Reference
from ..types.workflow_artifact import WorkflowArtifact
from ..types.workflow_response import WorkflowResponse
from ..types.workflow_revision import WorkflowRevision
from ..types.workflow_revision_response import WorkflowRevisionResponse
from ..types.workflow_revisions_response import WorkflowRevisionsResponse
from ..types.workflow_variant import WorkflowVariant
from ..types.workflow_variant_response import WorkflowVariantResponse
from ..types.workflow_variants_response import WorkflowVariantsResponse
from ..types.workflows_response import WorkflowsResponse
from .raw_client import AsyncRawWorkflowsClient, RawWorkflowsClient

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)


class WorkflowsClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawWorkflowsClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawWorkflowsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawWorkflowsClient
        """
        return self._raw_client

    def list_workflows(
        self,
        *,
        workflow_ref: typing.Optional[str] = None,
        workflow_flags: typing.Optional[str] = None,
        workflow_meta: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowsResponse:
        """
        Parameters
        ----------
        workflow_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        workflow_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        workflow_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowsResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.list_workflows()
        """
        _response = self._raw_client.list_workflows(
            workflow_ref=workflow_ref,
            workflow_flags=workflow_flags,
            workflow_meta=workflow_meta,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    def create_workflow(
        self,
        *,
        workflow: WorkflowArtifact,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowResponse:
        """
        Parameters
        ----------
        workflow : WorkflowArtifact

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi, WorkflowArtifact

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.create_workflow(
            workflow=WorkflowArtifact(),
        )
        """
        _response = self._raw_client.create_workflow(
            workflow=workflow, request_options=request_options
        )
        return _response.data

    def fetch_workflow(
        self,
        workflow_id: str,
        *,
        artifact_id: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowResponse:
        """
        Parameters
        ----------
        workflow_id : str

        artifact_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.fetch_workflow(
            workflow_id="workflow_id",
            artifact_id="artifact_id",
        )
        """
        _response = self._raw_client.fetch_workflow(
            workflow_id, artifact_id=artifact_id, request_options=request_options
        )
        return _response.data

    def edit_workflow(
        self,
        workflow_id: str,
        *,
        workflow: WorkflowArtifact,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowResponse:
        """
        Parameters
        ----------
        workflow_id : str

        workflow : WorkflowArtifact

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi, WorkflowArtifact

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.edit_workflow(
            workflow_id="workflow_id",
            workflow=WorkflowArtifact(),
        )
        """
        _response = self._raw_client.edit_workflow(
            workflow_id, workflow=workflow, request_options=request_options
        )
        return _response.data

    def archive_workflow(
        self,
        workflow_id: str,
        *,
        artifact_id: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowResponse:
        """
        Parameters
        ----------
        workflow_id : str

        artifact_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.archive_workflow(
            workflow_id="workflow_id",
            artifact_id="artifact_id",
        )
        """
        _response = self._raw_client.archive_workflow(
            workflow_id, artifact_id=artifact_id, request_options=request_options
        )
        return _response.data

    def unarchive_workflow(
        self,
        workflow_id: str,
        *,
        artifact_id: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowResponse:
        """
        Parameters
        ----------
        workflow_id : str

        artifact_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.unarchive_workflow(
            workflow_id="workflow_id",
            artifact_id="artifact_id",
        )
        """
        _response = self._raw_client.unarchive_workflow(
            workflow_id, artifact_id=artifact_id, request_options=request_options
        )
        return _response.data

    def query_workflows(
        self,
        *,
        workflow_ref: typing.Optional[str] = None,
        workflow_flags: typing.Optional[str] = None,
        workflow_meta: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowsResponse:
        """
        Parameters
        ----------
        workflow_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        workflow_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        workflow_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowsResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.query_workflows()
        """
        _response = self._raw_client.query_workflows(
            workflow_ref=workflow_ref,
            workflow_flags=workflow_flags,
            workflow_meta=workflow_meta,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    def list_workflow_variants(
        self,
        *,
        workflow_ref: typing.Optional[str] = None,
        variant_ref: typing.Optional[str] = None,
        variant_meta: typing.Optional[str] = None,
        variant_flags: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantsResponse:
        """
        Parameters
        ----------
        workflow_ref : typing.Optional[str]
            JSON string of reference, e.g. {"key": value}

        variant_ref : typing.Optional[str]
            JSON string of reference, e.g. {"key": value}

        variant_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        variant_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantsResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.list_workflow_variants()
        """
        _response = self._raw_client.list_workflow_variants(
            workflow_ref=workflow_ref,
            variant_ref=variant_ref,
            variant_meta=variant_meta,
            variant_flags=variant_flags,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    def create_workflow_variant(
        self,
        *,
        variant: WorkflowVariant,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant : WorkflowVariant

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi, WorkflowVariant

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.create_workflow_variant(
            variant=WorkflowVariant(),
        )
        """
        _response = self._raw_client.create_workflow_variant(
            variant=variant, request_options=request_options
        )
        return _response.data

    def fetch_workflow_variant(
        self,
        variant_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.fetch_workflow_variant(
            variant_id="variant_id",
        )
        """
        _response = self._raw_client.fetch_workflow_variant(
            variant_id, request_options=request_options
        )
        return _response.data

    def edit_workflow_variant(
        self,
        variant_id: str,
        *,
        variant: WorkflowVariant,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant_id : str

        variant : WorkflowVariant

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi, WorkflowVariant

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.edit_workflow_variant(
            variant_id="variant_id",
            variant=WorkflowVariant(),
        )
        """
        _response = self._raw_client.edit_workflow_variant(
            variant_id, variant=variant, request_options=request_options
        )
        return _response.data

    def archive_workflow_variant(
        self,
        variant_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.archive_workflow_variant(
            variant_id="variant_id",
        )
        """
        _response = self._raw_client.archive_workflow_variant(
            variant_id, request_options=request_options
        )
        return _response.data

    def unarchive_workflow_variant(
        self,
        variant_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.unarchive_workflow_variant(
            variant_id="variant_id",
        )
        """
        _response = self._raw_client.unarchive_workflow_variant(
            variant_id, request_options=request_options
        )
        return _response.data

    def query_workflow_variants(
        self,
        *,
        workflow_ref: typing.Optional[str] = None,
        variant_ref: typing.Optional[str] = None,
        variant_meta: typing.Optional[str] = None,
        variant_flags: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantsResponse:
        """
        Parameters
        ----------
        workflow_ref : typing.Optional[str]
            JSON string of reference, e.g. {"key": value}

        variant_ref : typing.Optional[str]
            JSON string of reference, e.g. {"key": value}

        variant_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        variant_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantsResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.query_workflow_variants()
        """
        _response = self._raw_client.query_workflow_variants(
            workflow_ref=workflow_ref,
            variant_ref=variant_ref,
            variant_meta=variant_meta,
            variant_flags=variant_flags,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    def commit_workflow_revision_by_variant_id(
        self,
        variant_id: typing.Optional[str],
        *,
        revision: WorkflowRevision,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        variant_id : typing.Optional[str]

        revision : WorkflowRevision

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi, WorkflowRevision

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.commit_workflow_revision_by_variant_id(
            revision=WorkflowRevision(),
        )
        """
        _response = self._raw_client.commit_workflow_revision_by_variant_id(
            variant_id, revision=revision, request_options=request_options
        )
        return _response.data

    def fork_workflow_variant(
        self,
        variant_id: typing.Optional[str],
        *,
        revision: WorkflowRevision,
        revision_id: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant_id : typing.Optional[str]

        revision : WorkflowRevision

        revision_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi, WorkflowRevision

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.fork_workflow_variant(
            revision=WorkflowRevision(),
        )
        """
        _response = self._raw_client.fork_workflow_variant(
            variant_id,
            revision=revision,
            revision_id=revision_id,
            request_options=request_options,
        )
        return _response.data

    def list_workflow_revisions(
        self,
        *,
        variant_ref: typing.Optional[str] = None,
        revision_ref: typing.Optional[str] = None,
        revision_meta: typing.Optional[str] = None,
        revision_flags: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionsResponse:
        """
        Parameters
        ----------
        variant_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        revision_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        revision_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        revision_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionsResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.list_workflow_revisions()
        """
        _response = self._raw_client.list_workflow_revisions(
            variant_ref=variant_ref,
            revision_ref=revision_ref,
            revision_meta=revision_meta,
            revision_flags=revision_flags,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    def create_workflow_revision(
        self,
        *,
        revision: WorkflowRevision,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision : WorkflowRevision

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi, WorkflowRevision

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.create_workflow_revision(
            revision=WorkflowRevision(),
        )
        """
        _response = self._raw_client.create_workflow_revision(
            revision=revision, request_options=request_options
        )
        return _response.data

    def fetch_workflow_revision(
        self,
        revision_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.fetch_workflow_revision(
            revision_id="revision_id",
        )
        """
        _response = self._raw_client.fetch_workflow_revision(
            revision_id, request_options=request_options
        )
        return _response.data

    def edit_workflow_revision(
        self,
        revision_id: str,
        *,
        revision: WorkflowRevision,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision_id : str

        revision : WorkflowRevision

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi, WorkflowRevision

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.edit_workflow_revision(
            revision_id="revision_id",
            revision=WorkflowRevision(),
        )
        """
        _response = self._raw_client.edit_workflow_revision(
            revision_id, revision=revision, request_options=request_options
        )
        return _response.data

    def archive_workflow_revision_rpc(
        self,
        revision_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.archive_workflow_revision_rpc(
            revision_id="revision_id",
        )
        """
        _response = self._raw_client.archive_workflow_revision_rpc(
            revision_id, request_options=request_options
        )
        return _response.data

    def unarchive_workflow_revision_rpc(
        self,
        revision_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.unarchive_workflow_revision_rpc(
            revision_id="revision_id",
        )
        """
        _response = self._raw_client.unarchive_workflow_revision_rpc(
            revision_id, request_options=request_options
        )
        return _response.data

    def query_workflow_revisions(
        self,
        *,
        variant_ref: typing.Optional[str] = None,
        revision_ref: typing.Optional[str] = None,
        revision_meta: typing.Optional[str] = None,
        revision_flags: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionsResponse:
        """
        Parameters
        ----------
        variant_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        revision_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        revision_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        revision_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionsResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.query_workflow_revisions()
        """
        _response = self._raw_client.query_workflow_revisions(
            variant_ref=variant_ref,
            revision_ref=revision_ref,
            revision_meta=revision_meta,
            revision_flags=revision_flags,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    def fork_workflow_variant_by_revision_id(
        self,
        revision_id: typing.Optional[str],
        *,
        revision: WorkflowRevision,
        variant_id: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        revision_id : typing.Optional[str]

        revision : WorkflowRevision

        variant_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi, WorkflowRevision

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.fork_workflow_variant_by_revision_id(
            revision=WorkflowRevision(),
        )
        """
        _response = self._raw_client.fork_workflow_variant_by_revision_id(
            revision_id,
            revision=revision,
            variant_id=variant_id,
            request_options=request_options,
        )
        return _response.data

    def commit_workflow_revision(
        self,
        *,
        revision: WorkflowRevision,
        variant_id: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision : WorkflowRevision

        variant_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi, WorkflowRevision

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.commit_workflow_revision(
            revision=WorkflowRevision(),
        )
        """
        _response = self._raw_client.commit_workflow_revision(
            revision=revision, variant_id=variant_id, request_options=request_options
        )
        return _response.data

    def log_workflow_revisions(
        self,
        *,
        depth: typing.Optional[int] = None,
        variant_ref: typing.Optional[Reference] = OMIT,
        revision_ref: typing.Optional[Reference] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionsResponse:
        """
        Parameters
        ----------
        depth : typing.Optional[int]

        variant_ref : typing.Optional[Reference]

        revision_ref : typing.Optional[Reference]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionsResponse
            Successful Response

        Examples
        --------
        from agenta import AgentaApi

        client = AgentaApi(
            api_key="YOUR_API_KEY",
        )
        client.workflows.log_workflow_revisions()
        """
        _response = self._raw_client.log_workflow_revisions(
            depth=depth,
            variant_ref=variant_ref,
            revision_ref=revision_ref,
            request_options=request_options,
        )
        return _response.data


class AsyncWorkflowsClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawWorkflowsClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawWorkflowsClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawWorkflowsClient
        """
        return self._raw_client

    async def list_workflows(
        self,
        *,
        workflow_ref: typing.Optional[str] = None,
        workflow_flags: typing.Optional[str] = None,
        workflow_meta: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowsResponse:
        """
        Parameters
        ----------
        workflow_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        workflow_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        workflow_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.list_workflows()


        asyncio.run(main())
        """
        _response = await self._raw_client.list_workflows(
            workflow_ref=workflow_ref,
            workflow_flags=workflow_flags,
            workflow_meta=workflow_meta,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    async def create_workflow(
        self,
        *,
        workflow: WorkflowArtifact,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowResponse:
        """
        Parameters
        ----------
        workflow : WorkflowArtifact

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi, WorkflowArtifact

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.create_workflow(
                workflow=WorkflowArtifact(),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_workflow(
            workflow=workflow, request_options=request_options
        )
        return _response.data

    async def fetch_workflow(
        self,
        workflow_id: str,
        *,
        artifact_id: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowResponse:
        """
        Parameters
        ----------
        workflow_id : str

        artifact_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.fetch_workflow(
                workflow_id="workflow_id",
                artifact_id="artifact_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.fetch_workflow(
            workflow_id, artifact_id=artifact_id, request_options=request_options
        )
        return _response.data

    async def edit_workflow(
        self,
        workflow_id: str,
        *,
        workflow: WorkflowArtifact,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowResponse:
        """
        Parameters
        ----------
        workflow_id : str

        workflow : WorkflowArtifact

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi, WorkflowArtifact

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.edit_workflow(
                workflow_id="workflow_id",
                workflow=WorkflowArtifact(),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.edit_workflow(
            workflow_id, workflow=workflow, request_options=request_options
        )
        return _response.data

    async def archive_workflow(
        self,
        workflow_id: str,
        *,
        artifact_id: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowResponse:
        """
        Parameters
        ----------
        workflow_id : str

        artifact_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.archive_workflow(
                workflow_id="workflow_id",
                artifact_id="artifact_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.archive_workflow(
            workflow_id, artifact_id=artifact_id, request_options=request_options
        )
        return _response.data

    async def unarchive_workflow(
        self,
        workflow_id: str,
        *,
        artifact_id: str,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowResponse:
        """
        Parameters
        ----------
        workflow_id : str

        artifact_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.unarchive_workflow(
                workflow_id="workflow_id",
                artifact_id="artifact_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.unarchive_workflow(
            workflow_id, artifact_id=artifact_id, request_options=request_options
        )
        return _response.data

    async def query_workflows(
        self,
        *,
        workflow_ref: typing.Optional[str] = None,
        workflow_flags: typing.Optional[str] = None,
        workflow_meta: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowsResponse:
        """
        Parameters
        ----------
        workflow_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        workflow_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        workflow_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.query_workflows()


        asyncio.run(main())
        """
        _response = await self._raw_client.query_workflows(
            workflow_ref=workflow_ref,
            workflow_flags=workflow_flags,
            workflow_meta=workflow_meta,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    async def list_workflow_variants(
        self,
        *,
        workflow_ref: typing.Optional[str] = None,
        variant_ref: typing.Optional[str] = None,
        variant_meta: typing.Optional[str] = None,
        variant_flags: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantsResponse:
        """
        Parameters
        ----------
        workflow_ref : typing.Optional[str]
            JSON string of reference, e.g. {"key": value}

        variant_ref : typing.Optional[str]
            JSON string of reference, e.g. {"key": value}

        variant_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        variant_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.list_workflow_variants()


        asyncio.run(main())
        """
        _response = await self._raw_client.list_workflow_variants(
            workflow_ref=workflow_ref,
            variant_ref=variant_ref,
            variant_meta=variant_meta,
            variant_flags=variant_flags,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    async def create_workflow_variant(
        self,
        *,
        variant: WorkflowVariant,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant : WorkflowVariant

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi, WorkflowVariant

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.create_workflow_variant(
                variant=WorkflowVariant(),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_workflow_variant(
            variant=variant, request_options=request_options
        )
        return _response.data

    async def fetch_workflow_variant(
        self,
        variant_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.fetch_workflow_variant(
                variant_id="variant_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.fetch_workflow_variant(
            variant_id, request_options=request_options
        )
        return _response.data

    async def edit_workflow_variant(
        self,
        variant_id: str,
        *,
        variant: WorkflowVariant,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant_id : str

        variant : WorkflowVariant

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi, WorkflowVariant

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.edit_workflow_variant(
                variant_id="variant_id",
                variant=WorkflowVariant(),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.edit_workflow_variant(
            variant_id, variant=variant, request_options=request_options
        )
        return _response.data

    async def archive_workflow_variant(
        self,
        variant_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.archive_workflow_variant(
                variant_id="variant_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.archive_workflow_variant(
            variant_id, request_options=request_options
        )
        return _response.data

    async def unarchive_workflow_variant(
        self,
        variant_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.unarchive_workflow_variant(
                variant_id="variant_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.unarchive_workflow_variant(
            variant_id, request_options=request_options
        )
        return _response.data

    async def query_workflow_variants(
        self,
        *,
        workflow_ref: typing.Optional[str] = None,
        variant_ref: typing.Optional[str] = None,
        variant_meta: typing.Optional[str] = None,
        variant_flags: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantsResponse:
        """
        Parameters
        ----------
        workflow_ref : typing.Optional[str]
            JSON string of reference, e.g. {"key": value}

        variant_ref : typing.Optional[str]
            JSON string of reference, e.g. {"key": value}

        variant_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        variant_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.query_workflow_variants()


        asyncio.run(main())
        """
        _response = await self._raw_client.query_workflow_variants(
            workflow_ref=workflow_ref,
            variant_ref=variant_ref,
            variant_meta=variant_meta,
            variant_flags=variant_flags,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    async def commit_workflow_revision_by_variant_id(
        self,
        variant_id: typing.Optional[str],
        *,
        revision: WorkflowRevision,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        variant_id : typing.Optional[str]

        revision : WorkflowRevision

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi, WorkflowRevision

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.commit_workflow_revision_by_variant_id(
                revision=WorkflowRevision(),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.commit_workflow_revision_by_variant_id(
            variant_id, revision=revision, request_options=request_options
        )
        return _response.data

    async def fork_workflow_variant(
        self,
        variant_id: typing.Optional[str],
        *,
        revision: WorkflowRevision,
        revision_id: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        variant_id : typing.Optional[str]

        revision : WorkflowRevision

        revision_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi, WorkflowRevision

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.fork_workflow_variant(
                revision=WorkflowRevision(),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.fork_workflow_variant(
            variant_id,
            revision=revision,
            revision_id=revision_id,
            request_options=request_options,
        )
        return _response.data

    async def list_workflow_revisions(
        self,
        *,
        variant_ref: typing.Optional[str] = None,
        revision_ref: typing.Optional[str] = None,
        revision_meta: typing.Optional[str] = None,
        revision_flags: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionsResponse:
        """
        Parameters
        ----------
        variant_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        revision_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        revision_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        revision_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.list_workflow_revisions()


        asyncio.run(main())
        """
        _response = await self._raw_client.list_workflow_revisions(
            variant_ref=variant_ref,
            revision_ref=revision_ref,
            revision_meta=revision_meta,
            revision_flags=revision_flags,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    async def create_workflow_revision(
        self,
        *,
        revision: WorkflowRevision,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision : WorkflowRevision

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi, WorkflowRevision

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.create_workflow_revision(
                revision=WorkflowRevision(),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.create_workflow_revision(
            revision=revision, request_options=request_options
        )
        return _response.data

    async def fetch_workflow_revision(
        self,
        revision_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.fetch_workflow_revision(
                revision_id="revision_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.fetch_workflow_revision(
            revision_id, request_options=request_options
        )
        return _response.data

    async def edit_workflow_revision(
        self,
        revision_id: str,
        *,
        revision: WorkflowRevision,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision_id : str

        revision : WorkflowRevision

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi, WorkflowRevision

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.edit_workflow_revision(
                revision_id="revision_id",
                revision=WorkflowRevision(),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.edit_workflow_revision(
            revision_id, revision=revision, request_options=request_options
        )
        return _response.data

    async def archive_workflow_revision_rpc(
        self,
        revision_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.archive_workflow_revision_rpc(
                revision_id="revision_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.archive_workflow_revision_rpc(
            revision_id, request_options=request_options
        )
        return _response.data

    async def unarchive_workflow_revision_rpc(
        self,
        revision_id: str,
        *,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.unarchive_workflow_revision_rpc(
                revision_id="revision_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.unarchive_workflow_revision_rpc(
            revision_id, request_options=request_options
        )
        return _response.data

    async def query_workflow_revisions(
        self,
        *,
        variant_ref: typing.Optional[str] = None,
        revision_ref: typing.Optional[str] = None,
        revision_meta: typing.Optional[str] = None,
        revision_flags: typing.Optional[str] = None,
        include_archived: typing.Optional[bool] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionsResponse:
        """
        Parameters
        ----------
        variant_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        revision_ref : typing.Optional[str]
            JSON string of ref, e.g. {"key": value}

        revision_meta : typing.Optional[str]
            JSON string of meta, e.g. {"key": value}

        revision_flags : typing.Optional[str]
            JSON string of flags, e.g. {"key": value}

        include_archived : typing.Optional[bool]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.query_workflow_revisions()


        asyncio.run(main())
        """
        _response = await self._raw_client.query_workflow_revisions(
            variant_ref=variant_ref,
            revision_ref=revision_ref,
            revision_meta=revision_meta,
            revision_flags=revision_flags,
            include_archived=include_archived,
            request_options=request_options,
        )
        return _response.data

    async def fork_workflow_variant_by_revision_id(
        self,
        revision_id: typing.Optional[str],
        *,
        revision: WorkflowRevision,
        variant_id: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowVariantResponse:
        """
        Parameters
        ----------
        revision_id : typing.Optional[str]

        revision : WorkflowRevision

        variant_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowVariantResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi, WorkflowRevision

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.fork_workflow_variant_by_revision_id(
                revision=WorkflowRevision(),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.fork_workflow_variant_by_revision_id(
            revision_id,
            revision=revision,
            variant_id=variant_id,
            request_options=request_options,
        )
        return _response.data

    async def commit_workflow_revision(
        self,
        *,
        revision: WorkflowRevision,
        variant_id: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionResponse:
        """
        Parameters
        ----------
        revision : WorkflowRevision

        variant_id : typing.Optional[str]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi, WorkflowRevision

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.commit_workflow_revision(
                revision=WorkflowRevision(),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.commit_workflow_revision(
            revision=revision, variant_id=variant_id, request_options=request_options
        )
        return _response.data

    async def log_workflow_revisions(
        self,
        *,
        depth: typing.Optional[int] = None,
        variant_ref: typing.Optional[Reference] = OMIT,
        revision_ref: typing.Optional[Reference] = OMIT,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> WorkflowRevisionsResponse:
        """
        Parameters
        ----------
        depth : typing.Optional[int]

        variant_ref : typing.Optional[Reference]

        revision_ref : typing.Optional[Reference]

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        WorkflowRevisionsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from agenta import AsyncAgentaApi

        client = AsyncAgentaApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.workflows.log_workflow_revisions()


        asyncio.run(main())
        """
        _response = await self._raw_client.log_workflow_revisions(
            depth=depth,
            variant_ref=variant_ref,
            revision_ref=revision_ref,
            request_options=request_options,
        )
        return _response.data
