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

namespace MyTelegram.Schema;

///<summary>
/// Email address to use in <a href="https://corefork.telegram.org/passport">telegram passport</a>: <a href="https://corefork.telegram.org/passport/encryption#secureplaindata">it must be verified, first »</a>.
/// See <a href="https://corefork.telegram.org/constructor/securePlainEmail" />
///</summary>
[TlObject(0x21ec5a5f)]
public sealed class TSecurePlainEmail : ISecurePlainData
{
    public uint ConstructorId => 0x21ec5a5f;
    ///<summary>
    /// Email address
    ///</summary>
    public string Email { get; set; }

    public void ComputeFlag()
    {

    }

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

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