// <auto-generated/>

namespace MyTelegram.Schema;


[TlObject(0xedab447b)]
public sealed class TBadServerSalt : IBadMsgNotification
{
    public uint ConstructorId => 0xedab447b;
    public long BadMsgId { get; set; }
    public int BadMsgSeqno { get; set; }
    public int ErrorCode { get; set; }
    public long NewServerSalt { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(BadMsgId);
        writer.Write(BadMsgSeqno);
        writer.Write(ErrorCode);
        writer.Write(NewServerSalt);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        BadMsgId = buffer.ReadInt64();
        BadMsgSeqno = buffer.ReadInt32();
        ErrorCode = buffer.ReadInt32();
        NewServerSalt = buffer.ReadInt64();
    }
}