// <auto-generated/>

using System;

namespace MyTelegram.Schema;

[TlObject(0x3072cfa1)]
public class TGzipPacked : IRequest<IObject>
{
    public uint ConstructorId => 0x3072cfa1;
    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write((uint)ConstructorId);
        writer.Write(PackedData);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PackedData = buffer.ReadBytes();
    }

    public ReadOnlyMemory<byte> PackedData { get; set; } = ReadOnlyMemory<byte>.Empty;

    public void ComputeFlag()
    {

    }
}

public sealed class TContainerMessage : IObject
{
    public uint ConstructorId => 0x73f1f8dc;

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        MsgId = buffer.ReadInt64();
        SeqNo = buffer.ReadInt32();
        Bytes = buffer.ReadInt32();
        Body = buffer.Read<IObject>();
    }


    public void Serialize(IBufferWriter<byte> writer)
    {
        writer.Write(MsgId);
        writer.Write(SeqNo);
        writer.Write(Bytes);
        Body.Serialize(writer);
    }


    public long MsgId { get; set; }

    public int SeqNo { get; set; }

    public int Bytes { get; set; }

    public IObject Body { get; set; }
}