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

namespace MyTelegram.Schema.Channels;

///<summary>
/// See <a href="https://corefork.telegram.org/method/channels.toggleAutotranslation" />
///</summary>
[TlObject(0x167fc0a1)]
public sealed class RequestToggleAutotranslation : IRequest<MyTelegram.Schema.IUpdates>
{
    public uint ConstructorId => 0x167fc0a1;
    public MyTelegram.Schema.IInputChannel Channel { get; set; }
    public bool Enabled { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Channel = buffer.Read<MyTelegram.Schema.IInputChannel>();
        Enabled = buffer.Read();
    }
}
