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

__all__ = (
    "CipherType",
    "Account",
    "ClientConfig",
    "ServerConfig",
)

from dataclasses import dataclass

import betterproto2

from ....message_pool import default_message_pool

betterproto2.check_compiler_version("0.5.1")


class CipherType(betterproto2.Enum):
    UNKNOWN = 0

    AES_128_GCM = 5

    AES_256_GCM = 6

    CHACHA20_POLY1305 = 7

    XCHACHA20_POLY1305 = 8

    NONE = 9


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

    cipher_type: "CipherType" = betterproto2.field(
        2, betterproto2.TYPE_ENUM, default_factory=lambda: CipherType(0)
    )

    iv_check: "bool" = betterproto2.field(3, betterproto2.TYPE_BOOL)


default_message_pool.register_message("xray.proxy.shadowsocks", "Account", Account)


@dataclass(eq=False, repr=False)
class ClientConfig(betterproto2.Message):
    server: "list[__common__protocol__.ServerEndpoint]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )


default_message_pool.register_message(
    "xray.proxy.shadowsocks", "ClientConfig", ClientConfig
)


@dataclass(eq=False, repr=False)
class ServerConfig(betterproto2.Message):
    users: "list[__common__protocol__.User]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )

    network: "list[__common__net__.Network]" = betterproto2.field(
        2, betterproto2.TYPE_ENUM, repeated=True
    )


default_message_pool.register_message(
    "xray.proxy.shadowsocks", "ServerConfig", ServerConfig
)


from ...common import net as __common__net__
from ...common import protocol as __common__protocol__
