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

namespace MyTelegram.Schema.Account;

///<summary>
/// Set global privacy settings
/// <para>Possible errors</para>
/// Code Type Description
/// 400 AUTOARCHIVE_NOT_AVAILABLE The autoarchive setting is not available at this time: please check the value of the <a href="https://corefork.telegram.org/api/config#client-configuration">autoarchive_setting_available field in client config&nbsp;»</a> before calling this method.
/// 403 PREMIUM_ACCOUNT_REQUIRED A premium account is required to execute this action.
/// See <a href="https://corefork.telegram.org/method/account.setGlobalPrivacySettings" />
///</summary>
[TlObject(0x1edaaac2)]
public sealed class RequestSetGlobalPrivacySettings : IRequest<MyTelegram.Schema.IGlobalPrivacySettings>
{
    public uint ConstructorId => 0x1edaaac2;
    ///<summary>
    /// Global privacy settings
    /// See <a href="https://corefork.telegram.org/type/GlobalPrivacySettings" />
    ///</summary>
    public MyTelegram.Schema.IGlobalPrivacySettings Settings { get; set; }

    public void ComputeFlag()
    {

    }

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

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