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

namespace MyTelegram.Schema.Stories;

///<summary>
/// Hide the active stories of a user, preventing them from being displayed on the action bar on the homescreen, see <a href="https://corefork.telegram.org/api/stories#hiding-stories-of-other-users">here »</a> for more info.
/// <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.togglePeerStoriesHidden" />
///</summary>
[TlObject(0xbd0415c4)]
public sealed class RequestTogglePeerStoriesHidden : IRequest<IBool>
{
    public uint ConstructorId => 0xbd0415c4;
    ///<summary>
    /// Peer whose stories should be (un)hidden.
    /// See <a href="https://corefork.telegram.org/type/InputPeer" />
    ///</summary>
    public MyTelegram.Schema.IInputPeer Peer { get; set; }

    ///<summary>
    /// Whether to hide or unhide stories.
    /// See <a href="https://corefork.telegram.org/type/Bool" />
    ///</summary>
    public bool Hidden { get; set; }

    public void ComputeFlag()
    {

    }

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

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