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

namespace MyTelegram.Schema;

///<summary>
/// Defines a channel for further interaction.
/// See <a href="https://corefork.telegram.org/constructor/inputPeerChannel" />
///</summary>
[TlObject(0x27bcbbfc)]
public sealed class TInputPeerChannel : IInputPeer
{
    public uint ConstructorId => 0x27bcbbfc;
    ///<summary>
    /// Channel identifier
    ///</summary>
    public long ChannelId { get; set; }

    ///<summary>
    /// <strong>access_hash</strong> value 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();
    }
}