# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: steammessages_contentsystem.steamclient.proto
# plugin: python-betterproto
# Last updated 21/12/2022

from dataclasses import dataclass

import betterproto

from .msg import UnifiedMessage


class GetServersForSteamPipeRequest(UnifiedMessage, um_name="ContentServerDirectory.GetServersForSteamPipe"):
    cell_id: int = betterproto.uint32_field(1)
    max_servers: int = betterproto.uint32_field(2)
    ip_override: str = betterproto.string_field(3)
    launcher_type: int = betterproto.int32_field(4)
    ipv6_public: str = betterproto.string_field(5)


@dataclass(eq=False, repr=False)
class ServerInfo(betterproto.Message):
    type: str = betterproto.string_field(1)
    source_id: int = betterproto.int32_field(2)
    cell_id: int = betterproto.int32_field(3)
    load: int = betterproto.int32_field(4)
    weighted_load: float = betterproto.float_field(5)
    num_entries_in_client_list: int = betterproto.int32_field(6)
    steam_china_only: bool = betterproto.bool_field(7)
    host: str = betterproto.string_field(8)
    vhost: str = betterproto.string_field(9)
    use_as_proxy: bool = betterproto.bool_field(10)
    proxy_request_path_template: str = betterproto.string_field(11)
    https_support: str = betterproto.string_field(12)
    allowed_app_ids: list[int] = betterproto.uint32_field(13)
    preferred_server: bool = betterproto.bool_field(14)


class GetServersForSteamPipeResponse(UnifiedMessage, um_name="ContentServerDirectory.GetServersForSteamPipe"):
    servers: "list[ServerInfo]" = betterproto.message_field(1)


class GetDepotPatchInfoRequest(UnifiedMessage, um_name="ContentServerDirectory.GetDepotPatchInfo"):
    appid: int = betterproto.uint32_field(1)
    depotid: int = betterproto.uint32_field(2)
    source_manifestid: int = betterproto.uint64_field(3)
    target_manifestid: int = betterproto.uint64_field(4)


class GetDepotPatchInfoResponse(UnifiedMessage, um_name="ContentServerDirectory.GetDepotPatchInfo"):
    is_available: bool = betterproto.bool_field(1)
    patch_size: int = betterproto.uint64_field(2)
    patched_chunks_size: int = betterproto.uint64_field(3)


class GetClientUpdateHostsRequest(UnifiedMessage, um_name="ContentServerDirectory.GetClientUpdateHosts"):
    cached_signature: str = betterproto.string_field(1)


class GetClientUpdateHostsResponse(UnifiedMessage, um_name="ContentServerDirectory.GetClientUpdateHosts"):
    hosts_kv: str = betterproto.string_field(1)
    valid_until_time: int = betterproto.uint64_field(2)
    ip_country: str = betterproto.string_field(3)


class GetManifestRequestCodeRequest(UnifiedMessage, um_name="ContentServerDirectory.GetManifestRequestCode"):
    app_id: int = betterproto.uint32_field(1)
    depot_id: int = betterproto.uint32_field(2)
    manifest_id: int = betterproto.uint64_field(3)
    app_branch: str = betterproto.string_field(4)
    branch_password_hash: str = betterproto.string_field(5)


class GetManifestRequestCodeResponse(UnifiedMessage, um_name="ContentServerDirectory.GetManifestRequestCode"):
    manifest_request_code: int = betterproto.uint64_field(1)


class GetCDNAuthTokenRequest(UnifiedMessage, um_name="ContentServerDirectory.GetCDNAuthToken"):
    depot_id: int = betterproto.uint32_field(1)
    host_name: str = betterproto.string_field(2)
    app_id: int = betterproto.uint32_field(3)


class GetCDNAuthTokenResponse(UnifiedMessage, um_name="ContentServerDirectory.GetCDNAuthToken"):
    token: str = betterproto.string_field(1)
    expiration_time: int = betterproto.uint32_field(2)
