"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import abc
import collections.abc
import google.protobuf.empty_pb2
import grpc
import grpc.aio
import typing
import yandex.cloud.datasphere.v2.jobs.jobs_pb2
import yandex.cloud.datasphere.v2.jobs.project_job_service_pb2
import yandex.cloud.operation.operation_pb2

_T = typing.TypeVar("_T")

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext):  # type: ignore[misc, type-arg]
    ...

class ProjectJobServiceStub:
    """A set of methods for managing Project Jobs. Do not use these methods manually.
    For working with DataSphere Jobs, install DataSphere CLI via `pip install datasphere`.
    """

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.CreateProjectJobRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates job."""

    Clone: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.CloneProjectJobRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Clone job."""

    Execute: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ExecuteProjectJobRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Runs job execution."""

    Cancel: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.CancelProjectJobRequest,
        google.protobuf.empty_pb2.Empty,
    ]
    """Cancels running job."""

    ReadStdLogs: grpc.UnaryStreamMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobStdLogsRequest,
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobStdLogsResponse,
    ]
    """Returns stream of job logs."""

    ReadLogs: grpc.UnaryStreamMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobLogsRequest,
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobLogsResponse,
    ]
    """Returns stream of job logs."""

    DownloadJobFiles: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DownloadProjectJobFilesRequest,
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DownloadProjectJobFilesResponse,
    ]
    """Returns download urls for job files."""

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ListProjectJobRequest,
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ListProjectJobResponse,
    ]
    """Lists jobs."""

    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.GetProjectJobRequest,
        yandex.cloud.datasphere.v2.jobs.jobs_pb2.Job,
    ]
    """Returns job by id."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DeleteProjectJobRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes specified job."""

    DeleteData: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DeleteProjectJobDataRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Delete job data."""

    DeleteAllData: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DeleteAllProjectJobDataRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Delete all jobs data."""

    SetDataTtl: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.SetProjectJobDataTtlRequest,
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.SetProjectJobDataTtlResponse,
    ]
    """Update job data ttl."""

class ProjectJobServiceAsyncStub:
    """A set of methods for managing Project Jobs. Do not use these methods manually.
    For working with DataSphere Jobs, install DataSphere CLI via `pip install datasphere`.
    """

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.CreateProjectJobRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates job."""

    Clone: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.CloneProjectJobRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Clone job."""

    Execute: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ExecuteProjectJobRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Runs job execution."""

    Cancel: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.CancelProjectJobRequest,
        google.protobuf.empty_pb2.Empty,
    ]
    """Cancels running job."""

    ReadStdLogs: grpc.aio.UnaryStreamMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobStdLogsRequest,
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobStdLogsResponse,
    ]
    """Returns stream of job logs."""

    ReadLogs: grpc.aio.UnaryStreamMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobLogsRequest,
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobLogsResponse,
    ]
    """Returns stream of job logs."""

    DownloadJobFiles: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DownloadProjectJobFilesRequest,
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DownloadProjectJobFilesResponse,
    ]
    """Returns download urls for job files."""

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ListProjectJobRequest,
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ListProjectJobResponse,
    ]
    """Lists jobs."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.GetProjectJobRequest,
        yandex.cloud.datasphere.v2.jobs.jobs_pb2.Job,
    ]
    """Returns job by id."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DeleteProjectJobRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes specified job."""

    DeleteData: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DeleteProjectJobDataRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Delete job data."""

    DeleteAllData: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DeleteAllProjectJobDataRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Delete all jobs data."""

    SetDataTtl: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.SetProjectJobDataTtlRequest,
        yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.SetProjectJobDataTtlResponse,
    ]
    """Update job data ttl."""

class ProjectJobServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing Project Jobs. Do not use these methods manually.
    For working with DataSphere Jobs, install DataSphere CLI via `pip install datasphere`.
    """

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.CreateProjectJobRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Creates job."""

    @abc.abstractmethod
    def Clone(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.CloneProjectJobRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Clone job."""

    @abc.abstractmethod
    def Execute(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ExecuteProjectJobRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Runs job execution."""

    @abc.abstractmethod
    def Cancel(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.CancelProjectJobRequest,
        context: _ServicerContext,
    ) -> typing.Union[google.protobuf.empty_pb2.Empty, collections.abc.Awaitable[google.protobuf.empty_pb2.Empty]]:
        """Cancels running job."""

    @abc.abstractmethod
    def ReadStdLogs(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobStdLogsRequest,
        context: _ServicerContext,
    ) -> typing.Union[collections.abc.Iterator[yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobStdLogsResponse], collections.abc.AsyncIterator[yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobStdLogsResponse]]:
        """Returns stream of job logs."""

    @abc.abstractmethod
    def ReadLogs(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobLogsRequest,
        context: _ServicerContext,
    ) -> typing.Union[collections.abc.Iterator[yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobLogsResponse], collections.abc.AsyncIterator[yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ReadProjectJobLogsResponse]]:
        """Returns stream of job logs."""

    @abc.abstractmethod
    def DownloadJobFiles(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DownloadProjectJobFilesRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DownloadProjectJobFilesResponse, collections.abc.Awaitable[yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DownloadProjectJobFilesResponse]]:
        """Returns download urls for job files."""

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ListProjectJobRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ListProjectJobResponse, collections.abc.Awaitable[yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.ListProjectJobResponse]]:
        """Lists jobs."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.GetProjectJobRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.datasphere.v2.jobs.jobs_pb2.Job, collections.abc.Awaitable[yandex.cloud.datasphere.v2.jobs.jobs_pb2.Job]]:
        """Returns job by id."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DeleteProjectJobRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deletes specified job."""

    @abc.abstractmethod
    def DeleteData(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DeleteProjectJobDataRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Delete job data."""

    @abc.abstractmethod
    def DeleteAllData(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.DeleteAllProjectJobDataRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Delete all jobs data."""

    @abc.abstractmethod
    def SetDataTtl(
        self,
        request: yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.SetProjectJobDataTtlRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.SetProjectJobDataTtlResponse, collections.abc.Awaitable[yandex.cloud.datasphere.v2.jobs.project_job_service_pb2.SetProjectJobDataTtlResponse]]:
        """Update job data ttl."""

def add_ProjectJobServiceServicer_to_server(servicer: ProjectJobServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
