2022-02-23 23:50:52 +01:00
using System ;
2021-08-04 00:40:09 +02:00
namespace TL
{
2023-07-08 01:34:31 +02:00
#pragma warning disable IDE1006
2021-11-03 18:20:54 +01:00
/// <summary>Object describes the contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/type/DecryptedMessage"/></para></summary>
2024-03-26 02:30:16 +01:00
public abstract partial class DecryptedMessageBase : IObject
2021-10-23 03:36:46 +02:00
{
2022-10-05 02:17:04 +02:00
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a> (added in layer 45)</summary>
2024-03-04 23:54:58 +01:00
public virtual uint FFlags = > default ;
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary>
2024-03-04 23:54:58 +01:00
public virtual long RandomId = > default ;
2022-10-05 02:17:04 +02:00
/// <summary>Message lifetime. Has higher priority than <see cref="Layer8.DecryptedMessageActionSetMessageTTL"/>.<br/>Parameter added in Layer 17.</summary>
2024-03-04 23:54:58 +01:00
public virtual int Ttl = > default ;
2022-10-05 02:17:04 +02:00
/// <summary>Message text</summary>
2024-03-04 23:54:58 +01:00
public virtual string Message = > default ;
2022-10-05 02:17:04 +02:00
/// <summary>Media content</summary>
2024-03-04 23:54:58 +01:00
public virtual DecryptedMessageMedia Media = > default ;
2022-10-05 02:17:04 +02:00
/// <summary>Message <a href="https://corefork.telegram.org/api/entities">entities</a> for styled text (parameter added in layer 45)</summary>
2024-03-04 23:54:58 +01:00
public virtual MessageEntity [ ] Entities = > default ;
2022-10-05 02:17:04 +02:00
/// <summary>Specifies the ID of the inline bot that generated the message (parameter added in layer 45)</summary>
2024-03-04 23:54:58 +01:00
public virtual string ViaBotName = > default ;
2022-10-05 02:17:04 +02:00
/// <summary>Random message ID of the message this message replies to (parameter added in layer 45)</summary>
2024-03-04 23:54:58 +01:00
public virtual long ReplyToRandom = > default ;
2022-10-05 02:17:04 +02:00
/// <summary>Random group ID, assigned by the author of message.<br/>Multiple encrypted messages with a photo attached and with the same group ID indicate an <a href="https://corefork.telegram.org/api/files#albums-grouped-media">album or grouped media</a> (parameter added in layer 45)</summary>
2024-03-04 23:54:58 +01:00
public virtual long Grouped = > default ;
public virtual byte [ ] RandomBytes = > default ;
public virtual DecryptedMessageAction Action = > default ;
2021-10-23 03:36:46 +02:00
}
2021-09-26 05:07:17 +02:00
2021-11-03 18:20:54 +01:00
/// <summary>Object describes media contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/type/DecryptedMessageMedia"/></para></summary>
2022-10-26 15:14:29 +02:00
/// <remarks>a <see langword="null"/> value means <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaEmpty">decryptedMessageMediaEmpty</a></remarks>
2024-03-26 02:30:16 +01:00
public abstract partial class DecryptedMessageMedia : IObject
2022-10-07 03:00:57 +02:00
{
2024-03-04 23:54:58 +01:00
public virtual string MimeType = > default ;
2023-04-02 13:44:23 +02:00
internal virtual ( long size , byte [ ] key , byte [ ] iv ) SizeKeyIV { get = > default ; set = > throw new WTelegram . WTException ( "Incompatible DecryptedMessageMedia" ) ; }
2022-10-07 03:00:57 +02:00
}
2021-09-26 05:07:17 +02:00
2021-11-03 18:20:54 +01:00
/// <summary>Object describes the action to which a service message is linked. <para>See <a href="https://corefork.telegram.org/type/DecryptedMessageAction"/></para></summary>
2024-03-26 02:30:16 +01:00
public abstract partial class DecryptedMessageAction : IObject { }
2021-09-26 05:07:17 +02:00
2021-11-03 18:20:54 +01:00
/// <summary>Indicates the location of a photo, will be deprecated soon <para>See <a href="https://corefork.telegram.org/type/FileLocation"/></para></summary>
2024-03-26 02:30:16 +01:00
public abstract partial class FileLocationBase : IObject
2021-10-23 03:36:46 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Server volume</summary>
2024-03-04 23:54:58 +01:00
public virtual long VolumeId = > default ;
2021-11-03 03:53:48 +01:00
/// <summary>File ID</summary>
2024-03-04 23:54:58 +01:00
public virtual int LocalId = > default ;
2021-11-03 03:53:48 +01:00
/// <summary>Checksum to access the file</summary>
2024-03-04 23:54:58 +01:00
public virtual long Secret = > default ;
2021-10-23 03:36:46 +02:00
}
2021-09-26 05:07:17 +02:00
2021-08-07 03:44:11 +02:00
namespace Layer8
2021-08-04 00:40:09 +02:00
{
2021-11-03 18:20:54 +01:00
/// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x1F814F1F)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessage : DecryptedMessageBase
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary>
2021-08-07 03:44:11 +02:00
public long random_id ;
public byte [ ] random_bytes ;
2021-11-03 03:53:48 +01:00
/// <summary>Message text</summary>
2021-08-07 03:44:11 +02:00
public string message ;
2021-11-03 03:53:48 +01:00
/// <summary>Media content</summary>
2021-08-07 03:44:11 +02:00
public DecryptedMessageMedia media ;
2021-10-23 03:36:46 +02:00
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary>
2021-10-23 03:36:46 +02:00
public override long RandomId = > random_id ;
2022-10-05 02:17:04 +02:00
/// <summary>Message text</summary>
public override string Message = > message ;
/// <summary>Media content</summary>
public override DecryptedMessageMedia Media = > media ;
public override byte [ ] RandomBytes = > random_bytes ;
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Contents of an encrypted service message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageService"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0xAA48327D)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageService : DecryptedMessageBase
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the message author.<br/>Must be equal to the ID passed to the sending method.</summary>
2021-08-07 03:44:11 +02:00
public long random_id ;
public byte [ ] random_bytes ;
2021-11-03 03:53:48 +01:00
/// <summary>Action relevant to the service message</summary>
2021-08-07 03:44:11 +02:00
public DecryptedMessageAction action ;
2021-10-23 03:36:46 +02:00
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the message author.<br/>Must be equal to the ID passed to the sending method.</summary>
2021-10-23 03:36:46 +02:00
public override long RandomId = > random_id ;
2022-10-05 02:17:04 +02:00
public override byte [ ] RandomBytes = > random_bytes ;
/// <summary>Action relevant to the service message</summary>
public override DecryptedMessageAction Action = > action ;
2021-08-07 03:44:11 +02:00
}
2021-08-04 00:40:09 +02:00
2021-11-03 18:20:54 +01:00
/// <summary>Photo attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaPhoto"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x32798A8C)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaPhoto : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Content of thumbnail file (JPEGfile, quality 55, set in a square 90x90)</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] thumb ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail width</summary>
2021-08-07 03:44:11 +02:00
public int thumb_w ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail height</summary>
2021-08-07 03:44:11 +02:00
public int thumb_h ;
2021-11-03 03:53:48 +01:00
/// <summary>Photo width</summary>
2021-08-07 03:44:11 +02:00
public int w ;
2021-11-03 03:53:48 +01:00
/// <summary>Photo height</summary>
2021-08-07 03:44:11 +02:00
public int h ;
2021-11-03 03:53:48 +01:00
/// <summary>Size of the photo in bytes</summary>
2021-08-07 03:44:11 +02:00
public int size ;
2021-11-03 03:53:48 +01:00
/// <summary>Key to decrypt an attached file with a full version</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] key ;
2021-11-03 03:53:48 +01:00
/// <summary>Initialization vector</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] iv ;
2022-10-07 03:00:57 +02:00
2022-10-20 23:12:43 +02:00
public override string MimeType = > "image/jpeg" ;
2022-11-11 00:33:29 +01:00
internal override ( long size , byte [ ] key , byte [ ] iv ) SizeKeyIV { get = > ( size , key , iv ) ; set = > ( size , key , iv ) = ( checked ( ( int ) value . size ) , value . key , value . iv ) ; }
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Video attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVideo"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x4CEE6EF3)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaVideo : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Content of thumbnail file (JPEG file, quality 55, set in a square 90x90)</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] thumb ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail width</summary>
2021-08-07 03:44:11 +02:00
public int thumb_w ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail height</summary>
2021-08-07 03:44:11 +02:00
public int thumb_h ;
2021-11-03 03:53:48 +01:00
/// <summary>Duration of video in seconds</summary>
2021-08-07 03:44:11 +02:00
public int duration ;
2021-11-03 03:53:48 +01:00
/// <summary>Image width</summary>
2021-08-07 03:44:11 +02:00
public int w ;
2021-11-03 03:53:48 +01:00
/// <summary>Image height</summary>
2021-08-07 03:44:11 +02:00
public int h ;
2021-11-03 03:53:48 +01:00
/// <summary>File size</summary>
2021-08-07 03:44:11 +02:00
public int size ;
2021-11-03 03:53:48 +01:00
/// <summary>Key to decrypt the attached video file</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] key ;
2021-11-03 03:53:48 +01:00
/// <summary>Initialization vector</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] iv ;
2022-10-07 03:00:57 +02:00
2022-11-11 00:33:29 +01:00
internal override ( long size , byte [ ] key , byte [ ] iv ) SizeKeyIV { get = > ( size , key , iv ) ; set = > ( size , key , iv ) = ( checked ( ( int ) value . size ) , value . key , value . iv ) ; }
2021-08-07 03:44:11 +02:00
}
2022-03-01 11:07:01 +01:00
/// <summary>GeoPoint attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaGeoPoint"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x35480A59)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaGeoPoint : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Latitude of point</summary>
2021-08-07 03:44:11 +02:00
public double lat ;
2022-03-01 11:07:01 +01:00
/// <summary>Longitude of point</summary>
2022-01-29 16:47:47 +01:00
public double lon ;
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Contact attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaContact"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x588A0A97)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaContact : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Phone number</summary>
2021-08-07 03:44:11 +02:00
public string phone_number ;
2021-11-03 03:53:48 +01:00
/// <summary>Contact's first name</summary>
2021-08-07 03:44:11 +02:00
public string first_name ;
2021-11-03 03:53:48 +01:00
/// <summary>Contact's last name</summary>
2021-08-07 03:44:11 +02:00
public string last_name ;
2021-11-03 03:53:48 +01:00
/// <summary>Telegram User ID of signed-up contact</summary>
2021-08-07 03:44:11 +02:00
public int user_id ;
}
2021-11-03 18:20:54 +01:00
/// <summary>Document attached to a message in a secret chat. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaDocument"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0xB095434B)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaDocument : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square)</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] thumb ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail width</summary>
2021-08-07 03:44:11 +02:00
public int thumb_w ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail height</summary>
2021-08-07 03:44:11 +02:00
public int thumb_h ;
public string file_name ;
2021-11-03 03:53:48 +01:00
/// <summary>File MIME-type</summary>
2021-08-07 03:44:11 +02:00
public string mime_type ;
2022-09-02 23:02:44 +02:00
/// <summary>Document size (<see cref="int"/> on layer <143, <see cref="long"/> on layer >=143)</summary>
2021-08-07 03:44:11 +02:00
public int size ;
2021-11-03 03:53:48 +01:00
/// <summary>Key to decrypt the attached document file</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] key ;
2021-11-03 03:53:48 +01:00
/// <summary>Initialization</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] iv ;
2022-10-07 03:00:57 +02:00
2022-10-20 23:12:43 +02:00
/// <summary>File MIME-type</summary>
public override string MimeType = > mime_type ;
2022-11-11 00:33:29 +01:00
internal override ( long size , byte [ ] key , byte [ ] iv ) SizeKeyIV { get = > ( size , key , iv ) ; set = > ( size , key , iv ) = ( checked ( ( int ) value . size ) , value . key , value . iv ) ; }
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Audio file attached to a secret chat message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaAudio"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x6080758F)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaAudio : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Audio duration in seconds</summary>
2021-08-07 03:44:11 +02:00
public int duration ;
2021-11-03 03:53:48 +01:00
/// <summary>File size</summary>
2021-08-07 03:44:11 +02:00
public int size ;
2021-11-03 03:53:48 +01:00
/// <summary>Key to decrypt the attached media file</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] key ;
2021-11-03 03:53:48 +01:00
/// <summary>Initialization vector</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] iv ;
2022-10-07 03:00:57 +02:00
2022-11-11 00:33:29 +01:00
internal override ( long size , byte [ ] key , byte [ ] iv ) SizeKeyIV { get = > ( size , key , iv ) ; set = > ( size , key , iv ) = ( checked ( ( int ) value . size ) , value . key , value . iv ) ; }
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Setting of a message lifetime after reading. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionSetMessageTTL"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0xA1733AEC)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionSetMessageTTL : DecryptedMessageAction
2021-11-03 03:53:48 +01:00
{
/// <summary>Lifetime in seconds</summary>
public int ttl_seconds ;
}
2021-11-03 18:20:54 +01:00
/// <summary>Messages marked as read. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionReadMessages"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x0C4F40BE)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionReadMessages : DecryptedMessageAction
2021-11-03 03:53:48 +01:00
{
/// <summary>List of message IDs</summary>
public long [ ] random_ids ;
}
2021-11-03 18:20:54 +01:00
/// <summary>Deleted messages. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionDeleteMessages"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x65614304)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionDeleteMessages : DecryptedMessageAction
2021-11-03 03:53:48 +01:00
{
/// <summary>List of deleted message IDs</summary>
public long [ ] random_ids ;
}
2021-11-03 18:20:54 +01:00
/// <summary>A screenshot was taken. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionScreenshotMessages"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x8AC1F475)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionScreenshotMessages : DecryptedMessageAction
2021-11-03 03:53:48 +01:00
{
/// <summary>List of affected message ids (that appeared on the screenshot)</summary>
public long [ ] random_ids ;
}
2021-11-03 18:20:54 +01:00
/// <summary>The entire message history has been deleted. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionFlushHistory"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x6719E45C)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionFlushHistory : DecryptedMessageAction { }
2021-08-04 00:40:09 +02:00
}
2021-08-07 03:44:11 +02:00
2022-11-11 00:33:29 +01:00
namespace Layer23
2021-08-04 00:40:09 +02:00
{
2022-11-11 00:33:29 +01:00
/// <summary>Image description. <para>See <a href="https://corefork.telegram.org/constructor/photoSize"/></para></summary>
[TLDef(0x77BFB61B)]
2024-03-26 02:30:16 +01:00
public sealed partial class PhotoSize : PhotoSizeBase
2022-11-11 00:33:29 +01:00
{
/// <summary><a href="https://corefork.telegram.org/api/files#image-thumbnail-types">Thumbnail type »</a></summary>
public string type ;
public FileLocationBase location ;
/// <summary>Image width</summary>
public int w ;
/// <summary>Image height</summary>
public int h ;
/// <summary>File size</summary>
public int size ;
/// <summary><a href="https://corefork.telegram.org/api/files#image-thumbnail-types">Thumbnail type »</a></summary>
public override string Type = > type ;
}
/// <summary>Description of an image and its content. <para>See <a href="https://corefork.telegram.org/constructor/photoCachedSize"/></para></summary>
[TLDef(0xE9A734FA)]
2024-03-26 02:30:16 +01:00
public sealed partial class PhotoCachedSize : PhotoSizeBase
2022-11-11 00:33:29 +01:00
{
/// <summary>Thumbnail type</summary>
public string type ;
public FileLocationBase location ;
/// <summary>Image width</summary>
public int w ;
/// <summary>Image height</summary>
public int h ;
/// <summary>Binary data, file content</summary>
public byte [ ] bytes ;
/// <summary>Thumbnail type</summary>
public override string Type = > type ;
}
2021-11-03 18:20:54 +01:00
/// <summary>User is uploading a video. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadVideoAction"/></para></summary>
2021-09-26 05:07:17 +02:00
[TLDef(0x92042FF7)]
2024-03-26 02:30:16 +01:00
public sealed partial class SendMessageUploadVideoAction : SendMessageAction { }
2021-11-03 18:20:54 +01:00
/// <summary>User is uploading a voice message. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadAudioAction"/></para></summary>
2021-09-26 05:07:17 +02:00
[TLDef(0xE6AC8A6F)]
2024-03-26 02:30:16 +01:00
public sealed partial class SendMessageUploadAudioAction : SendMessageAction { }
2021-11-03 18:20:54 +01:00
/// <summary>User is uploading a photo. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadPhotoAction"/></para></summary>
2021-09-26 05:07:17 +02:00
[TLDef(0x990A3C1A)]
2024-03-26 02:30:16 +01:00
public sealed partial class SendMessageUploadPhotoAction : SendMessageAction { }
2021-11-03 18:20:54 +01:00
/// <summary>User is uploading a file. <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadDocumentAction"/></para></summary>
2021-09-26 05:07:17 +02:00
[TLDef(0x8FAEE98E)]
2024-03-26 02:30:16 +01:00
public sealed partial class SendMessageUploadDocumentAction : SendMessageAction { }
2021-09-26 05:07:17 +02:00
2022-11-11 00:33:29 +01:00
/// <summary>Defines a sticker <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeSticker"/></para></summary>
[TLDef(0xFB0A5727)]
2024-03-26 02:30:16 +01:00
public sealed partial class DocumentAttributeSticker : DocumentAttribute { }
2022-11-11 00:33:29 +01:00
/// <summary>Defines a video <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeVideo"/></para></summary>
[TLDef(0x5910CCCB)]
2024-03-26 02:30:16 +01:00
public sealed partial class DocumentAttributeVideo : DocumentAttribute
2022-11-11 00:33:29 +01:00
{
/// <summary>Duration in seconds</summary>
public int duration ;
/// <summary>Video width</summary>
public int w ;
/// <summary>Video height</summary>
public int h ;
}
/// <summary>Represents an audio file <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeAudio"/></para></summary>
[TLDef(0x051448E5)]
2024-03-26 02:30:16 +01:00
public sealed partial class DocumentAttributeAudio : DocumentAttribute
2022-11-11 00:33:29 +01:00
{
/// <summary>Duration in seconds</summary>
public int duration ;
}
2021-11-03 18:20:54 +01:00
/// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x204D3878)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessage : DecryptedMessageBase
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary>
2021-08-07 03:44:11 +02:00
public long random_id ;
2022-09-14 18:22:52 +02:00
/// <summary>Message lifetime. Has higher priority than <see cref="Layer8.DecryptedMessageActionSetMessageTTL"/>.<br/>Parameter added in Layer 17.</summary>
2021-08-07 03:44:11 +02:00
public int ttl ;
2021-11-03 03:53:48 +01:00
/// <summary>Message text</summary>
2021-08-07 03:44:11 +02:00
public string message ;
2021-11-03 03:53:48 +01:00
/// <summary>Media content</summary>
2021-08-07 03:44:11 +02:00
public DecryptedMessageMedia media ;
2021-10-23 03:36:46 +02:00
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary>
2021-10-23 03:36:46 +02:00
public override long RandomId = > random_id ;
2022-10-05 02:17:04 +02:00
/// <summary>Message lifetime. Has higher priority than <see cref="Layer8.DecryptedMessageActionSetMessageTTL"/>.<br/>Parameter added in Layer 17.</summary>
public override int Ttl = > ttl ;
/// <summary>Message text</summary>
public override string Message = > message ;
/// <summary>Media content</summary>
public override DecryptedMessageMedia Media = > media ;
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Contents of an encrypted service message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageService"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x73164160)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageService : DecryptedMessageBase
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the message author.<br/>Must be equal to the ID passed to the sending method.</summary>
2021-08-07 03:44:11 +02:00
public long random_id ;
2021-11-03 03:53:48 +01:00
/// <summary>Action relevant to the service message</summary>
2021-08-07 03:44:11 +02:00
public DecryptedMessageAction action ;
2021-10-23 03:36:46 +02:00
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the message author.<br/>Must be equal to the ID passed to the sending method.</summary>
2021-10-23 03:36:46 +02:00
public override long RandomId = > random_id ;
2022-10-05 02:17:04 +02:00
/// <summary>Action relevant to the service message</summary>
public override DecryptedMessageAction Action = > action ;
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Video attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVideo"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x524A415D)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaVideo : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Content of thumbnail file (JPEG file, quality 55, set in a square 90x90)</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] thumb ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail width</summary>
2021-08-07 03:44:11 +02:00
public int thumb_w ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail height</summary>
2021-08-07 03:44:11 +02:00
public int thumb_h ;
2021-11-03 03:53:48 +01:00
/// <summary>Duration of video in seconds</summary>
2021-08-07 03:44:11 +02:00
public int duration ;
2022-09-14 18:22:52 +02:00
/// <summary>MIME-type of the video file<br/>Parameter added in Layer 17.</summary>
2021-08-07 03:44:11 +02:00
public string mime_type ;
2021-11-03 03:53:48 +01:00
/// <summary>Image width</summary>
2021-08-07 03:44:11 +02:00
public int w ;
2021-11-03 03:53:48 +01:00
/// <summary>Image height</summary>
2021-08-07 03:44:11 +02:00
public int h ;
2021-11-03 03:53:48 +01:00
/// <summary>File size</summary>
2021-08-07 03:44:11 +02:00
public int size ;
2021-11-03 03:53:48 +01:00
/// <summary>Key to decrypt the attached video file</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] key ;
2021-11-03 03:53:48 +01:00
/// <summary>Initialization vector</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] iv ;
2022-10-07 03:00:57 +02:00
2022-10-20 23:12:43 +02:00
/// <summary>MIME-type of the video file<br/>Parameter added in Layer 17.</summary>
public override string MimeType = > mime_type ;
2022-11-11 00:33:29 +01:00
internal override ( long size , byte [ ] key , byte [ ] iv ) SizeKeyIV { get = > ( size , key , iv ) ; set = > ( size , key , iv ) = ( checked ( ( int ) value . size ) , value . key , value . iv ) ; }
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Audio file attached to a secret chat message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaAudio"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x57E0A9CB)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaAudio : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Audio duration in seconds</summary>
2021-08-07 03:44:11 +02:00
public int duration ;
2022-09-14 18:22:52 +02:00
/// <summary>MIME-type of the audio file<br/>Parameter added in Layer 13.</summary>
2021-08-07 03:44:11 +02:00
public string mime_type ;
2021-11-03 03:53:48 +01:00
/// <summary>File size</summary>
2021-08-07 03:44:11 +02:00
public int size ;
2021-11-03 03:53:48 +01:00
/// <summary>Key to decrypt the attached media file</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] key ;
2021-11-03 03:53:48 +01:00
/// <summary>Initialization vector</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] iv ;
2022-10-07 03:00:57 +02:00
2022-10-20 23:12:43 +02:00
/// <summary>MIME-type of the audio file<br/>Parameter added in Layer 13.</summary>
public override string MimeType = > mime_type ;
2022-11-11 00:33:29 +01:00
internal override ( long size , byte [ ] key , byte [ ] iv ) SizeKeyIV { get = > ( size , key , iv ) ; set = > ( size , key , iv ) = ( checked ( ( int ) value . size ) , value . key , value . iv ) ; }
}
/// <summary>Non-e2e documented forwarded from non-secret chat <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaExternalDocument"/></para></summary>
[TLDef(0xFA95B0DD)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaExternalDocument : DecryptedMessageMedia
2022-11-11 00:33:29 +01:00
{
/// <summary>Document ID</summary>
public long id ;
/// <summary>access hash</summary>
public long access_hash ;
/// <summary>Date</summary>
public DateTime date ;
/// <summary>Mime type</summary>
public string mime_type ;
/// <summary>Size</summary>
public int size ;
/// <summary>Thumbnail</summary>
public PhotoSizeBase thumb ;
/// <summary>DC ID</summary>
public int dc_id ;
/// <summary>Attributes for media types</summary>
public DocumentAttribute [ ] attributes ;
/// <summary>Mime type</summary>
public override string MimeType = > mime_type ;
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Request for the other party in a Secret Chat to automatically resend a contiguous range of previously sent messages, as explained in <a href="https://corefork.telegram.org/api/end-to-end/seq_no">Sequence number is Secret Chats</a>. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionResend"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x511110B0)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionResend : DecryptedMessageAction
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary><c>out_seq_no</c> of the first message to be resent, with correct parity</summary>
2021-08-07 03:44:11 +02:00
public int start_seq_no ;
2021-11-03 03:53:48 +01:00
/// <summary><c>out_seq_no</c> of the last message to be resent, with same parity.</summary>
2021-08-07 03:44:11 +02:00
public int end_seq_no ;
}
2021-11-03 18:20:54 +01:00
/// <summary>A notification stating the API layer that is used by the client. You should use your current layer and take notice of the layer used on the other side of a conversation when sending messages. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionNotifyLayer"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0xF3048883)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionNotifyLayer : DecryptedMessageAction
2021-11-03 03:53:48 +01:00
{
2022-09-14 18:22:52 +02:00
/// <summary>Layer number, must be <strong>17</strong> or higher (this constructor was introduced in Layer 17.</summary>
2021-11-03 03:53:48 +01:00
public int layer ;
}
2021-11-03 18:20:54 +01:00
/// <summary>User is preparing a message: typing, recording, uploading, etc. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionTyping"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0xCCB27641)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionTyping : DecryptedMessageAction
2021-11-03 03:53:48 +01:00
{
/// <summary>Type of action</summary>
public SendMessageAction action ;
}
2022-11-11 00:33:29 +01:00
/// <summary>Request rekeying, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a> <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionRequestKey"/></para></summary>
[TLDef(0xF3C9611B)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionRequestKey : DecryptedMessageAction
2022-11-11 00:33:29 +01:00
{
/// <summary>Exchange ID</summary>
public long exchange_id ;
/// <summary>g_a, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a></summary>
public byte [ ] g_a ;
}
/// <summary>Accept new key <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionAcceptKey"/></para></summary>
[TLDef(0x6FE1735B)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionAcceptKey : DecryptedMessageAction
2022-11-11 00:33:29 +01:00
{
/// <summary>Exchange ID</summary>
public long exchange_id ;
/// <summary>B parameter, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a></summary>
public byte [ ] g_b ;
/// <summary>Key fingerprint, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a></summary>
public long key_fingerprint ;
}
/// <summary>Abort rekeying <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionAbortKey"/></para></summary>
[TLDef(0xDD05EC6B)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionAbortKey : DecryptedMessageAction
2022-11-11 00:33:29 +01:00
{
/// <summary>Exchange ID</summary>
public long exchange_id ;
}
/// <summary>Commit new key, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a> <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionCommitKey"/></para></summary>
[TLDef(0xEC2E0B9B)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionCommitKey : DecryptedMessageAction
2022-11-11 00:33:29 +01:00
{
/// <summary>Exchange ID, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a></summary>
public long exchange_id ;
/// <summary>Key fingerprint, see <a href="https://corefork.telegram.org/api/end-to-end/pfs">rekeying process</a></summary>
public long key_fingerprint ;
}
/// <summary>NOOP action <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageActionNoop"/></para></summary>
[TLDef(0xA82FDD63)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageActionNoop : DecryptedMessageAction { }
2021-08-07 03:44:11 +02:00
2021-11-03 18:20:54 +01:00
/// <summary>Sets the layer number for the contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageLayer"/></para></summary>
2021-09-26 05:07:17 +02:00
[TLDef(0x1BE31789)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageLayer : IObject
2021-08-07 03:44:11 +02:00
{
2022-09-14 18:22:52 +02:00
/// <summary>Set of random bytes to prevent content recognition in short encrypted messages.<br/>Clients are required to check that there are at least 15 random bytes included in each message. Messages with less than 15 random bytes must be ignored.<br/>Parameter moved here from <see cref="DecryptedMessage"/> in Layer 17.</summary>
2021-09-26 05:07:17 +02:00
public byte [ ] random_bytes ;
2021-11-03 03:53:48 +01:00
/// <summary>Layer number. Mimimal value - <strong>17</strong> (the layer in which the constructor was added).</summary>
2021-09-26 05:07:17 +02:00
public int layer ;
2022-09-14 18:22:52 +02:00
/// <summary>2x the number of messages in the sender's inbox (including deleted and service messages), incremented by 1 if current user was not the chat creator<br/>Parameter added in Layer 17.</summary>
2021-09-26 05:07:17 +02:00
public int in_seq_no ;
2022-09-14 18:22:52 +02:00
/// <summary>2x the number of messages in the recipient's inbox (including deleted and service messages), incremented by 1 if current user was the chat creator<br/>Parameter added in Layer 17.</summary>
2021-09-26 05:07:17 +02:00
public int out_seq_no ;
2021-11-03 03:53:48 +01:00
/// <summary>The content of message itself</summary>
2021-09-26 05:07:17 +02:00
public DecryptedMessageBase message ;
2021-08-07 03:44:11 +02:00
}
2022-11-11 00:33:29 +01:00
/// <summary>File is currently unavailable. <para>See <a href="https://corefork.telegram.org/constructor/fileLocationUnavailable"/></para></summary>
[TLDef(0x7C596B46)]
2024-03-26 02:30:16 +01:00
public sealed partial class FileLocationUnavailable : FileLocationBase
2022-11-11 00:33:29 +01:00
{
/// <summary>Server volume</summary>
public long volume_id ;
/// <summary>File ID</summary>
public int local_id ;
/// <summary>Checksum to access the file</summary>
public long secret ;
/// <summary>Server volume</summary>
public override long VolumeId = > volume_id ;
/// <summary>File ID</summary>
public override int LocalId = > local_id ;
/// <summary>Checksum to access the file</summary>
public override long Secret = > secret ;
}
/// <summary>File location. <para>See <a href="https://corefork.telegram.org/constructor/fileLocation"/></para></summary>
[TLDef(0x53D69076)]
2024-03-26 02:30:16 +01:00
public sealed partial class FileLocation : FileLocationBase
2022-11-11 00:33:29 +01:00
{
/// <summary>Number of the data center holding the file</summary>
public int dc_id ;
/// <summary>Server volume</summary>
public long volume_id ;
/// <summary>File ID</summary>
public int local_id ;
/// <summary>Checksum to access the file</summary>
public long secret ;
/// <summary>Server volume</summary>
public override long VolumeId = > volume_id ;
/// <summary>File ID</summary>
public override int LocalId = > local_id ;
/// <summary>Checksum to access the file</summary>
public override long Secret = > secret ;
}
2021-08-04 00:40:09 +02:00
}
2021-08-07 03:44:11 +02:00
2021-09-26 05:07:17 +02:00
namespace Layer45
2021-08-04 00:40:09 +02:00
{
2021-11-03 18:20:54 +01:00
/// <summary>Represents an audio file <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeAudio"/></para></summary>
2021-09-26 05:07:17 +02:00
[TLDef(0xDED218E0)]
2024-03-26 02:30:16 +01:00
public sealed partial class DocumentAttributeAudio : DocumentAttribute
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Duration in seconds</summary>
2021-09-26 05:07:17 +02:00
public int duration ;
2021-11-03 03:53:48 +01:00
/// <summary>Name of song</summary>
2021-09-26 05:07:17 +02:00
public string title ;
2021-11-03 03:53:48 +01:00
/// <summary>Performer</summary>
2021-09-26 05:07:17 +02:00
public string performer ;
2021-08-07 03:44:11 +02:00
}
2022-11-11 00:33:29 +01:00
}
namespace Layer46
{
/// <summary>Defines a sticker <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeSticker"/></para></summary>
[TLDef(0x3A556302)]
2024-03-26 02:30:16 +01:00
public sealed partial class DocumentAttributeSticker : DocumentAttribute
2022-11-11 00:33:29 +01:00
{
/// <summary>Alternative emoji representation of sticker</summary>
public string alt ;
/// <summary>Associated stickerset</summary>
public InputStickerSet stickerset ;
}
/// <summary>Message entity representing a <a href="https://corefork.telegram.org/api/mentions">user mention</a>: for <em>creating</em> a mention use <see cref="InputMessageEntityMentionName"/>. <para>See <a href="https://corefork.telegram.org/constructor/messageEntityMentionName"/></para></summary>
[TLDef(0x352DCA58, inheritBefore = true)]
2024-03-26 02:30:16 +01:00
public sealed partial class MessageEntityMentionName : MessageEntity
2022-11-11 00:33:29 +01:00
{
/// <summary>Identifier of the user that was mentioned</summary>
public int user_id ;
}
2021-08-04 00:40:09 +02:00
2021-11-03 18:20:54 +01:00
/// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x36B091DE)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessage : DecryptedMessageBase
2021-08-07 03:44:11 +02:00
{
2023-04-25 16:51:39 +02:00
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
2021-08-07 03:44:11 +02:00
public Flags flags ;
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary>
2021-08-07 03:44:11 +02:00
public long random_id ;
2022-09-14 18:22:52 +02:00
/// <summary>Message lifetime. Has higher priority than <see cref="Layer8.DecryptedMessageActionSetMessageTTL"/>.<br/>Parameter added in Layer 17.</summary>
2021-08-07 03:44:11 +02:00
public int ttl ;
2021-11-03 03:53:48 +01:00
/// <summary>Message text</summary>
2021-08-07 03:44:11 +02:00
public string message ;
2021-11-03 03:53:48 +01:00
/// <summary>Media content</summary>
2021-08-07 03:44:11 +02:00
[IfFlag(9)] public DecryptedMessageMedia media ;
2021-11-03 03:53:48 +01:00
/// <summary>Message <a href="https://corefork.telegram.org/api/entities">entities</a> for styled text (parameter added in layer 45)</summary>
2021-08-07 03:44:11 +02:00
[IfFlag(7)] public MessageEntity [ ] entities ;
2021-11-03 03:53:48 +01:00
/// <summary>Specifies the ID of the inline bot that generated the message (parameter added in layer 45)</summary>
2021-08-07 03:44:11 +02:00
[IfFlag(11)] public string via_bot_name ;
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID of the message this message replies to (parameter added in layer 45)</summary>
2021-08-07 03:44:11 +02:00
[IfFlag(3)] public long reply_to_random_id ;
2021-10-23 03:36:46 +02:00
2022-02-04 02:51:14 +01:00
[Flags] public enum Flags : uint
2021-11-03 03:53:48 +01:00
{
/// <summary>Field <see cref="reply_to_random_id"/> has a value</summary>
has_reply_to_random_id = 0x8 ,
/// <summary>Field <see cref="entities"/> has a value</summary>
has_entities = 0x80 ,
/// <summary>Field <see cref="media"/> has a value</summary>
has_media = 0x200 ,
/// <summary>Field <see cref="via_bot_name"/> has a value</summary>
has_via_bot_name = 0x800 ,
}
2022-10-05 02:17:04 +02:00
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a> (added in layer 45)</summary>
public override uint FFlags = > ( uint ) flags ;
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary>
2021-10-23 03:36:46 +02:00
public override long RandomId = > random_id ;
2022-10-05 02:17:04 +02:00
/// <summary>Message lifetime. Has higher priority than <see cref="Layer8.DecryptedMessageActionSetMessageTTL"/>.<br/>Parameter added in Layer 17.</summary>
public override int Ttl = > ttl ;
/// <summary>Message text</summary>
public override string Message = > message ;
/// <summary>Media content</summary>
public override DecryptedMessageMedia Media = > media ;
/// <summary>Message <a href="https://corefork.telegram.org/api/entities">entities</a> for styled text (parameter added in layer 45)</summary>
public override MessageEntity [ ] Entities = > entities ;
/// <summary>Specifies the ID of the inline bot that generated the message (parameter added in layer 45)</summary>
public override string ViaBotName = > via_bot_name ;
/// <summary>Random message ID of the message this message replies to (parameter added in layer 45)</summary>
public override long ReplyToRandom = > reply_to_random_id ;
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Photo attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaPhoto"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0xF1FA8D78)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaPhoto : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Content of thumbnail file (JPEGfile, quality 55, set in a square 90x90)</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] thumb ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail width</summary>
2021-08-07 03:44:11 +02:00
public int thumb_w ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail height</summary>
2021-08-07 03:44:11 +02:00
public int thumb_h ;
2021-11-03 03:53:48 +01:00
/// <summary>Photo width</summary>
2021-08-07 03:44:11 +02:00
public int w ;
2021-11-03 03:53:48 +01:00
/// <summary>Photo height</summary>
2021-08-07 03:44:11 +02:00
public int h ;
2021-11-03 03:53:48 +01:00
/// <summary>Size of the photo in bytes</summary>
2021-08-07 03:44:11 +02:00
public int size ;
2021-11-03 03:53:48 +01:00
/// <summary>Key to decrypt an attached file with a full version</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] key ;
2021-11-03 03:53:48 +01:00
/// <summary>Initialization vector</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] iv ;
2021-11-03 03:53:48 +01:00
/// <summary>Caption</summary>
2021-08-07 03:44:11 +02:00
public string caption ;
2022-10-07 03:00:57 +02:00
2022-10-20 23:12:43 +02:00
public override string MimeType = > "image/jpeg" ;
2022-11-11 00:33:29 +01:00
internal override ( long size , byte [ ] key , byte [ ] iv ) SizeKeyIV { get = > ( size , key , iv ) ; set = > ( size , key , iv ) = ( checked ( ( int ) value . size ) , value . key , value . iv ) ; }
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Video attached to an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVideo"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x970C8C0E)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaVideo : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Content of thumbnail file (JPEG file, quality 55, set in a square 90x90)</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] thumb ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail width</summary>
2021-08-07 03:44:11 +02:00
public int thumb_w ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail height</summary>
2021-08-07 03:44:11 +02:00
public int thumb_h ;
2021-11-03 03:53:48 +01:00
/// <summary>Duration of video in seconds</summary>
2021-08-07 03:44:11 +02:00
public int duration ;
2022-09-14 18:22:52 +02:00
/// <summary>MIME-type of the video file<br/>Parameter added in Layer 17.</summary>
2021-08-07 03:44:11 +02:00
public string mime_type ;
2021-11-03 03:53:48 +01:00
/// <summary>Image width</summary>
2021-08-07 03:44:11 +02:00
public int w ;
2021-11-03 03:53:48 +01:00
/// <summary>Image height</summary>
2021-08-07 03:44:11 +02:00
public int h ;
2021-11-03 03:53:48 +01:00
/// <summary>File size</summary>
2021-08-07 03:44:11 +02:00
public int size ;
2021-11-03 03:53:48 +01:00
/// <summary>Key to decrypt the attached video file</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] key ;
2021-11-03 03:53:48 +01:00
/// <summary>Initialization vector</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] iv ;
2021-11-03 03:53:48 +01:00
/// <summary>Caption</summary>
2021-08-07 03:44:11 +02:00
public string caption ;
2022-10-07 03:00:57 +02:00
2022-10-20 23:12:43 +02:00
/// <summary>MIME-type of the video file<br/>Parameter added in Layer 17.</summary>
public override string MimeType = > mime_type ;
2022-11-11 00:33:29 +01:00
internal override ( long size , byte [ ] key , byte [ ] iv ) SizeKeyIV { get = > ( size , key , iv ) ; set = > ( size , key , iv ) = ( checked ( ( int ) value . size ) , value . key , value . iv ) ; }
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Document attached to a message in a secret chat. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaDocument"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x7AFE8AE2)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaDocument : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square)</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] thumb ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail width</summary>
2021-08-07 03:44:11 +02:00
public int thumb_w ;
2021-11-03 03:53:48 +01:00
/// <summary>Thumbnail height</summary>
2021-08-07 03:44:11 +02:00
public int thumb_h ;
2021-11-03 03:53:48 +01:00
/// <summary>File MIME-type</summary>
2021-08-07 03:44:11 +02:00
public string mime_type ;
2022-09-02 23:02:44 +02:00
/// <summary>Document size (<see cref="int"/> on layer <143, <see cref="long"/> on layer >=143)</summary>
2021-08-07 03:44:11 +02:00
public int size ;
2021-11-03 03:53:48 +01:00
/// <summary>Key to decrypt the attached document file</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] key ;
2021-11-03 03:53:48 +01:00
/// <summary>Initialization</summary>
2021-08-07 03:44:11 +02:00
public byte [ ] iv ;
2021-11-03 03:53:48 +01:00
/// <summary>Document attributes for media types</summary>
2021-08-07 03:44:11 +02:00
public DocumentAttribute [ ] attributes ;
2021-11-03 03:53:48 +01:00
/// <summary>Caption</summary>
2021-08-07 03:44:11 +02:00
public string caption ;
2022-10-07 03:00:57 +02:00
2022-10-20 23:12:43 +02:00
/// <summary>File MIME-type</summary>
public override string MimeType = > mime_type ;
2022-11-11 00:33:29 +01:00
internal override ( long size , byte [ ] key , byte [ ] iv ) SizeKeyIV { get = > ( size , key , iv ) ; set = > ( size , key , iv ) = ( checked ( ( int ) value . size ) , value . key , value . iv ) ; }
2021-08-07 03:44:11 +02:00
}
2021-11-03 18:20:54 +01:00
/// <summary>Venue <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaVenue"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x8A0DF56F)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaVenue : DecryptedMessageMedia
2021-08-07 03:44:11 +02:00
{
2021-11-03 03:53:48 +01:00
/// <summary>Latitude of venue</summary>
2021-08-07 03:44:11 +02:00
public double lat ;
2021-11-03 03:53:48 +01:00
/// <summary>Longitude of venue</summary>
2022-01-29 16:47:47 +01:00
public double lon ;
2021-11-03 03:53:48 +01:00
/// <summary>Venue name</summary>
2021-08-07 03:44:11 +02:00
public string title ;
2021-11-03 03:53:48 +01:00
/// <summary>Address</summary>
2021-08-07 03:44:11 +02:00
public string address ;
2023-10-24 17:00:14 +02:00
/// <summary>Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported</summary>
2021-08-07 03:44:11 +02:00
public string provider ;
2021-11-03 03:53:48 +01:00
/// <summary>Venue ID in the provider's database</summary>
2021-08-07 03:44:11 +02:00
public string venue_id ;
}
2021-11-03 18:20:54 +01:00
/// <summary>Webpage preview <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaWebPage"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0xE50511D8)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaWebPage : DecryptedMessageMedia
2021-11-03 03:53:48 +01:00
{
/// <summary>URL of webpage</summary>
public string url ;
}
2021-08-04 00:40:09 +02:00
}
2021-08-07 03:44:11 +02:00
2022-11-11 00:33:29 +01:00
namespace Layer66
{
/// <summary>User is uploading a round video <para>See <a href="https://corefork.telegram.org/constructor/sendMessageUploadRoundAction"/></para></summary>
[TLDef(0xBB718624)]
2024-03-26 02:30:16 +01:00
public sealed partial class SendMessageUploadRoundAction : SendMessageAction { }
2023-07-21 10:52:46 +02:00
/// <summary>Defines a video <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeVideo"/></para></summary>
[TLDef(0x0EF02CE6)]
2024-03-26 02:30:16 +01:00
public sealed partial class DocumentAttributeVideo : DocumentAttribute
2023-07-21 10:52:46 +02:00
{
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
public Flags flags ;
/// <summary>Duration in seconds</summary>
public int duration ;
/// <summary>Video width</summary>
public int w ;
/// <summary>Video height</summary>
public int h ;
[Flags] public enum Flags : uint
{
/// <summary>Whether this is a round video</summary>
round_message = 0x1 ,
}
}
2022-11-11 00:33:29 +01:00
}
2021-08-07 03:44:11 +02:00
namespace Layer73
2021-08-04 00:40:09 +02:00
{
2021-11-03 18:20:54 +01:00
/// <summary>Contents of an encrypted message. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessage"/></para></summary>
2021-08-12 11:01:15 +02:00
[TLDef(0x91CC4674)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessage : DecryptedMessageBase
2021-08-07 03:44:11 +02:00
{
2023-04-25 16:51:39 +02:00
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
2021-08-07 03:44:11 +02:00
public Flags flags ;
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary>
2021-08-07 03:44:11 +02:00
public long random_id ;
2022-09-14 18:22:52 +02:00
/// <summary>Message lifetime. Has higher priority than <see cref="Layer8.DecryptedMessageActionSetMessageTTL"/>.<br/>Parameter added in Layer 17.</summary>
2021-08-07 03:44:11 +02:00
public int ttl ;
2021-11-03 03:53:48 +01:00
/// <summary>Message text</summary>
2021-08-07 03:44:11 +02:00
public string message ;
2021-11-03 03:53:48 +01:00
/// <summary>Media content</summary>
2021-09-26 05:07:17 +02:00
[IfFlag(9)] public DecryptedMessageMedia media ;
2021-11-03 03:53:48 +01:00
/// <summary>Message <a href="https://corefork.telegram.org/api/entities">entities</a> for styled text (parameter added in layer 45)</summary>
2021-08-07 03:44:11 +02:00
[IfFlag(7)] public MessageEntity [ ] entities ;
2021-11-03 03:53:48 +01:00
/// <summary>Specifies the ID of the inline bot that generated the message (parameter added in layer 45)</summary>
2021-08-07 03:44:11 +02:00
[IfFlag(11)] public string via_bot_name ;
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID of the message this message replies to (parameter added in layer 45)</summary>
2021-08-07 03:44:11 +02:00
[IfFlag(3)] public long reply_to_random_id ;
2021-11-03 03:53:48 +01:00
/// <summary>Random group ID, assigned by the author of message.<br/>Multiple encrypted messages with a photo attached and with the same group ID indicate an <a href="https://corefork.telegram.org/api/files#albums-grouped-media">album or grouped media</a> (parameter added in layer 45)</summary>
2021-08-07 03:44:11 +02:00
[IfFlag(17)] public long grouped_id ;
2021-10-23 03:36:46 +02:00
2022-02-04 02:51:14 +01:00
[Flags] public enum Flags : uint
2021-11-03 03:53:48 +01:00
{
/// <summary>Field <see cref="reply_to_random_id"/> has a value</summary>
has_reply_to_random_id = 0x8 ,
2022-11-11 00:33:29 +01:00
/// <summary>Whether this is a silent message (no notification triggered)</summary>
silent = 0x20 ,
2021-11-03 03:53:48 +01:00
/// <summary>Field <see cref="entities"/> has a value</summary>
has_entities = 0x80 ,
/// <summary>Field <see cref="media"/> has a value</summary>
has_media = 0x200 ,
/// <summary>Field <see cref="via_bot_name"/> has a value</summary>
has_via_bot_name = 0x800 ,
/// <summary>Field <see cref="grouped_id"/> has a value</summary>
has_grouped_id = 0x20000 ,
}
2022-10-05 02:17:04 +02:00
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a> (added in layer 45)</summary>
public override uint FFlags = > ( uint ) flags ;
2021-11-03 03:53:48 +01:00
/// <summary>Random message ID, assigned by the author of message.<br/>Must be equal to the ID passed to sending method.</summary>
2021-10-23 03:36:46 +02:00
public override long RandomId = > random_id ;
2022-10-05 02:17:04 +02:00
/// <summary>Message lifetime. Has higher priority than <see cref="Layer8.DecryptedMessageActionSetMessageTTL"/>.<br/>Parameter added in Layer 17.</summary>
public override int Ttl = > ttl ;
/// <summary>Message text</summary>
public override string Message = > message ;
/// <summary>Media content</summary>
public override DecryptedMessageMedia Media = > media ;
/// <summary>Message <a href="https://corefork.telegram.org/api/entities">entities</a> for styled text (parameter added in layer 45)</summary>
public override MessageEntity [ ] Entities = > entities ;
/// <summary>Specifies the ID of the inline bot that generated the message (parameter added in layer 45)</summary>
public override string ViaBotName = > via_bot_name ;
/// <summary>Random message ID of the message this message replies to (parameter added in layer 45)</summary>
public override long ReplyToRandom = > reply_to_random_id ;
/// <summary>Random group ID, assigned by the author of message.<br/>Multiple encrypted messages with a photo attached and with the same group ID indicate an <a href="https://corefork.telegram.org/api/files#albums-grouped-media">album or grouped media</a> (parameter added in layer 45)</summary>
public override long Grouped = > grouped_id ;
2021-08-07 03:44:11 +02:00
}
2021-08-04 00:40:09 +02:00
}
2021-09-26 05:07:17 +02:00
2022-11-11 00:33:29 +01:00
namespace Layer101
{ }
2021-09-26 05:07:17 +02:00
2022-11-11 00:33:29 +01:00
namespace Layer143
2021-09-26 05:07:17 +02:00
{
2022-11-11 00:33:29 +01:00
/// <summary>Document attached to a message in a secret chat. <para>See <a href="https://corefork.telegram.org/constructor/decryptedMessageMediaDocument"/></para></summary>
[TLDef(0x6ABD9782)]
2024-03-26 02:30:16 +01:00
public sealed partial class DecryptedMessageMediaDocument : DecryptedMessageMedia
2021-09-26 05:07:17 +02:00
{
2022-11-11 00:33:29 +01:00
/// <summary>Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square)</summary>
public byte [ ] thumb ;
/// <summary>Thumbnail width</summary>
public int thumb_w ;
/// <summary>Thumbnail height</summary>
public int thumb_h ;
/// <summary>File MIME-type</summary>
2021-09-26 05:07:17 +02:00
public string mime_type ;
2022-11-11 00:33:29 +01:00
/// <summary>Document size (<see cref="int"/> on layer <143, <see cref="long"/> on layer >=143)</summary>
public long size ;
/// <summary>Key to decrypt the attached document file</summary>
public byte [ ] key ;
/// <summary>Initialization</summary>
public byte [ ] iv ;
/// <summary>Document attributes for media types</summary>
2021-09-26 05:07:17 +02:00
public DocumentAttribute [ ] attributes ;
2022-11-11 00:33:29 +01:00
/// <summary>Caption</summary>
public string caption ;
2022-10-20 23:12:43 +02:00
2022-11-11 00:33:29 +01:00
/// <summary>File MIME-type</summary>
2022-10-20 23:12:43 +02:00
public override string MimeType = > mime_type ;
2021-10-23 03:36:46 +02:00
2022-11-11 00:33:29 +01:00
internal override ( long size , byte [ ] key , byte [ ] iv ) SizeKeyIV { get = > ( size , key , iv ) ; set = > ( size , key , iv ) = value ; }
2021-09-26 05:07:17 +02:00
}
}
2022-11-11 00:33:29 +01:00
namespace Layer144
2021-09-26 05:07:17 +02:00
{ }
2021-08-04 00:40:09 +02:00
}