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

namespace MyTelegram.Schema;

///<summary>
/// Existing photo to be set as a chat profile photo.
/// See <a href="https://corefork.telegram.org/constructor/inputChatPhoto" />
///</summary>
[TlObject(0x8953ad37)]
public sealed class TInputChatPhoto : IInputChatPhoto
{
    public uint ConstructorId => 0x8953ad37;
    ///<summary>
    /// Existing photo
    /// See <a href="https://corefork.telegram.org/type/InputPhoto" />
    ///</summary>
    public MyTelegram.Schema.IInputPhoto Id { get; set; }

    public void ComputeFlag()
    {

    }

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

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