// <auto-generated/>
using System;

namespace Telegram.Api.TL.Methods.Channels
{
	/// <summary>
	/// RCP method channels.deleteMessages
	/// </summary>
	public partial class TLChannelsDeleteMessages : TLObject
	{
		public TLInputChannelBase Channel { get; set; }
		public TLVector<Int32> Id { get; set; }

		public TLChannelsDeleteMessages() { }
		public TLChannelsDeleteMessages(TLBinaryReader from, bool cache = false)
		{
			Read(from, cache);
		}

		public override TLType TypeId { get { return TLType.ChannelsDeleteMessages; } }

		public override void Read(TLBinaryReader from, bool cache = false)
		{
			Channel = TLFactory.Read<TLInputChannelBase>(from, cache);
			Id = TLFactory.Read<TLVector<Int32>>(from, cache);
			if (cache) ReadFromCache(from);
		}

		public override void Write(TLBinaryWriter to, bool cache = false)
		{
			to.Write(0x84C1FD4E);
			to.WriteObject(Channel, cache);
			to.WriteObject(Id, cache);
			if (cache) WriteToCache(to);
		}
	}
}