"""
@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 collections import abc as _abc
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf.internal import containers as _containers
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
from streamlit.proto import AuthRedirect_pb2 as _AuthRedirect_pb2
from streamlit.proto import AutoRerun_pb2 as _AutoRerun_pb2
from streamlit.proto import Common_pb2 as _Common_pb2
from streamlit.proto import Delta_pb2 as _Delta_pb2
from streamlit.proto import GitInfo_pb2 as _GitInfo_pb2
from streamlit.proto import Logo_pb2 as _Logo_pb2
from streamlit.proto import Navigation_pb2 as _Navigation_pb2
from streamlit.proto import NewSession_pb2 as _NewSession_pb2
from streamlit.proto import PageConfig_pb2 as _PageConfig_pb2
from streamlit.proto import PageInfo_pb2 as _PageInfo_pb2
from streamlit.proto import PageNotFound_pb2 as _PageNotFound_pb2
from streamlit.proto import PageProfile_pb2 as _PageProfile_pb2
from streamlit.proto import ParentMessage_pb2 as _ParentMessage_pb2
from streamlit.proto import SessionEvent_pb2 as _SessionEvent_pb2
from streamlit.proto import SessionStatus_pb2 as _SessionStatus_pb2
import builtins as _builtins
import sys
import typing as _typing

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

DESCRIPTOR: _descriptor.FileDescriptor

@_typing.final
class ForwardMsg(_message.Message):
    """A message sent from Proxy to the browser"""

    DESCRIPTOR: _descriptor.Descriptor

    class _ScriptFinishedStatus:
        ValueType = _typing.NewType("ValueType", _builtins.int)
        V: _TypeAlias = ValueType  # noqa: Y015

    class _ScriptFinishedStatusEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[ForwardMsg._ScriptFinishedStatus.ValueType], _builtins.type):
        DESCRIPTOR: _descriptor.EnumDescriptor
        FINISHED_SUCCESSFULLY: ForwardMsg._ScriptFinishedStatus.ValueType  # 0
        """The script compiled and ran."""
        FINISHED_WITH_COMPILE_ERROR: ForwardMsg._ScriptFinishedStatus.ValueType  # 1
        """The script failed to compile"""
        FINISHED_EARLY_FOR_RERUN: ForwardMsg._ScriptFinishedStatus.ValueType  # 2
        """Script was interrupted by rerun"""
        FINISHED_FRAGMENT_RUN_SUCCESSFULLY: ForwardMsg._ScriptFinishedStatus.ValueType  # 3
        """A fragment of the script ran successfully."""

    class ScriptFinishedStatus(_ScriptFinishedStatus, metaclass=_ScriptFinishedStatusEnumTypeWrapper):
        """Values for the 'script_finished` type"""

    FINISHED_SUCCESSFULLY: ForwardMsg.ScriptFinishedStatus.ValueType  # 0
    """The script compiled and ran."""
    FINISHED_WITH_COMPILE_ERROR: ForwardMsg.ScriptFinishedStatus.ValueType  # 1
    """The script failed to compile"""
    FINISHED_EARLY_FOR_RERUN: ForwardMsg.ScriptFinishedStatus.ValueType  # 2
    """Script was interrupted by rerun"""
    FINISHED_FRAGMENT_RUN_SUCCESSFULLY: ForwardMsg.ScriptFinishedStatus.ValueType  # 3
    """A fragment of the script ran successfully."""

    HASH_FIELD_NUMBER: _builtins.int
    METADATA_FIELD_NUMBER: _builtins.int
    NEW_SESSION_FIELD_NUMBER: _builtins.int
    DELTA_FIELD_NUMBER: _builtins.int
    PAGE_INFO_CHANGED_FIELD_NUMBER: _builtins.int
    PAGE_CONFIG_CHANGED_FIELD_NUMBER: _builtins.int
    SCRIPT_FINISHED_FIELD_NUMBER: _builtins.int
    GIT_INFO_CHANGED_FIELD_NUMBER: _builtins.int
    PAGE_PROFILE_FIELD_NUMBER: _builtins.int
    SESSION_STATUS_CHANGED_FIELD_NUMBER: _builtins.int
    SESSION_EVENT_FIELD_NUMBER: _builtins.int
    NAVIGATION_FIELD_NUMBER: _builtins.int
    PAGE_NOT_FOUND_FIELD_NUMBER: _builtins.int
    FILE_URLS_RESPONSE_FIELD_NUMBER: _builtins.int
    AUTO_RERUN_FIELD_NUMBER: _builtins.int
    STOP_AUTO_RERUN_FIELD_NUMBER: _builtins.int
    LOGO_FIELD_NUMBER: _builtins.int
    AUTH_REDIRECT_FIELD_NUMBER: _builtins.int
    PARENT_MESSAGE_FIELD_NUMBER: _builtins.int
    REF_HASH_FIELD_NUMBER: _builtins.int
    HEARTBEAT_ACK_FIELD_NUMBER: _builtins.int
    BACKEND_OPERATION_RESPONSE_FIELD_NUMBER: _builtins.int
    DEBUG_LAST_BACKMSG_ID_FIELD_NUMBER: _builtins.int
    hash: _builtins.str
    """A hash that uniquely identifies this ForwardMsg, for caching."""
    script_finished: Global___ForwardMsg.ScriptFinishedStatus.ValueType
    ref_hash: _builtins.str
    """A reference to a ForwardMsg that has already been delivered
    and cached in the frontend. The client should substitute the message
    with the given hash for this one.
    """
    heartbeat_ack: _builtins.bool
    """Acknowledgment of app_heartbeat BackMsg, used for connection health
    monitoring. When the frontend sends an app_heartbeat, the server
    responds with this ack so the frontend can verify the connection is
    healthy.
    """
    debug_last_backmsg_id: _builtins.str
    """The ID of the last BackMsg that we received before sending this
    ForwardMsg. As its name suggests, this field should only be used for
    testing.
    """
    @_builtins.property
    def metadata(self) -> Global___ForwardMsgMetadata:
        """Contains 'non-payload' ForwardMsg data that isn't cached for the purposes
        of ForwardMsg de-duping.
        """

    @_builtins.property
    def new_session(self) -> _NewSession_pb2.NewSession:
        """App lifecycle messages."""

    @_builtins.property
    def delta(self) -> _Delta_pb2.Delta: ...
    @_builtins.property
    def page_info_changed(self) -> _PageInfo_pb2.PageInfo: ...
    @_builtins.property
    def page_config_changed(self) -> _PageConfig_pb2.PageConfig: ...
    @_builtins.property
    def git_info_changed(self) -> _GitInfo_pb2.GitInfo: ...
    @_builtins.property
    def page_profile(self) -> _PageProfile_pb2.PageProfile: ...
    @_builtins.property
    def session_status_changed(self) -> _SessionStatus_pb2.SessionStatus:
        """Status change and event messages."""

    @_builtins.property
    def session_event(self) -> _SessionEvent_pb2.SessionEvent: ...
    @_builtins.property
    def navigation(self) -> _Navigation_pb2.Navigation:
        """Other messages."""

    @_builtins.property
    def page_not_found(self) -> _PageNotFound_pb2.PageNotFound: ...
    @_builtins.property
    def file_urls_response(self) -> _Common_pb2.FileURLsResponse: ...
    @_builtins.property
    def auto_rerun(self) -> _AutoRerun_pb2.AutoRerun: ...
    @_builtins.property
    def stop_auto_rerun(self) -> _AutoRerun_pb2.StopAutoRerun: ...
    @_builtins.property
    def logo(self) -> _Logo_pb2.Logo:
        """App logo message"""

    @_builtins.property
    def auth_redirect(self) -> _AuthRedirect_pb2.AuthRedirect:
        """Auth redirect message"""

    @_builtins.property
    def parent_message(self) -> _ParentMessage_pb2.ParentMessage:
        """Platform - message to host"""

    @_builtins.property
    def backend_operation_response(self) -> Global___BackendOperationResponse:
        """Generic backend operation response for server-side operations.
        Corresponds to BackendOperationRequest in BackMsg.
        """

    def __init__(
        self,
        *,
        hash: _builtins.str = ...,
        metadata: Global___ForwardMsgMetadata | None = ...,
        new_session: _NewSession_pb2.NewSession | None = ...,
        delta: _Delta_pb2.Delta | None = ...,
        page_info_changed: _PageInfo_pb2.PageInfo | None = ...,
        page_config_changed: _PageConfig_pb2.PageConfig | None = ...,
        script_finished: Global___ForwardMsg.ScriptFinishedStatus.ValueType = ...,
        git_info_changed: _GitInfo_pb2.GitInfo | None = ...,
        page_profile: _PageProfile_pb2.PageProfile | None = ...,
        session_status_changed: _SessionStatus_pb2.SessionStatus | None = ...,
        session_event: _SessionEvent_pb2.SessionEvent | None = ...,
        navigation: _Navigation_pb2.Navigation | None = ...,
        page_not_found: _PageNotFound_pb2.PageNotFound | None = ...,
        file_urls_response: _Common_pb2.FileURLsResponse | None = ...,
        auto_rerun: _AutoRerun_pb2.AutoRerun | None = ...,
        stop_auto_rerun: _AutoRerun_pb2.StopAutoRerun | None = ...,
        logo: _Logo_pb2.Logo | None = ...,
        auth_redirect: _AuthRedirect_pb2.AuthRedirect | None = ...,
        parent_message: _ParentMessage_pb2.ParentMessage | None = ...,
        ref_hash: _builtins.str = ...,
        heartbeat_ack: _builtins.bool = ...,
        backend_operation_response: Global___BackendOperationResponse | None = ...,
        debug_last_backmsg_id: _builtins.str = ...,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _typing.Literal["auth_redirect", b"auth_redirect", "auto_rerun", b"auto_rerun", "backend_operation_response", b"backend_operation_response", "delta", b"delta", "file_urls_response", b"file_urls_response", "git_info_changed", b"git_info_changed", "heartbeat_ack", b"heartbeat_ack", "logo", b"logo", "metadata", b"metadata", "navigation", b"navigation", "new_session", b"new_session", "page_config_changed", b"page_config_changed", "page_info_changed", b"page_info_changed", "page_not_found", b"page_not_found", "page_profile", b"page_profile", "parent_message", b"parent_message", "ref_hash", b"ref_hash", "script_finished", b"script_finished", "session_event", b"session_event", "session_status_changed", b"session_status_changed", "stop_auto_rerun", b"stop_auto_rerun", "type", b"type"]  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["auth_redirect", b"auth_redirect", "auto_rerun", b"auto_rerun", "backend_operation_response", b"backend_operation_response", "debug_last_backmsg_id", b"debug_last_backmsg_id", "delta", b"delta", "file_urls_response", b"file_urls_response", "git_info_changed", b"git_info_changed", "hash", b"hash", "heartbeat_ack", b"heartbeat_ack", "logo", b"logo", "metadata", b"metadata", "navigation", b"navigation", "new_session", b"new_session", "page_config_changed", b"page_config_changed", "page_info_changed", b"page_info_changed", "page_not_found", b"page_not_found", "page_profile", b"page_profile", "parent_message", b"parent_message", "ref_hash", b"ref_hash", "script_finished", b"script_finished", "session_event", b"session_event", "session_status_changed", b"session_status_changed", "stop_auto_rerun", b"stop_auto_rerun", "type", b"type"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
    _WhichOneofReturnType_type: _TypeAlias = _typing.Literal["new_session", "delta", "page_info_changed", "page_config_changed", "script_finished", "git_info_changed", "page_profile", "session_status_changed", "session_event", "navigation", "page_not_found", "file_urls_response", "auto_rerun", "stop_auto_rerun", "logo", "auth_redirect", "parent_message", "ref_hash", "heartbeat_ack", "backend_operation_response"]  # noqa: Y015
    _WhichOneofArgType_type: _TypeAlias = _typing.Literal["type", b"type"]  # noqa: Y015
    def WhichOneof(self, oneof_group: _WhichOneofArgType_type) -> _WhichOneofReturnType_type | None: ...

Global___ForwardMsg: _TypeAlias = ForwardMsg  # noqa: Y015

@_typing.final
class BackendOperationResponse(_message.Message):
    """Generic backend operation response for server-side operations without script rerun."""

    DESCRIPTOR: _descriptor.Descriptor

    REQUEST_ID_FIELD_NUMBER: _builtins.int
    ERROR_MSG_FIELD_NUMBER: _builtins.int
    DEFERRED_FILE_FIELD_NUMBER: _builtins.int
    INSTALL_SKILLS_FIELD_NUMBER: _builtins.int
    DISMISS_SKILLS_NUDGE_FIELD_NUMBER: _builtins.int
    request_id: _builtins.str
    """Matches the request_id from BackendOperationRequest"""
    error_msg: _builtins.str
    """Error message if request failed (empty on success)"""
    @_builtins.property
    def deferred_file(self) -> Global___DeferredFileResponsePayload:
        """Response for deferred file requests"""

    @_builtins.property
    def install_skills(self) -> Global___InstallSkillsResponsePayload:
        """Response for one-click skills install requests"""

    @_builtins.property
    def dismiss_skills_nudge(self) -> Global___DismissSkillsNudgeResponsePayload:
        """Acknowledgement for permanently dismissing the skills nudge"""

    def __init__(
        self,
        *,
        request_id: _builtins.str = ...,
        error_msg: _builtins.str = ...,
        deferred_file: Global___DeferredFileResponsePayload | None = ...,
        install_skills: Global___InstallSkillsResponsePayload | None = ...,
        dismiss_skills_nudge: Global___DismissSkillsNudgeResponsePayload | None = ...,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _typing.Literal["deferred_file", b"deferred_file", "dismiss_skills_nudge", b"dismiss_skills_nudge", "install_skills", b"install_skills", "payload", b"payload"]  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["deferred_file", b"deferred_file", "dismiss_skills_nudge", b"dismiss_skills_nudge", "error_msg", b"error_msg", "install_skills", b"install_skills", "payload", b"payload", "request_id", b"request_id"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
    _WhichOneofReturnType_payload: _TypeAlias = _typing.Literal["deferred_file", "install_skills", "dismiss_skills_nudge"]  # noqa: Y015
    _WhichOneofArgType_payload: _TypeAlias = _typing.Literal["payload", b"payload"]  # noqa: Y015
    def WhichOneof(self, oneof_group: _WhichOneofArgType_payload) -> _WhichOneofReturnType_payload | None: ...

Global___BackendOperationResponse: _TypeAlias = BackendOperationResponse  # noqa: Y015

@_typing.final
class DeferredFileResponsePayload(_message.Message):
    """Response payload for deferred file downloads"""

    DESCRIPTOR: _descriptor.Descriptor

    URL_FIELD_NUMBER: _builtins.int
    url: _builtins.str
    def __init__(
        self,
        *,
        url: _builtins.str = ...,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _Never  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["url", b"url"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
    def WhichOneof(self, oneof_group: _Never) -> None: ...

Global___DeferredFileResponsePayload: _TypeAlias = DeferredFileResponsePayload  # noqa: Y015

@_typing.final
class InstallSkillsResponsePayload(_message.Message):
    """Response payload for one-click skills install. A successful, empty detail
    indicates a clean install; failures are reported via the response's
    error_msg field instead.
    """

    DESCRIPTOR: _descriptor.Descriptor

    DETAIL_FIELD_NUMBER: _builtins.int
    detail: _builtins.str
    """Optional human-readable detail about the install outcome."""
    def __init__(
        self,
        *,
        detail: _builtins.str = ...,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _Never  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["detail", b"detail"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
    def WhichOneof(self, oneof_group: _Never) -> None: ...

Global___InstallSkillsResponsePayload: _TypeAlias = InstallSkillsResponsePayload  # noqa: Y015

@_typing.final
class DismissSkillsNudgeResponsePayload(_message.Message):
    """Acknowledgement payload for dismissing the skills nudge. Carries no data;
    its presence signals the marker was written successfully.
    """

    DESCRIPTOR: _descriptor.Descriptor

    def __init__(
        self,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _Never  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _Never  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
    def WhichOneof(self, oneof_group: _Never) -> None: ...

Global___DismissSkillsNudgeResponsePayload: _TypeAlias = DismissSkillsNudgeResponsePayload  # noqa: Y015

@_typing.final
class ForwardMsgMetadata(_message.Message):
    """ForwardMsgMetadata contains all data that does _not_ get hashed (or cached)
    in our ForwardMsgCache. (That is, when we cache a ForwardMsg, we clear its
    metadata field first.) This allows us to, e.g., have a large unchanging
    dataframe appear in different places across multiple reruns - or even appear
    multiple times in a single run - and only send its dataframe bytes once.
    """

    DESCRIPTOR: _descriptor.Descriptor

    CACHEABLE_FIELD_NUMBER: _builtins.int
    DELTA_PATH_FIELD_NUMBER: _builtins.int
    ACTIVE_SCRIPT_HASH_FIELD_NUMBER: _builtins.int
    cacheable: _builtins.bool
    """Marks a message as cacheable for the frontend."""
    active_script_hash: _builtins.str
    """active_script_hash the forward message is associated from.
    For multipage apps v1, this will always be the page file running
    For multipage apps v2, this can be the main script or the page script
    """
    @_builtins.property
    def delta_path(self) -> _containers.RepeatedScalarFieldContainer[_builtins.int]:
        """The path that identifies a delta's location in the report tree.
        Only set for Delta messages.
        """

    def __init__(
        self,
        *,
        cacheable: _builtins.bool = ...,
        delta_path: _abc.Iterable[_builtins.int] | None = ...,
        active_script_hash: _builtins.str = ...,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _Never  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["active_script_hash", b"active_script_hash", "cacheable", b"cacheable", "delta_path", b"delta_path"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
    def WhichOneof(self, oneof_group: _Never) -> None: ...

Global___ForwardMsgMetadata: _TypeAlias = ForwardMsgMetadata  # noqa: Y015

@_typing.final
class ForwardMsgList(_message.Message):
    """This is a list of ForwardMessages used to have a single protobuf message
    that encapsulates multiple ForwardMessages. This is used in static streamlit app
    generation in replaying all of the protobuf messages of a streamlit app. The
    ForwardMsgList allows us to leverage the built-ins of protobuf in delimiting the ForwardMsgs
    instead of needing to do that ourselves.
    """

    DESCRIPTOR: _descriptor.Descriptor

    MESSAGES_FIELD_NUMBER: _builtins.int
    @_builtins.property
    def messages(self) -> _containers.RepeatedCompositeFieldContainer[Global___ForwardMsg]: ...
    def __init__(
        self,
        *,
        messages: _abc.Iterable[Global___ForwardMsg] | None = ...,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _Never  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["messages", b"messages"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
    def WhichOneof(self, oneof_group: _Never) -> None: ...

Global___ForwardMsgList: _TypeAlias = ForwardMsgList  # noqa: Y015
