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

namespace MyTelegram.Schema.Help;

///<summary>
/// Info on support user.
/// See <a href="https://corefork.telegram.org/constructor/help.support" />
///</summary>
[TlObject(0x17c6b5f6)]
public sealed class TSupport : ISupport
{
    public uint ConstructorId => 0x17c6b5f6;
    ///<summary>
    /// Phone number
    ///</summary>
    public string PhoneNumber { get; set; }

    ///<summary>
    /// User
    /// See <a href="https://corefork.telegram.org/type/User" />
    ///</summary>
    public MyTelegram.Schema.IUser User { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        PhoneNumber = buffer.ReadString();
        User = buffer.Read<MyTelegram.Schema.IUser>();
    }
}