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

namespace MyTelegram.Schema.Bots;

///<summary>
/// Set the default <a href="https://corefork.telegram.org/api/rights#suggested-bot-rights">suggested admin rights</a> for bots being added as admins to groups, see <a href="https://corefork.telegram.org/api/rights#suggested-bot-rights">here for more info on how to handle them »</a>.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 RIGHTS_NOT_MODIFIED The new admin rights are equal to the old rights, no change was made.
/// 400 USER_BOT_REQUIRED This method can only be called by a bot.
/// See <a href="https://corefork.telegram.org/method/bots.setBotGroupDefaultAdminRights" />
///</summary>
[TlObject(0x925ec9ea)]
public sealed class RequestSetBotGroupDefaultAdminRights : IRequest<IBool>
{
    public uint ConstructorId => 0x925ec9ea;
    ///<summary>
    /// Admin rights
    /// See <a href="https://corefork.telegram.org/type/ChatAdminRights" />
    ///</summary>
    public MyTelegram.Schema.IChatAdminRights AdminRights { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        AdminRights = buffer.Read<MyTelegram.Schema.IChatAdminRights>();
    }
}
