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

namespace MyTelegram.Schema.Account;

///<summary>
/// Get privacy settings of current account
/// <para>Possible errors</para>
/// Code Type Description
/// 400 PRIVACY_KEY_INVALID The privacy key is invalid.
/// See <a href="https://corefork.telegram.org/method/account.getPrivacy" />
///</summary>
[TlObject(0xdadbc950)]
public sealed class RequestGetPrivacy : IRequest<MyTelegram.Schema.Account.IPrivacyRules>
{
    public uint ConstructorId => 0xdadbc950;
    ///<summary>
    /// Peer category whose privacy settings should be fetched
    /// See <a href="https://corefork.telegram.org/type/InputPrivacyKey" />
    ///</summary>
    public MyTelegram.Schema.IInputPrivacyKey Key { get; set; }

    public void ComputeFlag()
    {

    }

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

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