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

namespace MyTelegram.Schema;

///<summary>
/// Changes to emoji keywords
/// See <a href="https://corefork.telegram.org/constructor/emojiKeywordsDifference" />
///</summary>
[TlObject(0x5cc761bd)]
public sealed class TEmojiKeywordsDifference : IEmojiKeywordsDifference
{
    public uint ConstructorId => 0x5cc761bd;
    ///<summary>
    /// Language code for keywords
    ///</summary>
    public string LangCode { get; set; }

    ///<summary>
    /// Previous emoji keyword list version
    ///</summary>
    public int FromVersion { get; set; }

    ///<summary>
    /// Current version of emoji keyword list
    ///</summary>
    public int Version { get; set; }

    ///<summary>
    /// Emojis associated to keywords
    ///</summary>
    public TVector<MyTelegram.Schema.IEmojiKeyword> Keywords { get; set; }

    public void ComputeFlag()
    {

    }

    public void Serialize(IBufferWriter<byte> writer)
    {
        ComputeFlag();
        writer.Write(ConstructorId);
        writer.Write(LangCode);
        writer.Write(FromVersion);
        writer.Write(Version);
        writer.Write(Keywords);
    }

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        LangCode = buffer.ReadString();
        FromVersion = buffer.ReadInt32();
        Version = buffer.ReadInt32();
        Keywords = buffer.Read<TVector<MyTelegram.Schema.IEmojiKeyword>>();
    }
}