# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: content_manifest.proto
# plugin: python-betterproto
# Last updated 09/09/2021

from dataclasses import dataclass
from typing import List

import betterproto


class EContentDeltaChunkDataLocation(betterproto.Enum):
    InProtobuf = 0
    AfterProtobuf = 1


@dataclass(eq=False, repr=False)
class Payload(betterproto.Message):
    mappings: List["PayloadFileMapping"] = betterproto.message_field(1)


@dataclass(eq=False, repr=False)
class PayloadFileMapping(betterproto.Message):
    filename: str = betterproto.string_field(1)
    size: int = betterproto.uint64_field(2)
    flags: int = betterproto.uint32_field(3)
    sha_filename: bytes = betterproto.bytes_field(4)
    sha_content: bytes = betterproto.bytes_field(5)
    chunks: List["PayloadFileMappingChunkData"] = betterproto.message_field(6)
    linktarget: str = betterproto.string_field(7)


@dataclass(eq=False, repr=False)
class PayloadFileMappingChunkData(betterproto.Message):
    sha: bytes = betterproto.bytes_field(1)
    crc: int = betterproto.fixed32_field(2)
    offset: int = betterproto.uint64_field(3)
    cb_original: int = betterproto.uint32_field(4)
    cb_compressed: int = betterproto.uint32_field(5)


@dataclass(eq=False, repr=False)
class Metadata(betterproto.Message):
    depot_id: int = betterproto.uint32_field(1)
    gid_manifest: int = betterproto.uint64_field(2)
    creation_time: int = betterproto.uint32_field(3)
    filenames_encrypted: bool = betterproto.bool_field(4)
    cb_disk_original: int = betterproto.uint64_field(5)
    cb_disk_compressed: int = betterproto.uint64_field(6)
    unique_chunks: int = betterproto.uint32_field(7)
    crc_encrypted: int = betterproto.uint32_field(8)
    crc_clear: int = betterproto.uint32_field(9)


@dataclass(eq=False, repr=False)
class Signature(betterproto.Message):
    signature: bytes = betterproto.bytes_field(1)


@dataclass(eq=False, repr=False)
class ContentDeltaChunks(betterproto.Message):
    depot_id: int = betterproto.uint32_field(1)
    manifest_id_source: int = betterproto.uint64_field(2)
    manifest_id_target: int = betterproto.uint64_field(3)
    delta_chunks: List["ContentDeltaChunksDeltaChunk"] = betterproto.message_field(4)
    chunk_data_location: "EContentDeltaChunkDataLocation" = betterproto.enum_field(5)


@dataclass(eq=False, repr=False)
class ContentDeltaChunksDeltaChunk(betterproto.Message):
    sha_source: bytes = betterproto.bytes_field(1)
    sha_target: bytes = betterproto.bytes_field(2)
    size_original: int = betterproto.uint32_field(3)
    patch_method: int = betterproto.uint32_field(4)
    chunk: bytes = betterproto.bytes_field(5)
    size_delta: int = betterproto.uint32_field(6)
