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

namespace MyTelegram.Schema.Account;

///<summary>
/// Reorder usernames associated with the currently logged-in user.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 ORDER_INVALID The specified username order is invalid.
/// 400 USERNAME_NOT_MODIFIED The username was not modified.
/// See <a href="https://corefork.telegram.org/method/account.reorderUsernames" />
///</summary>
[TlObject(0xef500eab)]
public sealed class RequestReorderUsernames : IRequest<IBool>
{
    public uint ConstructorId => 0xef500eab;
    ///<summary>
    /// The new order for active usernames. All active usernames must be specified.
    ///</summary>
    public TVector<string> Order { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Order = buffer.Read<TVector<string>>();
    }
}
