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

namespace MyTelegram.Schema.Stories;

///<summary>
/// Obtain full info about a set of <a href="https://corefork.telegram.org/api/stories">stories</a> by their IDs.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 CHANNEL_INVALID The provided channel is invalid.
/// 400 CHANNEL_PRIVATE You haven't joined this channel/supergroup.
/// 400 PEER_ID_INVALID The provided peer id is invalid.
/// 400 STORIES_NEVER_CREATED This peer hasn't ever posted any stories.
/// 400 STORY_ID_EMPTY You specified no story IDs.
/// See <a href="https://corefork.telegram.org/method/stories.getStoriesByID" />
///</summary>
[TlObject(0x5774ca74)]
public sealed class RequestGetStoriesByID : IRequest<MyTelegram.Schema.Stories.IStories>
{
    public uint ConstructorId => 0x5774ca74;
    ///<summary>
    /// Peer where the stories were posted
    /// See <a href="https://corefork.telegram.org/type/InputPeer" />
    ///</summary>
    public MyTelegram.Schema.IInputPeer Peer { get; set; }

    ///<summary>
    /// Story IDs
    ///</summary>
    public TVector<int> Id { get; set; }

    public void ComputeFlag()
    {

    }

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

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