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

namespace MyTelegram.Schema.Stories;

///<summary>
/// Report a story.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 PEER_ID_INVALID The provided peer id is invalid.
/// See <a href="https://corefork.telegram.org/method/stories.report" />
///</summary>
[TlObject(0x19d8eb45)]
public sealed class RequestReport : IRequest<MyTelegram.Schema.IReportResult>
{
    public uint ConstructorId => 0x19d8eb45;
    ///<summary>
    /// The peer that uploaded the story.
    /// See <a href="https://corefork.telegram.org/type/InputPeer" />
    ///</summary>
    public MyTelegram.Schema.IInputPeer Peer { get; set; }

    ///<summary>
    /// IDs of the stories to report.
    ///</summary>
    public TVector<int> Id { get; set; }

    ///<summary>
    /// Menu option, intially empty
    ///</summary>
    public ReadOnlyMemory<byte> Option { get; set; }

    ///<summary>
    /// Comment for report moderation
    ///</summary>
    public string Message { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Peer = buffer.Read<MyTelegram.Schema.IInputPeer>();
        Id = buffer.Read<TVector<int>>();
        Option = buffer.ReadBytes();
        Message = buffer.ReadString();
    }
}
