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

namespace MyTelegram.Schema;

///<summary>
/// Indicates the channel was <a href="https://corefork.telegram.org/api/channel">migrated</a> from the specified chat
/// See <a href="https://corefork.telegram.org/constructor/messageActionChannelMigrateFrom" />
///</summary>
[TlObject(0xea3948e9)]
public sealed class TMessageActionChannelMigrateFrom : IMessageAction
{
    public uint ConstructorId => 0xea3948e9;
    ///<summary>
    /// The old chat title
    ///</summary>
    public string Title { get; set; }

    ///<summary>
    /// The old chat ID
    ///</summary>
    public long ChatId { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        Title = buffer.ReadString();
        ChatId = buffer.ReadInt64();
    }
}