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

namespace MyTelegram.Schema.Chatlists;

///<summary>
/// Join channels and supergroups recently added to a <a href="https://corefork.telegram.org/api/links#chat-folder-links">chat folder deep link »</a>.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 FILTER_ID_INVALID The specified filter ID is invalid.
/// 400 FILTER_INCLUDE_EMPTY The include_peers vector of the filter is empty.
/// See <a href="https://corefork.telegram.org/method/chatlists.joinChatlistUpdates" />
///</summary>
[TlObject(0xe089f8f5)]
public sealed class RequestJoinChatlistUpdates : IRequest<MyTelegram.Schema.IUpdates>
{
    public uint ConstructorId => 0xe089f8f5;
    ///<summary>
    /// The folder
    /// See <a href="https://corefork.telegram.org/type/InputChatlist" />
    ///</summary>
    public MyTelegram.Schema.IInputChatlist Chatlist { get; set; }

    ///<summary>
    /// List of new chats to join, fetched using <a href="https://corefork.telegram.org/method/chatlists.getChatlistUpdates">chatlists.getChatlistUpdates</a> and filtered as specified in the <a href="https://corefork.telegram.org/api/folders#shared-folders">documentation »</a>.
    ///</summary>
    public TVector<MyTelegram.Schema.IInputPeer> Peers { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Chatlist = buffer.Read<MyTelegram.Schema.IInputChatlist>();
        Peers = buffer.Read<TVector<MyTelegram.Schema.IInputPeer>>();
    }
}
