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

__all__ = (
    "Config",
    "RangeConfig",
    "XmuxConfig",
)

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):
    host: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

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

    mode: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)

    headers: "dict[str, str]" = betterproto2.field(
        4,
        betterproto2.TYPE_MAP,
        map_meta=betterproto2.map_meta(
            betterproto2.TYPE_STRING, betterproto2.TYPE_STRING
        ),
    )

    x_padding_bytes: "RangeConfig | None" = betterproto2.field(
        5, betterproto2.TYPE_MESSAGE, optional=True
    )

    no_grpc_header: "bool" = betterproto2.field(6, betterproto2.TYPE_BOOL)

    no_sse_header: "bool" = betterproto2.field(7, betterproto2.TYPE_BOOL)

    sc_max_each_post_bytes: "RangeConfig | None" = betterproto2.field(
        8, betterproto2.TYPE_MESSAGE, optional=True
    )

    sc_min_posts_interval_ms: "RangeConfig | None" = betterproto2.field(
        9, betterproto2.TYPE_MESSAGE, optional=True
    )

    sc_max_buffered_posts: "int" = betterproto2.field(10, betterproto2.TYPE_INT64)

    sc_stream_up_server_secs: "RangeConfig | None" = betterproto2.field(
        11, betterproto2.TYPE_MESSAGE, optional=True
    )

    xmux: "XmuxConfig | None" = betterproto2.field(
        12, betterproto2.TYPE_MESSAGE, optional=True
    )

    download_settings: "__internet__.StreamConfig | None" = betterproto2.field(
        13, betterproto2.TYPE_MESSAGE, optional=True
    )


default_message_pool.register_message(
    "xray.transport.internet.splithttp", "Config", Config
)


@dataclass(eq=False, repr=False)
class RangeConfig(betterproto2.Message):
    from_: "int" = betterproto2.field(1, betterproto2.TYPE_INT32)

    to: "int" = betterproto2.field(2, betterproto2.TYPE_INT32)


default_message_pool.register_message(
    "xray.transport.internet.splithttp", "RangeConfig", RangeConfig
)


@dataclass(eq=False, repr=False)
class XmuxConfig(betterproto2.Message):
    max_concurrency: "RangeConfig | None" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, optional=True
    )

    max_connections: "RangeConfig | None" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, optional=True
    )

    c_max_reuse_times: "RangeConfig | None" = betterproto2.field(
        3, betterproto2.TYPE_MESSAGE, optional=True
    )

    h_max_request_times: "RangeConfig | None" = betterproto2.field(
        4, betterproto2.TYPE_MESSAGE, optional=True
    )

    h_max_reusable_secs: "RangeConfig | None" = betterproto2.field(
        5, betterproto2.TYPE_MESSAGE, optional=True
    )

    h_keep_alive_period: "int" = betterproto2.field(6, betterproto2.TYPE_INT64)


default_message_pool.register_message(
    "xray.transport.internet.splithttp", "XmuxConfig", XmuxConfig
)


from ... import internet as __internet__
