"""
@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 streamlit.proto import WidthConfig_pb2 as _WidthConfig_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 Exception(_message.Message):
    """A python exception.

    NOTE: This proto type is used by some external services so needs to remain
    relatively stable. While it isn't entirely set in stone, changing it
    may require a good amount of effort so should be avoided if possible.
    """

    DESCRIPTOR: _descriptor.Descriptor

    TYPE_FIELD_NUMBER: _builtins.int
    MESSAGE_FIELD_NUMBER: _builtins.int
    MESSAGE_IS_MARKDOWN_FIELD_NUMBER: _builtins.int
    STACK_TRACE_FIELD_NUMBER: _builtins.int
    IS_WARNING_FIELD_NUMBER: _builtins.int
    WIDTH_CONFIG_FIELD_NUMBER: _builtins.int
    type: _builtins.str
    """The type of the exception. This can be any string, but is usually a valid
    Python exception type, like 'RuntimeError'.
    """
    message: _builtins.str
    """The exception's message."""
    message_is_markdown: _builtins.bool
    """If true, the exception message should be rendered as Markdown text."""
    is_warning: _builtins.bool
    """If true, this is an error that doesn't stop the execution flow. So it gets
    rendered differently for clarity.
    """
    @_builtins.property
    def stack_trace(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
        """The stack trace to print."""

    @_builtins.property
    def width_config(self) -> _WidthConfig_pb2.WidthConfig:
        """Indicates the width setting: "stetch", "content" or a pixel value."""

    def __init__(
        self,
        *,
        type: _builtins.str = ...,
        message: _builtins.str = ...,
        message_is_markdown: _builtins.bool = ...,
        stack_trace: _abc.Iterable[_builtins.str] | None = ...,
        is_warning: _builtins.bool = ...,
        width_config: _WidthConfig_pb2.WidthConfig | None = ...,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _typing.Literal["width_config", b"width_config"]  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["is_warning", b"is_warning", "message", b"message", "message_is_markdown", b"message_is_markdown", "stack_trace", b"stack_trace", "type", b"type", "width_config", b"width_config"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...

Global___Exception: _TypeAlias = Exception  # noqa: Y015
