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

__all__ = (
    "ControlState",
    "BridgeConfig",
    "Config",
    "Control",
    "PortalConfig",
)

from dataclasses import dataclass

import betterproto2

from ....message_pool import default_message_pool

betterproto2.check_compiler_version("0.5.1")


class ControlState(betterproto2.Enum):
    ACTIVE = 0

    DRAIN = 1


@dataclass(eq=False, repr=False)
class BridgeConfig(betterproto2.Message):
    tag: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    domain: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)


default_message_pool.register_message("xray.app.reverse", "BridgeConfig", BridgeConfig)


@dataclass(eq=False, repr=False)
class Config(betterproto2.Message):
    bridge_config: "list[BridgeConfig]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )

    portal_config: "list[PortalConfig]" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, repeated=True
    )


default_message_pool.register_message("xray.app.reverse", "Config", Config)


@dataclass(eq=False, repr=False)
class Control(betterproto2.Message):
    state: "ControlState" = betterproto2.field(
        1, betterproto2.TYPE_ENUM, default_factory=lambda: ControlState(0)
    )

    random: "bytes" = betterproto2.field(99, betterproto2.TYPE_BYTES)


default_message_pool.register_message("xray.app.reverse", "Control", Control)


@dataclass(eq=False, repr=False)
class PortalConfig(betterproto2.Message):
    tag: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    domain: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)


default_message_pool.register_message("xray.app.reverse", "PortalConfig", PortalConfig)
