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

namespace MyTelegram.Schema.Langpack;

///<summary>
/// Get information about a language in a localization pack
/// <para>Possible errors</para>
/// Code Type Description
/// 400 LANG_CODE_NOT_SUPPORTED The specified language code is not supported.
/// 400 LANG_PACK_INVALID The provided language pack is invalid.
/// See <a href="https://corefork.telegram.org/method/langpack.getLanguage" />
///</summary>
[TlObject(0x6a596502)]
public sealed class RequestGetLanguage : IRequest<MyTelegram.Schema.ILangPackLanguage>
{
    public uint ConstructorId => 0x6a596502;
    ///<summary>
    /// Platform identifier (i.e. <code>android</code>, <code>tdesktop</code>, etc).
    ///</summary>
    public string LangPack { get; set; }

    ///<summary>
    /// Either an ISO 639-1 language code or a language pack name obtained from a <a href="https://corefork.telegram.org/api/links#language-pack-links">language pack link</a>.
    ///</summary>
    public string LangCode { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        LangPack = buffer.ReadString();
        LangCode = buffer.ReadString();
    }
}
