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

namespace MyTelegram.Schema.Help;

///<summary>
/// Internal use
/// See <a href="https://corefork.telegram.org/constructor/help.userInfo" />
///</summary>
[TlObject(0x1eb3758)]
public sealed class TUserInfo : IUserInfo
{
    public uint ConstructorId => 0x1eb3758;
    ///<summary>
    /// Info
    ///</summary>
    public string Message { get; set; }

    ///<summary>
    /// <a href="https://corefork.telegram.org/api/entities">Message entities for styled text</a>
    ///</summary>
    public TVector<MyTelegram.Schema.IMessageEntity> Entities { get; set; }

    ///<summary>
    /// Author
    ///</summary>
    public string Author { get; set; }

    ///<summary>
    /// Date
    ///</summary>
    public int Date { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Message);
        writer.Write(Entities);
        writer.Write(Author);
        writer.Write(Date);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Message = buffer.ReadString();
        Entities = buffer.Read<TVector<MyTelegram.Schema.IMessageEntity>>();
        Author = buffer.ReadString();
        Date = buffer.ReadInt32();
    }
}