"""
@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.searchapi.v2.wordstat_service_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 WordstatServiceStub:
    """A set of methods for viewing statistics on search queries to Yandex."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    GetTop: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetTopRequest,
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetTopResponse,
    ]
    """The method returns the last 30 days data about popular queries containing the specified keyword and queries that are similar to the specified one."""

    GetDynamics: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetDynamicsRequest,
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetDynamicsResponse,
    ]
    """The method returns the frequency of queries over time for a given keyword."""

    GetRegionsDistribution: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsDistributionRequest,
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsDistributionResponse,
    ]
    """The method returns the distribution of the number of queries containing the given keyword globally by region for the last 30 days."""

    GetRegionsTree: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsTreeRequest,
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsTreeResponse,
    ]
    """The method method returns a tree of Wordstat-supported regions."""

class WordstatServiceAsyncStub:
    """A set of methods for viewing statistics on search queries to Yandex."""

    GetTop: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetTopRequest,
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetTopResponse,
    ]
    """The method returns the last 30 days data about popular queries containing the specified keyword and queries that are similar to the specified one."""

    GetDynamics: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetDynamicsRequest,
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetDynamicsResponse,
    ]
    """The method returns the frequency of queries over time for a given keyword."""

    GetRegionsDistribution: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsDistributionRequest,
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsDistributionResponse,
    ]
    """The method returns the distribution of the number of queries containing the given keyword globally by region for the last 30 days."""

    GetRegionsTree: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsTreeRequest,
        yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsTreeResponse,
    ]
    """The method method returns a tree of Wordstat-supported regions."""

class WordstatServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for viewing statistics on search queries to Yandex."""

    @abc.abstractmethod
    def GetTop(
        self,
        request: yandex.cloud.searchapi.v2.wordstat_service_pb2.GetTopRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.searchapi.v2.wordstat_service_pb2.GetTopResponse, collections.abc.Awaitable[yandex.cloud.searchapi.v2.wordstat_service_pb2.GetTopResponse]]:
        """The method returns the last 30 days data about popular queries containing the specified keyword and queries that are similar to the specified one."""

    @abc.abstractmethod
    def GetDynamics(
        self,
        request: yandex.cloud.searchapi.v2.wordstat_service_pb2.GetDynamicsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.searchapi.v2.wordstat_service_pb2.GetDynamicsResponse, collections.abc.Awaitable[yandex.cloud.searchapi.v2.wordstat_service_pb2.GetDynamicsResponse]]:
        """The method returns the frequency of queries over time for a given keyword."""

    @abc.abstractmethod
    def GetRegionsDistribution(
        self,
        request: yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsDistributionRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsDistributionResponse, collections.abc.Awaitable[yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsDistributionResponse]]:
        """The method returns the distribution of the number of queries containing the given keyword globally by region for the last 30 days."""

    @abc.abstractmethod
    def GetRegionsTree(
        self,
        request: yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsTreeRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsTreeResponse, collections.abc.Awaitable[yandex.cloud.searchapi.v2.wordstat_service_pb2.GetRegionsTreeResponse]]:
        """The method method returns a tree of Wordstat-supported regions."""

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