"""
@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 sys
import typing

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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

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

class _AngleEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Angle.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    ANGLE_UNSPECIFIED: _Angle.ValueType  # 0
    ANGLE_0: _Angle.ValueType  # 1
    ANGLE_90: _Angle.ValueType  # 2
    ANGLE_180: _Angle.ValueType  # 3
    ANGLE_270: _Angle.ValueType  # 4

class Angle(_Angle, metaclass=_AngleEnumTypeWrapper): ...

ANGLE_UNSPECIFIED: Angle.ValueType  # 0
ANGLE_0: Angle.ValueType  # 1
ANGLE_90: Angle.ValueType  # 2
ANGLE_180: Angle.ValueType  # 3
ANGLE_270: Angle.ValueType  # 4
global___Angle = Angle

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

class _LayoutTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_LayoutType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    LAYOUT_TYPE_UNSPECIFIED: _LayoutType.ValueType  # 0
    LAYOUT_TYPE_UNKNOWN: _LayoutType.ValueType  # 1
    LAYOUT_TYPE_TEXT: _LayoutType.ValueType  # 2
    LAYOUT_TYPE_HEADER: _LayoutType.ValueType  # 3
    LAYOUT_TYPE_SECTION_HEADER: _LayoutType.ValueType  # 4
    LAYOUT_TYPE_FOOTER: _LayoutType.ValueType  # 5
    LAYOUT_TYPE_FOOTNOTE: _LayoutType.ValueType  # 6
    LAYOUT_TYPE_PICTURE: _LayoutType.ValueType  # 7
    LAYOUT_TYPE_CAPTION: _LayoutType.ValueType  # 8
    LAYOUT_TYPE_TITLE: _LayoutType.ValueType  # 9
    LAYOUT_TYPE_LIST: _LayoutType.ValueType  # 10

class LayoutType(_LayoutType, metaclass=_LayoutTypeEnumTypeWrapper): ...

LAYOUT_TYPE_UNSPECIFIED: LayoutType.ValueType  # 0
LAYOUT_TYPE_UNKNOWN: LayoutType.ValueType  # 1
LAYOUT_TYPE_TEXT: LayoutType.ValueType  # 2
LAYOUT_TYPE_HEADER: LayoutType.ValueType  # 3
LAYOUT_TYPE_SECTION_HEADER: LayoutType.ValueType  # 4
LAYOUT_TYPE_FOOTER: LayoutType.ValueType  # 5
LAYOUT_TYPE_FOOTNOTE: LayoutType.ValueType  # 6
LAYOUT_TYPE_PICTURE: LayoutType.ValueType  # 7
LAYOUT_TYPE_CAPTION: LayoutType.ValueType  # 8
LAYOUT_TYPE_TITLE: LayoutType.ValueType  # 9
LAYOUT_TYPE_LIST: LayoutType.ValueType  # 10
global___LayoutType = LayoutType

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

    VERTICES_FIELD_NUMBER: builtins.int
    @property
    def vertices(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Vertex]:
        """The bounding polygon vertices."""

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

global___Polygon = Polygon

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

    X_FIELD_NUMBER: builtins.int
    Y_FIELD_NUMBER: builtins.int
    x: builtins.int
    """X coordinate in pixels."""
    y: builtins.int
    """Y coordinate in pixels."""
    def __init__(
        self,
        *,
        x: builtins.int = ...,
        y: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["x", b"x", "y", b"y"]) -> None: ...

global___Vertex = Vertex

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

    WIDTH_FIELD_NUMBER: builtins.int
    HEIGHT_FIELD_NUMBER: builtins.int
    BLOCKS_FIELD_NUMBER: builtins.int
    ENTITIES_FIELD_NUMBER: builtins.int
    TABLES_FIELD_NUMBER: builtins.int
    FULL_TEXT_FIELD_NUMBER: builtins.int
    ROTATE_FIELD_NUMBER: builtins.int
    MARKDOWN_FIELD_NUMBER: builtins.int
    PICTURES_FIELD_NUMBER: builtins.int
    width: builtins.int
    """Page width in pixels."""
    height: builtins.int
    """Page height in pixels."""
    full_text: builtins.str
    """Full text recognized from image."""
    rotate: global___Angle.ValueType
    """Angle of image rotation."""
    markdown: builtins.str
    """Full markdown (without pictures inside) from image. Available only in markdown and math-markdown models."""
    @property
    def blocks(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Block]:
        """Recognized text blocks in this page."""

    @property
    def entities(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Entity]:
        """Recognized entities."""

    @property
    def tables(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Table]: ...
    @property
    def pictures(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Picture]:
        """List of pictures locations from image."""

    def __init__(
        self,
        *,
        width: builtins.int = ...,
        height: builtins.int = ...,
        blocks: collections.abc.Iterable[global___Block] | None = ...,
        entities: collections.abc.Iterable[global___Entity] | None = ...,
        tables: collections.abc.Iterable[global___Table] | None = ...,
        full_text: builtins.str = ...,
        rotate: global___Angle.ValueType = ...,
        markdown: builtins.str = ...,
        pictures: collections.abc.Iterable[global___Picture] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["blocks", b"blocks", "entities", b"entities", "full_text", b"full_text", "height", b"height", "markdown", b"markdown", "pictures", b"pictures", "rotate", b"rotate", "tables", b"tables", "width", b"width"]) -> None: ...

global___TextAnnotation = TextAnnotation

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

    NAME_FIELD_NUMBER: builtins.int
    TEXT_FIELD_NUMBER: builtins.int
    name: builtins.str
    """Entity name."""
    text: builtins.str
    """Recognized entity text."""
    def __init__(
        self,
        *,
        name: builtins.str = ...,
        text: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["name", b"name", "text", b"text"]) -> None: ...

global___Entity = Entity

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

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

        LANGUAGE_CODE_FIELD_NUMBER: builtins.int
        language_code: builtins.str
        """Detected language code."""
        def __init__(
            self,
            *,
            language_code: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["language_code", b"language_code"]) -> None: ...

    BOUNDING_BOX_FIELD_NUMBER: builtins.int
    LINES_FIELD_NUMBER: builtins.int
    LANGUAGES_FIELD_NUMBER: builtins.int
    TEXT_SEGMENTS_FIELD_NUMBER: builtins.int
    LAYOUT_TYPE_FIELD_NUMBER: builtins.int
    layout_type: global___LayoutType.ValueType
    """Block layout type."""
    @property
    def bounding_box(self) -> global___Polygon:
        """Area on the page where the text block is located."""

    @property
    def lines(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Line]:
        """Recognized lines in this block."""

    @property
    def languages(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Block.DetectedLanguage]:
        """A list of detected languages"""

    @property
    def text_segments(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TextSegments]:
        """Block position from full_text string."""

    def __init__(
        self,
        *,
        bounding_box: global___Polygon | None = ...,
        lines: collections.abc.Iterable[global___Line] | None = ...,
        languages: collections.abc.Iterable[global___Block.DetectedLanguage] | None = ...,
        text_segments: collections.abc.Iterable[global___TextSegments] | None = ...,
        layout_type: global___LayoutType.ValueType = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["bounding_box", b"bounding_box"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["bounding_box", b"bounding_box", "languages", b"languages", "layout_type", b"layout_type", "lines", b"lines", "text_segments", b"text_segments"]) -> None: ...

global___Block = Block

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

    BOUNDING_BOX_FIELD_NUMBER: builtins.int
    TEXT_FIELD_NUMBER: builtins.int
    WORDS_FIELD_NUMBER: builtins.int
    TEXT_SEGMENTS_FIELD_NUMBER: builtins.int
    ORIENTATION_FIELD_NUMBER: builtins.int
    text: builtins.str
    """Recognized text."""
    orientation: global___Angle.ValueType
    """Angle of line rotation."""
    @property
    def bounding_box(self) -> global___Polygon:
        """Area on the page where the line is located."""

    @property
    def words(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Word]:
        """Recognized words."""

    @property
    def text_segments(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TextSegments]:
        """Line position from full_text string."""

    def __init__(
        self,
        *,
        bounding_box: global___Polygon | None = ...,
        text: builtins.str = ...,
        words: collections.abc.Iterable[global___Word] | None = ...,
        text_segments: collections.abc.Iterable[global___TextSegments] | None = ...,
        orientation: global___Angle.ValueType = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["bounding_box", b"bounding_box"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["bounding_box", b"bounding_box", "orientation", b"orientation", "text", b"text", "text_segments", b"text_segments", "words", b"words"]) -> None: ...

global___Line = Line

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

    BOUNDING_BOX_FIELD_NUMBER: builtins.int
    TEXT_FIELD_NUMBER: builtins.int
    ENTITY_INDEX_FIELD_NUMBER: builtins.int
    TEXT_SEGMENTS_FIELD_NUMBER: builtins.int
    text: builtins.str
    """Recognized word value."""
    entity_index: builtins.int
    """ID of the recognized word in entities array."""
    @property
    def bounding_box(self) -> global___Polygon:
        """Area on the page where the word is located."""

    @property
    def text_segments(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TextSegments]:
        """Word position from full_text string."""

    def __init__(
        self,
        *,
        bounding_box: global___Polygon | None = ...,
        text: builtins.str = ...,
        entity_index: builtins.int = ...,
        text_segments: collections.abc.Iterable[global___TextSegments] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["bounding_box", b"bounding_box"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["bounding_box", b"bounding_box", "entity_index", b"entity_index", "text", b"text", "text_segments", b"text_segments"]) -> None: ...

global___Word = Word

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

    START_INDEX_FIELD_NUMBER: builtins.int
    LENGTH_FIELD_NUMBER: builtins.int
    start_index: builtins.int
    """Start character position from full_text string."""
    length: builtins.int
    """Text segment length."""
    def __init__(
        self,
        *,
        start_index: builtins.int = ...,
        length: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["length", b"length", "start_index", b"start_index"]) -> None: ...

global___TextSegments = TextSegments

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

    BOUNDING_BOX_FIELD_NUMBER: builtins.int
    ROW_COUNT_FIELD_NUMBER: builtins.int
    COLUMN_COUNT_FIELD_NUMBER: builtins.int
    CELLS_FIELD_NUMBER: builtins.int
    row_count: builtins.int
    """Number of rows in table."""
    column_count: builtins.int
    """Number of columns in table."""
    @property
    def bounding_box(self) -> global___Polygon:
        """Area on the page where the table is located."""

    @property
    def cells(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TableCell]:
        """Table cells."""

    def __init__(
        self,
        *,
        bounding_box: global___Polygon | None = ...,
        row_count: builtins.int = ...,
        column_count: builtins.int = ...,
        cells: collections.abc.Iterable[global___TableCell] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["bounding_box", b"bounding_box"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["bounding_box", b"bounding_box", "cells", b"cells", "column_count", b"column_count", "row_count", b"row_count"]) -> None: ...

global___Table = Table

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

    BOUNDING_BOX_FIELD_NUMBER: builtins.int
    ROW_INDEX_FIELD_NUMBER: builtins.int
    COLUMN_INDEX_FIELD_NUMBER: builtins.int
    COLUMN_SPAN_FIELD_NUMBER: builtins.int
    ROW_SPAN_FIELD_NUMBER: builtins.int
    TEXT_FIELD_NUMBER: builtins.int
    TEXT_SEGMENTS_FIELD_NUMBER: builtins.int
    row_index: builtins.int
    """Row index."""
    column_index: builtins.int
    """Column index."""
    column_span: builtins.int
    """Column span."""
    row_span: builtins.int
    """Row span."""
    text: builtins.str
    """Text in cell."""
    @property
    def bounding_box(self) -> global___Polygon:
        """Area on the page where the table cell is located."""

    @property
    def text_segments(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TextSegments]:
        """Table cell position from full_text string."""

    def __init__(
        self,
        *,
        bounding_box: global___Polygon | None = ...,
        row_index: builtins.int = ...,
        column_index: builtins.int = ...,
        column_span: builtins.int = ...,
        row_span: builtins.int = ...,
        text: builtins.str = ...,
        text_segments: collections.abc.Iterable[global___TextSegments] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["bounding_box", b"bounding_box"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["bounding_box", b"bounding_box", "column_index", b"column_index", "column_span", b"column_span", "row_index", b"row_index", "row_span", b"row_span", "text", b"text", "text_segments", b"text_segments"]) -> None: ...

global___TableCell = TableCell

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

    BOUNDING_BOX_FIELD_NUMBER: builtins.int
    SCORE_FIELD_NUMBER: builtins.int
    score: builtins.float
    """Confidence score of picture location."""
    @property
    def bounding_box(self) -> global___Polygon:
        """Area on the page where the picture is located."""

    def __init__(
        self,
        *,
        bounding_box: global___Polygon | None = ...,
        score: builtins.float = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["bounding_box", b"bounding_box"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["bounding_box", b"bounding_box", "score", b"score"]) -> None: ...

global___Picture = Picture
