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

namespace MyTelegram.Schema.Channels;

///<summary>
/// Set an <a href="https://corefork.telegram.org/api/emoji-status">emoji status</a> for a channel or supergroup.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 CHANNEL_INVALID The provided channel is invalid.
/// See <a href="https://corefork.telegram.org/method/channels.updateEmojiStatus" />
///</summary>
[TlObject(0xf0d3e6a8)]
public sealed class RequestUpdateEmojiStatus : IRequest<MyTelegram.Schema.IUpdates>
{
    public uint ConstructorId => 0xf0d3e6a8;
    ///<summary>
    /// The channel/supergroup, must have at least <a href="https://corefork.telegram.org/api/config#channel-emoji-status-level-min">channel_emoji_status_level_min</a>/<a href="https://corefork.telegram.org/api/config#group-emoji-status-level-min">group_emoji_status_level_min</a> boosts.
    /// See <a href="https://corefork.telegram.org/type/InputChannel" />
    ///</summary>
    public MyTelegram.Schema.IInputChannel Channel { get; set; }

    ///<summary>
    /// <a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a> to set
    /// See <a href="https://corefork.telegram.org/type/EmojiStatus" />
    ///</summary>
    public MyTelegram.Schema.IEmojiStatus EmojiStatus { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Channel = buffer.Read<MyTelegram.Schema.IInputChannel>();
        EmojiStatus = buffer.Read<MyTelegram.Schema.IEmojiStatus>();
    }
}
