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

import abc
import collections.abc
import grpc
import grpc.aio
import typing
import yandex.cloud.containerregistry.v1.scanner_pb2
import yandex.cloud.containerregistry.v1.scanner_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 ScannerServiceStub:
    """A set of methods for scanning Docker images."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Scan: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.containerregistry.v1.scanner_service_pb2.ScanRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Executes scanning of specified image."""

    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.containerregistry.v1.scanner_service_pb2.GetScanResultRequest,
        yandex.cloud.containerregistry.v1.scanner_pb2.ScanResult,
    ]
    """Returns the specified ScanResult resource.

    To get the list of ScanResults for specified Image, make a [List] request.
    """

    GetLast: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.containerregistry.v1.scanner_service_pb2.GetLastScanResultRequest,
        yandex.cloud.containerregistry.v1.scanner_pb2.ScanResult,
    ]
    """Returns the last finished ScanResult for the specified Image."""

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.containerregistry.v1.scanner_service_pb2.ListScanResultsRequest,
        yandex.cloud.containerregistry.v1.scanner_service_pb2.ListScanResultsResponse,
    ]
    """Retrieves the list of ScanResults for specified Image."""

    ListVulnerabilities: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.containerregistry.v1.scanner_service_pb2.ListVulnerabilitiesRequest,
        yandex.cloud.containerregistry.v1.scanner_service_pb2.ListVulnerabilitiesResponse,
    ]
    """Retrieves the list of vulnerabilities found in particular scan."""

class ScannerServiceAsyncStub:
    """A set of methods for scanning Docker images."""

    Scan: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.containerregistry.v1.scanner_service_pb2.ScanRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Executes scanning of specified image."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.containerregistry.v1.scanner_service_pb2.GetScanResultRequest,
        yandex.cloud.containerregistry.v1.scanner_pb2.ScanResult,
    ]
    """Returns the specified ScanResult resource.

    To get the list of ScanResults for specified Image, make a [List] request.
    """

    GetLast: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.containerregistry.v1.scanner_service_pb2.GetLastScanResultRequest,
        yandex.cloud.containerregistry.v1.scanner_pb2.ScanResult,
    ]
    """Returns the last finished ScanResult for the specified Image."""

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.containerregistry.v1.scanner_service_pb2.ListScanResultsRequest,
        yandex.cloud.containerregistry.v1.scanner_service_pb2.ListScanResultsResponse,
    ]
    """Retrieves the list of ScanResults for specified Image."""

    ListVulnerabilities: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.containerregistry.v1.scanner_service_pb2.ListVulnerabilitiesRequest,
        yandex.cloud.containerregistry.v1.scanner_service_pb2.ListVulnerabilitiesResponse,
    ]
    """Retrieves the list of vulnerabilities found in particular scan."""

class ScannerServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for scanning Docker images."""

    @abc.abstractmethod
    def Scan(
        self,
        request: yandex.cloud.containerregistry.v1.scanner_service_pb2.ScanRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Executes scanning of specified image."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.containerregistry.v1.scanner_service_pb2.GetScanResultRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.containerregistry.v1.scanner_pb2.ScanResult, collections.abc.Awaitable[yandex.cloud.containerregistry.v1.scanner_pb2.ScanResult]]:
        """Returns the specified ScanResult resource.

        To get the list of ScanResults for specified Image, make a [List] request.
        """

    @abc.abstractmethod
    def GetLast(
        self,
        request: yandex.cloud.containerregistry.v1.scanner_service_pb2.GetLastScanResultRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.containerregistry.v1.scanner_pb2.ScanResult, collections.abc.Awaitable[yandex.cloud.containerregistry.v1.scanner_pb2.ScanResult]]:
        """Returns the last finished ScanResult for the specified Image."""

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.containerregistry.v1.scanner_service_pb2.ListScanResultsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.containerregistry.v1.scanner_service_pb2.ListScanResultsResponse, collections.abc.Awaitable[yandex.cloud.containerregistry.v1.scanner_service_pb2.ListScanResultsResponse]]:
        """Retrieves the list of ScanResults for specified Image."""

    @abc.abstractmethod
    def ListVulnerabilities(
        self,
        request: yandex.cloud.containerregistry.v1.scanner_service_pb2.ListVulnerabilitiesRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.containerregistry.v1.scanner_service_pb2.ListVulnerabilitiesResponse, collections.abc.Awaitable[yandex.cloud.containerregistry.v1.scanner_service_pb2.ListVulnerabilitiesResponse]]:
        """Retrieves the list of vulnerabilities found in particular scan."""

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