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

namespace MyTelegram.Schema.Payments;

///<summary>
/// Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in <code>peer</code>, paid using the Telegram Stars owned by the specified <code>peer</code>, see <a href="https://corefork.telegram.org/api/stars#paying-for-ads">here »</a> for more info.
/// <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/payments.getStarsRevenueAdsAccountUrl" />
///</summary>
[TlObject(0xd1d7efc5)]
public sealed class RequestGetStarsRevenueAdsAccountUrl : IRequest<MyTelegram.Schema.Payments.IStarsRevenueAdsAccountUrl>
{
    public uint ConstructorId => 0xd1d7efc5;
    ///<summary>
    /// Channel or bot that owns the stars.
    /// 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>();
    }
}
