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

namespace MyTelegram.Schema;

///<summary>
/// Represents a reply to a <a href="https://corefork.telegram.org/api/stories">story</a>
/// See <a href="https://corefork.telegram.org/constructor/messageReplyStoryHeader" />
///</summary>
[TlObject(0xe5af939)]
public sealed class TMessageReplyStoryHeader : IMessageReplyHeader
{
    public uint ConstructorId => 0xe5af939;
    ///<summary>
    /// Sender of the story.
    /// See <a href="https://corefork.telegram.org/type/Peer" />
    ///</summary>
    public MyTelegram.Schema.IPeer Peer { get; set; }

    ///<summary>
    /// Story ID
    ///</summary>
    public int StoryId { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Peer = buffer.Read<MyTelegram.Schema.IPeer>();
        StoryId = buffer.ReadInt32();
    }
}