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

namespace MyTelegram.Schema.Auth;

///<summary>
/// The code will be sent via a flash phone call, that will be closed immediately. The phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern.
/// See <a href="https://corefork.telegram.org/constructor/auth.sentCodeTypeFlashCall" />
///</summary>
[TlObject(0xab03c6d9)]
public sealed class TSentCodeTypeFlashCall : ISentCodeType
{
    public uint ConstructorId => 0xab03c6d9;
    ///<summary>
    /// <a href="https://corefork.telegram.org/api/pattern">pattern</a> to match
    ///</summary>
    public string Pattern { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Pattern = buffer.ReadString();
    }
}