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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Delete a chat invite
/// <para>Possible errors</para>
/// Code Type Description
/// 400 INVITE_HASH_EXPIRED The invite link has expired.
/// 400 INVITE_REVOKED_MISSING The specified invite link was already revoked or is invalid.
/// 400 PEER_ID_INVALID The provided peer id is invalid.
/// See <a href="https://corefork.telegram.org/method/messages.deleteExportedChatInvite" />
///</summary>
[TlObject(0xd464a42b)]
public sealed class RequestDeleteExportedChatInvite : IRequest<IBool>
{
    public uint ConstructorId => 0xd464a42b;
    ///<summary>
    /// Peer
    /// See <a href="https://corefork.telegram.org/type/InputPeer" />
    ///</summary>
    public MyTelegram.Schema.IInputPeer Peer { get; set; }

    ///<summary>
    /// Invite link
    ///</summary>
    public string Link { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Peer = buffer.Read<MyTelegram.Schema.IInputPeer>();
        Link = buffer.ReadString();
    }
}
