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

namespace MyTelegram.Schema;

///<summary>
/// Represents a sent inline message from the perspective of a bot (legacy constructor)
/// See <a href="https://corefork.telegram.org/constructor/inputBotInlineMessageID" />
///</summary>
[TlObject(0x890c3d89)]
public sealed class TInputBotInlineMessageID : IInputBotInlineMessageID
{
    public uint ConstructorId => 0x890c3d89;
    ///<summary>
    /// DC ID to use when working with this inline message
    ///</summary>
    public int DcId { get; set; }

    ///<summary>
    /// ID of message, contains both the (32-bit, legacy) owner ID and the message ID, used only for Bot API backwards compatibility with 32-bit user ID.
    ///</summary>
    public long Id { get; set; }

    ///<summary>
    /// Access hash of message
    ///</summary>
    public long AccessHash { get; set; }

    public void ComputeFlag()
    {

    }

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

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