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

namespace MyTelegram.Schema.Payments;

///<summary>
/// Get a star gift
/// See <a href="https://corefork.telegram.org/method/payments.getStarGift" />
///</summary>
[TlObject(0x23830de9)]
public sealed class RequestGetStarGift : IRequest<MyTelegram.Schema.IStarGift>
{
    public uint ConstructorId => 0x23830de9;
    public int Flags { get; set; }
    public MyTelegram.Schema.IInputPeer Peer { get; set; }
    public int MsgId { get; set; }

    public void ComputeFlag()
    {

    }

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

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