# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: app/observatory/burst/config.proto
# plugin: python-betterproto2
# This file has been @generated

__all__ = (
    "Config",
    "HealthPingConfig",
)

from dataclasses import dataclass

import betterproto2

from ......message_pool import default_message_pool

betterproto2.check_compiler_version("0.5.1")


@dataclass(eq=False, repr=False)
class Config(betterproto2.Message):
    subject_selector: "list[str]" = betterproto2.field(
        2, betterproto2.TYPE_STRING, repeated=True
    )
    """
    @Document The selectors for outbound under observation
    """

    ping_config: "HealthPingConfig | None" = betterproto2.field(
        3, betterproto2.TYPE_MESSAGE, optional=True
    )


default_message_pool.register_message(
    "xray.core.app.observatory.burst", "Config", Config
)


@dataclass(eq=False, repr=False)
class HealthPingConfig(betterproto2.Message):
    destination: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)
    """
    destination url, need 204 for success return
    default https://connectivitycheck.gstatic.com/generate_204
    """

    connectivity: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)
    """
    connectivity check url
    """

    interval: "int" = betterproto2.field(3, betterproto2.TYPE_INT64)
    """
    health check interval, int64 values of time.Duration
    """

    sampling_count: "int" = betterproto2.field(4, betterproto2.TYPE_INT32)
    """
    sampling count is the amount of recent ping results which are kept for calculation
    """

    timeout: "int" = betterproto2.field(5, betterproto2.TYPE_INT64)
    """
    ping timeout, int64 values of time.Duration
    """


default_message_pool.register_message(
    "xray.core.app.observatory.burst", "HealthPingConfig", HealthPingConfig
)
