// <auto-generated/>
using System;

namespace Telegram.Api.TL
{
	public partial class TLMessageEntityTextUrl : TLMessageEntityBase 
	{
		public String Url { get; set; }

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

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

		public override void Read(TLBinaryReader from, bool cache = false)
		{
			Offset = from.ReadInt32();
			Length = from.ReadInt32();
			Url = from.ReadString();
			if (cache) ReadFromCache(from);
		}

		public override void Write(TLBinaryWriter to, bool cache = false)
		{
			to.Write(0x76A6D327);
			to.Write(Offset);
			to.Write(Length);
			to.Write(Url);
			if (cache) WriteToCache(to);
		}
	}
}