"""
@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 PageProfile_pb2 as _PageProfile_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 MetricsEvent(_message.Message):
    """Metrics events:"""

    DESCRIPTOR: _descriptor.Descriptor

    EVENT_FIELD_NUMBER: _builtins.int
    ANONYMOUS_ID_FIELD_NUMBER: _builtins.int
    MACHINE_ID_V3_FIELD_NUMBER: _builtins.int
    MACHINE_ID_V4_FIELD_NUMBER: _builtins.int
    REPORT_HASH_FIELD_NUMBER: _builtins.int
    DEV_FIELD_NUMBER: _builtins.int
    SOURCE_FIELD_NUMBER: _builtins.int
    STREAMLIT_VERSION_FIELD_NUMBER: _builtins.int
    IS_HELLO_FIELD_NUMBER: _builtins.int
    APP_ID_FIELD_NUMBER: _builtins.int
    SESSION_ID_FIELD_NUMBER: _builtins.int
    PYTHON_VERSION_FIELD_NUMBER: _builtins.int
    SERVER_OS_FIELD_NUMBER: _builtins.int
    HAS_DISPLAY_FIELD_NUMBER: _builtins.int
    IS_WEBDRIVER_FIELD_NUMBER: _builtins.int
    HOSTED_AT_FIELD_NUMBER: _builtins.int
    OWNER_FIELD_NUMBER: _builtins.int
    REPO_FIELD_NUMBER: _builtins.int
    BRANCH_FIELD_NUMBER: _builtins.int
    MAIN_MODULE_FIELD_NUMBER: _builtins.int
    CREATOR_ID_FIELD_NUMBER: _builtins.int
    CONTEXT_PAGE_URL_FIELD_NUMBER: _builtins.int
    CONTEXT_PAGE_TITLE_FIELD_NUMBER: _builtins.int
    CONTEXT_PAGE_PATH_FIELD_NUMBER: _builtins.int
    CONTEXT_PAGE_REFERRER_FIELD_NUMBER: _builtins.int
    CONTEXT_PAGE_SEARCH_FIELD_NUMBER: _builtins.int
    CONTEXT_LOCALE_FIELD_NUMBER: _builtins.int
    CONTEXT_USER_AGENT_FIELD_NUMBER: _builtins.int
    LABEL_FIELD_NUMBER: _builtins.int
    COMMANDS_FIELD_NUMBER: _builtins.int
    EXEC_TIME_FIELD_NUMBER: _builtins.int
    PREP_TIME_FIELD_NUMBER: _builtins.int
    CONFIG_FIELD_NUMBER: _builtins.int
    UNCAUGHT_EXCEPTION_FIELD_NUMBER: _builtins.int
    ATTRIBUTIONS_FIELD_NUMBER: _builtins.int
    OS_FIELD_NUMBER: _builtins.int
    TIMEZONE_FIELD_NUMBER: _builtins.int
    HEADLESS_FIELD_NUMBER: _builtins.int
    IS_FRAGMENT_RUN_FIELD_NUMBER: _builtins.int
    NUMPAGES_FIELD_NUMBER: _builtins.int
    PAGE_SCRIPT_HASH_FIELD_NUMBER: _builtins.int
    ACTIVE_THEME_FIELD_NUMBER: _builtins.int
    TOTAL_LOAD_TIME_FIELD_NUMBER: _builtins.int
    BROWSER_INFO_FIELD_NUMBER: _builtins.int
    SERVER_MODE_FIELD_NUMBER: _builtins.int
    event: _builtins.str
    """Common Event Fields:"""
    anonymous_id: _builtins.str
    machine_id_v3: _builtins.str
    machine_id_v4: _builtins.str
    report_hash: _builtins.str
    dev: _builtins.bool
    source: _builtins.str
    streamlit_version: _builtins.str
    is_hello: _builtins.bool
    app_id: _builtins.str
    session_id: _builtins.str
    python_version: _builtins.str
    server_os: _builtins.str
    has_display: _builtins.bool
    is_webdriver: _builtins.bool
    hosted_at: _builtins.str
    """Host tracking fields:"""
    owner: _builtins.str
    repo: _builtins.str
    branch: _builtins.str
    main_module: _builtins.str
    creator_id: _builtins.str
    context_page_url: _builtins.str
    """Context fields:"""
    context_page_title: _builtins.str
    context_page_path: _builtins.str
    context_page_referrer: _builtins.str
    context_page_search: _builtins.str
    context_locale: _builtins.str
    context_user_agent: _builtins.str
    label: _builtins.str
    """Menu Click Event field:"""
    exec_time: _builtins.int
    prep_time: _builtins.int
    uncaught_exception: _builtins.str
    os: _builtins.str
    timezone: _builtins.str
    headless: _builtins.bool
    is_fragment_run: _builtins.bool
    numPages: _builtins.int
    """Addtl for page profile metrics"""
    page_script_hash: _builtins.str
    active_theme: _builtins.str
    total_load_time: _builtins.int
    server_mode: _builtins.str
    @_builtins.property
    def commands(self) -> _containers.RepeatedCompositeFieldContainer[_PageProfile_pb2.Command]:
        """Page Profile Event fields:
        Same as PageProfile msg
        """

    @_builtins.property
    def config(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: ...
    @_builtins.property
    def attributions(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]: ...
    @_builtins.property
    def browser_info(self) -> Global___BrowserInfo: ...
    def __init__(
        self,
        *,
        event: _builtins.str = ...,
        anonymous_id: _builtins.str = ...,
        machine_id_v3: _builtins.str = ...,
        machine_id_v4: _builtins.str = ...,
        report_hash: _builtins.str = ...,
        dev: _builtins.bool = ...,
        source: _builtins.str = ...,
        streamlit_version: _builtins.str = ...,
        is_hello: _builtins.bool = ...,
        app_id: _builtins.str = ...,
        session_id: _builtins.str = ...,
        python_version: _builtins.str = ...,
        server_os: _builtins.str = ...,
        has_display: _builtins.bool = ...,
        is_webdriver: _builtins.bool = ...,
        hosted_at: _builtins.str = ...,
        owner: _builtins.str = ...,
        repo: _builtins.str = ...,
        branch: _builtins.str = ...,
        main_module: _builtins.str = ...,
        creator_id: _builtins.str = ...,
        context_page_url: _builtins.str = ...,
        context_page_title: _builtins.str = ...,
        context_page_path: _builtins.str = ...,
        context_page_referrer: _builtins.str = ...,
        context_page_search: _builtins.str = ...,
        context_locale: _builtins.str = ...,
        context_user_agent: _builtins.str = ...,
        label: _builtins.str = ...,
        commands: _abc.Iterable[_PageProfile_pb2.Command] | None = ...,
        exec_time: _builtins.int = ...,
        prep_time: _builtins.int = ...,
        config: _abc.Iterable[_builtins.str] | None = ...,
        uncaught_exception: _builtins.str = ...,
        attributions: _abc.Iterable[_builtins.str] | None = ...,
        os: _builtins.str = ...,
        timezone: _builtins.str = ...,
        headless: _builtins.bool = ...,
        is_fragment_run: _builtins.bool = ...,
        numPages: _builtins.int = ...,
        page_script_hash: _builtins.str = ...,
        active_theme: _builtins.str = ...,
        total_load_time: _builtins.int = ...,
        browser_info: Global___BrowserInfo | None = ...,
        server_mode: _builtins.str = ...,
    ) -> None: ...
    _HasFieldArgType: _TypeAlias = _typing.Literal["browser_info", b"browser_info"]  # noqa: Y015
    def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["active_theme", b"active_theme", "anonymous_id", b"anonymous_id", "app_id", b"app_id", "attributions", b"attributions", "branch", b"branch", "browser_info", b"browser_info", "commands", b"commands", "config", b"config", "context_locale", b"context_locale", "context_page_path", b"context_page_path", "context_page_referrer", b"context_page_referrer", "context_page_search", b"context_page_search", "context_page_title", b"context_page_title", "context_page_url", b"context_page_url", "context_user_agent", b"context_user_agent", "creator_id", b"creator_id", "dev", b"dev", "event", b"event", "exec_time", b"exec_time", "has_display", b"has_display", "headless", b"headless", "hosted_at", b"hosted_at", "is_fragment_run", b"is_fragment_run", "is_hello", b"is_hello", "is_webdriver", b"is_webdriver", "label", b"label", "machine_id_v3", b"machine_id_v3", "machine_id_v4", b"machine_id_v4", "main_module", b"main_module", "numPages", b"numPages", "os", b"os", "owner", b"owner", "page_script_hash", b"page_script_hash", "prep_time", b"prep_time", "python_version", b"python_version", "repo", b"repo", "report_hash", b"report_hash", "server_mode", b"server_mode", "server_os", b"server_os", "session_id", b"session_id", "source", b"source", "streamlit_version", b"streamlit_version", "timezone", b"timezone", "total_load_time", b"total_load_time", "uncaught_exception", b"uncaught_exception"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...

Global___MetricsEvent: _TypeAlias = MetricsEvent  # noqa: Y015

@_typing.final
class BrowserInfo(_message.Message):
    DESCRIPTOR: _descriptor.Descriptor

    BROWSER_NAME_FIELD_NUMBER: _builtins.int
    BROWSER_VERSION_FIELD_NUMBER: _builtins.int
    DEVICE_TYPE_FIELD_NUMBER: _builtins.int
    OS_FIELD_NUMBER: _builtins.int
    browser_name: _builtins.str
    browser_version: _builtins.str
    device_type: _builtins.str
    os: _builtins.str
    def __init__(
        self,
        *,
        browser_name: _builtins.str = ...,
        browser_version: _builtins.str = ...,
        device_type: _builtins.str = ...,
        os: _builtins.str = ...,
    ) -> None: ...
    _ClearFieldArgType: _TypeAlias = _typing.Literal["browser_name", b"browser_name", "browser_version", b"browser_version", "device_type", b"device_type", "os", b"os"]  # noqa: Y015
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...

Global___BrowserInfo: _TypeAlias = BrowserInfo  # noqa: Y015
