"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
*!
Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2026)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from streamlit.proto import ArrowNamedDataSet_pb2 as _ArrowNamedDataSet_pb2
from streamlit.proto import Block_pb2 as _Block_pb2
from streamlit.proto import Element_pb2 as _Element_pb2
from streamlit.proto import NamedDataSet_pb2 as _NamedDataSet_pb2
from streamlit.proto import Transient_pb2 as _Transient_pb2
import builtins as _builtins
import sys
import typing as _typing

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

DESCRIPTOR: _descriptor.FileDescriptor

@_typing.final
class Delta(_message.Message):
    """A change to an element."""

    DESCRIPTOR: _descriptor.Descriptor

    NEW_ELEMENT_FIELD_NUMBER: _builtins.int
    ADD_BLOCK_FIELD_NUMBER: _builtins.int
    NEW_TRANSIENT_FIELD_NUMBER: _builtins.int
    ADD_ROWS_FIELD_NUMBER: _builtins.int
    ARROW_ADD_ROWS_FIELD_NUMBER: _builtins.int
    FRAGMENT_ID_FIELD_NUMBER: _builtins.int
    fragment_id: _builtins.str
    @_builtins.property
    def new_element(self) -> _Element_pb2.Element:
        """Append a new element to the frontend."""

    @_builtins.property
    def add_block(self) -> _Block_pb2.Block:
        """Append a new block to the frontend."""

    @_builtins.property
    def new_transient(self) -> _Transient_pb2.Transient:
        """Append a new transient element (e.g. spinner) to the frontend."""

    @_builtins.property
    def add_rows(self) -> _NamedDataSet_pb2.NamedDataSet:
        """Append data to a DataFrame in for current element. The element to add to
        is identified by the ID field, above. The dataframe is identified either
        by NamedDataSet.name or by setting NamedDataSet.has_name to false.
        All elements that contain a DataFrame should support add_rows.
        """

    @_builtins.property
    def arrow_add_rows(self) -> _ArrowNamedDataSet_pb2.ArrowNamedDataSet: ...
    def __init__(
        self,
        *,
        new_element: _Element_pb2.Element | None = ...,
        add_block: _Block_pb2.Block | None = ...,
        new_transient: _Transient_pb2.Transient | None = ...,
        add_rows: _NamedDataSet_pb2.NamedDataSet | None = ...,
        arrow_add_rows: _ArrowNamedDataSet_pb2.ArrowNamedDataSet | None = ...,
        fragment_id: _builtins.str = ...,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _typing.Literal["add_block", b"add_block", "add_rows", b"add_rows", "arrow_add_rows", b"arrow_add_rows", "new_element", b"new_element", "new_transient", b"new_transient", "type", b"type"]  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["add_block", b"add_block", "add_rows", b"add_rows", "arrow_add_rows", b"arrow_add_rows", "fragment_id", b"fragment_id", "new_element", b"new_element", "new_transient", b"new_transient", "type", b"type"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
    _WhichOneofReturnType_type: _TypeAlias = _typing.Literal["new_element", "add_block", "new_transient", "add_rows", "arrow_add_rows"]  # noqa: Y015
    _WhichOneofArgType_type: _TypeAlias = _typing.Literal["type", b"type"]  # noqa: Y015
    def WhichOneof(self, oneof_group: _WhichOneofArgType_type) -> _WhichOneofReturnType_type | None: ...

Global___Delta: _TypeAlias = Delta  # noqa: Y015
