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

namespace MyTelegram.Schema;

///<summary>
/// Changes to the app's localization pack
/// See <a href="https://corefork.telegram.org/constructor/langPackDifference" />
///</summary>
[TlObject(0xf385c1f6)]
public sealed class TLangPackDifference : ILangPackDifference
{
    public uint ConstructorId => 0xf385c1f6;
    ///<summary>
    /// Language code
    ///</summary>
    public string LangCode { get; set; }

    ///<summary>
    /// Previous version number
    ///</summary>
    public int FromVersion { get; set; }

    ///<summary>
    /// New version number
    ///</summary>
    public int Version { get; set; }

    ///<summary>
    /// Localized strings
    ///</summary>
    public TVector<MyTelegram.Schema.ILangPackString> Strings { 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(Strings);
    }

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