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

namespace MyTelegram.Schema.Channels.LayerN;

///<summary>
/// Obtains a list of peers that can be used to send messages in a specific group
/// <para>Possible errors</para>
/// Code Type Description
/// 400 CHANNEL_INVALID The provided channel is invalid.
/// 400 CHANNEL_PRIVATE You haven't joined this channel/supergroup.
/// 400 CHAT_ID_INVALID The provided chat id is invalid.
/// 400 PEER_ID_INVALID The provided peer id is invalid.
/// See <a href="https://corefork.telegram.org/method/channels.getSendAs" />
///</summary>
[TlObject(0xdc770ee)]
public sealed class RequestGetSendAs : IRequest<ISendAsPeers>
{
    public uint ConstructorId => 0xdc770ee;
    ///<summary>
    /// The group where we intend to send messages
    ///</summary>
    public 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<IInputPeer>();
    }
}
