diff --git a/TLSharp.Core/TelegramClient.cs b/TLSharp.Core/TelegramClient.cs index ace058e..a8f8842 100644 --- a/TLSharp.Core/TelegramClient.cs +++ b/TLSharp.Core/TelegramClient.cs @@ -72,7 +72,7 @@ namespace TLSharp.Core query = config, system_version = "Win 10.0" }; - var invokewithLayer = new TLRequestInvokeWithLayer() { layer = 57, query = request }; + var invokewithLayer = new TLRequestInvokeWithLayer() { layer = 66, query = request }; await _sender.Send(invokewithLayer); await _sender.Receive(invokewithLayer); diff --git a/TeleSharp.TL/TL/Account/TLRequestGetTmpPassword.cs b/TeleSharp.TL/TL/Account/TLRequestGetTmpPassword.cs new file mode 100644 index 0000000..557963c --- /dev/null +++ b/TeleSharp.TL/TL/Account/TLRequestGetTmpPassword.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1250046590)] + public class TLRequestGetTmpPassword : TLMethod + { + public override int Constructor + { + get + { + return 1250046590; + } + } + + public byte[] password_hash {get;set;} + public int period {get;set;} + public Account.TLTmpPassword Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + password_hash = BytesUtil.Deserialize(br); +period = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(password_hash,bw); +bw.Write(period); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Account.TLTmpPassword)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Account/TLTmpPassword.cs b/TeleSharp.TL/TL/Account/TLTmpPassword.cs new file mode 100644 index 0000000..8594107 --- /dev/null +++ b/TeleSharp.TL/TL/Account/TLTmpPassword.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-614138572)] + public class TLTmpPassword : TLObject + { + public override int Constructor + { + get + { + return -614138572; + } + } + + public byte[] tmp_password {get;set;} + public int valid_until {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + tmp_password = BytesUtil.Deserialize(br); +valid_until = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(tmp_password,bw); +bw.Write(valid_until); + + } + } +} diff --git a/TeleSharp.TL/TL/Bots/TLRequestAnswerWebhookJSONQuery.cs b/TeleSharp.TL/TL/Bots/TLRequestAnswerWebhookJSONQuery.cs new file mode 100644 index 0000000..b054a2d --- /dev/null +++ b/TeleSharp.TL/TL/Bots/TLRequestAnswerWebhookJSONQuery.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Bots +{ + [TLObject(-434028723)] + public class TLRequestAnswerWebhookJSONQuery : TLMethod + { + public override int Constructor + { + get + { + return -434028723; + } + } + + public long query_id {get;set;} + public TLDataJSON data {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + query_id = br.ReadInt64(); +data = (TLDataJSON)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(query_id); +ObjectUtils.SerializeObject(data,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Bots/TLRequestSendCustomRequest.cs b/TeleSharp.TL/TL/Bots/TLRequestSendCustomRequest.cs new file mode 100644 index 0000000..069d1d1 --- /dev/null +++ b/TeleSharp.TL/TL/Bots/TLRequestSendCustomRequest.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Bots +{ + [TLObject(-1440257555)] + public class TLRequestSendCustomRequest : TLMethod + { + public override int Constructor + { + get + { + return -1440257555; + } + } + + public string custom_method {get;set;} + public TLDataJSON @params {get;set;} + public TLDataJSON Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + custom_method = StringUtil.Deserialize(br); +@params = (TLDataJSON)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(custom_method,bw); +ObjectUtils.SerializeObject(@params,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (TLDataJSON)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Channels/TLRequestGetAdminedPublicChannels.cs b/TeleSharp.TL/TL/Channels/TLRequestGetAdminedPublicChannels.cs index a419020..3f36ff7 100644 --- a/TeleSharp.TL/TL/Channels/TLRequestGetAdminedPublicChannels.cs +++ b/TeleSharp.TL/TL/Channels/TLRequestGetAdminedPublicChannels.cs @@ -18,7 +18,7 @@ namespace TeleSharp.TL.Channels } } - public Messages.TLChats Response{ get; set;} + public Messages.TLAbsChats Response{ get; set;} public void ComputeFlags() @@ -38,7 +38,7 @@ namespace TeleSharp.TL.Channels } public override void deserializeResponse(BinaryReader br) { - Response = (Messages.TLChats)ObjectUtils.DeserializeObject(br); + Response = (Messages.TLAbsChats)ObjectUtils.DeserializeObject(br); } } diff --git a/TeleSharp.TL/TL/Channels/TLRequestGetChannels.cs b/TeleSharp.TL/TL/Channels/TLRequestGetChannels.cs index 8f74dc9..c673a74 100644 --- a/TeleSharp.TL/TL/Channels/TLRequestGetChannels.cs +++ b/TeleSharp.TL/TL/Channels/TLRequestGetChannels.cs @@ -19,7 +19,7 @@ namespace TeleSharp.TL.Channels } public TLVector id {get;set;} - public Messages.TLChats Response{ get; set;} + public Messages.TLAbsChats Response{ get; set;} public void ComputeFlags() @@ -41,7 +41,7 @@ namespace TeleSharp.TL.Channels } public override void deserializeResponse(BinaryReader br) { - Response = (Messages.TLChats)ObjectUtils.DeserializeObject(br); + Response = (Messages.TLAbsChats)ObjectUtils.DeserializeObject(br); } } diff --git a/TeleSharp.TL/TL/Contacts/TLRequestGetTopPeers.cs b/TeleSharp.TL/TL/Contacts/TLRequestGetTopPeers.cs index d6ce936..70f2493 100644 --- a/TeleSharp.TL/TL/Contacts/TLRequestGetTopPeers.cs +++ b/TeleSharp.TL/TL/Contacts/TLRequestGetTopPeers.cs @@ -22,6 +22,7 @@ namespace TeleSharp.TL.Contacts public bool correspondents {get;set;} public bool bots_pm {get;set;} public bool bots_inline {get;set;} + public bool phone_calls {get;set;} public bool groups {get;set;} public bool channels {get;set;} public int offset {get;set;} @@ -36,6 +37,7 @@ namespace TeleSharp.TL.Contacts flags = correspondents ? (flags | 1) : (flags & ~1); flags = bots_pm ? (flags | 2) : (flags & ~2); flags = bots_inline ? (flags | 4) : (flags & ~4); +flags = phone_calls ? (flags | 8) : (flags & ~8); flags = groups ? (flags | 1024) : (flags & ~1024); flags = channels ? (flags | 32768) : (flags & ~32768); @@ -47,6 +49,7 @@ flags = channels ? (flags | 32768) : (flags & ~32768); correspondents = (flags & 1) != 0; bots_pm = (flags & 2) != 0; bots_inline = (flags & 4) != 0; +phone_calls = (flags & 8) != 0; groups = (flags & 1024) != 0; channels = (flags & 32768) != 0; offset = br.ReadInt32(); @@ -65,6 +68,7 @@ bw.Write(flags); + bw.Write(offset); bw.Write(limit); bw.Write(hash); diff --git a/TeleSharp.TL/TL/Help/TLRequestGetAppChangelog.cs b/TeleSharp.TL/TL/Help/TLRequestGetAppChangelog.cs index 0e2016d..b6357e8 100644 --- a/TeleSharp.TL/TL/Help/TLRequestGetAppChangelog.cs +++ b/TeleSharp.TL/TL/Help/TLRequestGetAppChangelog.cs @@ -7,18 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Help { - [TLObject(-1189013126)] + [TLObject(-1877938321)] public class TLRequestGetAppChangelog : TLMethod { public override int Constructor { get { - return -1189013126; + return -1877938321; } } - public Help.TLAbsAppChangelog Response{ get; set;} + public string prev_app_version {get;set;} + public TLAbsUpdates Response{ get; set;} public void ComputeFlags() @@ -28,17 +29,19 @@ namespace TeleSharp.TL.Help public override void DeserializeBody(BinaryReader br) { - + prev_app_version = StringUtil.Deserialize(br); + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - + StringUtil.Serialize(prev_app_version,bw); + } public override void deserializeResponse(BinaryReader br) { - Response = (Help.TLAbsAppChangelog)ObjectUtils.DeserializeObject(br); + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); } } diff --git a/TeleSharp.TL/TL/Help/TLRequestGetCdnConfig.cs b/TeleSharp.TL/TL/Help/TLRequestGetCdnConfig.cs new file mode 100644 index 0000000..76e79b7 --- /dev/null +++ b/TeleSharp.TL/TL/Help/TLRequestGetCdnConfig.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(1375900482)] + public class TLRequestGetCdnConfig : TLMethod + { + public override int Constructor + { + get + { + return 1375900482; + } + } + + public TLCdnConfig Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (TLCdnConfig)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Help/TLRequestSetBotUpdatesStatus.cs b/TeleSharp.TL/TL/Help/TLRequestSetBotUpdatesStatus.cs new file mode 100644 index 0000000..0f7a07d --- /dev/null +++ b/TeleSharp.TL/TL/Help/TLRequestSetBotUpdatesStatus.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(-333262899)] + public class TLRequestSetBotUpdatesStatus : TLMethod + { + public override int Constructor + { + get + { + return -333262899; + } + } + + public int pending_updates_count {get;set;} + public string message {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + pending_updates_count = br.ReadInt32(); +message = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(pending_updates_count); +StringUtil.Serialize(message,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Help/TLAbsAppChangelog.cs b/TeleSharp.TL/TL/Messages/TLAbsChats.cs similarity index 67% rename from TeleSharp.TL/TL/Help/TLAbsAppChangelog.cs rename to TeleSharp.TL/TL/Messages/TLAbsChats.cs index ee86c4f..06a5553 100644 --- a/TeleSharp.TL/TL/Help/TLAbsAppChangelog.cs +++ b/TeleSharp.TL/TL/Messages/TLAbsChats.cs @@ -5,9 +5,9 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using TeleSharp.TL; -namespace TeleSharp.TL.Help +namespace TeleSharp.TL.Messages { - public abstract class TLAbsAppChangelog : TLObject + public abstract class TLAbsChats : TLObject { } } diff --git a/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs b/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs index 36bc164..ec8895d 100644 --- a/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs +++ b/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-1324486149)] + [TLObject(911761060)] public class TLBotCallbackAnswer : TLObject { public override int Constructor { get { - return -1324486149; + return 911761060; } } @@ -23,6 +23,7 @@ namespace TeleSharp.TL.Messages public bool has_url {get;set;} public string message {get;set;} public string url {get;set;} + public int cache_time {get;set;} public void ComputeFlags() @@ -50,6 +51,7 @@ url = StringUtil.Deserialize(br); else url = null; +cache_time = br.ReadInt32(); } @@ -64,6 +66,7 @@ if ((flags & 1) != 0) StringUtil.Serialize(message,bw); if ((flags & 4) != 0) StringUtil.Serialize(url,bw); +bw.Write(cache_time); } } diff --git a/TeleSharp.TL/TL/Messages/TLBotResults.cs b/TeleSharp.TL/TL/Messages/TLBotResults.cs index 47bbdd1..fe73582 100644 --- a/TeleSharp.TL/TL/Messages/TLBotResults.cs +++ b/TeleSharp.TL/TL/Messages/TLBotResults.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(627509670)] + [TLObject(-858565059)] public class TLBotResults : TLObject { public override int Constructor { get { - return 627509670; + return -858565059; } } @@ -24,6 +24,7 @@ namespace TeleSharp.TL.Messages public string next_offset {get;set;} public TLInlineBotSwitchPM switch_pm {get;set;} public TLVector results {get;set;} + public int cache_time {get;set;} public void ComputeFlags() @@ -51,6 +52,7 @@ else switch_pm = null; results = (TLVector)ObjectUtils.DeserializeVector(br); +cache_time = br.ReadInt32(); } @@ -66,6 +68,7 @@ StringUtil.Serialize(next_offset,bw); if ((flags & 4) != 0) ObjectUtils.SerializeObject(switch_pm,bw); ObjectUtils.SerializeObject(results,bw); +bw.Write(cache_time); } } diff --git a/TeleSharp.TL/TL/Messages/TLChats.cs b/TeleSharp.TL/TL/Messages/TLChats.cs index 5b9580e..5277ed6 100644 --- a/TeleSharp.TL/TL/Messages/TLChats.cs +++ b/TeleSharp.TL/TL/Messages/TLChats.cs @@ -8,7 +8,7 @@ using TeleSharp.TL; namespace TeleSharp.TL.Messages { [TLObject(1694474197)] - public class TLChats : TLObject + public class TLChats : TLAbsChats { public override int Constructor { diff --git a/TeleSharp.TL/TL/Messages/TLChatsSlice.cs b/TeleSharp.TL/TL/Messages/TLChatsSlice.cs new file mode 100644 index 0000000..6c9b9ca --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLChatsSlice.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1663561404)] + public class TLChatsSlice : TLAbsChats + { + public override int Constructor + { + get + { + return -1663561404; + } + } + + public int count {get;set;} + public TLVector chats {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + count = br.ReadInt32(); +chats = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(count); +ObjectUtils.SerializeObject(chats,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestDeleteMessages.cs b/TeleSharp.TL/TL/Messages/TLRequestDeleteMessages.cs index 26c11ed..58b0c17 100644 --- a/TeleSharp.TL/TL/Messages/TLRequestDeleteMessages.cs +++ b/TeleSharp.TL/TL/Messages/TLRequestDeleteMessages.cs @@ -7,36 +7,45 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-1510897371)] + [TLObject(-443640366)] public class TLRequestDeleteMessages : TLMethod { public override int Constructor { get { - return -1510897371; + return -443640366; } } - public TLVector id {get;set;} + public int flags {get;set;} + public bool revoke {get;set;} + public TLVector id {get;set;} public Messages.TLAffectedMessages Response{ get; set;} public void ComputeFlags() { - + flags = 0; +flags = revoke ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - id = (TLVector)ObjectUtils.DeserializeVector(br); + flags = br.ReadInt32(); +revoke = (flags & 1) != 0; +id = (TLVector)ObjectUtils.DeserializeVector(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(id,bw); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(id,bw); } public override void deserializeResponse(BinaryReader br) diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetAllChats.cs b/TeleSharp.TL/TL/Messages/TLRequestGetAllChats.cs new file mode 100644 index 0000000..2ddd329 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestGetAllChats.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-341307408)] + public class TLRequestGetAllChats : TLMethod + { + public override int Constructor + { + get + { + return -341307408; + } + } + + public TLVector except_ids {get;set;} + public Messages.TLAbsChats Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + except_ids = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(except_ids,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsChats)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetChats.cs b/TeleSharp.TL/TL/Messages/TLRequestGetChats.cs index b9635c4..c3f920b 100644 --- a/TeleSharp.TL/TL/Messages/TLRequestGetChats.cs +++ b/TeleSharp.TL/TL/Messages/TLRequestGetChats.cs @@ -19,7 +19,7 @@ namespace TeleSharp.TL.Messages } public TLVector id {get;set;} - public Messages.TLChats Response{ get; set;} + public Messages.TLAbsChats Response{ get; set;} public void ComputeFlags() @@ -41,7 +41,7 @@ namespace TeleSharp.TL.Messages } public override void deserializeResponse(BinaryReader br) { - Response = (Messages.TLChats)ObjectUtils.DeserializeObject(br); + Response = (Messages.TLAbsChats)ObjectUtils.DeserializeObject(br); } } diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetCommonChats.cs b/TeleSharp.TL/TL/Messages/TLRequestGetCommonChats.cs new file mode 100644 index 0000000..4fba463 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestGetCommonChats.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(218777796)] + public class TLRequestGetCommonChats : TLMethod + { + public override int Constructor + { + get + { + return 218777796; + } + } + + public TLAbsInputUser user_id {get;set;} + public int max_id {get;set;} + public int limit {get;set;} + public Messages.TLAbsChats Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + user_id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); +max_id = br.ReadInt32(); +limit = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(user_id,bw); +bw.Write(max_id); +bw.Write(limit); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsChats)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetDialogs.cs b/TeleSharp.TL/TL/Messages/TLRequestGetDialogs.cs index 219e7ac..dd14dc7 100644 --- a/TeleSharp.TL/TL/Messages/TLRequestGetDialogs.cs +++ b/TeleSharp.TL/TL/Messages/TLRequestGetDialogs.cs @@ -7,18 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(1799878989)] + [TLObject(421243333)] public class TLRequestGetDialogs : TLMethod { public override int Constructor { get { - return 1799878989; + return 421243333; } } - public int offset_date {get;set;} + public int flags {get;set;} + public bool exclude_pinned {get;set;} + public int offset_date {get;set;} public int offset_id {get;set;} public TLAbsInputPeer offset_peer {get;set;} public int limit {get;set;} @@ -27,12 +29,16 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - + flags = 0; +flags = exclude_pinned ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - offset_date = br.ReadInt32(); + flags = br.ReadInt32(); +exclude_pinned = (flags & 1) != 0; +offset_date = br.ReadInt32(); offset_id = br.ReadInt32(); offset_peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); limit = br.ReadInt32(); @@ -42,7 +48,10 @@ limit = br.ReadInt32(); public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - bw.Write(offset_date); + ComputeFlags(); +bw.Write(flags); + +bw.Write(offset_date); bw.Write(offset_id); ObjectUtils.SerializeObject(offset_peer,bw); bw.Write(limit); diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetPinnedDialogs.cs b/TeleSharp.TL/TL/Messages/TLRequestGetPinnedDialogs.cs new file mode 100644 index 0000000..b4ae4d4 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestGetPinnedDialogs.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-497756594)] + public class TLRequestGetPinnedDialogs : TLMethod + { + public override int Constructor + { + get + { + return -497756594; + } + } + + public Messages.TLPeerDialogs Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLPeerDialogs)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestGetWebPage.cs b/TeleSharp.TL/TL/Messages/TLRequestGetWebPage.cs new file mode 100644 index 0000000..2c7f666 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestGetWebPage.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(852135825)] + public class TLRequestGetWebPage : TLMethod + { + public override int Constructor + { + get + { + return 852135825; + } + } + + public string url {get;set;} + public int hash {get;set;} + public TLAbsWebPage Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + url = StringUtil.Deserialize(br); +hash = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(url,bw); +bw.Write(hash); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (TLAbsWebPage)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestReorderPinnedDialogs.cs b/TeleSharp.TL/TL/Messages/TLRequestReorderPinnedDialogs.cs new file mode 100644 index 0000000..ccbab52 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestReorderPinnedDialogs.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1784678844)] + public class TLRequestReorderPinnedDialogs : TLMethod + { + public override int Constructor + { + get + { + return -1784678844; + } + } + + public int flags {get;set;} + public bool force {get;set;} + public TLVector order {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = force ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +force = (flags & 1) != 0; +order = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(order,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestReportEncryptedSpam.cs b/TeleSharp.TL/TL/Messages/TLRequestReportEncryptedSpam.cs new file mode 100644 index 0000000..b4a01ef --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestReportEncryptedSpam.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1259113487)] + public class TLRequestReportEncryptedSpam : TLMethod + { + public override int Constructor + { + get + { + return 1259113487; + } + } + + public TLInputEncryptedChat peer {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + peer = (TLInputEncryptedChat)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(peer,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs b/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs index 71b8e6b..3edd89a 100644 --- a/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs +++ b/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-920136629)] + [TLObject(-712043766)] public class TLRequestSetBotCallbackAnswer : TLMethod { public override int Constructor { get { - return -920136629; + return -712043766; } } @@ -23,6 +23,7 @@ namespace TeleSharp.TL.Messages public long query_id {get;set;} public string message {get;set;} public string url {get;set;} + public int cache_time {get;set;} public bool Response{ get; set;} @@ -50,6 +51,7 @@ url = StringUtil.Deserialize(br); else url = null; +cache_time = br.ReadInt32(); } @@ -64,6 +66,7 @@ if ((flags & 1) != 0) StringUtil.Serialize(message,bw); if ((flags & 4) != 0) StringUtil.Serialize(url,bw); +bw.Write(cache_time); } public override void deserializeResponse(BinaryReader br) diff --git a/TeleSharp.TL/TL/Messages/TLRequestSetBotPrecheckoutResults.cs b/TeleSharp.TL/TL/Messages/TLRequestSetBotPrecheckoutResults.cs new file mode 100644 index 0000000..d675b49 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestSetBotPrecheckoutResults.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(163765653)] + public class TLRequestSetBotPrecheckoutResults : TLMethod + { + public override int Constructor + { + get + { + return 163765653; + } + } + + public int flags {get;set;} + public bool success {get;set;} + public long query_id {get;set;} + public string error {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = success ? (flags | 2) : (flags & ~2); +flags = error != null ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +success = (flags & 2) != 0; +query_id = br.ReadInt64(); +if ((flags & 1) != 0) +error = StringUtil.Deserialize(br); +else +error = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +bw.Write(query_id); +if ((flags & 1) != 0) +StringUtil.Serialize(error,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestSetBotShippingResults.cs b/TeleSharp.TL/TL/Messages/TLRequestSetBotShippingResults.cs new file mode 100644 index 0000000..61260b1 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestSetBotShippingResults.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-436833542)] + public class TLRequestSetBotShippingResults : TLMethod + { + public override int Constructor + { + get + { + return -436833542; + } + } + + public int flags {get;set;} + public long query_id {get;set;} + public string error {get;set;} + public TLVector shipping_options {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = error != null ? (flags | 1) : (flags & ~1); +flags = shipping_options != null ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +query_id = br.ReadInt64(); +if ((flags & 1) != 0) +error = StringUtil.Deserialize(br); +else +error = null; + +if ((flags & 2) != 0) +shipping_options = (TLVector)ObjectUtils.DeserializeVector(br); +else +shipping_options = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +bw.Write(query_id); +if ((flags & 1) != 0) +StringUtil.Serialize(error,bw); +if ((flags & 2) != 0) +ObjectUtils.SerializeObject(shipping_options,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestSetGameScore.cs b/TeleSharp.TL/TL/Messages/TLRequestSetGameScore.cs index 423efdd..cac20ea 100644 --- a/TeleSharp.TL/TL/Messages/TLRequestSetGameScore.cs +++ b/TeleSharp.TL/TL/Messages/TLRequestSetGameScore.cs @@ -20,6 +20,7 @@ namespace TeleSharp.TL.Messages public int flags {get;set;} public bool edit_message {get;set;} + public bool force {get;set;} public TLAbsInputPeer peer {get;set;} public int id {get;set;} public TLAbsInputUser user_id {get;set;} @@ -31,6 +32,7 @@ namespace TeleSharp.TL.Messages { flags = 0; flags = edit_message ? (flags | 1) : (flags & ~1); +flags = force ? (flags | 2) : (flags & ~2); } @@ -38,6 +40,7 @@ flags = edit_message ? (flags | 1) : (flags & ~1); { flags = br.ReadInt32(); edit_message = (flags & 1) != 0; +force = (flags & 2) != 0; peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); id = br.ReadInt32(); user_id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); @@ -51,6 +54,7 @@ score = br.ReadInt32(); ComputeFlags(); bw.Write(flags); + ObjectUtils.SerializeObject(peer,bw); bw.Write(id); ObjectUtils.SerializeObject(user_id,bw); diff --git a/TeleSharp.TL/TL/Messages/TLRequestSetInlineGameScore.cs b/TeleSharp.TL/TL/Messages/TLRequestSetInlineGameScore.cs index d3efa0b..9cb8983 100644 --- a/TeleSharp.TL/TL/Messages/TLRequestSetInlineGameScore.cs +++ b/TeleSharp.TL/TL/Messages/TLRequestSetInlineGameScore.cs @@ -20,6 +20,7 @@ namespace TeleSharp.TL.Messages public int flags {get;set;} public bool edit_message {get;set;} + public bool force {get;set;} public TLInputBotInlineMessageID id {get;set;} public TLAbsInputUser user_id {get;set;} public int score {get;set;} @@ -30,6 +31,7 @@ namespace TeleSharp.TL.Messages { flags = 0; flags = edit_message ? (flags | 1) : (flags & ~1); +flags = force ? (flags | 2) : (flags & ~2); } @@ -37,6 +39,7 @@ flags = edit_message ? (flags | 1) : (flags & ~1); { flags = br.ReadInt32(); edit_message = (flags & 1) != 0; +force = (flags & 2) != 0; id = (TLInputBotInlineMessageID)ObjectUtils.DeserializeObject(br); user_id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); score = br.ReadInt32(); @@ -49,6 +52,7 @@ score = br.ReadInt32(); ComputeFlags(); bw.Write(flags); + ObjectUtils.SerializeObject(id,bw); ObjectUtils.SerializeObject(user_id,bw); bw.Write(score); diff --git a/TeleSharp.TL/TL/Messages/TLRequestToggleDialogPin.cs b/TeleSharp.TL/TL/Messages/TLRequestToggleDialogPin.cs new file mode 100644 index 0000000..ca68532 --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestToggleDialogPin.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(847887978)] + public class TLRequestToggleDialogPin : TLMethod + { + public override int Constructor + { + get + { + return 847887978; + } + } + + public int flags {get;set;} + public bool pinned {get;set;} + public TLAbsInputPeer peer {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = pinned ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +pinned = (flags & 1) != 0; +peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(peer,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Messages/TLRequestUploadMedia.cs b/TeleSharp.TL/TL/Messages/TLRequestUploadMedia.cs new file mode 100644 index 0000000..087dcff --- /dev/null +++ b/TeleSharp.TL/TL/Messages/TLRequestUploadMedia.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1369162417)] + public class TLRequestUploadMedia : TLMethod + { + public override int Constructor + { + get + { + return 1369162417; + } + } + + public TLAbsInputPeer peer {get;set;} + public TLAbsInputMedia media {get;set;} + public TLAbsMessageMedia Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); +media = (TLAbsInputMedia)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(peer,bw); +ObjectUtils.SerializeObject(media,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (TLAbsMessageMedia)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLAbsPaymentResult.cs b/TeleSharp.TL/TL/Payments/TLAbsPaymentResult.cs new file mode 100644 index 0000000..5099caa --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLAbsPaymentResult.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + public abstract class TLAbsPaymentResult : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/Payments/TLPaymentForm.cs b/TeleSharp.TL/TL/Payments/TLPaymentForm.cs new file mode 100644 index 0000000..85f088f --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLPaymentForm.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(1062645411)] + public class TLPaymentForm : TLObject + { + public override int Constructor + { + get + { + return 1062645411; + } + } + + public int flags {get;set;} + public bool can_save_credentials {get;set;} + public bool password_missing {get;set;} + public int bot_id {get;set;} + public TLInvoice invoice {get;set;} + public int provider_id {get;set;} + public string url {get;set;} + public string native_provider {get;set;} + public TLDataJSON native_params {get;set;} + public TLPaymentRequestedInfo saved_info {get;set;} + public TLPaymentSavedCredentialsCard saved_credentials {get;set;} + public TLVector users {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = can_save_credentials ? (flags | 4) : (flags & ~4); +flags = password_missing ? (flags | 8) : (flags & ~8); +flags = native_provider != null ? (flags | 16) : (flags & ~16); +flags = native_params != null ? (flags | 16) : (flags & ~16); +flags = saved_info != null ? (flags | 1) : (flags & ~1); +flags = saved_credentials != null ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +can_save_credentials = (flags & 4) != 0; +password_missing = (flags & 8) != 0; +bot_id = br.ReadInt32(); +invoice = (TLInvoice)ObjectUtils.DeserializeObject(br); +provider_id = br.ReadInt32(); +url = StringUtil.Deserialize(br); +if ((flags & 16) != 0) +native_provider = StringUtil.Deserialize(br); +else +native_provider = null; + +if ((flags & 16) != 0) +native_params = (TLDataJSON)ObjectUtils.DeserializeObject(br); +else +native_params = null; + +if ((flags & 1) != 0) +saved_info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br); +else +saved_info = null; + +if ((flags & 2) != 0) +saved_credentials = (TLPaymentSavedCredentialsCard)ObjectUtils.DeserializeObject(br); +else +saved_credentials = null; + +users = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + + +bw.Write(bot_id); +ObjectUtils.SerializeObject(invoice,bw); +bw.Write(provider_id); +StringUtil.Serialize(url,bw); +if ((flags & 16) != 0) +StringUtil.Serialize(native_provider,bw); +if ((flags & 16) != 0) +ObjectUtils.SerializeObject(native_params,bw); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(saved_info,bw); +if ((flags & 2) != 0) +ObjectUtils.SerializeObject(saved_credentials,bw); +ObjectUtils.SerializeObject(users,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLPaymentReceipt.cs b/TeleSharp.TL/TL/Payments/TLPaymentReceipt.cs new file mode 100644 index 0000000..6c6fe61 --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLPaymentReceipt.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(1342771681)] + public class TLPaymentReceipt : TLObject + { + public override int Constructor + { + get + { + return 1342771681; + } + } + + public int flags {get;set;} + public int date {get;set;} + public int bot_id {get;set;} + public TLInvoice invoice {get;set;} + public int provider_id {get;set;} + public TLPaymentRequestedInfo info {get;set;} + public TLShippingOption shipping {get;set;} + public string currency {get;set;} + public long total_amount {get;set;} + public string credentials_title {get;set;} + public TLVector users {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = info != null ? (flags | 1) : (flags & ~1); +flags = shipping != null ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +date = br.ReadInt32(); +bot_id = br.ReadInt32(); +invoice = (TLInvoice)ObjectUtils.DeserializeObject(br); +provider_id = br.ReadInt32(); +if ((flags & 1) != 0) +info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br); +else +info = null; + +if ((flags & 2) != 0) +shipping = (TLShippingOption)ObjectUtils.DeserializeObject(br); +else +shipping = null; + +currency = StringUtil.Deserialize(br); +total_amount = br.ReadInt64(); +credentials_title = StringUtil.Deserialize(br); +users = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +bw.Write(date); +bw.Write(bot_id); +ObjectUtils.SerializeObject(invoice,bw); +bw.Write(provider_id); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(info,bw); +if ((flags & 2) != 0) +ObjectUtils.SerializeObject(shipping,bw); +StringUtil.Serialize(currency,bw); +bw.Write(total_amount); +StringUtil.Serialize(credentials_title,bw); +ObjectUtils.SerializeObject(users,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLPaymentResult.cs b/TeleSharp.TL/TL/Payments/TLPaymentResult.cs new file mode 100644 index 0000000..7fc5035 --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLPaymentResult.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(1314881805)] + public class TLPaymentResult : TLAbsPaymentResult + { + public override int Constructor + { + get + { + return 1314881805; + } + } + + public TLAbsUpdates updates {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + updates = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(updates,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLPaymentVerficationNeeded.cs b/TeleSharp.TL/TL/Payments/TLPaymentVerficationNeeded.cs new file mode 100644 index 0000000..ed85644 --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLPaymentVerficationNeeded.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(1800845601)] + public class TLPaymentVerficationNeeded : TLAbsPaymentResult + { + public override int Constructor + { + get + { + return 1800845601; + } + } + + public string url {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + url = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(url,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLRequestClearSavedInfo.cs b/TeleSharp.TL/TL/Payments/TLRequestClearSavedInfo.cs new file mode 100644 index 0000000..0f6f633 --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLRequestClearSavedInfo.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(-667062079)] + public class TLRequestClearSavedInfo : TLMethod + { + public override int Constructor + { + get + { + return -667062079; + } + } + + public int flags {get;set;} + public bool credentials {get;set;} + public bool info {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = credentials ? (flags | 1) : (flags & ~1); +flags = info ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +credentials = (flags & 1) != 0; +info = (flags & 2) != 0; + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + + + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLRequestGetPaymentForm.cs b/TeleSharp.TL/TL/Payments/TLRequestGetPaymentForm.cs new file mode 100644 index 0000000..8224a08 --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLRequestGetPaymentForm.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(-1712285883)] + public class TLRequestGetPaymentForm : TLMethod + { + public override int Constructor + { + get + { + return -1712285883; + } + } + + public int msg_id {get;set;} + public Payments.TLPaymentForm Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + msg_id = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(msg_id); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Payments.TLPaymentForm)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLRequestGetPaymentReceipt.cs b/TeleSharp.TL/TL/Payments/TLRequestGetPaymentReceipt.cs new file mode 100644 index 0000000..29c9f36 --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLRequestGetPaymentReceipt.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(-1601001088)] + public class TLRequestGetPaymentReceipt : TLMethod + { + public override int Constructor + { + get + { + return -1601001088; + } + } + + public int msg_id {get;set;} + public Payments.TLPaymentReceipt Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + msg_id = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(msg_id); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Payments.TLPaymentReceipt)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLRequestGetSavedInfo.cs b/TeleSharp.TL/TL/Payments/TLRequestGetSavedInfo.cs new file mode 100644 index 0000000..a1f2d06 --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLRequestGetSavedInfo.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(578650699)] + public class TLRequestGetSavedInfo : TLMethod + { + public override int Constructor + { + get + { + return 578650699; + } + } + + public Payments.TLSavedInfo Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Payments.TLSavedInfo)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLRequestSendPaymentForm.cs b/TeleSharp.TL/TL/Payments/TLRequestSendPaymentForm.cs new file mode 100644 index 0000000..b9e513a --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLRequestSendPaymentForm.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(730364339)] + public class TLRequestSendPaymentForm : TLMethod + { + public override int Constructor + { + get + { + return 730364339; + } + } + + public int flags {get;set;} + public int msg_id {get;set;} + public string requested_info_id {get;set;} + public string shipping_option_id {get;set;} + public TLAbsInputPaymentCredentials credentials {get;set;} + public Payments.TLAbsPaymentResult Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = requested_info_id != null ? (flags | 1) : (flags & ~1); +flags = shipping_option_id != null ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +msg_id = br.ReadInt32(); +if ((flags & 1) != 0) +requested_info_id = StringUtil.Deserialize(br); +else +requested_info_id = null; + +if ((flags & 2) != 0) +shipping_option_id = StringUtil.Deserialize(br); +else +shipping_option_id = null; + +credentials = (TLAbsInputPaymentCredentials)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +bw.Write(msg_id); +if ((flags & 1) != 0) +StringUtil.Serialize(requested_info_id,bw); +if ((flags & 2) != 0) +StringUtil.Serialize(shipping_option_id,bw); +ObjectUtils.SerializeObject(credentials,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Payments.TLAbsPaymentResult)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLRequestValidateRequestedInfo.cs b/TeleSharp.TL/TL/Payments/TLRequestValidateRequestedInfo.cs new file mode 100644 index 0000000..81ff8c8 --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLRequestValidateRequestedInfo.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(1997180532)] + public class TLRequestValidateRequestedInfo : TLMethod + { + public override int Constructor + { + get + { + return 1997180532; + } + } + + public int flags {get;set;} + public bool save {get;set;} + public int msg_id {get;set;} + public TLPaymentRequestedInfo info {get;set;} + public Payments.TLValidatedRequestedInfo Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = save ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +save = (flags & 1) != 0; +msg_id = br.ReadInt32(); +info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +bw.Write(msg_id); +ObjectUtils.SerializeObject(info,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Payments.TLValidatedRequestedInfo)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLSavedInfo.cs b/TeleSharp.TL/TL/Payments/TLSavedInfo.cs new file mode 100644 index 0000000..9716e60 --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLSavedInfo.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(-74456004)] + public class TLSavedInfo : TLObject + { + public override int Constructor + { + get + { + return -74456004; + } + } + + public int flags {get;set;} + public bool has_saved_credentials {get;set;} + public TLPaymentRequestedInfo saved_info {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = has_saved_credentials ? (flags | 2) : (flags & ~2); +flags = saved_info != null ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +has_saved_credentials = (flags & 2) != 0; +if ((flags & 1) != 0) +saved_info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br); +else +saved_info = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(saved_info,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Payments/TLValidatedRequestedInfo.cs b/TeleSharp.TL/TL/Payments/TLValidatedRequestedInfo.cs new file mode 100644 index 0000000..055a14c --- /dev/null +++ b/TeleSharp.TL/TL/Payments/TLValidatedRequestedInfo.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Payments +{ + [TLObject(-784000893)] + public class TLValidatedRequestedInfo : TLObject + { + public override int Constructor + { + get + { + return -784000893; + } + } + + public int flags {get;set;} + public string id {get;set;} + public TLVector shipping_options {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = id != null ? (flags | 1) : (flags & ~1); +flags = shipping_options != null ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +if ((flags & 1) != 0) +id = StringUtil.Deserialize(br); +else +id = null; + +if ((flags & 2) != 0) +shipping_options = (TLVector)ObjectUtils.DeserializeVector(br); +else +shipping_options = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +if ((flags & 1) != 0) +StringUtil.Serialize(id,bw); +if ((flags & 2) != 0) +ObjectUtils.SerializeObject(shipping_options,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Phone/TLPhoneCall.cs b/TeleSharp.TL/TL/Phone/TLPhoneCall.cs new file mode 100644 index 0000000..d82ec0e --- /dev/null +++ b/TeleSharp.TL/TL/Phone/TLPhoneCall.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Phone +{ + [TLObject(-326966976)] + public class TLPhoneCall : TLObject + { + public override int Constructor + { + get + { + return -326966976; + } + } + + public TLAbsPhoneCall phone_call {get;set;} + public TLVector users {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + phone_call = (TLAbsPhoneCall)ObjectUtils.DeserializeObject(br); +users = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(phone_call,bw); +ObjectUtils.SerializeObject(users,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Phone/TLRequestAcceptCall.cs b/TeleSharp.TL/TL/Phone/TLRequestAcceptCall.cs new file mode 100644 index 0000000..74cedc4 --- /dev/null +++ b/TeleSharp.TL/TL/Phone/TLRequestAcceptCall.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Phone +{ + [TLObject(1003664544)] + public class TLRequestAcceptCall : TLMethod + { + public override int Constructor + { + get + { + return 1003664544; + } + } + + public TLInputPhoneCall peer {get;set;} + public byte[] g_b {get;set;} + public TLPhoneCallProtocol protocol {get;set;} + public Phone.TLPhoneCall Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + peer = (TLInputPhoneCall)ObjectUtils.DeserializeObject(br); +g_b = BytesUtil.Deserialize(br); +protocol = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(peer,bw); +BytesUtil.Serialize(g_b,bw); +ObjectUtils.SerializeObject(protocol,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Phone.TLPhoneCall)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Phone/TLRequestConfirmCall.cs b/TeleSharp.TL/TL/Phone/TLRequestConfirmCall.cs new file mode 100644 index 0000000..3a889c7 --- /dev/null +++ b/TeleSharp.TL/TL/Phone/TLRequestConfirmCall.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Phone +{ + [TLObject(788404002)] + public class TLRequestConfirmCall : TLMethod + { + public override int Constructor + { + get + { + return 788404002; + } + } + + public TLInputPhoneCall peer {get;set;} + public byte[] g_a {get;set;} + public long key_fingerprint {get;set;} + public TLPhoneCallProtocol protocol {get;set;} + public Phone.TLPhoneCall Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + peer = (TLInputPhoneCall)ObjectUtils.DeserializeObject(br); +g_a = BytesUtil.Deserialize(br); +key_fingerprint = br.ReadInt64(); +protocol = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(peer,bw); +BytesUtil.Serialize(g_a,bw); +bw.Write(key_fingerprint); +ObjectUtils.SerializeObject(protocol,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Phone.TLPhoneCall)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Phone/TLRequestDiscardCall.cs b/TeleSharp.TL/TL/Phone/TLRequestDiscardCall.cs new file mode 100644 index 0000000..6751320 --- /dev/null +++ b/TeleSharp.TL/TL/Phone/TLRequestDiscardCall.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Phone +{ + [TLObject(2027164582)] + public class TLRequestDiscardCall : TLMethod + { + public override int Constructor + { + get + { + return 2027164582; + } + } + + public TLInputPhoneCall peer {get;set;} + public int duration {get;set;} + public TLAbsPhoneCallDiscardReason reason {get;set;} + public long connection_id {get;set;} + public TLAbsUpdates Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + peer = (TLInputPhoneCall)ObjectUtils.DeserializeObject(br); +duration = br.ReadInt32(); +reason = (TLAbsPhoneCallDiscardReason)ObjectUtils.DeserializeObject(br); +connection_id = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(peer,bw); +bw.Write(duration); +ObjectUtils.SerializeObject(reason,bw); +bw.Write(connection_id); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Phone/TLRequestGetCallConfig.cs b/TeleSharp.TL/TL/Phone/TLRequestGetCallConfig.cs new file mode 100644 index 0000000..188b0ae --- /dev/null +++ b/TeleSharp.TL/TL/Phone/TLRequestGetCallConfig.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Phone +{ + [TLObject(1430593449)] + public class TLRequestGetCallConfig : TLMethod + { + public override int Constructor + { + get + { + return 1430593449; + } + } + + public TLDataJSON Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (TLDataJSON)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Phone/TLRequestReceivedCall.cs b/TeleSharp.TL/TL/Phone/TLRequestReceivedCall.cs new file mode 100644 index 0000000..4d280b3 --- /dev/null +++ b/TeleSharp.TL/TL/Phone/TLRequestReceivedCall.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Phone +{ + [TLObject(399855457)] + public class TLRequestReceivedCall : TLMethod + { + public override int Constructor + { + get + { + return 399855457; + } + } + + public TLInputPhoneCall peer {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + peer = (TLInputPhoneCall)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(peer,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Phone/TLRequestRequestCall.cs b/TeleSharp.TL/TL/Phone/TLRequestRequestCall.cs new file mode 100644 index 0000000..95d28fc --- /dev/null +++ b/TeleSharp.TL/TL/Phone/TLRequestRequestCall.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Phone +{ + [TLObject(1536537556)] + public class TLRequestRequestCall : TLMethod + { + public override int Constructor + { + get + { + return 1536537556; + } + } + + public TLAbsInputUser user_id {get;set;} + public int random_id {get;set;} + public byte[] g_a_hash {get;set;} + public TLPhoneCallProtocol protocol {get;set;} + public Phone.TLPhoneCall Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + user_id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); +random_id = br.ReadInt32(); +g_a_hash = BytesUtil.Deserialize(br); +protocol = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(user_id,bw); +bw.Write(random_id); +BytesUtil.Serialize(g_a_hash,bw); +ObjectUtils.SerializeObject(protocol,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Phone.TLPhoneCall)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Phone/TLRequestSaveCallDebug.cs b/TeleSharp.TL/TL/Phone/TLRequestSaveCallDebug.cs new file mode 100644 index 0000000..543d056 --- /dev/null +++ b/TeleSharp.TL/TL/Phone/TLRequestSaveCallDebug.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Phone +{ + [TLObject(662363518)] + public class TLRequestSaveCallDebug : TLMethod + { + public override int Constructor + { + get + { + return 662363518; + } + } + + public TLInputPhoneCall peer {get;set;} + public TLDataJSON debug {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + peer = (TLInputPhoneCall)ObjectUtils.DeserializeObject(br); +debug = (TLDataJSON)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(peer,bw); +ObjectUtils.SerializeObject(debug,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Phone/TLRequestSetCallRating.cs b/TeleSharp.TL/TL/Phone/TLRequestSetCallRating.cs new file mode 100644 index 0000000..369189d --- /dev/null +++ b/TeleSharp.TL/TL/Phone/TLRequestSetCallRating.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Phone +{ + [TLObject(475228724)] + public class TLRequestSetCallRating : TLMethod + { + public override int Constructor + { + get + { + return 475228724; + } + } + + public TLInputPhoneCall peer {get;set;} + public int rating {get;set;} + public string comment {get;set;} + public TLAbsUpdates Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + peer = (TLInputPhoneCall)ObjectUtils.DeserializeObject(br); +rating = br.ReadInt32(); +comment = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(peer,bw); +bw.Write(rating); +StringUtil.Serialize(comment,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Stickers/TLRequestAddStickerToSet.cs b/TeleSharp.TL/TL/Stickers/TLRequestAddStickerToSet.cs new file mode 100644 index 0000000..b4496e0 --- /dev/null +++ b/TeleSharp.TL/TL/Stickers/TLRequestAddStickerToSet.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Stickers +{ + [TLObject(-2041315650)] + public class TLRequestAddStickerToSet : TLMethod + { + public override int Constructor + { + get + { + return -2041315650; + } + } + + public TLAbsInputStickerSet stickerset {get;set;} + public TLInputStickerSetItem sticker {get;set;} + public Messages.TLStickerSet Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + stickerset = (TLAbsInputStickerSet)ObjectUtils.DeserializeObject(br); +sticker = (TLInputStickerSetItem)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(stickerset,bw); +ObjectUtils.SerializeObject(sticker,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLStickerSet)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Stickers/TLRequestChangeStickerPosition.cs b/TeleSharp.TL/TL/Stickers/TLRequestChangeStickerPosition.cs new file mode 100644 index 0000000..f7dfeae --- /dev/null +++ b/TeleSharp.TL/TL/Stickers/TLRequestChangeStickerPosition.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Stickers +{ + [TLObject(1322714570)] + public class TLRequestChangeStickerPosition : TLMethod + { + public override int Constructor + { + get + { + return 1322714570; + } + } + + public TLAbsInputDocument sticker {get;set;} + public int position {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + sticker = (TLAbsInputDocument)ObjectUtils.DeserializeObject(br); +position = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(sticker,bw); +bw.Write(position); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Stickers/TLRequestCreateStickerSet.cs b/TeleSharp.TL/TL/Stickers/TLRequestCreateStickerSet.cs new file mode 100644 index 0000000..719a3ba --- /dev/null +++ b/TeleSharp.TL/TL/Stickers/TLRequestCreateStickerSet.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Stickers +{ + [TLObject(-1680314774)] + public class TLRequestCreateStickerSet : TLMethod + { + public override int Constructor + { + get + { + return -1680314774; + } + } + + public int flags {get;set;} + public bool masks {get;set;} + public TLAbsInputUser user_id {get;set;} + public string title {get;set;} + public string short_name {get;set;} + public TLVector stickers {get;set;} + public Messages.TLStickerSet Response{ get; set;} + + + public void ComputeFlags() + { + flags = 0; +flags = masks ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +masks = (flags & 1) != 0; +user_id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); +title = StringUtil.Deserialize(br); +short_name = StringUtil.Deserialize(br); +stickers = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(user_id,bw); +StringUtil.Serialize(title,bw); +StringUtil.Serialize(short_name,bw); +ObjectUtils.SerializeObject(stickers,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Messages.TLStickerSet)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Stickers/TLRequestRemoveStickerFromSet.cs b/TeleSharp.TL/TL/Stickers/TLRequestRemoveStickerFromSet.cs new file mode 100644 index 0000000..85e3135 --- /dev/null +++ b/TeleSharp.TL/TL/Stickers/TLRequestRemoveStickerFromSet.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Stickers +{ + [TLObject(69556532)] + public class TLRequestRemoveStickerFromSet : TLMethod + { + public override int Constructor + { + get + { + return 69556532; + } + } + + public TLAbsInputDocument sticker {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + sticker = (TLAbsInputDocument)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(sticker,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/TLAbsInputPaymentCredentials.cs b/TeleSharp.TL/TL/TLAbsInputPaymentCredentials.cs new file mode 100644 index 0000000..87a6b58 --- /dev/null +++ b/TeleSharp.TL/TL/TLAbsInputPaymentCredentials.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsInputPaymentCredentials : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/TLAbsPage.cs b/TeleSharp.TL/TL/TLAbsPage.cs new file mode 100644 index 0000000..92ef907 --- /dev/null +++ b/TeleSharp.TL/TL/TLAbsPage.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsPage : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/TLAbsPageBlock.cs b/TeleSharp.TL/TL/TLAbsPageBlock.cs new file mode 100644 index 0000000..5928c6e --- /dev/null +++ b/TeleSharp.TL/TL/TLAbsPageBlock.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsPageBlock : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/TLAbsPhoneCall.cs b/TeleSharp.TL/TL/TLAbsPhoneCall.cs new file mode 100644 index 0000000..46faf28 --- /dev/null +++ b/TeleSharp.TL/TL/TLAbsPhoneCall.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsPhoneCall : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/TLAbsPhoneCallDiscardReason.cs b/TeleSharp.TL/TL/TLAbsPhoneCallDiscardReason.cs new file mode 100644 index 0000000..c6283d6 --- /dev/null +++ b/TeleSharp.TL/TL/TLAbsPhoneCallDiscardReason.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsPhoneCallDiscardReason : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/TLAbsRichText.cs b/TeleSharp.TL/TL/TLAbsRichText.cs new file mode 100644 index 0000000..5e84f35 --- /dev/null +++ b/TeleSharp.TL/TL/TLAbsRichText.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsRichText : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/TLCdnConfig.cs b/TeleSharp.TL/TL/TLCdnConfig.cs new file mode 100644 index 0000000..72ea29b --- /dev/null +++ b/TeleSharp.TL/TL/TLCdnConfig.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1462101002)] + public class TLCdnConfig : TLObject + { + public override int Constructor + { + get + { + return 1462101002; + } + } + + public TLVector public_keys {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + public_keys = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(public_keys,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLCdnPublicKey.cs b/TeleSharp.TL/TL/TLCdnPublicKey.cs new file mode 100644 index 0000000..3533861 --- /dev/null +++ b/TeleSharp.TL/TL/TLCdnPublicKey.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-914167110)] + public class TLCdnPublicKey : TLObject + { + public override int Constructor + { + get + { + return -914167110; + } + } + + public int dc_id {get;set;} + public string public_key {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + dc_id = br.ReadInt32(); +public_key = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(dc_id); +StringUtil.Serialize(public_key,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLConfig.cs b/TeleSharp.TL/TL/TLConfig.cs index 92b8ee3..be6c711 100644 --- a/TeleSharp.TL/TL/TLConfig.cs +++ b/TeleSharp.TL/TL/TLConfig.cs @@ -7,18 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1704251862)] + [TLObject(-882895228)] public class TLConfig : TLObject { public override int Constructor { get { - return -1704251862; + return -882895228; } } public int flags {get;set;} + public bool phonecalls_enabled {get;set;} public int date {get;set;} public int expires {get;set;} public bool test_mode {get;set;} @@ -41,12 +42,19 @@ namespace TeleSharp.TL public int rating_e_decay {get;set;} public int stickers_recent_limit {get;set;} public int? tmp_sessions {get;set;} + public int pinned_dialogs_count_max {get;set;} + public int call_receive_timeout_ms {get;set;} + public int call_ring_timeout_ms {get;set;} + public int call_connect_timeout_ms {get;set;} + public int call_packet_timeout_ms {get;set;} + public string me_url_prefix {get;set;} public TLVector disabled_features {get;set;} public void ComputeFlags() { flags = 0; +flags = phonecalls_enabled ? (flags | 2) : (flags & ~2); flags = tmp_sessions != null ? (flags | 1) : (flags & ~1); } @@ -54,6 +62,7 @@ flags = tmp_sessions != null ? (flags | 1) : (flags & ~1); public override void DeserializeBody(BinaryReader br) { flags = br.ReadInt32(); +phonecalls_enabled = (flags & 2) != 0; date = br.ReadInt32(); expires = br.ReadInt32(); test_mode = BoolUtil.Deserialize(br); @@ -80,6 +89,12 @@ tmp_sessions = br.ReadInt32(); else tmp_sessions = null; +pinned_dialogs_count_max = br.ReadInt32(); +call_receive_timeout_ms = br.ReadInt32(); +call_ring_timeout_ms = br.ReadInt32(); +call_connect_timeout_ms = br.ReadInt32(); +call_packet_timeout_ms = br.ReadInt32(); +me_url_prefix = StringUtil.Deserialize(br); disabled_features = (TLVector)ObjectUtils.DeserializeVector(br); } @@ -89,6 +104,7 @@ disabled_features = (TLVector)ObjectUtils.DeserializeVector attributes {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + url = StringUtil.Deserialize(br); +size = br.ReadInt32(); +mime_type = StringUtil.Deserialize(br); +attributes = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(url,bw); +bw.Write(size); +StringUtil.Serialize(mime_type,bw); +ObjectUtils.SerializeObject(attributes,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLInputWebFileLocation.cs b/TeleSharp.TL/TL/TLInputWebFileLocation.cs new file mode 100644 index 0000000..290a748 --- /dev/null +++ b/TeleSharp.TL/TL/TLInputWebFileLocation.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1036396922)] + public class TLInputWebFileLocation : TLObject + { + public override int Constructor + { + get + { + return -1036396922; + } + } + + public string url {get;set;} + public long access_hash {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + url = StringUtil.Deserialize(br); +access_hash = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(url,bw); +bw.Write(access_hash); + + } + } +} diff --git a/TeleSharp.TL/TL/TLInvoice.cs b/TeleSharp.TL/TL/TLInvoice.cs new file mode 100644 index 0000000..e25c83f --- /dev/null +++ b/TeleSharp.TL/TL/TLInvoice.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1022713000)] + public class TLInvoice : TLObject + { + public override int Constructor + { + get + { + return -1022713000; + } + } + + public int flags {get;set;} + public bool test {get;set;} + public bool name_requested {get;set;} + public bool phone_requested {get;set;} + public bool email_requested {get;set;} + public bool shipping_address_requested {get;set;} + public bool flexible {get;set;} + public string currency {get;set;} + public TLVector prices {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = test ? (flags | 1) : (flags & ~1); +flags = name_requested ? (flags | 2) : (flags & ~2); +flags = phone_requested ? (flags | 4) : (flags & ~4); +flags = email_requested ? (flags | 8) : (flags & ~8); +flags = shipping_address_requested ? (flags | 16) : (flags & ~16); +flags = flexible ? (flags | 32) : (flags & ~32); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +test = (flags & 1) != 0; +name_requested = (flags & 2) != 0; +phone_requested = (flags & 4) != 0; +email_requested = (flags & 8) != 0; +shipping_address_requested = (flags & 16) != 0; +flexible = (flags & 32) != 0; +currency = StringUtil.Deserialize(br); +prices = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + + + + + + +StringUtil.Serialize(currency,bw); +ObjectUtils.SerializeObject(prices,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLKeyboardButtonBuy.cs b/TeleSharp.TL/TL/TLKeyboardButtonBuy.cs new file mode 100644 index 0000000..e05ad62 --- /dev/null +++ b/TeleSharp.TL/TL/TLKeyboardButtonBuy.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1344716869)] + public class TLKeyboardButtonBuy : TLAbsKeyboardButton + { + public override int Constructor + { + get + { + return -1344716869; + } + } + + public string text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLLabeledPrice.cs b/TeleSharp.TL/TL/TLLabeledPrice.cs new file mode 100644 index 0000000..87e5e3e --- /dev/null +++ b/TeleSharp.TL/TL/TLLabeledPrice.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-886477832)] + public class TLLabeledPrice : TLObject + { + public override int Constructor + { + get + { + return -886477832; + } + } + + public string label {get;set;} + public long amount {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + label = StringUtil.Deserialize(br); +amount = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(label,bw); +bw.Write(amount); + + } + } +} diff --git a/TeleSharp.TL/TL/TLMessageActionPaymentSent.cs b/TeleSharp.TL/TL/TLMessageActionPaymentSent.cs new file mode 100644 index 0000000..d72ac89 --- /dev/null +++ b/TeleSharp.TL/TL/TLMessageActionPaymentSent.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1080663248)] + public class TLMessageActionPaymentSent : TLAbsMessageAction + { + public override int Constructor + { + get + { + return 1080663248; + } + } + + public string currency {get;set;} + public long total_amount {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + currency = StringUtil.Deserialize(br); +total_amount = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(currency,bw); +bw.Write(total_amount); + + } + } +} diff --git a/TeleSharp.TL/TL/TLMessageActionPaymentSentMe.cs b/TeleSharp.TL/TL/TLMessageActionPaymentSentMe.cs new file mode 100644 index 0000000..9aece35 --- /dev/null +++ b/TeleSharp.TL/TL/TLMessageActionPaymentSentMe.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1892568281)] + public class TLMessageActionPaymentSentMe : TLAbsMessageAction + { + public override int Constructor + { + get + { + return -1892568281; + } + } + + public int flags {get;set;} + public string currency {get;set;} + public long total_amount {get;set;} + public byte[] payload {get;set;} + public TLPaymentRequestedInfo info {get;set;} + public string shipping_option_id {get;set;} + public TLPaymentCharge charge {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = info != null ? (flags | 1) : (flags & ~1); +flags = shipping_option_id != null ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +currency = StringUtil.Deserialize(br); +total_amount = br.ReadInt64(); +payload = BytesUtil.Deserialize(br); +if ((flags & 1) != 0) +info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br); +else +info = null; + +if ((flags & 2) != 0) +shipping_option_id = StringUtil.Deserialize(br); +else +shipping_option_id = null; + +charge = (TLPaymentCharge)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +StringUtil.Serialize(currency,bw); +bw.Write(total_amount); +BytesUtil.Serialize(payload,bw); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(info,bw); +if ((flags & 2) != 0) +StringUtil.Serialize(shipping_option_id,bw); +ObjectUtils.SerializeObject(charge,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLMessageActionPhoneCall.cs b/TeleSharp.TL/TL/TLMessageActionPhoneCall.cs new file mode 100644 index 0000000..d5e760e --- /dev/null +++ b/TeleSharp.TL/TL/TLMessageActionPhoneCall.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2132731265)] + public class TLMessageActionPhoneCall : TLAbsMessageAction + { + public override int Constructor + { + get + { + return -2132731265; + } + } + + public int flags {get;set;} + public long call_id {get;set;} + public TLAbsPhoneCallDiscardReason reason {get;set;} + public int? duration {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = reason != null ? (flags | 1) : (flags & ~1); +flags = duration != null ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +call_id = br.ReadInt64(); +if ((flags & 1) != 0) +reason = (TLAbsPhoneCallDiscardReason)ObjectUtils.DeserializeObject(br); +else +reason = null; + +if ((flags & 2) != 0) +duration = br.ReadInt32(); +else +duration = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +bw.Write(call_id); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(reason,bw); +if ((flags & 2) != 0) +bw.Write(duration.Value); + + } + } +} diff --git a/TeleSharp.TL/TL/TLMessageMediaInvoice.cs b/TeleSharp.TL/TL/TLMessageMediaInvoice.cs new file mode 100644 index 0000000..1989771 --- /dev/null +++ b/TeleSharp.TL/TL/TLMessageMediaInvoice.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2074799289)] + public class TLMessageMediaInvoice : TLAbsMessageMedia + { + public override int Constructor + { + get + { + return -2074799289; + } + } + + public int flags {get;set;} + public bool shipping_address_requested {get;set;} + public bool test {get;set;} + public string title {get;set;} + public string description {get;set;} + public TLWebDocument photo {get;set;} + public int? receipt_msg_id {get;set;} + public string currency {get;set;} + public long total_amount {get;set;} + public string start_param {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = shipping_address_requested ? (flags | 2) : (flags & ~2); +flags = test ? (flags | 8) : (flags & ~8); +flags = photo != null ? (flags | 1) : (flags & ~1); +flags = receipt_msg_id != null ? (flags | 4) : (flags & ~4); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +shipping_address_requested = (flags & 2) != 0; +test = (flags & 8) != 0; +title = StringUtil.Deserialize(br); +description = StringUtil.Deserialize(br); +if ((flags & 1) != 0) +photo = (TLWebDocument)ObjectUtils.DeserializeObject(br); +else +photo = null; + +if ((flags & 4) != 0) +receipt_msg_id = br.ReadInt32(); +else +receipt_msg_id = null; + +currency = StringUtil.Deserialize(br); +total_amount = br.ReadInt64(); +start_param = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + + +StringUtil.Serialize(title,bw); +StringUtil.Serialize(description,bw); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(photo,bw); +if ((flags & 4) != 0) +bw.Write(receipt_msg_id.Value); +StringUtil.Serialize(currency,bw); +bw.Write(total_amount); +StringUtil.Serialize(start_param,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockAnchor.cs b/TeleSharp.TL/TL/TLPageBlockAnchor.cs new file mode 100644 index 0000000..e8d8206 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockAnchor.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-837994576)] + public class TLPageBlockAnchor : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -837994576; + } + } + + public string name {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + name = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(name,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockAuthorDate.cs b/TeleSharp.TL/TL/TLPageBlockAuthorDate.cs new file mode 100644 index 0000000..dc5b9fc --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockAuthorDate.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1162877472)] + public class TLPageBlockAuthorDate : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -1162877472; + } + } + + public TLAbsRichText author {get;set;} + public int published_date {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + author = (TLAbsRichText)ObjectUtils.DeserializeObject(br); +published_date = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(author,bw); +bw.Write(published_date); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockBlockquote.cs b/TeleSharp.TL/TL/TLPageBlockBlockquote.cs new file mode 100644 index 0000000..6100b4a --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockBlockquote.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(641563686)] + public class TLPageBlockBlockquote : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 641563686; + } + } + + public TLAbsRichText text {get;set;} + public TLAbsRichText caption {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); +caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); +ObjectUtils.SerializeObject(caption,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockChannel.cs b/TeleSharp.TL/TL/TLPageBlockChannel.cs new file mode 100644 index 0000000..83945cc --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockChannel.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-283684427)] + public class TLPageBlockChannel : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -283684427; + } + } + + public TLAbsChat channel {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + channel = (TLAbsChat)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(channel,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockCollage.cs b/TeleSharp.TL/TL/TLPageBlockCollage.cs new file mode 100644 index 0000000..dc01e04 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockCollage.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(145955919)] + public class TLPageBlockCollage : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 145955919; + } + } + + public TLVector items {get;set;} + public TLAbsRichText caption {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + items = (TLVector)ObjectUtils.DeserializeVector(br); +caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(items,bw); +ObjectUtils.SerializeObject(caption,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockCover.cs b/TeleSharp.TL/TL/TLPageBlockCover.cs new file mode 100644 index 0000000..2a359d6 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockCover.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(972174080)] + public class TLPageBlockCover : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 972174080; + } + } + + public TLAbsPageBlock cover {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + cover = (TLAbsPageBlock)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(cover,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Help/TLAppChangelogEmpty.cs b/TeleSharp.TL/TL/TLPageBlockDivider.cs similarity index 78% rename from TeleSharp.TL/TL/Help/TLAppChangelogEmpty.cs rename to TeleSharp.TL/TL/TLPageBlockDivider.cs index 527e58e..0603104 100644 --- a/TeleSharp.TL/TL/Help/TLAppChangelogEmpty.cs +++ b/TeleSharp.TL/TL/TLPageBlockDivider.cs @@ -5,16 +5,16 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using TeleSharp.TL; -namespace TeleSharp.TL.Help +namespace TeleSharp.TL { - [TLObject(-1350696044)] - public class TLAppChangelogEmpty : TLAbsAppChangelog + [TLObject(-618614392)] + public class TLPageBlockDivider : TLAbsPageBlock { public override int Constructor { get { - return -1350696044; + return -618614392; } } diff --git a/TeleSharp.TL/TL/TLPageBlockEmbed.cs b/TeleSharp.TL/TL/TLPageBlockEmbed.cs new file mode 100644 index 0000000..8be6bcd --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockEmbed.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-840826671)] + public class TLPageBlockEmbed : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -840826671; + } + } + + public int flags {get;set;} + public bool full_width {get;set;} + public bool allow_scrolling {get;set;} + public string url {get;set;} + public string html {get;set;} + public long? poster_photo_id {get;set;} + public int w {get;set;} + public int h {get;set;} + public TLAbsRichText caption {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = full_width ? (flags | 1) : (flags & ~1); +flags = allow_scrolling ? (flags | 8) : (flags & ~8); +flags = url != null ? (flags | 2) : (flags & ~2); +flags = html != null ? (flags | 4) : (flags & ~4); +flags = poster_photo_id != null ? (flags | 16) : (flags & ~16); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +full_width = (flags & 1) != 0; +allow_scrolling = (flags & 8) != 0; +if ((flags & 2) != 0) +url = StringUtil.Deserialize(br); +else +url = null; + +if ((flags & 4) != 0) +html = StringUtil.Deserialize(br); +else +html = null; + +if ((flags & 16) != 0) +poster_photo_id = br.ReadInt64(); +else +poster_photo_id = null; + +w = br.ReadInt32(); +h = br.ReadInt32(); +caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + + +if ((flags & 2) != 0) +StringUtil.Serialize(url,bw); +if ((flags & 4) != 0) +StringUtil.Serialize(html,bw); +if ((flags & 16) != 0) +bw.Write(poster_photo_id.Value); +bw.Write(w); +bw.Write(h); +ObjectUtils.SerializeObject(caption,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockEmbedPost.cs b/TeleSharp.TL/TL/TLPageBlockEmbedPost.cs new file mode 100644 index 0000000..f113117 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockEmbedPost.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(690781161)] + public class TLPageBlockEmbedPost : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 690781161; + } + } + + public string url {get;set;} + public long webpage_id {get;set;} + public long author_photo_id {get;set;} + public string author {get;set;} + public int date {get;set;} + public TLVector blocks {get;set;} + public TLAbsRichText caption {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + url = StringUtil.Deserialize(br); +webpage_id = br.ReadInt64(); +author_photo_id = br.ReadInt64(); +author = StringUtil.Deserialize(br); +date = br.ReadInt32(); +blocks = (TLVector)ObjectUtils.DeserializeVector(br); +caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(url,bw); +bw.Write(webpage_id); +bw.Write(author_photo_id); +StringUtil.Serialize(author,bw); +bw.Write(date); +ObjectUtils.SerializeObject(blocks,bw); +ObjectUtils.SerializeObject(caption,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockFooter.cs b/TeleSharp.TL/TL/TLPageBlockFooter.cs new file mode 100644 index 0000000..d98881d --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockFooter.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1216809369)] + public class TLPageBlockFooter : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 1216809369; + } + } + + public TLAbsRichText text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockHeader.cs b/TeleSharp.TL/TL/TLPageBlockHeader.cs new file mode 100644 index 0000000..08403f8 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockHeader.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1076861716)] + public class TLPageBlockHeader : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -1076861716; + } + } + + public TLAbsRichText text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockList.cs b/TeleSharp.TL/TL/TLPageBlockList.cs new file mode 100644 index 0000000..698ffc8 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockList.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(978896884)] + public class TLPageBlockList : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 978896884; + } + } + + public bool ordered {get;set;} + public TLVector items {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + ordered = BoolUtil.Deserialize(br); +items = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BoolUtil.Serialize(ordered,bw); +ObjectUtils.SerializeObject(items,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockParagraph.cs b/TeleSharp.TL/TL/TLPageBlockParagraph.cs new file mode 100644 index 0000000..123e18c --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockParagraph.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1182402406)] + public class TLPageBlockParagraph : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 1182402406; + } + } + + public TLAbsRichText text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockPhoto.cs b/TeleSharp.TL/TL/TLPageBlockPhoto.cs new file mode 100644 index 0000000..1a32c1e --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockPhoto.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-372860542)] + public class TLPageBlockPhoto : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -372860542; + } + } + + public long photo_id {get;set;} + public TLAbsRichText caption {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + photo_id = br.ReadInt64(); +caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(photo_id); +ObjectUtils.SerializeObject(caption,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockPreformatted.cs b/TeleSharp.TL/TL/TLPageBlockPreformatted.cs new file mode 100644 index 0000000..c82d1c4 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockPreformatted.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1066346178)] + public class TLPageBlockPreformatted : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -1066346178; + } + } + + public TLAbsRichText text {get;set;} + public string language {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); +language = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); +StringUtil.Serialize(language,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockPullquote.cs b/TeleSharp.TL/TL/TLPageBlockPullquote.cs new file mode 100644 index 0000000..64d8f02 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockPullquote.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1329878739)] + public class TLPageBlockPullquote : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 1329878739; + } + } + + public TLAbsRichText text {get;set;} + public TLAbsRichText caption {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); +caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); +ObjectUtils.SerializeObject(caption,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockSlideshow.cs b/TeleSharp.TL/TL/TLPageBlockSlideshow.cs new file mode 100644 index 0000000..1a5a48a --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockSlideshow.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(319588707)] + public class TLPageBlockSlideshow : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 319588707; + } + } + + public TLVector items {get;set;} + public TLAbsRichText caption {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + items = (TLVector)ObjectUtils.DeserializeVector(br); +caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(items,bw); +ObjectUtils.SerializeObject(caption,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockSubheader.cs b/TeleSharp.TL/TL/TLPageBlockSubheader.cs new file mode 100644 index 0000000..a904389 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockSubheader.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-248793375)] + public class TLPageBlockSubheader : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -248793375; + } + } + + public TLAbsRichText text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockSubtitle.cs b/TeleSharp.TL/TL/TLPageBlockSubtitle.cs new file mode 100644 index 0000000..0252054 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockSubtitle.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1879401953)] + public class TLPageBlockSubtitle : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -1879401953; + } + } + + public TLAbsRichText text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockTitle.cs b/TeleSharp.TL/TL/TLPageBlockTitle.cs new file mode 100644 index 0000000..86513ff --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockTitle.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1890305021)] + public class TLPageBlockTitle : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 1890305021; + } + } + + public TLAbsRichText text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockUnsupported.cs b/TeleSharp.TL/TL/TLPageBlockUnsupported.cs new file mode 100644 index 0000000..86c5cf6 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockUnsupported.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(324435594)] + public class TLPageBlockUnsupported : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 324435594; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageBlockVideo.cs b/TeleSharp.TL/TL/TLPageBlockVideo.cs new file mode 100644 index 0000000..5830261 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageBlockVideo.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-640214938)] + public class TLPageBlockVideo : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -640214938; + } + } + + public int flags {get;set;} + public bool autoplay {get;set;} + public bool loop {get;set;} + public long video_id {get;set;} + public TLAbsRichText caption {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = autoplay ? (flags | 1) : (flags & ~1); +flags = loop ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +autoplay = (flags & 1) != 0; +loop = (flags & 2) != 0; +video_id = br.ReadInt64(); +caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + + +bw.Write(video_id); +ObjectUtils.SerializeObject(caption,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPageFull.cs b/TeleSharp.TL/TL/TLPageFull.cs new file mode 100644 index 0000000..ecbffb3 --- /dev/null +++ b/TeleSharp.TL/TL/TLPageFull.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-677274263)] + public class TLPageFull : TLAbsPage + { + public override int Constructor + { + get + { + return -677274263; + } + } + + public TLVector blocks {get;set;} + public TLVector photos {get;set;} + public TLVector videos {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + blocks = (TLVector)ObjectUtils.DeserializeVector(br); +photos = (TLVector)ObjectUtils.DeserializeVector(br); +videos = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(blocks,bw); +ObjectUtils.SerializeObject(photos,bw); +ObjectUtils.SerializeObject(videos,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPagePart.cs b/TeleSharp.TL/TL/TLPagePart.cs new file mode 100644 index 0000000..3f306e9 --- /dev/null +++ b/TeleSharp.TL/TL/TLPagePart.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1913754556)] + public class TLPagePart : TLAbsPage + { + public override int Constructor + { + get + { + return -1913754556; + } + } + + public TLVector blocks {get;set;} + public TLVector photos {get;set;} + public TLVector videos {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + blocks = (TLVector)ObjectUtils.DeserializeVector(br); +photos = (TLVector)ObjectUtils.DeserializeVector(br); +videos = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(blocks,bw); +ObjectUtils.SerializeObject(photos,bw); +ObjectUtils.SerializeObject(videos,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPaymentCharge.cs b/TeleSharp.TL/TL/TLPaymentCharge.cs new file mode 100644 index 0000000..1b775d2 --- /dev/null +++ b/TeleSharp.TL/TL/TLPaymentCharge.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-368917890)] + public class TLPaymentCharge : TLObject + { + public override int Constructor + { + get + { + return -368917890; + } + } + + public string id {get;set;} + public string provider_charge_id {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = StringUtil.Deserialize(br); +provider_charge_id = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(id,bw); +StringUtil.Serialize(provider_charge_id,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPaymentRequestedInfo.cs b/TeleSharp.TL/TL/TLPaymentRequestedInfo.cs new file mode 100644 index 0000000..b3244b0 --- /dev/null +++ b/TeleSharp.TL/TL/TLPaymentRequestedInfo.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1868808300)] + public class TLPaymentRequestedInfo : TLObject + { + public override int Constructor + { + get + { + return -1868808300; + } + } + + public int flags {get;set;} + public string name {get;set;} + public string phone {get;set;} + public string email {get;set;} + public TLPostAddress shipping_address {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = name != null ? (flags | 1) : (flags & ~1); +flags = phone != null ? (flags | 2) : (flags & ~2); +flags = email != null ? (flags | 4) : (flags & ~4); +flags = shipping_address != null ? (flags | 8) : (flags & ~8); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +if ((flags & 1) != 0) +name = StringUtil.Deserialize(br); +else +name = null; + +if ((flags & 2) != 0) +phone = StringUtil.Deserialize(br); +else +phone = null; + +if ((flags & 4) != 0) +email = StringUtil.Deserialize(br); +else +email = null; + +if ((flags & 8) != 0) +shipping_address = (TLPostAddress)ObjectUtils.DeserializeObject(br); +else +shipping_address = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +if ((flags & 1) != 0) +StringUtil.Serialize(name,bw); +if ((flags & 2) != 0) +StringUtil.Serialize(phone,bw); +if ((flags & 4) != 0) +StringUtil.Serialize(email,bw); +if ((flags & 8) != 0) +ObjectUtils.SerializeObject(shipping_address,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPaymentSavedCredentialsCard.cs b/TeleSharp.TL/TL/TLPaymentSavedCredentialsCard.cs new file mode 100644 index 0000000..5921c9a --- /dev/null +++ b/TeleSharp.TL/TL/TLPaymentSavedCredentialsCard.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-842892769)] + public class TLPaymentSavedCredentialsCard : TLObject + { + public override int Constructor + { + get + { + return -842892769; + } + } + + public string id {get;set;} + public string title {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = StringUtil.Deserialize(br); +title = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(id,bw); +StringUtil.Serialize(title,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneCall.cs b/TeleSharp.TL/TL/TLPhoneCall.cs new file mode 100644 index 0000000..3abe3d8 --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneCall.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1660057)] + public class TLPhoneCall : TLAbsPhoneCall + { + public override int Constructor + { + get + { + return -1660057; + } + } + + public long id {get;set;} + public long access_hash {get;set;} + public int date {get;set;} + public int admin_id {get;set;} + public int participant_id {get;set;} + public byte[] g_a_or_b {get;set;} + public long key_fingerprint {get;set;} + public TLPhoneCallProtocol protocol {get;set;} + public TLPhoneConnection connection {get;set;} + public TLVector alternative_connections {get;set;} + public int start_date {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = br.ReadInt64(); +access_hash = br.ReadInt64(); +date = br.ReadInt32(); +admin_id = br.ReadInt32(); +participant_id = br.ReadInt32(); +g_a_or_b = BytesUtil.Deserialize(br); +key_fingerprint = br.ReadInt64(); +protocol = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br); +connection = (TLPhoneConnection)ObjectUtils.DeserializeObject(br); +alternative_connections = (TLVector)ObjectUtils.DeserializeVector(br); +start_date = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(id); +bw.Write(access_hash); +bw.Write(date); +bw.Write(admin_id); +bw.Write(participant_id); +BytesUtil.Serialize(g_a_or_b,bw); +bw.Write(key_fingerprint); +ObjectUtils.SerializeObject(protocol,bw); +ObjectUtils.SerializeObject(connection,bw); +ObjectUtils.SerializeObject(alternative_connections,bw); +bw.Write(start_date); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneCallAccepted.cs b/TeleSharp.TL/TL/TLPhoneCallAccepted.cs new file mode 100644 index 0000000..2b258a8 --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneCallAccepted.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1828732223)] + public class TLPhoneCallAccepted : TLAbsPhoneCall + { + public override int Constructor + { + get + { + return 1828732223; + } + } + + public long id {get;set;} + public long access_hash {get;set;} + public int date {get;set;} + public int admin_id {get;set;} + public int participant_id {get;set;} + public byte[] g_b {get;set;} + public TLPhoneCallProtocol protocol {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = br.ReadInt64(); +access_hash = br.ReadInt64(); +date = br.ReadInt32(); +admin_id = br.ReadInt32(); +participant_id = br.ReadInt32(); +g_b = BytesUtil.Deserialize(br); +protocol = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(id); +bw.Write(access_hash); +bw.Write(date); +bw.Write(admin_id); +bw.Write(participant_id); +BytesUtil.Serialize(g_b,bw); +ObjectUtils.SerializeObject(protocol,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneCallDiscardReasonBusy.cs b/TeleSharp.TL/TL/TLPhoneCallDiscardReasonBusy.cs new file mode 100644 index 0000000..88d0993 --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneCallDiscardReasonBusy.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-84416311)] + public class TLPhoneCallDiscardReasonBusy : TLAbsPhoneCallDiscardReason + { + public override int Constructor + { + get + { + return -84416311; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneCallDiscardReasonDisconnect.cs b/TeleSharp.TL/TL/TLPhoneCallDiscardReasonDisconnect.cs new file mode 100644 index 0000000..513b5bc --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneCallDiscardReasonDisconnect.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-527056480)] + public class TLPhoneCallDiscardReasonDisconnect : TLAbsPhoneCallDiscardReason + { + public override int Constructor + { + get + { + return -527056480; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneCallDiscardReasonHangup.cs b/TeleSharp.TL/TL/TLPhoneCallDiscardReasonHangup.cs new file mode 100644 index 0000000..b3edff3 --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneCallDiscardReasonHangup.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1471006352)] + public class TLPhoneCallDiscardReasonHangup : TLAbsPhoneCallDiscardReason + { + public override int Constructor + { + get + { + return 1471006352; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneCallDiscardReasonMissed.cs b/TeleSharp.TL/TL/TLPhoneCallDiscardReasonMissed.cs new file mode 100644 index 0000000..358e7b7 --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneCallDiscardReasonMissed.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2048646399)] + public class TLPhoneCallDiscardReasonMissed : TLAbsPhoneCallDiscardReason + { + public override int Constructor + { + get + { + return -2048646399; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneCallDiscarded.cs b/TeleSharp.TL/TL/TLPhoneCallDiscarded.cs new file mode 100644 index 0000000..447fcbc --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneCallDiscarded.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1355435489)] + public class TLPhoneCallDiscarded : TLAbsPhoneCall + { + public override int Constructor + { + get + { + return 1355435489; + } + } + + public int flags {get;set;} + public bool need_rating {get;set;} + public bool need_debug {get;set;} + public long id {get;set;} + public TLAbsPhoneCallDiscardReason reason {get;set;} + public int? duration {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = need_rating ? (flags | 4) : (flags & ~4); +flags = need_debug ? (flags | 8) : (flags & ~8); +flags = reason != null ? (flags | 1) : (flags & ~1); +flags = duration != null ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +need_rating = (flags & 4) != 0; +need_debug = (flags & 8) != 0; +id = br.ReadInt64(); +if ((flags & 1) != 0) +reason = (TLAbsPhoneCallDiscardReason)ObjectUtils.DeserializeObject(br); +else +reason = null; + +if ((flags & 2) != 0) +duration = br.ReadInt32(); +else +duration = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + + +bw.Write(id); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(reason,bw); +if ((flags & 2) != 0) +bw.Write(duration.Value); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneCallEmpty.cs b/TeleSharp.TL/TL/TLPhoneCallEmpty.cs new file mode 100644 index 0000000..03c694d --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneCallEmpty.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1399245077)] + public class TLPhoneCallEmpty : TLAbsPhoneCall + { + public override int Constructor + { + get + { + return 1399245077; + } + } + + public long id {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(id); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneCallProtocol.cs b/TeleSharp.TL/TL/TLPhoneCallProtocol.cs new file mode 100644 index 0000000..64d2423 --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneCallProtocol.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1564789301)] + public class TLPhoneCallProtocol : TLObject + { + public override int Constructor + { + get + { + return -1564789301; + } + } + + public int flags {get;set;} + public bool udp_p2p {get;set;} + public bool udp_reflector {get;set;} + public int min_layer {get;set;} + public int max_layer {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = udp_p2p ? (flags | 1) : (flags & ~1); +flags = udp_reflector ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +udp_p2p = (flags & 1) != 0; +udp_reflector = (flags & 2) != 0; +min_layer = br.ReadInt32(); +max_layer = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + + +bw.Write(min_layer); +bw.Write(max_layer); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneCallRequested.cs b/TeleSharp.TL/TL/TLPhoneCallRequested.cs new file mode 100644 index 0000000..322935f --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneCallRequested.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2089411356)] + public class TLPhoneCallRequested : TLAbsPhoneCall + { + public override int Constructor + { + get + { + return -2089411356; + } + } + + public long id {get;set;} + public long access_hash {get;set;} + public int date {get;set;} + public int admin_id {get;set;} + public int participant_id {get;set;} + public byte[] g_a_hash {get;set;} + public TLPhoneCallProtocol protocol {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = br.ReadInt64(); +access_hash = br.ReadInt64(); +date = br.ReadInt32(); +admin_id = br.ReadInt32(); +participant_id = br.ReadInt32(); +g_a_hash = BytesUtil.Deserialize(br); +protocol = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(id); +bw.Write(access_hash); +bw.Write(date); +bw.Write(admin_id); +bw.Write(participant_id); +BytesUtil.Serialize(g_a_hash,bw); +ObjectUtils.SerializeObject(protocol,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneCallWaiting.cs b/TeleSharp.TL/TL/TLPhoneCallWaiting.cs new file mode 100644 index 0000000..0d9193e --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneCallWaiting.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(462375633)] + public class TLPhoneCallWaiting : TLAbsPhoneCall + { + public override int Constructor + { + get + { + return 462375633; + } + } + + public int flags {get;set;} + public long id {get;set;} + public long access_hash {get;set;} + public int date {get;set;} + public int admin_id {get;set;} + public int participant_id {get;set;} + public TLPhoneCallProtocol protocol {get;set;} + public int? receive_date {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = receive_date != null ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +id = br.ReadInt64(); +access_hash = br.ReadInt64(); +date = br.ReadInt32(); +admin_id = br.ReadInt32(); +participant_id = br.ReadInt32(); +protocol = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br); +if ((flags & 1) != 0) +receive_date = br.ReadInt32(); +else +receive_date = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +bw.Write(id); +bw.Write(access_hash); +bw.Write(date); +bw.Write(admin_id); +bw.Write(participant_id); +ObjectUtils.SerializeObject(protocol,bw); +if ((flags & 1) != 0) +bw.Write(receive_date.Value); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPhoneConnection.cs b/TeleSharp.TL/TL/TLPhoneConnection.cs new file mode 100644 index 0000000..822aede --- /dev/null +++ b/TeleSharp.TL/TL/TLPhoneConnection.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1655957568)] + public class TLPhoneConnection : TLObject + { + public override int Constructor + { + get + { + return -1655957568; + } + } + + public long id {get;set;} + public string ip {get;set;} + public string ipv6 {get;set;} + public int port {get;set;} + public byte[] peer_tag {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = br.ReadInt64(); +ip = StringUtil.Deserialize(br); +ipv6 = StringUtil.Deserialize(br); +port = br.ReadInt32(); +peer_tag = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(id); +StringUtil.Serialize(ip,bw); +StringUtil.Serialize(ipv6,bw); +bw.Write(port); +BytesUtil.Serialize(peer_tag,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPostAddress.cs b/TeleSharp.TL/TL/TLPostAddress.cs new file mode 100644 index 0000000..a1b0eb5 --- /dev/null +++ b/TeleSharp.TL/TL/TLPostAddress.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(512535275)] + public class TLPostAddress : TLObject + { + public override int Constructor + { + get + { + return 512535275; + } + } + + public string street_line1 {get;set;} + public string street_line2 {get;set;} + public string city {get;set;} + public string state {get;set;} + public string country_iso2 {get;set;} + public string post_code {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + street_line1 = StringUtil.Deserialize(br); +street_line2 = StringUtil.Deserialize(br); +city = StringUtil.Deserialize(br); +state = StringUtil.Deserialize(br); +country_iso2 = StringUtil.Deserialize(br); +post_code = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(street_line1,bw); +StringUtil.Serialize(street_line2,bw); +StringUtil.Serialize(city,bw); +StringUtil.Serialize(state,bw); +StringUtil.Serialize(country_iso2,bw); +StringUtil.Serialize(post_code,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLPrivacyKeyPhoneCall.cs b/TeleSharp.TL/TL/TLPrivacyKeyPhoneCall.cs new file mode 100644 index 0000000..badbc39 --- /dev/null +++ b/TeleSharp.TL/TL/TLPrivacyKeyPhoneCall.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1030105979)] + public class TLPrivacyKeyPhoneCall : TLAbsPrivacyKey + { + public override int Constructor + { + get + { + return 1030105979; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLSendMessageRecordRoundAction.cs b/TeleSharp.TL/TL/TLSendMessageRecordRoundAction.cs new file mode 100644 index 0000000..e626871 --- /dev/null +++ b/TeleSharp.TL/TL/TLSendMessageRecordRoundAction.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1997373508)] + public class TLSendMessageRecordRoundAction : TLAbsSendMessageAction + { + public override int Constructor + { + get + { + return -1997373508; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLSendMessageUploadRoundAction.cs b/TeleSharp.TL/TL/TLSendMessageUploadRoundAction.cs new file mode 100644 index 0000000..c7e12c5 --- /dev/null +++ b/TeleSharp.TL/TL/TLSendMessageUploadRoundAction.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(608050278)] + public class TLSendMessageUploadRoundAction : TLAbsSendMessageAction + { + public override int Constructor + { + get + { + return 608050278; + } + } + + public int progress {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + progress = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(progress); + + } + } +} diff --git a/TeleSharp.TL/TL/TLShippingOption.cs b/TeleSharp.TL/TL/TLShippingOption.cs new file mode 100644 index 0000000..e71a63c --- /dev/null +++ b/TeleSharp.TL/TL/TLShippingOption.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1239335713)] + public class TLShippingOption : TLObject + { + public override int Constructor + { + get + { + return -1239335713; + } + } + + public string id {get;set;} + public string title {get;set;} + public TLVector prices {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + id = StringUtil.Deserialize(br); +title = StringUtil.Deserialize(br); +prices = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(id,bw); +StringUtil.Serialize(title,bw); +ObjectUtils.SerializeObject(prices,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLTextBold.cs b/TeleSharp.TL/TL/TLTextBold.cs new file mode 100644 index 0000000..2d7d524 --- /dev/null +++ b/TeleSharp.TL/TL/TLTextBold.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1730456516)] + public class TLTextBold : TLAbsRichText + { + public override int Constructor + { + get + { + return 1730456516; + } + } + + public TLAbsRichText text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLTextConcat.cs b/TeleSharp.TL/TL/TLTextConcat.cs new file mode 100644 index 0000000..9351058 --- /dev/null +++ b/TeleSharp.TL/TL/TLTextConcat.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(2120376535)] + public class TLTextConcat : TLAbsRichText + { + public override int Constructor + { + get + { + return 2120376535; + } + } + + public TLVector texts {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + texts = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(texts,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLTextEmail.cs b/TeleSharp.TL/TL/TLTextEmail.cs new file mode 100644 index 0000000..bd06afc --- /dev/null +++ b/TeleSharp.TL/TL/TLTextEmail.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-564523562)] + public class TLTextEmail : TLAbsRichText + { + public override int Constructor + { + get + { + return -564523562; + } + } + + public TLAbsRichText text {get;set;} + public string email {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); +email = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); +StringUtil.Serialize(email,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLTextEmpty.cs b/TeleSharp.TL/TL/TLTextEmpty.cs new file mode 100644 index 0000000..fecd1b2 --- /dev/null +++ b/TeleSharp.TL/TL/TLTextEmpty.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-599948721)] + public class TLTextEmpty : TLAbsRichText + { + public override int Constructor + { + get + { + return -599948721; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/TLTextFixed.cs b/TeleSharp.TL/TL/TLTextFixed.cs new file mode 100644 index 0000000..ae23394 --- /dev/null +++ b/TeleSharp.TL/TL/TLTextFixed.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1816074681)] + public class TLTextFixed : TLAbsRichText + { + public override int Constructor + { + get + { + return 1816074681; + } + } + + public TLAbsRichText text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLTextItalic.cs b/TeleSharp.TL/TL/TLTextItalic.cs new file mode 100644 index 0000000..dbc61e6 --- /dev/null +++ b/TeleSharp.TL/TL/TLTextItalic.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-653089380)] + public class TLTextItalic : TLAbsRichText + { + public override int Constructor + { + get + { + return -653089380; + } + } + + public TLAbsRichText text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Help/TLAppChangelog.cs b/TeleSharp.TL/TL/TLTextPlain.cs similarity index 82% rename from TeleSharp.TL/TL/Help/TLAppChangelog.cs rename to TeleSharp.TL/TL/TLTextPlain.cs index 59ebc07..2bb44fe 100644 --- a/TeleSharp.TL/TL/Help/TLAppChangelog.cs +++ b/TeleSharp.TL/TL/TLTextPlain.cs @@ -5,16 +5,16 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using TeleSharp.TL; -namespace TeleSharp.TL.Help +namespace TeleSharp.TL { - [TLObject(1181279933)] - public class TLAppChangelog : TLAbsAppChangelog + [TLObject(1950782688)] + public class TLTextPlain : TLAbsRichText { public override int Constructor { get { - return 1181279933; + return 1950782688; } } diff --git a/TeleSharp.TL/TL/TLTextStrike.cs b/TeleSharp.TL/TL/TLTextStrike.cs new file mode 100644 index 0000000..341c889 --- /dev/null +++ b/TeleSharp.TL/TL/TLTextStrike.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1678197867)] + public class TLTextStrike : TLAbsRichText + { + public override int Constructor + { + get + { + return -1678197867; + } + } + + public TLAbsRichText text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLTextUnderline.cs b/TeleSharp.TL/TL/TLTextUnderline.cs new file mode 100644 index 0000000..ca9d7b8 --- /dev/null +++ b/TeleSharp.TL/TL/TLTextUnderline.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1054465340)] + public class TLTextUnderline : TLAbsRichText + { + public override int Constructor + { + get + { + return -1054465340; + } + } + + public TLAbsRichText text {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLTextUrl.cs b/TeleSharp.TL/TL/TLTextUrl.cs new file mode 100644 index 0000000..7a6ddcf --- /dev/null +++ b/TeleSharp.TL/TL/TLTextUrl.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1009288385)] + public class TLTextUrl : TLAbsRichText + { + public override int Constructor + { + get + { + return 1009288385; + } + } + + public TLAbsRichText text {get;set;} + public string url {get;set;} + public long webpage_id {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); +url = StringUtil.Deserialize(br); +webpage_id = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(text,bw); +StringUtil.Serialize(url,bw); +bw.Write(webpage_id); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateBotPrecheckoutQuery.cs b/TeleSharp.TL/TL/TLUpdateBotPrecheckoutQuery.cs new file mode 100644 index 0000000..3cad3de --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdateBotPrecheckoutQuery.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1563376297)] + public class TLUpdateBotPrecheckoutQuery : TLAbsUpdate + { + public override int Constructor + { + get + { + return 1563376297; + } + } + + public int flags {get;set;} + public long query_id {get;set;} + public int user_id {get;set;} + public byte[] payload {get;set;} + public TLPaymentRequestedInfo info {get;set;} + public string shipping_option_id {get;set;} + public string currency {get;set;} + public long total_amount {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = info != null ? (flags | 1) : (flags & ~1); +flags = shipping_option_id != null ? (flags | 2) : (flags & ~2); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +query_id = br.ReadInt64(); +user_id = br.ReadInt32(); +payload = BytesUtil.Deserialize(br); +if ((flags & 1) != 0) +info = (TLPaymentRequestedInfo)ObjectUtils.DeserializeObject(br); +else +info = null; + +if ((flags & 2) != 0) +shipping_option_id = StringUtil.Deserialize(br); +else +shipping_option_id = null; + +currency = StringUtil.Deserialize(br); +total_amount = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +bw.Write(query_id); +bw.Write(user_id); +BytesUtil.Serialize(payload,bw); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(info,bw); +if ((flags & 2) != 0) +StringUtil.Serialize(shipping_option_id,bw); +StringUtil.Serialize(currency,bw); +bw.Write(total_amount); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateBotShippingQuery.cs b/TeleSharp.TL/TL/TLUpdateBotShippingQuery.cs new file mode 100644 index 0000000..82f014c --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdateBotShippingQuery.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-523384512)] + public class TLUpdateBotShippingQuery : TLAbsUpdate + { + public override int Constructor + { + get + { + return -523384512; + } + } + + public long query_id {get;set;} + public int user_id {get;set;} + public byte[] payload {get;set;} + public TLPostAddress shipping_address {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + query_id = br.ReadInt64(); +user_id = br.ReadInt32(); +payload = BytesUtil.Deserialize(br); +shipping_address = (TLPostAddress)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(query_id); +bw.Write(user_id); +BytesUtil.Serialize(payload,bw); +ObjectUtils.SerializeObject(shipping_address,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateBotWebhookJSON.cs b/TeleSharp.TL/TL/TLUpdateBotWebhookJSON.cs new file mode 100644 index 0000000..fd39205 --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdateBotWebhookJSON.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2095595325)] + public class TLUpdateBotWebhookJSON : TLAbsUpdate + { + public override int Constructor + { + get + { + return -2095595325; + } + } + + public TLDataJSON data {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + data = (TLDataJSON)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(data,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateBotWebhookJSONQuery.cs b/TeleSharp.TL/TL/TLUpdateBotWebhookJSONQuery.cs new file mode 100644 index 0000000..5abe5ad --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdateBotWebhookJSONQuery.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1684914010)] + public class TLUpdateBotWebhookJSONQuery : TLAbsUpdate + { + public override int Constructor + { + get + { + return -1684914010; + } + } + + public long query_id {get;set;} + public TLDataJSON data {get;set;} + public int timeout {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + query_id = br.ReadInt64(); +data = (TLDataJSON)ObjectUtils.DeserializeObject(br); +timeout = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(query_id); +ObjectUtils.SerializeObject(data,bw); +bw.Write(timeout); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateChannelWebPage.cs b/TeleSharp.TL/TL/TLUpdateChannelWebPage.cs new file mode 100644 index 0000000..c3dde6b --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdateChannelWebPage.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1081547008)] + public class TLUpdateChannelWebPage : TLAbsUpdate + { + public override int Constructor + { + get + { + return 1081547008; + } + } + + public int channel_id {get;set;} + public TLAbsWebPage webpage {get;set;} + public int pts {get;set;} + public int pts_count {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + channel_id = br.ReadInt32(); +webpage = (TLAbsWebPage)ObjectUtils.DeserializeObject(br); +pts = br.ReadInt32(); +pts_count = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(channel_id); +ObjectUtils.SerializeObject(webpage,bw); +bw.Write(pts); +bw.Write(pts_count); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateDialogPinned.cs b/TeleSharp.TL/TL/TLUpdateDialogPinned.cs new file mode 100644 index 0000000..8ac777f --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdateDialogPinned.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-686710068)] + public class TLUpdateDialogPinned : TLAbsUpdate + { + public override int Constructor + { + get + { + return -686710068; + } + } + + public int flags {get;set;} + public bool pinned {get;set;} + public TLAbsPeer peer {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = pinned ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +pinned = (flags & 1) != 0; +peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(peer,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateNewAuthorization.cs b/TeleSharp.TL/TL/TLUpdateNewAuthorization.cs deleted file mode 100644 index df03f05..0000000 --- a/TeleSharp.TL/TL/TLUpdateNewAuthorization.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL -{ - [TLObject(-1895411046)] - public class TLUpdateNewAuthorization : TLAbsUpdate - { - public override int Constructor - { - get - { - return -1895411046; - } - } - - public long auth_key_id {get;set;} - public int date {get;set;} - public string device {get;set;} - public string location {get;set;} - - - public void ComputeFlags() - { - - } - - public override void DeserializeBody(BinaryReader br) - { - auth_key_id = br.ReadInt64(); -date = br.ReadInt32(); -device = StringUtil.Deserialize(br); -location = StringUtil.Deserialize(br); - - } - - public override void SerializeBody(BinaryWriter bw) - { - bw.Write(Constructor); - bw.Write(auth_key_id); -bw.Write(date); -StringUtil.Serialize(device,bw); -StringUtil.Serialize(location,bw); - - } - } -} diff --git a/TeleSharp.TL/TL/TLUpdatePhoneCall.cs b/TeleSharp.TL/TL/TLUpdatePhoneCall.cs new file mode 100644 index 0000000..470cea6 --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdatePhoneCall.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1425052898)] + public class TLUpdatePhoneCall : TLAbsUpdate + { + public override int Constructor + { + get + { + return -1425052898; + } + } + + public TLAbsPhoneCall phone_call {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + phone_call = (TLAbsPhoneCall)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(phone_call,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdatePinnedDialogs.cs b/TeleSharp.TL/TL/TLUpdatePinnedDialogs.cs new file mode 100644 index 0000000..7d9e63f --- /dev/null +++ b/TeleSharp.TL/TL/TLUpdatePinnedDialogs.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-657787251)] + public class TLUpdatePinnedDialogs : TLAbsUpdate + { + public override int Constructor + { + get + { + return -657787251; + } + } + + public int flags {get;set;} + public TLVector order {get;set;} + + + public void ComputeFlags() + { + flags = 0; +flags = order != null ? (flags | 1) : (flags & ~1); + + } + + public override void DeserializeBody(BinaryReader br) + { + flags = br.ReadInt32(); +if ((flags & 1) != 0) +order = (TLVector)ObjectUtils.DeserializeVector(br); +else +order = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ComputeFlags(); +bw.Write(flags); +if ((flags & 1) != 0) +ObjectUtils.SerializeObject(order,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/TLUpdateServiceNotification.cs b/TeleSharp.TL/TL/TLUpdateServiceNotification.cs index fead92c..26675a5 100644 --- a/TeleSharp.TL/TL/TLUpdateServiceNotification.cs +++ b/TeleSharp.TL/TL/TLUpdateServiceNotification.cs @@ -7,44 +7,62 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(942527460)] + [TLObject(-337352679)] public class TLUpdateServiceNotification : TLAbsUpdate { public override int Constructor { get { - return 942527460; + return -337352679; } } - public string type {get;set;} + public int flags {get;set;} + public bool popup {get;set;} + public int? inbox_date {get;set;} + public string type {get;set;} public string message {get;set;} public TLAbsMessageMedia media {get;set;} - public bool popup {get;set;} + public TLVector entities {get;set;} public void ComputeFlags() { - + flags = 0; +flags = popup ? (flags | 1) : (flags & ~1); +flags = inbox_date != null ? (flags | 2) : (flags & ~2); + } public override void DeserializeBody(BinaryReader br) { - type = StringUtil.Deserialize(br); + flags = br.ReadInt32(); +popup = (flags & 1) != 0; +if ((flags & 2) != 0) +inbox_date = br.ReadInt32(); +else +inbox_date = null; + +type = StringUtil.Deserialize(br); message = StringUtil.Deserialize(br); media = (TLAbsMessageMedia)ObjectUtils.DeserializeObject(br); -popup = BoolUtil.Deserialize(br); +entities = (TLVector)ObjectUtils.DeserializeVector(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - StringUtil.Serialize(type,bw); + ComputeFlags(); +bw.Write(flags); + +if ((flags & 2) != 0) +bw.Write(inbox_date.Value); +StringUtil.Serialize(type,bw); StringUtil.Serialize(message,bw); ObjectUtils.SerializeObject(media,bw); -BoolUtil.Serialize(popup,bw); +ObjectUtils.SerializeObject(entities,bw); } } diff --git a/TeleSharp.TL/TL/TLUser.cs b/TeleSharp.TL/TL/TLUser.cs index 66712c8..8389f02 100644 --- a/TeleSharp.TL/TL/TLUser.cs +++ b/TeleSharp.TL/TL/TLUser.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-787638374)] + [TLObject(773059779)] public class TLUser : TLAbsUser { public override int Constructor { get { - return -787638374; + return 773059779; } } @@ -41,6 +41,7 @@ namespace TeleSharp.TL public int? bot_info_version {get;set;} public string restriction_reason {get;set;} public string bot_inline_placeholder {get;set;} + public string lang_code {get;set;} public void ComputeFlags() @@ -67,6 +68,7 @@ flags = status != null ? (flags | 64) : (flags & ~64); flags = bot_info_version != null ? (flags | 16384) : (flags & ~16384); flags = restriction_reason != null ? (flags | 262144) : (flags & ~262144); flags = bot_inline_placeholder != null ? (flags | 524288) : (flags & ~524288); +flags = lang_code != null ? (flags | 4194304) : (flags & ~4194304); } @@ -135,6 +137,11 @@ bot_inline_placeholder = StringUtil.Deserialize(br); else bot_inline_placeholder = null; +if ((flags & 4194304) != 0) +lang_code = StringUtil.Deserialize(br); +else +lang_code = null; + } @@ -175,6 +182,8 @@ if ((flags & 262144) != 0) StringUtil.Serialize(restriction_reason,bw); if ((flags & 524288) != 0) StringUtil.Serialize(bot_inline_placeholder,bw); +if ((flags & 4194304) != 0) +StringUtil.Serialize(lang_code,bw); } } diff --git a/TeleSharp.TL/TL/TLUserFull.cs b/TeleSharp.TL/TL/TLUserFull.cs index fc1717d..8d47205 100644 --- a/TeleSharp.TL/TL/TLUserFull.cs +++ b/TeleSharp.TL/TL/TLUserFull.cs @@ -7,31 +7,36 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1496513539)] + [TLObject(253890367)] public class TLUserFull : TLObject { public override int Constructor { get { - return 1496513539; + return 253890367; } } public int flags {get;set;} public bool blocked {get;set;} + public bool phone_calls_available {get;set;} + public bool phone_calls_private {get;set;} public TLAbsUser user {get;set;} public string about {get;set;} public Contacts.TLLink link {get;set;} public TLAbsPhoto profile_photo {get;set;} public TLAbsPeerNotifySettings notify_settings {get;set;} public TLBotInfo bot_info {get;set;} + public int common_chats_count {get;set;} public void ComputeFlags() { flags = 0; flags = blocked ? (flags | 1) : (flags & ~1); +flags = phone_calls_available ? (flags | 16) : (flags & ~16); +flags = phone_calls_private ? (flags | 32) : (flags & ~32); flags = about != null ? (flags | 2) : (flags & ~2); flags = profile_photo != null ? (flags | 4) : (flags & ~4); flags = bot_info != null ? (flags | 8) : (flags & ~8); @@ -42,6 +47,8 @@ flags = bot_info != null ? (flags | 8) : (flags & ~8); { flags = br.ReadInt32(); blocked = (flags & 1) != 0; +phone_calls_available = (flags & 16) != 0; +phone_calls_private = (flags & 32) != 0; user = (TLAbsUser)ObjectUtils.DeserializeObject(br); if ((flags & 2) != 0) about = StringUtil.Deserialize(br); @@ -60,6 +67,7 @@ bot_info = (TLBotInfo)ObjectUtils.DeserializeObject(br); else bot_info = null; +common_chats_count = br.ReadInt32(); } @@ -69,6 +77,8 @@ bot_info = null; ComputeFlags(); bw.Write(flags); + + ObjectUtils.SerializeObject(user,bw); if ((flags & 2) != 0) StringUtil.Serialize(about,bw); @@ -78,6 +88,7 @@ ObjectUtils.SerializeObject(profile_photo,bw); ObjectUtils.SerializeObject(notify_settings,bw); if ((flags & 8) != 0) ObjectUtils.SerializeObject(bot_info,bw); +bw.Write(common_chats_count); } } diff --git a/TeleSharp.TL/TL/TLWebDocument.cs b/TeleSharp.TL/TL/TLWebDocument.cs new file mode 100644 index 0000000..19e3ae6 --- /dev/null +++ b/TeleSharp.TL/TL/TLWebDocument.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-971322408)] + public class TLWebDocument : TLObject + { + public override int Constructor + { + get + { + return -971322408; + } + } + + public string url {get;set;} + public long access_hash {get;set;} + public int size {get;set;} + public string mime_type {get;set;} + public TLVector attributes {get;set;} + public int dc_id {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + url = StringUtil.Deserialize(br); +access_hash = br.ReadInt64(); +size = br.ReadInt32(); +mime_type = StringUtil.Deserialize(br); +attributes = (TLVector)ObjectUtils.DeserializeVector(br); +dc_id = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(url,bw); +bw.Write(access_hash); +bw.Write(size); +StringUtil.Serialize(mime_type,bw); +ObjectUtils.SerializeObject(attributes,bw); +bw.Write(dc_id); + + } + } +} diff --git a/TeleSharp.TL/TL/TLWebPage.cs b/TeleSharp.TL/TL/TLWebPage.cs index 570a05a..1828aa3 100644 --- a/TeleSharp.TL/TL/TLWebPage.cs +++ b/TeleSharp.TL/TL/TLWebPage.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-897446185)] + [TLObject(1594340540)] public class TLWebPage : TLAbsWebPage { public override int Constructor { get { - return -897446185; + return 1594340540; } } @@ -22,6 +22,7 @@ namespace TeleSharp.TL public long id {get;set;} public string url {get;set;} public string display_url {get;set;} + public int hash {get;set;} public string type {get;set;} public string site_name {get;set;} public string title {get;set;} @@ -34,6 +35,7 @@ namespace TeleSharp.TL public int? duration {get;set;} public string author {get;set;} public TLAbsDocument document {get;set;} + public TLAbsPage cached_page {get;set;} public void ComputeFlags() @@ -51,6 +53,7 @@ flags = embed_height != null ? (flags | 64) : (flags & ~64); flags = duration != null ? (flags | 128) : (flags & ~128); flags = author != null ? (flags | 256) : (flags & ~256); flags = document != null ? (flags | 512) : (flags & ~512); +flags = cached_page != null ? (flags | 1024) : (flags & ~1024); } @@ -60,6 +63,7 @@ flags = document != null ? (flags | 512) : (flags & ~512); id = br.ReadInt64(); url = StringUtil.Deserialize(br); display_url = StringUtil.Deserialize(br); +hash = br.ReadInt32(); if ((flags & 1) != 0) type = StringUtil.Deserialize(br); else @@ -120,6 +124,11 @@ document = (TLAbsDocument)ObjectUtils.DeserializeObject(br); else document = null; +if ((flags & 1024) != 0) +cached_page = (TLAbsPage)ObjectUtils.DeserializeObject(br); +else +cached_page = null; + } @@ -131,6 +140,7 @@ bw.Write(flags); bw.Write(id); StringUtil.Serialize(url,bw); StringUtil.Serialize(display_url,bw); +bw.Write(hash); if ((flags & 1) != 0) StringUtil.Serialize(type,bw); if ((flags & 2) != 0) @@ -155,6 +165,8 @@ if ((flags & 256) != 0) StringUtil.Serialize(author,bw); if ((flags & 512) != 0) ObjectUtils.SerializeObject(document,bw); +if ((flags & 1024) != 0) +ObjectUtils.SerializeObject(cached_page,bw); } } diff --git a/TeleSharp.TL/TL/TLWebPageNotModified.cs b/TeleSharp.TL/TL/TLWebPageNotModified.cs new file mode 100644 index 0000000..905febd --- /dev/null +++ b/TeleSharp.TL/TL/TLWebPageNotModified.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2054908813)] + public class TLWebPageNotModified : TLAbsWebPage + { + public override int Constructor + { + get + { + return -2054908813; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/TeleSharp.TL/TL/Updates/TLDifferenceTooLong.cs b/TeleSharp.TL/TL/Updates/TLDifferenceTooLong.cs new file mode 100644 index 0000000..4befd60 --- /dev/null +++ b/TeleSharp.TL/TL/Updates/TLDifferenceTooLong.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Updates +{ + [TLObject(1258196845)] + public class TLDifferenceTooLong : TLAbsDifference + { + public override int Constructor + { + get + { + return 1258196845; + } + } + + public int pts {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + pts = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(pts); + + } + } +} diff --git a/TeleSharp.TL/TL/Updates/TLRequestGetChannelDifference.cs b/TeleSharp.TL/TL/Updates/TLRequestGetChannelDifference.cs index 7d4e79b..844965a 100644 --- a/TeleSharp.TL/TL/Updates/TLRequestGetChannelDifference.cs +++ b/TeleSharp.TL/TL/Updates/TLRequestGetChannelDifference.cs @@ -7,18 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Updates { - [TLObject(-1154295872)] + [TLObject(51854712)] public class TLRequestGetChannelDifference : TLMethod { public override int Constructor { get { - return -1154295872; + return 51854712; } } - public TLAbsInputChannel channel {get;set;} + public int flags {get;set;} + public bool force {get;set;} + public TLAbsInputChannel channel {get;set;} public TLAbsChannelMessagesFilter filter {get;set;} public int pts {get;set;} public int limit {get;set;} @@ -27,12 +29,16 @@ namespace TeleSharp.TL.Updates public void ComputeFlags() { - + flags = 0; +flags = force ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); + flags = br.ReadInt32(); +force = (flags & 1) != 0; +channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); filter = (TLAbsChannelMessagesFilter)ObjectUtils.DeserializeObject(br); pts = br.ReadInt32(); limit = br.ReadInt32(); @@ -42,7 +48,10 @@ limit = br.ReadInt32(); public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(channel,bw); + ComputeFlags(); +bw.Write(flags); + +ObjectUtils.SerializeObject(channel,bw); ObjectUtils.SerializeObject(filter,bw); bw.Write(pts); bw.Write(limit); diff --git a/TeleSharp.TL/TL/Updates/TLRequestGetDifference.cs b/TeleSharp.TL/TL/Updates/TLRequestGetDifference.cs index 65b6318..2952ab3 100644 --- a/TeleSharp.TL/TL/Updates/TLRequestGetDifference.cs +++ b/TeleSharp.TL/TL/Updates/TLRequestGetDifference.cs @@ -7,18 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Updates { - [TLObject(168039573)] + [TLObject(630429265)] public class TLRequestGetDifference : TLMethod { public override int Constructor { get { - return 168039573; + return 630429265; } } - public int pts {get;set;} + public int flags {get;set;} + public int pts {get;set;} + public int? pts_total_limit {get;set;} public int date {get;set;} public int qts {get;set;} public Updates.TLAbsDifference Response{ get; set;} @@ -26,12 +28,20 @@ namespace TeleSharp.TL.Updates public void ComputeFlags() { - + flags = 0; +flags = pts_total_limit != null ? (flags | 1) : (flags & ~1); + } public override void DeserializeBody(BinaryReader br) { - pts = br.ReadInt32(); + flags = br.ReadInt32(); +pts = br.ReadInt32(); +if ((flags & 1) != 0) +pts_total_limit = br.ReadInt32(); +else +pts_total_limit = null; + date = br.ReadInt32(); qts = br.ReadInt32(); @@ -40,7 +50,11 @@ qts = br.ReadInt32(); public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - bw.Write(pts); + ComputeFlags(); +bw.Write(flags); +bw.Write(pts); +if ((flags & 1) != 0) +bw.Write(pts_total_limit.Value); bw.Write(date); bw.Write(qts); diff --git a/TeleSharp.TL/TL/Upload/TLAbsCdnFile.cs b/TeleSharp.TL/TL/Upload/TLAbsCdnFile.cs new file mode 100644 index 0000000..e2ffe61 --- /dev/null +++ b/TeleSharp.TL/TL/Upload/TLAbsCdnFile.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Upload +{ + public abstract class TLAbsCdnFile : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/Upload/TLAbsFile.cs b/TeleSharp.TL/TL/Upload/TLAbsFile.cs new file mode 100644 index 0000000..14db55f --- /dev/null +++ b/TeleSharp.TL/TL/Upload/TLAbsFile.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Upload +{ + public abstract class TLAbsFile : TLObject + { + } +} diff --git a/TeleSharp.TL/TL/Upload/TLCdnFile.cs b/TeleSharp.TL/TL/Upload/TLCdnFile.cs new file mode 100644 index 0000000..c7d8d91 --- /dev/null +++ b/TeleSharp.TL/TL/Upload/TLCdnFile.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Upload +{ + [TLObject(-1449145777)] + public class TLCdnFile : TLAbsCdnFile + { + public override int Constructor + { + get + { + return -1449145777; + } + } + + public byte[] bytes {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + bytes = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(bytes,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Upload/TLCdnFileReuploadNeeded.cs b/TeleSharp.TL/TL/Upload/TLCdnFileReuploadNeeded.cs new file mode 100644 index 0000000..163860b --- /dev/null +++ b/TeleSharp.TL/TL/Upload/TLCdnFileReuploadNeeded.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Upload +{ + [TLObject(-290921362)] + public class TLCdnFileReuploadNeeded : TLAbsCdnFile + { + public override int Constructor + { + get + { + return -290921362; + } + } + + public byte[] request_token {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + request_token = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(request_token,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Upload/TLFile.cs b/TeleSharp.TL/TL/Upload/TLFile.cs index 3cdd4cc..282b57a 100644 --- a/TeleSharp.TL/TL/Upload/TLFile.cs +++ b/TeleSharp.TL/TL/Upload/TLFile.cs @@ -8,7 +8,7 @@ using TeleSharp.TL; namespace TeleSharp.TL.Upload { [TLObject(157948117)] - public class TLFile : TLObject + public class TLFile : TLAbsFile { public override int Constructor { diff --git a/TeleSharp.TL/TL/Upload/TLFileCdnRedirect.cs b/TeleSharp.TL/TL/Upload/TLFileCdnRedirect.cs new file mode 100644 index 0000000..bddc55c --- /dev/null +++ b/TeleSharp.TL/TL/Upload/TLFileCdnRedirect.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Upload +{ + [TLObject(352864346)] + public class TLFileCdnRedirect : TLAbsFile + { + public override int Constructor + { + get + { + return 352864346; + } + } + + public int dc_id {get;set;} + public byte[] file_token {get;set;} + public byte[] encryption_key {get;set;} + public byte[] encryption_iv {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + dc_id = br.ReadInt32(); +file_token = BytesUtil.Deserialize(br); +encryption_key = BytesUtil.Deserialize(br); +encryption_iv = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(dc_id); +BytesUtil.Serialize(file_token,bw); +BytesUtil.Serialize(encryption_key,bw); +BytesUtil.Serialize(encryption_iv,bw); + + } + } +} diff --git a/TeleSharp.TL/TL/Upload/TLRequestGetCdnFile.cs b/TeleSharp.TL/TL/Upload/TLRequestGetCdnFile.cs new file mode 100644 index 0000000..1e99fc4 --- /dev/null +++ b/TeleSharp.TL/TL/Upload/TLRequestGetCdnFile.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Upload +{ + [TLObject(536919235)] + public class TLRequestGetCdnFile : TLMethod + { + public override int Constructor + { + get + { + return 536919235; + } + } + + public byte[] file_token {get;set;} + public int offset {get;set;} + public int limit {get;set;} + public Upload.TLAbsCdnFile Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + file_token = BytesUtil.Deserialize(br); +offset = br.ReadInt32(); +limit = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(file_token,bw); +bw.Write(offset); +bw.Write(limit); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Upload.TLAbsCdnFile)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Upload/TLRequestGetFile.cs b/TeleSharp.TL/TL/Upload/TLRequestGetFile.cs index c34b8a0..e33ffa0 100644 --- a/TeleSharp.TL/TL/Upload/TLRequestGetFile.cs +++ b/TeleSharp.TL/TL/Upload/TLRequestGetFile.cs @@ -21,7 +21,7 @@ namespace TeleSharp.TL.Upload public TLAbsInputFileLocation location {get;set;} public int offset {get;set;} public int limit {get;set;} - public Upload.TLFile Response{ get; set;} + public Upload.TLAbsFile Response{ get; set;} public void ComputeFlags() @@ -47,7 +47,7 @@ bw.Write(limit); } public override void deserializeResponse(BinaryReader br) { - Response = (Upload.TLFile)ObjectUtils.DeserializeObject(br); + Response = (Upload.TLAbsFile)ObjectUtils.DeserializeObject(br); } } diff --git a/TeleSharp.TL/TL/Upload/TLRequestGetWebFile.cs b/TeleSharp.TL/TL/Upload/TLRequestGetWebFile.cs new file mode 100644 index 0000000..b49dab1 --- /dev/null +++ b/TeleSharp.TL/TL/Upload/TLRequestGetWebFile.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Upload +{ + [TLObject(619086221)] + public class TLRequestGetWebFile : TLMethod + { + public override int Constructor + { + get + { + return 619086221; + } + } + + public TLInputWebFileLocation location {get;set;} + public int offset {get;set;} + public int limit {get;set;} + public Upload.TLWebFile Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + location = (TLInputWebFileLocation)ObjectUtils.DeserializeObject(br); +offset = br.ReadInt32(); +limit = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(location,bw); +bw.Write(offset); +bw.Write(limit); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = (Upload.TLWebFile)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Upload/TLRequestReuploadCdnFile.cs b/TeleSharp.TL/TL/Upload/TLRequestReuploadCdnFile.cs new file mode 100644 index 0000000..34a981c --- /dev/null +++ b/TeleSharp.TL/TL/Upload/TLRequestReuploadCdnFile.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Upload +{ + [TLObject(779755552)] + public class TLRequestReuploadCdnFile : TLMethod + { + public override int Constructor + { + get + { + return 779755552; + } + } + + public byte[] file_token {get;set;} + public byte[] request_token {get;set;} + public bool Response{ get; set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + file_token = BytesUtil.Deserialize(br); +request_token = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(file_token,bw); +BytesUtil.Serialize(request_token,bw); + + } + public override void deserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/TeleSharp.TL/TL/Upload/TLWebFile.cs b/TeleSharp.TL/TL/Upload/TLWebFile.cs new file mode 100644 index 0000000..f16993e --- /dev/null +++ b/TeleSharp.TL/TL/Upload/TLWebFile.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Upload +{ + [TLObject(568808380)] + public class TLWebFile : TLObject + { + public override int Constructor + { + get + { + return 568808380; + } + } + + public int size {get;set;} + public string mime_type {get;set;} + public Storage.TLAbsFileType file_type {get;set;} + public int mtime {get;set;} + public byte[] bytes {get;set;} + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + size = br.ReadInt32(); +mime_type = StringUtil.Deserialize(br); +file_type = (Storage.TLAbsFileType)ObjectUtils.DeserializeObject(br); +mtime = br.ReadInt32(); +bytes = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(size); +StringUtil.Serialize(mime_type,bw); +ObjectUtils.SerializeObject(file_type,bw); +bw.Write(mtime); +BytesUtil.Serialize(bytes,bw); + + } + } +} diff --git a/TeleSharp.TL/TeleSharp.TL.csproj b/TeleSharp.TL/TeleSharp.TL.csproj index 65252c2..7c6b30c 100644 --- a/TeleSharp.TL/TeleSharp.TL.csproj +++ b/TeleSharp.TL/TeleSharp.TL.csproj @@ -68,6 +68,7 @@ + @@ -84,6 +85,7 @@ + @@ -115,6 +117,8 @@ + + @@ -171,24 +175,24 @@ - - - + + + @@ -208,6 +212,7 @@ + @@ -239,12 +244,14 @@ + + @@ -260,9 +267,11 @@ + + @@ -274,7 +283,9 @@ + + @@ -290,6 +301,8 @@ + + @@ -297,7 +310,9 @@ + + @@ -307,6 +322,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -315,6 +352,10 @@ + + + + @@ -362,6 +403,7 @@ + @@ -377,15 +419,20 @@ + + + + + @@ -409,6 +456,8 @@ + + @@ -450,6 +499,7 @@ + @@ -525,6 +575,7 @@ + @@ -537,9 +588,12 @@ + + + @@ -547,6 +601,8 @@ + + @@ -555,10 +611,12 @@ + + @@ -574,11 +632,16 @@ + + + + + @@ -586,6 +649,7 @@ + @@ -601,6 +665,9 @@ + + + @@ -621,6 +688,7 @@ + @@ -633,6 +701,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -641,12 +736,26 @@ + + + + + + + + + + + + + + @@ -669,16 +778,29 @@ + + + + + + + + + + + + + @@ -690,10 +812,15 @@ + + + + + @@ -706,6 +833,7 @@ + @@ -714,12 +842,13 @@ - + + @@ -760,8 +889,10 @@ + + @@ -771,14 +902,24 @@ + + + + + + + + + +