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

namespace MyTelegram.Schema;

///<summary>
/// See <a href="https://corefork.telegram.org/constructor/starGiftAttributeCounter" />
///</summary>
[TlObject(0x2eb1b658)]
public sealed class TStarGiftAttributeCounter : IStarGiftAttributeCounter
{
    public uint ConstructorId => 0x2eb1b658;
    public MyTelegram.Schema.IStarGiftAttributeId Attribute { get; set; }
    public int Count { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Attribute = buffer.Read<MyTelegram.Schema.IStarGiftAttributeId>();
        Count = buffer.ReadInt32();
    }
}