# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: xcapi/xray/proxy/http/config.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
from typing import Optional, Dict, List
from dataclasses import dataclass
from xcapi.model import ClassMeta
from xcapi.xray.common.protocol.server_spec_pb import ServerEndpoint


@dataclass
class Account(ClassMeta):
    username: Optional[str] = None
    password: Optional[str] = None


@dataclass
class ServerConfig(ClassMeta):
    """Config for HTTP proxy server."""
    accounts: Optional[Dict[str, str]] = None
    allow_transparent: Optional[bool] = None
    user_level: Optional[int] = None


@dataclass
class Header(ClassMeta):
    key: Optional[str] = None
    value: Optional[str] = None


@dataclass
class ClientConfig(ClassMeta):
    """ClientConfig is the protobuf config for HTTP proxy client."""
    server: Optional[List[ServerEndpoint]] = None
    """Sever is a list of HTTP server addresses."""
    header: Optional[List[Header]] = None


_sym_db = _symbol_database.Default()

DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
    b'\n\"xcapi/xray/proxy/http/config.proto\x12\x0fxray.proxy.http\x1a,xcapi/xray/common/protocol/server_spec.proto\"-\n\x07\x41\x63\x63ount\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\xad\x01\n\x0cServerConfig\x12=\n\x08\x61\x63\x63ounts\x18\x02 \x03(\x0b\x32+.xray.proxy.http.ServerConfig.AccountsEntry\x12\x19\n\x11\x61llow_transparent\x18\x03 \x01(\x08\x12\x12\n\nuser_level\x18\x04 \x01(\r\x1a/\n\rAccountsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"$\n\x06Header\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"m\n\x0c\x43lientConfig\x12\x34\n\x06server\x18\x01 \x03(\x0b\x32$.xray.common.protocol.ServerEndpoint\x12\'\n\x06header\x18\x02 \x03(\x0b\x32\x17.xray.proxy.http.Headerb\x06proto3')

_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'xcapi.xray.proxy.http.config_pb', _globals)
if not _descriptor._USE_C_DESCRIPTORS:
    DESCRIPTOR._loaded_options = None
    _globals['_SERVERCONFIG_ACCOUNTSENTRY']._loaded_options = None
    _globals['_SERVERCONFIG_ACCOUNTSENTRY']._serialized_options = b'8\001'
    _globals['_ACCOUNT']._serialized_start = 101
    _globals['_ACCOUNT']._serialized_end = 146
    _globals['_SERVERCONFIG']._serialized_start = 149
    _globals['_SERVERCONFIG']._serialized_end = 322
    _globals['_SERVERCONFIG_ACCOUNTSENTRY']._serialized_start = 275
    _globals['_SERVERCONFIG_ACCOUNTSENTRY']._serialized_end = 322
    _globals['_HEADER']._serialized_start = 324
    _globals['_HEADER']._serialized_end = 360
    _globals['_CLIENTCONFIG']._serialized_start = 362
    _globals['_CLIENTCONFIG']._serialized_end = 471
