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

import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import google.protobuf.timestamp_pb2
import sys
import typing

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _Device:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _DeviceEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Device.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    DEVICE_UNSPECIFIED: _Device.ValueType  # 0
    DEVICE_ALL: _Device.ValueType  # 1
    """All devices."""
    DEVICE_DESKTOP: _Device.ValueType  # 2
    """Desktop computers."""
    DEVICE_PHONE: _Device.ValueType  # 3
    """Phones."""
    DEVICE_TABLET: _Device.ValueType  # 4
    """Tablets."""

class Device(_Device, metaclass=_DeviceEnumTypeWrapper): ...

DEVICE_UNSPECIFIED: Device.ValueType  # 0
DEVICE_ALL: Device.ValueType  # 1
"""All devices."""
DEVICE_DESKTOP: Device.ValueType  # 2
"""Desktop computers."""
DEVICE_PHONE: Device.ValueType  # 3
"""Phones."""
DEVICE_TABLET: Device.ValueType  # 4
"""Tablets."""
global___Device = Device

@typing.final
class GetTopRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PHRASE_FIELD_NUMBER: builtins.int
    NUM_PHRASES_FIELD_NUMBER: builtins.int
    REGIONS_FIELD_NUMBER: builtins.int
    DEVICES_FIELD_NUMBER: builtins.int
    FOLDER_ID_FIELD_NUMBER: builtins.int
    phrase: builtins.str
    """Keyword"""
    num_phrases: builtins.int
    """Number of the phrases in the response."""
    folder_id: builtins.str
    """ID of the folder."""
    @property
    def regions(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """A list of IDs of the regions a query was made from."""

    @property
    def devices(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___Device.ValueType]:
        """A list of device types a query was made from."""

    def __init__(
        self,
        *,
        phrase: builtins.str = ...,
        num_phrases: builtins.int = ...,
        regions: collections.abc.Iterable[builtins.str] | None = ...,
        devices: collections.abc.Iterable[global___Device.ValueType] | None = ...,
        folder_id: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["devices", b"devices", "folder_id", b"folder_id", "num_phrases", b"num_phrases", "phrase", b"phrase", "regions", b"regions"]) -> None: ...

global___GetTopRequest = GetTopRequest

@typing.final
class GetTopResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class PhraseInfo(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        PHRASE_FIELD_NUMBER: builtins.int
        COUNT_FIELD_NUMBER: builtins.int
        phrase: builtins.str
        """Keyword."""
        count: builtins.int
        """Number of queries made."""
        def __init__(
            self,
            *,
            phrase: builtins.str = ...,
            count: builtins.int = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["count", b"count", "phrase", b"phrase"]) -> None: ...

    TOTAL_COUNT_FIELD_NUMBER: builtins.int
    RESULTS_FIELD_NUMBER: builtins.int
    ASSOCIATIONS_FIELD_NUMBER: builtins.int
    total_count: builtins.int
    """Total number of the queries that contain all the keywords, regardless of their order."""
    @property
    def results(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___GetTopResponse.PhraseInfo]:
        """Results."""

    @property
    def associations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___GetTopResponse.PhraseInfo]:
        """Queries that are similar to the specified one."""

    def __init__(
        self,
        *,
        total_count: builtins.int = ...,
        results: collections.abc.Iterable[global___GetTopResponse.PhraseInfo] | None = ...,
        associations: collections.abc.Iterable[global___GetTopResponse.PhraseInfo] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["associations", b"associations", "results", b"results", "total_count", b"total_count"]) -> None: ...

global___GetTopResponse = GetTopResponse

@typing.final
class GetDynamicsRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class _Period:
        ValueType = typing.NewType("ValueType", builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _PeriodEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[GetDynamicsRequest._Period.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        PERIOD_UNSPECIFIED: GetDynamicsRequest._Period.ValueType  # 0
        PERIOD_MONTHLY: GetDynamicsRequest._Period.ValueType  # 1
        """Details by month."""
        PERIOD_WEEKLY: GetDynamicsRequest._Period.ValueType  # 2
        """Details by week."""
        PERIOD_DAILY: GetDynamicsRequest._Period.ValueType  # 3
        """Details by day."""

    class Period(_Period, metaclass=_PeriodEnumTypeWrapper): ...
    PERIOD_UNSPECIFIED: GetDynamicsRequest.Period.ValueType  # 0
    PERIOD_MONTHLY: GetDynamicsRequest.Period.ValueType  # 1
    """Details by month."""
    PERIOD_WEEKLY: GetDynamicsRequest.Period.ValueType  # 2
    """Details by week."""
    PERIOD_DAILY: GetDynamicsRequest.Period.ValueType  # 3
    """Details by day."""

    PHRASE_FIELD_NUMBER: builtins.int
    PERIOD_FIELD_NUMBER: builtins.int
    FROM_DATE_FIELD_NUMBER: builtins.int
    TO_DATE_FIELD_NUMBER: builtins.int
    REGIONS_FIELD_NUMBER: builtins.int
    DEVICES_FIELD_NUMBER: builtins.int
    FOLDER_ID_FIELD_NUMBER: builtins.int
    phrase: builtins.str
    """Keyword."""
    period: global___GetDynamicsRequest.Period.ValueType
    """The period of aggregation of the number of queries."""
    folder_id: builtins.str
    """ID of the folder."""
    @property
    def from_date(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The start of the period data is requested for."""

    @property
    def to_date(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """The end of the period data is requested for."""

    @property
    def regions(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """A list of IDs of the regions a query was made from."""

    @property
    def devices(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___Device.ValueType]:
        """A list of device types a query was made from."""

    def __init__(
        self,
        *,
        phrase: builtins.str = ...,
        period: global___GetDynamicsRequest.Period.ValueType = ...,
        from_date: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        to_date: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        regions: collections.abc.Iterable[builtins.str] | None = ...,
        devices: collections.abc.Iterable[global___Device.ValueType] | None = ...,
        folder_id: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["from_date", b"from_date", "to_date", b"to_date"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["devices", b"devices", "folder_id", b"folder_id", "from_date", b"from_date", "period", b"period", "phrase", b"phrase", "regions", b"regions", "to_date", b"to_date"]) -> None: ...

global___GetDynamicsRequest = GetDynamicsRequest

@typing.final
class GetDynamicsResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class DynamicsInfo(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        DATE_FIELD_NUMBER: builtins.int
        COUNT_FIELD_NUMBER: builtins.int
        SHARE_FIELD_NUMBER: builtins.int
        count: builtins.int
        """Number of queries containing the given keyword"""
        share: builtins.float
        """The share of the number of such queries from the total number of queries to Yandex."""
        @property
        def date(self) -> google.protobuf.timestamp_pb2.Timestamp:
            """The date"""

        def __init__(
            self,
            *,
            date: google.protobuf.timestamp_pb2.Timestamp | None = ...,
            count: builtins.int = ...,
            share: builtins.float = ...,
        ) -> None: ...
        def HasField(self, field_name: typing.Literal["date", b"date"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing.Literal["count", b"count", "date", b"date", "share", b"share"]) -> None: ...

    RESULTS_FIELD_NUMBER: builtins.int
    @property
    def results(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___GetDynamicsResponse.DynamicsInfo]:
        """Results."""

    def __init__(
        self,
        *,
        results: collections.abc.Iterable[global___GetDynamicsResponse.DynamicsInfo] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["results", b"results"]) -> None: ...

global___GetDynamicsResponse = GetDynamicsResponse

@typing.final
class GetRegionsDistributionRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class _Region:
        ValueType = typing.NewType("ValueType", builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _RegionEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[GetRegionsDistributionRequest._Region.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        REGION_UNSPECIFIED: GetRegionsDistributionRequest._Region.ValueType  # 0
        REGION_ALL: GetRegionsDistributionRequest._Region.ValueType  # 1
        """Show distribution everywhere."""
        REGION_CITIES: GetRegionsDistributionRequest._Region.ValueType  # 2
        """Show distribution by cities."""
        REGION_REGIONS: GetRegionsDistributionRequest._Region.ValueType  # 3
        """Show distribution by regions."""

    class Region(_Region, metaclass=_RegionEnumTypeWrapper): ...
    REGION_UNSPECIFIED: GetRegionsDistributionRequest.Region.ValueType  # 0
    REGION_ALL: GetRegionsDistributionRequest.Region.ValueType  # 1
    """Show distribution everywhere."""
    REGION_CITIES: GetRegionsDistributionRequest.Region.ValueType  # 2
    """Show distribution by cities."""
    REGION_REGIONS: GetRegionsDistributionRequest.Region.ValueType  # 3
    """Show distribution by regions."""

    PHRASE_FIELD_NUMBER: builtins.int
    REGION_FIELD_NUMBER: builtins.int
    DEVICES_FIELD_NUMBER: builtins.int
    FOLDER_ID_FIELD_NUMBER: builtins.int
    phrase: builtins.str
    """Keyword"""
    region: global___GetRegionsDistributionRequest.Region.ValueType
    """Show query distribution only by city, only by region, or everywhere."""
    folder_id: builtins.str
    """ID of the folder."""
    @property
    def devices(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___Device.ValueType]:
        """A list of device types a query was made from."""

    def __init__(
        self,
        *,
        phrase: builtins.str = ...,
        region: global___GetRegionsDistributionRequest.Region.ValueType = ...,
        devices: collections.abc.Iterable[global___Device.ValueType] | None = ...,
        folder_id: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["devices", b"devices", "folder_id", b"folder_id", "phrase", b"phrase", "region", b"region"]) -> None: ...

global___GetRegionsDistributionRequest = GetRegionsDistributionRequest

@typing.final
class GetRegionsDistributionResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class RegionInfo(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        REGION_FIELD_NUMBER: builtins.int
        COUNT_FIELD_NUMBER: builtins.int
        SHARE_FIELD_NUMBER: builtins.int
        AFFINITY_INDEX_FIELD_NUMBER: builtins.int
        region: builtins.str
        """Region ID"""
        count: builtins.int
        """Number of queries containing the given keyword."""
        share: builtins.float
        """The share of the number of such queries from the total number of queries to Yandex in the region."""
        affinity_index: builtins.float
        """The ratio between the share of the selected queries in the region and their share across the country."""
        def __init__(
            self,
            *,
            region: builtins.str = ...,
            count: builtins.int = ...,
            share: builtins.float = ...,
            affinity_index: builtins.float = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["affinity_index", b"affinity_index", "count", b"count", "region", b"region", "share", b"share"]) -> None: ...

    RESULTS_FIELD_NUMBER: builtins.int
    @property
    def results(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___GetRegionsDistributionResponse.RegionInfo]:
        """Results."""

    def __init__(
        self,
        *,
        results: collections.abc.Iterable[global___GetRegionsDistributionResponse.RegionInfo] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["results", b"results"]) -> None: ...

global___GetRegionsDistributionResponse = GetRegionsDistributionResponse

@typing.final
class GetRegionsTreeRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    FOLDER_ID_FIELD_NUMBER: builtins.int
    folder_id: builtins.str
    """ID of the folder."""
    def __init__(
        self,
        *,
        folder_id: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["folder_id", b"folder_id"]) -> None: ...

global___GetRegionsTreeRequest = GetRegionsTreeRequest

@typing.final
class GetRegionsTreeResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class RegionInfo(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        ID_FIELD_NUMBER: builtins.int
        LABEL_FIELD_NUMBER: builtins.int
        CHILDREN_FIELD_NUMBER: builtins.int
        id: builtins.str
        """Region ID."""
        label: builtins.str
        """Region name"""
        @property
        def children(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___GetRegionsTreeResponse.RegionInfo]:
            """Child regions."""

        def __init__(
            self,
            *,
            id: builtins.str = ...,
            label: builtins.str = ...,
            children: collections.abc.Iterable[global___GetRegionsTreeResponse.RegionInfo] | None = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["children", b"children", "id", b"id", "label", b"label"]) -> None: ...

    REGIONS_FIELD_NUMBER: builtins.int
    @property
    def regions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___GetRegionsTreeResponse.RegionInfo]:
        """Region tree"""

    def __init__(
        self,
        *,
        regions: collections.abc.Iterable[global___GetRegionsTreeResponse.RegionInfo] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["regions", b"regions"]) -> None: ...

global___GetRegionsTreeResponse = GetRegionsTreeResponse
