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

namespace MyTelegram.Schema.Account;

///<summary>
/// Create a <a href="https://corefork.telegram.org/api/business#business-chat-links">business chat deep link »</a>.
/// <para>Possible errors</para>
/// Code Type Description
/// 400 CHATLINKS_TOO_MUCH Too many <a href="https://corefork.telegram.org/api/business#business-chat-links">business chat links</a> were created, please delete some older links.
/// 403 PREMIUM_ACCOUNT_REQUIRED A premium account is required to execute this action.
/// See <a href="https://corefork.telegram.org/method/account.createBusinessChatLink" />
///</summary>
[TlObject(0x8851e68e)]
public sealed class RequestCreateBusinessChatLink : IRequest<MyTelegram.Schema.IBusinessChatLink>
{
    public uint ConstructorId => 0x8851e68e;
    ///<summary>
    /// Info about the link to create.
    /// See <a href="https://corefork.telegram.org/type/InputBusinessChatLink" />
    ///</summary>
    public MyTelegram.Schema.IInputBusinessChatLink Link { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Link = buffer.Read<MyTelegram.Schema.IInputBusinessChatLink>();
    }
}
