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

namespace MyTelegram.Schema.E2e;


[TlObject(0xd1512ae7)]
public sealed class TGroupBroadcastNonceCommit : IGroupBroadcast
{
    public uint ConstructorId => 0xd1512ae7;
    public ReadOnlyMemory<byte> Signature { get; set; }
    public long UserId { get; set; }
    public int ChainHeight { get; set; }
    public ReadOnlyMemory<byte> ChainHash { get; set; }
    public ReadOnlyMemory<byte> NonceHash { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.WriteRawBytes(Signature);
        writer.Write(UserId);
        writer.Write(ChainHeight);
        writer.WriteRawBytes(ChainHash);
        writer.WriteRawBytes(NonceHash);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Signature = buffer.ReadInt512();
        UserId = buffer.ReadInt64();
        ChainHeight = buffer.ReadInt32();
        ChainHash = buffer.ReadInt256();
        NonceHash = buffer.ReadInt256();
    }
}