// <auto-generated/>
// ReSharper disable All

namespace MyTelegram.Schema.Chatlists;

///<summary>
/// Info about an exported <a href="https://corefork.telegram.org/api/links#chat-folder-links">chat folder deep link »</a>.
/// See <a href="https://corefork.telegram.org/constructor/chatlists.exportedChatlistInvite" />
///</summary>
[TlObject(0x10e6e3a6)]
public sealed class TExportedChatlistInvite : IExportedChatlistInvite
{
    public uint ConstructorId => 0x10e6e3a6;
    ///<summary>
    /// Folder ID
    /// See <a href="https://corefork.telegram.org/type/DialogFilter" />
    ///</summary>
    public MyTelegram.Schema.IDialogFilter Filter { get; set; }

    ///<summary>
    /// The exported <a href="https://corefork.telegram.org/api/links#chat-folder-links">chat folder deep link »</a>.
    /// See <a href="https://corefork.telegram.org/type/ExportedChatlistInvite" />
    ///</summary>
    public MyTelegram.Schema.IExportedChatlistInvite Invite { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Filter);
        writer.Write(Invite);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Filter = buffer.Read<MyTelegram.Schema.IDialogFilter>();
        Invite = buffer.Read<MyTelegram.Schema.IExportedChatlistInvite>();
    }
}