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

namespace MyTelegram.Schema.Messages;

///<summary>
/// Rate <a href="https://corefork.telegram.org/api/transcribe">transcribed voice message</a>
/// See <a href="https://corefork.telegram.org/method/messages.rateTranscribedAudio" />
///</summary>
[TlObject(0x7f1d072f)]
public sealed class RequestRateTranscribedAudio : IRequest<IBool>
{
    public uint ConstructorId => 0x7f1d072f;
    ///<summary>
    /// Peer where the voice message was sent
    /// See <a href="https://corefork.telegram.org/type/InputPeer" />
    ///</summary>
    public MyTelegram.Schema.IInputPeer Peer { get; set; }

    ///<summary>
    /// Message ID
    ///</summary>
    public int MsgId { get; set; }

    ///<summary>
    /// Transcription ID
    ///</summary>
    public long TranscriptionId { get; set; }

    ///<summary>
    /// Whether the transcription was correct
    /// See <a href="https://corefork.telegram.org/type/Bool" />
    ///</summary>
    public bool Good { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(Peer);
        writer.Write(MsgId);
        writer.Write(TranscriptionId);
        writer.Write(Good);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Peer = buffer.Read<MyTelegram.Schema.IInputPeer>();
        MsgId = buffer.ReadInt32();
        TranscriptionId = buffer.ReadInt64();
        Good = buffer.Read();
    }
}
