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

namespace MyTelegram.Schema.Phone;

///<summary>
/// Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 PEER_ID_INVALID The provided peer id is invalid.
/// See <a href="https://corefork.telegram.org/method/phone.getGroupCallJoinAs" />
///</summary>
[TlObject(0xef7c213a)]
public sealed class RequestGetGroupCallJoinAs : IRequest<MyTelegram.Schema.Phone.IJoinAsPeers>
{
    public uint ConstructorId => 0xef7c213a;
    ///<summary>
    /// The dialog whose group call or livestream we're trying to join
    /// See <a href="https://corefork.telegram.org/type/InputPeer" />
    ///</summary>
    public MyTelegram.Schema.IInputPeer Peer { get; set; }

    public void ComputeFlag()
    {

    }

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

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