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

namespace MyTelegram.Schema;

///<summary>
/// Sets forwarded encrypted file for attachment.
/// See <a href="https://corefork.telegram.org/constructor/inputEncryptedFile" />
///</summary>
[TlObject(0x5a17b5e5)]
public sealed class TInputEncryptedFile : IInputEncryptedFile
{
    public uint ConstructorId => 0x5a17b5e5;
    ///<summary>
    /// File ID, value of <strong>id</strong> parameter from <a href="https://corefork.telegram.org/constructor/encryptedFile">encryptedFile</a>
    ///</summary>
    public long Id { get; set; }

    ///<summary>
    /// Checking sum, value of <strong>access_hash</strong> parameter from <a href="https://corefork.telegram.org/constructor/encryptedFile">encryptedFile</a>
    ///</summary>
    public long AccessHash { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Id = buffer.ReadInt64();
        AccessHash = buffer.ReadInt64();
    }
}