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

namespace MyTelegram.Schema;

///<summary>
/// Info about an <a href="https://corefork.telegram.org/mtproto/mtproto-transports#transport-obfuscation">MTProxy</a> used to connect.
/// See <a href="https://corefork.telegram.org/constructor/inputClientProxy" />
///</summary>
[TlObject(0x75588b3f)]
public sealed class TInputClientProxy : IInputClientProxy
{
    public uint ConstructorId => 0x75588b3f;
    ///<summary>
    /// Proxy address
    ///</summary>
    public string Address { get; set; }

    ///<summary>
    /// Proxy port
    ///</summary>
    public int Port { get; set; }

    public void ComputeFlag()
    {

    }

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

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