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

namespace MyTelegram.Schema;

///<summary>
/// A story found using <a href="https://corefork.telegram.org/api/stories#searching-stories">global story search »</a>.
/// See <a href="https://corefork.telegram.org/constructor/foundStory" />
///</summary>
[TlObject(0xe87acbc0)]
public sealed class TFoundStory : IFoundStory
{
    public uint ConstructorId => 0xe87acbc0;
    ///<summary>
    /// The peer that posted the story.
    /// See <a href="https://corefork.telegram.org/type/Peer" />
    ///</summary>
    public MyTelegram.Schema.IPeer Peer { get; set; }

    ///<summary>
    /// The story.
    /// See <a href="https://corefork.telegram.org/type/StoryItem" />
    ///</summary>
    public MyTelegram.Schema.IStoryItem Story { get; set; }

    public void ComputeFlag()
    {

    }

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

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