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

namespace MyTelegram.Schema;

///<summary>
/// Represents a channel
/// See <a href="https://corefork.telegram.org/constructor/inputChannel" />
///</summary>
[TlObject(0xf35aec28)]
public sealed class TInputChannel : IInputChannel
{
    public uint ConstructorId => 0xf35aec28;
    ///<summary>
    /// Channel ID
    ///</summary>
    public long ChannelId { get; set; }

    ///<summary>
    /// Access hash taken from the <a href="https://corefork.telegram.org/constructor/channel">channel</a> constructor
    ///</summary>
    public long AccessHash { get; set; }

    public void ComputeFlag()
    {

    }

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

    public void Deserialize(ref ReadOnlyMemory<byte> buffer)
    {
        ChannelId = buffer.ReadInt64();
        AccessHash = buffer.ReadInt64();
    }
}