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

namespace MyTelegram.Schema;

///<summary>
/// A new story was posted.
/// See <a href="https://corefork.telegram.org/constructor/updateStory" />
///</summary>
[TlObject(0x75b3b798)]
public sealed class TUpdateStory : IUpdate
{
    public uint ConstructorId => 0x75b3b798;
    ///<summary>
    /// ID of the poster.
    /// See <a href="https://corefork.telegram.org/type/Peer" />
    ///</summary>
    public MyTelegram.Schema.IPeer Peer { get; set; }

    ///<summary>
    /// The story that was posted.
    /// 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>();
    }
}