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

namespace MyTelegram.Schema;

///<summary>
/// A certain peer has reposted the story.
/// See <a href="https://corefork.telegram.org/constructor/storyReactionPublicRepost" />
///</summary>
[TlObject(0xcfcd0f13)]
public sealed class TStoryReactionPublicRepost : IStoryReaction
{
    public uint ConstructorId => 0xcfcd0f13;
    ///<summary>
    /// The peer that reposted the story.
    /// See <a href="https://corefork.telegram.org/type/Peer" />
    ///</summary>
    public MyTelegram.Schema.IPeer PeerId { get; set; }

    ///<summary>
    /// The reposted 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(PeerId);
        writer.Write(Story);
    }

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